diff --git a/App/Info.plist b/App/Info.plist index 4a4a171..b0ac88c 100644 --- a/App/Info.plist +++ b/App/Info.plist @@ -19,9 +19,9 @@ CFBundlePackageType APPL CFBundleShortVersionString - 0.6.0 + 0.7.0 CFBundleVersion - 14 + 15 LSMinimumSystemVersion 12.0 NSHighResolutionCapable diff --git a/App/Resources/reader/app.js b/App/Resources/reader/app.js index 3ce3f4b..6abf3ee 100644 --- a/App/Resources/reader/app.js +++ b/App/Resources/reader/app.js @@ -1,8 +1,6 @@ -var mdeyeReader=(()=>{var qIe=Object.create;var uk=Object.defineProperty;var VIe=Object.getOwnPropertyDescriptor;var HIe=Object.getOwnPropertyNames;var WIe=Object.getPrototypeOf,YIe=Object.prototype.hasOwnProperty;var XIe=(t,e,r)=>e in t?uk(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r;var A=(t,e)=>()=>(t&&(e=t(t=0)),e);var va=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),lr=(t,e)=>{for(var r in e)uk(t,r,{get:e[r],enumerable:!0})},GL=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of HIe(e))!YIe.call(t,a)&&a!==r&&uk(t,a,{get:()=>e[a],enumerable:!(n=VIe(e,a))||n.enumerable});return t},br=(t,e,r)=>(GL(t,e,"default"),r&&GL(r,e,"default")),ii=(t,e,r)=>(r=t!=null?qIe(WIe(t)):{},GL(e||!t||!t.__esModule?uk(r,"default",{value:t,enumerable:!0}):r,t));var ck=(t,e,r)=>XIe(t,typeof e!="symbol"?e+"":e,r);var OX=va((CIt,MX)=>{var WR=!0,DX=!1,NX=!1;MX.exports=function(t,e){e&&(WR=!e.enabled,DX=!!e.label,NX=!!e.labelAfter),t.core.ruler.after("inline","github-task-lists",function(r){for(var n=r.tokens,a=2;a=0;n--)if(t[n].level===r)return n;return-1}function qNe(t,e){return jNe(t[e])&&KNe(t[e-1])&&ZNe(t[e-2])&&QNe(t[e])}function VNe(t,e){if(t.children.unshift(HNe(t,e)),t.children[1].content=t.children[1].content.slice(3),t.content=t.content.slice(3),DX)if(NX){t.children.pop();var r="task-item-"+Math.ceil(Math.random()*(1e4*1e3)-1e3);t.children[0].content=t.children[0].content.slice(0,-1)+' id="'+r+'">',t.children.push(XNe(t.content,r,e))}else t.children.unshift(WNe(e)),t.children.push(YNe(e))}function HNe(t,e){var r=new e("html_inline","",0),n=WR?' disabled="" ':"";return t.content.indexOf("[ ] ")===0?r.content='':(t.content.indexOf("[x] ")===0||t.content.indexOf("[X] ")===0)&&(r.content=''),r}function WNe(t){var e=new t("html_inline","",0);return e.content="",e}function XNe(t,e,r){var n=new r("html_inline","",0);return n.content='",n.attrs=[{for:e}],n}function jNe(t){return t.type==="inline"}function KNe(t){return t.type==="paragraph_open"}function ZNe(t){return t.type==="list_item_open"}function QNe(t){return t.content.indexOf("[ ] ")===0||t.content.indexOf("[x] ")===0||t.content.indexOf("[X] ")===0}});var tj=va((SIt,ej)=>{function UX(t){return t instanceof Map?t.clear=t.delete=t.set=function(){throw new Error("map is read-only")}:t instanceof Set&&(t.add=t.clear=t.delete=function(){throw new Error("set is read-only")}),Object.freeze(t),Object.getOwnPropertyNames(t).forEach(e=>{let r=t[e],n=typeof r;(n==="object"||n==="function")&&!Object.isFrozen(r)&&UX(r)}),t}var Dk=class{constructor(e){e.data===void 0&&(e.data={}),this.data=e.data,this.isMatchIgnored=!1}ignoreMatch(){this.isMatchIgnored=!0}};function qX(t){return t.replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'")}function Af(t,...e){let r=Object.create(null);for(let n in t)r[n]=t[n];return e.forEach(function(n){for(let a in n)r[a]=n[a]}),r}var JNe="",PX=t=>!!t.scope,eMe=(t,{prefix:e})=>{if(t.startsWith("language:"))return t.replace("language:","language-");if(t.includes(".")){let r=t.split(".");return[`${e}${r.shift()}`,...r.map((n,a)=>`${n}${"_".repeat(a+1)}`)].join(" ")}return`${e}${t}`},XR=class{constructor(e,r){this.buffer="",this.classPrefix=r.classPrefix,e.walk(this)}addText(e){this.buffer+=qX(e)}openNode(e){if(!PX(e))return;let r=eMe(e.scope,{prefix:this.classPrefix});this.span(r)}closeNode(e){PX(e)&&(this.buffer+=JNe)}value(){return this.buffer}span(e){this.buffer+=``}},BX=(t={})=>{let e={children:[]};return Object.assign(e,t),e},jR=class t{constructor(){this.rootNode=BX(),this.stack=[this.rootNode]}get top(){return this.stack[this.stack.length-1]}get root(){return this.rootNode}add(e){this.top.children.push(e)}openNode(e){let r=BX({scope:e});this.add(r),this.stack.push(r)}closeNode(){if(this.stack.length>1)return this.stack.pop()}closeAllNodes(){for(;this.closeNode(););}toJSON(){return JSON.stringify(this.rootNode,null,4)}walk(e){return this.constructor._walk(e,this.rootNode)}static _walk(e,r){return typeof r=="string"?e.addText(r):r.children&&(e.openNode(r),r.children.forEach(n=>this._walk(e,n)),e.closeNode(r)),e}static _collapse(e){typeof e!="string"&&e.children&&(e.children.every(r=>typeof r=="string")?e.children=[e.children.join("")]:e.children.forEach(r=>{t._collapse(r)}))}},KR=class extends jR{constructor(e){super(),this.options=e}addText(e){e!==""&&this.add(e)}startScope(e){this.openNode(e)}endScope(){this.closeNode()}__addSublanguage(e,r){let n=e.root;r&&(n.scope=`language:${r}`),this.add(n)}toHTML(){return new XR(this,this.options).value()}finalize(){return this.closeAllNodes(),!0}};function bb(t){return t?typeof t=="string"?t:t.source:null}function VX(t){return ip("(?=",t,")")}function tMe(t){return ip("(?:",t,")*")}function rMe(t){return ip("(?:",t,")?")}function ip(...t){return t.map(r=>bb(r)).join("")}function nMe(t){let e=t[t.length-1];return typeof e=="object"&&e.constructor===Object?(t.splice(t.length-1,1),e):{}}function QR(...t){return"("+(nMe(t).capture?"":"?:")+t.map(n=>bb(n)).join("|")+")"}function HX(t){return new RegExp(t.toString()+"|").exec("").length-1}function aMe(t,e){let r=t&&t.exec(e);return r&&r.index===0}var iMe=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;function JR(t,{joinWith:e}){let r=0;return t.map(n=>{r+=1;let a=r,i=bb(n),s="";for(;i.length>0;){let o=iMe.exec(i);if(!o){s+=i;break}s+=i.substring(0,o.index),i=i.substring(o.index+o[0].length),o[0][0]==="\\"&&o[1]?s+="\\"+String(Number(o[1])+a):(s+=o[0],o[0]==="("&&r++)}return s}).map(n=>`(${n})`).join(e)}var sMe=/\b\B/,WX="[a-zA-Z]\\w*",eI="[a-zA-Z_]\\w*",YX="\\b\\d+(\\.\\d+)?",XX="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",jX="\\b(0b[01]+)",oMe="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",lMe=(t={})=>{let e=/^#![ ]*\//;return t.binary&&(t.begin=ip(e,/.*\b/,t.binary,/\b.*/)),Af({scope:"meta",begin:e,end:/$/,relevance:0,"on:begin":(r,n)=>{r.index!==0&&n.ignoreMatch()}},t)},wb={begin:"\\\\[\\s\\S]",relevance:0},uMe={scope:"string",begin:"'",end:"'",illegal:"\\n",contains:[wb]},cMe={scope:"string",begin:'"',end:'"',illegal:"\\n",contains:[wb]},hMe={begin:/\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/},Mk=function(t,e,r={}){let n=Af({scope:"comment",begin:t,end:e,contains:[]},r);n.contains.push({scope:"doctag",begin:"[ ]*(?=(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):)",end:/(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):/,excludeBegin:!0,relevance:0});let a=QR("I","a","is","so","us","to","at","if","in","it","on",/[A-Za-z]+['](d|ve|re|ll|t|s|n)/,/[A-Za-z]+[-][a-z]+/,/[A-Za-z][a-z]{2,}/);return n.contains.push({begin:ip(/[ ]+/,"(",a,/[.]?[:]?([.][ ]|[ ])/,"){3}")}),n},fMe=Mk("//","$"),dMe=Mk("/\\*","\\*/"),pMe=Mk("#","$"),mMe={scope:"number",begin:YX,relevance:0},gMe={scope:"number",begin:XX,relevance:0},vMe={scope:"number",begin:jX,relevance:0},yMe={scope:"regexp",begin:/\/(?=[^/\n]*\/)/,end:/\/[gimuy]*/,contains:[wb,{begin:/\[/,end:/\]/,relevance:0,contains:[wb]}]},xMe={scope:"title",begin:WX,relevance:0},bMe={scope:"title",begin:eI,relevance:0},wMe={begin:"\\.\\s*"+eI,relevance:0},kMe=function(t){return Object.assign(t,{"on:begin":(e,r)=>{r.data._beginMatch=e[1]},"on:end":(e,r)=>{r.data._beginMatch!==e[1]&&r.ignoreMatch()}})},Ik=Object.freeze({__proto__:null,APOS_STRING_MODE:uMe,BACKSLASH_ESCAPE:wb,BINARY_NUMBER_MODE:vMe,BINARY_NUMBER_RE:jX,COMMENT:Mk,C_BLOCK_COMMENT_MODE:dMe,C_LINE_COMMENT_MODE:fMe,C_NUMBER_MODE:gMe,C_NUMBER_RE:XX,END_SAME_AS_BEGIN:kMe,HASH_COMMENT_MODE:pMe,IDENT_RE:WX,MATCH_NOTHING_RE:sMe,METHOD_GUARD:wMe,NUMBER_MODE:mMe,NUMBER_RE:YX,PHRASAL_WORDS_MODE:hMe,QUOTE_STRING_MODE:cMe,REGEXP_MODE:yMe,RE_STARTERS_RE:oMe,SHEBANG:lMe,TITLE_MODE:xMe,UNDERSCORE_IDENT_RE:eI,UNDERSCORE_TITLE_MODE:bMe});function TMe(t,e){t.input[t.index-1]==="."&&e.ignoreMatch()}function EMe(t,e){t.className!==void 0&&(t.scope=t.className,delete t.className)}function CMe(t,e){e&&t.beginKeywords&&(t.begin="\\b("+t.beginKeywords.split(" ").join("|")+")(?!\\.)(?=\\b|\\s)",t.__beforeBegin=TMe,t.keywords=t.keywords||t.beginKeywords,delete t.beginKeywords,t.relevance===void 0&&(t.relevance=0))}function SMe(t,e){Array.isArray(t.illegal)&&(t.illegal=QR(...t.illegal))}function _Me(t,e){if(t.match){if(t.begin||t.end)throw new Error("begin & end are not supported with match");t.begin=t.match,delete t.match}}function AMe(t,e){t.relevance===void 0&&(t.relevance=1)}var LMe=(t,e)=>{if(!t.beforeMatch)return;if(t.starts)throw new Error("beforeMatch cannot be used with starts");let r=Object.assign({},t);Object.keys(t).forEach(n=>{delete t[n]}),t.keywords=r.keywords,t.begin=ip(r.beforeMatch,VX(r.begin)),t.starts={relevance:0,contains:[Object.assign(r,{endsParent:!0})]},t.relevance=0,delete r.beforeMatch},RMe=["of","and","for","in","not","or","if","then","parent","list","value"],IMe="keyword";function KX(t,e,r=IMe){let n=Object.create(null);return typeof t=="string"?a(r,t.split(" ")):Array.isArray(t)?a(r,t):Object.keys(t).forEach(function(i){Object.assign(n,KX(t[i],e,i))}),n;function a(i,s){e&&(s=s.map(o=>o.toLowerCase())),s.forEach(function(o){let l=o.split("|");n[l[0]]=[i,DMe(l[0],l[1])]})}}function DMe(t,e){return e?Number(e):NMe(t)?0:1}function NMe(t){return RMe.includes(t.toLowerCase())}var FX={},ap=t=>{console.error(t)},zX=(t,...e)=>{console.log(`WARN: ${t}`,...e)},_g=(t,e)=>{FX[`${t}/${e}`]||(console.log(`Deprecated as of ${t}. ${e}`),FX[`${t}/${e}`]=!0)},Nk=new Error;function ZX(t,e,{key:r}){let n=0,a=t[r],i={},s={};for(let o=1;o<=e.length;o++)s[o+n]=a[o],i[o+n]=!0,n+=HX(e[o-1]);t[r]=s,t[r]._emit=i,t[r]._multi=!0}function MMe(t){if(Array.isArray(t.begin)){if(t.skip||t.excludeBegin||t.returnBegin)throw ap("skip, excludeBegin, returnBegin not compatible with beginScope: {}"),Nk;if(typeof t.beginScope!="object"||t.beginScope===null)throw ap("beginScope must be object"),Nk;ZX(t,t.begin,{key:"beginScope"}),t.begin=JR(t.begin,{joinWith:""})}}function OMe(t){if(Array.isArray(t.end)){if(t.skip||t.excludeEnd||t.returnEnd)throw ap("skip, excludeEnd, returnEnd not compatible with endScope: {}"),Nk;if(typeof t.endScope!="object"||t.endScope===null)throw ap("endScope must be object"),Nk;ZX(t,t.end,{key:"endScope"}),t.end=JR(t.end,{joinWith:""})}}function PMe(t){t.scope&&typeof t.scope=="object"&&t.scope!==null&&(t.beginScope=t.scope,delete t.scope)}function BMe(t){PMe(t),typeof t.beginScope=="string"&&(t.beginScope={_wrap:t.beginScope}),typeof t.endScope=="string"&&(t.endScope={_wrap:t.endScope}),MMe(t),OMe(t)}function FMe(t){function e(s,o){return new RegExp(bb(s),"m"+(t.case_insensitive?"i":"")+(t.unicodeRegex?"u":"")+(o?"g":""))}class r{constructor(){this.matchIndexes={},this.regexes=[],this.matchAt=1,this.position=0}addRule(o,l){l.position=this.position++,this.matchIndexes[this.matchAt]=l,this.regexes.push([l,o]),this.matchAt+=HX(o)+1}compile(){this.regexes.length===0&&(this.exec=()=>null);let o=this.regexes.map(l=>l[1]);this.matcherRe=e(JR(o,{joinWith:"|"}),!0),this.lastIndex=0}exec(o){this.matcherRe.lastIndex=this.lastIndex;let l=this.matcherRe.exec(o);if(!l)return null;let u=l.findIndex((f,d)=>d>0&&f!==void 0),h=this.matchIndexes[u];return l.splice(0,u),Object.assign(l,h)}}class n{constructor(){this.rules=[],this.multiRegexes=[],this.count=0,this.lastIndex=0,this.regexIndex=0}getMatcher(o){if(this.multiRegexes[o])return this.multiRegexes[o];let l=new r;return this.rules.slice(o).forEach(([u,h])=>l.addRule(u,h)),l.compile(),this.multiRegexes[o]=l,l}resumingScanAtSamePosition(){return this.regexIndex!==0}considerAll(){this.regexIndex=0}addRule(o,l){this.rules.push([o,l]),l.type==="begin"&&this.count++}exec(o){let l=this.getMatcher(this.regexIndex);l.lastIndex=this.lastIndex;let u=l.exec(o);if(this.resumingScanAtSamePosition()&&!(u&&u.index===this.lastIndex)){let h=this.getMatcher(0);h.lastIndex=this.lastIndex+1,u=h.exec(o)}return u&&(this.regexIndex+=u.position+1,this.regexIndex===this.count&&this.considerAll()),u}}function a(s){let o=new n;return s.contains.forEach(l=>o.addRule(l.begin,{rule:l,type:"begin"})),s.terminatorEnd&&o.addRule(s.terminatorEnd,{type:"end"}),s.illegal&&o.addRule(s.illegal,{type:"illegal"}),o}function i(s,o){let l=s;if(s.isCompiled)return l;[EMe,_Me,BMe,LMe].forEach(h=>h(s,o)),t.compilerExtensions.forEach(h=>h(s,o)),s.__beforeBegin=null,[CMe,SMe,AMe].forEach(h=>h(s,o)),s.isCompiled=!0;let u=null;return typeof s.keywords=="object"&&s.keywords.$pattern&&(s.keywords=Object.assign({},s.keywords),u=s.keywords.$pattern,delete s.keywords.$pattern),u=u||/\w+/,s.keywords&&(s.keywords=KX(s.keywords,t.case_insensitive)),l.keywordPatternRe=e(u,!0),o&&(s.begin||(s.begin=/\B|\b/),l.beginRe=e(l.begin),!s.end&&!s.endsWithParent&&(s.end=/\B|\b/),s.end&&(l.endRe=e(l.end)),l.terminatorEnd=bb(l.end)||"",s.endsWithParent&&o.terminatorEnd&&(l.terminatorEnd+=(s.end?"|":"")+o.terminatorEnd)),s.illegal&&(l.illegalRe=e(s.illegal)),s.contains||(s.contains=[]),s.contains=[].concat(...s.contains.map(function(h){return zMe(h==="self"?s:h)})),s.contains.forEach(function(h){i(h,l)}),s.starts&&i(s.starts,o),l.matcher=a(l),l}if(t.compilerExtensions||(t.compilerExtensions=[]),t.contains&&t.contains.includes("self"))throw new Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.");return t.classNameAliases=Af(t.classNameAliases||{}),i(t)}function QX(t){return t?t.endsWithParent||QX(t.starts):!1}function zMe(t){return t.variants&&!t.cachedVariants&&(t.cachedVariants=t.variants.map(function(e){return Af(t,{variants:null},e)})),t.cachedVariants?t.cachedVariants:QX(t)?Af(t,{starts:t.starts?Af(t.starts):null}):Object.isFrozen(t)?Af(t):t}var $Me="11.11.1",ZR=class extends Error{constructor(e,r){super(e),this.name="HTMLInjectionError",this.html=r}},YR=qX,$X=Af,GX=Symbol("nomatch"),GMe=7,JX=function(t){let e=Object.create(null),r=Object.create(null),n=[],a=!0,i="Could not find the language '{}', did you forget to load/include a language module?",s={disableAutodetect:!0,name:"Plain text",contains:[]},o={ignoreUnescapedHTML:!1,throwUnescapedHTML:!1,noHighlightRe:/^(no-?highlight)$/i,languageDetectRe:/\blang(?:uage)?-([\w-]+)\b/i,classPrefix:"hljs-",cssSelector:"pre code",languages:null,__emitter:KR};function l(R){return o.noHighlightRe.test(R)}function u(R){let P=R.className+" ";P+=R.parentNode?R.parentNode.className:"";let B=o.languageDetectRe.exec(P);if(B){let F=S(B[1]);return F||(zX(i.replace("{}",B[1])),zX("Falling back to no-highlight mode for this block.",R)),F?B[1]:"no-highlight"}return P.split(/\s+/).find(F=>l(F)||S(F))}function h(R,P,B){let F="",G="";typeof P=="object"?(F=R,B=P.ignoreIllegals,G=P.language):(_g("10.7.0","highlight(lang, code, ...args) has been deprecated."),_g("10.7.0",`Please use highlight(code, options) instead. -https://github.com/highlightjs/highlight.js/issues/2277`),G=R,F=P),B===void 0&&(B=!0);let z={code:F,language:G};N("before:highlight",z);let H=z.result?z.result:f(z.language,z.code,B);return H.code=z.code,N("after:highlight",H),H}function f(R,P,B,F){let G=Object.create(null);function z(ke,ve){return ke.keywords[ve]}function H(){if(!ee.keywords){me.addText(Ie);return}let ke=0;ee.keywordPatternRe.lastIndex=0;let ve=ee.keywordPatternRe.exec(Ie),_e="";for(;ve;){_e+=Ie.substring(ke,ve.index);let fe=W.case_insensitive?ve[0].toLowerCase():ve[0],ue=z(ee,fe);if(ue){let[$,le]=ue;if(me.addText(_e),_e="",G[fe]=(G[fe]||0)+1,G[fe]<=GMe&&(Ue+=le),$.startsWith("_"))_e+=ve[0];else{let V=W.classNameAliases[$]||$;ie(ve[0],V)}}else _e+=ve[0];ke=ee.keywordPatternRe.lastIndex,ve=ee.keywordPatternRe.exec(Ie)}_e+=Ie.substring(ke),me.addText(_e)}function Q(){if(Ie==="")return;let ke=null;if(typeof ee.subLanguage=="string"){if(!e[ee.subLanguage]){me.addText(Ie);return}ke=f(ee.subLanguage,Ie,!0,$e[ee.subLanguage]),$e[ee.subLanguage]=ke._top}else ke=p(Ie,ee.subLanguage.length?ee.subLanguage:null);ee.relevance>0&&(Ue+=ke.relevance),me.__addSublanguage(ke._emitter,ke.language)}function Y(){ee.subLanguage!=null?Q():H(),Ie=""}function ie(ke,ve){ke!==""&&(me.startScope(ve),me.addText(ke),me.endScope())}function se(ke,ve){let _e=1,fe=ve.length-1;for(;_e<=fe;){if(!ke._emit[_e]){_e++;continue}let ue=W.classNameAliases[ke[_e]]||ke[_e],$=ve[_e];ue?ie($,ue):(Ie=$,H(),Ie=""),_e++}}function oe(ke,ve){return ke.scope&&typeof ke.scope=="string"&&me.openNode(W.classNameAliases[ke.scope]||ke.scope),ke.beginScope&&(ke.beginScope._wrap?(ie(Ie,W.classNameAliases[ke.beginScope._wrap]||ke.beginScope._wrap),Ie=""):ke.beginScope._multi&&(se(ke.beginScope,ve),Ie="")),ee=Object.create(ke,{parent:{value:ee}}),ee}function pe(ke,ve,_e){let fe=aMe(ke.endRe,_e);if(fe){if(ke["on:end"]){let ue=new Dk(ke);ke["on:end"](ve,ue),ue.isMatchIgnored&&(fe=!1)}if(fe){for(;ke.endsParent&&ke.parent;)ke=ke.parent;return ke}}if(ke.endsWithParent)return pe(ke.parent,ve,_e)}function J(ke){return ee.matcher.regexIndex===0?(Ie+=ke[0],1):(Me=!0,0)}function j(ke){let ve=ke[0],_e=ke.rule,fe=new Dk(_e),ue=[_e.__beforeBegin,_e["on:begin"]];for(let $ of ue)if($&&($(ke,fe),fe.isMatchIgnored))return J(ve);return _e.skip?Ie+=ve:(_e.excludeBegin&&(Ie+=ve),Y(),!_e.returnBegin&&!_e.excludeBegin&&(Ie=ve)),oe(_e,ke),_e.returnBegin?0:ve.length}function Z(ke){let ve=ke[0],_e=P.substring(ke.index),fe=pe(ee,ke,_e);if(!fe)return GX;let ue=ee;ee.endScope&&ee.endScope._wrap?(Y(),ie(ve,ee.endScope._wrap)):ee.endScope&&ee.endScope._multi?(Y(),se(ee.endScope,ke)):ue.skip?Ie+=ve:(ue.returnEnd||ue.excludeEnd||(Ie+=ve),Y(),ue.excludeEnd&&(Ie=ve));do ee.scope&&me.closeNode(),!ee.skip&&!ee.subLanguage&&(Ue+=ee.relevance),ee=ee.parent;while(ee!==fe.parent);return fe.starts&&oe(fe.starts,ke),ue.returnEnd?0:ve.length}function K(){let ke=[];for(let ve=ee;ve!==W;ve=ve.parent)ve.scope&&ke.unshift(ve.scope);ke.forEach(ve=>me.openNode(ve))}let X={};function ae(ke,ve){let _e=ve&&ve[0];if(Ie+=ke,_e==null)return Y(),0;if(X.type==="begin"&&ve.type==="end"&&X.index===ve.index&&_e===""){if(Ie+=P.slice(ve.index,ve.index+1),!a){let fe=new Error(`0 width match regex (${R})`);throw fe.languageName=R,fe.badRule=X.rule,fe}return 1}if(X=ve,ve.type==="begin")return j(ve);if(ve.type==="illegal"&&!B){let fe=new Error('Illegal lexeme "'+_e+'" for mode "'+(ee.scope||"")+'"');throw fe.mode=ee,fe}else if(ve.type==="end"){let fe=Z(ve);if(fe!==GX)return fe}if(ve.type==="illegal"&&_e==="")return Ie+=` -`,1;if(Ae>1e5&&Ae>ve.index*3)throw new Error("potential infinite loop, way more iterations than matches");return Ie+=_e,_e.length}let W=S(R);if(!W)throw ap(i.replace("{}",R)),new Error('Unknown language: "'+R+'"');let Se=FMe(W),ne="",ee=F||Se,$e={},me=new o.__emitter(o);K();let Ie="",Ue=0,Fe=0,Ae=0,Me=!1;try{if(W.__emitTokens)W.__emitTokens(P,me);else{for(ee.matcher.considerAll();;){Ae++,Me?Me=!1:ee.matcher.considerAll(),ee.matcher.lastIndex=Fe;let ke=ee.matcher.exec(P);if(!ke)break;let ve=P.substring(Fe,ke.index),_e=ae(ve,ke);Fe=ke.index+_e}ae(P.substring(Fe))}return me.finalize(),ne=me.toHTML(),{language:R,value:ne,relevance:Ue,illegal:!1,_emitter:me,_top:ee}}catch(ke){if(ke.message&&ke.message.includes("Illegal"))return{language:R,value:YR(P),illegal:!0,relevance:0,_illegalBy:{message:ke.message,index:Fe,context:P.slice(Fe-100,Fe+100),mode:ke.mode,resultSoFar:ne},_emitter:me};if(a)return{language:R,value:YR(P),illegal:!1,relevance:0,errorRaised:ke,_emitter:me,_top:ee};throw ke}}function d(R){let P={value:YR(R),illegal:!1,relevance:0,_top:s,_emitter:new o.__emitter(o)};return P._emitter.addText(R),P}function p(R,P){P=P||o.languages||Object.keys(e);let B=d(R),F=P.filter(S).filter(M).map(Y=>f(Y,R,!1));F.unshift(B);let G=F.sort((Y,ie)=>{if(Y.relevance!==ie.relevance)return ie.relevance-Y.relevance;if(Y.language&&ie.language){if(S(Y.language).supersetOf===ie.language)return 1;if(S(ie.language).supersetOf===Y.language)return-1}return 0}),[z,H]=G,Q=z;return Q.secondBest=H,Q}function m(R,P,B){let F=P&&r[P]||B;R.classList.add("hljs"),R.classList.add(`language-${F}`)}function g(R){let P=null,B=u(R);if(l(B))return;if(N("before:highlightElement",{el:R,language:B}),R.dataset.highlighted){console.log("Element previously highlighted. To highlight again, first unset `dataset.highlighted`.",R);return}if(R.children.length>0&&(o.ignoreUnescapedHTML||(console.warn("One of your code blocks includes unescaped HTML. This is a potentially serious security risk."),console.warn("https://github.com/highlightjs/highlight.js/wiki/security"),console.warn("The element with unescaped HTML:"),console.warn(R)),o.throwUnescapedHTML))throw new ZR("One of your code blocks includes unescaped HTML.",R.innerHTML);P=R;let F=P.textContent,G=B?h(F,{language:B,ignoreIllegals:!0}):p(F);R.innerHTML=G.value,R.dataset.highlighted="yes",m(R,B,G.language),R.result={language:G.language,re:G.relevance,relevance:G.relevance},G.secondBest&&(R.secondBest={language:G.secondBest.language,relevance:G.secondBest.relevance}),N("after:highlightElement",{el:R,result:G,text:F})}function v(R){o=$X(o,R)}let y=()=>{C(),_g("10.6.0","initHighlighting() deprecated. Use highlightAll() now.")};function b(){C(),_g("10.6.0","initHighlightingOnLoad() deprecated. Use highlightAll() now.")}let w=!1;function C(){function R(){C()}if(document.readyState==="loading"){w||window.addEventListener("DOMContentLoaded",R,!1),w=!0;return}document.querySelectorAll(o.cssSelector).forEach(g)}function k(R,P){let B=null;try{B=P(t)}catch(F){if(ap("Language definition for '{}' could not be registered.".replace("{}",R)),a)ap(F);else throw F;B=s}B.name||(B.name=R),e[R]=B,B.rawDefinition=P.bind(null,t),B.aliases&&L(B.aliases,{languageName:R})}function E(R){delete e[R];for(let P of Object.keys(r))r[P]===R&&delete r[P]}function _(){return Object.keys(e)}function S(R){return R=(R||"").toLowerCase(),e[R]||e[r[R]]}function L(R,{languageName:P}){typeof R=="string"&&(R=[R]),R.forEach(B=>{r[B.toLowerCase()]=P})}function M(R){let P=S(R);return P&&!P.disableAutodetect}function D(R){R["before:highlightBlock"]&&!R["before:highlightElement"]&&(R["before:highlightElement"]=P=>{R["before:highlightBlock"](Object.assign({block:P.el},P))}),R["after:highlightBlock"]&&!R["after:highlightElement"]&&(R["after:highlightElement"]=P=>{R["after:highlightBlock"](Object.assign({block:P.el},P))})}function T(R){D(R),n.push(R)}function I(R){let P=n.indexOf(R);P!==-1&&n.splice(P,1)}function N(R,P){let B=R;n.forEach(function(F){F[B]&&F[B](P)})}function O(R){return _g("10.7.0","highlightBlock will be removed entirely in v12.0"),_g("10.7.0","Please use highlightElement now."),g(R)}Object.assign(t,{highlight:h,highlightAuto:p,highlightAll:C,highlightElement:g,highlightBlock:O,configure:v,initHighlighting:y,initHighlightingOnLoad:b,registerLanguage:k,unregisterLanguage:E,listLanguages:_,getLanguage:S,registerAliases:L,autoDetection:M,inherit:$X,addPlugin:T,removePlugin:I}),t.debugMode=function(){a=!1},t.safeMode=function(){a=!0},t.versionString=$Me,t.regex={concat:ip,lookahead:VX,either:QR,optional:rMe,anyNumberOfTimes:tMe};for(let R in Ik)typeof Ik[R]=="object"&&UX(Ik[R]);return Object.assign(t,Ik),t},Ag=JX({});Ag.newInstance=()=>JX({});ej.exports=Ag;Ag.HighlightJS=Ag;Ag.default=Ag});var zk=va((uI,cI)=>{(function(t,e){typeof uI=="object"&&typeof cI<"u"?cI.exports=e():typeof define=="function"&&define.amd?define(e):(t=typeof globalThis<"u"?globalThis:t||self).dayjs=e()})(uI,(function(){"use strict";var t=1e3,e=6e4,r=36e5,n="millisecond",a="second",i="minute",s="hour",o="day",l="week",u="month",h="quarter",f="year",d="date",p="Invalid Date",m=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,g=/\[([^\]]+)]|YYYY|YY|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,v={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(T){var I=["th","st","nd","rd"],N=T%100;return"["+T+(I[(N-20)%10]||I[N]||I[0])+"]"}},y=function(T,I,N){var O=String(T);return!O||O.length>=I?T:""+Array(I+1-O.length).join(N)+T},b={s:y,z:function(T){var I=-T.utcOffset(),N=Math.abs(I),O=Math.floor(N/60),R=N%60;return(I<=0?"+":"-")+y(O,2,"0")+":"+y(R,2,"0")},m:function T(I,N){if(I.date()1)return T(B[0])}else{var F=I.name;C[F]=I,R=F}return!O&&R&&(w=R),R||!O&&w},S=function(T,I){if(E(T))return T.clone();var N=typeof I=="object"?I:{};return N.date=T,N.args=arguments,new M(N)},L=b;L.l=_,L.i=E,L.w=function(T,I){return S(T,{locale:I.$L,utc:I.$u,x:I.$x,$offset:I.$offset})};var M=(function(){function T(N){this.$L=_(N.locale,null,!0),this.parse(N),this.$x=this.$x||N.x||{},this[k]=!0}var I=T.prototype;return I.parse=function(N){this.$d=(function(O){var R=O.date,P=O.utc;if(R===null)return new Date(NaN);if(L.u(R))return new Date;if(R instanceof Date)return new Date(R);if(typeof R=="string"&&!/Z$/i.test(R)){var B=R.match(m);if(B){var F=B[2]-1||0,G=(B[7]||"0").substring(0,3);return P?new Date(Date.UTC(B[1],F,B[3]||1,B[4]||0,B[5]||0,B[6]||0,G)):new Date(B[1],F,B[3]||1,B[4]||0,B[5]||0,B[6]||0,G)}}return new Date(R)})(N),this.init()},I.init=function(){var N=this.$d;this.$y=N.getFullYear(),this.$M=N.getMonth(),this.$D=N.getDate(),this.$W=N.getDay(),this.$H=N.getHours(),this.$m=N.getMinutes(),this.$s=N.getSeconds(),this.$ms=N.getMilliseconds()},I.$utils=function(){return L},I.isValid=function(){return this.$d.toString()!==p},I.isSame=function(N,O){var R=S(N);return this.startOf(O)<=R&&R<=this.endOf(O)},I.isAfter=function(N,O){return S(N){$k={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=>{let 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<.16666666666666666?t+(e-t)*6*r:r<.5?e:r<.6666666666666666?t+(e-t)*(.6666666666666666-r)*6:t),hsl2rgb:({h:t,s:e,l:r},n)=>{if(!e)return r*2.55;t/=360,e/=100,r/=100;let a=r<.5?r*(1+e):r+e-r*e,i=2*r-a;switch(n){case"r":return $k.hue2rgb(i,a,t+.3333333333333333)*255;case"g":return $k.hue2rgb(i,a,t)*255;case"b":return $k.hue2rgb(i,a,t-.3333333333333333)*255}},rgb2hsl:({r:t,g:e,b:r},n)=>{t/=255,e/=255,r/=255;let a=Math.max(t,e,r),i=Math.min(t,e,r),s=(a+i)/2;if(n==="l")return s*100;if(a===i)return 0;let o=a-i,l=s>.5?o/(2-a-i):o/(a+i);if(n==="s")return l*100;switch(a){case t:return((e-r)/o+(e{nOe={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},Lj=nOe});var aOe,Ij,Dj=A(()=>{aOe={dec2hex:t=>{let e=Math.round(t).toString(16);return e.length>1?e:`0${e}`}},Ij=aOe});var iOe,Vt,Pu=A(()=>{Aj();Rj();Dj();iOe={channel:_j,lang:Lj,unit:Ij},Vt=iOe});var ch,Ga,Tb=A(()=>{Pu();ch={};for(let t=0;t<=255;t++)ch[t]=Vt.unit.dec2hex(t);Ga={ALL:0,RGB:1,HSL:2}});var hI,Nj,Mj=A(()=>{Tb();hI=class{constructor(){this.type=Ga.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=Ga.ALL}is(e){return this.type===e}},Nj=hI});var fI,Oj,Pj=A(()=>{Pu();Mj();Tb();fI=class{constructor(e,r){this.color=r,this.changed=!1,this.data=e,this.type=new Nj}set(e,r){return this.color=r,this.changed=!1,this.data=e,this.type.type=Ga.ALL,this}_ensureHSL(){let e=this.data,{h:r,s:n,l:a}=e;r===void 0&&(e.h=Vt.channel.rgb2hsl(e,"h")),n===void 0&&(e.s=Vt.channel.rgb2hsl(e,"s")),a===void 0&&(e.l=Vt.channel.rgb2hsl(e,"l"))}_ensureRGB(){let e=this.data,{r,g:n,b:a}=e;r===void 0&&(e.r=Vt.channel.hsl2rgb(e,"r")),n===void 0&&(e.g=Vt.channel.hsl2rgb(e,"g")),a===void 0&&(e.b=Vt.channel.hsl2rgb(e,"b"))}get r(){let e=this.data,r=e.r;return!this.type.is(Ga.HSL)&&r!==void 0?r:(this._ensureHSL(),Vt.channel.hsl2rgb(e,"r"))}get g(){let e=this.data,r=e.g;return!this.type.is(Ga.HSL)&&r!==void 0?r:(this._ensureHSL(),Vt.channel.hsl2rgb(e,"g"))}get b(){let e=this.data,r=e.b;return!this.type.is(Ga.HSL)&&r!==void 0?r:(this._ensureHSL(),Vt.channel.hsl2rgb(e,"b"))}get h(){let e=this.data,r=e.h;return!this.type.is(Ga.RGB)&&r!==void 0?r:(this._ensureRGB(),Vt.channel.rgb2hsl(e,"h"))}get s(){let e=this.data,r=e.s;return!this.type.is(Ga.RGB)&&r!==void 0?r:(this._ensureRGB(),Vt.channel.rgb2hsl(e,"s"))}get l(){let e=this.data,r=e.l;return!this.type.is(Ga.RGB)&&r!==void 0?r:(this._ensureRGB(),Vt.channel.rgb2hsl(e,"l"))}get a(){return this.data.a}set r(e){this.type.set(Ga.RGB),this.changed=!0,this.data.r=e}set g(e){this.type.set(Ga.RGB),this.changed=!0,this.data.g=e}set b(e){this.type.set(Ga.RGB),this.changed=!0,this.data.b=e}set h(e){this.type.set(Ga.HSL),this.changed=!0,this.data.h=e}set s(e){this.type.set(Ga.HSL),this.changed=!0,this.data.s=e}set l(e){this.type.set(Ga.HSL),this.changed=!0,this.data.l=e}set a(e){this.changed=!0,this.data.a=e}},Oj=fI});var sOe,Lf,Eb=A(()=>{Pj();sOe=new Oj({r:0,g:0,b:0,a:0},"transparent"),Lf=sOe});var Bj,sp,dI=A(()=>{Eb();Tb();Bj={re:/^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i,parse:t=>{if(t.charCodeAt(0)!==35)return;let e=t.match(Bj.re);if(!e)return;let r=e[1],n=parseInt(r,16),a=r.length,i=a%4===0,s=a>4,o=s?1:17,l=s?8:4,u=i?0:-1,h=s?255:15;return Lf.set({r:(n>>l*(u+3)&h)*o,g:(n>>l*(u+2)&h)*o,b:(n>>l*(u+1)&h)*o,a:i?(n&h)*o/255:1},t)},stringify:t=>{let{r:e,g:r,b:n,a}=t;return a<1?`#${ch[Math.round(e)]}${ch[Math.round(r)]}${ch[Math.round(n)]}${ch[Math.round(a*255)]}`:`#${ch[Math.round(e)]}${ch[Math.round(r)]}${ch[Math.round(n)]}`}},sp=Bj});var Gk,Cb,Fj=A(()=>{Pu();Eb();Gk={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=>{let e=t.match(Gk.hueRe);if(e){let[,r,n]=e;switch(n){case"grad":return Vt.channel.clamp.h(parseFloat(r)*.9);case"rad":return Vt.channel.clamp.h(parseFloat(r)*180/Math.PI);case"turn":return Vt.channel.clamp.h(parseFloat(r)*360)}}return Vt.channel.clamp.h(parseFloat(t))},parse:t=>{let e=t.charCodeAt(0);if(e!==104&&e!==72)return;let r=t.match(Gk.re);if(!r)return;let[,n,a,i,s,o]=r;return Lf.set({h:Gk._hue2deg(n),s:Vt.channel.clamp.s(parseFloat(a)),l:Vt.channel.clamp.l(parseFloat(i)),a:s?Vt.channel.clamp.a(o?parseFloat(s)/100:parseFloat(s)):1},t)},stringify:t=>{let{h:e,s:r,l:n,a}=t;return a<1?`hsla(${Vt.lang.round(e)}, ${Vt.lang.round(r)}%, ${Vt.lang.round(n)}%, ${a})`:`hsl(${Vt.lang.round(e)}, ${Vt.lang.round(r)}%, ${Vt.lang.round(n)}%)`}},Cb=Gk});var Uk,pI,zj=A(()=>{dI();Uk={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();let e=Uk.colors[t];if(e)return sp.parse(e)},stringify:t=>{let e=sp.stringify(t);for(let r in Uk.colors)if(Uk.colors[r]===e)return r}},pI=Uk});var $j,Sb,Gj=A(()=>{Pu();Eb();$j={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=>{let e=t.charCodeAt(0);if(e!==114&&e!==82)return;let r=t.match($j.re);if(!r)return;let[,n,a,i,s,o,l,u,h]=r;return Lf.set({r:Vt.channel.clamp.r(a?parseFloat(n)*2.55:parseFloat(n)),g:Vt.channel.clamp.g(s?parseFloat(i)*2.55:parseFloat(i)),b:Vt.channel.clamp.b(l?parseFloat(o)*2.55:parseFloat(o)),a:u?Vt.channel.clamp.a(h?parseFloat(u)/100:parseFloat(u)):1},t)},stringify:t=>{let{r:e,g:r,b:n,a}=t;return a<1?`rgba(${Vt.lang.round(e)}, ${Vt.lang.round(r)}, ${Vt.lang.round(n)}, ${Vt.lang.round(a)})`:`rgb(${Vt.lang.round(e)}, ${Vt.lang.round(r)}, ${Vt.lang.round(n)})`}},Sb=$j});var oOe,Ua,hh=A(()=>{dI();Fj();zj();Gj();Tb();oOe={format:{keyword:pI,hex:sp,rgb:Sb,rgba:Sb,hsl:Cb,hsla:Cb},parse:t=>{if(typeof t!="string")return t;let e=sp.parse(t)||Sb.parse(t)||Cb.parse(t)||pI.parse(t);if(e)return e;throw new Error(`Unsupported color format: "${t}"`)},stringify:t=>!t.changed&&t.color?t.color:t.type.is(Ga.HSL)||t.data.r===void 0?Cb.stringify(t):t.a<1||!Number.isInteger(t.r)||!Number.isInteger(t.g)||!Number.isInteger(t.b)?Sb.stringify(t):sp.stringify(t)},Ua=oOe});var lOe,qk,mI=A(()=>{Pu();hh();lOe=(t,e)=>{let r=Ua.parse(t);for(let n in e)r[n]=Vt.channel.clamp[n](e[n]);return Ua.stringify(r)},qk=lOe});var uOe,ms,gI=A(()=>{Pu();Eb();hh();mI();uOe=(t,e,r=0,n=1)=>{if(typeof t!="number")return qk(t,{a:e});let a=Lf.set({r:Vt.channel.clamp.r(t),g:Vt.channel.clamp.g(e),b:Vt.channel.clamp.b(r),a:Vt.channel.clamp.a(n)});return Ua.stringify(a)},ms=uOe});var cOe,op,Uj=A(()=>{Pu();hh();cOe=(t,e)=>Vt.lang.round(Ua.parse(t)[e]),op=cOe});var hOe,qj,Vj=A(()=>{Pu();hh();hOe=t=>{let{r:e,g:r,b:n}=Ua.parse(t),a=.2126*Vt.channel.toLinear(e)+.7152*Vt.channel.toLinear(r)+.0722*Vt.channel.toLinear(n);return Vt.lang.round(a)},qj=hOe});var fOe,Hj,Wj=A(()=>{Vj();fOe=t=>qj(t)>=.5,Hj=fOe});var dOe,Ri,Yj=A(()=>{Wj();dOe=t=>!Hj(t),Ri=dOe});var pOe,Vk,vI=A(()=>{Pu();hh();pOe=(t,e,r)=>{let n=Ua.parse(t),a=n[e],i=Vt.channel.clamp[e](a+r);return a!==i&&(n[e]=i),Ua.stringify(n)},Vk=pOe});var mOe,wt,Xj=A(()=>{vI();mOe=(t,e)=>Vk(t,"l",e),wt=mOe});var gOe,Lt,jj=A(()=>{vI();gOe=(t,e)=>Vk(t,"l",-e),Lt=gOe});var vOe,Oe,Kj=A(()=>{hh();mI();vOe=(t,e)=>{let r=Ua.parse(t),n={};for(let a in e)e[a]&&(n[a]=r[a]+e[a]);return qk(t,n)},Oe=vOe});var yOe,Zj,Qj=A(()=>{hh();gI();yOe=(t,e,r=50)=>{let{r:n,g:a,b:i,a:s}=Ua.parse(t),{r:o,g:l,b:u,a:h}=Ua.parse(e),f=r/100,d=f*2-1,p=s-h,g=((d*p===-1?d:(d+p)/(1+d*p))+1)/2,v=1-g,y=n*g+o*v,b=a*g+l*v,w=i*g+u*v,C=s*f+h*(1-f);return ms(y,b,w,C)},Zj=yOe});var xOe,vt,Jj=A(()=>{hh();Qj();xOe=(t,e=100)=>{let r=Ua.parse(t);return r.r=255-r.r,r.g=255-r.g,r.b=255-r.b,Zj(r,t,e)},vt=xOe});var eK=A(()=>{gI();Uj();Yj();Xj();jj();Kj();Jj()});var Lo=A(()=>{eK()});function tK(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r1?r-1:0),a=1;a2&&arguments[2]!==void 0?arguments[2]:Lb;if(rK&&rK(t,null),!If(e))return t;let n=e.length;for(;n--;){let a=e[n];if(typeof a=="string"){let i=r(a);i!==a&&(COe(e)||(e[n]=i),a=i)}t[a]=!0}return t}function MOe(t){for(let e=0;e0&&arguments[0]!==void 0?arguments[0]:KOe(),e=pt=>yK(pt);if(e.version="3.4.12",e.removed=[],!t||!t.document||t.document.nodeType!==Ro.document||!t.Element)return e.isSupported=!1,e;let r=t.document,n=r,a=n.currentScript;t.DocumentFragment;let i=t.HTMLTemplateElement,s=t.Node,o=t.Element,l=t.NodeFilter,u=t.NamedNodeMap;u===void 0&&(t.NamedNodeMap||t.MozNamedAttrMap),t.HTMLFormElement;let h=t.DOMParser,f=t.trustedTypes,d=o.prototype,p=Bu(d,"cloneNode"),m=Bu(d,"remove"),g=Bu(d,"nextSibling"),v=Bu(d,"childNodes"),y=Bu(d,"parentNode"),b=Bu(d,"shadowRoot"),w=Bu(d,"attributes"),C=s&&s.prototype?Bu(s.prototype,"nodeType"):null,k=s&&s.prototype?Bu(s.prototype,"nodeName"):null;if(typeof i=="function"){let pt=r.createElement("template");pt.content&&pt.content.ownerDocument&&(r=pt.content.ownerDocument)}let E,_="",S,L=!1,M=0,D=function(){if(M>0)throw lp('A configured TRUSTED_TYPES_POLICY callback (createHTML or createScriptURL) must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose callbacks wrap DOMPurify as TRUSTED_TYPES_POLICY; see the "DOMPurify and Trusted Types" section of the README.')},T=function(xe){D(),M++;try{return E.createHTML(xe)}finally{M--}},I=function(xe){D(),M++;try{return E.createScriptURL(xe)}finally{M--}},N=function(){return L||(S=ZOe(f,a),L=!0),S},O=r,R=O.implementation,P=O.createNodeIterator,B=O.createDocumentFragment,F=O.getElementsByTagName,G=n.importNode,z=mK();e.isSupported=typeof gK=="function"&&typeof y=="function"&&R&&R.createHTMLDocument!==void 0;let H=zOe,Q=$Oe,Y=GOe,ie=UOe,se=qOe,oe=VOe,pe=HOe,J=YOe,j=fK,Z=null,K=Or({},[...lK,...bI,...wI,...kI,...uK]),X=null,ae=Or({},[...cK,...TI,...hK,...Hk]),W=Object.seal(Dg(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}})),Se=null,ne=null,ee=Object.seal(Dg(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}})),$e=!0,me=!0,Ie=!1,Ue=!0,Fe=!1,Ae=!0,Me=!1,ke=!1,ve=null,_e=null,fe=!1,ue=!1,$=!1,le=!1,V=!0,he=!1,de="user-content-",Ne=!0,we=!1,ye={},Be=null,Le=Or({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","selectedcontent","style","svg","template","thead","title","video","xmp"]),qe=null,Ke=Or({},["audio","video","img","source","image","track"]),Ye=null,Xe=Or({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Ve="http://www.w3.org/1998/Math/MathML",ot="http://www.w3.org/2000/svg",He="http://www.w3.org/1999/xhtml",nt=He,It=!1,it=null,Tt=Or({},[Ve,ot,He],xI),lt=Ii(["mi","mo","mn","ms","mtext"]),ct=Or({},lt),ft=Ii(["annotation-xml"]),dt=Or({},ft),yt=Or({},["title","style","font","a","script"]),at=null,dn=["application/xhtml+xml","text/html"],Ct="text/html",Ut=null,Qt=null,er=r.createElement("form"),mr=function(xe){return xe instanceof RegExp||xe instanceof Function},xr=function(){let xe=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(Qt&&Qt===xe)return;(!xe||typeof xe!="object")&&(xe={}),xe=gs(xe),at=dn.indexOf(xe.PARSER_MEDIA_TYPE)===-1?Ct:xe.PARSER_MEDIA_TYPE,Ut=at==="application/xhtml+xml"?xI:Lb,Z=Rf(xe,"ALLOWED_TAGS",K,{transform:Ut}),X=Rf(xe,"ALLOWED_ATTR",ae,{transform:Ut}),it=Rf(xe,"ALLOWED_NAMESPACES",Tt,{transform:xI}),Ye=Rf(xe,"ADD_URI_SAFE_ATTR",Xe,{transform:Ut,base:Xe}),qe=Rf(xe,"ADD_DATA_URI_TAGS",Ke,{transform:Ut,base:Ke}),Be=Rf(xe,"FORBID_CONTENTS",Le,{transform:Ut}),Se=Rf(xe,"FORBID_TAGS",gs({}),{transform:Ut}),ne=Rf(xe,"FORBID_ATTR",gs({}),{transform:Ut}),ye=ui(xe,"USE_PROFILES")?xe.USE_PROFILES&&typeof xe.USE_PROFILES=="object"?gs(xe.USE_PROFILES):xe.USE_PROFILES:!1,$e=xe.ALLOW_ARIA_ATTR!==!1,me=xe.ALLOW_DATA_ATTR!==!1,Ie=xe.ALLOW_UNKNOWN_PROTOCOLS||!1,Ue=xe.ALLOW_SELF_CLOSE_IN_ATTR!==!1,Fe=xe.SAFE_FOR_TEMPLATES||!1,Ae=xe.SAFE_FOR_XML!==!1,Me=xe.WHOLE_DOCUMENT||!1,ue=xe.RETURN_DOM||!1,$=xe.RETURN_DOM_FRAGMENT||!1,le=xe.RETURN_TRUSTED_TYPE||!1,fe=xe.FORCE_BODY||!1,V=xe.SANITIZE_DOM!==!1,he=xe.SANITIZE_NAMED_PROPS||!1,Ne=xe.KEEP_CONTENT!==!1,we=xe.IN_PLACE||!1,j=POe(xe.ALLOWED_URI_REGEXP)?xe.ALLOWED_URI_REGEXP:fK,nt=typeof xe.NAMESPACE=="string"?xe.NAMESPACE:He,ct=ui(xe,"MATHML_TEXT_INTEGRATION_POINTS")&&xe.MATHML_TEXT_INTEGRATION_POINTS&&typeof xe.MATHML_TEXT_INTEGRATION_POINTS=="object"?gs(xe.MATHML_TEXT_INTEGRATION_POINTS):Or({},lt),dt=ui(xe,"HTML_INTEGRATION_POINTS")&&xe.HTML_INTEGRATION_POINTS&&typeof xe.HTML_INTEGRATION_POINTS=="object"?gs(xe.HTML_INTEGRATION_POINTS):Or({},ft);let Pe=ui(xe,"CUSTOM_ELEMENT_HANDLING")&&xe.CUSTOM_ELEMENT_HANDLING&&typeof xe.CUSTOM_ELEMENT_HANDLING=="object"?gs(xe.CUSTOM_ELEMENT_HANDLING):Dg(null);if(W=Dg(null),ui(Pe,"tagNameCheck")&&mr(Pe.tagNameCheck)&&(W.tagNameCheck=Pe.tagNameCheck),ui(Pe,"attributeNameCheck")&&mr(Pe.attributeNameCheck)&&(W.attributeNameCheck=Pe.attributeNameCheck),ui(Pe,"allowCustomizedBuiltInElements")&&typeof Pe.allowCustomizedBuiltInElements=="boolean"&&(W.allowCustomizedBuiltInElements=Pe.allowCustomizedBuiltInElements),Di(W),Fe&&(me=!1),$&&(ue=!0),ye&&(Z=Or({},uK),X=Dg(null),ye.html===!0&&(Or(Z,lK),Or(X,cK)),ye.svg===!0&&(Or(Z,bI),Or(X,TI),Or(X,Hk)),ye.svgFilters===!0&&(Or(Z,wI),Or(X,TI),Or(X,Hk)),ye.mathMl===!0&&(Or(Z,kI),Or(X,hK),Or(X,Hk))),ee.tagCheck=null,ee.attributeCheck=null,ui(xe,"ADD_TAGS")&&(typeof xe.ADD_TAGS=="function"?ee.tagCheck=xe.ADD_TAGS:If(xe.ADD_TAGS)&&(Z===K&&(Z=gs(Z)),Or(Z,xe.ADD_TAGS,Ut))),ui(xe,"ADD_ATTR")&&(typeof xe.ADD_ATTR=="function"?ee.attributeCheck=xe.ADD_ATTR:If(xe.ADD_ATTR)&&(X===ae&&(X=gs(X)),Or(X,xe.ADD_ATTR,Ut))),ui(xe,"ADD_URI_SAFE_ATTR")&&If(xe.ADD_URI_SAFE_ATTR)&&Or(Ye,xe.ADD_URI_SAFE_ATTR,Ut),ui(xe,"FORBID_CONTENTS")&&If(xe.FORBID_CONTENTS)&&(Be===Le&&(Be=gs(Be)),Or(Be,xe.FORBID_CONTENTS,Ut)),ui(xe,"ADD_FORBID_CONTENTS")&&If(xe.ADD_FORBID_CONTENTS)&&(Be===Le&&(Be=gs(Be)),Or(Be,xe.ADD_FORBID_CONTENTS,Ut)),Ne&&(Z["#text"]=!0),Me&&Or(Z,["html","head","body"]),Z.table&&(Or(Z,["tbody"]),delete Se.tbody),xe.TRUSTED_TYPES_POLICY){if(typeof xe.TRUSTED_TYPES_POLICY.createHTML!="function")throw lp('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof xe.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw lp('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');let et=E;E=xe.TRUSTED_TYPES_POLICY;try{_=T("")}catch(_t){throw E=et,_t}}else xe.TRUSTED_TYPES_POLICY===null?(E=void 0,_=""):(E===void 0&&(E=N()),E&&typeof _=="string"&&(_=T("")));Ii&&Ii(xe),Qt=xe},Tn=Or({},[...bI,...wI,...BOe]),Hr=Or({},[...kI,...FOe]),_i=function(xe,Pe,et){return Pe.namespaceURI===He?xe==="svg":Pe.namespaceURI===Ve?xe==="svg"&&(et==="annotation-xml"||ct[et]):!!Tn[xe]},ji=function(xe,Pe,et){return Pe.namespaceURI===He?xe==="math":Pe.namespaceURI===ot?xe==="math"&&dt[et]:!!Hr[xe]},Ai=function(xe,Pe,et){return Pe.namespaceURI===ot&&!dt[et]||Pe.namespaceURI===Ve&&!ct[et]?!1:!Hr[xe]&&(yt[xe]||!Tn[xe])},el=function(xe){let Pe=y(xe);(!Pe||!Pe.tagName)&&(Pe={namespaceURI:nt,tagName:"template"});let et=Lb(xe.tagName),_t=Lb(Pe.tagName);return it[xe.namespaceURI]?xe.namespaceURI===ot?_i(et,Pe,_t):xe.namespaceURI===Ve?ji(et,Pe,_t):xe.namespaceURI===He?Ai(et,Pe,_t):!!(at==="application/xhtml+xml"&&it[xe.namespaceURI]):!1},Li=function(xe){Ig(e.removed,{element:xe});try{y(xe).removeChild(xe)}catch{if(m(xe),!y(xe))throw lp("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place")}},Ca=function(xe){Ki(xe);let Pe=v(xe);if(Pe){let _t=[];Rg(Pe,Pt=>{Ig(_t,Pt)}),Rg(_t,Pt=>{try{m(Pt)}catch{}})}let et=w(xe);if(et)for(let _t=et.length-1;_t>=0;--_t){let Pt=et[_t],ar=Pt&&Pt.name;if(typeof ar=="string")try{xe.removeAttribute(ar)}catch{}}},Sa=function(xe,Pe){try{Ig(e.removed,{attribute:Pe.getAttributeNode(xe),from:Pe})}catch{Ig(e.removed,{attribute:null,from:Pe})}if(Pe.removeAttribute(xe),xe==="is")if(ue||$)try{Li(Pe)}catch{}else try{Pe.setAttribute(xe,"")}catch{}},$l=function(xe){let Pe=w(xe);if(Pe)for(let et=Pe.length-1;et>=0;--et){let _t=Pe[et],Pt=_t&&_t.name;if(!(typeof Pt!="string"||X[Ut(Pt)]))try{xe.removeAttribute(Pt)}catch{}}},Ki=function(xe){let Pe=[xe];for(;Pe.length>0;){let et=Pe.pop();(C?C(et):et.nodeType)===Ro.element&&$l(et);let Pt=v(et);if(Pt)for(let ar=Pt.length-1;ar>=0;--ar)Pe.push(Pt[ar])}},Wr=function(xe){if(!Ae)return;let Pe=[xe];for(;Pe.length>0;){let et=Pe.pop(),_t=C?C(et):et.nodeType;if(_t===Ro.processingInstruction||_t===Ro.comment&&li(pK,et.data)){try{m(et)}catch{}continue}if(_t===Ro.element){let ar=et,En=Ut(k?k(et):et.nodeName);try{ar.hasAttribute&&ar.hasAttribute("patchsrc")&&ar.removeAttribute("patchsrc"),ar.hasAttribute&&ar.hasAttribute("for")&&En!=="label"&&En!=="output"&&ar.removeAttribute("for")}catch{}}let Pt=v(et);if(Pt)for(let ar=Pt.length-1;ar>=0;--ar)Pe.push(Pt[ar])}},Je=function(xe){let Pe=null,et=null;if(fe)xe=""+xe;else{let ar=aK(xe,/^[\r\n\t ]+/);et=ar&&ar[0]}at==="application/xhtml+xml"&&nt===He&&(xe=''+xe+"");let _t=E?T(xe):xe;if(nt===He)try{Pe=new h().parseFromString(_t,at)}catch{}if(!Pe||!Pe.documentElement){Pe=R.createDocument(nt,"template",null);try{Pe.documentElement.innerHTML=It?_:_t}catch{}}let Pt=Pe.body||Pe.documentElement;return xe&&et&&Pt.insertBefore(r.createTextNode(et),Pt.childNodes[0]||null),nt===He?F.call(Pe,Me?"html":"body")[0]:Me?Pe.documentElement:Pt},gt=function(xe){return P.call(xe.ownerDocument||xe,xe,l.SHOW_ELEMENT|l.SHOW_COMMENT|l.SHOW_TEXT|l.SHOW_PROCESSING_INSTRUCTION|l.SHOW_CDATA_SECTION,null)},St=function(xe){return xe=_b(xe,H," "),xe=_b(xe,Q," "),xe=_b(xe,Y," "),xe},Qe=function(xe){var Pe;xe.normalize();let et=P.call(xe.ownerDocument||xe,xe,l.SHOW_TEXT|l.SHOW_COMMENT|l.SHOW_CDATA_SECTION|l.SHOW_PROCESSING_INSTRUCTION,null),_t=et.nextNode();for(;_t;)_t.data=St(_t.data),_t=et.nextNode();let Pt=(Pe=xe.querySelectorAll)===null||Pe===void 0?void 0:Pe.call(xe,"template");Pt&&Rg(Pt,ar=>{ge(ar.content)&&Qe(ar.content)})},Mr=function(xe){let Pe=k?k(xe):null;return typeof Pe!="string"||Ut(Pe)!=="form"?!1:typeof xe.nodeName!="string"||typeof xe.textContent!="string"||typeof xe.removeChild!="function"||xe.attributes!==w(xe)||typeof xe.removeAttribute!="function"||typeof xe.setAttribute!="function"||typeof xe.namespaceURI!="string"||typeof xe.insertBefore!="function"||typeof xe.hasChildNodes!="function"||xe.nodeType!==C(xe)||xe.childNodes!==v(xe)},ge=function(xe){if(!C||typeof xe!="object"||xe===null)return!1;try{return C(xe)===Ro.documentFragment}catch{return!1}},Mn=function(xe){if(!C||typeof xe!="object"||xe===null)return!1;try{return typeof C(xe)=="number"}catch{return!1}};function be(pt,xe,Pe){pt.length!==0&&Rg(pt,et=>{et.call(e,xe,Pe,Qt)})}let Zn=function(xe,Pe){return!!(Ae&&xe.hasChildNodes()&&!Mn(xe.firstElementChild)&&li(dK,xe.textContent)&&li(dK,xe.innerHTML)||Ae&&xe.namespaceURI===He&&Pe==="style"&&Mn(xe.firstElementChild)||xe.nodeType===Ro.processingInstruction||Ae&&xe.nodeType===Ro.comment&&li(pK,xe.data))},vg=function(xe,Pe){if(!Se[Pe]&&lk(Pe)&&(W.tagNameCheck instanceof RegExp&&li(W.tagNameCheck,Pe)||W.tagNameCheck instanceof Function&&W.tagNameCheck(Pe)))return!1;if(Ne&&!Be[Pe]){let et=y(xe),_t=v(xe);if(_t&&et){let Pt=_t.length;for(let ar=Pt-1;ar>=0;--ar){let En=we?_t[ar]:p(_t[ar],!0);et.insertBefore(En,g(xe))}}}return Li(xe),!0},fb=function(xe,Pe){if(be(z.beforeSanitizeElements,xe,null),xe!==Pe&&y(xe)===null)return!0;if(Mr(xe))return Li(xe),!0;let et=Ut(k?k(xe):xe.nodeName);if(be(z.uponSanitizeElement,xe,{tagName:et,allowedTags:Z}),xe!==Pe&&y(xe)===null)return!0;if(Zn(xe,et))return Li(xe),!0;if(Se[et]||!(ee.tagCheck instanceof Function&&ee.tagCheck(et))&&!Z[et]){let Pt=vg(xe,et);return Pt===!1&&be(z.afterSanitizeElements,xe,null),Pt}if((C?C(xe):xe.nodeType)===Ro.element&&!el(xe)||(et==="noscript"||et==="noembed"||et==="noframes")&&li(XOe,xe.innerHTML))return Li(xe),!0;if(Fe&&xe.nodeType===Ro.text){let Pt=St(xe.textContent);xe.textContent!==Pt&&(Ig(e.removed,{element:xe.cloneNode()}),xe.textContent=Pt)}return be(z.afterSanitizeElements,xe,null),!1},sk=function(xe,Pe,et){if(ne[Pe]||Ae&&Pe==="patchsrc"||Ae&&Pe==="for"&&xe!=="label"&&xe!=="output"||V&&(Pe==="id"||Pe==="name")&&(et in r||et in er))return!1;let _t=X[Pe]||ee.attributeCheck instanceof Function&&ee.attributeCheck(Pe,xe);if(!(me&&li(ie,Pe))){if(!($e&&li(se,Pe))){if(_t){if(!Ye[Pe]){if(!li(j,_b(et,pe,""))){if(!((Pe==="src"||Pe==="xlink:href"||Pe==="href")&&xe!=="script"&&iK(et,"data:")===0&&qe[xe])){if(!(Ie&&!li(oe,_b(et,pe,"")))){if(et)return!1}}}}}else if(!(lk(xe)&&(W.tagNameCheck instanceof RegExp&&li(W.tagNameCheck,xe)||W.tagNameCheck instanceof Function&&W.tagNameCheck(xe))&&(W.attributeNameCheck instanceof RegExp&&li(W.attributeNameCheck,Pe)||W.attributeNameCheck instanceof Function&&W.attributeNameCheck(Pe,xe))||Pe==="is"&&W.allowCustomizedBuiltInElements&&(W.tagNameCheck instanceof RegExp&&li(W.tagNameCheck,et)||W.tagNameCheck instanceof Function&&W.tagNameCheck(et))))return!1}}return!0},ok=Or({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),lk=function(xe){return!ok[Lb(xe)]&&li(J,xe)},_a=function(xe,Pe,et,_t){if(E&&typeof f=="object"&&typeof f.getAttributeType=="function"&&!et)switch(f.getAttributeType(xe,Pe)){case"TrustedHTML":return T(_t);case"TrustedScriptURL":return I(_t)}return _t},sh=function(xe,Pe,et,_t){try{et?xe.setAttributeNS(et,Pe,_t):xe.setAttribute(Pe,_t),Mr(xe)?Li(xe):nK(e.removed)}catch{Sa(Pe,xe)}},yg=function(xe){be(z.beforeSanitizeAttributes,xe,null);let Pe=xe.attributes;if(!Pe||Mr(xe))return;let et={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:X,forceKeepAttr:void 0},_t=Pe.length,Pt=Ut(xe.nodeName);for(;_t--;){let ar=Pe[_t],En=ar.name,Qn=ar.namespaceURI,Zi=ar.value,zn=Ut(En),Ks=Zi,Aa=En==="value"?Ks:ROe(Ks);if(et.attrName=zn,et.attrValue=Aa,et.keepAttr=!0,et.forceKeepAttr=void 0,be(z.uponSanitizeAttribute,xe,et),Aa=et.attrValue,he&&(zn==="id"||zn==="name")&&iK(Aa,de)!==0&&(Sa(En,xe),Aa=de+Aa),Ae&&li(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,Aa)){Sa(En,xe);continue}if(zn==="attributename"&&aK(Aa,"href")){Sa(En,xe);continue}if(!et.forceKeepAttr){if(!et.keepAttr){Sa(En,xe);continue}if(!Ue&&li(jOe,Aa)){Sa(En,xe);continue}if(Fe&&(Aa=St(Aa)),!sk(Pt,zn,Aa)){Sa(En,xe);continue}Aa=_a(Pt,zn,Qn,Aa),Aa!==Ks&&sh(xe,En,Qn,Aa)}}be(z.afterSanitizeAttributes,xe,null)},Cf=function(xe){let Pe=null,et=gt(xe);for(be(z.beforeSanitizeShadowDOM,xe,null);Pe=et.nextNode();)if(be(z.uponSanitizeShadowNode,Pe,null),fb(Pe,xe),yg(Pe),ge(Pe.content)&&Cf(Pe.content),(C?C(Pe):Pe.nodeType)===Ro.element){let Pt=b(Pe);ge(Pt)&&(db(Pt),Cf(Pt))}be(z.afterSanitizeShadowDOM,xe,null)},db=function(xe){let Pe=[{node:xe,shadow:null}];for(;Pe.length>0;){let et=Pe.pop();if(et.shadow){Cf(et.shadow);continue}let _t=et.node,ar=(C?C(_t):_t.nodeType)===Ro.element,En=v(_t);if(En)for(let Qn=En.length-1;Qn>=0;--Qn)Pe.push({node:En[Qn],shadow:null});if(ar){let Qn=k?k(_t):null;if(typeof Qn=="string"&&Ut(Qn)==="template"){let Zi=_t.content;ge(Zi)&&Pe.push({node:Zi,shadow:null})}}if(ar){let Qn=b(_t);ge(Qn)&&Pe.push({node:null,shadow:Qn},{node:Qn,shadow:null})}}};return e.sanitize=function(pt){let xe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Pe=null,et=null,_t=null,Pt=null;if(It=!pt,It&&(pt=""),typeof pt!="string"&&!Mn(pt)&&(pt=OOe(pt),typeof pt!="string"))throw lp("dirty is not a string, aborting");if(!e.isSupported)return pt;ke?(Z=ve,X=_e):xr(xe),(z.uponSanitizeElement.length>0||z.uponSanitizeAttribute.length>0)&&(Z=gs(Z)),z.uponSanitizeAttribute.length>0&&(X=gs(X)),e.removed=[];let ar=we&&typeof pt!="string"&&Mn(pt);if(ar){Wr(pt);let zn=k?k(pt):pt.nodeName;if(typeof zn=="string"){let Ks=Ut(zn);if(!Z[Ks]||Se[Ks])throw Ca(pt),lp("root node is forbidden and cannot be sanitized in-place")}if(Mr(pt))throw Ca(pt),lp("root node is clobbered and cannot be sanitized in-place");try{db(pt)}catch(Ks){throw Ca(pt),Ks}}else if(Mn(pt))Pe=Je(""),et=Pe.ownerDocument.importNode(pt,!0),et.nodeType===Ro.element&&et.nodeName==="BODY"||et.nodeName==="HTML"?Pe=et:Pe.appendChild(et),db(et);else{if(!ue&&!Fe&&!Me&&pt.indexOf("<")===-1)return E&&le?T(pt):pt;if(Pe=Je(pt),!Pe)return ue?null:le?_:""}Pe&&fe&&Li(Pe.firstChild);let En=ar?pt:Pe,Qn=gt(En);try{for(;_t=Qn.nextNode();)fb(_t,En),yg(_t),ge(_t.content)&&Cf(_t.content)}catch(zn){throw ar&&(Ca(pt),Rg(e.removed,Ks=>{Ks.element&&Ki(Ks.element)})),zn}if(ar)return Rg(e.removed,zn=>{zn.element&&Ki(zn.element)}),Fe&&Qe(pt),pt;if(ue){if(Fe&&Qe(Pe),$)for(Pt=B.call(Pe.ownerDocument);Pe.firstChild;)Pt.appendChild(Pe.firstChild);else Pt=Pe;return(X.shadowroot||X.shadowrootmode)&&(Pt=G.call(n,Pt,!0)),Pt}let Zi=Me?Pe.outerHTML:Pe.innerHTML;return Me&&Z["!doctype"]&&Pe.ownerDocument&&Pe.ownerDocument.doctype&&Pe.ownerDocument.doctype.name&&li(WOe,Pe.ownerDocument.doctype.name)&&(Zi=" -`+Zi),Fe&&(Zi=St(Zi)),E&&le?T(Zi):Zi},e.setConfig=function(){let pt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};xr(pt),ke=!0,ve=Z,_e=X},e.clearConfig=function(){Qt=null,ke=!1,ve=null,_e=null,E=S,_=""},e.isValidAttribute=function(pt,xe,Pe){Qt||xr({});let et=Ut(pt),_t=Ut(xe);return sk(et,_t,Pe)},e.addHook=function(pt,xe){typeof xe=="function"&&ui(z,pt)&&Ig(z[pt],xe)},e.removeHook=function(pt,xe){if(ui(z,pt)){if(xe!==void 0){let Pe=AOe(z[pt],xe);return Pe===-1?void 0:LOe(z[pt],Pe,1)[0]}return nK(z[pt])}},e.removeHooks=function(pt){ui(z,pt)&&(z[pt]=[])},e.removeAllHooks=function(){z=mK()},e}var gK,rK,COe,SOe,_Oe,Ii,Di,Dg,vK,EI,CI,Rg,AOe,nK,Ig,LOe,If,Lb,xI,aK,_b,iK,ROe,IOe,DOe,sK,oK,ui,Ab,li,lp,lK,bI,wI,BOe,kI,FOe,uK,cK,TI,hK,Hk,zOe,$Oe,GOe,UOe,qOe,fK,VOe,HOe,WOe,YOe,dK,pK,XOe,jOe,Ro,KOe,ZOe,mK,Rf,Df,SI=A(()=>{gK=Object.entries,rK=Object.setPrototypeOf,COe=Object.isFrozen,SOe=Object.getPrototypeOf,_Oe=Object.getOwnPropertyDescriptor,Ii=Object.freeze,Di=Object.seal,Dg=Object.create,vK=typeof Reflect<"u"&&Reflect,EI=vK.apply,CI=vK.construct;Ii||(Ii=function(e){return e});Di||(Di=function(e){return e});EI||(EI=function(e,r){for(var n=arguments.length,a=new Array(n>2?n-2:0),i=2;i1?r-1:0),a=1;a"u"?null:La(BigInt.prototype.toString),oK=typeof Symbol>"u"?null:La(Symbol.prototype.toString),ui=La(Object.prototype.hasOwnProperty),Ab=La(Object.prototype.toString),li=La(RegExp.prototype.test),lp=NOe(TypeError);lK=Ii(["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"]),bI=Ii(["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"]),wI=Ii(["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"]),BOe=Ii(["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"]),kI=Ii(["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"]),FOe=Ii(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),uK=Ii(["#text"]),cK=Ii(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","command","commandfor","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns"]),TI=Ii(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dominant-baseline","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-orientation","text-rendering","textlength","type","u1","u2","unicode","values","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"]),hK=Ii(["accent","accentunder","align","bevelled","close","columnalign","columnlines","columnspacing","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lquote","lspace","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),Hk=Ii(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),zOe=Di(/{{[\w\W]*|^[\w\W]*}}/g),$Oe=Di(/<%[\w\W]*|^[\w\W]*%>/g),GOe=Di(/\${[\w\W]*/g),UOe=Di(/^data-[\-\w.\u00B7-\uFFFF]+$/),qOe=Di(/^aria-[\-\w]+$/),fK=Di(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),VOe=Di(/^(?:\w+script|data):/i),HOe=Di(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),WOe=Di(/^html$/i),YOe=Di(/^[a-z][.\w]*(-[.\w]+)+$/i),dK=Di(/<[/\w!]/g),pK=Di(/<[/\w]/g),XOe=Di(/<\/no(script|embed|frames)/i),jOe=Di(/\/>/i),Ro={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,processingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},KOe=function(){return typeof window>"u"?null:window},ZOe=function(e,r){if(typeof e!="object"||typeof e.createPolicy!="function")return null;let n=null,a="data-tt-policy-suffix";r&&r.hasAttribute(a)&&(n=r.getAttribute(a));let i="dompurify"+(n?"#"+n:"");try{return e.createPolicy(i,{createHTML(s){return s},createScriptURL(s){return s}})}catch{return console.warn("TrustedTypes policy "+i+" could not be created."),null}},mK=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},Rf=function(e,r,n,a){return ui(e,r)&&If(e[r])?Or(a.base?gs(a.base):{},e[r],a.transform):n};Df=yK()});var eQ={};lr(eQ,{ParseError:()=>ht,SETTINGS_SCHEMA:()=>aT,__defineFunction:()=>Et,__defineMacro:()=>ce,__defineSymbol:()=>U,__domTree:()=>JZ,__parse:()=>jZ,__renderToDomTree:()=>CT,__renderToHTMLTree:()=>ZZ,__setFontMetrics:()=>iZ,default:()=>$Be,render:()=>wD,renderToString:()=>XZ,version:()=>QZ});function aPe(t){if(typeof t!="string")return t.enum[0];switch(t){case"boolean":return!1;case"string":return"";case"number":return 0;case"object":return{};default:throw new Error("Unexpected schema type; settings must declare an explicit default.")}}function iPe(t){if(t.default!==void 0)return t.default;var e=Array.isArray(t.type)?t.type[0]:t.type;return aPe(e)}function sPe(t,e,r,n){var a=r[e];t[e]=a!==void 0?n.processor?n.processor(a):a:iPe(n)}function dPe(t){for(var e=0;e=a[0]&&t<=a[1])return r.name}return null}function eZ(t){for(var e=0;e=nT[e]&&t<=nT[e+1])return!0;return!1}function EPe(t){return"toText"in t}function APe(t){if(t instanceof xs)return t;throw new Error("Expected symbolNode but got "+String(t)+".")}function LPe(t){if(t instanceof Bf)return t;throw new Error("Expected span but got "+String(t)+".")}function iZ(t,e){$u[t]=e}function uD(t,e,r){if(!$u[e])throw new Error("Font metrics not found for font: "+e+".");var n=t.charCodeAt(0),a=$u[e][n];if(!a&&t[0]in bK&&(n=bK[t[0]].charCodeAt(0),a=$u[e][n]),!a&&r==="text"&&eZ(n)&&(a=$u[e][77]),a)return{depth:a[0],height:a[1],italic:a[2],skew:a[3],width:a[4]}}function IPe(t){var e;if(t>=5?e=0:t>=3?e=1:e=2,!_I[e]){var r=_I[e]={cssEmPerMu:Wk.quad[e]/18};for(var n in Wk)Wk.hasOwnProperty(n)&&(r[n]=Wk[n][e])}return _I[e]}function U(t,e,r,n,a,i){$n[t][a]={font:e,group:r,replace:n},i&&n&&($n[t][n]=$n[t][a])}function Et(t){for(var{type:e,names:r,props:n,handler:a,htmlBuilder:i,mathmlBuilder:s}=t,o={type:e,numArgs:n.numArgs,argTypes:n.argTypes,allowedInArgument:!!n.allowedInArgument,allowedInText:!!n.allowedInText,allowedInMath:n.allowedInMath===void 0?!0:n.allowedInMath,numOptionalArgs:n.numOptionalArgs||0,infix:!!n.infix,primitive:!!n.primitive,handler:a},l=0;l0&&(i.push(Qk(s,e)),s=[]),i.push(n[o]));s.length>0&&i.push(Qk(s,e));var u;r?(u=Qk(Va(r,e,!0),e),u.classes=["tag"],i.push(u)):a&&i.push(a);var h=st(["katex-html"],i);if(h.setAttribute("aria-hidden","true"),u){var f=u.children[0];f.style.height=mt(h.height+h.depth),h.depth&&(f.style.verticalAlign=mt(-h.depth))}return h}function dZ(t){return new Of(t)}function RI(t){if(!t)return!1;if(t.type==="mi"&&t.children.length===1){var e=t.children[0];return e instanceof la&&e.text==="."}else if(t.type==="mo"&&t.children.length===1&&t.getAttribute("separator")==="true"&&t.getAttribute("lspace")==="0em"&&t.getAttribute("rspace")==="0em"){var r=t.children[0];return r instanceof la&&r.text===","}else return!1}function RK(t,e,r,n,a){var i=No(t,r),s;i.length===1&&i[0]instanceof ut&&WPe.has(i[0].type)?s=i[0]:s=new ut("mrow",i);var o=new ut("annotation",[new la(e)]);o.setAttribute("encoding","application/x-tex");var l=new ut("semantics",[s,o]),u=new ut("math",[l]);u.setAttribute("xmlns","http://www.w3.org/1998/Math/MathML"),n&&u.setAttribute("display","block");var h=a?"katex":"katex-mathml";return st([h],[u])}function nBe(t){return t in tBe}function dr(t,e){if(!t||t.type!==e)throw new Error("Expected node of type "+e+", but got "+(t?"node of type "+t.type:String(t)));return t}function yT(t){var e=xT(t);if(!e)throw new Error("Expected node of symbol group type, but got "+(t?"node of type "+t.type:String(t)));return e}function xT(t){return t&&(t.type==="atom"||rBe.hasOwnProperty(t.type))?t:null}function yZ(t,e){var r=Va(t.body,e,!0);return st([t.mclass],r,e)}function xZ(t,e){var r,n=No(t.body,e);return t.mclass==="minner"?r=new ut("mpadded",n):t.mclass==="mord"?t.isCharacterBox?(r=n[0],r.type="mi"):r=new ut("mi",n):(t.isCharacterBox?(r=n[0],r.type="mo"):r=new ut("mo",n),t.mclass==="mbin"?(r.attributes.lspace="0.22em",r.attributes.rspace="0.22em"):t.mclass==="mpunct"?(r.attributes.lspace="0em",r.attributes.rspace="0.17em"):t.mclass==="mopen"||t.mclass==="mclose"?(r.attributes.lspace="0em",r.attributes.rspace="0em"):t.mclass==="minner"&&(r.attributes.lspace="0.0556em",r.attributes.width="+0.1111em")),r}function oBe(t,e,r){var n=iBe[t];switch(n){case"\\\\cdrightarrow":case"\\\\cdleftarrow":return r.callFunction(n,[e[0]],[e[1]]);case"\\uparrow":case"\\downarrow":{var a=r.callFunction("\\\\cdleft",[e[0]],[]),i={type:"atom",text:n,mode:"math",family:"rel"},s=r.callFunction("\\Big",[i],[]),o=r.callFunction("\\\\cdright",[e[1]],[]),l={type:"ordgroup",mode:"math",body:[a,s,o]};return r.callFunction("\\\\cdparent",[l],[])}case"\\\\cdlongequal":return r.callFunction("\\\\cdlongequal",[],[]);case"\\Vert":{var u={type:"textord",text:"\\Vert",mode:"math"};return r.callFunction("\\Big",[u],[])}default:return{type:"textord",text:" ",mode:"math"}}}function lBe(t){var e=[];for(t.gullet.beginGroup(),t.gullet.macros.set("\\cr","\\\\\\relax"),t.gullet.beginGroup();;){e.push(t.parseExpression(!1,"\\\\")),t.gullet.endGroup(),t.gullet.beginGroup();var r=t.fetch().text;if(r==="&"||r==="\\\\")t.consume();else if(r==="\\end"){e[e.length-1].length===0&&e.pop();break}else throw new ht("Expected \\\\ or \\cr or \\end",t.nextToken)}for(var n=[],a=[n],i=0;iAV".includes(u))for(var f=0;f<2;f++){for(var d=!0,p=l+1;pAV=|." after @',s[l]);var m=oBe(u,h,t),g={type:"styling",body:[m],mode:"math",style:"display",resetFont:!0};n.push(g),o=NK()}i%2===0?n.push(o):n.shift(),n=[],a.push(n)}t.gullet.endGroup(),t.gullet.endGroup();var v=new Array(a[0].length).fill({type:"align",align:"c",pregap:.25,postgap:.25});return{type:"array",mode:"math",body:a,arraystretch:1,addJot:!0,rowGaps:[null],cols:v,colSeparationType:"CD",hLinesBeforeRow:new Array(a.length+1).fill([])}}function PK(t){return"isMiddle"in t}function wT(t,e){var r=xT(t);if(r&&xBe.has(r.text))return r;throw r?new ht("Invalid delimiter '"+r.text+"' after '"+e.funcName+"'",t):new ht("Invalid delimiter type '"+t.type+"'",t)}function BK(t){if(!t.body)throw new Error("Bug: The leftright ParseNode wasn't fully parsed.")}function Uu(t){for(var{type:e,names:r,props:n,handler:a,htmlBuilder:i,mathmlBuilder:s}=t,o={type:e,numArgs:n.numArgs||0,allowedInText:!1,numOptionalArgs:0,handler:a},l=0;l1||!h)&&g.pop(),y.length{ht=class t extends Error{constructor(e,r){var n="KaTeX parse error: "+e,a,i,s=r&&r.loc;if(s&&s.start<=s.end){var o=s.lexer.input;a=s.start,i=s.end,a===o.length?n+=" at end of input: ":n+=" at position "+(a+1)+": ";var l=o.slice(a,i).replace(/[^]/g,"$&\u0332"),u;a>15?u="\u2026"+o.slice(a-15,a):u=o.slice(0,a);var h;i+15t.replace(QOe,"-$1").toLowerCase(),ePe={"&":"&",">":">","<":"<",'"':""","'":"'"},tPe=/[&><"']/g,Ji=t=>String(t).replace(tPe,e=>ePe[e]),rT=t=>t.type==="ordgroup"||t.type==="color"?t.body.length===1?rT(t.body[0]):t:t.type==="font"?rT(t.body):t,rPe=new Set(["mathord","textord","atom"]),mh=t=>rPe.has(rT(t).type),nPe=t=>{var e=/^[\x00-\x20]*([^\\/#?]*?)(:|�*58|�*3a|&colon)/i.exec(t);return e?e[2]!==":"||!/^[a-zA-Z][a-zA-Z0-9+\-.]*$/.test(e[1])?null:e[1].toLowerCase():"_relative"},aT={displayMode:{type:"boolean",description:"Render math in display mode, which puts the math in display style (so \\int and \\sum are large, for example), and centers the math on the page on its own line.",cli:"-d, --display-mode"},output:{type:{enum:["htmlAndMathml","html","mathml"]},description:"Determines the markup language of the output.",cli:"-F, --format "},leqno:{type:"boolean",description:"Render display math in leqno style (left-justified tags)."},fleqn:{type:"boolean",description:"Render display math flush left."},throwOnError:{type:"boolean",default:!0,cli:"-t, --no-throw-on-error",cliDescription:"Render errors (in the color given by --error-color) instead of throwing a ParseError exception when encountering an error."},errorColor:{type:"string",default:"#cc0000",cli:"-c, --error-color ",cliDescription:"A color string given in the format 'rgb' or 'rrggbb' (no #). This option determines the color of errors rendered by the -t option.",cliProcessor:t=>"#"+t},macros:{type:"object",cli:"-m, --macro ",cliDescription:"Define custom macro of the form '\\foo:expansion' (use multiple -m arguments for multiple macros).",cliDefault:[],cliProcessor:(t,e)=>(e.push(t),e)},minRuleThickness:{type:"number",description:"Specifies a minimum thickness, in ems, for fraction lines, `\\sqrt` top lines, `{array}` vertical lines, `\\hline`, `\\hdashline`, `\\underline`, `\\overline`, and the borders of `\\fbox`, `\\boxed`, and `\\fcolorbox`.",processor:t=>Math.max(0,t),cli:"--min-rule-thickness ",cliProcessor:parseFloat},colorIsTextColor:{type:"boolean",description:"Makes \\color behave like LaTeX's 2-argument \\textcolor, instead of LaTeX's one-argument \\color mode change.",cli:"-b, --color-is-text-color"},strict:{type:[{enum:["warn","ignore","error"]},"boolean","function"],description:"Turn on strict / LaTeX faithfulness mode, which throws an error if the input uses features that are not supported by LaTeX.",cli:"-S, --strict",cliDefault:!1},trust:{type:["boolean","function"],description:"Trust the input, enabling all HTML features such as \\url.",cli:"-T, --trust"},maxSize:{type:"number",default:1/0,description:"If non-zero, all user-specified sizes, e.g. in \\rule{500em}{500em}, will be capped to maxSize ems. Otherwise, elements and spaces can be arbitrarily large",processor:t=>Math.max(0,t),cli:"-s, --max-size ",cliProcessor:parseInt},maxExpand:{type:"number",default:1e3,description:"Limit the number of macro expansions to the specified number, to prevent e.g. infinite macro loops. If set to Infinity, the macro expander will try to fully expand as in LaTeX.",processor:t=>Math.max(0,t),cli:"-e, --max-expand ",cliProcessor:t=>t==="Infinity"?1/0:parseInt(t)},globalGroup:{type:"boolean",cli:!1}};Mb=class{constructor(e){e===void 0&&(e={}),this.displayMode=void 0,this.output=void 0,this.leqno=void 0,this.fleqn=void 0,this.throwOnError=void 0,this.errorColor=void 0,this.macros=void 0,this.minRuleThickness=void 0,this.colorIsTextColor=void 0,this.strict=void 0,this.trust=void 0,this.maxSize=void 0,this.maxExpand=void 0,this.globalGroup=void 0,e=e||{};for(var r of Object.keys(aT)){var n=aT[r];n&&sPe(this,r,e,n)}}reportNonstrict(e,r,n){var a=this.strict;if(typeof a=="function"&&(a=a(e,r,n)),!(!a||a==="ignore")){if(a===!0||a==="error")throw new ht("LaTeX-incompatible input and strict mode is set to 'error': "+(r+" ["+e+"]"),n);a==="warn"?typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+(r+" ["+e+"]")):typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to "+("unrecognized '"+a+"': "+r+" ["+e+"]"))}}useStrictBehavior(e,r,n){var a=this.strict;if(typeof a=="function")try{a=a(e,r,n)}catch{a="error"}return!a||a==="ignore"?!1:a===!0||a==="error"?!0:a==="warn"?(typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+(r+" ["+e+"]")),!1):(typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to "+("unrecognized '"+a+"': "+r+" ["+e+"]")),!1)}isTrusted(e){if("url"in e&&e.url&&!e.protocol){var r=nPe(e.url);if(r==null)return!1;e.protocol=r}var n=typeof this.trust=="function"?this.trust(e):this.trust;return!!n}},Fu=class{constructor(e,r,n){this.id=void 0,this.size=void 0,this.cramped=void 0,this.id=e,this.size=r,this.cramped=n}sup(){return zu[oPe[this.id]]}sub(){return zu[lPe[this.id]]}fracNum(){return zu[uPe[this.id]]}fracDen(){return zu[cPe[this.id]]}cramp(){return zu[hPe[this.id]]}text(){return zu[fPe[this.id]]}isTight(){return this.size>=2}},oD=0,iT=1,Mg=2,ph=3,Ob=4,rl=5,Og=6,ys=7,zu=[new Fu(oD,0,!1),new Fu(iT,0,!0),new Fu(Mg,1,!1),new Fu(ph,1,!0),new Fu(Ob,2,!1),new Fu(rl,2,!0),new Fu(Og,3,!1),new Fu(ys,3,!0)],oPe=[Ob,rl,Ob,rl,Og,ys,Og,ys],lPe=[rl,rl,rl,rl,ys,ys,ys,ys],uPe=[Mg,ph,Ob,rl,Og,ys,Og,ys],cPe=[ph,ph,rl,rl,ys,ys,ys,ys],hPe=[iT,iT,ph,ph,rl,rl,ys,ys],fPe=[oD,iT,Mg,ph,Mg,ph,Mg,ph],ir={DISPLAY:zu[oD],TEXT:zu[Mg],SCRIPT:zu[Ob],SCRIPTSCRIPT:zu[Og]},GI=[{name:"latin",blocks:[[256,591],[768,879]]},{name:"cyrillic",blocks:[[1024,1279]]},{name:"armenian",blocks:[[1328,1423]]},{name:"brahmic",blocks:[[2304,4255]]},{name:"georgian",blocks:[[4256,4351]]},{name:"cjk",blocks:[[12288,12543],[19968,40879],[65280,65376]]},{name:"hangul",blocks:[[44032,55215]]}];nT=[];GI.forEach(t=>t.blocks.forEach(e=>nT.push(...e)));qa=t=>t+" "+t,Ng=80,pPe=function(e,r){return"M95,"+(622+e+r)+` +var mdeyeReader=(()=>{var wPe=Object.create;var Uw=Object.defineProperty;var kPe=Object.getOwnPropertyDescriptor;var TPe=Object.getOwnPropertyNames;var EPe=Object.getPrototypeOf,SPe=Object.prototype.hasOwnProperty;var CPe=(t,e,r)=>e in t?Uw(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r;var D=(t,e)=>()=>(t&&(e=t(t=0)),e);var Bi=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),Mr=(t,e)=>{for(var r in e)Uw(t,r,{get:e[r],enumerable:!0})},KD=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of TPe(e))!SPe.call(t,i)&&i!==r&&Uw(t,i,{get:()=>e[i],enumerable:!(n=kPe(e,i))||n.enumerable});return t},Wr=(t,e,r)=>(KD(t,e,"default"),r&&KD(r,e,"default")),Na=(t,e,r)=>(r=t!=null?wPe(EPe(t)):{},KD(e||!t||!t.__esModule?Uw(r,"default",{value:t,enumerable:!0}):r,t));var Hw=(t,e,r)=>CPe(t,typeof e!="symbol"?e+"":e,r);var iQ=Bi((mPt,nQ)=>{var tM=!0,tQ=!1,rQ=!1;nQ.exports=function(t,e){e&&(tM=!e.enabled,tQ=!!e.label,rQ=!!e.labelAfter),t.core.ruler.after("inline","github-task-lists",function(r){for(var n=r.tokens,i=2;i=0;n--)if(t[n].level===r)return n;return-1}function wFe(t,e){return _Fe(t[e])&&AFe(t[e-1])&&LFe(t[e-2])&&RFe(t[e])}function kFe(t,e){if(t.children.unshift(TFe(t,e)),t.children[1].content=t.children[1].content.slice(3),t.content=t.content.slice(3),tQ)if(rQ){t.children.pop();var r="task-item-"+Math.ceil(Math.random()*(1e4*1e3)-1e3);t.children[0].content=t.children[0].content.slice(0,-1)+' id="'+r+'">',t.children.push(CFe(t.content,r,e))}else t.children.unshift(EFe(e)),t.children.push(SFe(e))}function TFe(t,e){var r=new e("html_inline","",0),n=tM?' disabled="" ':"";return t.content.indexOf("[ ] ")===0?r.content='':(t.content.indexOf("[x] ")===0||t.content.indexOf("[X] ")===0)&&(r.content=''),r}function EFe(t){var e=new t("html_inline","",0);return e.content="",e}function CFe(t,e,r){var n=new r("html_inline","",0);return n.content='",n.attrs=[{for:e}],n}function _Fe(t){return t.type==="inline"}function AFe(t){return t.type==="paragraph_open"}function LFe(t){return t.type==="list_item_open"}function RFe(t){return t.content.indexOf("[ ] ")===0||t.content.indexOf("[x] ")===0||t.content.indexOf("[X] ")===0}});var EQ=Bi((gPt,TQ)=>{function hQ(t){return t instanceof Map?t.clear=t.delete=t.set=function(){throw new Error("map is read-only")}:t instanceof Set&&(t.add=t.clear=t.delete=function(){throw new Error("set is read-only")}),Object.freeze(t),Object.getOwnPropertyNames(t).forEach(e=>{let r=t[e],n=typeof r;(n==="object"||n==="function")&&!Object.isFrozen(r)&&hQ(r)}),t}var fk=class{constructor(e){e.data===void 0&&(e.data={}),this.data=e.data,this.isMatchIgnored=!1}ignoreMatch(){this.isMatchIgnored=!0}};function fQ(t){return t.replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'")}function Pf(t,...e){let r=Object.create(null);for(let n in t)r[n]=t[n];return e.forEach(function(n){for(let i in n)r[i]=n[i]}),r}var DFe="",aQ=t=>!!t.scope,IFe=(t,{prefix:e})=>{if(t.startsWith("language:"))return t.replace("language:","language-");if(t.includes(".")){let r=t.split(".");return[`${e}${r.shift()}`,...r.map((n,i)=>`${n}${"_".repeat(i+1)}`)].join(" ")}return`${e}${t}`},nM=class{constructor(e,r){this.buffer="",this.classPrefix=r.classPrefix,e.walk(this)}addText(e){this.buffer+=fQ(e)}openNode(e){if(!aQ(e))return;let r=IFe(e.scope,{prefix:this.classPrefix});this.span(r)}closeNode(e){aQ(e)&&(this.buffer+=DFe)}value(){return this.buffer}span(e){this.buffer+=``}},sQ=(t={})=>{let e={children:[]};return Object.assign(e,t),e},iM=class t{constructor(){this.rootNode=sQ(),this.stack=[this.rootNode]}get top(){return this.stack[this.stack.length-1]}get root(){return this.rootNode}add(e){this.top.children.push(e)}openNode(e){let r=sQ({scope:e});this.add(r),this.stack.push(r)}closeNode(){if(this.stack.length>1)return this.stack.pop()}closeAllNodes(){for(;this.closeNode(););}toJSON(){return JSON.stringify(this.rootNode,null,4)}walk(e){return this.constructor._walk(e,this.rootNode)}static _walk(e,r){return typeof r=="string"?e.addText(r):r.children&&(e.openNode(r),r.children.forEach(n=>this._walk(e,n)),e.closeNode(r)),e}static _collapse(e){typeof e!="string"&&e.children&&(e.children.every(r=>typeof r=="string")?e.children=[e.children.join("")]:e.children.forEach(r=>{t._collapse(r)}))}},aM=class extends iM{constructor(e){super(),this.options=e}addText(e){e!==""&&this.add(e)}startScope(e){this.openNode(e)}endScope(){this.closeNode()}__addSublanguage(e,r){let n=e.root;r&&(n.scope=`language:${r}`),this.add(n)}toHTML(){return new nM(this,this.options).value()}finalize(){return this.closeAllNodes(),!0}};function Pb(t){return t?typeof t=="string"?t:t.source:null}function dQ(t){return p1("(?=",t,")")}function MFe(t){return p1("(?:",t,")*")}function NFe(t){return p1("(?:",t,")?")}function p1(...t){return t.map(r=>Pb(r)).join("")}function OFe(t){let e=t[t.length-1];return typeof e=="object"&&e.constructor===Object?(t.splice(t.length-1,1),e):{}}function oM(...t){return"("+(OFe(t).capture?"":"?:")+t.map(n=>Pb(n)).join("|")+")"}function pQ(t){return new RegExp(t.toString()+"|").exec("").length-1}function PFe(t,e){let r=t&&t.exec(e);return r&&r.index===0}var BFe=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;function lM(t,{joinWith:e}){let r=0;return t.map(n=>{r+=1;let i=r,a=Pb(n),s="";for(;a.length>0;){let o=BFe.exec(a);if(!o){s+=a;break}s+=a.substring(0,o.index),a=a.substring(o.index+o[0].length),o[0][0]==="\\"&&o[1]?s+="\\"+String(Number(o[1])+i):(s+=o[0],o[0]==="("&&r++)}return s}).map(n=>`(${n})`).join(e)}var FFe=/\b\B/,mQ="[a-zA-Z]\\w*",uM="[a-zA-Z_]\\w*",gQ="\\b\\d+(\\.\\d+)?",yQ="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",vQ="\\b(0b[01]+)",zFe="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",$Fe=(t={})=>{let e=/^#![ ]*\//;return t.binary&&(t.begin=p1(e,/.*\b/,t.binary,/\b.*/)),Pf({scope:"meta",begin:e,end:/$/,relevance:0,"on:begin":(r,n)=>{r.index!==0&&n.ignoreMatch()}},t)},Bb={begin:"\\\\[\\s\\S]",relevance:0},GFe={scope:"string",begin:"'",end:"'",illegal:"\\n",contains:[Bb]},qFe={scope:"string",begin:'"',end:'"',illegal:"\\n",contains:[Bb]},UFe={begin:/\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/},pk=function(t,e,r={}){let n=Pf({scope:"comment",begin:t,end:e,contains:[]},r);n.contains.push({scope:"doctag",begin:"[ ]*(?=(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):)",end:/(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):/,excludeBegin:!0,relevance:0});let i=oM("I","a","is","so","us","to","at","if","in","it","on",/[A-Za-z]+['](d|ve|re|ll|t|s|n)/,/[A-Za-z]+[-][a-z]+/,/[A-Za-z][a-z]{2,}/);return n.contains.push({begin:p1(/[ ]+/,"(",i,/[.]?[:]?([.][ ]|[ ])/,"){3}")}),n},HFe=pk("//","$"),VFe=pk("/\\*","\\*/"),WFe=pk("#","$"),YFe={scope:"number",begin:gQ,relevance:0},XFe={scope:"number",begin:yQ,relevance:0},jFe={scope:"number",begin:vQ,relevance:0},KFe={scope:"regexp",begin:/\/(?=[^/\n]*\/)/,end:/\/[gimuy]*/,contains:[Bb,{begin:/\[/,end:/\]/,relevance:0,contains:[Bb]}]},ZFe={scope:"title",begin:mQ,relevance:0},QFe={scope:"title",begin:uM,relevance:0},JFe={begin:"\\.\\s*"+uM,relevance:0},eze=function(t){return Object.assign(t,{"on:begin":(e,r)=>{r.data._beginMatch=e[1]},"on:end":(e,r)=>{r.data._beginMatch!==e[1]&&r.ignoreMatch()}})},hk=Object.freeze({__proto__:null,APOS_STRING_MODE:GFe,BACKSLASH_ESCAPE:Bb,BINARY_NUMBER_MODE:jFe,BINARY_NUMBER_RE:vQ,COMMENT:pk,C_BLOCK_COMMENT_MODE:VFe,C_LINE_COMMENT_MODE:HFe,C_NUMBER_MODE:XFe,C_NUMBER_RE:yQ,END_SAME_AS_BEGIN:eze,HASH_COMMENT_MODE:WFe,IDENT_RE:mQ,MATCH_NOTHING_RE:FFe,METHOD_GUARD:JFe,NUMBER_MODE:YFe,NUMBER_RE:gQ,PHRASAL_WORDS_MODE:UFe,QUOTE_STRING_MODE:qFe,REGEXP_MODE:KFe,RE_STARTERS_RE:zFe,SHEBANG:$Fe,TITLE_MODE:ZFe,UNDERSCORE_IDENT_RE:uM,UNDERSCORE_TITLE_MODE:QFe});function tze(t,e){t.input[t.index-1]==="."&&e.ignoreMatch()}function rze(t,e){t.className!==void 0&&(t.scope=t.className,delete t.className)}function nze(t,e){e&&t.beginKeywords&&(t.begin="\\b("+t.beginKeywords.split(" ").join("|")+")(?!\\.)(?=\\b|\\s)",t.__beforeBegin=tze,t.keywords=t.keywords||t.beginKeywords,delete t.beginKeywords,t.relevance===void 0&&(t.relevance=0))}function ize(t,e){Array.isArray(t.illegal)&&(t.illegal=oM(...t.illegal))}function aze(t,e){if(t.match){if(t.begin||t.end)throw new Error("begin & end are not supported with match");t.begin=t.match,delete t.match}}function sze(t,e){t.relevance===void 0&&(t.relevance=1)}var oze=(t,e)=>{if(!t.beforeMatch)return;if(t.starts)throw new Error("beforeMatch cannot be used with starts");let r=Object.assign({},t);Object.keys(t).forEach(n=>{delete t[n]}),t.keywords=r.keywords,t.begin=p1(r.beforeMatch,dQ(r.begin)),t.starts={relevance:0,contains:[Object.assign(r,{endsParent:!0})]},t.relevance=0,delete r.beforeMatch},lze=["of","and","for","in","not","or","if","then","parent","list","value"],uze="keyword";function xQ(t,e,r=uze){let n=Object.create(null);return typeof t=="string"?i(r,t.split(" ")):Array.isArray(t)?i(r,t):Object.keys(t).forEach(function(a){Object.assign(n,xQ(t[a],e,a))}),n;function i(a,s){e&&(s=s.map(o=>o.toLowerCase())),s.forEach(function(o){let l=o.split("|");n[l[0]]=[a,cze(l[0],l[1])]})}}function cze(t,e){return e?Number(e):hze(t)?0:1}function hze(t){return lze.includes(t.toLowerCase())}var oQ={},d1=t=>{console.error(t)},lQ=(t,...e)=>{console.log(`WARN: ${t}`,...e)},zg=(t,e)=>{oQ[`${t}/${e}`]||(console.log(`Deprecated as of ${t}. ${e}`),oQ[`${t}/${e}`]=!0)},dk=new Error;function bQ(t,e,{key:r}){let n=0,i=t[r],a={},s={};for(let o=1;o<=e.length;o++)s[o+n]=i[o],a[o+n]=!0,n+=pQ(e[o-1]);t[r]=s,t[r]._emit=a,t[r]._multi=!0}function fze(t){if(Array.isArray(t.begin)){if(t.skip||t.excludeBegin||t.returnBegin)throw d1("skip, excludeBegin, returnBegin not compatible with beginScope: {}"),dk;if(typeof t.beginScope!="object"||t.beginScope===null)throw d1("beginScope must be object"),dk;bQ(t,t.begin,{key:"beginScope"}),t.begin=lM(t.begin,{joinWith:""})}}function dze(t){if(Array.isArray(t.end)){if(t.skip||t.excludeEnd||t.returnEnd)throw d1("skip, excludeEnd, returnEnd not compatible with endScope: {}"),dk;if(typeof t.endScope!="object"||t.endScope===null)throw d1("endScope must be object"),dk;bQ(t,t.end,{key:"endScope"}),t.end=lM(t.end,{joinWith:""})}}function pze(t){t.scope&&typeof t.scope=="object"&&t.scope!==null&&(t.beginScope=t.scope,delete t.scope)}function mze(t){pze(t),typeof t.beginScope=="string"&&(t.beginScope={_wrap:t.beginScope}),typeof t.endScope=="string"&&(t.endScope={_wrap:t.endScope}),fze(t),dze(t)}function gze(t){function e(s,o){return new RegExp(Pb(s),"m"+(t.case_insensitive?"i":"")+(t.unicodeRegex?"u":"")+(o?"g":""))}class r{constructor(){this.matchIndexes={},this.regexes=[],this.matchAt=1,this.position=0}addRule(o,l){l.position=this.position++,this.matchIndexes[this.matchAt]=l,this.regexes.push([l,o]),this.matchAt+=pQ(o)+1}compile(){this.regexes.length===0&&(this.exec=()=>null);let o=this.regexes.map(l=>l[1]);this.matcherRe=e(lM(o,{joinWith:"|"}),!0),this.lastIndex=0}exec(o){this.matcherRe.lastIndex=this.lastIndex;let l=this.matcherRe.exec(o);if(!l)return null;let u=l.findIndex((f,d)=>d>0&&f!==void 0),h=this.matchIndexes[u];return l.splice(0,u),Object.assign(l,h)}}class n{constructor(){this.rules=[],this.multiRegexes=[],this.count=0,this.lastIndex=0,this.regexIndex=0}getMatcher(o){if(this.multiRegexes[o])return this.multiRegexes[o];let l=new r;return this.rules.slice(o).forEach(([u,h])=>l.addRule(u,h)),l.compile(),this.multiRegexes[o]=l,l}resumingScanAtSamePosition(){return this.regexIndex!==0}considerAll(){this.regexIndex=0}addRule(o,l){this.rules.push([o,l]),l.type==="begin"&&this.count++}exec(o){let l=this.getMatcher(this.regexIndex);l.lastIndex=this.lastIndex;let u=l.exec(o);if(this.resumingScanAtSamePosition()&&!(u&&u.index===this.lastIndex)){let h=this.getMatcher(0);h.lastIndex=this.lastIndex+1,u=h.exec(o)}return u&&(this.regexIndex+=u.position+1,this.regexIndex===this.count&&this.considerAll()),u}}function i(s){let o=new n;return s.contains.forEach(l=>o.addRule(l.begin,{rule:l,type:"begin"})),s.terminatorEnd&&o.addRule(s.terminatorEnd,{type:"end"}),s.illegal&&o.addRule(s.illegal,{type:"illegal"}),o}function a(s,o){let l=s;if(s.isCompiled)return l;[rze,aze,mze,oze].forEach(h=>h(s,o)),t.compilerExtensions.forEach(h=>h(s,o)),s.__beforeBegin=null,[nze,ize,sze].forEach(h=>h(s,o)),s.isCompiled=!0;let u=null;return typeof s.keywords=="object"&&s.keywords.$pattern&&(s.keywords=Object.assign({},s.keywords),u=s.keywords.$pattern,delete s.keywords.$pattern),u=u||/\w+/,s.keywords&&(s.keywords=xQ(s.keywords,t.case_insensitive)),l.keywordPatternRe=e(u,!0),o&&(s.begin||(s.begin=/\B|\b/),l.beginRe=e(l.begin),!s.end&&!s.endsWithParent&&(s.end=/\B|\b/),s.end&&(l.endRe=e(l.end)),l.terminatorEnd=Pb(l.end)||"",s.endsWithParent&&o.terminatorEnd&&(l.terminatorEnd+=(s.end?"|":"")+o.terminatorEnd)),s.illegal&&(l.illegalRe=e(s.illegal)),s.contains||(s.contains=[]),s.contains=[].concat(...s.contains.map(function(h){return yze(h==="self"?s:h)})),s.contains.forEach(function(h){a(h,l)}),s.starts&&a(s.starts,o),l.matcher=i(l),l}if(t.compilerExtensions||(t.compilerExtensions=[]),t.contains&&t.contains.includes("self"))throw new Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.");return t.classNameAliases=Pf(t.classNameAliases||{}),a(t)}function wQ(t){return t?t.endsWithParent||wQ(t.starts):!1}function yze(t){return t.variants&&!t.cachedVariants&&(t.cachedVariants=t.variants.map(function(e){return Pf(t,{variants:null},e)})),t.cachedVariants?t.cachedVariants:wQ(t)?Pf(t,{starts:t.starts?Pf(t.starts):null}):Object.isFrozen(t)?Pf(t):t}var vze="11.11.1",sM=class extends Error{constructor(e,r){super(e),this.name="HTMLInjectionError",this.html=r}},rM=fQ,uQ=Pf,cQ=Symbol("nomatch"),xze=7,kQ=function(t){let e=Object.create(null),r=Object.create(null),n=[],i=!0,a="Could not find the language '{}', did you forget to load/include a language module?",s={disableAutodetect:!0,name:"Plain text",contains:[]},o={ignoreUnescapedHTML:!1,throwUnescapedHTML:!1,noHighlightRe:/^(no-?highlight)$/i,languageDetectRe:/\blang(?:uage)?-([\w-]+)\b/i,classPrefix:"hljs-",cssSelector:"pre code",languages:null,__emitter:aM};function l(M){return o.noHighlightRe.test(M)}function u(M){let $=M.className+" ";$+=M.parentNode?M.parentNode.className:"";let z=o.languageDetectRe.exec($);if(z){let q=A(z[1]);return q||(lQ(a.replace("{}",z[1])),lQ("Falling back to no-highlight mode for this block.",M)),q?z[1]:"no-highlight"}return $.split(/\s+/).find(q=>l(q)||A(q))}function h(M,$,z){let q="",V="";typeof $=="object"?(q=M,z=$.ignoreIllegals,V=$.language):(zg("10.7.0","highlight(lang, code, ...args) has been deprecated."),zg("10.7.0",`Please use highlight(code, options) instead. +https://github.com/highlightjs/highlight.js/issues/2277`),V=M,q=$),z===void 0&&(z=!0);let U={code:q,language:V};B("before:highlight",U);let J=U.result?U.result:f(U.language,U.code,z);return J.code=U.code,B("after:highlight",J),J}function f(M,$,z,q){let V=Object.create(null);function U(Pe,Re){return Pe.keywords[Re]}function J(){if(!ce.keywords){Ae.addText(Ye);return}let Pe=0;ce.keywordPatternRe.lastIndex=0;let Re=ce.keywordPatternRe.exec(Ye),Ve="";for(;Re;){Ve+=Ye.substring(Pe,Re.index);let ke=te.case_insensitive?Re[0].toLowerCase():Re[0],xe=U(ce,ke);if(xe){let[H,ve]=xe;if(Ae.addText(Ve),Ve="",V[ke]=(V[ke]||0)+1,V[ke]<=xze&&(Ge+=ve),H.startsWith("_"))Ve+=Re[0];else{let K=te.classNameAliases[H]||H;me(Re[0],K)}}else Ve+=Re[0];Pe=ce.keywordPatternRe.lastIndex,Re=ce.keywordPatternRe.exec(Ye)}Ve+=Ye.substring(Pe),Ae.addText(Ve)}function se(){if(Ye==="")return;let Pe=null;if(typeof ce.subLanguage=="string"){if(!e[ce.subLanguage]){Ae.addText(Ye);return}Pe=f(ce.subLanguage,Ye,!0,st[ce.subLanguage]),st[ce.subLanguage]=Pe._top}else Pe=p(Ye,ce.subLanguage.length?ce.subLanguage:null);ce.relevance>0&&(Ge+=Pe.relevance),Ae.__addSublanguage(Pe._emitter,Pe.language)}function re(){ce.subLanguage!=null?se():J(),Ye=""}function me(Pe,Re){Pe!==""&&(Ae.startScope(Re),Ae.addText(Pe),Ae.endScope())}function ge(Pe,Re){let Ve=1,ke=Re.length-1;for(;Ve<=ke;){if(!Pe._emit[Ve]){Ve++;continue}let xe=te.classNameAliases[Pe[Ve]]||Pe[Ve],H=Re[Ve];xe?me(H,xe):(Ye=H,J(),Ye=""),Ve++}}function ye(Pe,Re){return Pe.scope&&typeof Pe.scope=="string"&&Ae.openNode(te.classNameAliases[Pe.scope]||Pe.scope),Pe.beginScope&&(Pe.beginScope._wrap?(me(Ye,te.classNameAliases[Pe.beginScope._wrap]||Pe.beginScope._wrap),Ye=""):Pe.beginScope._multi&&(ge(Pe.beginScope,Re),Ye="")),ce=Object.create(Pe,{parent:{value:ce}}),ce}function _e(Pe,Re,Ve){let ke=PFe(Pe.endRe,Ve);if(ke){if(Pe["on:end"]){let xe=new fk(Pe);Pe["on:end"](Re,xe),xe.isMatchIgnored&&(ke=!1)}if(ke){for(;Pe.endsParent&&Pe.parent;)Pe=Pe.parent;return Pe}}if(Pe.endsWithParent)return _e(Pe.parent,Re,Ve)}function ue(Pe){return ce.matcher.regexIndex===0?(Ye+=Pe[0],1):(Ze=!0,0)}function ie(Pe){let Re=Pe[0],Ve=Pe.rule,ke=new fk(Ve),xe=[Ve.__beforeBegin,Ve["on:begin"]];for(let H of xe)if(H&&(H(Pe,ke),ke.isMatchIgnored))return ue(Re);return Ve.skip?Ye+=Re:(Ve.excludeBegin&&(Ye+=Re),re(),!Ve.returnBegin&&!Ve.excludeBegin&&(Ye=Re)),ye(Ve,Pe),Ve.returnBegin?0:Re.length}function le(Pe){let Re=Pe[0],Ve=$.substring(Pe.index),ke=_e(ce,Pe,Ve);if(!ke)return cQ;let xe=ce;ce.endScope&&ce.endScope._wrap?(re(),me(Re,ce.endScope._wrap)):ce.endScope&&ce.endScope._multi?(re(),ge(ce.endScope,Pe)):xe.skip?Ye+=Re:(xe.returnEnd||xe.excludeEnd||(Ye+=Re),re(),xe.excludeEnd&&(Ye=Re));do ce.scope&&Ae.closeNode(),!ce.skip&&!ce.subLanguage&&(Ge+=ce.relevance),ce=ce.parent;while(ce!==ke.parent);return ke.starts&&ye(ke.starts,Pe),xe.returnEnd?0:Re.length}function oe(){let Pe=[];for(let Re=ce;Re!==te;Re=Re.parent)Re.scope&&Pe.unshift(Re.scope);Pe.forEach(Re=>Ae.openNode(Re))}let ne={};function pe(Pe,Re){let Ve=Re&&Re[0];if(Ye+=Pe,Ve==null)return re(),0;if(ne.type==="begin"&&Re.type==="end"&&ne.index===Re.index&&Ve===""){if(Ye+=$.slice(Re.index,Re.index+1),!i){let ke=new Error(`0 width match regex (${M})`);throw ke.languageName=M,ke.badRule=ne.rule,ke}return 1}if(ne=Re,Re.type==="begin")return ie(Re);if(Re.type==="illegal"&&!z){let ke=new Error('Illegal lexeme "'+Ve+'" for mode "'+(ce.scope||"")+'"');throw ke.mode=ce,ke}else if(Re.type==="end"){let ke=le(Re);if(ke!==cQ)return ke}if(Re.type==="illegal"&&Ve==="")return Ye+=` +`,1;if(Xe>1e5&&Xe>Re.index*3)throw new Error("potential infinite loop, way more iterations than matches");return Ye+=Ve,Ve.length}let te=A(M);if(!te)throw d1(a.replace("{}",M)),new Error('Unknown language: "'+M+'"');let He=gze(te),de="",ce=q||He,st={},Ae=new o.__emitter(o);oe();let Ye="",Ge=0,rt=0,Xe=0,Ze=!1;try{if(te.__emitTokens)te.__emitTokens($,Ae);else{for(ce.matcher.considerAll();;){Xe++,Ze?Ze=!1:ce.matcher.considerAll(),ce.matcher.lastIndex=rt;let Pe=ce.matcher.exec($);if(!Pe)break;let Re=$.substring(rt,Pe.index),Ve=pe(Re,Pe);rt=Pe.index+Ve}pe($.substring(rt))}return Ae.finalize(),de=Ae.toHTML(),{language:M,value:de,relevance:Ge,illegal:!1,_emitter:Ae,_top:ce}}catch(Pe){if(Pe.message&&Pe.message.includes("Illegal"))return{language:M,value:rM($),illegal:!0,relevance:0,_illegalBy:{message:Pe.message,index:rt,context:$.slice(rt-100,rt+100),mode:Pe.mode,resultSoFar:de},_emitter:Ae};if(i)return{language:M,value:rM($),illegal:!1,relevance:0,errorRaised:Pe,_emitter:Ae,_top:ce};throw Pe}}function d(M){let $={value:rM(M),illegal:!1,relevance:0,_top:s,_emitter:new o.__emitter(o)};return $._emitter.addText(M),$}function p(M,$){$=$||o.languages||Object.keys(e);let z=d(M),q=$.filter(A).filter(P).map(re=>f(re,M,!1));q.unshift(z);let V=q.sort((re,me)=>{if(re.relevance!==me.relevance)return me.relevance-re.relevance;if(re.language&&me.language){if(A(re.language).supersetOf===me.language)return 1;if(A(me.language).supersetOf===re.language)return-1}return 0}),[U,J]=V,se=U;return se.secondBest=J,se}function m(M,$,z){let q=$&&r[$]||z;M.classList.add("hljs"),M.classList.add(`language-${q}`)}function g(M){let $=null,z=u(M);if(l(z))return;if(B("before:highlightElement",{el:M,language:z}),M.dataset.highlighted){console.log("Element previously highlighted. To highlight again, first unset `dataset.highlighted`.",M);return}if(M.children.length>0&&(o.ignoreUnescapedHTML||(console.warn("One of your code blocks includes unescaped HTML. This is a potentially serious security risk."),console.warn("https://github.com/highlightjs/highlight.js/wiki/security"),console.warn("The element with unescaped HTML:"),console.warn(M)),o.throwUnescapedHTML))throw new sM("One of your code blocks includes unescaped HTML.",M.innerHTML);$=M;let q=$.textContent,V=z?h(q,{language:z,ignoreIllegals:!0}):p(q);M.innerHTML=V.value,M.dataset.highlighted="yes",m(M,z,V.language),M.result={language:V.language,re:V.relevance,relevance:V.relevance},V.secondBest&&(M.secondBest={language:V.secondBest.language,relevance:V.secondBest.relevance}),B("after:highlightElement",{el:M,result:V,text:q})}function y(M){o=uQ(o,M)}let v=()=>{_(),zg("10.6.0","initHighlighting() deprecated. Use highlightAll() now.")};function x(){_(),zg("10.6.0","initHighlightingOnLoad() deprecated. Use highlightAll() now.")}let k=!1;function _(){function M(){_()}if(document.readyState==="loading"){k||window.addEventListener("DOMContentLoaded",M,!1),k=!0;return}document.querySelectorAll(o.cssSelector).forEach(g)}function T(M,$){let z=null;try{z=$(t)}catch(q){if(d1("Language definition for '{}' could not be registered.".replace("{}",M)),i)d1(q);else throw q;z=s}z.name||(z.name=M),e[M]=z,z.rawDefinition=$.bind(null,t),z.aliases&&I(z.aliases,{languageName:M})}function S(M){delete e[M];for(let $ of Object.keys(r))r[$]===M&&delete r[$]}function R(){return Object.keys(e)}function A(M){return M=(M||"").toLowerCase(),e[M]||e[r[M]]}function I(M,{languageName:$}){typeof M=="string"&&(M=[M]),M.forEach(z=>{r[z.toLowerCase()]=$})}function P(M){let $=A(M);return $&&!$.disableAutodetect}function O(M){M["before:highlightBlock"]&&!M["before:highlightElement"]&&(M["before:highlightElement"]=$=>{M["before:highlightBlock"](Object.assign({block:$.el},$))}),M["after:highlightBlock"]&&!M["after:highlightElement"]&&(M["after:highlightElement"]=$=>{M["after:highlightBlock"](Object.assign({block:$.el},$))})}function C(M){O(M),n.push(M)}function N(M){let $=n.indexOf(M);$!==-1&&n.splice($,1)}function B(M,$){let z=M;n.forEach(function(q){q[z]&&q[z]($)})}function F(M){return zg("10.7.0","highlightBlock will be removed entirely in v12.0"),zg("10.7.0","Please use highlightElement now."),g(M)}Object.assign(t,{highlight:h,highlightAuto:p,highlightAll:_,highlightElement:g,highlightBlock:F,configure:y,initHighlighting:v,initHighlightingOnLoad:x,registerLanguage:T,unregisterLanguage:S,listLanguages:R,getLanguage:A,registerAliases:I,autoDetection:P,inherit:uQ,addPlugin:C,removePlugin:N}),t.debugMode=function(){i=!1},t.safeMode=function(){i=!0},t.versionString=vze,t.regex={concat:p1,lookahead:dQ,either:oM,optional:NFe,anyNumberOfTimes:MFe};for(let M in hk)typeof hk[M]=="object"&&hQ(hk[M]);return Object.assign(t,hk),t},$g=kQ({});$g.newInstance=()=>kQ({});TQ.exports=$g;$g.HighlightJS=$g;$g.default=$g});var oee={};Mr(oee,{ParseError:()=>Ft,SETTINGS_SCHEMA:()=>_k,__defineFunction:()=>jt,__defineMacro:()=>Se,__defineSymbol:()=>X,__domTree:()=>see,__parse:()=>ree,__renderToDomTree:()=>Xk,__renderToHTMLTree:()=>iee,__setFontMetrics:()=>fJ,default:()=>aN,render:()=>iN,renderToString:()=>tee,version:()=>aee});function Cze(t){if(typeof t!="string")return t.enum[0];switch(t){case"boolean":return!1;case"string":return"";case"number":return 0;case"object":return{};default:throw new Error("Unexpected schema type; settings must declare an explicit default.")}}function _ze(t){if(t.default!==void 0)return t.default;var e=Array.isArray(t.type)?t.type[0]:t.type;return Cze(e)}function Aze(t,e,r,n){var i=r[e];t[e]=i!==void 0?n.processor?n.processor(i):i:_ze(n)}function Oze(t){for(var e=0;e=i[0]&&t<=i[1])return r.name}return null}function oJ(t){for(var e=0;e=Ck[e]&&t<=Ck[e+1])return!0;return!1}function Wze(t){return"toText"in t}function Kze(t){if(t instanceof oo)return t;throw new Error("Expected symbolNode but got "+String(t)+".")}function Zze(t){if(t instanceof Gf)return t;throw new Error("Expected span but got "+String(t)+".")}function fJ(t,e){Gc[t]=e}function WM(t,e,r){if(!Gc[e])throw new Error("Font metrics not found for font: "+e+".");var n=t.charCodeAt(0),i=Gc[e][n];if(!i&&t[0]in _Q&&(n=_Q[t[0]].charCodeAt(0),i=Gc[e][n]),!i&&r==="text"&&oJ(n)&&(i=Gc[e][77]),i)return{depth:i[0],height:i[1],italic:i[2],skew:i[3],width:i[4]}}function Jze(t){var e;if(t>=5?e=0:t>=3?e=1:e=2,!cM[e]){var r=cM[e]={cssEmPerMu:mk.quad[e]/18};for(var n in mk)mk.hasOwnProperty(n)&&(r[n]=mk[n][e])}return cM[e]}function X(t,e,r,n,i,a){Ei[t][i]={font:e,group:r,replace:n},a&&n&&(Ei[t][n]=Ei[t][i])}function jt(t){for(var{type:e,names:r,props:n,handler:i,htmlBuilder:a,mathmlBuilder:s}=t,o={type:e,numArgs:n.numArgs,argTypes:n.argTypes,allowedInArgument:!!n.allowedInArgument,allowedInText:!!n.allowedInText,allowedInMath:n.allowedInMath===void 0?!0:n.allowedInMath,numOptionalArgs:n.numOptionalArgs||0,infix:!!n.infix,primitive:!!n.primitive,handler:i},l=0;l0&&(a.push(wk(s,e)),s=[]),a.push(n[o]));s.length>0&&a.push(wk(s,e));var u;r?(u=wk(Pa(r,e,!0),e),u.classes=["tag"],a.push(u)):i&&a.push(i);var h=Mt(["katex-html"],a);if(h.setAttribute("aria-hidden","true"),u){var f=u.children[0];f.style.height=Gt(h.height+h.depth),h.depth&&(f.style.verticalAlign=Gt(-h.depth))}return h}function bJ(t){return new zf(t)}function dM(t){if(!t)return!1;if(t.type==="mi"&&t.children.length===1){var e=t.children[0];return e instanceof Yi&&e.text==="."}else if(t.type==="mo"&&t.children.length===1&&t.getAttribute("separator")==="true"&&t.getAttribute("lspace")==="0em"&&t.getAttribute("rspace")==="0em"){var r=t.children[0];return r instanceof Yi&&r.text===","}else return!1}function BQ(t,e,r,n,i){var a=Sl(t,r),s;a.length===1&&a[0]instanceof Pt&&p$e.has(a[0].type)?s=a[0]:s=new Pt("mrow",a);var o=new Pt("annotation",[new Yi(e)]);o.setAttribute("encoding","application/x-tex");var l=new Pt("semantics",[s,o]),u=new Pt("math",[l]);u.setAttribute("xmlns","http://www.w3.org/1998/Math/MathML"),n&&u.setAttribute("display","block");var h=i?"katex":"katex-mathml";return Mt([h],[u])}function S$e(t){return t in T$e}function $r(t,e){if(!t||t.type!==e)throw new Error("Expected node of type "+e+", but got "+(t?"node of type "+t.type:String(t)));return t}function Gk(t){var e=qk(t);if(!e)throw new Error("Expected node of symbol group type, but got "+(t?"node of type "+t.type:String(t)));return e}function qk(t){return t&&(t.type==="atom"||E$e.hasOwnProperty(t.type))?t:null}function SJ(t,e){var r=Pa(t.body,e,!0);return Mt([t.mclass],r,e)}function CJ(t,e){var r,n=Sl(t.body,e);return t.mclass==="minner"?r=new Pt("mpadded",n):t.mclass==="mord"?t.isCharacterBox?(r=n[0],r.type="mi"):r=new Pt("mi",n):(t.isCharacterBox?(r=n[0],r.type="mo"):r=new Pt("mo",n),t.mclass==="mbin"?(r.attributes.lspace="0.22em",r.attributes.rspace="0.22em"):t.mclass==="mpunct"?(r.attributes.lspace="0em",r.attributes.rspace="0.17em"):t.mclass==="mopen"||t.mclass==="mclose"?(r.attributes.lspace="0em",r.attributes.rspace="0em"):t.mclass==="minner"&&(r.attributes.lspace="0.0556em",r.attributes.width="+0.1111em")),r}function L$e(t,e,r){var n=_$e[t];switch(n){case"\\\\cdrightarrow":case"\\\\cdleftarrow":return r.callFunction(n,[e[0]],[e[1]]);case"\\uparrow":case"\\downarrow":{var i=r.callFunction("\\\\cdleft",[e[0]],[]),a={type:"atom",text:n,mode:"math",family:"rel"},s=r.callFunction("\\Big",[a],[]),o=r.callFunction("\\\\cdright",[e[1]],[]),l={type:"ordgroup",mode:"math",body:[i,s,o]};return r.callFunction("\\\\cdparent",[l],[])}case"\\\\cdlongequal":return r.callFunction("\\\\cdlongequal",[],[]);case"\\Vert":{var u={type:"textord",text:"\\Vert",mode:"math"};return r.callFunction("\\Big",[u],[])}default:return{type:"textord",text:" ",mode:"math"}}}function R$e(t){var e=[];for(t.gullet.beginGroup(),t.gullet.macros.set("\\cr","\\\\\\relax"),t.gullet.beginGroup();;){e.push(t.parseExpression(!1,"\\\\")),t.gullet.endGroup(),t.gullet.beginGroup();var r=t.fetch().text;if(r==="&"||r==="\\\\")t.consume();else if(r==="\\end"){e[e.length-1].length===0&&e.pop();break}else throw new Ft("Expected \\\\ or \\cr or \\end",t.nextToken)}for(var n=[],i=[n],a=0;aAV".includes(u))for(var f=0;f<2;f++){for(var d=!0,p=l+1;pAV=|." after @',s[l]);var m=L$e(u,h,t),g={type:"styling",body:[m],mode:"math",style:"display",resetFont:!0};n.push(g),o=$Q()}a%2===0?n.push(o):n.shift(),n=[],i.push(n)}t.gullet.endGroup(),t.gullet.endGroup();var y=new Array(i[0].length).fill({type:"align",align:"c",pregap:.25,postgap:.25});return{type:"array",mode:"math",body:i,arraystretch:1,addJot:!0,rowGaps:[null],cols:y,colSeparationType:"CD",hLinesBeforeRow:new Array(i.length+1).fill([])}}function UQ(t){return"isMiddle"in t}function Hk(t,e){var r=qk(t);if(r&&G$e.has(r.text))return r;throw r?new Ft("Invalid delimiter '"+r.text+"' after '"+e.funcName+"'",t):new Ft("Invalid delimiter type '"+t.type+"'",t)}function HQ(t){if(!t.body)throw new Error("Bug: The leftright ParseNode wasn't fully parsed.")}function Uc(t){for(var{type:e,names:r,props:n,handler:i,htmlBuilder:a,mathmlBuilder:s}=t,o={type:e,numArgs:n.numArgs||0,allowedInText:!1,numOptionalArgs:0,handler:i},l=0;l1||!h)&&g.pop(),v.length{Ft=class t extends Error{constructor(e,r){var n="KaTeX parse error: "+e,i,a,s=r&&r.loc;if(s&&s.start<=s.end){var o=s.lexer.input;i=s.start,a=s.end,i===o.length?n+=" at end of input: ":n+=" at position "+(i+1)+": ";var l=o.slice(i,a).replace(/[^]/g,"$&\u0332"),u;i>15?u="\u2026"+o.slice(i-15,i):u=o.slice(0,i);var h;a+15t.replace(bze,"-$1").toLowerCase(),kze={"&":"&",">":">","<":"<",'"':""","'":"'"},Tze=/[&><"']/g,Gs=t=>String(t).replace(Tze,e=>kze[e]),Sk=t=>t.type==="ordgroup"||t.type==="color"?t.body.length===1?Sk(t.body[0]):t:t.type==="font"?Sk(t.body):t,Eze=new Set(["mathord","textord","atom"]),vh=t=>Eze.has(Sk(t).type),Sze=t=>{var e=/^[\x00-\x20]*([^\\/#?]*?)(:|�*58|�*3a|&colon)/i.exec(t);return e?e[2]!==":"||!/^[a-zA-Z][a-zA-Z0-9+\-.]*$/.test(e[1])?null:e[1].toLowerCase():"_relative"},_k={displayMode:{type:"boolean",description:"Render math in display mode, which puts the math in display style (so \\int and \\sum are large, for example), and centers the math on the page on its own line.",cli:"-d, --display-mode"},output:{type:{enum:["htmlAndMathml","html","mathml"]},description:"Determines the markup language of the output.",cli:"-F, --format "},leqno:{type:"boolean",description:"Render display math in leqno style (left-justified tags)."},fleqn:{type:"boolean",description:"Render display math flush left."},throwOnError:{type:"boolean",default:!0,cli:"-t, --no-throw-on-error",cliDescription:"Render errors (in the color given by --error-color) instead of throwing a ParseError exception when encountering an error."},errorColor:{type:"string",default:"#cc0000",cli:"-c, --error-color ",cliDescription:"A color string given in the format 'rgb' or 'rrggbb' (no #). This option determines the color of errors rendered by the -t option.",cliProcessor:t=>"#"+t},macros:{type:"object",cli:"-m, --macro ",cliDescription:"Define custom macro of the form '\\foo:expansion' (use multiple -m arguments for multiple macros).",cliDefault:[],cliProcessor:(t,e)=>(e.push(t),e)},minRuleThickness:{type:"number",description:"Specifies a minimum thickness, in ems, for fraction lines, `\\sqrt` top lines, `{array}` vertical lines, `\\hline`, `\\hdashline`, `\\underline`, `\\overline`, and the borders of `\\fbox`, `\\boxed`, and `\\fcolorbox`.",processor:t=>Math.max(0,t),cli:"--min-rule-thickness ",cliProcessor:parseFloat},colorIsTextColor:{type:"boolean",description:"Makes \\color behave like LaTeX's 2-argument \\textcolor, instead of LaTeX's one-argument \\color mode change.",cli:"-b, --color-is-text-color"},strict:{type:[{enum:["warn","ignore","error"]},"boolean","function"],description:"Turn on strict / LaTeX faithfulness mode, which throws an error if the input uses features that are not supported by LaTeX.",cli:"-S, --strict",cliDefault:!1},trust:{type:["boolean","function"],description:"Trust the input, enabling all HTML features such as \\url.",cli:"-T, --trust"},maxSize:{type:"number",default:1/0,description:"If non-zero, all user-specified sizes, e.g. in \\rule{500em}{500em}, will be capped to maxSize ems. Otherwise, elements and spaces can be arbitrarily large",processor:t=>Math.max(0,t),cli:"-s, --max-size ",cliProcessor:parseInt},maxExpand:{type:"number",default:1e3,description:"Limit the number of macro expansions to the specified number, to prevent e.g. infinite macro loops. If set to Infinity, the macro expander will try to fully expand as in LaTeX.",processor:t=>Math.max(0,t),cli:"-e, --max-expand ",cliProcessor:t=>t==="Infinity"?1/0:parseInt(t)},globalGroup:{type:"boolean",cli:!1}};qb=class{constructor(e){e===void 0&&(e={}),this.displayMode=void 0,this.output=void 0,this.leqno=void 0,this.fleqn=void 0,this.throwOnError=void 0,this.errorColor=void 0,this.macros=void 0,this.minRuleThickness=void 0,this.colorIsTextColor=void 0,this.strict=void 0,this.trust=void 0,this.maxSize=void 0,this.maxExpand=void 0,this.globalGroup=void 0,e=e||{};for(var r of Object.keys(_k)){var n=_k[r];n&&Aze(this,r,e,n)}}reportNonstrict(e,r,n){var i=this.strict;if(typeof i=="function"&&(i=i(e,r,n)),!(!i||i==="ignore")){if(i===!0||i==="error")throw new Ft("LaTeX-incompatible input and strict mode is set to 'error': "+(r+" ["+e+"]"),n);i==="warn"?typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+(r+" ["+e+"]")):typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to "+("unrecognized '"+i+"': "+r+" ["+e+"]"))}}useStrictBehavior(e,r,n){var i=this.strict;if(typeof i=="function")try{i=i(e,r,n)}catch{i="error"}return!i||i==="ignore"?!1:i===!0||i==="error"?!0:i==="warn"?(typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+(r+" ["+e+"]")),!1):(typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to "+("unrecognized '"+i+"': "+r+" ["+e+"]")),!1)}isTrusted(e){if("url"in e&&e.url&&!e.protocol){var r=Sze(e.url);if(r==null)return!1;e.protocol=r}var n=typeof this.trust=="function"?this.trust(e):this.trust;return!!n}},zc=class{constructor(e,r,n){this.id=void 0,this.size=void 0,this.cramped=void 0,this.id=e,this.size=r,this.cramped=n}sup(){return $c[Lze[this.id]]}sub(){return $c[Rze[this.id]]}fracNum(){return $c[Dze[this.id]]}fracDen(){return $c[Ize[this.id]]}cramp(){return $c[Mze[this.id]]}text(){return $c[Nze[this.id]]}isTight(){return this.size>=2}},HM=0,Ak=1,qg=2,yh=3,Ub=4,eu=5,Ug=6,so=7,$c=[new zc(HM,0,!1),new zc(Ak,0,!0),new zc(qg,1,!1),new zc(yh,1,!0),new zc(Ub,2,!1),new zc(eu,2,!0),new zc(Ug,3,!1),new zc(so,3,!0)],Lze=[Ub,eu,Ub,eu,Ug,so,Ug,so],Rze=[eu,eu,eu,eu,so,so,so,so],Dze=[qg,yh,Ub,eu,Ug,so,Ug,so],Ize=[yh,yh,eu,eu,so,so,so,so],Mze=[Ak,Ak,yh,yh,eu,eu,so,so],Nze=[HM,Ak,qg,yh,qg,yh,qg,yh],Rr={DISPLAY:$c[HM],TEXT:$c[qg],SCRIPT:$c[Ub],SCRIPTSCRIPT:$c[Ug]},EM=[{name:"latin",blocks:[[256,591],[768,879]]},{name:"cyrillic",blocks:[[1024,1279]]},{name:"armenian",blocks:[[1328,1423]]},{name:"brahmic",blocks:[[2304,4255]]},{name:"georgian",blocks:[[4256,4351]]},{name:"cjk",blocks:[[12288,12543],[19968,40879],[65280,65376]]},{name:"hangul",blocks:[[44032,55215]]}];Ck=[];EM.forEach(t=>t.blocks.forEach(e=>Ck.push(...e)));Oa=t=>t+" "+t,Gg=80,Pze=function(e,r){return"M95,"+(622+e+r)+` c-2.7,0,-7.17,-2.7,-13.5,-8c-5.8,-5.3,-9.5,-10,-9.5,-14 c0,-2,0.3,-3.3,1,-4c1.3,-2.7,23.83,-20.7,67.5,-54 c44.2,-33.3,65.8,-50.3,66.5,-51c1.3,-1.3,3,-2,5,-2c4.7,0,8.7,3.3,12,10 @@ -13,7 +11,7 @@ c5.3,-9.3,12,-14,20,-14 H400000v`+(40+e)+`H845.2724 s-225.272,467,-225.272,467s-235,486,-235,486c-2.7,4.7,-9,7,-19,7 c-6,0,-10,-1,-12,-3s-194,-422,-194,-422s-65,47,-65,47z -M`+(834+e)+" "+r+"h400000v"+(40+e)+"h-400000z"},mPe=function(e,r){return"M263,"+(601+e+r)+`c0.7,0,18,39.7,52,119 +M`+(834+e)+" "+r+"h400000v"+(40+e)+"h-400000z"},Bze=function(e,r){return"M263,"+(601+e+r)+`c0.7,0,18,39.7,52,119 c34,79.3,68.167,158.7,102.5,238c34.3,79.3,51.8,119.3,52.5,120 c340,-704.7,510.7,-1060.3,512,-1067 l`+e/2.084+" -"+e+` @@ -23,7 +21,7 @@ s-271.3,567,-271.3,567c-38.7,80.7,-84,175,-136,283c-52,108,-89.167,185.3,-111.5, c-22.3,46.7,-33.8,70.3,-34.5,71c-4.7,4.7,-12.3,7,-23,7s-12,-1,-12,-1 s-109,-253,-109,-253c-72.7,-168,-109.3,-252,-110,-252c-10.7,8,-22,16.7,-34,26 c-22,17.3,-33.3,26,-34,26s-26,-26,-26,-26s76,-59,76,-59s76,-60,76,-60z -M`+(1001+e)+" "+r+"h400000v"+(40+e)+"h-400000z"},gPe=function(e,r){return"M983 "+(10+e+r)+` +M`+(1001+e)+" "+r+"h400000v"+(40+e)+"h-400000z"},Fze=function(e,r){return"M983 "+(10+e+r)+` l`+e/3.13+" -"+e+` c4,-6.7,10,-10,18,-10 H400000v`+(40+e)+` H1013.1s-83.4,268,-264.1,840c-180.7,572,-277,876.3,-289,913c-4.7,4.7,-12.7,7,-24,7 @@ -32,7 +30,7 @@ c-10,12,-21,25,-33,39s-32,39,-32,39c-6,-5.3,-15,-14,-27,-26s25,-30,25,-30 c26.7,-32.7,52,-63,76,-91s52,-60,52,-60s208,722,208,722 c56,-175.3,126.3,-397.3,211,-666c84.7,-268.7,153.8,-488.2,207.5,-658.5 c53.7,-170.3,84.5,-266.8,92.5,-289.5z -M`+(1001+e)+" "+r+"h400000v"+(40+e)+"h-400000z"},vPe=function(e,r){return"M424,"+(2398+e+r)+` +M`+(1001+e)+" "+r+"h400000v"+(40+e)+"h-400000z"},zze=function(e,r){return"M424,"+(2398+e+r)+` c-1.3,-0.7,-38.5,-172,-111.5,-514c-73,-342,-109.8,-513.3,-110.5,-514 c0,-2,-10.7,14.3,-32,49c-4.7,7.3,-9.8,15.7,-15.5,25c-5.7,9.3,-9.8,16,-12.5,20 s-5,7,-5,7c-4,-3.3,-8.3,-7.7,-13,-13s-13,-13,-13,-13s76,-122,76,-122s77,-121,77,-121 @@ -42,18 +40,18 @@ v`+(40+e)+`H1014.6 s-87.3,378.7,-272.6,1166c-185.3,787.3,-279.3,1182.3,-282,1185 c-2,6,-10,9,-24,9 c-8,0,-12,-0.7,-12,-2z M`+(1001+e)+" "+r+` -h400000v`+(40+e)+"h-400000z"},yPe=function(e,r){return"M473,"+(2713+e+r)+` +h400000v`+(40+e)+"h-400000z"},$ze=function(e,r){return"M473,"+(2713+e+r)+` c339.3,-1799.3,509.3,-2700,510,-2702 l`+e/5.298+" -"+e+` c3.3,-7.3,9.3,-11,18,-11 H400000v`+(40+e)+`H1017.7 s-90.5,478,-276.2,1466c-185.7,988,-279.5,1483,-281.5,1485c-2,6,-10,9,-24,9 c-8,0,-12,-0.7,-12,-2c0,-1.3,-5.3,-32,-16,-92c-50.7,-293.3,-119.7,-693.3,-207,-1200 c0,-1.3,-5.3,8.7,-16,30c-10.7,21.3,-21.3,42.7,-32,64s-16,33,-16,33s-26,-26,-26,-26 s76,-153,76,-153s77,-151,77,-151c0.7,0.7,35.7,202,105,604c67.3,400.7,102,602.7,104, -606zM`+(1001+e)+" "+r+"h400000v"+(40+e)+"H1017.7z"},xPe=function(e){var r=e/2;return"M400000 "+e+" H0 L"+r+" 0 l65 45 L145 "+(e-80)+" H400000z"},bPe=function(e,r,n){var a=n-54-r-e;return"M702 "+(e+r)+"H400000"+(40+e)+` -H742v`+a+`l-4 4-4 4c-.667.7 -2 1.5-4 2.5s-4.167 1.833-6.5 2.5-5.5 1-9.5 1 +606zM`+(1001+e)+" "+r+"h400000v"+(40+e)+"H1017.7z"},Gze=function(e){var r=e/2;return"M400000 "+e+" H0 L"+r+" 0 l65 45 L145 "+(e-80)+" H400000z"},qze=function(e,r,n){var i=n-54-r-e;return"M702 "+(e+r)+"H400000"+(40+e)+` +H742v`+i+`l-4 4-4 4c-.667.7 -2 1.5-4 2.5s-4.167 1.833-6.5 2.5-5.5 1-9.5 1 h-12l-28-84c-16.667-52-96.667 -294.333-240-727l-212 -643 -85 170 c-4-3.333-8.333-7.667-13 -13l-13-13l77-155 77-156c66 199.333 139 419.667 -219 661 l218 661zM702 `+r+"H400000v"+(40+e)+"H742z"},wPe=function(e,r,n){r=1e3*r;var a="";switch(e){case"sqrtMain":a=pPe(r,Ng);break;case"sqrtSize1":a=mPe(r,Ng);break;case"sqrtSize2":a=gPe(r,Ng);break;case"sqrtSize3":a=vPe(r,Ng);break;case"sqrtSize4":a=yPe(r,Ng);break;case"sqrtTall":a=bPe(r,Ng,n)}return a},kPe=function(e,r){switch(e){case"\u239C":return qa("M291 0 H417 V"+r+" H291z");case"\u2223":return qa("M145 0 H188 V"+r+" H145z");case"\u2225":return qa("M145 0 H188 V"+r+" H145z")+qa("M367 0 H410 V"+r+" H367z");case"\u239F":return qa("M457 0 H583 V"+r+" H457z");case"\u23A2":return qa("M319 0 H403 V"+r+" H319z");case"\u23A5":return qa("M263 0 H347 V"+r+" H263z");case"\u23AA":return qa("M384 0 H504 V"+r+" H384z");case"\u23D0":return qa("M312 0 H355 V"+r+" H312z");case"\u2016":return qa("M257 0 H300 V"+r+" H257z")+qa("M478 0 H521 V"+r+" H478z");default:return""}},xK={doubleleftarrow:`M262 157 +219 661 l218 661zM702 `+r+"H400000v"+(40+e)+"H742z"},Uze=function(e,r,n){r=1e3*r;var i="";switch(e){case"sqrtMain":i=Pze(r,Gg);break;case"sqrtSize1":i=Bze(r,Gg);break;case"sqrtSize2":i=Fze(r,Gg);break;case"sqrtSize3":i=zze(r,Gg);break;case"sqrtSize4":i=$ze(r,Gg);break;case"sqrtTall":i=qze(r,Gg,n)}return i},Hze=function(e,r){switch(e){case"\u239C":return Oa("M291 0 H417 V"+r+" H291z");case"\u2223":return Oa("M145 0 H188 V"+r+" H145z");case"\u2225":return Oa("M145 0 H188 V"+r+" H145z")+Oa("M367 0 H410 V"+r+" H367z");case"\u239F":return Oa("M457 0 H583 V"+r+" H457z");case"\u23A2":return Oa("M319 0 H403 V"+r+" H319z");case"\u23A5":return Oa("M263 0 H347 V"+r+" H263z");case"\u23AA":return Oa("M384 0 H504 V"+r+" H384z");case"\u23D0":return Oa("M312 0 H355 V"+r+" H312z");case"\u2016":return Oa("M257 0 H300 V"+r+" H257z")+Oa("M478 0 H521 V"+r+" H478z");default:return""}},CQ={doubleleftarrow:`M262 157 l10-10c34-36 62.7-77 86-123 3.3-8 5-13.3 5-16 0-5.3-6.7-8-20-8-7.3 0-12.2.5-14.5 1.5-2.3 1-4.8 4.5-7.5 10.5-49.3 97.3-121.7 169.3-217 216-28 14-57.3 25-88 33-6.7 2-11 3.8-13 5.5-2 1.7-3 4.2-3 7.5s1 5.8 3 7.5 @@ -99,10 +97,10 @@ m0 0v40h400000v-40z`,leftharpoondown:`M7 241c-4 4-6.333 8.667-7 14 0 5.333.667 9 v40h399900v-40zM0 241v40h399900v-40zm0 0v40h399900v-40z`,lefthook:`M400000 281 H103s-33-11.2-61-33.5S0 197.3 0 164s14.2-61.2 42.5 -83.5C70.8 58.2 104 47 142 47 c16.7 0 25 6.7 25 20 0 12-8.7 18.7-26 20-40 3.3 -68.7 15.7-86 37-10 12-15 25.3-15 40 0 22.7 9.8 40.7 29.5 54 19.7 13.3 43.5 21 - 71.5 23h399859zM103 281v-40h399897v40z`,leftlinesegment:qa("M40 281 V428 H0 V94 H40 V241 H400000 v40z"),leftbracketunder:qa("M0 0 h120 V290 H399995 v120 H0z"),leftbracketover:qa("M0 440 h120 V150 H399995 v-120 H0z"),leftmapsto:qa("M40 281 V448H0V74H40V241H400000v40z"),leftToFrom:`M0 147h400000v40H0zm0 214c68 40 115.7 95.7 143 167h22c15.3 0 23 + 71.5 23h399859zM103 281v-40h399897v40z`,leftlinesegment:Oa("M40 281 V428 H0 V94 H40 V241 H400000 v40z"),leftbracketunder:Oa("M0 0 h120 V290 H399995 v120 H0z"),leftbracketover:Oa("M0 440 h120 V150 H399995 v-120 H0z"),leftmapsto:Oa("M40 281 V448H0V74H40V241H400000v40z"),leftToFrom:`M0 147h400000v40H0zm0 214c68 40 115.7 95.7 143 167h22c15.3 0 23 -.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69-70-101l-7-8h399905v-40H95l7-8 c28.7-32 52-65.7 70-101 10.7-23.3 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 265.3 - 68 321 0 361zm0-174v-40h399900v40zm100 154v40h399900v-40z`,longequal:qa("M0 50 h400000 v40H0z m0 194h40000v40H0z"),midbrace:`M200428 334 + 68 321 0 361zm0-174v-40h399900v40zm100 154v40h399900v-40z`,longequal:Oa("M0 50 h400000 v40H0z m0 194h40000v40H0z"),midbrace:`M200428 334 c-100.7-8.3-195.3-44-280-108-55.3-42-101.7-93-139-153l-9-14c-2.7 4-5.7 8.7-9 14 -53.3 86.7-123.7 153-211 199-66.7 36-137.3 56.3-212 62H0V214h199568c178.3-11.7 311.7-78.3 403-201 6-8 9.7-12 11-12 .7-.7 6.7-1 18-1s17.3.3 18 1c1.3 0 5 4 11 @@ -151,7 +149,7 @@ m0 0v40h399900v-40z m100 194v40h399900v-40zm0 0v40h399900v-40z`,rightharpoondown m0-194v40h400000v-40zm0 0v40h400000v-40z`,righthook:`M399859 241c-764 0 0 0 0 0 40-3.3 68.7-15.7 86-37 10-12 15-25.3 15-40 0-22.7-9.8-40.7-29.5-54-19.7-13.3-43.5-21-71.5-23-17.3-1.3-26-8-26-20 0 -13.3 8.7-20 26-20 38 0 71 11.2 99 33.5 0 0 7 5.6 21 16.7 14 11.2 21 33.5 21 - 66.8s-14 61.2-42 83.5c-28 22.3-61 33.5-99 33.5L0 241z M0 281v-40h399859v40z`,rightlinesegment:qa("M399960 241 V94 h40 V428 h-40 V281 H0 v-40z"),rightbracketunder:qa("M399995 0 h-120 V290 H0 v120 H400000z"),rightbracketover:qa("M399995 440 h-120 V150 H0 v-120 H399995z"),rightToFrom:`M400000 167c-70.7-42-118-97.7-142-167h-23c-15.3 0-23 .3-23 + 66.8s-14 61.2-42 83.5c-28 22.3-61 33.5-99 33.5L0 241z M0 281v-40h399859v40z`,rightlinesegment:Oa("M399960 241 V94 h40 V428 h-40 V281 H0 v-40z"),rightbracketunder:Oa("M399995 0 h-120 V290 H0 v120 H400000z"),rightbracketover:Oa("M399995 440 h-120 V150 H0 v-120 H399995z"),rightToFrom:`M400000 167c-70.7-42-118-97.7-142-167h-23c-15.3 0-23 .3-23 1 0 1.3 5.3 13.7 16 37 18 35.3 41.3 69 70 101l7 8H0v40h399905l-7 8c-28.7 32 -52 65.7-70 101-10.7 23.3-16 35.7-16 37 0 .7 7.7 1 23 1h23c24-69.3 71.3-125 142 -167z M100 147v40h399900v-40zM0 341v40h399900v-40z`,twoheadleftarrow:`M0 167c68 40 @@ -224,7 +222,7 @@ M93 435 v40 H400000 v-40z M500 241 v40 H400000 v-40z M500 241 v40 H400000 v-40z` c4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199, -231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6 c-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z -M500 241 v40 H399408 v-40z M500 435 v40 H400000 v-40z`},TPe=function(e,r){switch(e){case"lbrack":return"M403 1759 V84 H666 V0 H319 V1759 v"+r+` v1759 v84 h347 v-84 +M500 241 v40 H399408 v-40z M500 435 v40 H400000 v-40z`},Vze=function(e,r){switch(e){case"lbrack":return"M403 1759 V84 H666 V0 H319 V1759 v"+r+` v1759 v84 h347 v-84 H403z M403 1759 V0 H319 V1759 v`+r+" v1759 v84 h84z";case"rbrack":return"M347 1759 V0 H0 V84 H263 V1759 v"+r+` v1759 H0 v84 H347z M347 1759 V0 H263 V1759 v`+r+" v1759 h84z";case"vert":return"M145 15 v585 v"+r+` v585 c2.667,10,9.667,15,21,15 c10,0,16.667,-5,20,-15 v-585 v`+-r+` v-585 c-2.667,-10,-9.667,-15,-21,-15 @@ -252,14 +250,272 @@ c-55.7,194.7,-131.8,370.3,-228.5,527c-20.7,34.7,-41.7,66.3,-63,95c-2,3.3,-4,7,-6 c0,7.3,5.7,11,17,11c0,0,11,0,11,0c9.3,0,14.3,-0.3,15,-1c5.3,-5.3,10.3,-11,15,-17 c242.7,-294.7,395.3,-681.7,458,-1161c21.3,-164.7,33.3,-350.7,36,-558 l0,-`+(r+144)+`c-2,-159.3,-10,-310.7,-24,-454c-53.3,-528,-210,-949.7, --470,-1265c-4.7,-6,-9.7,-11.7,-15,-17c-0.7,-0.7,-6.7,-1,-18,-1z`;default:throw new Error("Unknown stretchy delimiter.")}};Of=class{constructor(e){this.children=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,this.children=e,this.classes=[],this.height=0,this.depth=0,this.maxFontSize=0,this.style={}}hasClass(e){return this.classes.includes(e)}toNode(){for(var e=document.createDocumentFragment(),r=0;r{if(EPe(e))return e.toText();throw new Error("Expected MathDomNode with toText, got "+e.constructor.name)}).join("")}},UI={pt:1,mm:7227/2540,cm:7227/254,in:72.27,bp:803/800,pc:12,dd:1238/1157,cc:14856/1157,nd:685/642,nc:1370/107,sp:1/65536,px:803/800},CPe={ex:!0,em:!0,mu:!0},tZ=function(e){return typeof e!="string"&&(e=e.unit),e in UI||e in CPe||e==="ex"},ta=function(e,r){var n;if(e.unit in UI)n=UI[e.unit]/r.fontMetrics().ptPerEm/r.sizeMultiplier;else if(e.unit==="mu")n=r.fontMetrics().cssEmPerMu;else{var a;if(r.style.isTight()?a=r.havingStyle(r.style.text()):a=r,e.unit==="ex")n=a.fontMetrics().xHeight;else if(e.unit==="em")n=a.fontMetrics().quad;else throw new ht("Invalid unit: '"+e.unit+"'");a!==r&&(n*=a.sizeMultiplier/r.sizeMultiplier)}return Math.min(e.number*n,r.maxSize)},mt=function(e){return+e.toFixed(4)+"em"},Pf=function(e){return e.filter(r=>r).join(" ")},lD=function(e){var r="";for(var n of Object.keys(e)){var a=e[n];a!==void 0&&(r+=JOe(n)+":"+a+";")}return r},rZ=function(e,r,n){if(this.classes=e||[],this.attributes={},this.height=0,this.depth=0,this.maxFontSize=0,this.style=n||{},r){r.style.isTight()&&this.classes.push("mtight");var a=r.getColor();a&&(this.style.color=a)}},nZ=function(e){var r=document.createElement(e);r.className=Pf(this.classes),Object.assign(r.style,this.style);for(var n of Object.keys(this.attributes))r.setAttribute(n,this.attributes[n]);for(var a=0;a/=\x00-\x1f]/,aZ=function(e){var r="<"+e;this.classes.length&&(r+=' class="'+Ji(Pf(this.classes))+'"');var n=lD(this.style);n&&(r+=' style="'+Ji(n)+'"');for(var a of Object.keys(this.attributes)){if(SPe.test(a))throw new ht("Invalid attribute name '"+a+"'");r+=" "+a+'="'+Ji(this.attributes[a])+'"'}r+=">";for(var i=0;i",r},Bf=class{constructor(e,r,n,a){this.children=void 0,this.attributes=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.width=void 0,this.maxFontSize=void 0,this.style=void 0,this.italic=void 0,rZ.call(this,e,n,a),this.children=r||[]}setAttribute(e,r){this.attributes[e]=r}hasClass(e){return this.classes.includes(e)}toNode(){return nZ.call(this,"span")}toMarkup(){return aZ.call(this,"span")}},Pg=class{constructor(e,r,n,a){this.children=void 0,this.attributes=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,rZ.call(this,r,a),this.children=n||[],this.setAttribute("href",e)}setAttribute(e,r){this.attributes[e]=r}hasClass(e){return this.classes.includes(e)}toNode(){return nZ.call(this,"a")}toMarkup(){return aZ.call(this,"a")}},qI=class{constructor(e,r,n){this.src=void 0,this.alt=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,this.alt=r,this.src=e,this.classes=["mord"],this.height=0,this.depth=0,this.maxFontSize=0,this.style=n}hasClass(e){return this.classes.includes(e)}toNode(){var e=document.createElement("img");return e.src=this.src,e.alt=this.alt,e.className="mord",Object.assign(e.style,this.style),e}toMarkup(){var e=''+Ji(this.alt)+'0&&(r=document.createElement("span"),r.style.marginRight=mt(this.italic)),this.classes.length>0&&(r=r||document.createElement("span"),r.className=Pf(this.classes)),Object.keys(this.style).length>0&&(r=r||document.createElement("span"),Object.assign(r.style,this.style)),r?(r.appendChild(e),r):e}toMarkup(){var e=!1,r="0&&(n+="margin-right:"+mt(this.italic)+";"),n+=lD(this.style),n&&(e=!0,r+=' style="'+Ji(n)+'"');var a=Ji(this.text);return e?(r+=">",r+=a,r+="",r):a}},ql=class{constructor(e,r){this.children=void 0,this.attributes=void 0,this.children=e||[],this.attributes=r||{}}toNode(){var e="http://www.w3.org/2000/svg",r=document.createElementNS(e,"svg");for(var n of Object.keys(this.attributes))r.setAttribute(n,this.attributes[n]);for(var a=0;a':''}},Pb=class{constructor(e){this.attributes=void 0,this.attributes=e||{}}toNode(){var e="http://www.w3.org/2000/svg",r=document.createElementNS(e,"line");for(var n of Object.keys(this.attributes))r.setAttribute(n,this.attributes[n]);return r}toMarkup(){var e="t instanceof Bf||t instanceof Pg||t instanceof Of,$u={"AMS-Regular":{32:[0,0,0,0,.25],65:[0,.68889,0,0,.72222],66:[0,.68889,0,0,.66667],67:[0,.68889,0,0,.72222],68:[0,.68889,0,0,.72222],69:[0,.68889,0,0,.66667],70:[0,.68889,0,0,.61111],71:[0,.68889,0,0,.77778],72:[0,.68889,0,0,.77778],73:[0,.68889,0,0,.38889],74:[.16667,.68889,0,0,.5],75:[0,.68889,0,0,.77778],76:[0,.68889,0,0,.66667],77:[0,.68889,0,0,.94445],78:[0,.68889,0,0,.72222],79:[.16667,.68889,0,0,.77778],80:[0,.68889,0,0,.61111],81:[.16667,.68889,0,0,.77778],82:[0,.68889,0,0,.72222],83:[0,.68889,0,0,.55556],84:[0,.68889,0,0,.66667],85:[0,.68889,0,0,.72222],86:[0,.68889,0,0,.72222],87:[0,.68889,0,0,1],88:[0,.68889,0,0,.72222],89:[0,.68889,0,0,.72222],90:[0,.68889,0,0,.66667],107:[0,.68889,0,0,.55556],160:[0,0,0,0,.25],165:[0,.675,.025,0,.75],174:[.15559,.69224,0,0,.94666],240:[0,.68889,0,0,.55556],295:[0,.68889,0,0,.54028],710:[0,.825,0,0,2.33334],732:[0,.9,0,0,2.33334],770:[0,.825,0,0,2.33334],771:[0,.9,0,0,2.33334],989:[.08167,.58167,0,0,.77778],1008:[0,.43056,.04028,0,.66667],8245:[0,.54986,0,0,.275],8463:[0,.68889,0,0,.54028],8487:[0,.68889,0,0,.72222],8498:[0,.68889,0,0,.55556],8502:[0,.68889,0,0,.66667],8503:[0,.68889,0,0,.44445],8504:[0,.68889,0,0,.66667],8513:[0,.68889,0,0,.63889],8592:[-.03598,.46402,0,0,.5],8594:[-.03598,.46402,0,0,.5],8602:[-.13313,.36687,0,0,1],8603:[-.13313,.36687,0,0,1],8606:[.01354,.52239,0,0,1],8608:[.01354,.52239,0,0,1],8610:[.01354,.52239,0,0,1.11111],8611:[.01354,.52239,0,0,1.11111],8619:[0,.54986,0,0,1],8620:[0,.54986,0,0,1],8621:[-.13313,.37788,0,0,1.38889],8622:[-.13313,.36687,0,0,1],8624:[0,.69224,0,0,.5],8625:[0,.69224,0,0,.5],8630:[0,.43056,0,0,1],8631:[0,.43056,0,0,1],8634:[.08198,.58198,0,0,.77778],8635:[.08198,.58198,0,0,.77778],8638:[.19444,.69224,0,0,.41667],8639:[.19444,.69224,0,0,.41667],8642:[.19444,.69224,0,0,.41667],8643:[.19444,.69224,0,0,.41667],8644:[.1808,.675,0,0,1],8646:[.1808,.675,0,0,1],8647:[.1808,.675,0,0,1],8648:[.19444,.69224,0,0,.83334],8649:[.1808,.675,0,0,1],8650:[.19444,.69224,0,0,.83334],8651:[.01354,.52239,0,0,1],8652:[.01354,.52239,0,0,1],8653:[-.13313,.36687,0,0,1],8654:[-.13313,.36687,0,0,1],8655:[-.13313,.36687,0,0,1],8666:[.13667,.63667,0,0,1],8667:[.13667,.63667,0,0,1],8669:[-.13313,.37788,0,0,1],8672:[-.064,.437,0,0,1.334],8674:[-.064,.437,0,0,1.334],8705:[0,.825,0,0,.5],8708:[0,.68889,0,0,.55556],8709:[.08167,.58167,0,0,.77778],8717:[0,.43056,0,0,.42917],8722:[-.03598,.46402,0,0,.5],8724:[.08198,.69224,0,0,.77778],8726:[.08167,.58167,0,0,.77778],8733:[0,.69224,0,0,.77778],8736:[0,.69224,0,0,.72222],8737:[0,.69224,0,0,.72222],8738:[.03517,.52239,0,0,.72222],8739:[.08167,.58167,0,0,.22222],8740:[.25142,.74111,0,0,.27778],8741:[.08167,.58167,0,0,.38889],8742:[.25142,.74111,0,0,.5],8756:[0,.69224,0,0,.66667],8757:[0,.69224,0,0,.66667],8764:[-.13313,.36687,0,0,.77778],8765:[-.13313,.37788,0,0,.77778],8769:[-.13313,.36687,0,0,.77778],8770:[-.03625,.46375,0,0,.77778],8774:[.30274,.79383,0,0,.77778],8776:[-.01688,.48312,0,0,.77778],8778:[.08167,.58167,0,0,.77778],8782:[.06062,.54986,0,0,.77778],8783:[.06062,.54986,0,0,.77778],8785:[.08198,.58198,0,0,.77778],8786:[.08198,.58198,0,0,.77778],8787:[.08198,.58198,0,0,.77778],8790:[0,.69224,0,0,.77778],8791:[.22958,.72958,0,0,.77778],8796:[.08198,.91667,0,0,.77778],8806:[.25583,.75583,0,0,.77778],8807:[.25583,.75583,0,0,.77778],8808:[.25142,.75726,0,0,.77778],8809:[.25142,.75726,0,0,.77778],8812:[.25583,.75583,0,0,.5],8814:[.20576,.70576,0,0,.77778],8815:[.20576,.70576,0,0,.77778],8816:[.30274,.79383,0,0,.77778],8817:[.30274,.79383,0,0,.77778],8818:[.22958,.72958,0,0,.77778],8819:[.22958,.72958,0,0,.77778],8822:[.1808,.675,0,0,.77778],8823:[.1808,.675,0,0,.77778],8828:[.13667,.63667,0,0,.77778],8829:[.13667,.63667,0,0,.77778],8830:[.22958,.72958,0,0,.77778],8831:[.22958,.72958,0,0,.77778],8832:[.20576,.70576,0,0,.77778],8833:[.20576,.70576,0,0,.77778],8840:[.30274,.79383,0,0,.77778],8841:[.30274,.79383,0,0,.77778],8842:[.13597,.63597,0,0,.77778],8843:[.13597,.63597,0,0,.77778],8847:[.03517,.54986,0,0,.77778],8848:[.03517,.54986,0,0,.77778],8858:[.08198,.58198,0,0,.77778],8859:[.08198,.58198,0,0,.77778],8861:[.08198,.58198,0,0,.77778],8862:[0,.675,0,0,.77778],8863:[0,.675,0,0,.77778],8864:[0,.675,0,0,.77778],8865:[0,.675,0,0,.77778],8872:[0,.69224,0,0,.61111],8873:[0,.69224,0,0,.72222],8874:[0,.69224,0,0,.88889],8876:[0,.68889,0,0,.61111],8877:[0,.68889,0,0,.61111],8878:[0,.68889,0,0,.72222],8879:[0,.68889,0,0,.72222],8882:[.03517,.54986,0,0,.77778],8883:[.03517,.54986,0,0,.77778],8884:[.13667,.63667,0,0,.77778],8885:[.13667,.63667,0,0,.77778],8888:[0,.54986,0,0,1.11111],8890:[.19444,.43056,0,0,.55556],8891:[.19444,.69224,0,0,.61111],8892:[.19444,.69224,0,0,.61111],8901:[0,.54986,0,0,.27778],8903:[.08167,.58167,0,0,.77778],8905:[.08167,.58167,0,0,.77778],8906:[.08167,.58167,0,0,.77778],8907:[0,.69224,0,0,.77778],8908:[0,.69224,0,0,.77778],8909:[-.03598,.46402,0,0,.77778],8910:[0,.54986,0,0,.76042],8911:[0,.54986,0,0,.76042],8912:[.03517,.54986,0,0,.77778],8913:[.03517,.54986,0,0,.77778],8914:[0,.54986,0,0,.66667],8915:[0,.54986,0,0,.66667],8916:[0,.69224,0,0,.66667],8918:[.0391,.5391,0,0,.77778],8919:[.0391,.5391,0,0,.77778],8920:[.03517,.54986,0,0,1.33334],8921:[.03517,.54986,0,0,1.33334],8922:[.38569,.88569,0,0,.77778],8923:[.38569,.88569,0,0,.77778],8926:[.13667,.63667,0,0,.77778],8927:[.13667,.63667,0,0,.77778],8928:[.30274,.79383,0,0,.77778],8929:[.30274,.79383,0,0,.77778],8934:[.23222,.74111,0,0,.77778],8935:[.23222,.74111,0,0,.77778],8936:[.23222,.74111,0,0,.77778],8937:[.23222,.74111,0,0,.77778],8938:[.20576,.70576,0,0,.77778],8939:[.20576,.70576,0,0,.77778],8940:[.30274,.79383,0,0,.77778],8941:[.30274,.79383,0,0,.77778],8994:[.19444,.69224,0,0,.77778],8995:[.19444,.69224,0,0,.77778],9416:[.15559,.69224,0,0,.90222],9484:[0,.69224,0,0,.5],9488:[0,.69224,0,0,.5],9492:[0,.37788,0,0,.5],9496:[0,.37788,0,0,.5],9585:[.19444,.68889,0,0,.88889],9586:[.19444,.74111,0,0,.88889],9632:[0,.675,0,0,.77778],9633:[0,.675,0,0,.77778],9650:[0,.54986,0,0,.72222],9651:[0,.54986,0,0,.72222],9654:[.03517,.54986,0,0,.77778],9660:[0,.54986,0,0,.72222],9661:[0,.54986,0,0,.72222],9664:[.03517,.54986,0,0,.77778],9674:[.11111,.69224,0,0,.66667],9733:[.19444,.69224,0,0,.94445],10003:[0,.69224,0,0,.83334],10016:[0,.69224,0,0,.83334],10731:[.11111,.69224,0,0,.66667],10846:[.19444,.75583,0,0,.61111],10877:[.13667,.63667,0,0,.77778],10878:[.13667,.63667,0,0,.77778],10885:[.25583,.75583,0,0,.77778],10886:[.25583,.75583,0,0,.77778],10887:[.13597,.63597,0,0,.77778],10888:[.13597,.63597,0,0,.77778],10889:[.26167,.75726,0,0,.77778],10890:[.26167,.75726,0,0,.77778],10891:[.48256,.98256,0,0,.77778],10892:[.48256,.98256,0,0,.77778],10901:[.13667,.63667,0,0,.77778],10902:[.13667,.63667,0,0,.77778],10933:[.25142,.75726,0,0,.77778],10934:[.25142,.75726,0,0,.77778],10935:[.26167,.75726,0,0,.77778],10936:[.26167,.75726,0,0,.77778],10937:[.26167,.75726,0,0,.77778],10938:[.26167,.75726,0,0,.77778],10949:[.25583,.75583,0,0,.77778],10950:[.25583,.75583,0,0,.77778],10955:[.28481,.79383,0,0,.77778],10956:[.28481,.79383,0,0,.77778],57350:[.08167,.58167,0,0,.22222],57351:[.08167,.58167,0,0,.38889],57352:[.08167,.58167,0,0,.77778],57353:[0,.43056,.04028,0,.66667],57356:[.25142,.75726,0,0,.77778],57357:[.25142,.75726,0,0,.77778],57358:[.41951,.91951,0,0,.77778],57359:[.30274,.79383,0,0,.77778],57360:[.30274,.79383,0,0,.77778],57361:[.41951,.91951,0,0,.77778],57366:[.25142,.75726,0,0,.77778],57367:[.25142,.75726,0,0,.77778],57368:[.25142,.75726,0,0,.77778],57369:[.25142,.75726,0,0,.77778],57370:[.13597,.63597,0,0,.77778],57371:[.13597,.63597,0,0,.77778]},"Caligraphic-Regular":{32:[0,0,0,0,.25],65:[0,.68333,0,.19445,.79847],66:[0,.68333,.03041,.13889,.65681],67:[0,.68333,.05834,.13889,.52653],68:[0,.68333,.02778,.08334,.77139],69:[0,.68333,.08944,.11111,.52778],70:[0,.68333,.09931,.11111,.71875],71:[.09722,.68333,.0593,.11111,.59487],72:[0,.68333,.00965,.11111,.84452],73:[0,.68333,.07382,0,.54452],74:[.09722,.68333,.18472,.16667,.67778],75:[0,.68333,.01445,.05556,.76195],76:[0,.68333,0,.13889,.68972],77:[0,.68333,0,.13889,1.2009],78:[0,.68333,.14736,.08334,.82049],79:[0,.68333,.02778,.11111,.79611],80:[0,.68333,.08222,.08334,.69556],81:[.09722,.68333,0,.11111,.81667],82:[0,.68333,0,.08334,.8475],83:[0,.68333,.075,.13889,.60556],84:[0,.68333,.25417,0,.54464],85:[0,.68333,.09931,.08334,.62583],86:[0,.68333,.08222,0,.61278],87:[0,.68333,.08222,.08334,.98778],88:[0,.68333,.14643,.13889,.7133],89:[.09722,.68333,.08222,.08334,.66834],90:[0,.68333,.07944,.13889,.72473],160:[0,0,0,0,.25]},"Fraktur-Regular":{32:[0,0,0,0,.25],33:[0,.69141,0,0,.29574],34:[0,.69141,0,0,.21471],38:[0,.69141,0,0,.73786],39:[0,.69141,0,0,.21201],40:[.24982,.74947,0,0,.38865],41:[.24982,.74947,0,0,.38865],42:[0,.62119,0,0,.27764],43:[.08319,.58283,0,0,.75623],44:[0,.10803,0,0,.27764],45:[.08319,.58283,0,0,.75623],46:[0,.10803,0,0,.27764],47:[.24982,.74947,0,0,.50181],48:[0,.47534,0,0,.50181],49:[0,.47534,0,0,.50181],50:[0,.47534,0,0,.50181],51:[.18906,.47534,0,0,.50181],52:[.18906,.47534,0,0,.50181],53:[.18906,.47534,0,0,.50181],54:[0,.69141,0,0,.50181],55:[.18906,.47534,0,0,.50181],56:[0,.69141,0,0,.50181],57:[.18906,.47534,0,0,.50181],58:[0,.47534,0,0,.21606],59:[.12604,.47534,0,0,.21606],61:[-.13099,.36866,0,0,.75623],63:[0,.69141,0,0,.36245],65:[0,.69141,0,0,.7176],66:[0,.69141,0,0,.88397],67:[0,.69141,0,0,.61254],68:[0,.69141,0,0,.83158],69:[0,.69141,0,0,.66278],70:[.12604,.69141,0,0,.61119],71:[0,.69141,0,0,.78539],72:[.06302,.69141,0,0,.7203],73:[0,.69141,0,0,.55448],74:[.12604,.69141,0,0,.55231],75:[0,.69141,0,0,.66845],76:[0,.69141,0,0,.66602],77:[0,.69141,0,0,1.04953],78:[0,.69141,0,0,.83212],79:[0,.69141,0,0,.82699],80:[.18906,.69141,0,0,.82753],81:[.03781,.69141,0,0,.82699],82:[0,.69141,0,0,.82807],83:[0,.69141,0,0,.82861],84:[0,.69141,0,0,.66899],85:[0,.69141,0,0,.64576],86:[0,.69141,0,0,.83131],87:[0,.69141,0,0,1.04602],88:[0,.69141,0,0,.71922],89:[.18906,.69141,0,0,.83293],90:[.12604,.69141,0,0,.60201],91:[.24982,.74947,0,0,.27764],93:[.24982,.74947,0,0,.27764],94:[0,.69141,0,0,.49965],97:[0,.47534,0,0,.50046],98:[0,.69141,0,0,.51315],99:[0,.47534,0,0,.38946],100:[0,.62119,0,0,.49857],101:[0,.47534,0,0,.40053],102:[.18906,.69141,0,0,.32626],103:[.18906,.47534,0,0,.5037],104:[.18906,.69141,0,0,.52126],105:[0,.69141,0,0,.27899],106:[0,.69141,0,0,.28088],107:[0,.69141,0,0,.38946],108:[0,.69141,0,0,.27953],109:[0,.47534,0,0,.76676],110:[0,.47534,0,0,.52666],111:[0,.47534,0,0,.48885],112:[.18906,.52396,0,0,.50046],113:[.18906,.47534,0,0,.48912],114:[0,.47534,0,0,.38919],115:[0,.47534,0,0,.44266],116:[0,.62119,0,0,.33301],117:[0,.47534,0,0,.5172],118:[0,.52396,0,0,.5118],119:[0,.52396,0,0,.77351],120:[.18906,.47534,0,0,.38865],121:[.18906,.47534,0,0,.49884],122:[.18906,.47534,0,0,.39054],160:[0,0,0,0,.25],8216:[0,.69141,0,0,.21471],8217:[0,.69141,0,0,.21471],58112:[0,.62119,0,0,.49749],58113:[0,.62119,0,0,.4983],58114:[.18906,.69141,0,0,.33328],58115:[.18906,.69141,0,0,.32923],58116:[.18906,.47534,0,0,.50343],58117:[0,.69141,0,0,.33301],58118:[0,.62119,0,0,.33409],58119:[0,.47534,0,0,.50073]},"Main-Bold":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.35],34:[0,.69444,0,0,.60278],35:[.19444,.69444,0,0,.95833],36:[.05556,.75,0,0,.575],37:[.05556,.75,0,0,.95833],38:[0,.69444,0,0,.89444],39:[0,.69444,0,0,.31944],40:[.25,.75,0,0,.44722],41:[.25,.75,0,0,.44722],42:[0,.75,0,0,.575],43:[.13333,.63333,0,0,.89444],44:[.19444,.15556,0,0,.31944],45:[0,.44444,0,0,.38333],46:[0,.15556,0,0,.31944],47:[.25,.75,0,0,.575],48:[0,.64444,0,0,.575],49:[0,.64444,0,0,.575],50:[0,.64444,0,0,.575],51:[0,.64444,0,0,.575],52:[0,.64444,0,0,.575],53:[0,.64444,0,0,.575],54:[0,.64444,0,0,.575],55:[0,.64444,0,0,.575],56:[0,.64444,0,0,.575],57:[0,.64444,0,0,.575],58:[0,.44444,0,0,.31944],59:[.19444,.44444,0,0,.31944],60:[.08556,.58556,0,0,.89444],61:[-.10889,.39111,0,0,.89444],62:[.08556,.58556,0,0,.89444],63:[0,.69444,0,0,.54305],64:[0,.69444,0,0,.89444],65:[0,.68611,0,0,.86944],66:[0,.68611,0,0,.81805],67:[0,.68611,0,0,.83055],68:[0,.68611,0,0,.88194],69:[0,.68611,0,0,.75555],70:[0,.68611,0,0,.72361],71:[0,.68611,0,0,.90416],72:[0,.68611,0,0,.9],73:[0,.68611,0,0,.43611],74:[0,.68611,0,0,.59444],75:[0,.68611,0,0,.90138],76:[0,.68611,0,0,.69166],77:[0,.68611,0,0,1.09166],78:[0,.68611,0,0,.9],79:[0,.68611,0,0,.86388],80:[0,.68611,0,0,.78611],81:[.19444,.68611,0,0,.86388],82:[0,.68611,0,0,.8625],83:[0,.68611,0,0,.63889],84:[0,.68611,0,0,.8],85:[0,.68611,0,0,.88472],86:[0,.68611,.01597,0,.86944],87:[0,.68611,.01597,0,1.18888],88:[0,.68611,0,0,.86944],89:[0,.68611,.02875,0,.86944],90:[0,.68611,0,0,.70277],91:[.25,.75,0,0,.31944],92:[.25,.75,0,0,.575],93:[.25,.75,0,0,.31944],94:[0,.69444,0,0,.575],95:[.31,.13444,.03194,0,.575],97:[0,.44444,0,0,.55902],98:[0,.69444,0,0,.63889],99:[0,.44444,0,0,.51111],100:[0,.69444,0,0,.63889],101:[0,.44444,0,0,.52708],102:[0,.69444,.10903,0,.35139],103:[.19444,.44444,.01597,0,.575],104:[0,.69444,0,0,.63889],105:[0,.69444,0,0,.31944],106:[.19444,.69444,0,0,.35139],107:[0,.69444,0,0,.60694],108:[0,.69444,0,0,.31944],109:[0,.44444,0,0,.95833],110:[0,.44444,0,0,.63889],111:[0,.44444,0,0,.575],112:[.19444,.44444,0,0,.63889],113:[.19444,.44444,0,0,.60694],114:[0,.44444,0,0,.47361],115:[0,.44444,0,0,.45361],116:[0,.63492,0,0,.44722],117:[0,.44444,0,0,.63889],118:[0,.44444,.01597,0,.60694],119:[0,.44444,.01597,0,.83055],120:[0,.44444,0,0,.60694],121:[.19444,.44444,.01597,0,.60694],122:[0,.44444,0,0,.51111],123:[.25,.75,0,0,.575],124:[.25,.75,0,0,.31944],125:[.25,.75,0,0,.575],126:[.35,.34444,0,0,.575],160:[0,0,0,0,.25],163:[0,.69444,0,0,.86853],168:[0,.69444,0,0,.575],172:[0,.44444,0,0,.76666],176:[0,.69444,0,0,.86944],177:[.13333,.63333,0,0,.89444],184:[.17014,0,0,0,.51111],198:[0,.68611,0,0,1.04166],215:[.13333,.63333,0,0,.89444],216:[.04861,.73472,0,0,.89444],223:[0,.69444,0,0,.59722],230:[0,.44444,0,0,.83055],247:[.13333,.63333,0,0,.89444],248:[.09722,.54167,0,0,.575],305:[0,.44444,0,0,.31944],338:[0,.68611,0,0,1.16944],339:[0,.44444,0,0,.89444],567:[.19444,.44444,0,0,.35139],710:[0,.69444,0,0,.575],711:[0,.63194,0,0,.575],713:[0,.59611,0,0,.575],714:[0,.69444,0,0,.575],715:[0,.69444,0,0,.575],728:[0,.69444,0,0,.575],729:[0,.69444,0,0,.31944],730:[0,.69444,0,0,.86944],732:[0,.69444,0,0,.575],733:[0,.69444,0,0,.575],915:[0,.68611,0,0,.69166],916:[0,.68611,0,0,.95833],920:[0,.68611,0,0,.89444],923:[0,.68611,0,0,.80555],926:[0,.68611,0,0,.76666],928:[0,.68611,0,0,.9],931:[0,.68611,0,0,.83055],933:[0,.68611,0,0,.89444],934:[0,.68611,0,0,.83055],936:[0,.68611,0,0,.89444],937:[0,.68611,0,0,.83055],8211:[0,.44444,.03194,0,.575],8212:[0,.44444,.03194,0,1.14999],8216:[0,.69444,0,0,.31944],8217:[0,.69444,0,0,.31944],8220:[0,.69444,0,0,.60278],8221:[0,.69444,0,0,.60278],8224:[.19444,.69444,0,0,.51111],8225:[.19444,.69444,0,0,.51111],8242:[0,.55556,0,0,.34444],8407:[0,.72444,.15486,0,.575],8463:[0,.69444,0,0,.66759],8465:[0,.69444,0,0,.83055],8467:[0,.69444,0,0,.47361],8472:[.19444,.44444,0,0,.74027],8476:[0,.69444,0,0,.83055],8501:[0,.69444,0,0,.70277],8592:[-.10889,.39111,0,0,1.14999],8593:[.19444,.69444,0,0,.575],8594:[-.10889,.39111,0,0,1.14999],8595:[.19444,.69444,0,0,.575],8596:[-.10889,.39111,0,0,1.14999],8597:[.25,.75,0,0,.575],8598:[.19444,.69444,0,0,1.14999],8599:[.19444,.69444,0,0,1.14999],8600:[.19444,.69444,0,0,1.14999],8601:[.19444,.69444,0,0,1.14999],8636:[-.10889,.39111,0,0,1.14999],8637:[-.10889,.39111,0,0,1.14999],8640:[-.10889,.39111,0,0,1.14999],8641:[-.10889,.39111,0,0,1.14999],8656:[-.10889,.39111,0,0,1.14999],8657:[.19444,.69444,0,0,.70277],8658:[-.10889,.39111,0,0,1.14999],8659:[.19444,.69444,0,0,.70277],8660:[-.10889,.39111,0,0,1.14999],8661:[.25,.75,0,0,.70277],8704:[0,.69444,0,0,.63889],8706:[0,.69444,.06389,0,.62847],8707:[0,.69444,0,0,.63889],8709:[.05556,.75,0,0,.575],8711:[0,.68611,0,0,.95833],8712:[.08556,.58556,0,0,.76666],8715:[.08556,.58556,0,0,.76666],8722:[.13333,.63333,0,0,.89444],8723:[.13333,.63333,0,0,.89444],8725:[.25,.75,0,0,.575],8726:[.25,.75,0,0,.575],8727:[-.02778,.47222,0,0,.575],8728:[-.02639,.47361,0,0,.575],8729:[-.02639,.47361,0,0,.575],8730:[.18,.82,0,0,.95833],8733:[0,.44444,0,0,.89444],8734:[0,.44444,0,0,1.14999],8736:[0,.69224,0,0,.72222],8739:[.25,.75,0,0,.31944],8741:[.25,.75,0,0,.575],8743:[0,.55556,0,0,.76666],8744:[0,.55556,0,0,.76666],8745:[0,.55556,0,0,.76666],8746:[0,.55556,0,0,.76666],8747:[.19444,.69444,.12778,0,.56875],8764:[-.10889,.39111,0,0,.89444],8768:[.19444,.69444,0,0,.31944],8771:[.00222,.50222,0,0,.89444],8773:[.027,.638,0,0,.894],8776:[.02444,.52444,0,0,.89444],8781:[.00222,.50222,0,0,.89444],8801:[.00222,.50222,0,0,.89444],8804:[.19667,.69667,0,0,.89444],8805:[.19667,.69667,0,0,.89444],8810:[.08556,.58556,0,0,1.14999],8811:[.08556,.58556,0,0,1.14999],8826:[.08556,.58556,0,0,.89444],8827:[.08556,.58556,0,0,.89444],8834:[.08556,.58556,0,0,.89444],8835:[.08556,.58556,0,0,.89444],8838:[.19667,.69667,0,0,.89444],8839:[.19667,.69667,0,0,.89444],8846:[0,.55556,0,0,.76666],8849:[.19667,.69667,0,0,.89444],8850:[.19667,.69667,0,0,.89444],8851:[0,.55556,0,0,.76666],8852:[0,.55556,0,0,.76666],8853:[.13333,.63333,0,0,.89444],8854:[.13333,.63333,0,0,.89444],8855:[.13333,.63333,0,0,.89444],8856:[.13333,.63333,0,0,.89444],8857:[.13333,.63333,0,0,.89444],8866:[0,.69444,0,0,.70277],8867:[0,.69444,0,0,.70277],8868:[0,.69444,0,0,.89444],8869:[0,.69444,0,0,.89444],8900:[-.02639,.47361,0,0,.575],8901:[-.02639,.47361,0,0,.31944],8902:[-.02778,.47222,0,0,.575],8968:[.25,.75,0,0,.51111],8969:[.25,.75,0,0,.51111],8970:[.25,.75,0,0,.51111],8971:[.25,.75,0,0,.51111],8994:[-.13889,.36111,0,0,1.14999],8995:[-.13889,.36111,0,0,1.14999],9651:[.19444,.69444,0,0,1.02222],9657:[-.02778,.47222,0,0,.575],9661:[.19444,.69444,0,0,1.02222],9667:[-.02778,.47222,0,0,.575],9711:[.19444,.69444,0,0,1.14999],9824:[.12963,.69444,0,0,.89444],9825:[.12963,.69444,0,0,.89444],9826:[.12963,.69444,0,0,.89444],9827:[.12963,.69444,0,0,.89444],9837:[0,.75,0,0,.44722],9838:[.19444,.69444,0,0,.44722],9839:[.19444,.69444,0,0,.44722],10216:[.25,.75,0,0,.44722],10217:[.25,.75,0,0,.44722],10815:[0,.68611,0,0,.9],10927:[.19667,.69667,0,0,.89444],10928:[.19667,.69667,0,0,.89444],57376:[.19444,.69444,0,0,0]},"Main-BoldItalic":{32:[0,0,0,0,.25],33:[0,.69444,.11417,0,.38611],34:[0,.69444,.07939,0,.62055],35:[.19444,.69444,.06833,0,.94444],37:[.05556,.75,.12861,0,.94444],38:[0,.69444,.08528,0,.88555],39:[0,.69444,.12945,0,.35555],40:[.25,.75,.15806,0,.47333],41:[.25,.75,.03306,0,.47333],42:[0,.75,.14333,0,.59111],43:[.10333,.60333,.03306,0,.88555],44:[.19444,.14722,0,0,.35555],45:[0,.44444,.02611,0,.41444],46:[0,.14722,0,0,.35555],47:[.25,.75,.15806,0,.59111],48:[0,.64444,.13167,0,.59111],49:[0,.64444,.13167,0,.59111],50:[0,.64444,.13167,0,.59111],51:[0,.64444,.13167,0,.59111],52:[.19444,.64444,.13167,0,.59111],53:[0,.64444,.13167,0,.59111],54:[0,.64444,.13167,0,.59111],55:[.19444,.64444,.13167,0,.59111],56:[0,.64444,.13167,0,.59111],57:[0,.64444,.13167,0,.59111],58:[0,.44444,.06695,0,.35555],59:[.19444,.44444,.06695,0,.35555],61:[-.10889,.39111,.06833,0,.88555],63:[0,.69444,.11472,0,.59111],64:[0,.69444,.09208,0,.88555],65:[0,.68611,0,0,.86555],66:[0,.68611,.0992,0,.81666],67:[0,.68611,.14208,0,.82666],68:[0,.68611,.09062,0,.87555],69:[0,.68611,.11431,0,.75666],70:[0,.68611,.12903,0,.72722],71:[0,.68611,.07347,0,.89527],72:[0,.68611,.17208,0,.8961],73:[0,.68611,.15681,0,.47166],74:[0,.68611,.145,0,.61055],75:[0,.68611,.14208,0,.89499],76:[0,.68611,0,0,.69777],77:[0,.68611,.17208,0,1.07277],78:[0,.68611,.17208,0,.8961],79:[0,.68611,.09062,0,.85499],80:[0,.68611,.0992,0,.78721],81:[.19444,.68611,.09062,0,.85499],82:[0,.68611,.02559,0,.85944],83:[0,.68611,.11264,0,.64999],84:[0,.68611,.12903,0,.7961],85:[0,.68611,.17208,0,.88083],86:[0,.68611,.18625,0,.86555],87:[0,.68611,.18625,0,1.15999],88:[0,.68611,.15681,0,.86555],89:[0,.68611,.19803,0,.86555],90:[0,.68611,.14208,0,.70888],91:[.25,.75,.1875,0,.35611],93:[.25,.75,.09972,0,.35611],94:[0,.69444,.06709,0,.59111],95:[.31,.13444,.09811,0,.59111],97:[0,.44444,.09426,0,.59111],98:[0,.69444,.07861,0,.53222],99:[0,.44444,.05222,0,.53222],100:[0,.69444,.10861,0,.59111],101:[0,.44444,.085,0,.53222],102:[.19444,.69444,.21778,0,.4],103:[.19444,.44444,.105,0,.53222],104:[0,.69444,.09426,0,.59111],105:[0,.69326,.11387,0,.35555],106:[.19444,.69326,.1672,0,.35555],107:[0,.69444,.11111,0,.53222],108:[0,.69444,.10861,0,.29666],109:[0,.44444,.09426,0,.94444],110:[0,.44444,.09426,0,.64999],111:[0,.44444,.07861,0,.59111],112:[.19444,.44444,.07861,0,.59111],113:[.19444,.44444,.105,0,.53222],114:[0,.44444,.11111,0,.50167],115:[0,.44444,.08167,0,.48694],116:[0,.63492,.09639,0,.385],117:[0,.44444,.09426,0,.62055],118:[0,.44444,.11111,0,.53222],119:[0,.44444,.11111,0,.76777],120:[0,.44444,.12583,0,.56055],121:[.19444,.44444,.105,0,.56166],122:[0,.44444,.13889,0,.49055],126:[.35,.34444,.11472,0,.59111],160:[0,0,0,0,.25],168:[0,.69444,.11473,0,.59111],176:[0,.69444,0,0,.94888],184:[.17014,0,0,0,.53222],198:[0,.68611,.11431,0,1.02277],216:[.04861,.73472,.09062,0,.88555],223:[.19444,.69444,.09736,0,.665],230:[0,.44444,.085,0,.82666],248:[.09722,.54167,.09458,0,.59111],305:[0,.44444,.09426,0,.35555],338:[0,.68611,.11431,0,1.14054],339:[0,.44444,.085,0,.82666],567:[.19444,.44444,.04611,0,.385],710:[0,.69444,.06709,0,.59111],711:[0,.63194,.08271,0,.59111],713:[0,.59444,.10444,0,.59111],714:[0,.69444,.08528,0,.59111],715:[0,.69444,0,0,.59111],728:[0,.69444,.10333,0,.59111],729:[0,.69444,.12945,0,.35555],730:[0,.69444,0,0,.94888],732:[0,.69444,.11472,0,.59111],733:[0,.69444,.11472,0,.59111],915:[0,.68611,.12903,0,.69777],916:[0,.68611,0,0,.94444],920:[0,.68611,.09062,0,.88555],923:[0,.68611,0,0,.80666],926:[0,.68611,.15092,0,.76777],928:[0,.68611,.17208,0,.8961],931:[0,.68611,.11431,0,.82666],933:[0,.68611,.10778,0,.88555],934:[0,.68611,.05632,0,.82666],936:[0,.68611,.10778,0,.88555],937:[0,.68611,.0992,0,.82666],8211:[0,.44444,.09811,0,.59111],8212:[0,.44444,.09811,0,1.18221],8216:[0,.69444,.12945,0,.35555],8217:[0,.69444,.12945,0,.35555],8220:[0,.69444,.16772,0,.62055],8221:[0,.69444,.07939,0,.62055]},"Main-Italic":{32:[0,0,0,0,.25],33:[0,.69444,.12417,0,.30667],34:[0,.69444,.06961,0,.51444],35:[.19444,.69444,.06616,0,.81777],37:[.05556,.75,.13639,0,.81777],38:[0,.69444,.09694,0,.76666],39:[0,.69444,.12417,0,.30667],40:[.25,.75,.16194,0,.40889],41:[.25,.75,.03694,0,.40889],42:[0,.75,.14917,0,.51111],43:[.05667,.56167,.03694,0,.76666],44:[.19444,.10556,0,0,.30667],45:[0,.43056,.02826,0,.35778],46:[0,.10556,0,0,.30667],47:[.25,.75,.16194,0,.51111],48:[0,.64444,.13556,0,.51111],49:[0,.64444,.13556,0,.51111],50:[0,.64444,.13556,0,.51111],51:[0,.64444,.13556,0,.51111],52:[.19444,.64444,.13556,0,.51111],53:[0,.64444,.13556,0,.51111],54:[0,.64444,.13556,0,.51111],55:[.19444,.64444,.13556,0,.51111],56:[0,.64444,.13556,0,.51111],57:[0,.64444,.13556,0,.51111],58:[0,.43056,.0582,0,.30667],59:[.19444,.43056,.0582,0,.30667],61:[-.13313,.36687,.06616,0,.76666],63:[0,.69444,.1225,0,.51111],64:[0,.69444,.09597,0,.76666],65:[0,.68333,0,0,.74333],66:[0,.68333,.10257,0,.70389],67:[0,.68333,.14528,0,.71555],68:[0,.68333,.09403,0,.755],69:[0,.68333,.12028,0,.67833],70:[0,.68333,.13305,0,.65277],71:[0,.68333,.08722,0,.77361],72:[0,.68333,.16389,0,.74333],73:[0,.68333,.15806,0,.38555],74:[0,.68333,.14028,0,.525],75:[0,.68333,.14528,0,.76888],76:[0,.68333,0,0,.62722],77:[0,.68333,.16389,0,.89666],78:[0,.68333,.16389,0,.74333],79:[0,.68333,.09403,0,.76666],80:[0,.68333,.10257,0,.67833],81:[.19444,.68333,.09403,0,.76666],82:[0,.68333,.03868,0,.72944],83:[0,.68333,.11972,0,.56222],84:[0,.68333,.13305,0,.71555],85:[0,.68333,.16389,0,.74333],86:[0,.68333,.18361,0,.74333],87:[0,.68333,.18361,0,.99888],88:[0,.68333,.15806,0,.74333],89:[0,.68333,.19383,0,.74333],90:[0,.68333,.14528,0,.61333],91:[.25,.75,.1875,0,.30667],93:[.25,.75,.10528,0,.30667],94:[0,.69444,.06646,0,.51111],95:[.31,.12056,.09208,0,.51111],97:[0,.43056,.07671,0,.51111],98:[0,.69444,.06312,0,.46],99:[0,.43056,.05653,0,.46],100:[0,.69444,.10333,0,.51111],101:[0,.43056,.07514,0,.46],102:[.19444,.69444,.21194,0,.30667],103:[.19444,.43056,.08847,0,.46],104:[0,.69444,.07671,0,.51111],105:[0,.65536,.1019,0,.30667],106:[.19444,.65536,.14467,0,.30667],107:[0,.69444,.10764,0,.46],108:[0,.69444,.10333,0,.25555],109:[0,.43056,.07671,0,.81777],110:[0,.43056,.07671,0,.56222],111:[0,.43056,.06312,0,.51111],112:[.19444,.43056,.06312,0,.51111],113:[.19444,.43056,.08847,0,.46],114:[0,.43056,.10764,0,.42166],115:[0,.43056,.08208,0,.40889],116:[0,.61508,.09486,0,.33222],117:[0,.43056,.07671,0,.53666],118:[0,.43056,.10764,0,.46],119:[0,.43056,.10764,0,.66444],120:[0,.43056,.12042,0,.46389],121:[.19444,.43056,.08847,0,.48555],122:[0,.43056,.12292,0,.40889],126:[.35,.31786,.11585,0,.51111],160:[0,0,0,0,.25],168:[0,.66786,.10474,0,.51111],176:[0,.69444,0,0,.83129],184:[.17014,0,0,0,.46],198:[0,.68333,.12028,0,.88277],216:[.04861,.73194,.09403,0,.76666],223:[.19444,.69444,.10514,0,.53666],230:[0,.43056,.07514,0,.71555],248:[.09722,.52778,.09194,0,.51111],338:[0,.68333,.12028,0,.98499],339:[0,.43056,.07514,0,.71555],710:[0,.69444,.06646,0,.51111],711:[0,.62847,.08295,0,.51111],713:[0,.56167,.10333,0,.51111],714:[0,.69444,.09694,0,.51111],715:[0,.69444,0,0,.51111],728:[0,.69444,.10806,0,.51111],729:[0,.66786,.11752,0,.30667],730:[0,.69444,0,0,.83129],732:[0,.66786,.11585,0,.51111],733:[0,.69444,.1225,0,.51111],915:[0,.68333,.13305,0,.62722],916:[0,.68333,0,0,.81777],920:[0,.68333,.09403,0,.76666],923:[0,.68333,0,0,.69222],926:[0,.68333,.15294,0,.66444],928:[0,.68333,.16389,0,.74333],931:[0,.68333,.12028,0,.71555],933:[0,.68333,.11111,0,.76666],934:[0,.68333,.05986,0,.71555],936:[0,.68333,.11111,0,.76666],937:[0,.68333,.10257,0,.71555],8211:[0,.43056,.09208,0,.51111],8212:[0,.43056,.09208,0,1.02222],8216:[0,.69444,.12417,0,.30667],8217:[0,.69444,.12417,0,.30667],8220:[0,.69444,.1685,0,.51444],8221:[0,.69444,.06961,0,.51444],8463:[0,.68889,0,0,.54028]},"Main-Regular":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.27778],34:[0,.69444,0,0,.5],35:[.19444,.69444,0,0,.83334],36:[.05556,.75,0,0,.5],37:[.05556,.75,0,0,.83334],38:[0,.69444,0,0,.77778],39:[0,.69444,0,0,.27778],40:[.25,.75,0,0,.38889],41:[.25,.75,0,0,.38889],42:[0,.75,0,0,.5],43:[.08333,.58333,0,0,.77778],44:[.19444,.10556,0,0,.27778],45:[0,.43056,0,0,.33333],46:[0,.10556,0,0,.27778],47:[.25,.75,0,0,.5],48:[0,.64444,0,0,.5],49:[0,.64444,0,0,.5],50:[0,.64444,0,0,.5],51:[0,.64444,0,0,.5],52:[0,.64444,0,0,.5],53:[0,.64444,0,0,.5],54:[0,.64444,0,0,.5],55:[0,.64444,0,0,.5],56:[0,.64444,0,0,.5],57:[0,.64444,0,0,.5],58:[0,.43056,0,0,.27778],59:[.19444,.43056,0,0,.27778],60:[.0391,.5391,0,0,.77778],61:[-.13313,.36687,0,0,.77778],62:[.0391,.5391,0,0,.77778],63:[0,.69444,0,0,.47222],64:[0,.69444,0,0,.77778],65:[0,.68333,0,0,.75],66:[0,.68333,0,0,.70834],67:[0,.68333,0,0,.72222],68:[0,.68333,0,0,.76389],69:[0,.68333,0,0,.68056],70:[0,.68333,0,0,.65278],71:[0,.68333,0,0,.78472],72:[0,.68333,0,0,.75],73:[0,.68333,0,0,.36111],74:[0,.68333,0,0,.51389],75:[0,.68333,0,0,.77778],76:[0,.68333,0,0,.625],77:[0,.68333,0,0,.91667],78:[0,.68333,0,0,.75],79:[0,.68333,0,0,.77778],80:[0,.68333,0,0,.68056],81:[.19444,.68333,0,0,.77778],82:[0,.68333,0,0,.73611],83:[0,.68333,0,0,.55556],84:[0,.68333,0,0,.72222],85:[0,.68333,0,0,.75],86:[0,.68333,.01389,0,.75],87:[0,.68333,.01389,0,1.02778],88:[0,.68333,0,0,.75],89:[0,.68333,.025,0,.75],90:[0,.68333,0,0,.61111],91:[.25,.75,0,0,.27778],92:[.25,.75,0,0,.5],93:[.25,.75,0,0,.27778],94:[0,.69444,0,0,.5],95:[.31,.12056,.02778,0,.5],97:[0,.43056,0,0,.5],98:[0,.69444,0,0,.55556],99:[0,.43056,0,0,.44445],100:[0,.69444,0,0,.55556],101:[0,.43056,0,0,.44445],102:[0,.69444,.07778,0,.30556],103:[.19444,.43056,.01389,0,.5],104:[0,.69444,0,0,.55556],105:[0,.66786,0,0,.27778],106:[.19444,.66786,0,0,.30556],107:[0,.69444,0,0,.52778],108:[0,.69444,0,0,.27778],109:[0,.43056,0,0,.83334],110:[0,.43056,0,0,.55556],111:[0,.43056,0,0,.5],112:[.19444,.43056,0,0,.55556],113:[.19444,.43056,0,0,.52778],114:[0,.43056,0,0,.39167],115:[0,.43056,0,0,.39445],116:[0,.61508,0,0,.38889],117:[0,.43056,0,0,.55556],118:[0,.43056,.01389,0,.52778],119:[0,.43056,.01389,0,.72222],120:[0,.43056,0,0,.52778],121:[.19444,.43056,.01389,0,.52778],122:[0,.43056,0,0,.44445],123:[.25,.75,0,0,.5],124:[.25,.75,0,0,.27778],125:[.25,.75,0,0,.5],126:[.35,.31786,0,0,.5],160:[0,0,0,0,.25],163:[0,.69444,0,0,.76909],167:[.19444,.69444,0,0,.44445],168:[0,.66786,0,0,.5],172:[0,.43056,0,0,.66667],176:[0,.69444,0,0,.75],177:[.08333,.58333,0,0,.77778],182:[.19444,.69444,0,0,.61111],184:[.17014,0,0,0,.44445],198:[0,.68333,0,0,.90278],215:[.08333,.58333,0,0,.77778],216:[.04861,.73194,0,0,.77778],223:[0,.69444,0,0,.5],230:[0,.43056,0,0,.72222],247:[.08333,.58333,0,0,.77778],248:[.09722,.52778,0,0,.5],305:[0,.43056,0,0,.27778],338:[0,.68333,0,0,1.01389],339:[0,.43056,0,0,.77778],567:[.19444,.43056,0,0,.30556],710:[0,.69444,0,0,.5],711:[0,.62847,0,0,.5],713:[0,.56778,0,0,.5],714:[0,.69444,0,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,0,0,.5],729:[0,.66786,0,0,.27778],730:[0,.69444,0,0,.75],732:[0,.66786,0,0,.5],733:[0,.69444,0,0,.5],915:[0,.68333,0,0,.625],916:[0,.68333,0,0,.83334],920:[0,.68333,0,0,.77778],923:[0,.68333,0,0,.69445],926:[0,.68333,0,0,.66667],928:[0,.68333,0,0,.75],931:[0,.68333,0,0,.72222],933:[0,.68333,0,0,.77778],934:[0,.68333,0,0,.72222],936:[0,.68333,0,0,.77778],937:[0,.68333,0,0,.72222],8211:[0,.43056,.02778,0,.5],8212:[0,.43056,.02778,0,1],8216:[0,.69444,0,0,.27778],8217:[0,.69444,0,0,.27778],8220:[0,.69444,0,0,.5],8221:[0,.69444,0,0,.5],8224:[.19444,.69444,0,0,.44445],8225:[.19444,.69444,0,0,.44445],8230:[0,.123,0,0,1.172],8242:[0,.55556,0,0,.275],8407:[0,.71444,.15382,0,.5],8463:[0,.68889,0,0,.54028],8465:[0,.69444,0,0,.72222],8467:[0,.69444,0,.11111,.41667],8472:[.19444,.43056,0,.11111,.63646],8476:[0,.69444,0,0,.72222],8501:[0,.69444,0,0,.61111],8592:[-.13313,.36687,0,0,1],8593:[.19444,.69444,0,0,.5],8594:[-.13313,.36687,0,0,1],8595:[.19444,.69444,0,0,.5],8596:[-.13313,.36687,0,0,1],8597:[.25,.75,0,0,.5],8598:[.19444,.69444,0,0,1],8599:[.19444,.69444,0,0,1],8600:[.19444,.69444,0,0,1],8601:[.19444,.69444,0,0,1],8614:[.011,.511,0,0,1],8617:[.011,.511,0,0,1.126],8618:[.011,.511,0,0,1.126],8636:[-.13313,.36687,0,0,1],8637:[-.13313,.36687,0,0,1],8640:[-.13313,.36687,0,0,1],8641:[-.13313,.36687,0,0,1],8652:[.011,.671,0,0,1],8656:[-.13313,.36687,0,0,1],8657:[.19444,.69444,0,0,.61111],8658:[-.13313,.36687,0,0,1],8659:[.19444,.69444,0,0,.61111],8660:[-.13313,.36687,0,0,1],8661:[.25,.75,0,0,.61111],8704:[0,.69444,0,0,.55556],8706:[0,.69444,.05556,.08334,.5309],8707:[0,.69444,0,0,.55556],8709:[.05556,.75,0,0,.5],8711:[0,.68333,0,0,.83334],8712:[.0391,.5391,0,0,.66667],8715:[.0391,.5391,0,0,.66667],8722:[.08333,.58333,0,0,.77778],8723:[.08333,.58333,0,0,.77778],8725:[.25,.75,0,0,.5],8726:[.25,.75,0,0,.5],8727:[-.03472,.46528,0,0,.5],8728:[-.05555,.44445,0,0,.5],8729:[-.05555,.44445,0,0,.5],8730:[.2,.8,0,0,.83334],8733:[0,.43056,0,0,.77778],8734:[0,.43056,0,0,1],8736:[0,.69224,0,0,.72222],8739:[.25,.75,0,0,.27778],8741:[.25,.75,0,0,.5],8743:[0,.55556,0,0,.66667],8744:[0,.55556,0,0,.66667],8745:[0,.55556,0,0,.66667],8746:[0,.55556,0,0,.66667],8747:[.19444,.69444,.11111,0,.41667],8764:[-.13313,.36687,0,0,.77778],8768:[.19444,.69444,0,0,.27778],8771:[-.03625,.46375,0,0,.77778],8773:[-.022,.589,0,0,.778],8776:[-.01688,.48312,0,0,.77778],8781:[-.03625,.46375,0,0,.77778],8784:[-.133,.673,0,0,.778],8801:[-.03625,.46375,0,0,.77778],8804:[.13597,.63597,0,0,.77778],8805:[.13597,.63597,0,0,.77778],8810:[.0391,.5391,0,0,1],8811:[.0391,.5391,0,0,1],8826:[.0391,.5391,0,0,.77778],8827:[.0391,.5391,0,0,.77778],8834:[.0391,.5391,0,0,.77778],8835:[.0391,.5391,0,0,.77778],8838:[.13597,.63597,0,0,.77778],8839:[.13597,.63597,0,0,.77778],8846:[0,.55556,0,0,.66667],8849:[.13597,.63597,0,0,.77778],8850:[.13597,.63597,0,0,.77778],8851:[0,.55556,0,0,.66667],8852:[0,.55556,0,0,.66667],8853:[.08333,.58333,0,0,.77778],8854:[.08333,.58333,0,0,.77778],8855:[.08333,.58333,0,0,.77778],8856:[.08333,.58333,0,0,.77778],8857:[.08333,.58333,0,0,.77778],8866:[0,.69444,0,0,.61111],8867:[0,.69444,0,0,.61111],8868:[0,.69444,0,0,.77778],8869:[0,.69444,0,0,.77778],8872:[.249,.75,0,0,.867],8900:[-.05555,.44445,0,0,.5],8901:[-.05555,.44445,0,0,.27778],8902:[-.03472,.46528,0,0,.5],8904:[.005,.505,0,0,.9],8942:[.03,.903,0,0,.278],8943:[-.19,.313,0,0,1.172],8945:[-.1,.823,0,0,1.282],8968:[.25,.75,0,0,.44445],8969:[.25,.75,0,0,.44445],8970:[.25,.75,0,0,.44445],8971:[.25,.75,0,0,.44445],8994:[-.14236,.35764,0,0,1],8995:[-.14236,.35764,0,0,1],9136:[.244,.744,0,0,.412],9137:[.244,.745,0,0,.412],9651:[.19444,.69444,0,0,.88889],9657:[-.03472,.46528,0,0,.5],9661:[.19444,.69444,0,0,.88889],9667:[-.03472,.46528,0,0,.5],9711:[.19444,.69444,0,0,1],9824:[.12963,.69444,0,0,.77778],9825:[.12963,.69444,0,0,.77778],9826:[.12963,.69444,0,0,.77778],9827:[.12963,.69444,0,0,.77778],9837:[0,.75,0,0,.38889],9838:[.19444,.69444,0,0,.38889],9839:[.19444,.69444,0,0,.38889],10216:[.25,.75,0,0,.38889],10217:[.25,.75,0,0,.38889],10222:[.244,.744,0,0,.412],10223:[.244,.745,0,0,.412],10229:[.011,.511,0,0,1.609],10230:[.011,.511,0,0,1.638],10231:[.011,.511,0,0,1.859],10232:[.024,.525,0,0,1.609],10233:[.024,.525,0,0,1.638],10234:[.024,.525,0,0,1.858],10236:[.011,.511,0,0,1.638],10815:[0,.68333,0,0,.75],10927:[.13597,.63597,0,0,.77778],10928:[.13597,.63597,0,0,.77778],57376:[.19444,.69444,0,0,0]},"Math-BoldItalic":{32:[0,0,0,0,.25],48:[0,.44444,0,0,.575],49:[0,.44444,0,0,.575],50:[0,.44444,0,0,.575],51:[.19444,.44444,0,0,.575],52:[.19444,.44444,0,0,.575],53:[.19444,.44444,0,0,.575],54:[0,.64444,0,0,.575],55:[.19444,.44444,0,0,.575],56:[0,.64444,0,0,.575],57:[.19444,.44444,0,0,.575],65:[0,.68611,0,0,.86944],66:[0,.68611,.04835,0,.8664],67:[0,.68611,.06979,0,.81694],68:[0,.68611,.03194,0,.93812],69:[0,.68611,.05451,0,.81007],70:[0,.68611,.15972,0,.68889],71:[0,.68611,0,0,.88673],72:[0,.68611,.08229,0,.98229],73:[0,.68611,.07778,0,.51111],74:[0,.68611,.10069,0,.63125],75:[0,.68611,.06979,0,.97118],76:[0,.68611,0,0,.75555],77:[0,.68611,.11424,0,1.14201],78:[0,.68611,.11424,0,.95034],79:[0,.68611,.03194,0,.83666],80:[0,.68611,.15972,0,.72309],81:[.19444,.68611,0,0,.86861],82:[0,.68611,.00421,0,.87235],83:[0,.68611,.05382,0,.69271],84:[0,.68611,.15972,0,.63663],85:[0,.68611,.11424,0,.80027],86:[0,.68611,.25555,0,.67778],87:[0,.68611,.15972,0,1.09305],88:[0,.68611,.07778,0,.94722],89:[0,.68611,.25555,0,.67458],90:[0,.68611,.06979,0,.77257],97:[0,.44444,0,0,.63287],98:[0,.69444,0,0,.52083],99:[0,.44444,0,0,.51342],100:[0,.69444,0,0,.60972],101:[0,.44444,0,0,.55361],102:[.19444,.69444,.11042,0,.56806],103:[.19444,.44444,.03704,0,.5449],104:[0,.69444,0,0,.66759],105:[0,.69326,0,0,.4048],106:[.19444,.69326,.0622,0,.47083],107:[0,.69444,.01852,0,.6037],108:[0,.69444,.0088,0,.34815],109:[0,.44444,0,0,1.0324],110:[0,.44444,0,0,.71296],111:[0,.44444,0,0,.58472],112:[.19444,.44444,0,0,.60092],113:[.19444,.44444,.03704,0,.54213],114:[0,.44444,.03194,0,.5287],115:[0,.44444,0,0,.53125],116:[0,.63492,0,0,.41528],117:[0,.44444,0,0,.68102],118:[0,.44444,.03704,0,.56666],119:[0,.44444,.02778,0,.83148],120:[0,.44444,0,0,.65903],121:[.19444,.44444,.03704,0,.59028],122:[0,.44444,.04213,0,.55509],160:[0,0,0,0,.25],915:[0,.68611,.15972,0,.65694],916:[0,.68611,0,0,.95833],920:[0,.68611,.03194,0,.86722],923:[0,.68611,0,0,.80555],926:[0,.68611,.07458,0,.84125],928:[0,.68611,.08229,0,.98229],931:[0,.68611,.05451,0,.88507],933:[0,.68611,.15972,0,.67083],934:[0,.68611,0,0,.76666],936:[0,.68611,.11653,0,.71402],937:[0,.68611,.04835,0,.8789],945:[0,.44444,0,0,.76064],946:[.19444,.69444,.03403,0,.65972],947:[.19444,.44444,.06389,0,.59003],948:[0,.69444,.03819,0,.52222],949:[0,.44444,0,0,.52882],950:[.19444,.69444,.06215,0,.50833],951:[.19444,.44444,.03704,0,.6],952:[0,.69444,.03194,0,.5618],953:[0,.44444,0,0,.41204],954:[0,.44444,0,0,.66759],955:[0,.69444,0,0,.67083],956:[.19444,.44444,0,0,.70787],957:[0,.44444,.06898,0,.57685],958:[.19444,.69444,.03021,0,.50833],959:[0,.44444,0,0,.58472],960:[0,.44444,.03704,0,.68241],961:[.19444,.44444,0,0,.6118],962:[.09722,.44444,.07917,0,.42361],963:[0,.44444,.03704,0,.68588],964:[0,.44444,.13472,0,.52083],965:[0,.44444,.03704,0,.63055],966:[.19444,.44444,0,0,.74722],967:[.19444,.44444,0,0,.71805],968:[.19444,.69444,.03704,0,.75833],969:[0,.44444,.03704,0,.71782],977:[0,.69444,0,0,.69155],981:[.19444,.69444,0,0,.7125],982:[0,.44444,.03194,0,.975],1009:[.19444,.44444,0,0,.6118],1013:[0,.44444,0,0,.48333],57649:[0,.44444,0,0,.39352],57911:[.19444,.44444,0,0,.43889]},"Math-Italic":{32:[0,0,0,0,.25],48:[0,.43056,0,0,.5],49:[0,.43056,0,0,.5],50:[0,.43056,0,0,.5],51:[.19444,.43056,0,0,.5],52:[.19444,.43056,0,0,.5],53:[.19444,.43056,0,0,.5],54:[0,.64444,0,0,.5],55:[.19444,.43056,0,0,.5],56:[0,.64444,0,0,.5],57:[.19444,.43056,0,0,.5],65:[0,.68333,0,.13889,.75],66:[0,.68333,.05017,.08334,.75851],67:[0,.68333,.07153,.08334,.71472],68:[0,.68333,.02778,.05556,.82792],69:[0,.68333,.05764,.08334,.7382],70:[0,.68333,.13889,.08334,.64306],71:[0,.68333,0,.08334,.78625],72:[0,.68333,.08125,.05556,.83125],73:[0,.68333,.07847,.11111,.43958],74:[0,.68333,.09618,.16667,.55451],75:[0,.68333,.07153,.05556,.84931],76:[0,.68333,0,.02778,.68056],77:[0,.68333,.10903,.08334,.97014],78:[0,.68333,.10903,.08334,.80347],79:[0,.68333,.02778,.08334,.76278],80:[0,.68333,.13889,.08334,.64201],81:[.19444,.68333,0,.08334,.79056],82:[0,.68333,.00773,.08334,.75929],83:[0,.68333,.05764,.08334,.6132],84:[0,.68333,.13889,.08334,.58438],85:[0,.68333,.10903,.02778,.68278],86:[0,.68333,.22222,0,.58333],87:[0,.68333,.13889,0,.94445],88:[0,.68333,.07847,.08334,.82847],89:[0,.68333,.22222,0,.58056],90:[0,.68333,.07153,.08334,.68264],97:[0,.43056,0,0,.52859],98:[0,.69444,0,0,.42917],99:[0,.43056,0,.05556,.43276],100:[0,.69444,0,.16667,.52049],101:[0,.43056,0,.05556,.46563],102:[.19444,.69444,.10764,.16667,.48959],103:[.19444,.43056,.03588,.02778,.47697],104:[0,.69444,0,0,.57616],105:[0,.65952,0,0,.34451],106:[.19444,.65952,.05724,0,.41181],107:[0,.69444,.03148,0,.5206],108:[0,.69444,.01968,.08334,.29838],109:[0,.43056,0,0,.87801],110:[0,.43056,0,0,.60023],111:[0,.43056,0,.05556,.48472],112:[.19444,.43056,0,.08334,.50313],113:[.19444,.43056,.03588,.08334,.44641],114:[0,.43056,.02778,.05556,.45116],115:[0,.43056,0,.05556,.46875],116:[0,.61508,0,.08334,.36111],117:[0,.43056,0,.02778,.57246],118:[0,.43056,.03588,.02778,.48472],119:[0,.43056,.02691,.08334,.71592],120:[0,.43056,0,.02778,.57153],121:[.19444,.43056,.03588,.05556,.49028],122:[0,.43056,.04398,.05556,.46505],160:[0,0,0,0,.25],915:[0,.68333,.13889,.08334,.61528],916:[0,.68333,0,.16667,.83334],920:[0,.68333,.02778,.08334,.76278],923:[0,.68333,0,.16667,.69445],926:[0,.68333,.07569,.08334,.74236],928:[0,.68333,.08125,.05556,.83125],931:[0,.68333,.05764,.08334,.77986],933:[0,.68333,.13889,.05556,.58333],934:[0,.68333,0,.08334,.66667],936:[0,.68333,.11,.05556,.61222],937:[0,.68333,.05017,.08334,.7724],945:[0,.43056,.0037,.02778,.6397],946:[.19444,.69444,.05278,.08334,.56563],947:[.19444,.43056,.05556,0,.51773],948:[0,.69444,.03785,.05556,.44444],949:[0,.43056,0,.08334,.46632],950:[.19444,.69444,.07378,.08334,.4375],951:[.19444,.43056,.03588,.05556,.49653],952:[0,.69444,.02778,.08334,.46944],953:[0,.43056,0,.05556,.35394],954:[0,.43056,0,0,.57616],955:[0,.69444,0,0,.58334],956:[.19444,.43056,0,.02778,.60255],957:[0,.43056,.06366,.02778,.49398],958:[.19444,.69444,.04601,.11111,.4375],959:[0,.43056,0,.05556,.48472],960:[0,.43056,.03588,0,.57003],961:[.19444,.43056,0,.08334,.51702],962:[.09722,.43056,.07986,.08334,.36285],963:[0,.43056,.03588,0,.57141],964:[0,.43056,.1132,.02778,.43715],965:[0,.43056,.03588,.02778,.54028],966:[.19444,.43056,0,.08334,.65417],967:[.19444,.43056,0,.05556,.62569],968:[.19444,.69444,.03588,.11111,.65139],969:[0,.43056,.03588,0,.62245],977:[0,.69444,0,.08334,.59144],981:[.19444,.69444,0,.08334,.59583],982:[0,.43056,.02778,0,.82813],1009:[.19444,.43056,0,.08334,.51702],1013:[0,.43056,0,.05556,.4059],57649:[0,.43056,0,.02778,.32246],57911:[.19444,.43056,0,.08334,.38403]},"SansSerif-Bold":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.36667],34:[0,.69444,0,0,.55834],35:[.19444,.69444,0,0,.91667],36:[.05556,.75,0,0,.55],37:[.05556,.75,0,0,1.02912],38:[0,.69444,0,0,.83056],39:[0,.69444,0,0,.30556],40:[.25,.75,0,0,.42778],41:[.25,.75,0,0,.42778],42:[0,.75,0,0,.55],43:[.11667,.61667,0,0,.85556],44:[.10556,.13056,0,0,.30556],45:[0,.45833,0,0,.36667],46:[0,.13056,0,0,.30556],47:[.25,.75,0,0,.55],48:[0,.69444,0,0,.55],49:[0,.69444,0,0,.55],50:[0,.69444,0,0,.55],51:[0,.69444,0,0,.55],52:[0,.69444,0,0,.55],53:[0,.69444,0,0,.55],54:[0,.69444,0,0,.55],55:[0,.69444,0,0,.55],56:[0,.69444,0,0,.55],57:[0,.69444,0,0,.55],58:[0,.45833,0,0,.30556],59:[.10556,.45833,0,0,.30556],61:[-.09375,.40625,0,0,.85556],63:[0,.69444,0,0,.51945],64:[0,.69444,0,0,.73334],65:[0,.69444,0,0,.73334],66:[0,.69444,0,0,.73334],67:[0,.69444,0,0,.70278],68:[0,.69444,0,0,.79445],69:[0,.69444,0,0,.64167],70:[0,.69444,0,0,.61111],71:[0,.69444,0,0,.73334],72:[0,.69444,0,0,.79445],73:[0,.69444,0,0,.33056],74:[0,.69444,0,0,.51945],75:[0,.69444,0,0,.76389],76:[0,.69444,0,0,.58056],77:[0,.69444,0,0,.97778],78:[0,.69444,0,0,.79445],79:[0,.69444,0,0,.79445],80:[0,.69444,0,0,.70278],81:[.10556,.69444,0,0,.79445],82:[0,.69444,0,0,.70278],83:[0,.69444,0,0,.61111],84:[0,.69444,0,0,.73334],85:[0,.69444,0,0,.76389],86:[0,.69444,.01528,0,.73334],87:[0,.69444,.01528,0,1.03889],88:[0,.69444,0,0,.73334],89:[0,.69444,.0275,0,.73334],90:[0,.69444,0,0,.67223],91:[.25,.75,0,0,.34306],93:[.25,.75,0,0,.34306],94:[0,.69444,0,0,.55],95:[.35,.10833,.03056,0,.55],97:[0,.45833,0,0,.525],98:[0,.69444,0,0,.56111],99:[0,.45833,0,0,.48889],100:[0,.69444,0,0,.56111],101:[0,.45833,0,0,.51111],102:[0,.69444,.07639,0,.33611],103:[.19444,.45833,.01528,0,.55],104:[0,.69444,0,0,.56111],105:[0,.69444,0,0,.25556],106:[.19444,.69444,0,0,.28611],107:[0,.69444,0,0,.53056],108:[0,.69444,0,0,.25556],109:[0,.45833,0,0,.86667],110:[0,.45833,0,0,.56111],111:[0,.45833,0,0,.55],112:[.19444,.45833,0,0,.56111],113:[.19444,.45833,0,0,.56111],114:[0,.45833,.01528,0,.37222],115:[0,.45833,0,0,.42167],116:[0,.58929,0,0,.40417],117:[0,.45833,0,0,.56111],118:[0,.45833,.01528,0,.5],119:[0,.45833,.01528,0,.74445],120:[0,.45833,0,0,.5],121:[.19444,.45833,.01528,0,.5],122:[0,.45833,0,0,.47639],126:[.35,.34444,0,0,.55],160:[0,0,0,0,.25],168:[0,.69444,0,0,.55],176:[0,.69444,0,0,.73334],180:[0,.69444,0,0,.55],184:[.17014,0,0,0,.48889],305:[0,.45833,0,0,.25556],567:[.19444,.45833,0,0,.28611],710:[0,.69444,0,0,.55],711:[0,.63542,0,0,.55],713:[0,.63778,0,0,.55],728:[0,.69444,0,0,.55],729:[0,.69444,0,0,.30556],730:[0,.69444,0,0,.73334],732:[0,.69444,0,0,.55],733:[0,.69444,0,0,.55],915:[0,.69444,0,0,.58056],916:[0,.69444,0,0,.91667],920:[0,.69444,0,0,.85556],923:[0,.69444,0,0,.67223],926:[0,.69444,0,0,.73334],928:[0,.69444,0,0,.79445],931:[0,.69444,0,0,.79445],933:[0,.69444,0,0,.85556],934:[0,.69444,0,0,.79445],936:[0,.69444,0,0,.85556],937:[0,.69444,0,0,.79445],8211:[0,.45833,.03056,0,.55],8212:[0,.45833,.03056,0,1.10001],8216:[0,.69444,0,0,.30556],8217:[0,.69444,0,0,.30556],8220:[0,.69444,0,0,.55834],8221:[0,.69444,0,0,.55834]},"SansSerif-Italic":{32:[0,0,0,0,.25],33:[0,.69444,.05733,0,.31945],34:[0,.69444,.00316,0,.5],35:[.19444,.69444,.05087,0,.83334],36:[.05556,.75,.11156,0,.5],37:[.05556,.75,.03126,0,.83334],38:[0,.69444,.03058,0,.75834],39:[0,.69444,.07816,0,.27778],40:[.25,.75,.13164,0,.38889],41:[.25,.75,.02536,0,.38889],42:[0,.75,.11775,0,.5],43:[.08333,.58333,.02536,0,.77778],44:[.125,.08333,0,0,.27778],45:[0,.44444,.01946,0,.33333],46:[0,.08333,0,0,.27778],47:[.25,.75,.13164,0,.5],48:[0,.65556,.11156,0,.5],49:[0,.65556,.11156,0,.5],50:[0,.65556,.11156,0,.5],51:[0,.65556,.11156,0,.5],52:[0,.65556,.11156,0,.5],53:[0,.65556,.11156,0,.5],54:[0,.65556,.11156,0,.5],55:[0,.65556,.11156,0,.5],56:[0,.65556,.11156,0,.5],57:[0,.65556,.11156,0,.5],58:[0,.44444,.02502,0,.27778],59:[.125,.44444,.02502,0,.27778],61:[-.13,.37,.05087,0,.77778],63:[0,.69444,.11809,0,.47222],64:[0,.69444,.07555,0,.66667],65:[0,.69444,0,0,.66667],66:[0,.69444,.08293,0,.66667],67:[0,.69444,.11983,0,.63889],68:[0,.69444,.07555,0,.72223],69:[0,.69444,.11983,0,.59722],70:[0,.69444,.13372,0,.56945],71:[0,.69444,.11983,0,.66667],72:[0,.69444,.08094,0,.70834],73:[0,.69444,.13372,0,.27778],74:[0,.69444,.08094,0,.47222],75:[0,.69444,.11983,0,.69445],76:[0,.69444,0,0,.54167],77:[0,.69444,.08094,0,.875],78:[0,.69444,.08094,0,.70834],79:[0,.69444,.07555,0,.73611],80:[0,.69444,.08293,0,.63889],81:[.125,.69444,.07555,0,.73611],82:[0,.69444,.08293,0,.64584],83:[0,.69444,.09205,0,.55556],84:[0,.69444,.13372,0,.68056],85:[0,.69444,.08094,0,.6875],86:[0,.69444,.1615,0,.66667],87:[0,.69444,.1615,0,.94445],88:[0,.69444,.13372,0,.66667],89:[0,.69444,.17261,0,.66667],90:[0,.69444,.11983,0,.61111],91:[.25,.75,.15942,0,.28889],93:[.25,.75,.08719,0,.28889],94:[0,.69444,.0799,0,.5],95:[.35,.09444,.08616,0,.5],97:[0,.44444,.00981,0,.48056],98:[0,.69444,.03057,0,.51667],99:[0,.44444,.08336,0,.44445],100:[0,.69444,.09483,0,.51667],101:[0,.44444,.06778,0,.44445],102:[0,.69444,.21705,0,.30556],103:[.19444,.44444,.10836,0,.5],104:[0,.69444,.01778,0,.51667],105:[0,.67937,.09718,0,.23889],106:[.19444,.67937,.09162,0,.26667],107:[0,.69444,.08336,0,.48889],108:[0,.69444,.09483,0,.23889],109:[0,.44444,.01778,0,.79445],110:[0,.44444,.01778,0,.51667],111:[0,.44444,.06613,0,.5],112:[.19444,.44444,.0389,0,.51667],113:[.19444,.44444,.04169,0,.51667],114:[0,.44444,.10836,0,.34167],115:[0,.44444,.0778,0,.38333],116:[0,.57143,.07225,0,.36111],117:[0,.44444,.04169,0,.51667],118:[0,.44444,.10836,0,.46111],119:[0,.44444,.10836,0,.68334],120:[0,.44444,.09169,0,.46111],121:[.19444,.44444,.10836,0,.46111],122:[0,.44444,.08752,0,.43472],126:[.35,.32659,.08826,0,.5],160:[0,0,0,0,.25],168:[0,.67937,.06385,0,.5],176:[0,.69444,0,0,.73752],184:[.17014,0,0,0,.44445],305:[0,.44444,.04169,0,.23889],567:[.19444,.44444,.04169,0,.26667],710:[0,.69444,.0799,0,.5],711:[0,.63194,.08432,0,.5],713:[0,.60889,.08776,0,.5],714:[0,.69444,.09205,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,.09483,0,.5],729:[0,.67937,.07774,0,.27778],730:[0,.69444,0,0,.73752],732:[0,.67659,.08826,0,.5],733:[0,.69444,.09205,0,.5],915:[0,.69444,.13372,0,.54167],916:[0,.69444,0,0,.83334],920:[0,.69444,.07555,0,.77778],923:[0,.69444,0,0,.61111],926:[0,.69444,.12816,0,.66667],928:[0,.69444,.08094,0,.70834],931:[0,.69444,.11983,0,.72222],933:[0,.69444,.09031,0,.77778],934:[0,.69444,.04603,0,.72222],936:[0,.69444,.09031,0,.77778],937:[0,.69444,.08293,0,.72222],8211:[0,.44444,.08616,0,.5],8212:[0,.44444,.08616,0,1],8216:[0,.69444,.07816,0,.27778],8217:[0,.69444,.07816,0,.27778],8220:[0,.69444,.14205,0,.5],8221:[0,.69444,.00316,0,.5]},"SansSerif-Regular":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.31945],34:[0,.69444,0,0,.5],35:[.19444,.69444,0,0,.83334],36:[.05556,.75,0,0,.5],37:[.05556,.75,0,0,.83334],38:[0,.69444,0,0,.75834],39:[0,.69444,0,0,.27778],40:[.25,.75,0,0,.38889],41:[.25,.75,0,0,.38889],42:[0,.75,0,0,.5],43:[.08333,.58333,0,0,.77778],44:[.125,.08333,0,0,.27778],45:[0,.44444,0,0,.33333],46:[0,.08333,0,0,.27778],47:[.25,.75,0,0,.5],48:[0,.65556,0,0,.5],49:[0,.65556,0,0,.5],50:[0,.65556,0,0,.5],51:[0,.65556,0,0,.5],52:[0,.65556,0,0,.5],53:[0,.65556,0,0,.5],54:[0,.65556,0,0,.5],55:[0,.65556,0,0,.5],56:[0,.65556,0,0,.5],57:[0,.65556,0,0,.5],58:[0,.44444,0,0,.27778],59:[.125,.44444,0,0,.27778],61:[-.13,.37,0,0,.77778],63:[0,.69444,0,0,.47222],64:[0,.69444,0,0,.66667],65:[0,.69444,0,0,.66667],66:[0,.69444,0,0,.66667],67:[0,.69444,0,0,.63889],68:[0,.69444,0,0,.72223],69:[0,.69444,0,0,.59722],70:[0,.69444,0,0,.56945],71:[0,.69444,0,0,.66667],72:[0,.69444,0,0,.70834],73:[0,.69444,0,0,.27778],74:[0,.69444,0,0,.47222],75:[0,.69444,0,0,.69445],76:[0,.69444,0,0,.54167],77:[0,.69444,0,0,.875],78:[0,.69444,0,0,.70834],79:[0,.69444,0,0,.73611],80:[0,.69444,0,0,.63889],81:[.125,.69444,0,0,.73611],82:[0,.69444,0,0,.64584],83:[0,.69444,0,0,.55556],84:[0,.69444,0,0,.68056],85:[0,.69444,0,0,.6875],86:[0,.69444,.01389,0,.66667],87:[0,.69444,.01389,0,.94445],88:[0,.69444,0,0,.66667],89:[0,.69444,.025,0,.66667],90:[0,.69444,0,0,.61111],91:[.25,.75,0,0,.28889],93:[.25,.75,0,0,.28889],94:[0,.69444,0,0,.5],95:[.35,.09444,.02778,0,.5],97:[0,.44444,0,0,.48056],98:[0,.69444,0,0,.51667],99:[0,.44444,0,0,.44445],100:[0,.69444,0,0,.51667],101:[0,.44444,0,0,.44445],102:[0,.69444,.06944,0,.30556],103:[.19444,.44444,.01389,0,.5],104:[0,.69444,0,0,.51667],105:[0,.67937,0,0,.23889],106:[.19444,.67937,0,0,.26667],107:[0,.69444,0,0,.48889],108:[0,.69444,0,0,.23889],109:[0,.44444,0,0,.79445],110:[0,.44444,0,0,.51667],111:[0,.44444,0,0,.5],112:[.19444,.44444,0,0,.51667],113:[.19444,.44444,0,0,.51667],114:[0,.44444,.01389,0,.34167],115:[0,.44444,0,0,.38333],116:[0,.57143,0,0,.36111],117:[0,.44444,0,0,.51667],118:[0,.44444,.01389,0,.46111],119:[0,.44444,.01389,0,.68334],120:[0,.44444,0,0,.46111],121:[.19444,.44444,.01389,0,.46111],122:[0,.44444,0,0,.43472],126:[.35,.32659,0,0,.5],160:[0,0,0,0,.25],168:[0,.67937,0,0,.5],176:[0,.69444,0,0,.66667],184:[.17014,0,0,0,.44445],305:[0,.44444,0,0,.23889],567:[.19444,.44444,0,0,.26667],710:[0,.69444,0,0,.5],711:[0,.63194,0,0,.5],713:[0,.60889,0,0,.5],714:[0,.69444,0,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,0,0,.5],729:[0,.67937,0,0,.27778],730:[0,.69444,0,0,.66667],732:[0,.67659,0,0,.5],733:[0,.69444,0,0,.5],915:[0,.69444,0,0,.54167],916:[0,.69444,0,0,.83334],920:[0,.69444,0,0,.77778],923:[0,.69444,0,0,.61111],926:[0,.69444,0,0,.66667],928:[0,.69444,0,0,.70834],931:[0,.69444,0,0,.72222],933:[0,.69444,0,0,.77778],934:[0,.69444,0,0,.72222],936:[0,.69444,0,0,.77778],937:[0,.69444,0,0,.72222],8211:[0,.44444,.02778,0,.5],8212:[0,.44444,.02778,0,1],8216:[0,.69444,0,0,.27778],8217:[0,.69444,0,0,.27778],8220:[0,.69444,0,0,.5],8221:[0,.69444,0,0,.5]},"Script-Regular":{32:[0,0,0,0,.25],65:[0,.7,.22925,0,.80253],66:[0,.7,.04087,0,.90757],67:[0,.7,.1689,0,.66619],68:[0,.7,.09371,0,.77443],69:[0,.7,.18583,0,.56162],70:[0,.7,.13634,0,.89544],71:[0,.7,.17322,0,.60961],72:[0,.7,.29694,0,.96919],73:[0,.7,.19189,0,.80907],74:[.27778,.7,.19189,0,1.05159],75:[0,.7,.31259,0,.91364],76:[0,.7,.19189,0,.87373],77:[0,.7,.15981,0,1.08031],78:[0,.7,.3525,0,.9015],79:[0,.7,.08078,0,.73787],80:[0,.7,.08078,0,1.01262],81:[0,.7,.03305,0,.88282],82:[0,.7,.06259,0,.85],83:[0,.7,.19189,0,.86767],84:[0,.7,.29087,0,.74697],85:[0,.7,.25815,0,.79996],86:[0,.7,.27523,0,.62204],87:[0,.7,.27523,0,.80532],88:[0,.7,.26006,0,.94445],89:[0,.7,.2939,0,.70961],90:[0,.7,.24037,0,.8212],160:[0,0,0,0,.25]},"Size1-Regular":{32:[0,0,0,0,.25],40:[.35001,.85,0,0,.45834],41:[.35001,.85,0,0,.45834],47:[.35001,.85,0,0,.57778],91:[.35001,.85,0,0,.41667],92:[.35001,.85,0,0,.57778],93:[.35001,.85,0,0,.41667],123:[.35001,.85,0,0,.58334],125:[.35001,.85,0,0,.58334],160:[0,0,0,0,.25],710:[0,.72222,0,0,.55556],732:[0,.72222,0,0,.55556],770:[0,.72222,0,0,.55556],771:[0,.72222,0,0,.55556],8214:[-99e-5,.601,0,0,.77778],8593:[1e-5,.6,0,0,.66667],8595:[1e-5,.6,0,0,.66667],8657:[1e-5,.6,0,0,.77778],8659:[1e-5,.6,0,0,.77778],8719:[.25001,.75,0,0,.94445],8720:[.25001,.75,0,0,.94445],8721:[.25001,.75,0,0,1.05556],8730:[.35001,.85,0,0,1],8739:[-.00599,.606,0,0,.33333],8741:[-.00599,.606,0,0,.55556],8747:[.30612,.805,.19445,0,.47222],8748:[.306,.805,.19445,0,.47222],8749:[.306,.805,.19445,0,.47222],8750:[.30612,.805,.19445,0,.47222],8896:[.25001,.75,0,0,.83334],8897:[.25001,.75,0,0,.83334],8898:[.25001,.75,0,0,.83334],8899:[.25001,.75,0,0,.83334],8968:[.35001,.85,0,0,.47222],8969:[.35001,.85,0,0,.47222],8970:[.35001,.85,0,0,.47222],8971:[.35001,.85,0,0,.47222],9168:[-99e-5,.601,0,0,.66667],10216:[.35001,.85,0,0,.47222],10217:[.35001,.85,0,0,.47222],10752:[.25001,.75,0,0,1.11111],10753:[.25001,.75,0,0,1.11111],10754:[.25001,.75,0,0,1.11111],10756:[.25001,.75,0,0,.83334],10758:[.25001,.75,0,0,.83334]},"Size2-Regular":{32:[0,0,0,0,.25],40:[.65002,1.15,0,0,.59722],41:[.65002,1.15,0,0,.59722],47:[.65002,1.15,0,0,.81111],91:[.65002,1.15,0,0,.47222],92:[.65002,1.15,0,0,.81111],93:[.65002,1.15,0,0,.47222],123:[.65002,1.15,0,0,.66667],125:[.65002,1.15,0,0,.66667],160:[0,0,0,0,.25],710:[0,.75,0,0,1],732:[0,.75,0,0,1],770:[0,.75,0,0,1],771:[0,.75,0,0,1],8719:[.55001,1.05,0,0,1.27778],8720:[.55001,1.05,0,0,1.27778],8721:[.55001,1.05,0,0,1.44445],8730:[.65002,1.15,0,0,1],8747:[.86225,1.36,.44445,0,.55556],8748:[.862,1.36,.44445,0,.55556],8749:[.862,1.36,.44445,0,.55556],8750:[.86225,1.36,.44445,0,.55556],8896:[.55001,1.05,0,0,1.11111],8897:[.55001,1.05,0,0,1.11111],8898:[.55001,1.05,0,0,1.11111],8899:[.55001,1.05,0,0,1.11111],8968:[.65002,1.15,0,0,.52778],8969:[.65002,1.15,0,0,.52778],8970:[.65002,1.15,0,0,.52778],8971:[.65002,1.15,0,0,.52778],10216:[.65002,1.15,0,0,.61111],10217:[.65002,1.15,0,0,.61111],10752:[.55001,1.05,0,0,1.51112],10753:[.55001,1.05,0,0,1.51112],10754:[.55001,1.05,0,0,1.51112],10756:[.55001,1.05,0,0,1.11111],10758:[.55001,1.05,0,0,1.11111]},"Size3-Regular":{32:[0,0,0,0,.25],40:[.95003,1.45,0,0,.73611],41:[.95003,1.45,0,0,.73611],47:[.95003,1.45,0,0,1.04445],91:[.95003,1.45,0,0,.52778],92:[.95003,1.45,0,0,1.04445],93:[.95003,1.45,0,0,.52778],123:[.95003,1.45,0,0,.75],125:[.95003,1.45,0,0,.75],160:[0,0,0,0,.25],710:[0,.75,0,0,1.44445],732:[0,.75,0,0,1.44445],770:[0,.75,0,0,1.44445],771:[0,.75,0,0,1.44445],8730:[.95003,1.45,0,0,1],8968:[.95003,1.45,0,0,.58334],8969:[.95003,1.45,0,0,.58334],8970:[.95003,1.45,0,0,.58334],8971:[.95003,1.45,0,0,.58334],10216:[.95003,1.45,0,0,.75],10217:[.95003,1.45,0,0,.75]},"Size4-Regular":{32:[0,0,0,0,.25],40:[1.25003,1.75,0,0,.79167],41:[1.25003,1.75,0,0,.79167],47:[1.25003,1.75,0,0,1.27778],91:[1.25003,1.75,0,0,.58334],92:[1.25003,1.75,0,0,1.27778],93:[1.25003,1.75,0,0,.58334],123:[1.25003,1.75,0,0,.80556],125:[1.25003,1.75,0,0,.80556],160:[0,0,0,0,.25],710:[0,.825,0,0,1.8889],732:[0,.825,0,0,1.8889],770:[0,.825,0,0,1.8889],771:[0,.825,0,0,1.8889],8730:[1.25003,1.75,0,0,1],8968:[1.25003,1.75,0,0,.63889],8969:[1.25003,1.75,0,0,.63889],8970:[1.25003,1.75,0,0,.63889],8971:[1.25003,1.75,0,0,.63889],9115:[.64502,1.155,0,0,.875],9116:[1e-5,.6,0,0,.875],9117:[.64502,1.155,0,0,.875],9118:[.64502,1.155,0,0,.875],9119:[1e-5,.6,0,0,.875],9120:[.64502,1.155,0,0,.875],9121:[.64502,1.155,0,0,.66667],9122:[-99e-5,.601,0,0,.66667],9123:[.64502,1.155,0,0,.66667],9124:[.64502,1.155,0,0,.66667],9125:[-99e-5,.601,0,0,.66667],9126:[.64502,1.155,0,0,.66667],9127:[1e-5,.9,0,0,.88889],9128:[.65002,1.15,0,0,.88889],9129:[.90001,0,0,0,.88889],9130:[0,.3,0,0,.88889],9131:[1e-5,.9,0,0,.88889],9132:[.65002,1.15,0,0,.88889],9133:[.90001,0,0,0,.88889],9143:[.88502,.915,0,0,1.05556],10216:[1.25003,1.75,0,0,.80556],10217:[1.25003,1.75,0,0,.80556],57344:[-.00499,.605,0,0,1.05556],57345:[-.00499,.605,0,0,1.05556],57680:[0,.12,0,0,.45],57681:[0,.12,0,0,.45],57682:[0,.12,0,0,.45],57683:[0,.12,0,0,.45]},"Typewriter-Regular":{32:[0,0,0,0,.525],33:[0,.61111,0,0,.525],34:[0,.61111,0,0,.525],35:[0,.61111,0,0,.525],36:[.08333,.69444,0,0,.525],37:[.08333,.69444,0,0,.525],38:[0,.61111,0,0,.525],39:[0,.61111,0,0,.525],40:[.08333,.69444,0,0,.525],41:[.08333,.69444,0,0,.525],42:[0,.52083,0,0,.525],43:[-.08056,.53055,0,0,.525],44:[.13889,.125,0,0,.525],45:[-.08056,.53055,0,0,.525],46:[0,.125,0,0,.525],47:[.08333,.69444,0,0,.525],48:[0,.61111,0,0,.525],49:[0,.61111,0,0,.525],50:[0,.61111,0,0,.525],51:[0,.61111,0,0,.525],52:[0,.61111,0,0,.525],53:[0,.61111,0,0,.525],54:[0,.61111,0,0,.525],55:[0,.61111,0,0,.525],56:[0,.61111,0,0,.525],57:[0,.61111,0,0,.525],58:[0,.43056,0,0,.525],59:[.13889,.43056,0,0,.525],60:[-.05556,.55556,0,0,.525],61:[-.19549,.41562,0,0,.525],62:[-.05556,.55556,0,0,.525],63:[0,.61111,0,0,.525],64:[0,.61111,0,0,.525],65:[0,.61111,0,0,.525],66:[0,.61111,0,0,.525],67:[0,.61111,0,0,.525],68:[0,.61111,0,0,.525],69:[0,.61111,0,0,.525],70:[0,.61111,0,0,.525],71:[0,.61111,0,0,.525],72:[0,.61111,0,0,.525],73:[0,.61111,0,0,.525],74:[0,.61111,0,0,.525],75:[0,.61111,0,0,.525],76:[0,.61111,0,0,.525],77:[0,.61111,0,0,.525],78:[0,.61111,0,0,.525],79:[0,.61111,0,0,.525],80:[0,.61111,0,0,.525],81:[.13889,.61111,0,0,.525],82:[0,.61111,0,0,.525],83:[0,.61111,0,0,.525],84:[0,.61111,0,0,.525],85:[0,.61111,0,0,.525],86:[0,.61111,0,0,.525],87:[0,.61111,0,0,.525],88:[0,.61111,0,0,.525],89:[0,.61111,0,0,.525],90:[0,.61111,0,0,.525],91:[.08333,.69444,0,0,.525],92:[.08333,.69444,0,0,.525],93:[.08333,.69444,0,0,.525],94:[0,.61111,0,0,.525],95:[.09514,0,0,0,.525],96:[0,.61111,0,0,.525],97:[0,.43056,0,0,.525],98:[0,.61111,0,0,.525],99:[0,.43056,0,0,.525],100:[0,.61111,0,0,.525],101:[0,.43056,0,0,.525],102:[0,.61111,0,0,.525],103:[.22222,.43056,0,0,.525],104:[0,.61111,0,0,.525],105:[0,.61111,0,0,.525],106:[.22222,.61111,0,0,.525],107:[0,.61111,0,0,.525],108:[0,.61111,0,0,.525],109:[0,.43056,0,0,.525],110:[0,.43056,0,0,.525],111:[0,.43056,0,0,.525],112:[.22222,.43056,0,0,.525],113:[.22222,.43056,0,0,.525],114:[0,.43056,0,0,.525],115:[0,.43056,0,0,.525],116:[0,.55358,0,0,.525],117:[0,.43056,0,0,.525],118:[0,.43056,0,0,.525],119:[0,.43056,0,0,.525],120:[0,.43056,0,0,.525],121:[.22222,.43056,0,0,.525],122:[0,.43056,0,0,.525],123:[.08333,.69444,0,0,.525],124:[.08333,.69444,0,0,.525],125:[.08333,.69444,0,0,.525],126:[0,.61111,0,0,.525],127:[0,.61111,0,0,.525],160:[0,0,0,0,.525],176:[0,.61111,0,0,.525],184:[.19445,0,0,0,.525],305:[0,.43056,0,0,.525],567:[.22222,.43056,0,0,.525],711:[0,.56597,0,0,.525],713:[0,.56555,0,0,.525],714:[0,.61111,0,0,.525],715:[0,.61111,0,0,.525],728:[0,.61111,0,0,.525],730:[0,.61111,0,0,.525],770:[0,.61111,0,0,.525],771:[0,.61111,0,0,.525],776:[0,.61111,0,0,.525],915:[0,.61111,0,0,.525],916:[0,.61111,0,0,.525],920:[0,.61111,0,0,.525],923:[0,.61111,0,0,.525],926:[0,.61111,0,0,.525],928:[0,.61111,0,0,.525],931:[0,.61111,0,0,.525],933:[0,.61111,0,0,.525],934:[0,.61111,0,0,.525],936:[0,.61111,0,0,.525],937:[0,.61111,0,0,.525],8216:[0,.61111,0,0,.525],8217:[0,.61111,0,0,.525],8242:[0,.61111,0,0,.525],9251:[.11111,.21944,0,0,.525]}},Wk={slant:[.25,.25,.25],space:[0,0,0],stretch:[0,0,0],shrink:[0,0,0],xHeight:[.431,.431,.431],quad:[1,1.171,1.472],extraSpace:[0,0,0],num1:[.677,.732,.925],num2:[.394,.384,.387],num3:[.444,.471,.504],denom1:[.686,.752,1.025],denom2:[.345,.344,.532],sup1:[.413,.503,.504],sup2:[.363,.431,.404],sup3:[.289,.286,.294],sub1:[.15,.143,.2],sub2:[.247,.286,.4],supDrop:[.386,.353,.494],subDrop:[.05,.071,.1],delim1:[2.39,1.7,1.98],delim2:[1.01,1.157,1.42],axisHeight:[.25,.25,.25],defaultRuleThickness:[.04,.049,.049],bigOpSpacing1:[.111,.111,.111],bigOpSpacing2:[.166,.166,.166],bigOpSpacing3:[.2,.2,.2],bigOpSpacing4:[.6,.611,.611],bigOpSpacing5:[.1,.143,.143],sqrtRuleThickness:[.04,.04,.04],ptPerEm:[10,10,10],doubleRuleSep:[.2,.2,.2],arrayRuleWidth:[.04,.04,.04],fboxsep:[.3,.3,.3],fboxrule:[.04,.04,.04]},bK={\u00C5:"A",\u00D0:"D",\u00DE:"o",\u00E5:"a",\u00F0:"d",\u00FE:"o",\u0410:"A",\u0411:"B",\u0412:"B",\u0413:"F",\u0414:"A",\u0415:"E",\u0416:"K",\u0417:"3",\u0418:"N",\u0419:"N",\u041A:"K",\u041B:"N",\u041C:"M",\u041D:"H",\u041E:"O",\u041F:"N",\u0420:"P",\u0421:"C",\u0422:"T",\u0423:"y",\u0424:"O",\u0425:"X",\u0426:"U",\u0427:"h",\u0428:"W",\u0429:"W",\u042A:"B",\u042B:"X",\u042C:"B",\u042D:"3",\u042E:"X",\u042F:"R",\u0430:"a",\u0431:"b",\u0432:"a",\u0433:"r",\u0434:"y",\u0435:"e",\u0436:"m",\u0437:"e",\u0438:"n",\u0439:"n",\u043A:"n",\u043B:"n",\u043C:"m",\u043D:"n",\u043E:"o",\u043F:"n",\u0440:"p",\u0441:"c",\u0442:"o",\u0443:"y",\u0444:"b",\u0445:"x",\u0446:"n",\u0447:"n",\u0448:"w",\u0449:"w",\u044A:"a",\u044B:"m",\u044C:"a",\u044D:"e",\u044E:"m",\u044F:"r"};_I={};$n={math:{},text:{}};q="math",tt="text",re="main",Ee="ams",Gn="accent-token",At="bin",bs="close",zg="inner",Xt="mathord",Ia="op-token",Do="open",Fb="punct",Ce="rel",gh="spacing",Re="textord";U(q,re,Ce,"\u2261","\\equiv",!0);U(q,re,Ce,"\u227A","\\prec",!0);U(q,re,Ce,"\u227B","\\succ",!0);U(q,re,Ce,"\u223C","\\sim",!0);U(q,re,Ce,"\u22A5","\\perp");U(q,re,Ce,"\u2AAF","\\preceq",!0);U(q,re,Ce,"\u2AB0","\\succeq",!0);U(q,re,Ce,"\u2243","\\simeq",!0);U(q,re,Ce,"\u2223","\\mid",!0);U(q,re,Ce,"\u226A","\\ll",!0);U(q,re,Ce,"\u226B","\\gg",!0);U(q,re,Ce,"\u224D","\\asymp",!0);U(q,re,Ce,"\u2225","\\parallel");U(q,re,Ce,"\u22C8","\\bowtie",!0);U(q,re,Ce,"\u2323","\\smile",!0);U(q,re,Ce,"\u2291","\\sqsubseteq",!0);U(q,re,Ce,"\u2292","\\sqsupseteq",!0);U(q,re,Ce,"\u2250","\\doteq",!0);U(q,re,Ce,"\u2322","\\frown",!0);U(q,re,Ce,"\u220B","\\ni",!0);U(q,re,Ce,"\u221D","\\propto",!0);U(q,re,Ce,"\u22A2","\\vdash",!0);U(q,re,Ce,"\u22A3","\\dashv",!0);U(q,re,Ce,"\u220B","\\owns");U(q,re,Fb,".","\\ldotp");U(q,re,Fb,"\u22C5","\\cdotp");U(q,re,Fb,"\u22C5","\xB7");U(tt,re,Re,"\u22C5","\xB7");U(q,re,Re,"#","\\#");U(tt,re,Re,"#","\\#");U(q,re,Re,"&","\\&");U(tt,re,Re,"&","\\&");U(q,re,Re,"\u2135","\\aleph",!0);U(q,re,Re,"\u2200","\\forall",!0);U(q,re,Re,"\u210F","\\hbar",!0);U(q,re,Re,"\u2203","\\exists",!0);U(q,re,Re,"\u2207","\\nabla",!0);U(q,re,Re,"\u266D","\\flat",!0);U(q,re,Re,"\u2113","\\ell",!0);U(q,re,Re,"\u266E","\\natural",!0);U(q,re,Re,"\u2663","\\clubsuit",!0);U(q,re,Re,"\u2118","\\wp",!0);U(q,re,Re,"\u266F","\\sharp",!0);U(q,re,Re,"\u2662","\\diamondsuit",!0);U(q,re,Re,"\u211C","\\Re",!0);U(q,re,Re,"\u2661","\\heartsuit",!0);U(q,re,Re,"\u2111","\\Im",!0);U(q,re,Re,"\u2660","\\spadesuit",!0);U(q,re,Re,"\xA7","\\S",!0);U(tt,re,Re,"\xA7","\\S");U(q,re,Re,"\xB6","\\P",!0);U(tt,re,Re,"\xB6","\\P");U(q,re,Re,"\u2020","\\dag");U(tt,re,Re,"\u2020","\\dag");U(tt,re,Re,"\u2020","\\textdagger");U(q,re,Re,"\u2021","\\ddag");U(tt,re,Re,"\u2021","\\ddag");U(tt,re,Re,"\u2021","\\textdaggerdbl");U(q,re,bs,"\u23B1","\\rmoustache",!0);U(q,re,Do,"\u23B0","\\lmoustache",!0);U(q,re,bs,"\u27EF","\\rgroup",!0);U(q,re,Do,"\u27EE","\\lgroup",!0);U(q,re,At,"\u2213","\\mp",!0);U(q,re,At,"\u2296","\\ominus",!0);U(q,re,At,"\u228E","\\uplus",!0);U(q,re,At,"\u2293","\\sqcap",!0);U(q,re,At,"\u2217","\\ast");U(q,re,At,"\u2294","\\sqcup",!0);U(q,re,At,"\u25EF","\\bigcirc",!0);U(q,re,At,"\u2219","\\bullet",!0);U(q,re,At,"\u2021","\\ddagger");U(q,re,At,"\u2240","\\wr",!0);U(q,re,At,"\u2A3F","\\amalg");U(q,re,At,"&","\\And");U(q,re,Ce,"\u27F5","\\longleftarrow",!0);U(q,re,Ce,"\u21D0","\\Leftarrow",!0);U(q,re,Ce,"\u27F8","\\Longleftarrow",!0);U(q,re,Ce,"\u27F6","\\longrightarrow",!0);U(q,re,Ce,"\u21D2","\\Rightarrow",!0);U(q,re,Ce,"\u27F9","\\Longrightarrow",!0);U(q,re,Ce,"\u2194","\\leftrightarrow",!0);U(q,re,Ce,"\u27F7","\\longleftrightarrow",!0);U(q,re,Ce,"\u21D4","\\Leftrightarrow",!0);U(q,re,Ce,"\u27FA","\\Longleftrightarrow",!0);U(q,re,Ce,"\u21A6","\\mapsto",!0);U(q,re,Ce,"\u27FC","\\longmapsto",!0);U(q,re,Ce,"\u2197","\\nearrow",!0);U(q,re,Ce,"\u21A9","\\hookleftarrow",!0);U(q,re,Ce,"\u21AA","\\hookrightarrow",!0);U(q,re,Ce,"\u2198","\\searrow",!0);U(q,re,Ce,"\u21BC","\\leftharpoonup",!0);U(q,re,Ce,"\u21C0","\\rightharpoonup",!0);U(q,re,Ce,"\u2199","\\swarrow",!0);U(q,re,Ce,"\u21BD","\\leftharpoondown",!0);U(q,re,Ce,"\u21C1","\\rightharpoondown",!0);U(q,re,Ce,"\u2196","\\nwarrow",!0);U(q,re,Ce,"\u21CC","\\rightleftharpoons",!0);U(q,Ee,Ce,"\u226E","\\nless",!0);U(q,Ee,Ce,"\uE010","\\@nleqslant");U(q,Ee,Ce,"\uE011","\\@nleqq");U(q,Ee,Ce,"\u2A87","\\lneq",!0);U(q,Ee,Ce,"\u2268","\\lneqq",!0);U(q,Ee,Ce,"\uE00C","\\@lvertneqq");U(q,Ee,Ce,"\u22E6","\\lnsim",!0);U(q,Ee,Ce,"\u2A89","\\lnapprox",!0);U(q,Ee,Ce,"\u2280","\\nprec",!0);U(q,Ee,Ce,"\u22E0","\\npreceq",!0);U(q,Ee,Ce,"\u22E8","\\precnsim",!0);U(q,Ee,Ce,"\u2AB9","\\precnapprox",!0);U(q,Ee,Ce,"\u2241","\\nsim",!0);U(q,Ee,Ce,"\uE006","\\@nshortmid");U(q,Ee,Ce,"\u2224","\\nmid",!0);U(q,Ee,Ce,"\u22AC","\\nvdash",!0);U(q,Ee,Ce,"\u22AD","\\nvDash",!0);U(q,Ee,Ce,"\u22EA","\\ntriangleleft");U(q,Ee,Ce,"\u22EC","\\ntrianglelefteq",!0);U(q,Ee,Ce,"\u228A","\\subsetneq",!0);U(q,Ee,Ce,"\uE01A","\\@varsubsetneq");U(q,Ee,Ce,"\u2ACB","\\subsetneqq",!0);U(q,Ee,Ce,"\uE017","\\@varsubsetneqq");U(q,Ee,Ce,"\u226F","\\ngtr",!0);U(q,Ee,Ce,"\uE00F","\\@ngeqslant");U(q,Ee,Ce,"\uE00E","\\@ngeqq");U(q,Ee,Ce,"\u2A88","\\gneq",!0);U(q,Ee,Ce,"\u2269","\\gneqq",!0);U(q,Ee,Ce,"\uE00D","\\@gvertneqq");U(q,Ee,Ce,"\u22E7","\\gnsim",!0);U(q,Ee,Ce,"\u2A8A","\\gnapprox",!0);U(q,Ee,Ce,"\u2281","\\nsucc",!0);U(q,Ee,Ce,"\u22E1","\\nsucceq",!0);U(q,Ee,Ce,"\u22E9","\\succnsim",!0);U(q,Ee,Ce,"\u2ABA","\\succnapprox",!0);U(q,Ee,Ce,"\u2246","\\ncong",!0);U(q,Ee,Ce,"\uE007","\\@nshortparallel");U(q,Ee,Ce,"\u2226","\\nparallel",!0);U(q,Ee,Ce,"\u22AF","\\nVDash",!0);U(q,Ee,Ce,"\u22EB","\\ntriangleright");U(q,Ee,Ce,"\u22ED","\\ntrianglerighteq",!0);U(q,Ee,Ce,"\uE018","\\@nsupseteqq");U(q,Ee,Ce,"\u228B","\\supsetneq",!0);U(q,Ee,Ce,"\uE01B","\\@varsupsetneq");U(q,Ee,Ce,"\u2ACC","\\supsetneqq",!0);U(q,Ee,Ce,"\uE019","\\@varsupsetneqq");U(q,Ee,Ce,"\u22AE","\\nVdash",!0);U(q,Ee,Ce,"\u2AB5","\\precneqq",!0);U(q,Ee,Ce,"\u2AB6","\\succneqq",!0);U(q,Ee,Ce,"\uE016","\\@nsubseteqq");U(q,Ee,At,"\u22B4","\\unlhd");U(q,Ee,At,"\u22B5","\\unrhd");U(q,Ee,Ce,"\u219A","\\nleftarrow",!0);U(q,Ee,Ce,"\u219B","\\nrightarrow",!0);U(q,Ee,Ce,"\u21CD","\\nLeftarrow",!0);U(q,Ee,Ce,"\u21CF","\\nRightarrow",!0);U(q,Ee,Ce,"\u21AE","\\nleftrightarrow",!0);U(q,Ee,Ce,"\u21CE","\\nLeftrightarrow",!0);U(q,Ee,Ce,"\u25B3","\\vartriangle");U(q,Ee,Re,"\u210F","\\hslash");U(q,Ee,Re,"\u25BD","\\triangledown");U(q,Ee,Re,"\u25CA","\\lozenge");U(q,Ee,Re,"\u24C8","\\circledS");U(q,Ee,Re,"\xAE","\\circledR");U(tt,Ee,Re,"\xAE","\\circledR");U(q,Ee,Re,"\u2221","\\measuredangle",!0);U(q,Ee,Re,"\u2204","\\nexists");U(q,Ee,Re,"\u2127","\\mho");U(q,Ee,Re,"\u2132","\\Finv",!0);U(q,Ee,Re,"\u2141","\\Game",!0);U(q,Ee,Re,"\u2035","\\backprime");U(q,Ee,Re,"\u25B2","\\blacktriangle");U(q,Ee,Re,"\u25BC","\\blacktriangledown");U(q,Ee,Re,"\u25A0","\\blacksquare");U(q,Ee,Re,"\u29EB","\\blacklozenge");U(q,Ee,Re,"\u2605","\\bigstar");U(q,Ee,Re,"\u2222","\\sphericalangle",!0);U(q,Ee,Re,"\u2201","\\complement",!0);U(q,Ee,Re,"\xF0","\\eth",!0);U(tt,re,Re,"\xF0","\xF0");U(q,Ee,Re,"\u2571","\\diagup");U(q,Ee,Re,"\u2572","\\diagdown");U(q,Ee,Re,"\u25A1","\\square");U(q,Ee,Re,"\u25A1","\\Box");U(q,Ee,Re,"\u25CA","\\Diamond");U(q,Ee,Re,"\xA5","\\yen",!0);U(tt,Ee,Re,"\xA5","\\yen",!0);U(q,Ee,Re,"\u2713","\\checkmark",!0);U(tt,Ee,Re,"\u2713","\\checkmark");U(q,Ee,Re,"\u2136","\\beth",!0);U(q,Ee,Re,"\u2138","\\daleth",!0);U(q,Ee,Re,"\u2137","\\gimel",!0);U(q,Ee,Re,"\u03DD","\\digamma",!0);U(q,Ee,Re,"\u03F0","\\varkappa");U(q,Ee,Do,"\u250C","\\@ulcorner",!0);U(q,Ee,bs,"\u2510","\\@urcorner",!0);U(q,Ee,Do,"\u2514","\\@llcorner",!0);U(q,Ee,bs,"\u2518","\\@lrcorner",!0);U(q,Ee,Ce,"\u2266","\\leqq",!0);U(q,Ee,Ce,"\u2A7D","\\leqslant",!0);U(q,Ee,Ce,"\u2A95","\\eqslantless",!0);U(q,Ee,Ce,"\u2272","\\lesssim",!0);U(q,Ee,Ce,"\u2A85","\\lessapprox",!0);U(q,Ee,Ce,"\u224A","\\approxeq",!0);U(q,Ee,At,"\u22D6","\\lessdot");U(q,Ee,Ce,"\u22D8","\\lll",!0);U(q,Ee,Ce,"\u2276","\\lessgtr",!0);U(q,Ee,Ce,"\u22DA","\\lesseqgtr",!0);U(q,Ee,Ce,"\u2A8B","\\lesseqqgtr",!0);U(q,Ee,Ce,"\u2251","\\doteqdot");U(q,Ee,Ce,"\u2253","\\risingdotseq",!0);U(q,Ee,Ce,"\u2252","\\fallingdotseq",!0);U(q,Ee,Ce,"\u223D","\\backsim",!0);U(q,Ee,Ce,"\u22CD","\\backsimeq",!0);U(q,Ee,Ce,"\u2AC5","\\subseteqq",!0);U(q,Ee,Ce,"\u22D0","\\Subset",!0);U(q,Ee,Ce,"\u228F","\\sqsubset",!0);U(q,Ee,Ce,"\u227C","\\preccurlyeq",!0);U(q,Ee,Ce,"\u22DE","\\curlyeqprec",!0);U(q,Ee,Ce,"\u227E","\\precsim",!0);U(q,Ee,Ce,"\u2AB7","\\precapprox",!0);U(q,Ee,Ce,"\u22B2","\\vartriangleleft");U(q,Ee,Ce,"\u22B4","\\trianglelefteq");U(q,Ee,Ce,"\u22A8","\\vDash",!0);U(q,Ee,Ce,"\u22AA","\\Vvdash",!0);U(q,Ee,Ce,"\u2323","\\smallsmile");U(q,Ee,Ce,"\u2322","\\smallfrown");U(q,Ee,Ce,"\u224F","\\bumpeq",!0);U(q,Ee,Ce,"\u224E","\\Bumpeq",!0);U(q,Ee,Ce,"\u2267","\\geqq",!0);U(q,Ee,Ce,"\u2A7E","\\geqslant",!0);U(q,Ee,Ce,"\u2A96","\\eqslantgtr",!0);U(q,Ee,Ce,"\u2273","\\gtrsim",!0);U(q,Ee,Ce,"\u2A86","\\gtrapprox",!0);U(q,Ee,At,"\u22D7","\\gtrdot");U(q,Ee,Ce,"\u22D9","\\ggg",!0);U(q,Ee,Ce,"\u2277","\\gtrless",!0);U(q,Ee,Ce,"\u22DB","\\gtreqless",!0);U(q,Ee,Ce,"\u2A8C","\\gtreqqless",!0);U(q,Ee,Ce,"\u2256","\\eqcirc",!0);U(q,Ee,Ce,"\u2257","\\circeq",!0);U(q,Ee,Ce,"\u225C","\\triangleq",!0);U(q,Ee,Ce,"\u223C","\\thicksim");U(q,Ee,Ce,"\u2248","\\thickapprox");U(q,Ee,Ce,"\u2AC6","\\supseteqq",!0);U(q,Ee,Ce,"\u22D1","\\Supset",!0);U(q,Ee,Ce,"\u2290","\\sqsupset",!0);U(q,Ee,Ce,"\u227D","\\succcurlyeq",!0);U(q,Ee,Ce,"\u22DF","\\curlyeqsucc",!0);U(q,Ee,Ce,"\u227F","\\succsim",!0);U(q,Ee,Ce,"\u2AB8","\\succapprox",!0);U(q,Ee,Ce,"\u22B3","\\vartriangleright");U(q,Ee,Ce,"\u22B5","\\trianglerighteq");U(q,Ee,Ce,"\u22A9","\\Vdash",!0);U(q,Ee,Ce,"\u2223","\\shortmid");U(q,Ee,Ce,"\u2225","\\shortparallel");U(q,Ee,Ce,"\u226C","\\between",!0);U(q,Ee,Ce,"\u22D4","\\pitchfork",!0);U(q,Ee,Ce,"\u221D","\\varpropto");U(q,Ee,Ce,"\u25C0","\\blacktriangleleft");U(q,Ee,Ce,"\u2234","\\therefore",!0);U(q,Ee,Ce,"\u220D","\\backepsilon");U(q,Ee,Ce,"\u25B6","\\blacktriangleright");U(q,Ee,Ce,"\u2235","\\because",!0);U(q,Ee,Ce,"\u22D8","\\llless");U(q,Ee,Ce,"\u22D9","\\gggtr");U(q,Ee,At,"\u22B2","\\lhd");U(q,Ee,At,"\u22B3","\\rhd");U(q,Ee,Ce,"\u2242","\\eqsim",!0);U(q,re,Ce,"\u22C8","\\Join");U(q,Ee,Ce,"\u2251","\\Doteq",!0);U(q,Ee,At,"\u2214","\\dotplus",!0);U(q,Ee,At,"\u2216","\\smallsetminus");U(q,Ee,At,"\u22D2","\\Cap",!0);U(q,Ee,At,"\u22D3","\\Cup",!0);U(q,Ee,At,"\u2A5E","\\doublebarwedge",!0);U(q,Ee,At,"\u229F","\\boxminus",!0);U(q,Ee,At,"\u229E","\\boxplus",!0);U(q,Ee,At,"\u22C7","\\divideontimes",!0);U(q,Ee,At,"\u22C9","\\ltimes",!0);U(q,Ee,At,"\u22CA","\\rtimes",!0);U(q,Ee,At,"\u22CB","\\leftthreetimes",!0);U(q,Ee,At,"\u22CC","\\rightthreetimes",!0);U(q,Ee,At,"\u22CF","\\curlywedge",!0);U(q,Ee,At,"\u22CE","\\curlyvee",!0);U(q,Ee,At,"\u229D","\\circleddash",!0);U(q,Ee,At,"\u229B","\\circledast",!0);U(q,Ee,At,"\u22C5","\\centerdot");U(q,Ee,At,"\u22BA","\\intercal",!0);U(q,Ee,At,"\u22D2","\\doublecap");U(q,Ee,At,"\u22D3","\\doublecup");U(q,Ee,At,"\u22A0","\\boxtimes",!0);U(q,Ee,Ce,"\u21E2","\\dashrightarrow",!0);U(q,Ee,Ce,"\u21E0","\\dashleftarrow",!0);U(q,Ee,Ce,"\u21C7","\\leftleftarrows",!0);U(q,Ee,Ce,"\u21C6","\\leftrightarrows",!0);U(q,Ee,Ce,"\u21DA","\\Lleftarrow",!0);U(q,Ee,Ce,"\u219E","\\twoheadleftarrow",!0);U(q,Ee,Ce,"\u21A2","\\leftarrowtail",!0);U(q,Ee,Ce,"\u21AB","\\looparrowleft",!0);U(q,Ee,Ce,"\u21CB","\\leftrightharpoons",!0);U(q,Ee,Ce,"\u21B6","\\curvearrowleft",!0);U(q,Ee,Ce,"\u21BA","\\circlearrowleft",!0);U(q,Ee,Ce,"\u21B0","\\Lsh",!0);U(q,Ee,Ce,"\u21C8","\\upuparrows",!0);U(q,Ee,Ce,"\u21BF","\\upharpoonleft",!0);U(q,Ee,Ce,"\u21C3","\\downharpoonleft",!0);U(q,re,Ce,"\u22B6","\\origof",!0);U(q,re,Ce,"\u22B7","\\imageof",!0);U(q,Ee,Ce,"\u22B8","\\multimap",!0);U(q,Ee,Ce,"\u21AD","\\leftrightsquigarrow",!0);U(q,Ee,Ce,"\u21C9","\\rightrightarrows",!0);U(q,Ee,Ce,"\u21C4","\\rightleftarrows",!0);U(q,Ee,Ce,"\u21A0","\\twoheadrightarrow",!0);U(q,Ee,Ce,"\u21A3","\\rightarrowtail",!0);U(q,Ee,Ce,"\u21AC","\\looparrowright",!0);U(q,Ee,Ce,"\u21B7","\\curvearrowright",!0);U(q,Ee,Ce,"\u21BB","\\circlearrowright",!0);U(q,Ee,Ce,"\u21B1","\\Rsh",!0);U(q,Ee,Ce,"\u21CA","\\downdownarrows",!0);U(q,Ee,Ce,"\u21BE","\\upharpoonright",!0);U(q,Ee,Ce,"\u21C2","\\downharpoonright",!0);U(q,Ee,Ce,"\u21DD","\\rightsquigarrow",!0);U(q,Ee,Ce,"\u21DD","\\leadsto");U(q,Ee,Ce,"\u21DB","\\Rrightarrow",!0);U(q,Ee,Ce,"\u21BE","\\restriction");U(q,re,Re,"\u2018","`");U(q,re,Re,"$","\\$");U(tt,re,Re,"$","\\$");U(tt,re,Re,"$","\\textdollar");U(q,re,Re,"%","\\%");U(tt,re,Re,"%","\\%");U(q,re,Re,"_","\\_");U(tt,re,Re,"_","\\_");U(tt,re,Re,"_","\\textunderscore");U(q,re,Re,"\u2220","\\angle",!0);U(q,re,Re,"\u221E","\\infty",!0);U(q,re,Re,"\u2032","\\prime");U(q,re,Re,"\u25B3","\\triangle");U(q,re,Re,"\u0393","\\Gamma",!0);U(q,re,Re,"\u0394","\\Delta",!0);U(q,re,Re,"\u0398","\\Theta",!0);U(q,re,Re,"\u039B","\\Lambda",!0);U(q,re,Re,"\u039E","\\Xi",!0);U(q,re,Re,"\u03A0","\\Pi",!0);U(q,re,Re,"\u03A3","\\Sigma",!0);U(q,re,Re,"\u03A5","\\Upsilon",!0);U(q,re,Re,"\u03A6","\\Phi",!0);U(q,re,Re,"\u03A8","\\Psi",!0);U(q,re,Re,"\u03A9","\\Omega",!0);U(q,re,Re,"A","\u0391");U(q,re,Re,"B","\u0392");U(q,re,Re,"E","\u0395");U(q,re,Re,"Z","\u0396");U(q,re,Re,"H","\u0397");U(q,re,Re,"I","\u0399");U(q,re,Re,"K","\u039A");U(q,re,Re,"M","\u039C");U(q,re,Re,"N","\u039D");U(q,re,Re,"O","\u039F");U(q,re,Re,"P","\u03A1");U(q,re,Re,"T","\u03A4");U(q,re,Re,"X","\u03A7");U(q,re,Re,"\xAC","\\neg",!0);U(q,re,Re,"\xAC","\\lnot");U(q,re,Re,"\u22A4","\\top");U(q,re,Re,"\u22A5","\\bot");U(q,re,Re,"\u2205","\\emptyset");U(q,Ee,Re,"\u2205","\\varnothing");U(q,re,Xt,"\u03B1","\\alpha",!0);U(q,re,Xt,"\u03B2","\\beta",!0);U(q,re,Xt,"\u03B3","\\gamma",!0);U(q,re,Xt,"\u03B4","\\delta",!0);U(q,re,Xt,"\u03F5","\\epsilon",!0);U(q,re,Xt,"\u03B6","\\zeta",!0);U(q,re,Xt,"\u03B7","\\eta",!0);U(q,re,Xt,"\u03B8","\\theta",!0);U(q,re,Xt,"\u03B9","\\iota",!0);U(q,re,Xt,"\u03BA","\\kappa",!0);U(q,re,Xt,"\u03BB","\\lambda",!0);U(q,re,Xt,"\u03BC","\\mu",!0);U(q,re,Xt,"\u03BD","\\nu",!0);U(q,re,Xt,"\u03BE","\\xi",!0);U(q,re,Xt,"\u03BF","\\omicron",!0);U(q,re,Xt,"\u03C0","\\pi",!0);U(q,re,Xt,"\u03C1","\\rho",!0);U(q,re,Xt,"\u03C3","\\sigma",!0);U(q,re,Xt,"\u03C4","\\tau",!0);U(q,re,Xt,"\u03C5","\\upsilon",!0);U(q,re,Xt,"\u03D5","\\phi",!0);U(q,re,Xt,"\u03C7","\\chi",!0);U(q,re,Xt,"\u03C8","\\psi",!0);U(q,re,Xt,"\u03C9","\\omega",!0);U(q,re,Xt,"\u03B5","\\varepsilon",!0);U(q,re,Xt,"\u03D1","\\vartheta",!0);U(q,re,Xt,"\u03D6","\\varpi",!0);U(q,re,Xt,"\u03F1","\\varrho",!0);U(q,re,Xt,"\u03C2","\\varsigma",!0);U(q,re,Xt,"\u03C6","\\varphi",!0);U(q,re,At,"\u2217","*",!0);U(q,re,At,"+","+");U(q,re,At,"\u2212","-",!0);U(q,re,At,"\u22C5","\\cdot",!0);U(q,re,At,"\u2218","\\circ",!0);U(q,re,At,"\xF7","\\div",!0);U(q,re,At,"\xB1","\\pm",!0);U(q,re,At,"\xD7","\\times",!0);U(q,re,At,"\u2229","\\cap",!0);U(q,re,At,"\u222A","\\cup",!0);U(q,re,At,"\u2216","\\setminus",!0);U(q,re,At,"\u2227","\\land");U(q,re,At,"\u2228","\\lor");U(q,re,At,"\u2227","\\wedge",!0);U(q,re,At,"\u2228","\\vee",!0);U(q,re,Re,"\u221A","\\surd");U(q,re,Do,"\u27E8","\\langle",!0);U(q,re,Do,"\u2223","\\lvert");U(q,re,Do,"\u2225","\\lVert");U(q,re,bs,"?","?");U(q,re,bs,"!","!");U(q,re,bs,"\u27E9","\\rangle",!0);U(q,re,bs,"\u2223","\\rvert");U(q,re,bs,"\u2225","\\rVert");U(q,re,Ce,"=","=");U(q,re,Ce,":",":");U(q,re,Ce,"\u2248","\\approx",!0);U(q,re,Ce,"\u2245","\\cong",!0);U(q,re,Ce,"\u2265","\\ge");U(q,re,Ce,"\u2265","\\geq",!0);U(q,re,Ce,"\u2190","\\gets");U(q,re,Ce,">","\\gt",!0);U(q,re,Ce,"\u2208","\\in",!0);U(q,re,Ce,"\uE020","\\@not");U(q,re,Ce,"\u2282","\\subset",!0);U(q,re,Ce,"\u2283","\\supset",!0);U(q,re,Ce,"\u2286","\\subseteq",!0);U(q,re,Ce,"\u2287","\\supseteq",!0);U(q,Ee,Ce,"\u2288","\\nsubseteq",!0);U(q,Ee,Ce,"\u2289","\\nsupseteq",!0);U(q,re,Ce,"\u22A8","\\models");U(q,re,Ce,"\u2190","\\leftarrow",!0);U(q,re,Ce,"\u2264","\\le");U(q,re,Ce,"\u2264","\\leq",!0);U(q,re,Ce,"<","\\lt",!0);U(q,re,Ce,"\u2192","\\rightarrow",!0);U(q,re,Ce,"\u2192","\\to");U(q,Ee,Ce,"\u2271","\\ngeq",!0);U(q,Ee,Ce,"\u2270","\\nleq",!0);U(q,re,gh,"\xA0","\\ ");U(q,re,gh,"\xA0","\\space");U(q,re,gh,"\xA0","\\nobreakspace");U(tt,re,gh,"\xA0","\\ ");U(tt,re,gh,"\xA0"," ");U(tt,re,gh,"\xA0","\\space");U(tt,re,gh,"\xA0","\\nobreakspace");U(q,re,gh,"","\\nobreak");U(q,re,gh,"","\\allowbreak");U(q,re,Fb,",",",");U(q,re,Fb,";",";");U(q,Ee,At,"\u22BC","\\barwedge",!0);U(q,Ee,At,"\u22BB","\\veebar",!0);U(q,re,At,"\u2299","\\odot",!0);U(q,re,At,"\u2295","\\oplus",!0);U(q,re,At,"\u2297","\\otimes",!0);U(q,re,Re,"\u2202","\\partial",!0);U(q,re,At,"\u2298","\\oslash",!0);U(q,Ee,At,"\u229A","\\circledcirc",!0);U(q,Ee,At,"\u22A1","\\boxdot",!0);U(q,re,At,"\u25B3","\\bigtriangleup");U(q,re,At,"\u25BD","\\bigtriangledown");U(q,re,At,"\u2020","\\dagger");U(q,re,At,"\u22C4","\\diamond");U(q,re,At,"\u22C6","\\star");U(q,re,At,"\u25C3","\\triangleleft");U(q,re,At,"\u25B9","\\triangleright");U(q,re,Do,"{","\\{");U(tt,re,Re,"{","\\{");U(tt,re,Re,"{","\\textbraceleft");U(q,re,bs,"}","\\}");U(tt,re,Re,"}","\\}");U(tt,re,Re,"}","\\textbraceright");U(q,re,Do,"{","\\lbrace");U(q,re,bs,"}","\\rbrace");U(q,re,Do,"[","\\lbrack",!0);U(tt,re,Re,"[","\\lbrack",!0);U(q,re,bs,"]","\\rbrack",!0);U(tt,re,Re,"]","\\rbrack",!0);U(q,re,Do,"(","\\lparen",!0);U(q,re,bs,")","\\rparen",!0);U(tt,re,Re,"<","\\textless",!0);U(tt,re,Re,">","\\textgreater",!0);U(q,re,Do,"\u230A","\\lfloor",!0);U(q,re,bs,"\u230B","\\rfloor",!0);U(q,re,Do,"\u2308","\\lceil",!0);U(q,re,bs,"\u2309","\\rceil",!0);U(q,re,Re,"\\","\\backslash");U(q,re,Re,"\u2223","|");U(q,re,Re,"\u2223","\\vert");U(tt,re,Re,"|","\\textbar",!0);U(q,re,Re,"\u2225","\\|");U(q,re,Re,"\u2225","\\Vert");U(tt,re,Re,"\u2225","\\textbardbl");U(tt,re,Re,"~","\\textasciitilde");U(tt,re,Re,"\\","\\textbackslash");U(tt,re,Re,"^","\\textasciicircum");U(q,re,Ce,"\u2191","\\uparrow",!0);U(q,re,Ce,"\u21D1","\\Uparrow",!0);U(q,re,Ce,"\u2193","\\downarrow",!0);U(q,re,Ce,"\u21D3","\\Downarrow",!0);U(q,re,Ce,"\u2195","\\updownarrow",!0);U(q,re,Ce,"\u21D5","\\Updownarrow",!0);U(q,re,Ia,"\u2210","\\coprod");U(q,re,Ia,"\u22C1","\\bigvee");U(q,re,Ia,"\u22C0","\\bigwedge");U(q,re,Ia,"\u2A04","\\biguplus");U(q,re,Ia,"\u22C2","\\bigcap");U(q,re,Ia,"\u22C3","\\bigcup");U(q,re,Ia,"\u222B","\\int");U(q,re,Ia,"\u222B","\\intop");U(q,re,Ia,"\u222C","\\iint");U(q,re,Ia,"\u222D","\\iiint");U(q,re,Ia,"\u220F","\\prod");U(q,re,Ia,"\u2211","\\sum");U(q,re,Ia,"\u2A02","\\bigotimes");U(q,re,Ia,"\u2A01","\\bigoplus");U(q,re,Ia,"\u2A00","\\bigodot");U(q,re,Ia,"\u222E","\\oint");U(q,re,Ia,"\u222F","\\oiint");U(q,re,Ia,"\u2230","\\oiiint");U(q,re,Ia,"\u2A06","\\bigsqcup");U(q,re,Ia,"\u222B","\\smallint");U(tt,re,zg,"\u2026","\\textellipsis");U(q,re,zg,"\u2026","\\mathellipsis");U(tt,re,zg,"\u2026","\\ldots",!0);U(q,re,zg,"\u2026","\\ldots",!0);U(q,re,zg,"\u22EF","\\@cdots",!0);U(q,re,zg,"\u22F1","\\ddots",!0);U(q,re,Re,"\u22EE","\\varvdots");U(tt,re,Re,"\u22EE","\\varvdots");U(q,re,Gn,"\u02CA","\\acute");U(q,re,Gn,"\u02CB","\\grave");U(q,re,Gn,"\xA8","\\ddot");U(q,re,Gn,"~","\\tilde");U(q,re,Gn,"\u02C9","\\bar");U(q,re,Gn,"\u02D8","\\breve");U(q,re,Gn,"\u02C7","\\check");U(q,re,Gn,"^","\\hat");U(q,re,Gn,"\u20D7","\\vec");U(q,re,Gn,"\u02D9","\\dot");U(q,re,Gn,"\u02DA","\\mathring");U(q,re,Xt,"\uE131","\\@imath");U(q,re,Xt,"\uE237","\\@jmath");U(q,re,Re,"\u0131","\u0131");U(q,re,Re,"\u0237","\u0237");U(tt,re,Re,"\u0131","\\i",!0);U(tt,re,Re,"\u0237","\\j",!0);U(tt,re,Re,"\xDF","\\ss",!0);U(tt,re,Re,"\xE6","\\ae",!0);U(tt,re,Re,"\u0153","\\oe",!0);U(tt,re,Re,"\xF8","\\o",!0);U(tt,re,Re,"\xC6","\\AE",!0);U(tt,re,Re,"\u0152","\\OE",!0);U(tt,re,Re,"\xD8","\\O",!0);U(tt,re,Gn,"\u02CA","\\'");U(tt,re,Gn,"\u02CB","\\`");U(tt,re,Gn,"\u02C6","\\^");U(tt,re,Gn,"\u02DC","\\~");U(tt,re,Gn,"\u02C9","\\=");U(tt,re,Gn,"\u02D8","\\u");U(tt,re,Gn,"\u02D9","\\.");U(tt,re,Gn,"\xB8","\\c");U(tt,re,Gn,"\u02DA","\\r");U(tt,re,Gn,"\u02C7","\\v");U(tt,re,Gn,"\xA8",'\\"');U(tt,re,Gn,"\u02DD","\\H");U(tt,re,Gn,"\u25EF","\\textcircled");sZ={"--":!0,"---":!0,"``":!0,"''":!0};U(tt,re,Re,"\u2013","--",!0);U(tt,re,Re,"\u2013","\\textendash");U(tt,re,Re,"\u2014","---",!0);U(tt,re,Re,"\u2014","\\textemdash");U(tt,re,Re,"\u2018","`",!0);U(tt,re,Re,"\u2018","\\textquoteleft");U(tt,re,Re,"\u2019","'",!0);U(tt,re,Re,"\u2019","\\textquoteright");U(tt,re,Re,"\u201C","``",!0);U(tt,re,Re,"\u201C","\\textquotedblleft");U(tt,re,Re,"\u201D","''",!0);U(tt,re,Re,"\u201D","\\textquotedblright");U(q,re,Re,"\xB0","\\degree",!0);U(tt,re,Re,"\xB0","\\degree");U(tt,re,Re,"\xB0","\\textdegree",!0);U(q,re,Re,"\xA3","\\pounds");U(q,re,Re,"\xA3","\\mathsterling",!0);U(tt,re,Re,"\xA3","\\pounds");U(tt,re,Re,"\xA3","\\textsterling",!0);U(q,Ee,Re,"\u2720","\\maltese");U(tt,Ee,Re,"\u2720","\\maltese");wK='0123456789/@."';for(Yk=0;Yk{var e=t.charCodeAt(0),r=t.charCodeAt(1),n=(e-55296)*1024+(r-56320)+65536;if(119808<=n&&n<120484){var a=Math.floor((n-119808)/26);return LK[a]}else if(120782<=n&&n<=120831){var i=Math.floor((n-120782)/10);return NPe[i]}else{if(n===120485||n===120486)return LK[0];if(120486{if(Pf(t.classes)!==Pf(e.classes)||t.skew!==e.skew||t.maxFontSize!==e.maxFontSize||t.italic!==0&&t.hasClass("mathnormal"))return!1;if(t.classes.length===1){var r=t.classes[0];if(r==="mbin"||r==="mord")return!1}for(var n of Object.keys(t.style))if(t.style[n]!==e.style[n])return!1;for(var a of Object.keys(e.style))if(t.style[a]!==e.style[a])return!1;return!0},oZ=t=>{for(var e=0;er&&(r=s.height),s.depth>n&&(n=s.depth),s.maxFontSize>a&&(a=s.maxFontSize)}e.height=r,e.depth=n,e.maxFontSize=a},st=function(e,r,n,a){var i=new Bf(e,r,n,a);return hD(i),i},Ff=(t,e,r,n)=>new Bf(t,e,r,n),Bg=function(e,r,n){var a=st([e],[],r);return a.height=Math.max(n||r.fontMetrics().defaultRuleThickness,r.minRuleThickness),a.style.borderBottomWidth=mt(a.height),a.maxFontSize=1,a},BPe=function(e,r,n,a){var i=new Pg(e,r,n,a);return hD(i),i},vh=function(e){var r=new Of(e);return hD(r),r},Fg=function(e,r){return e instanceof Of?st([],[e],r):e},FPe=function(e){if(e.positionType==="individualShift"){for(var r=e.children,n=[r[0]],a=-r[0].shift-r[0].elem.depth,i=a,s=1;s{var r=st(["mspace"],[],e),n=ta(t,e);return r.style.marginRight=mt(n),r},Zk=(t,e,r)=>{var n,a;switch(t){case"amsrm":n="AMS";break;case"textrm":n="Main";break;case"textsf":n="SansSerif";break;case"texttt":n="Typewriter";break;default:n=t}return e==="textbf"&&r==="textit"?a="BoldItalic":e==="textbf"?a="Bold":r==="textit"?a="Italic":a="Regular",n+"-"+a},jI={mathbf:{variant:"bold",fontName:"Main-Bold"},mathrm:{variant:"normal",fontName:"Main-Regular"},textit:{variant:"italic",fontName:"Main-Italic"},mathit:{variant:"italic",fontName:"Main-Italic"},mathnormal:{variant:"italic",fontName:"Math-Italic"},mathsfit:{variant:"sans-serif-italic",fontName:"SansSerif-Italic"},mathbb:{variant:"double-struck",fontName:"AMS-Regular"},mathcal:{variant:"script",fontName:"Caligraphic-Regular"},mathfrak:{variant:"fraktur",fontName:"Fraktur-Regular"},mathscr:{variant:"script",fontName:"Script-Regular"},mathsf:{variant:"sans-serif",fontName:"SansSerif-Regular"},mathtt:{variant:"monospace",fontName:"Typewriter-Regular"}},uZ={vec:["vec",.471,.714],oiintSize1:["oiintSize1",.957,.499],oiintSize2:["oiintSize2",1.472,.659],oiiintSize1:["oiiintSize1",1.304,.499],oiiintSize2:["oiiintSize2",1.98,.659]},cZ=function(e,r){var[n,a,i]=uZ[e],s=new Gu(n),o=new ql([s],{width:mt(a),height:mt(i),style:"width:"+mt(a),viewBox:"0 0 "+1e3*a+" "+1e3*i,preserveAspectRatio:"xMinYMin"}),l=Ff(["overlay"],[o],r);return l.height=i,l.style.height=mt(i),l.style.width=mt(a),l},ea={number:3,unit:"mu"},up={number:4,unit:"mu"},dh={number:5,unit:"mu"},zPe={mord:{mop:ea,mbin:up,mrel:dh,minner:ea},mop:{mord:ea,mop:ea,mrel:dh,minner:ea},mbin:{mord:up,mop:up,mopen:up,minner:up},mrel:{mord:dh,mop:dh,mopen:dh,minner:dh},mopen:{},mclose:{mop:ea,mbin:up,mrel:dh,minner:ea},mpunct:{mord:ea,mop:ea,mrel:dh,mopen:ea,mclose:ea,mpunct:ea,minner:ea},minner:{mord:ea,mop:ea,mbin:up,mrel:dh,mopen:ea,mpunct:ea,minner:ea}},$Pe={mord:{mop:ea},mop:{mord:ea,mop:ea},mbin:{},mrel:{},mopen:{},mclose:{mop:ea},mpunct:{},minner:{mop:ea}},hZ={},oT={},lT={};uT=function(e){return e.type==="ordgroup"&&e.body.length===1?e.body[0]:e},Ra=function(e){return e.type==="ordgroup"?e.body:[e]},GPe=new Set(["leftmost","mbin","mopen","mrel","mop","mpunct"]),UPe=new Set(["rightmost","mrel","mclose","mpunct"]),qPe={display:ir.DISPLAY,text:ir.TEXT,script:ir.SCRIPT,scriptscript:ir.SCRIPTSCRIPT},VPe={mord:"mord",mop:"mop",mbin:"mbin",mrel:"mrel",mopen:"mopen",mclose:"mclose",mpunct:"mpunct",minner:"minner"},Va=function(e,r,n,a){a===void 0&&(a=[null,null]);for(var i=[],s=0;s{var v=g.classes[0],y=m.classes[0];v==="mbin"&&UPe.has(y)?g.classes[0]="mord":y==="mbin"&&GPe.has(v)&&(m.classes[0]="mord")},{node:f},d,p),KI(i,(m,g)=>{var v,y,b=QI(g),w=QI(m),C=b&&w?m.hasClass("mtight")?(v=$Pe[b])==null?void 0:v[w]:(y=zPe[b])==null?void 0:y[w]:null;if(C)return lZ(C,u)},{node:f},d,p),i},KI=function(e,r,n,a,i){a&&e.push(a);for(var s=0;sd=>{e.splice(f+1,0,d),s++})(s)}a&&e.pop()},fZ=function(e){return e instanceof Of||e instanceof Pg||e instanceof Bf&&e.hasClass("enclosing")?e:null},ZI=function(e,r){var n=fZ(e);if(n){var a=n.children;if(a.length){if(r==="right")return ZI(a[a.length-1],"right");if(r==="left")return ZI(a[0],"left")}}return e},QI=function(e,r){if(!e)return null;r&&(e=ZI(e,r));var n=e.classes[0];return VPe[n]||null},Bb=function(e,r){var n=["nulldelimiter"].concat(e.baseSizingClasses());return st(r.concat(n))},Xr=function(e,r,n){if(!e)return st();if(oT[e.type]){var a=oT[e.type](e,r);if(n&&r.size!==n.size){a=st(r.sizingClasses(n),[a],r);var i=r.sizeMultiplier/n.sizeMultiplier;a.height*=i,a.depth*=i}return a}else throw new ht("Got group of unknown type: '"+e.type+"'")};ut=class{constructor(e,r,n){this.type=void 0,this.attributes=void 0,this.children=void 0,this.classes=void 0,this.type=e,this.attributes={},this.children=r||[],this.classes=n||[]}setAttribute(e,r){this.attributes[e]=r}getAttribute(e){return this.attributes[e]}toNode(){var e=document.createElementNS("http://www.w3.org/1998/Math/MathML",this.type);for(var r in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,r)&&e.setAttribute(r,this.attributes[r]);this.classes.length>0&&(e.className=Pf(this.classes));for(var n=0;n0&&(e+=' class ="'+Ji(Pf(this.classes))+'"'),e+=">";for(var n=0;n",e}toText(){return this.children.map(e=>e.toText()).join("")}},la=class{constructor(e){this.text=void 0,this.text=e}toNode(){return document.createTextNode(this.text)}toMarkup(){return Ji(this.toText())}toText(){return this.text}},cT=class{constructor(e){this.width=void 0,this.character=void 0,this.width=e,e>=.05555&&e<=.05556?this.character="\u200A":e>=.1666&&e<=.1667?this.character="\u2009":e>=.2222&&e<=.2223?this.character="\u2005":e>=.2777&&e<=.2778?this.character="\u2005\u200A":e>=-.05556&&e<=-.05555?this.character="\u200A\u2063":e>=-.1667&&e<=-.1666?this.character="\u2009\u2063":e>=-.2223&&e<=-.2222?this.character="\u205F\u2063":e>=-.2778&&e<=-.2777?this.character="\u2005\u2063":this.character=null}toNode(){if(this.character)return document.createTextNode(this.character);var e=document.createElementNS("http://www.w3.org/1998/Math/MathML","mspace");return e.setAttribute("width",mt(this.width)),e}toMarkup(){return this.character?""+this.character+"":''}toText(){return this.character?this.character:" "}},HPe=new Set(["\\imath","\\jmath"]),WPe=new Set(["mrow","mtable"]),nl=function(e,r,n){return $n[r][e]&&$n[r][e].replace&&e.charCodeAt(0)!==55349&&!(sZ.hasOwnProperty(e)&&n&&(n.fontFamily&&n.fontFamily.slice(4,6)==="tt"||n.font&&n.font.slice(4,6)==="tt"))&&(e=$n[r][e].replace),new la(e)},fD=function(e){return e.length===1?e[0]:new ut("mrow",e)},YPe={mathit:"italic",boldsymbol:t=>t.type==="textord"?"bold":"bold-italic",mathbf:"bold",mathbb:"double-struck",mathsfit:"sans-serif-italic",mathfrak:"fraktur",mathscr:"script",mathcal:"script",mathsf:"sans-serif",mathtt:"monospace"},dD=(t,e)=>{if(t.mode==="text"){if(e.fontFamily==="texttt")return"monospace";if(e.fontFamily==="textsf")return e.fontShape==="textit"&&e.fontWeight==="textbf"?"sans-serif-bold-italic":e.fontShape==="textit"?"sans-serif-italic":e.fontWeight==="textbf"?"bold-sans-serif":"sans-serif";if(e.fontShape==="textit"&&e.fontWeight==="textbf")return"bold-italic";if(e.fontShape==="textit")return"italic";if(e.fontWeight==="textbf")return"bold"}var r=e.font;if(!r||r==="mathnormal")return null;var n=t.mode,a=YPe[r];if(a)return typeof a=="function"?a(t):a;var i=t.text;if(HPe.has(i))return null;if($n[n][i]){var s=$n[n][i].replace;s&&(i=s)}var o=jI[r].fontName;return uD(i,o,n)?jI[r].variant:null};No=function(e,r,n){if(e.length===1){var a=mn(e[0],r);return n&&a instanceof ut&&a.type==="mo"&&(a.setAttribute("lspace","0em"),a.setAttribute("rspace","0em")),[a]}for(var i=[],s,o=0;o=1&&(s.type==="mn"||RI(s))){var u=l.children[0];u instanceof ut&&u.type==="mn"&&(u.children=[...s.children,...u.children],i.pop())}else if(s.type==="mi"&&s.children.length===1){var h=s.children[0];if(h instanceof la&&h.text==="\u0338"&&(l.type==="mo"||l.type==="mi"||l.type==="mn")){var f=l.children[0];f instanceof la&&f.text.length>0&&(f.text=f.text.slice(0,1)+"\u0338"+f.text.slice(1),i.pop())}}}i.push(l),s=l}return i},zf=function(e,r,n){return fD(No(e,r,n))},mn=function(e,r){if(!e)return new ut("mrow");if(lT[e.type])return lT[e.type](e,r);throw new ht("Got group of unknown type: '"+e.type+"'")};XPe=[[1,1,1],[2,1,1],[3,1,1],[4,2,1],[5,2,1],[6,3,1],[7,4,2],[8,6,3],[9,7,6],[10,8,7],[11,10,9]],IK=[.5,.6,.7,.8,.9,1,1.2,1.44,1.728,2.074,2.488],DK=function(e,r){return r.size<2?e:XPe[e-1][r.size-1]},hT=class t{constructor(e){this.style=void 0,this.color=void 0,this.size=void 0,this.textSize=void 0,this.phantom=void 0,this.font=void 0,this.fontFamily=void 0,this.fontWeight=void 0,this.fontShape=void 0,this.sizeMultiplier=void 0,this.maxSize=void 0,this.minRuleThickness=void 0,this._fontMetrics=void 0,this.style=e.style,this.color=e.color,this.size=e.size||t.BASESIZE,this.textSize=e.textSize||this.size,this.phantom=!!e.phantom,this.font=e.font||"",this.fontFamily=e.fontFamily||"",this.fontWeight=e.fontWeight||"",this.fontShape=e.fontShape||"",this.sizeMultiplier=IK[this.size-1],this.maxSize=e.maxSize,this.minRuleThickness=e.minRuleThickness,this._fontMetrics=void 0}extend(e){var r={style:this.style,size:this.size,textSize:this.textSize,color:this.color,phantom:this.phantom,font:this.font,fontFamily:this.fontFamily,fontWeight:this.fontWeight,fontShape:this.fontShape,maxSize:this.maxSize,minRuleThickness:this.minRuleThickness};return Object.assign(r,e),new t(r)}havingStyle(e){return this.style===e?this:this.extend({style:e,size:DK(this.textSize,e)})}havingCrampedStyle(){return this.havingStyle(this.style.cramp())}havingSize(e){return this.size===e&&this.textSize===e?this:this.extend({style:this.style.text(),size:e,textSize:e,sizeMultiplier:IK[e-1]})}havingBaseStyle(e){e=e||this.style.text();var r=DK(t.BASESIZE,e);return this.size===r&&this.textSize===t.BASESIZE&&this.style===e?this:this.extend({style:e,size:r})}havingBaseSizing(){var e;switch(this.style.id){case 4:case 5:e=3;break;case 6:case 7:e=1;break;default:e=6}return this.extend({style:this.style.text(),size:e})}withColor(e){return this.extend({color:e})}withPhantom(){return this.extend({phantom:!0})}withFont(e){return this.extend({font:e})}withTextFontFamily(e){return this.extend({fontFamily:e,font:""})}withTextFontWeight(e){return this.extend({fontWeight:e,font:""})}withTextFontShape(e){return this.extend({fontShape:e,font:""})}sizingClasses(e){return e.size!==this.size?["sizing","reset-size"+e.size,"size"+this.size]:[]}baseSizingClasses(){return this.size!==t.BASESIZE?["sizing","reset-size"+this.size,"size"+t.BASESIZE]:[]}fontMetrics(){return this._fontMetrics||(this._fontMetrics=IPe(this.size)),this._fontMetrics}getColor(){return this.phantom?"transparent":this.color}};hT.BASESIZE=6;pZ=function(e){return new hT({style:e.displayMode?ir.DISPLAY:ir.TEXT,maxSize:e.maxSize,minRuleThickness:e.minRuleThickness})},mZ=function(e,r){if(r.displayMode){var n=["katex-display"];r.leqno&&n.push("leqno"),r.fleqn&&n.push("fleqn"),e=st(n,[e])}return e},jPe=function(e,r,n){var a=pZ(n),i;if(n.output==="mathml")return RK(e,r,a,n.displayMode,!0);if(n.output==="html"){var s=JI(e,a);i=st(["katex"],[s])}else{var o=RK(e,r,a,n.displayMode,!1),l=JI(e,a);i=st(["katex"],[o,l])}return mZ(i,n)},KPe=function(e,r,n){var a=pZ(n),i=JI(e,a),s=st(["katex"],[i]);return mZ(s,n)},ZPe={widehat:"^",widecheck:"\u02C7",widetilde:"~",utilde:"~",overleftarrow:"\u2190",underleftarrow:"\u2190",xleftarrow:"\u2190",overrightarrow:"\u2192",underrightarrow:"\u2192",xrightarrow:"\u2192",underbrace:"\u23DF",overbrace:"\u23DE",underbracket:"\u23B5",overbracket:"\u23B4",overgroup:"\u23E0",undergroup:"\u23E1",overleftrightarrow:"\u2194",underleftrightarrow:"\u2194",xleftrightarrow:"\u2194",Overrightarrow:"\u21D2",xRightarrow:"\u21D2",overleftharpoon:"\u21BC",xleftharpoonup:"\u21BC",overrightharpoon:"\u21C0",xrightharpoonup:"\u21C0",xLeftarrow:"\u21D0",xLeftrightarrow:"\u21D4",xhookleftarrow:"\u21A9",xhookrightarrow:"\u21AA",xmapsto:"\u21A6",xrightharpoondown:"\u21C1",xleftharpoondown:"\u21BD",xrightleftharpoons:"\u21CC",xleftrightharpoons:"\u21CB",xtwoheadleftarrow:"\u219E",xtwoheadrightarrow:"\u21A0",xlongequal:"=",xtofrom:"\u21C4",xrightleftarrows:"\u21C4",xrightequilibrium:"\u21CC",xleftequilibrium:"\u21CB","\\cdrightarrow":"\u2192","\\cdleftarrow":"\u2190","\\cdlongequal":"="},gT=function(e){var r=new ut("mo",[new la(ZPe[e.replace(/^\\/,"")])]);return r.setAttribute("stretchy","true"),r},QPe={overrightarrow:[["rightarrow"],.888,522,"xMaxYMin"],overleftarrow:[["leftarrow"],.888,522,"xMinYMin"],underrightarrow:[["rightarrow"],.888,522,"xMaxYMin"],underleftarrow:[["leftarrow"],.888,522,"xMinYMin"],xrightarrow:[["rightarrow"],1.469,522,"xMaxYMin"],"\\cdrightarrow":[["rightarrow"],3,522,"xMaxYMin"],xleftarrow:[["leftarrow"],1.469,522,"xMinYMin"],"\\cdleftarrow":[["leftarrow"],3,522,"xMinYMin"],Overrightarrow:[["doublerightarrow"],.888,560,"xMaxYMin"],xRightarrow:[["doublerightarrow"],1.526,560,"xMaxYMin"],xLeftarrow:[["doubleleftarrow"],1.526,560,"xMinYMin"],overleftharpoon:[["leftharpoon"],.888,522,"xMinYMin"],xleftharpoonup:[["leftharpoon"],.888,522,"xMinYMin"],xleftharpoondown:[["leftharpoondown"],.888,522,"xMinYMin"],overrightharpoon:[["rightharpoon"],.888,522,"xMaxYMin"],xrightharpoonup:[["rightharpoon"],.888,522,"xMaxYMin"],xrightharpoondown:[["rightharpoondown"],.888,522,"xMaxYMin"],xlongequal:[["longequal"],.888,334,"xMinYMin"],"\\cdlongequal":[["longequal"],3,334,"xMinYMin"],xtwoheadleftarrow:[["twoheadleftarrow"],.888,334,"xMinYMin"],xtwoheadrightarrow:[["twoheadrightarrow"],.888,334,"xMaxYMin"],overleftrightarrow:[["leftarrow","rightarrow"],.888,522],overbrace:[["leftbrace","midbrace","rightbrace"],1.6,548],underbrace:[["leftbraceunder","midbraceunder","rightbraceunder"],1.6,548],underleftrightarrow:[["leftarrow","rightarrow"],.888,522],xleftrightarrow:[["leftarrow","rightarrow"],1.75,522],xLeftrightarrow:[["doubleleftarrow","doublerightarrow"],1.75,560],xrightleftharpoons:[["leftharpoondownplus","rightharpoonplus"],1.75,716],xleftrightharpoons:[["leftharpoonplus","rightharpoondownplus"],1.75,716],xhookleftarrow:[["leftarrow","righthook"],1.08,522],xhookrightarrow:[["lefthook","rightarrow"],1.08,522],overlinesegment:[["leftlinesegment","rightlinesegment"],.888,522],underlinesegment:[["leftlinesegment","rightlinesegment"],.888,522],overbracket:[["leftbracketover","rightbracketover"],1.6,440],underbracket:[["leftbracketunder","rightbracketunder"],1.6,410],overgroup:[["leftgroup","rightgroup"],.888,342],undergroup:[["leftgroupunder","rightgroupunder"],.888,342],xmapsto:[["leftmapsto","rightarrow"],1.5,522],xtofrom:[["leftToFrom","rightToFrom"],1.75,528],xrightleftarrows:[["baraboveleftarrow","rightarrowabovebar"],1.75,901],xrightequilibrium:[["baraboveshortleftharpoon","rightharpoonaboveshortbar"],1.75,716],xleftequilibrium:[["shortbaraboveleftharpoon","shortrightharpoonabovebar"],1.75,716]},JPe=new Set(["widehat","widecheck","widetilde","utilde"]),vT=function(e,r){function n(){var o=4e5,l=e.label.slice(1);if(JPe.has(l)&&"base"in e){var u=e.base.type==="ordgroup"?e.base.body.length:1,h,f,d;if(u>5)l==="widehat"||l==="widecheck"?(h=420,o=2364,d=.42,f=l+"4"):(h=312,o=2340,d=.34,f="tilde4");else{var p=[1,1,2,2,3,3][u];l==="widehat"||l==="widecheck"?(o=[0,1062,2364,2364,2364][p],h=[0,239,300,360,420][p],d=[0,.24,.3,.3,.36,.42][p],f=l+p):(o=[0,600,1033,2339,2340][p],h=[0,260,286,306,312][p],d=[0,.26,.286,.3,.306,.34][p],f="tilde"+p)}var m=new Gu(f),g=new ql([m],{width:"100%",height:mt(d),viewBox:"0 0 "+o+" "+h,preserveAspectRatio:"none"});return{span:Ff([],[g],r),minWidth:0,height:d}}else{var v=[],y=QPe[l];if(!y)throw new Error('No SVG data for "'+l+'".');var[b,w,C]=y,k=C/1e3,E=b.length,_,S;if(E===1){if(y.length!==4)throw new Error('Expected 4-tuple for single-path SVG data "'+l+'".');_=["hide-tail"],S=[y[3]]}else if(E===2)_=["halfarrow-left","halfarrow-right"],S=["xMinYMin","xMaxYMin"];else if(E===3)_=["brace-left","brace-center","brace-right"],S=["xMinYMin","xMidYMin","xMaxYMin"];else throw new Error(`Correct katexImagesData or update code here to support - `+E+" children.");for(var L=0;L0&&(a.style.minWidth=mt(i)),a},eBe=function(e,r,n,a,i){var s,o=e.height+e.depth+n+a;if(/fbox|color|angl/.test(r)){if(s=st(["stretchy",r],[],i),r==="fbox"){var l=i.color&&i.getColor();l&&(s.style.borderColor=l)}}else{var u=[];/^[bx]cancel$/.test(r)&&u.push(new Pb({x1:"0",y1:"0",x2:"100%",y2:"100%","stroke-width":"0.046em"})),/^x?cancel$/.test(r)&&u.push(new Pb({x1:"0",y1:"100%",x2:"100%",y2:"0","stroke-width":"0.046em"}));var h=new ql(u,{width:"100%",height:mt(o)});s=Ff([],[h],i)}return s.height=o,s.style.height=mt(o),s},tBe={bin:1,close:1,inner:1,open:1,punct:1,rel:1},rBe={"accent-token":1,mathord:1,"op-token":1,spacing:1,textord:1};gZ=t=>{if(t instanceof xs)return t;if(RPe(t)&&t.children.length===1)return gZ(t.children[0])},pD=(t,e)=>{var r,n,a;t&&t.type==="supsub"?(n=dr(t.base,"accent"),r=n.base,t.base=r,a=LPe(Xr(t,e)),t.base=n):(n=dr(t,"accent"),r=n.base);var i=Xr(r,e.havingCrampedStyle()),s=n.isShifty&&mh(r),o=0;if(s){var l,u;o=(l=(u=gZ(i))==null?void 0:u.skew)!=null?l:0}var h=n.label==="\\c",f=h?i.height+i.depth:Math.min(i.height,e.fontMetrics().xHeight),d;if(n.isStretchy)d=vT(n,e),d=Yr({positionType:"firstBaseline",children:[{type:"elem",elem:i},{type:"elem",elem:d,wrapperClasses:["svg-align"],wrapperStyle:o>0?{width:"calc(100% - "+mt(2*o)+")",marginLeft:mt(2*o)}:void 0}]});else{var p,m;n.label==="\\vec"?(p=cZ("vec",e),m=uZ.vec[1]):(p=mT({type:"textord",mode:n.mode,text:n.label},e,"textord"),p=APe(p),p.italic=0,m=p.width,h&&(f+=p.depth)),d=st(["accent-body"],[p]);var g=n.label==="\\textcircled";g&&(d.classes.push("accent-full"),f=i.height);var v=o;g||(v-=m/2),d.style.left=mt(v),n.label==="\\textcircled"&&(d.style.top=".2em"),d=Yr({positionType:"firstBaseline",children:[{type:"elem",elem:i},{type:"kern",size:-f},{type:"elem",elem:d}]})}var y=st(["mord","accent"],[d],e);return a?(a.children[0]=y,a.height=Math.max(y.height,a.height),a.classes[0]="mord",a):y},vZ=(t,e)=>{var r=t.isStretchy?gT(t.label):new ut("mo",[nl(t.label,t.mode)]),n=new ut("mover",[mn(t.base,e),r]);return n.setAttribute("accent","true"),n},aBe=new RegExp(["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring"].map(t=>"\\"+t).join("|"));Et({type:"accent",names:["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring","\\widecheck","\\widehat","\\widetilde","\\overrightarrow","\\overleftarrow","\\Overrightarrow","\\overleftrightarrow","\\overgroup","\\overlinesegment","\\overleftharpoon","\\overrightharpoon"],props:{numArgs:1},handler:(t,e)=>{var r=uT(e[0]),n=!aBe.test(t.funcName),a=!n||t.funcName==="\\widehat"||t.funcName==="\\widetilde"||t.funcName==="\\widecheck";return{type:"accent",mode:t.parser.mode,label:t.funcName,isStretchy:n,isShifty:a,base:r}},htmlBuilder:pD,mathmlBuilder:vZ});Et({type:"accent",names:["\\'","\\`","\\^","\\~","\\=","\\u","\\.",'\\"',"\\c","\\r","\\H","\\v","\\textcircled"],props:{numArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:["primitive"]},handler:(t,e)=>{var r=e[0],n=t.parser.mode;return n==="math"&&(t.parser.settings.reportNonstrict("mathVsTextAccents","LaTeX's accent "+t.funcName+" works only in text mode"),n="text"),{type:"accent",mode:n,label:t.funcName,isStretchy:!1,isShifty:!0,base:r}},htmlBuilder:pD,mathmlBuilder:vZ});Et({type:"accentUnder",names:["\\underleftarrow","\\underrightarrow","\\underleftrightarrow","\\undergroup","\\underlinesegment","\\utilde"],props:{numArgs:1},handler:(t,e)=>{var{parser:r,funcName:n}=t,a=e[0];return{type:"accentUnder",mode:r.mode,label:n,base:a}},htmlBuilder:(t,e)=>{var r=Xr(t.base,e),n=vT(t,e),a=t.label==="\\utilde"?.12:0,i=Yr({positionType:"top",positionData:r.height,children:[{type:"elem",elem:n,wrapperClasses:["svg-align"]},{type:"kern",size:a},{type:"elem",elem:r}]});return st(["mord","accentunder"],[i],e)},mathmlBuilder:(t,e)=>{var r=gT(t.label),n=new ut("munder",[mn(t.base,e),r]);return n.setAttribute("accentunder","true"),n}});Jk=t=>{var e=new ut("mpadded",t?[t]:[]);return e.setAttribute("width","+0.6em"),e.setAttribute("lspace","0.3em"),e};Et({type:"xArrow",names:["\\xleftarrow","\\xrightarrow","\\xLeftarrow","\\xRightarrow","\\xleftrightarrow","\\xLeftrightarrow","\\xhookleftarrow","\\xhookrightarrow","\\xmapsto","\\xrightharpoondown","\\xrightharpoonup","\\xleftharpoondown","\\xleftharpoonup","\\xrightleftharpoons","\\xleftrightharpoons","\\xlongequal","\\xtwoheadrightarrow","\\xtwoheadleftarrow","\\xtofrom","\\xrightleftarrows","\\xrightequilibrium","\\xleftequilibrium","\\\\cdrightarrow","\\\\cdleftarrow","\\\\cdlongequal"],props:{numArgs:1,numOptionalArgs:1},handler(t,e,r){var{parser:n,funcName:a}=t;return{type:"xArrow",mode:n.mode,label:a,body:e[0],below:r[0]}},htmlBuilder(t,e){var r=e.style,n=e.havingStyle(r.sup()),a=Fg(Xr(t.body,n,e),e),i=t.label.slice(0,2)==="\\x"?"x":"cd";a.classes.push(i+"-arrow-pad");var s;t.below&&(n=e.havingStyle(r.sub()),s=Fg(Xr(t.below,n,e),e),s.classes.push(i+"-arrow-pad"));var o=vT(t,e),l=-e.fontMetrics().axisHeight+.5*o.height,u=-e.fontMetrics().axisHeight-.5*o.height-.111;(a.depth>.25||t.label==="\\xleftequilibrium")&&(u-=a.depth);var h;if(s){var f=-e.fontMetrics().axisHeight+s.height+.5*o.height+.111;h=Yr({positionType:"individualShift",children:[{type:"elem",elem:a,shift:u},{type:"elem",elem:o,shift:l,wrapperClasses:["svg-align"]},{type:"elem",elem:s,shift:f}]})}else h=Yr({positionType:"individualShift",children:[{type:"elem",elem:a,shift:u},{type:"elem",elem:o,shift:l,wrapperClasses:["svg-align"]}]});return st(["mrel","x-arrow"],[h],e)},mathmlBuilder(t,e){var r=gT(t.label);r.setAttribute("minsize",t.label.charAt(0)==="x"?"1.75em":"3.0em");var n;if(t.body){var a=Jk(mn(t.body,e));if(t.below){var i=Jk(mn(t.below,e));n=new ut("munderover",[r,i,a])}else n=new ut("mover",[r,a])}else if(t.below){var s=Jk(mn(t.below,e));n=new ut("munder",[r,s])}else n=Jk(),n=new ut("mover",[r,n]);return n}});Et({type:"mclass",names:["\\mathord","\\mathbin","\\mathrel","\\mathopen","\\mathclose","\\mathpunct","\\mathinner"],props:{numArgs:1,primitive:!0},handler(t,e){var{parser:r,funcName:n}=t,a=e[0];return{type:"mclass",mode:r.mode,mclass:"m"+n.slice(5),body:Ra(a),isCharacterBox:mh(a)}},htmlBuilder:yZ,mathmlBuilder:xZ});bT=t=>{var e=t.type==="ordgroup"&&t.body.length?t.body[0]:t;return e.type==="atom"&&(e.family==="bin"||e.family==="rel")?"m"+e.family:"mord"};Et({type:"mclass",names:["\\@binrel"],props:{numArgs:2},handler(t,e){var{parser:r}=t;return{type:"mclass",mode:r.mode,mclass:bT(e[0]),body:Ra(e[1]),isCharacterBox:mh(e[1])}}});Et({type:"mclass",names:["\\stackrel","\\overset","\\underset"],props:{numArgs:2},handler(t,e){var{parser:r,funcName:n}=t,a=e[1],i=e[0],s;n!=="\\stackrel"?s=bT(a):s="mrel";var o={type:"op",mode:a.mode,limits:!0,alwaysHandleSupSub:!0,parentIsSupSub:!1,symbol:!1,suppressBaseShift:n!=="\\stackrel",body:Ra(a)},l={type:"supsub",mode:i.mode,base:o,sup:n==="\\underset"?null:i,sub:n==="\\underset"?i:null};return{type:"mclass",mode:r.mode,mclass:s,body:[l],isCharacterBox:mh(l)}},htmlBuilder:yZ,mathmlBuilder:xZ});Et({type:"pmb",names:["\\pmb"],props:{numArgs:1,allowedInText:!0},handler(t,e){var{parser:r}=t;return{type:"pmb",mode:r.mode,mclass:bT(e[0]),body:Ra(e[0])}},htmlBuilder(t,e){var r=Va(t.body,e,!0),n=st([t.mclass],r,e);return n.style.textShadow="0.02em 0.01em 0.04px",n},mathmlBuilder(t,e){var r=No(t.body,e),n=new ut("mstyle",r);return n.setAttribute("style","text-shadow: 0.02em 0.01em 0.04px"),n}});iBe={">":"\\\\cdrightarrow","<":"\\\\cdleftarrow","=":"\\\\cdlongequal",A:"\\uparrow",V:"\\downarrow","|":"\\Vert",".":"no arrow"},NK=()=>({type:"styling",body:[],mode:"math",style:"display",resetFont:!0}),MK=t=>t.type==="textord"&&t.text==="@",sBe=(t,e)=>(t.type==="mathord"||t.type==="atom")&&t.text===e;Et({type:"cdlabel",names:["\\\\cdleft","\\\\cdright"],props:{numArgs:1},handler(t,e){var{parser:r,funcName:n}=t;return{type:"cdlabel",mode:r.mode,side:n.slice(4),label:e[0]}},htmlBuilder(t,e){var r=e.havingStyle(e.style.sup()),n=Fg(Xr(t.label,r,e),e);return n.classes.push("cd-label-"+t.side),n.style.bottom=mt(.8-n.depth),n.height=0,n.depth=0,n},mathmlBuilder(t,e){var r=new ut("mrow",[mn(t.label,e)]);return r=new ut("mpadded",[r]),r.setAttribute("width","0"),t.side==="left"&&r.setAttribute("lspace","-1width"),r.setAttribute("voffset","0.7em"),r=new ut("mstyle",[r]),r.setAttribute("displaystyle","false"),r.setAttribute("scriptlevel","1"),r}});Et({type:"cdlabelparent",names:["\\\\cdparent"],props:{numArgs:1},handler(t,e){var{parser:r}=t;return{type:"cdlabelparent",mode:r.mode,fragment:e[0]}},htmlBuilder(t,e){var r=Fg(Xr(t.fragment,e),e);return r.classes.push("cd-vert-arrow"),r},mathmlBuilder(t,e){return new ut("mrow",[mn(t.fragment,e)])}});Et({type:"textord",names:["\\@char"],props:{numArgs:1,allowedInText:!0},handler(t,e){for(var{parser:r}=t,n=dr(e[0],"ordgroup"),a=n.body,i="",s=0;s=1114111)throw new ht("\\@char with invalid code point "+i);return l<=65535?u=String.fromCharCode(l):(l-=65536,u=String.fromCharCode((l>>10)+55296,(l&1023)+56320)),{type:"textord",mode:r.mode,text:u}}});bZ=(t,e)=>{var r=Va(t.body,e.withColor(t.color),!1);return vh(r)},wZ=(t,e)=>{var r=No(t.body,e.withColor(t.color)),n=new ut("mstyle",r);return n.setAttribute("mathcolor",t.color),n};Et({type:"color",names:["\\textcolor"],props:{numArgs:2,allowedInText:!0,argTypes:["color","original"]},handler(t,e){var{parser:r}=t,n=dr(e[0],"color-token").color,a=e[1];return{type:"color",mode:r.mode,color:n,body:Ra(a)}},htmlBuilder:bZ,mathmlBuilder:wZ});Et({type:"color",names:["\\color"],props:{numArgs:1,allowedInText:!0,argTypes:["color"]},handler(t,e){var{parser:r,breakOnTokenText:n}=t,a=dr(e[0],"color-token").color;r.gullet.macros.set("\\current@color",a);var i=r.parseExpression(!0,n);return{type:"color",mode:r.mode,color:a,body:i}},htmlBuilder:bZ,mathmlBuilder:wZ});Et({type:"cr",names:["\\\\"],props:{numArgs:0,numOptionalArgs:0,allowedInText:!0},handler(t,e,r){var{parser:n}=t,a=n.gullet.future().text==="["?n.parseSizeGroup(!0):null,i=!n.settings.displayMode||!n.settings.useStrictBehavior("newLineInDisplayMode","In LaTeX, \\\\ or \\newline does nothing in display mode");return{type:"cr",mode:n.mode,newLine:i,size:a&&dr(a,"size").value}},htmlBuilder(t,e){var r=st(["mspace"],[],e);return t.newLine&&(r.classes.push("newline"),t.size&&(r.style.marginTop=mt(ta(t.size,e)))),r},mathmlBuilder(t,e){var r=new ut("mspace");return t.newLine&&(r.setAttribute("linebreak","newline"),t.size&&r.setAttribute("height",mt(ta(t.size,e)))),r}});eD={"\\global":"\\global","\\long":"\\\\globallong","\\\\globallong":"\\\\globallong","\\def":"\\gdef","\\gdef":"\\gdef","\\edef":"\\xdef","\\xdef":"\\xdef","\\let":"\\\\globallet","\\futurelet":"\\\\globalfuture"},kZ=t=>{var e=t.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(e))throw new ht("Expected a control sequence",t);return e},uBe=t=>{var e=t.gullet.popToken();return e.text==="="&&(e=t.gullet.popToken(),e.text===" "&&(e=t.gullet.popToken())),e},TZ=(t,e,r,n)=>{var a=t.gullet.macros.get(r.text);a==null&&(r.noexpand=!0,a={tokens:[r],numArgs:0,unexpandable:!t.gullet.isExpandable(r.text)}),t.gullet.macros.set(e,a,n)};Et({type:"internal",names:["\\global","\\long","\\\\globallong"],props:{numArgs:0,allowedInText:!0},handler(t){var{parser:e,funcName:r}=t;e.consumeSpaces();var n=e.fetch();if(eD[n.text])return(r==="\\global"||r==="\\\\globallong")&&(n.text=eD[n.text]),dr(e.parseFunction(),"internal");throw new ht("Invalid token after macro prefix",n)}});Et({type:"internal",names:["\\def","\\gdef","\\edef","\\xdef"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(t){var{parser:e,funcName:r}=t,n=e.gullet.popToken(),a=n.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(a))throw new ht("Expected a control sequence",n);for(var i=0,s,o=[[]];e.gullet.future().text!=="{";)if(n=e.gullet.popToken(),n.text==="#"){if(e.gullet.future().text==="{"){s=e.gullet.future(),o[i].push("{");break}if(n=e.gullet.popToken(),!/^[1-9]$/.test(n.text))throw new ht('Invalid argument number "'+n.text+'"');if(parseInt(n.text)!==i+1)throw new ht('Argument number "'+n.text+'" out of order');i++,o.push([])}else{if(n.text==="EOF")throw new ht("Expected a macro definition");o[i].push(n.text)}var{tokens:l}=e.gullet.consumeArg();return s&&l.unshift(s),(r==="\\edef"||r==="\\xdef")&&(l=e.gullet.expandTokens(l),l.reverse()),e.gullet.macros.set(a,{tokens:l,numArgs:i,delimiters:o},r===eD[r]),{type:"internal",mode:e.mode}}});Et({type:"internal",names:["\\let","\\\\globallet"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(t){var{parser:e,funcName:r}=t,n=kZ(e.gullet.popToken());e.gullet.consumeSpaces();var a=uBe(e);return TZ(e,n,a,r==="\\\\globallet"),{type:"internal",mode:e.mode}}});Et({type:"internal",names:["\\futurelet","\\\\globalfuture"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(t){var{parser:e,funcName:r}=t,n=kZ(e.gullet.popToken()),a=e.gullet.popToken(),i=e.gullet.popToken();return TZ(e,n,i,r==="\\\\globalfuture"),e.gullet.pushToken(i),e.gullet.pushToken(a),{type:"internal",mode:e.mode}}});Db=function(e,r,n){var a=$n.math[e]&&$n.math[e].replace,i=uD(a||e,r,n);if(!i)throw new Error("Unsupported symbol "+e+" and font size "+r+".");return i},mD=function(e,r,n,a){var i=n.havingBaseStyle(r),s=st(a.concat(i.sizingClasses(n)),[e],n),o=i.sizeMultiplier/n.sizeMultiplier;return s.height*=o,s.depth*=o,s.maxFontSize=i.sizeMultiplier,s},EZ=function(e,r,n){var a=r.havingBaseStyle(n),i=(1-r.sizeMultiplier/a.sizeMultiplier)*r.fontMetrics().axisHeight;e.classes.push("delimcenter"),e.style.top=mt(i),e.height-=i,e.depth+=i},cBe=function(e,r,n,a,i,s){var o=vs(e,"Main-Regular",i,a),l=mD(o,r,a,s);return n&&EZ(l,a,r),l},hBe=function(e,r,n,a){return vs(e,"Size"+r+"-Regular",n,a)},CZ=function(e,r,n,a,i,s){var o=hBe(e,r,i,a),l=mD(st(["delimsizing","size"+r],[o],a),ir.TEXT,a,s);return n&&EZ(l,a,ir.TEXT),l},II=function(e,r,n){var a;r==="Size1-Regular"?a="delim-size1":a="delim-size4";var i=st(["delimsizinginner",a],[st([],[vs(e,r,n)])]);return{type:"elem",elem:i}},DI=function(e,r,n){var a=$u["Size4-Regular"][e.charCodeAt(0)]?$u["Size4-Regular"][e.charCodeAt(0)][4]:$u["Size1-Regular"][e.charCodeAt(0)][4],i=new Gu("inner",kPe(e,Math.round(1e3*r))),s=new ql([i],{width:mt(a),height:mt(r),style:"width:"+mt(a),viewBox:"0 0 "+1e3*a+" "+Math.round(1e3*r),preserveAspectRatio:"xMinYMin"}),o=Ff([],[s],n);return o.height=r,o.style.height=mt(r),o.style.width=mt(a),{type:"elem",elem:o}},tD=.008,eT={type:"kern",size:-1*tD},fBe=new Set(["|","\\lvert","\\rvert","\\vert"]),dBe=new Set(["\\|","\\lVert","\\rVert","\\Vert"]),SZ=function(e,r,n,a,i,s){var o,l,u,h,f="",d=0;o=u=h=e,l=null;var p="Size1-Regular";e==="\\uparrow"?u=h="\u23D0":e==="\\Uparrow"?u=h="\u2016":e==="\\downarrow"?o=u="\u23D0":e==="\\Downarrow"?o=u="\u2016":e==="\\updownarrow"?(o="\\uparrow",u="\u23D0",h="\\downarrow"):e==="\\Updownarrow"?(o="\\Uparrow",u="\u2016",h="\\Downarrow"):fBe.has(e)?(u="\u2223",f="vert",d=333):dBe.has(e)?(u="\u2225",f="doublevert",d=556):e==="["||e==="\\lbrack"?(o="\u23A1",u="\u23A2",h="\u23A3",p="Size4-Regular",f="lbrack",d=667):e==="]"||e==="\\rbrack"?(o="\u23A4",u="\u23A5",h="\u23A6",p="Size4-Regular",f="rbrack",d=667):e==="\\lfloor"||e==="\u230A"?(u=o="\u23A2",h="\u23A3",p="Size4-Regular",f="lfloor",d=667):e==="\\lceil"||e==="\u2308"?(o="\u23A1",u=h="\u23A2",p="Size4-Regular",f="lceil",d=667):e==="\\rfloor"||e==="\u230B"?(u=o="\u23A5",h="\u23A6",p="Size4-Regular",f="rfloor",d=667):e==="\\rceil"||e==="\u2309"?(o="\u23A4",u=h="\u23A5",p="Size4-Regular",f="rceil",d=667):e==="("||e==="\\lparen"?(o="\u239B",u="\u239C",h="\u239D",p="Size4-Regular",f="lparen",d=875):e===")"||e==="\\rparen"?(o="\u239E",u="\u239F",h="\u23A0",p="Size4-Regular",f="rparen",d=875):e==="\\{"||e==="\\lbrace"?(o="\u23A7",l="\u23A8",h="\u23A9",u="\u23AA",p="Size4-Regular"):e==="\\}"||e==="\\rbrace"?(o="\u23AB",l="\u23AC",h="\u23AD",u="\u23AA",p="Size4-Regular"):e==="\\lgroup"||e==="\u27EE"?(o="\u23A7",h="\u23A9",u="\u23AA",p="Size4-Regular"):e==="\\rgroup"||e==="\u27EF"?(o="\u23AB",h="\u23AD",u="\u23AA",p="Size4-Regular"):e==="\\lmoustache"||e==="\u23B0"?(o="\u23A7",h="\u23AD",u="\u23AA",p="Size4-Regular"):(e==="\\rmoustache"||e==="\u23B1")&&(o="\u23AB",h="\u23A9",u="\u23AA",p="Size4-Regular");var m=Db(o,p,i),g=m.height+m.depth,v=Db(u,p,i),y=v.height+v.depth,b=Db(h,p,i),w=b.height+b.depth,C=0,k=1;if(l!==null){var E=Db(l,p,i);C=E.height+E.depth,k=2}var _=g+w+C,S=Math.max(0,Math.ceil((r-_)/(k*y))),L=_+S*k*y,M=a.fontMetrics().axisHeight;n&&(M*=a.sizeMultiplier);var D=L/2-M,T=[];if(f.length>0){var I=L-g-w,N=Math.round(L*1e3),O=TPe(f,Math.round(I*1e3)),R=new Gu(f,O),P=mt(d/1e3),B=mt(N/1e3),F=new ql([R],{width:P,height:B,viewBox:"0 0 "+d+" "+N}),G=Ff([],[F],a);G.height=N/1e3,G.style.width=P,G.style.height=B,T.push({type:"elem",elem:G})}else{if(T.push(II(h,p,i)),T.push(eT),l===null){var z=L-g-w+2*tD;T.push(DI(u,z,a))}else{var H=(L-g-w-C)/2+2*tD;T.push(DI(u,H,a)),T.push(eT),T.push(II(l,p,i)),T.push(eT),T.push(DI(u,H,a))}T.push(eT),T.push(II(o,p,i))}var Q=a.havingBaseStyle(ir.TEXT),Y=Yr({positionType:"bottom",positionData:D,children:T});return mD(st(["delimsizing","mult"],[Y],Q),ir.TEXT,a,s)},NI=80,MI=.08,OI=function(e,r,n,a,i){var s=wPe(e,a,n),o=new Gu(e,s),l=new ql([o],{width:"400em",height:mt(r),viewBox:"0 0 400000 "+n,preserveAspectRatio:"xMinYMin slice"});return Ff(["hide-tail"],[l],i)},pBe=function(e,r){var n=r.havingBaseSizing(),a=IZ("\\surd",e*n.sizeMultiplier,RZ,n),i=n.sizeMultiplier,s=Math.max(0,r.minRuleThickness-r.fontMetrics().sqrtRuleThickness),o,l,u,h,f;return a.type==="small"?(h=1e3+1e3*s+NI,e<1?i=1:e<1.4&&(i=.7),l=(1+s+MI)/i,u=(1+s)/i,o=OI("sqrtMain",l,h,s,r),o.style.minWidth="0.853em",f=.833/i):a.type==="large"?(h=(1e3+NI)*Nb[a.size],u=(Nb[a.size]+s)/i,l=(Nb[a.size]+s+MI)/i,o=OI("sqrtSize"+a.size,l,h,s,r),o.style.minWidth="1.02em",f=1/i):(l=e+s+MI,u=e+s,h=Math.floor(1e3*e+s)+NI,o=OI("sqrtTall",l,h,s,r),o.style.minWidth="0.742em",f=1.056),o.height=u,o.style.height=mt(l),{span:o,advanceWidth:f,ruleWidth:(r.fontMetrics().sqrtRuleThickness+s)*i}},_Z=new Set(["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","\u230A","\u230B","\\lceil","\\rceil","\u2308","\u2309","\\surd"]),mBe=new Set(["\\uparrow","\\downarrow","\\updownarrow","\\Uparrow","\\Downarrow","\\Updownarrow","|","\\|","\\vert","\\Vert","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","\u27EE","\u27EF","\\lmoustache","\\rmoustache","\u23B0","\u23B1"]),AZ=new Set(["<",">","\\langle","\\rangle","/","\\backslash","\\lt","\\gt"]),Nb=[0,1.2,1.8,2.4,3],LZ=function(e,r,n,a,i){if(e==="<"||e==="\\lt"||e==="\u27E8"?e="\\langle":(e===">"||e==="\\gt"||e==="\u27E9")&&(e="\\rangle"),_Z.has(e)||AZ.has(e))return CZ(e,r,!1,n,a,i);if(mBe.has(e))return SZ(e,Nb[r],!1,n,a,i);throw new ht("Illegal delimiter: '"+e+"'")},gBe=[{type:"small",style:ir.SCRIPTSCRIPT},{type:"small",style:ir.SCRIPT},{type:"small",style:ir.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4}],vBe=[{type:"small",style:ir.SCRIPTSCRIPT},{type:"small",style:ir.SCRIPT},{type:"small",style:ir.TEXT},{type:"stack"}],RZ=[{type:"small",style:ir.SCRIPTSCRIPT},{type:"small",style:ir.SCRIPT},{type:"small",style:ir.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4},{type:"stack"}],yBe=function(e){if(e.type==="small")return"Main-Regular";if(e.type==="large")return"Size"+e.size+"-Regular";if(e.type==="stack")return"Size4-Regular";var r=e.type;throw new Error("Add support for delim type '"+r+"' here.")},IZ=function(e,r,n,a){for(var i=Math.min(2,3-a.style.size),s=i;sr)return o}return n[n.length-1]},rD=function(e,r,n,a,i,s){e==="<"||e==="\\lt"||e==="\u27E8"?e="\\langle":(e===">"||e==="\\gt"||e==="\u27E9")&&(e="\\rangle");var o;AZ.has(e)?o=gBe:_Z.has(e)?o=RZ:o=vBe;var l=IZ(e,r,o,a);return l.type==="small"?cBe(e,l.style,n,a,i,s):l.type==="large"?CZ(e,l.size,n,a,i,s):SZ(e,r,n,a,i,s)},PI=function(e,r,n,a,i,s){var o=a.fontMetrics().axisHeight*a.sizeMultiplier,l=901,u=5/a.fontMetrics().ptPerEm,h=Math.max(r-o,n+o),f=Math.max(h/500*l,2*h-u);return rD(e,f,!0,a,i,s)},OK={"\\bigl":{mclass:"mopen",size:1},"\\Bigl":{mclass:"mopen",size:2},"\\biggl":{mclass:"mopen",size:3},"\\Biggl":{mclass:"mopen",size:4},"\\bigr":{mclass:"mclose",size:1},"\\Bigr":{mclass:"mclose",size:2},"\\biggr":{mclass:"mclose",size:3},"\\Biggr":{mclass:"mclose",size:4},"\\bigm":{mclass:"mrel",size:1},"\\Bigm":{mclass:"mrel",size:2},"\\biggm":{mclass:"mrel",size:3},"\\Biggm":{mclass:"mrel",size:4},"\\big":{mclass:"mord",size:1},"\\Big":{mclass:"mord",size:2},"\\bigg":{mclass:"mord",size:3},"\\Bigg":{mclass:"mord",size:4}},xBe=new Set(["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","\u230A","\u230B","\\lceil","\\rceil","\u2308","\u2309","<",">","\\langle","\u27E8","\\rangle","\u27E9","\\lt","\\gt","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","\u27EE","\u27EF","\\lmoustache","\\rmoustache","\u23B0","\u23B1","/","\\backslash","|","\\vert","\\|","\\Vert","\\uparrow","\\Uparrow","\\downarrow","\\Downarrow","\\updownarrow","\\Updownarrow","."]);Et({type:"delimsizing",names:["\\bigl","\\Bigl","\\biggl","\\Biggl","\\bigr","\\Bigr","\\biggr","\\Biggr","\\bigm","\\Bigm","\\biggm","\\Biggm","\\big","\\Big","\\bigg","\\Bigg"],props:{numArgs:1,argTypes:["primitive"]},handler:(t,e)=>{var r=wT(e[0],t);return{type:"delimsizing",mode:t.parser.mode,size:OK[t.funcName].size,mclass:OK[t.funcName].mclass,delim:r.text}},htmlBuilder:(t,e)=>t.delim==="."?st([t.mclass]):LZ(t.delim,t.size,e,t.mode,[t.mclass]),mathmlBuilder:t=>{var e=[];t.delim!=="."&&e.push(nl(t.delim,t.mode));var r=new ut("mo",e);t.mclass==="mopen"||t.mclass==="mclose"?r.setAttribute("fence","true"):r.setAttribute("fence","false"),r.setAttribute("stretchy","true");var n=mt(Nb[t.size]);return r.setAttribute("minsize",n),r.setAttribute("maxsize",n),r}});Et({type:"leftright-right",names:["\\right"],props:{numArgs:1,primitive:!0},handler:(t,e)=>{var r=t.parser.gullet.macros.get("\\current@color");if(r&&typeof r!="string")throw new ht("\\current@color set to non-string in \\right");return{type:"leftright-right",mode:t.parser.mode,delim:wT(e[0],t).text,color:r}}});Et({type:"leftright",names:["\\left"],props:{numArgs:1,primitive:!0},handler:(t,e)=>{var r=wT(e[0],t),n=t.parser;++n.leftrightDepth;var a=n.parseExpression(!1);--n.leftrightDepth,n.expect("\\right",!1);var i=dr(n.parseFunction(),"leftright-right");return{type:"leftright",mode:n.mode,body:a,left:r.text,right:i.delim,rightColor:i.color}},htmlBuilder:(t,e)=>{BK(t);for(var r=Va(t.body,e,!0,["mopen","mclose"]),n=0,a=0,i=!1,s=0;s{BK(t);var r=No(t.body,e);if(t.left!=="."){var n=new ut("mo",[nl(t.left,t.mode)]);n.setAttribute("fence","true"),r.unshift(n)}if(t.right!=="."){var a=new ut("mo",[nl(t.right,t.mode)]);a.setAttribute("fence","true"),t.rightColor&&a.setAttribute("mathcolor",t.rightColor),r.push(a)}return fD(r)}});Et({type:"middle",names:["\\middle"],props:{numArgs:1,primitive:!0},handler:(t,e)=>{var r=wT(e[0],t);if(!t.parser.leftrightDepth)throw new ht("\\middle without preceding \\left",r);return{type:"middle",mode:t.parser.mode,delim:r.text}},htmlBuilder:(t,e)=>{var r;return t.delim==="."?r=Bb(e,[]):(r=LZ(t.delim,1,e,t.mode,[]),r.isMiddle={delim:t.delim,options:e}),r},mathmlBuilder:(t,e)=>{var r=t.delim==="\\vert"||t.delim==="|"?nl("|","text"):nl(t.delim,t.mode),n=new ut("mo",[r]);return n.setAttribute("fence","true"),n.setAttribute("lspace","0.05em"),n.setAttribute("rspace","0.05em"),n}});kT=(t,e)=>{var r=Fg(Xr(t.body,e),e),n=t.label.slice(1),a=e.sizeMultiplier,i,s,o=mh(t.body);if(n==="sout")i=st(["stretchy","sout"]),i.height=e.fontMetrics().defaultRuleThickness/a,s=-.5*e.fontMetrics().xHeight;else if(n==="phase"){var l=ta({number:.6,unit:"pt"},e),u=ta({number:.35,unit:"ex"},e),h=e.havingBaseSizing();a=a/h.sizeMultiplier;var f=r.height+r.depth+l+u;r.style.paddingLeft=mt(f/2+l);var d=Math.floor(1e3*f*a),p=xPe(d),m=new ql([new Gu("phase",p)],{width:"400em",height:mt(d/1e3),viewBox:"0 0 400000 "+d,preserveAspectRatio:"xMinYMin slice"});i=Ff(["hide-tail"],[m],e),i.style.height=mt(f),s=r.depth+l+u}else{/cancel/.test(n)?o||r.classes.push("cancel-pad"):n==="angl"?r.classes.push("anglpad"):r.classes.push("boxpad");var g,v,y=0;/box/.test(n)?(y=Math.max(e.fontMetrics().fboxrule,e.minRuleThickness),g=e.fontMetrics().fboxsep+(n==="colorbox"?0:y),v=g):n==="angl"?(y=Math.max(e.fontMetrics().defaultRuleThickness,e.minRuleThickness),g=4*y,v=Math.max(0,.25-r.depth)):(g=o?.2:0,v=g),i=eBe(r,n,g,v,e),/fbox|boxed|fcolorbox/.test(n)?(i.style.borderStyle="solid",i.style.borderWidth=mt(y)):n==="angl"&&y!==.049&&(i.style.borderTopWidth=mt(y),i.style.borderRightWidth=mt(y)),s=r.depth+v,t.backgroundColor&&(i.style.backgroundColor=t.backgroundColor,t.borderColor&&(i.style.borderColor=t.borderColor))}var b;if(t.backgroundColor)b=Yr({positionType:"individualShift",children:[{type:"elem",elem:i,shift:s},{type:"elem",elem:r,shift:0}]});else{var w=/cancel|phase/.test(n)?["svg-align"]:[];b=Yr({positionType:"individualShift",children:[{type:"elem",elem:r,shift:0},{type:"elem",elem:i,shift:s,wrapperClasses:w}]})}return/cancel/.test(n)&&(b.height=r.height,b.depth=r.depth),/cancel/.test(n)&&!o?st(["mord","cancel-lap"],[b],e):st(["mord"],[b],e)},TT=(t,e)=>{var r,n=new ut(t.label.includes("colorbox")?"mpadded":"menclose",[mn(t.body,e)]);switch(t.label){case"\\cancel":n.setAttribute("notation","updiagonalstrike");break;case"\\bcancel":n.setAttribute("notation","downdiagonalstrike");break;case"\\phase":n.setAttribute("notation","phasorangle");break;case"\\sout":n.setAttribute("notation","horizontalstrike");break;case"\\fbox":n.setAttribute("notation","box");break;case"\\angl":n.setAttribute("notation","actuarial");break;case"\\fcolorbox":case"\\colorbox":if(r=e.fontMetrics().fboxsep*e.fontMetrics().ptPerEm,n.setAttribute("width","+"+2*r+"pt"),n.setAttribute("height","+"+2*r+"pt"),n.setAttribute("lspace",r+"pt"),n.setAttribute("voffset",r+"pt"),t.label==="\\fcolorbox"){var a=Math.max(e.fontMetrics().fboxrule,e.minRuleThickness);n.setAttribute("style","border: "+mt(a)+" solid "+t.borderColor)}break;case"\\xcancel":n.setAttribute("notation","updiagonalstrike downdiagonalstrike");break}return t.backgroundColor&&n.setAttribute("mathbackground",t.backgroundColor),n};Et({type:"enclose",names:["\\colorbox"],props:{numArgs:2,allowedInText:!0,argTypes:["color","hbox"]},handler(t,e,r){var{parser:n,funcName:a}=t,i=dr(e[0],"color-token").color,s=e[1];return{type:"enclose",mode:n.mode,label:a,backgroundColor:i,body:s}},htmlBuilder:kT,mathmlBuilder:TT});Et({type:"enclose",names:["\\fcolorbox"],props:{numArgs:3,allowedInText:!0,argTypes:["color","color","hbox"]},handler(t,e,r){var{parser:n,funcName:a}=t,i=dr(e[0],"color-token").color,s=dr(e[1],"color-token").color,o=e[2];return{type:"enclose",mode:n.mode,label:a,backgroundColor:s,borderColor:i,body:o}},htmlBuilder:kT,mathmlBuilder:TT});Et({type:"enclose",names:["\\fbox"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!0},handler(t,e){var{parser:r}=t;return{type:"enclose",mode:r.mode,label:"\\fbox",body:e[0]}}});Et({type:"enclose",names:["\\cancel","\\bcancel","\\xcancel","\\phase"],props:{numArgs:1},handler(t,e){var{parser:r,funcName:n}=t,a=e[0];return{type:"enclose",mode:r.mode,label:n,body:a}},htmlBuilder:kT,mathmlBuilder:TT});Et({type:"enclose",names:["\\sout"],props:{numArgs:1,allowedInText:!0},handler(t,e){var{parser:r,funcName:n}=t;r.mode==="math"&&r.settings.reportNonstrict("mathVsSout","LaTeX's \\sout works only in text mode");var a=e[0];return{type:"enclose",mode:r.mode,label:n,body:a}},htmlBuilder:kT,mathmlBuilder:TT});Et({type:"enclose",names:["\\angl"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!1},handler(t,e){var{parser:r}=t;return{type:"enclose",mode:r.mode,label:"\\angl",body:e[0]}}});DZ={};NZ={};Zs=class t{constructor(e,r,n){this.lexer=void 0,this.start=void 0,this.end=void 0,this.lexer=e,this.start=r,this.end=n}static range(e,r){return r?!e||!e.loc||!r.loc||e.loc.lexer!==r.loc.lexer?null:new t(e.loc.lexer,e.loc.start,r.loc.end):e&&e.loc}},Io=class t{constructor(e,r){this.text=void 0,this.loc=void 0,this.noexpand=void 0,this.treatAsRelax=void 0,this.text=e,this.loc=r}range(e,r){return new t(r,Zs.range(this,e))}};ET=t=>{var e=t.parser.settings;if(!e.displayMode)throw new ht("{"+t.envName+"} can be used only in display mode.")},bBe=new Set(["gather","gather*"]);qu=function(e,r){var n,a,i=e.body.length,s=e.hLinesBeforeRow,o=0,l=new Array(i),u=[],h=Math.max(r.fontMetrics().arrayRuleWidth,r.minRuleThickness),f=1/r.fontMetrics().ptPerEm,d=5*f;if(e.colSeparationType&&e.colSeparationType==="small"){var p=r.havingStyle(ir.SCRIPT).sizeMultiplier;d=.2778*(p/r.sizeMultiplier)}var m=e.colSeparationType==="CD"?ta({number:3,unit:"ex"},r):12*f,g=3*f,v=e.arraystretch*m,y=.7*v,b=.3*v,w=0;function C(_e){for(var fe=0;fe<_e.length;++fe)fe>0&&(w+=.25),u.push({pos:w,isDashed:_e[fe]})}for(C(s[0]),n=0;n0&&(D+=b,__e))for(n=0;n=o)){var J=void 0;if(a>0||e.hskipBeforeAndAfter){var j,Z;J=(j=(Z=Q)==null?void 0:Z.pregap)!=null?j:d,J!==0&&(O=st(["arraycolsep"],[]),O.style.width=mt(J),N.push(O))}var K=[];for(n=0;n0){for(var Ie=Bg("hline",r,h),Ue=Bg("hdashline",r,h),Fe=[{type:"elem",elem:me,shift:0}];u.length>0;){var Ae=u.pop(),Me=Ae.pos-T;Ae.isDashed?Fe.push({type:"elem",elem:Ue,shift:Me}):Fe.push({type:"elem",elem:Ie,shift:Me})}me=Yr({positionType:"individualShift",children:Fe})}if(P.length===0)return st(["mord"],[me],r);var ke=Yr({positionType:"individualShift",children:P}),ve=st(["tag"],[ke],r);return vh([me,ve])},wBe={c:"center ",l:"left ",r:"right "},Vu=function(e,r){for(var n=[],a=new ut("mtd",[],["mtr-glue"]),i=new ut("mtd",[],["mml-eqn-num"]),s=0;s0){var m=e.cols,g="",v=!1,y=0,b=m.length;m[0].type==="separator"&&(d+="top ",y=1),m[m.length-1].type==="separator"&&(d+="bottom ",b-=1);for(var w=y;w0?"left ":"",d+=L[L.length-1].length>0?"right ":"";for(var M=1;M0&&p&&(v=1),n[m]={type:"align",align:g,pregap:v,postgap:0}}return s.colSeparationType=p?"align":"alignat",s};Uu({type:"array",names:["array","darray"],props:{numArgs:1},handler(t,e){var r=xT(e[0]),n=r?[e[0]]:dr(e[0],"ordgroup").body,a=n.map(function(s){var o=yT(s),l=o.text;if("lcr".includes(l))return{type:"align",align:l};if(l==="|")return{type:"separator",separator:"|"};if(l===":")return{type:"separator",separator:":"};throw new ht("Unknown column alignment: "+l,s)}),i={cols:a,hskipBeforeAndAfter:!0,maxNumCols:a.length};return $f(t.parser,i,vD(t.envName))},htmlBuilder:qu,mathmlBuilder:Vu});Uu({type:"array",names:["matrix","pmatrix","bmatrix","Bmatrix","vmatrix","Vmatrix","matrix*","pmatrix*","bmatrix*","Bmatrix*","vmatrix*","Vmatrix*"],props:{numArgs:0},handler(t){var e={matrix:null,pmatrix:["(",")"],bmatrix:["[","]"],Bmatrix:["\\{","\\}"],vmatrix:["|","|"],Vmatrix:["\\Vert","\\Vert"]}[t.envName.replace("*","")],r="c",n={hskipBeforeAndAfter:!1,cols:[{type:"align",align:r}]};if(t.envName.charAt(t.envName.length-1)==="*"){var a=t.parser;if(a.consumeSpaces(),a.fetch().text==="["){if(a.consume(),a.consumeSpaces(),r=a.fetch().text,!"lcr".includes(r))throw new ht("Expected l or c or r",a.nextToken);a.consume(),a.consumeSpaces(),a.expect("]"),a.consume(),n.cols=[{type:"align",align:r}]}}var i=$f(t.parser,n,vD(t.envName)),s=Math.max(0,...i.body.map(o=>o.length));return i.cols=new Array(s).fill({type:"align",align:r}),e?{type:"leftright",mode:t.mode,body:[i],left:e[0],right:e[1],rightColor:void 0}:i},htmlBuilder:qu,mathmlBuilder:Vu});Uu({type:"array",names:["smallmatrix"],props:{numArgs:0},handler(t){var e={arraystretch:.5},r=$f(t.parser,e,"script");return r.colSeparationType="small",r},htmlBuilder:qu,mathmlBuilder:Vu});Uu({type:"array",names:["subarray"],props:{numArgs:1},handler(t,e){var r=xT(e[0]),n=r?[e[0]]:dr(e[0],"ordgroup").body,a=n.map(function(o){var l=yT(o),u=l.text;if("lc".includes(u))return{type:"align",align:u};throw new ht("Unknown column alignment: "+u,o)});if(a.length>1)throw new ht("{subarray} can contain only one column");var i={cols:a,hskipBeforeAndAfter:!1,arraystretch:.5},s=$f(t.parser,i,"script");if(s.body.length>0&&s.body[0].length>1)throw new ht("{subarray} can contain only one column");return s},htmlBuilder:qu,mathmlBuilder:Vu});Uu({type:"array",names:["cases","dcases","rcases","drcases"],props:{numArgs:0},handler(t){var e={arraystretch:1.2,cols:[{type:"align",align:"l",pregap:0,postgap:1},{type:"align",align:"l",pregap:0,postgap:0}]},r=$f(t.parser,e,vD(t.envName));return{type:"leftright",mode:t.mode,body:[r],left:t.envName.includes("r")?".":"\\{",right:t.envName.includes("r")?"\\}":".",rightColor:void 0}},htmlBuilder:qu,mathmlBuilder:Vu});Uu({type:"array",names:["align","align*","aligned","split"],props:{numArgs:0},handler:MZ,htmlBuilder:qu,mathmlBuilder:Vu});Uu({type:"array",names:["gathered","gather","gather*"],props:{numArgs:0},handler(t){bBe.has(t.envName)&&ET(t);var e={cols:[{type:"align",align:"c"}],addJot:!0,colSeparationType:"gather",autoTag:gD(t.envName),emptySingleRow:!0,leqno:t.parser.settings.leqno};return $f(t.parser,e,"display")},htmlBuilder:qu,mathmlBuilder:Vu});Uu({type:"array",names:["alignat","alignat*","alignedat"],props:{numArgs:1},handler:MZ,htmlBuilder:qu,mathmlBuilder:Vu});Uu({type:"array",names:["equation","equation*"],props:{numArgs:0},handler(t){ET(t);var e={autoTag:gD(t.envName),emptySingleRow:!0,singleRow:!0,maxNumCols:1,leqno:t.parser.settings.leqno};return $f(t.parser,e,"display")},htmlBuilder:qu,mathmlBuilder:Vu});Uu({type:"array",names:["CD"],props:{numArgs:0},handler(t){return ET(t),lBe(t.parser)},htmlBuilder:qu,mathmlBuilder:Vu});ce("\\nonumber","\\gdef\\@eqnsw{0}");ce("\\notag","\\nonumber");Et({type:"text",names:["\\hline","\\hdashline"],props:{numArgs:0,allowedInText:!0,allowedInMath:!0},handler(t,e){throw new ht(t.funcName+" valid only within array environment")}});zK=DZ;Et({type:"environment",names:["\\begin","\\end"],props:{numArgs:1,argTypes:["text"]},handler(t,e){var{parser:r,funcName:n}=t,a=e[0];if(a.type!=="ordgroup")throw new ht("Invalid environment name",a);for(var i="",s=0;s{var r=t.font,n=e.withFont(r);return Xr(t.body,n)},PZ=(t,e)=>{var r=t.font,n=e.withFont(r);return mn(t.body,n)},$K={"\\Bbb":"\\mathbb","\\bold":"\\mathbf","\\frak":"\\mathfrak"};Et({type:"font",names:["\\mathrm","\\mathit","\\mathbf","\\mathnormal","\\mathsfit","\\mathbb","\\mathcal","\\mathfrak","\\mathscr","\\mathsf","\\mathtt","\\Bbb","\\bold","\\frak"],props:{numArgs:1,allowedInArgument:!0},handler:(t,e)=>{var{parser:r,funcName:n}=t,a=uT(e[0]),i=n;return i in $K&&(i=$K[i]),{type:"font",mode:r.mode,font:i.slice(1),body:a}},htmlBuilder:OZ,mathmlBuilder:PZ});Et({type:"mclass",names:["\\boldsymbol","\\bm"],props:{numArgs:1},handler:(t,e)=>{var{parser:r}=t,n=e[0];return{type:"mclass",mode:r.mode,mclass:bT(n),body:[{type:"font",mode:r.mode,font:"boldsymbol",body:n}],isCharacterBox:mh(n)}}});Et({type:"font",names:["\\rm","\\sf","\\tt","\\bf","\\it","\\cal"],props:{numArgs:0,allowedInText:!0},handler:(t,e)=>{var{parser:r,funcName:n,breakOnTokenText:a}=t,{mode:i}=r,s=r.parseExpression(!0,a);return{type:"font",mode:i,font:"math"+n.slice(1),body:{type:"ordgroup",mode:r.mode,body:s}}},htmlBuilder:OZ,mathmlBuilder:PZ});kBe=(t,e)=>{var r=e.style,n=r.fracNum(),a=r.fracDen(),i;i=e.havingStyle(n);var s=Xr(t.numer,i,e);if(t.continued){var o=8.5/e.fontMetrics().ptPerEm,l=3.5/e.fontMetrics().ptPerEm;s.height=s.height0?m=3*d:m=7*d,g=e.fontMetrics().denom1):(f>0?(p=e.fontMetrics().num2,m=d):(p=e.fontMetrics().num3,m=3*d),g=e.fontMetrics().denom2);var v;if(h){var b=e.fontMetrics().axisHeight;p-s.depth-(b+.5*f){var r=new ut("mfrac",[mn(t.numer,e),mn(t.denom,e)]);if(!t.hasBarLine)r.setAttribute("linethickness","0px");else if(t.barSize){var n=ta(t.barSize,e);r.setAttribute("linethickness",mt(n))}if(t.leftDelim!=null||t.rightDelim!=null){var a=[];if(t.leftDelim!=null){var i=new ut("mo",[new la(t.leftDelim.replace("\\",""))]);i.setAttribute("fence","true"),a.push(i)}if(a.push(r),t.rightDelim!=null){var s=new ut("mo",[new la(t.rightDelim.replace("\\",""))]);s.setAttribute("fence","true"),a.push(s)}return fD(a)}return r},BZ=(t,e)=>{if(!e)return t;var r={type:"styling",mode:t.mode,style:e,body:[t]};return r};Et({type:"genfrac",names:["\\cfrac","\\dfrac","\\frac","\\tfrac","\\dbinom","\\binom","\\tbinom","\\\\atopfrac","\\\\bracefrac","\\\\brackfrac"],props:{numArgs:2,allowedInArgument:!0},handler:(t,e)=>{var{parser:r,funcName:n}=t,a=e[0],i=e[1],s,o=null,l=null;switch(n){case"\\cfrac":case"\\dfrac":case"\\frac":case"\\tfrac":s=!0;break;case"\\\\atopfrac":s=!1;break;case"\\dbinom":case"\\binom":case"\\tbinom":s=!1,o="(",l=")";break;case"\\\\bracefrac":s=!1,o="\\{",l="\\}";break;case"\\\\brackfrac":s=!1,o="[",l="]";break;default:throw new Error("Unrecognized genfrac command")}var u=n==="\\cfrac",h=null;return u||n.startsWith("\\d")?h="display":n.startsWith("\\t")&&(h="text"),BZ({type:"genfrac",mode:r.mode,numer:a,denom:i,continued:u,hasBarLine:s,leftDelim:o,rightDelim:l,barSize:null},h)},htmlBuilder:kBe,mathmlBuilder:TBe});Et({type:"infix",names:["\\over","\\choose","\\atop","\\brace","\\brack"],props:{numArgs:0,infix:!0},handler(t){var{parser:e,funcName:r,token:n}=t,a;switch(r){case"\\over":a="\\frac";break;case"\\choose":a="\\binom";break;case"\\atop":a="\\\\atopfrac";break;case"\\brace":a="\\\\bracefrac";break;case"\\brack":a="\\\\brackfrac";break;default:throw new Error("Unrecognized infix genfrac command")}return{type:"infix",mode:e.mode,replaceWith:a,token:n}}});GK=["display","text","script","scriptscript"],UK=function(e){var r=null;return e.length>0&&(r=e,r=r==="."?null:r),r};Et({type:"genfrac",names:["\\genfrac"],props:{numArgs:6,allowedInArgument:!0,argTypes:["math","math","size","text","math","math"]},handler(t,e){var{parser:r}=t,n=e[4],a=e[5],i=uT(e[0]),s=i.type==="atom"&&i.family==="open"?UK(i.text):null,o=uT(e[1]),l=o.type==="atom"&&o.family==="close"?UK(o.text):null,u=dr(e[2],"size"),h,f=null;u.isBlank?h=!0:(f=u.value,h=f.number>0);var d=null,p=e[3];if(p.type==="ordgroup"){if(p.body.length>0){var m=dr(p.body[0],"textord");d=GK[Number(m.text)]}}else p=dr(p,"textord"),d=GK[Number(p.text)];return BZ({type:"genfrac",mode:r.mode,numer:n,denom:a,continued:!1,hasBarLine:h,barSize:f,leftDelim:s,rightDelim:l},d)}});Et({type:"infix",names:["\\above"],props:{numArgs:1,argTypes:["size"],infix:!0},handler(t,e){var{parser:r,funcName:n,token:a}=t;return{type:"infix",mode:r.mode,replaceWith:"\\\\abovefrac",size:dr(e[0],"size").value,token:a}}});Et({type:"genfrac",names:["\\\\abovefrac"],props:{numArgs:3,argTypes:["math","size","math"]},handler:(t,e)=>{var{parser:r,funcName:n}=t,a=e[0],i=dr(e[1],"infix").size;if(!i)throw new Error("\\\\abovefrac expected size, but got "+String(i));var s=e[2],o=i.number>0;return{type:"genfrac",mode:r.mode,numer:a,denom:s,continued:!1,hasBarLine:o,barSize:i,leftDelim:null,rightDelim:null}}});FZ=(t,e)=>{var r=e.style,n,a;t.type==="supsub"?(n=t.sup?Xr(t.sup,e.havingStyle(r.sup()),e):Xr(t.sub,e.havingStyle(r.sub()),e),a=dr(t.base,"horizBrace")):a=dr(t,"horizBrace");var i=Xr(a.base,e.havingBaseStyle(ir.DISPLAY)),s=vT(a,e),o;if(a.isOver?o=Yr({positionType:"firstBaseline",children:[{type:"elem",elem:i},{type:"kern",size:.1},{type:"elem",elem:s,wrapperClasses:["svg-align"]}]}):o=Yr({positionType:"bottom",positionData:i.depth+.1+s.height,children:[{type:"elem",elem:s,wrapperClasses:["svg-align"]},{type:"kern",size:.1},{type:"elem",elem:i}]}),n){var l=st(["minner",a.isOver?"mover":"munder"],[o],e);a.isOver?o=Yr({positionType:"firstBaseline",children:[{type:"elem",elem:l},{type:"kern",size:.2},{type:"elem",elem:n}]}):o=Yr({positionType:"bottom",positionData:l.depth+.2+n.height+n.depth,children:[{type:"elem",elem:n},{type:"kern",size:.2},{type:"elem",elem:l}]})}return st(["minner",a.isOver?"mover":"munder"],[o],e)},EBe=(t,e)=>{var r=gT(t.label);return new ut(t.isOver?"mover":"munder",[mn(t.base,e),r])};Et({type:"horizBrace",names:["\\overbrace","\\underbrace","\\overbracket","\\underbracket"],props:{numArgs:1},handler(t,e){var{parser:r,funcName:n}=t;return{type:"horizBrace",mode:r.mode,label:n,isOver:n.includes("\\over"),base:e[0]}},htmlBuilder:FZ,mathmlBuilder:EBe});Et({type:"href",names:["\\href"],props:{numArgs:2,argTypes:["url","original"],allowedInText:!0},handler:(t,e)=>{var{parser:r}=t,n=e[1],a=dr(e[0],"url").url;return r.settings.isTrusted({command:"\\href",url:a})?{type:"href",mode:r.mode,href:a,body:Ra(n)}:r.formatUnsupportedCmd("\\href")},htmlBuilder:(t,e)=>{var r=Va(t.body,e,!1);return BPe(t.href,[],r,e)},mathmlBuilder:(t,e)=>{var r=zf(t.body,e);return r instanceof ut||(r=new ut("mrow",[r])),r.setAttribute("href",t.href),r}});Et({type:"href",names:["\\url"],props:{numArgs:1,argTypes:["url"],allowedInText:!0},handler:(t,e)=>{var{parser:r}=t,n=dr(e[0],"url").url;if(!r.settings.isTrusted({command:"\\url",url:n}))return r.formatUnsupportedCmd("\\url");for(var a=[],i=0;i{var{parser:r,funcName:n,token:a}=t,i=dr(e[0],"raw").string,s=e[1];r.settings.strict&&r.settings.reportNonstrict("htmlExtension","HTML extension is disabled on strict mode");var o,l={};switch(n){case"\\htmlClass":l.class=i,o={command:"\\htmlClass",class:i};break;case"\\htmlId":l.id=i,o={command:"\\htmlId",id:i};break;case"\\htmlStyle":l.style=i,o={command:"\\htmlStyle",style:i};break;case"\\htmlData":{for(var u=i.split(","),h=0;h{var r=Va(t.body,e,!1),n=["enclosing"];t.attributes.class&&n.push(...t.attributes.class.trim().split(/\s+/));var a=st(n,r,e);for(var i in t.attributes)i!=="class"&&t.attributes.hasOwnProperty(i)&&a.setAttribute(i,t.attributes[i]);return a},mathmlBuilder:(t,e)=>zf(t.body,e)});Et({type:"htmlmathml",names:["\\html@mathml"],props:{numArgs:2,allowedInArgument:!0,allowedInText:!0},handler:(t,e)=>{var{parser:r}=t;return{type:"htmlmathml",mode:r.mode,html:Ra(e[0]),mathml:Ra(e[1])}},htmlBuilder:(t,e)=>{var r=Va(t.html,e,!1);return vh(r)},mathmlBuilder:(t,e)=>zf(t.mathml,e)});BI=function(e){if(/^[-+]? *(\d+(\.\d*)?|\.\d+)$/.test(e))return{number:+e,unit:"bp"};var r=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(e);if(!r)throw new ht("Invalid size: '"+e+"' in \\includegraphics");var n={number:+(r[1]+r[2]),unit:r[3]};if(!tZ(n))throw new ht("Invalid unit: '"+n.unit+"' in \\includegraphics.");return n};Et({type:"includegraphics",names:["\\includegraphics"],props:{numArgs:1,numOptionalArgs:1,argTypes:["raw","url"],allowedInText:!1},handler:(t,e,r)=>{var{parser:n}=t,a={number:0,unit:"em"},i={number:.9,unit:"em"},s={number:0,unit:"em"},o="";if(r[0])for(var l=dr(r[0],"raw").string,u=l.split(","),h=0;h{var r=ta(t.height,e),n=0;t.totalheight.number>0&&(n=ta(t.totalheight,e)-r);var a=0;t.width.number>0&&(a=ta(t.width,e));var i={height:mt(r+n)};a>0&&(i.width=mt(a)),n>0&&(i.verticalAlign=mt(-n));var s=new qI(t.src,t.alt,i);return s.height=r,s.depth=n,s},mathmlBuilder:(t,e)=>{var r=new ut("mglyph",[]);r.setAttribute("alt",t.alt);var n=ta(t.height,e),a=0;if(t.totalheight.number>0&&(a=ta(t.totalheight,e)-n,r.setAttribute("valign",mt(-a))),r.setAttribute("height",mt(n+a)),t.width.number>0){var i=ta(t.width,e);r.setAttribute("width",mt(i))}return r.setAttribute("src",t.src),r}});Et({type:"kern",names:["\\kern","\\mkern","\\hskip","\\mskip"],props:{numArgs:1,argTypes:["size"],primitive:!0,allowedInText:!0},handler(t,e){var{parser:r,funcName:n}=t,a=dr(e[0],"size");if(r.settings.strict){var i=n[1]==="m",s=a.value.unit==="mu";i?(s||r.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+n+" supports only mu units, "+("not "+a.value.unit+" units")),r.mode!=="math"&&r.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+n+" works only in math mode")):s&&r.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+n+" doesn't support mu units")}return{type:"kern",mode:r.mode,dimension:a.value}},htmlBuilder(t,e){return lZ(t.dimension,e)},mathmlBuilder(t,e){var r=ta(t.dimension,e);return new cT(r)}});Et({type:"lap",names:["\\mathllap","\\mathrlap","\\mathclap"],props:{numArgs:1,allowedInText:!0},handler:(t,e)=>{var{parser:r,funcName:n}=t,a=e[0];return{type:"lap",mode:r.mode,alignment:n.slice(5),body:a}},htmlBuilder:(t,e)=>{var r;t.alignment==="clap"?(r=st([],[Xr(t.body,e)]),r=st(["inner"],[r],e)):r=st(["inner"],[Xr(t.body,e)]);var n=st(["fix"],[]),a=st([t.alignment],[r,n],e),i=st(["strut"]);return i.style.height=mt(a.height+a.depth),a.depth&&(i.style.verticalAlign=mt(-a.depth)),a.children.unshift(i),a=st(["thinbox"],[a],e),st(["mord","vbox"],[a],e)},mathmlBuilder:(t,e)=>{var r=new ut("mpadded",[mn(t.body,e)]);if(t.alignment!=="rlap"){var n=t.alignment==="llap"?"-1":"-0.5";r.setAttribute("lspace",n+"width")}return r.setAttribute("width","0px"),r}});Et({type:"styling",names:["\\(","$"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(t,e){var{funcName:r,parser:n}=t,a=n.mode;n.switchMode("math");var i=r==="\\("?"\\)":"$",s=n.parseExpression(!1,i);return n.expect(i),n.switchMode(a),{type:"styling",mode:n.mode,style:"text",resetFont:!0,body:s}}});Et({type:"text",names:["\\)","\\]"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(t,e){throw new ht("Mismatched "+t.funcName)}});qK=(t,e)=>{switch(e.style.size){case ir.DISPLAY.size:return t.display;case ir.TEXT.size:return t.text;case ir.SCRIPT.size:return t.script;case ir.SCRIPTSCRIPT.size:return t.scriptscript;default:return t.text}};Et({type:"mathchoice",names:["\\mathchoice"],props:{numArgs:4,primitive:!0},handler:(t,e)=>{var{parser:r}=t;return{type:"mathchoice",mode:r.mode,display:Ra(e[0]),text:Ra(e[1]),script:Ra(e[2]),scriptscript:Ra(e[3])}},htmlBuilder:(t,e)=>{var r=qK(t,e),n=Va(r,e,!1);return vh(n)},mathmlBuilder:(t,e)=>{var r=qK(t,e);return zf(r,e)}});zZ=(t,e,r,n,a,i,s)=>{t=st([],[t]);var o=r&&mh(r),l,u;if(e){var h=Xr(e,n.havingStyle(a.sup()),n);u={elem:h,kern:Math.max(n.fontMetrics().bigOpSpacing1,n.fontMetrics().bigOpSpacing3-h.depth)}}if(r){var f=Xr(r,n.havingStyle(a.sub()),n);l={elem:f,kern:Math.max(n.fontMetrics().bigOpSpacing2,n.fontMetrics().bigOpSpacing4-f.height)}}var d;if(u&&l){var p=n.fontMetrics().bigOpSpacing5+l.elem.height+l.elem.depth+l.kern+t.depth+s;d=Yr({positionType:"bottom",positionData:p,children:[{type:"kern",size:n.fontMetrics().bigOpSpacing5},{type:"elem",elem:l.elem,marginLeft:mt(-i)},{type:"kern",size:l.kern},{type:"elem",elem:t},{type:"kern",size:u.kern},{type:"elem",elem:u.elem,marginLeft:mt(i)},{type:"kern",size:n.fontMetrics().bigOpSpacing5}]})}else if(l){var m=t.height-s;d=Yr({positionType:"top",positionData:m,children:[{type:"kern",size:n.fontMetrics().bigOpSpacing5},{type:"elem",elem:l.elem,marginLeft:mt(-i)},{type:"kern",size:l.kern},{type:"elem",elem:t}]})}else if(u){var g=t.depth+s;d=Yr({positionType:"bottom",positionData:g,children:[{type:"elem",elem:t},{type:"kern",size:u.kern},{type:"elem",elem:u.elem,marginLeft:mt(i)},{type:"kern",size:n.fontMetrics().bigOpSpacing5}]})}else return t;var v=[d];if(l&&i!==0&&!o){var y=st(["mspace"],[],n);y.style.marginRight=mt(i),v.unshift(y)}return st(["mop","op-limits"],v,n)},$Z=new Set(["\\smallint"]),$g=(t,e)=>{var r,n,a=!1,i;t.type==="supsub"?(r=t.sup,n=t.sub,i=dr(t.base,"op"),a=!0):i=dr(t,"op");var s=e.style,o=!1;s.size===ir.DISPLAY.size&&i.symbol&&!$Z.has(i.name)&&(o=!0);var l,u;if(i.symbol){var h=o?"Size2-Regular":"Size1-Regular",f="";if((i.name==="\\oiint"||i.name==="\\oiiint")&&(f=i.name.slice(1),i.name=f==="oiint"?"\\iint":"\\iiint"),l=vs(i.name,h,"math",e,["mop","op-symbol",o?"large-op":"small-op"]),u=l.italic,f.length>0){var d=cZ(f+"Size"+(o?"2":"1"),e);l=Yr({positionType:"individualShift",children:[{type:"elem",elem:l,shift:0},{type:"elem",elem:d,shift:o?.08:0}]}),i.name="\\"+f,l.classes.unshift("mop"),l.italic=u}}else if(i.body){var p=Va(i.body,e,!0);p.length===1&&p[0]instanceof xs?(l=p[0],l.classes[0]="mop"):l=st(["mop"],p,e)}else{for(var m=[],g=1;g{var r;if(t.symbol)r=new ut("mo",[nl(t.name,t.mode)]),$Z.has(t.name)&&r.setAttribute("largeop","false");else if(t.body)r=new ut("mo",No(t.body,e));else{r=new ut("mi",[new la(t.name.slice(1))]);var n=new ut("mo",[nl("\u2061","text")]);t.parentIsSupSub?r=new ut("mrow",[r,n]):r=dZ([r,n])}return r},CBe={"\u220F":"\\prod","\u2210":"\\coprod","\u2211":"\\sum","\u22C0":"\\bigwedge","\u22C1":"\\bigvee","\u22C2":"\\bigcap","\u22C3":"\\bigcup","\u2A00":"\\bigodot","\u2A01":"\\bigoplus","\u2A02":"\\bigotimes","\u2A04":"\\biguplus","\u2A06":"\\bigsqcup"};Et({type:"op",names:["\\coprod","\\bigvee","\\bigwedge","\\biguplus","\\bigcap","\\bigcup","\\intop","\\prod","\\sum","\\bigotimes","\\bigoplus","\\bigodot","\\bigsqcup","\\smallint","\u220F","\u2210","\u2211","\u22C0","\u22C1","\u22C2","\u22C3","\u2A00","\u2A01","\u2A02","\u2A04","\u2A06"],props:{numArgs:0},handler:(t,e)=>{var{parser:r,funcName:n}=t,a=n;return a.length===1&&(a=CBe[a]),{type:"op",mode:r.mode,limits:!0,parentIsSupSub:!1,symbol:!0,name:a}},htmlBuilder:$g,mathmlBuilder:zb});Et({type:"op",names:["\\mathop"],props:{numArgs:1,primitive:!0},handler:(t,e)=>{var{parser:r}=t,n=e[0];return{type:"op",mode:r.mode,limits:!1,parentIsSupSub:!1,symbol:!1,body:Ra(n)}},htmlBuilder:$g,mathmlBuilder:zb});SBe={"\u222B":"\\int","\u222C":"\\iint","\u222D":"\\iiint","\u222E":"\\oint","\u222F":"\\oiint","\u2230":"\\oiiint"};Et({type:"op",names:["\\arcsin","\\arccos","\\arctan","\\arctg","\\arcctg","\\arg","\\ch","\\cos","\\cosec","\\cosh","\\cot","\\cotg","\\coth","\\csc","\\ctg","\\cth","\\deg","\\dim","\\exp","\\hom","\\ker","\\lg","\\ln","\\log","\\sec","\\sin","\\sinh","\\sh","\\tan","\\tanh","\\tg","\\th"],props:{numArgs:0},handler(t){var{parser:e,funcName:r}=t;return{type:"op",mode:e.mode,limits:!1,parentIsSupSub:!1,symbol:!1,name:r}},htmlBuilder:$g,mathmlBuilder:zb});Et({type:"op",names:["\\det","\\gcd","\\inf","\\lim","\\max","\\min","\\Pr","\\sup"],props:{numArgs:0},handler(t){var{parser:e,funcName:r}=t;return{type:"op",mode:e.mode,limits:!0,parentIsSupSub:!1,symbol:!1,name:r}},htmlBuilder:$g,mathmlBuilder:zb});Et({type:"op",names:["\\int","\\iint","\\iiint","\\oint","\\oiint","\\oiiint","\u222B","\u222C","\u222D","\u222E","\u222F","\u2230"],props:{numArgs:0,allowedInArgument:!0},handler(t){var{parser:e,funcName:r}=t,n=r;return n.length===1&&(n=SBe[n]),{type:"op",mode:e.mode,limits:!1,parentIsSupSub:!1,symbol:!0,name:n}},htmlBuilder:$g,mathmlBuilder:zb});GZ=(t,e)=>{var r,n,a=!1,i;t.type==="supsub"?(r=t.sup,n=t.sub,i=dr(t.base,"operatorname"),a=!0):i=dr(t,"operatorname");var s;if(i.body.length>0){for(var o=i.body.map(f=>{var d="text"in f?f.text:void 0;return typeof d=="string"?{type:"textord",mode:f.mode,text:d}:f}),l=Va(o,e.withFont("mathrm"),!0),u=0;u{for(var r=No(t.body,e.withFont("mathrm")),n=!0,a=0;ah.toText()).join("");r=[new la(o)]}var l=new ut("mi",r);l.setAttribute("mathvariant","normal");var u=new ut("mo",[nl("\u2061","text")]);return t.parentIsSupSub?new ut("mrow",[l,u]):dZ([l,u])};Et({type:"operatorname",names:["\\operatorname@","\\operatornamewithlimits"],props:{numArgs:1},handler:(t,e)=>{var{parser:r,funcName:n}=t,a=e[0];return{type:"operatorname",mode:r.mode,body:Ra(a),alwaysHandleSupSub:n==="\\operatornamewithlimits",limits:!1,parentIsSupSub:!1}},htmlBuilder:GZ,mathmlBuilder:_Be});ce("\\operatorname","\\@ifstar\\operatornamewithlimits\\operatorname@");hp({type:"ordgroup",htmlBuilder(t,e){return t.semisimple?vh(Va(t.body,e,!1)):st(["mord"],Va(t.body,e,!0),e)},mathmlBuilder(t,e){return zf(t.body,e,!0)}});Et({type:"overline",names:["\\overline"],props:{numArgs:1},handler(t,e){var{parser:r}=t,n=e[0];return{type:"overline",mode:r.mode,body:n}},htmlBuilder(t,e){var r=Xr(t.body,e.havingCrampedStyle()),n=Bg("overline-line",e),a=e.fontMetrics().defaultRuleThickness,i=Yr({positionType:"firstBaseline",children:[{type:"elem",elem:r},{type:"kern",size:3*a},{type:"elem",elem:n},{type:"kern",size:a}]});return st(["mord","overline"],[i],e)},mathmlBuilder(t,e){var r=new ut("mo",[new la("\u203E")]);r.setAttribute("stretchy","true");var n=new ut("mover",[mn(t.body,e),r]);return n.setAttribute("accent","true"),n}});Et({type:"phantom",names:["\\phantom"],props:{numArgs:1,allowedInText:!0},handler:(t,e)=>{var{parser:r}=t,n=e[0];return{type:"phantom",mode:r.mode,body:Ra(n)}},htmlBuilder:(t,e)=>{var r=Va(t.body,e.withPhantom(),!1);return vh(r)},mathmlBuilder:(t,e)=>{var r=No(t.body,e);return new ut("mphantom",r)}});ce("\\hphantom","\\smash{\\phantom{#1}}");Et({type:"vphantom",names:["\\vphantom"],props:{numArgs:1,allowedInText:!0},handler:(t,e)=>{var{parser:r}=t,n=e[0];return{type:"vphantom",mode:r.mode,body:n}},htmlBuilder:(t,e)=>{var r=st(["inner"],[Xr(t.body,e.withPhantom())]),n=st(["fix"],[]);return st(["mord","rlap"],[r,n],e)},mathmlBuilder:(t,e)=>{var r=No(Ra(t.body),e),n=new ut("mphantom",r),a=new ut("mpadded",[n]);return a.setAttribute("width","0px"),a}});Et({type:"raisebox",names:["\\raisebox"],props:{numArgs:2,argTypes:["size","hbox"],allowedInText:!0},handler(t,e){var{parser:r}=t,n=dr(e[0],"size").value,a=e[1];return{type:"raisebox",mode:r.mode,dy:n,body:a}},htmlBuilder(t,e){var r=Xr(t.body,e),n=ta(t.dy,e);return Yr({positionType:"shift",positionData:-n,children:[{type:"elem",elem:r}]})},mathmlBuilder(t,e){var r=new ut("mpadded",[mn(t.body,e)]),n=t.dy.number+t.dy.unit;return r.setAttribute("voffset",n),r}});Et({type:"internal",names:["\\relax"],props:{numArgs:0,allowedInText:!0,allowedInArgument:!0},handler(t){var{parser:e}=t;return{type:"internal",mode:e.mode}}});Et({type:"rule",names:["\\rule"],props:{numArgs:2,numOptionalArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:["size","size","size"]},handler(t,e,r){var{parser:n}=t,a=r[0],i=dr(e[0],"size"),s=dr(e[1],"size");return{type:"rule",mode:n.mode,shift:a&&dr(a,"size").value,width:i.value,height:s.value}},htmlBuilder(t,e){var r=st(["mord","rule"],[],e),n=ta(t.width,e),a=ta(t.height,e),i=t.shift?ta(t.shift,e):0;return r.style.borderRightWidth=mt(n),r.style.borderTopWidth=mt(a),r.style.bottom=mt(i),r.width=n,r.height=a+i,r.depth=-i,r.maxFontSize=a*1.125*e.sizeMultiplier,r},mathmlBuilder(t,e){var r=ta(t.width,e),n=ta(t.height,e),a=t.shift?ta(t.shift,e):0,i=e.color&&e.getColor()||"black",s=new ut("mspace");s.setAttribute("mathbackground",i),s.setAttribute("width",mt(r)),s.setAttribute("height",mt(n));var o=new ut("mpadded",[s]);return a>=0?o.setAttribute("height",mt(a)):(o.setAttribute("height",mt(a)),o.setAttribute("depth",mt(-a))),o.setAttribute("voffset",mt(a)),o}});VK=["\\tiny","\\sixptsize","\\scriptsize","\\footnotesize","\\small","\\normalsize","\\large","\\Large","\\LARGE","\\huge","\\Huge"],ABe=(t,e)=>{var r=e.havingSize(t.size);return UZ(t.body,r,e)};Et({type:"sizing",names:VK,props:{numArgs:0,allowedInText:!0},handler:(t,e)=>{var{breakOnTokenText:r,funcName:n,parser:a}=t,i=a.parseExpression(!1,r);return{type:"sizing",mode:a.mode,size:VK.indexOf(n)+1,body:i}},htmlBuilder:ABe,mathmlBuilder:(t,e)=>{var r=e.havingSize(t.size),n=No(t.body,r),a=new ut("mstyle",n);return a.setAttribute("mathsize",mt(r.sizeMultiplier)),a}});Et({type:"smash",names:["\\smash"],props:{numArgs:1,numOptionalArgs:1,allowedInText:!0},handler:(t,e,r)=>{var{parser:n}=t,a=!1,i=!1,s=r[0]&&dr(r[0],"ordgroup");if(s)for(var o,l=0;l{var r=st([],[Xr(t.body,e)]);if(!t.smashHeight&&!t.smashDepth)return r;if(t.smashHeight&&(r.height=0),t.smashDepth&&(r.depth=0),t.smashHeight&&t.smashDepth)return st(["mord","smash"],[r],e);if(r.children)for(var n=0;n{var r=new ut("mpadded",[mn(t.body,e)]);return t.smashHeight&&r.setAttribute("height","0px"),t.smashDepth&&r.setAttribute("depth","0px"),r}});Et({type:"sqrt",names:["\\sqrt"],props:{numArgs:1,numOptionalArgs:1},handler(t,e,r){var{parser:n}=t,a=r[0],i=e[0];return{type:"sqrt",mode:n.mode,body:i,index:a}},htmlBuilder(t,e){var r=Xr(t.body,e.havingCrampedStyle());r.height===0&&(r.height=e.fontMetrics().xHeight),r=Fg(r,e);var n=e.fontMetrics(),a=n.defaultRuleThickness,i=a;e.style.idr.height+r.depth+s&&(s=(s+f-r.height-r.depth)/2);var d=l.height-r.height-s-u;r.style.paddingLeft=mt(h);var p=Yr({positionType:"firstBaseline",children:[{type:"elem",elem:r,wrapperClasses:["svg-align"]},{type:"kern",size:-(r.height+d)},{type:"elem",elem:l},{type:"kern",size:u}]});if(t.index){var m=e.havingStyle(ir.SCRIPTSCRIPT),g=Xr(t.index,m,e),v=.6*(p.height-p.depth),y=Yr({positionType:"shift",positionData:-v,children:[{type:"elem",elem:g}]}),b=st(["root"],[y]);return st(["mord","sqrt"],[b,p],e)}else return st(["mord","sqrt"],[p],e)},mathmlBuilder(t,e){var{body:r,index:n}=t;return n?new ut("mroot",[mn(r,e),mn(n,e)]):new ut("msqrt",[mn(r,e)])}});nD={display:ir.DISPLAY,text:ir.TEXT,script:ir.SCRIPT,scriptscript:ir.SCRIPTSCRIPT};Et({type:"styling",names:["\\displaystyle","\\textstyle","\\scriptstyle","\\scriptscriptstyle"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(t,e){var{breakOnTokenText:r,funcName:n,parser:a}=t,i=a.parseExpression(!0,r),s=n.slice(1,n.length-5);if(!LBe(s))throw new Error("Unknown style: "+s);return{type:"styling",mode:a.mode,style:s,body:i}},htmlBuilder(t,e){var r=nD[t.style],n=e.havingStyle(r);return t.resetFont&&(n=n.withFont("")),UZ(t.body,n,e)},mathmlBuilder(t,e){var r=nD[t.style],n=e.havingStyle(r);t.resetFont&&(n=n.withFont(""));var a=No(t.body,n),i=new ut("mstyle",a),s={display:["0","true"],text:["0","false"],script:["1","false"],scriptscript:["2","false"]},o=s[t.style];return i.setAttribute("scriptlevel",o[0]),i.setAttribute("displaystyle",o[1]),i}});RBe=function(e,r){var n=e.base;if(n)if(n.type==="op"){var a=n.limits&&(r.style.size===ir.DISPLAY.size||n.alwaysHandleSupSub);return a?$g:null}else if(n.type==="operatorname"){var i=n.alwaysHandleSupSub&&(r.style.size===ir.DISPLAY.size||n.limits);return i?GZ:null}else{if(n.type==="accent")return mh(n.base)?pD:null;if(n.type==="horizBrace"){var s=!e.sub;return s===n.isOver?FZ:null}else return null}else return null};hp({type:"supsub",htmlBuilder(t,e){var r=RBe(t,e);if(r)return r(t,e);var{base:n,sup:a,sub:i}=t,s=Xr(n,e),o,l,u=e.fontMetrics(),h=0,f=0,d=n&&mh(n);if(a){var p=e.havingStyle(e.style.sup());o=Xr(a,p,e),d||(h=s.height-p.fontMetrics().supDrop*p.sizeMultiplier/e.sizeMultiplier)}if(i){var m=e.havingStyle(e.style.sub());l=Xr(i,m,e),d||(f=s.depth+m.fontMetrics().subDrop*m.sizeMultiplier/e.sizeMultiplier)}var g;e.style===ir.DISPLAY?g=u.sup1:e.style.cramped?g=u.sup3:g=u.sup2;var v=e.sizeMultiplier,y=mt(.5/u.ptPerEm/v),b=null;if(l){var w=t.base&&t.base.type==="op"&&t.base.name&&(t.base.name==="\\oiint"||t.base.name==="\\oiiint");if(s instanceof xs||w){var C;b=mt(-((C=s.italic)!=null?C:0))}}var k;if(o&&l){h=Math.max(h,g,o.depth+.25*u.xHeight),f=Math.max(f,u.sub2);var E=u.defaultRuleThickness,_=4*E;if(h-o.depth-(l.height-f)<_){f=_-(h-o.depth)+l.height;var S=.8*u.xHeight-(h-o.depth);S>0&&(h+=S,f-=S)}var L=[{type:"elem",elem:l,shift:f,marginRight:y,marginLeft:b},{type:"elem",elem:o,shift:-h,marginRight:y}];k=Yr({positionType:"individualShift",children:L})}else if(l){f=Math.max(f,u.sub1,l.height-.8*u.xHeight);var M=[{type:"elem",elem:l,marginLeft:b,marginRight:y}];k=Yr({positionType:"shift",positionData:f,children:M})}else if(o)h=Math.max(h,g,o.depth+.25*u.xHeight),k=Yr({positionType:"shift",positionData:-h,children:[{type:"elem",elem:o,marginRight:y}]});else throw new Error("supsub must have either sup or sub.");var D=QI(s,"right")||"mord";return st([D],[s,st(["msupsub"],[k])],e)},mathmlBuilder(t,e){var r=!1,n,a;t.base&&t.base.type==="horizBrace"&&(a=!!t.sup,a===t.base.isOver&&(r=!0,n=t.base.isOver)),t.base&&(t.base.type==="op"||t.base.type==="operatorname")&&(t.base.parentIsSupSub=!0);var i=[mn(t.base,e)];t.sub&&i.push(mn(t.sub,e)),t.sup&&i.push(mn(t.sup,e));var s;if(r)s=n?"mover":"munder";else if(t.sub)if(t.sup){var u=t.base;u&&u.type==="op"&&u.limits&&e.style===ir.DISPLAY||u&&u.type==="operatorname"&&u.alwaysHandleSupSub&&(e.style===ir.DISPLAY||u.limits)?s="munderover":s="msubsup"}else{var l=t.base;l&&l.type==="op"&&l.limits&&(e.style===ir.DISPLAY||l.alwaysHandleSupSub)||l&&l.type==="operatorname"&&l.alwaysHandleSupSub&&(l.limits||e.style===ir.DISPLAY)?s="munder":s="msub"}else{var o=t.base;o&&o.type==="op"&&o.limits&&(e.style===ir.DISPLAY||o.alwaysHandleSupSub)||o&&o.type==="operatorname"&&o.alwaysHandleSupSub&&(o.limits||e.style===ir.DISPLAY)?s="mover":s="msup"}return new ut(s,i)}});hp({type:"atom",htmlBuilder(t,e){return cD(t.text,t.mode,e,["m"+t.family])},mathmlBuilder(t,e){var r=new ut("mo",[nl(t.text,t.mode)]);if(t.family==="bin"){var n=dD(t,e);n==="bold-italic"&&r.setAttribute("mathvariant",n)}else t.family==="punct"?r.setAttribute("separator","true"):(t.family==="open"||t.family==="close")&&r.setAttribute("stretchy","false");return r}});qZ={mi:"italic",mn:"normal",mtext:"normal"};hp({type:"mathord",htmlBuilder(t,e){return mT(t,e,"mathord")},mathmlBuilder(t,e){var r=new ut("mi",[nl(t.text,t.mode,e)]),n=dD(t,e)||"italic";return n!==qZ[r.type]&&r.setAttribute("mathvariant",n),r}});hp({type:"textord",htmlBuilder(t,e){return mT(t,e,"textord")},mathmlBuilder(t,e){var r=nl(t.text,t.mode,e),n=dD(t,e)||"normal",a;return t.mode==="text"?a=new ut("mtext",[r]):/[0-9]/.test(t.text)?a=new ut("mn",[r]):t.text==="\\prime"?a=new ut("mo",[r]):a=new ut("mi",[r]),n!==qZ[a.type]&&a.setAttribute("mathvariant",n),a}});FI={"\\nobreak":"nobreak","\\allowbreak":"allowbreak"},zI={" ":{},"\\ ":{},"~":{className:"nobreak"},"\\space":{},"\\nobreakspace":{className:"nobreak"}};hp({type:"spacing",htmlBuilder(t,e){if(zI.hasOwnProperty(t.text)){var r=zI[t.text].className||"";if(t.mode==="text"){var n=mT(t,e,"textord");return n.classes.push(r),n}else return st(["mspace",r],[cD(t.text,t.mode,e)],e)}else{if(FI.hasOwnProperty(t.text))return st(["mspace",FI[t.text]],[],e);throw new ht('Unknown type of space "'+t.text+'"')}},mathmlBuilder(t,e){var r;if(zI.hasOwnProperty(t.text))r=new ut("mtext",[new la("\xA0")]);else{if(FI.hasOwnProperty(t.text))return new ut("mspace");throw new ht('Unknown type of space "'+t.text+'"')}return r}});HK=()=>{var t=new ut("mtd",[]);return t.setAttribute("width","50%"),t};hp({type:"tag",mathmlBuilder(t,e){var r=new ut("mtable",[new ut("mtr",[HK(),new ut("mtd",[zf(t.body,e)]),HK(),new ut("mtd",[zf(t.tag,e)])])]);return r.setAttribute("width","100%"),r}});WK={"\\text":void 0,"\\textrm":"textrm","\\textsf":"textsf","\\texttt":"texttt","\\textnormal":"textrm"},YK={"\\textbf":"textbf","\\textmd":"textmd"},IBe={"\\textit":"textit","\\textup":"textup"},XK=(t,e)=>{var r=t.font;if(r){if(WK[r])return e.withTextFontFamily(WK[r]);if(YK[r])return e.withTextFontWeight(YK[r]);if(r==="\\emph")return e.fontShape==="textit"?e.withTextFontShape("textup"):e.withTextFontShape("textit")}else return e;return e.withTextFontShape(IBe[r])};Et({type:"text",names:["\\text","\\textrm","\\textsf","\\texttt","\\textnormal","\\textbf","\\textmd","\\textit","\\textup","\\emph"],props:{numArgs:1,argTypes:["text"],allowedInArgument:!0,allowedInText:!0},handler(t,e){var{parser:r,funcName:n}=t,a=e[0];return{type:"text",mode:r.mode,body:Ra(a),font:n}},htmlBuilder(t,e){var r=XK(t,e),n=Va(t.body,r,!0);return st(["mord","text"],n,r)},mathmlBuilder(t,e){var r=XK(t,e);return zf(t.body,r)}});Et({type:"underline",names:["\\underline"],props:{numArgs:1,allowedInText:!0},handler(t,e){var{parser:r}=t;return{type:"underline",mode:r.mode,body:e[0]}},htmlBuilder(t,e){var r=Xr(t.body,e),n=Bg("underline-line",e),a=e.fontMetrics().defaultRuleThickness,i=Yr({positionType:"top",positionData:r.height,children:[{type:"kern",size:a},{type:"elem",elem:n},{type:"kern",size:3*a},{type:"elem",elem:r}]});return st(["mord","underline"],[i],e)},mathmlBuilder(t,e){var r=new ut("mo",[new la("\u203E")]);r.setAttribute("stretchy","true");var n=new ut("munder",[mn(t.body,e),r]);return n.setAttribute("accentunder","true"),n}});Et({type:"vcenter",names:["\\vcenter"],props:{numArgs:1,argTypes:["original"],allowedInText:!1},handler(t,e){var{parser:r}=t;return{type:"vcenter",mode:r.mode,body:e[0]}},htmlBuilder(t,e){var r=Xr(t.body,e),n=e.fontMetrics().axisHeight,a=.5*(r.height-n-(r.depth+n));return Yr({positionType:"shift",positionData:a,children:[{type:"elem",elem:r}]})},mathmlBuilder(t,e){var r=new ut("mpadded",[mn(t.body,e)],["vcenter"]);return new ut("mrow",[r])}});Et({type:"verb",names:["\\verb"],props:{numArgs:0,allowedInText:!0},handler(t,e,r){throw new ht("\\verb ended by end of line instead of matching delimiter")},htmlBuilder(t,e){for(var r=jK(t),n=[],a=e.havingStyle(e.style.text()),i=0;it.body.replace(/ /g,t.star?"\u2423":"\xA0"),Mf=hZ,VZ=`[ \r - ]`,DBe="\\\\[a-zA-Z@]+",NBe="\\\\[^\uD800-\uDFFF]",MBe="("+DBe+")"+VZ+"*",OBe=`\\\\( +-470,-1265c-4.7,-6,-9.7,-11.7,-15,-17c-0.7,-0.7,-6.7,-1,-18,-1z`;default:throw new Error("Unknown stretchy delimiter.")}};zf=class{constructor(e){this.children=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,this.children=e,this.classes=[],this.height=0,this.depth=0,this.maxFontSize=0,this.style={}}hasClass(e){return this.classes.includes(e)}toNode(){for(var e=document.createDocumentFragment(),r=0;r{if(Wze(e))return e.toText();throw new Error("Expected MathDomNode with toText, got "+e.constructor.name)}).join("")}},SM={pt:1,mm:7227/2540,cm:7227/254,in:72.27,bp:803/800,pc:12,dd:1238/1157,cc:14856/1157,nd:685/642,nc:1370/107,sp:1/65536,px:803/800},Yze={ex:!0,em:!0,mu:!0},lJ=function(e){return typeof e!="string"&&(e=e.unit),e in SM||e in Yze||e==="ex"},$i=function(e,r){var n;if(e.unit in SM)n=SM[e.unit]/r.fontMetrics().ptPerEm/r.sizeMultiplier;else if(e.unit==="mu")n=r.fontMetrics().cssEmPerMu;else{var i;if(r.style.isTight()?i=r.havingStyle(r.style.text()):i=r,e.unit==="ex")n=i.fontMetrics().xHeight;else if(e.unit==="em")n=i.fontMetrics().quad;else throw new Ft("Invalid unit: '"+e.unit+"'");i!==r&&(n*=i.sizeMultiplier/r.sizeMultiplier)}return Math.min(e.number*n,r.maxSize)},Gt=function(e){return+e.toFixed(4)+"em"},$f=function(e){return e.filter(r=>r).join(" ")},VM=function(e){var r="";for(var n of Object.keys(e)){var i=e[n];i!==void 0&&(r+=wze(n)+":"+i+";")}return r},uJ=function(e,r,n){if(this.classes=e||[],this.attributes={},this.height=0,this.depth=0,this.maxFontSize=0,this.style=n||{},r){r.style.isTight()&&this.classes.push("mtight");var i=r.getColor();i&&(this.style.color=i)}},cJ=function(e){var r=document.createElement(e);r.className=$f(this.classes),Object.assign(r.style,this.style);for(var n of Object.keys(this.attributes))r.setAttribute(n,this.attributes[n]);for(var i=0;i/=\x00-\x1f]/,hJ=function(e){var r="<"+e;this.classes.length&&(r+=' class="'+Gs($f(this.classes))+'"');var n=VM(this.style);n&&(r+=' style="'+Gs(n)+'"');for(var i of Object.keys(this.attributes)){if(Xze.test(i))throw new Ft("Invalid attribute name '"+i+"'");r+=" "+i+'="'+Gs(this.attributes[i])+'"'}r+=">";for(var a=0;a",r},Gf=class{constructor(e,r,n,i){this.children=void 0,this.attributes=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.width=void 0,this.maxFontSize=void 0,this.style=void 0,this.italic=void 0,uJ.call(this,e,n,i),this.children=r||[]}setAttribute(e,r){this.attributes[e]=r}hasClass(e){return this.classes.includes(e)}toNode(){return cJ.call(this,"span")}toMarkup(){return hJ.call(this,"span")}},Hg=class{constructor(e,r,n,i){this.children=void 0,this.attributes=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,uJ.call(this,r,i),this.children=n||[],this.setAttribute("href",e)}setAttribute(e,r){this.attributes[e]=r}hasClass(e){return this.classes.includes(e)}toNode(){return cJ.call(this,"a")}toMarkup(){return hJ.call(this,"a")}},CM=class{constructor(e,r,n){this.src=void 0,this.alt=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,this.alt=r,this.src=e,this.classes=["mord"],this.height=0,this.depth=0,this.maxFontSize=0,this.style=n}hasClass(e){return this.classes.includes(e)}toNode(){var e=document.createElement("img");return e.src=this.src,e.alt=this.alt,e.className="mord",Object.assign(e.style,this.style),e}toMarkup(){var e=''+Gs(this.alt)+'0&&(r=document.createElement("span"),r.style.marginRight=Gt(this.italic)),this.classes.length>0&&(r=r||document.createElement("span"),r.className=$f(this.classes)),Object.keys(this.style).length>0&&(r=r||document.createElement("span"),Object.assign(r.style,this.style)),r?(r.appendChild(e),r):e}toMarkup(){var e=!1,r="0&&(n+="margin-right:"+Gt(this.italic)+";"),n+=VM(this.style),n&&(e=!0,r+=' style="'+Gs(n)+'"');var i=Gs(this.text);return e?(r+=">",r+=i,r+="",r):i}},qu=class{constructor(e,r){this.children=void 0,this.attributes=void 0,this.children=e||[],this.attributes=r||{}}toNode(){var e="http://www.w3.org/2000/svg",r=document.createElementNS(e,"svg");for(var n of Object.keys(this.attributes))r.setAttribute(n,this.attributes[n]);for(var i=0;i':''}},Hb=class{constructor(e){this.attributes=void 0,this.attributes=e||{}}toNode(){var e="http://www.w3.org/2000/svg",r=document.createElementNS(e,"line");for(var n of Object.keys(this.attributes))r.setAttribute(n,this.attributes[n]);return r}toMarkup(){var e="t instanceof Gf||t instanceof Hg||t instanceof zf,Gc={"AMS-Regular":{32:[0,0,0,0,.25],65:[0,.68889,0,0,.72222],66:[0,.68889,0,0,.66667],67:[0,.68889,0,0,.72222],68:[0,.68889,0,0,.72222],69:[0,.68889,0,0,.66667],70:[0,.68889,0,0,.61111],71:[0,.68889,0,0,.77778],72:[0,.68889,0,0,.77778],73:[0,.68889,0,0,.38889],74:[.16667,.68889,0,0,.5],75:[0,.68889,0,0,.77778],76:[0,.68889,0,0,.66667],77:[0,.68889,0,0,.94445],78:[0,.68889,0,0,.72222],79:[.16667,.68889,0,0,.77778],80:[0,.68889,0,0,.61111],81:[.16667,.68889,0,0,.77778],82:[0,.68889,0,0,.72222],83:[0,.68889,0,0,.55556],84:[0,.68889,0,0,.66667],85:[0,.68889,0,0,.72222],86:[0,.68889,0,0,.72222],87:[0,.68889,0,0,1],88:[0,.68889,0,0,.72222],89:[0,.68889,0,0,.72222],90:[0,.68889,0,0,.66667],107:[0,.68889,0,0,.55556],160:[0,0,0,0,.25],165:[0,.675,.025,0,.75],174:[.15559,.69224,0,0,.94666],240:[0,.68889,0,0,.55556],295:[0,.68889,0,0,.54028],710:[0,.825,0,0,2.33334],732:[0,.9,0,0,2.33334],770:[0,.825,0,0,2.33334],771:[0,.9,0,0,2.33334],989:[.08167,.58167,0,0,.77778],1008:[0,.43056,.04028,0,.66667],8245:[0,.54986,0,0,.275],8463:[0,.68889,0,0,.54028],8487:[0,.68889,0,0,.72222],8498:[0,.68889,0,0,.55556],8502:[0,.68889,0,0,.66667],8503:[0,.68889,0,0,.44445],8504:[0,.68889,0,0,.66667],8513:[0,.68889,0,0,.63889],8592:[-.03598,.46402,0,0,.5],8594:[-.03598,.46402,0,0,.5],8602:[-.13313,.36687,0,0,1],8603:[-.13313,.36687,0,0,1],8606:[.01354,.52239,0,0,1],8608:[.01354,.52239,0,0,1],8610:[.01354,.52239,0,0,1.11111],8611:[.01354,.52239,0,0,1.11111],8619:[0,.54986,0,0,1],8620:[0,.54986,0,0,1],8621:[-.13313,.37788,0,0,1.38889],8622:[-.13313,.36687,0,0,1],8624:[0,.69224,0,0,.5],8625:[0,.69224,0,0,.5],8630:[0,.43056,0,0,1],8631:[0,.43056,0,0,1],8634:[.08198,.58198,0,0,.77778],8635:[.08198,.58198,0,0,.77778],8638:[.19444,.69224,0,0,.41667],8639:[.19444,.69224,0,0,.41667],8642:[.19444,.69224,0,0,.41667],8643:[.19444,.69224,0,0,.41667],8644:[.1808,.675,0,0,1],8646:[.1808,.675,0,0,1],8647:[.1808,.675,0,0,1],8648:[.19444,.69224,0,0,.83334],8649:[.1808,.675,0,0,1],8650:[.19444,.69224,0,0,.83334],8651:[.01354,.52239,0,0,1],8652:[.01354,.52239,0,0,1],8653:[-.13313,.36687,0,0,1],8654:[-.13313,.36687,0,0,1],8655:[-.13313,.36687,0,0,1],8666:[.13667,.63667,0,0,1],8667:[.13667,.63667,0,0,1],8669:[-.13313,.37788,0,0,1],8672:[-.064,.437,0,0,1.334],8674:[-.064,.437,0,0,1.334],8705:[0,.825,0,0,.5],8708:[0,.68889,0,0,.55556],8709:[.08167,.58167,0,0,.77778],8717:[0,.43056,0,0,.42917],8722:[-.03598,.46402,0,0,.5],8724:[.08198,.69224,0,0,.77778],8726:[.08167,.58167,0,0,.77778],8733:[0,.69224,0,0,.77778],8736:[0,.69224,0,0,.72222],8737:[0,.69224,0,0,.72222],8738:[.03517,.52239,0,0,.72222],8739:[.08167,.58167,0,0,.22222],8740:[.25142,.74111,0,0,.27778],8741:[.08167,.58167,0,0,.38889],8742:[.25142,.74111,0,0,.5],8756:[0,.69224,0,0,.66667],8757:[0,.69224,0,0,.66667],8764:[-.13313,.36687,0,0,.77778],8765:[-.13313,.37788,0,0,.77778],8769:[-.13313,.36687,0,0,.77778],8770:[-.03625,.46375,0,0,.77778],8774:[.30274,.79383,0,0,.77778],8776:[-.01688,.48312,0,0,.77778],8778:[.08167,.58167,0,0,.77778],8782:[.06062,.54986,0,0,.77778],8783:[.06062,.54986,0,0,.77778],8785:[.08198,.58198,0,0,.77778],8786:[.08198,.58198,0,0,.77778],8787:[.08198,.58198,0,0,.77778],8790:[0,.69224,0,0,.77778],8791:[.22958,.72958,0,0,.77778],8796:[.08198,.91667,0,0,.77778],8806:[.25583,.75583,0,0,.77778],8807:[.25583,.75583,0,0,.77778],8808:[.25142,.75726,0,0,.77778],8809:[.25142,.75726,0,0,.77778],8812:[.25583,.75583,0,0,.5],8814:[.20576,.70576,0,0,.77778],8815:[.20576,.70576,0,0,.77778],8816:[.30274,.79383,0,0,.77778],8817:[.30274,.79383,0,0,.77778],8818:[.22958,.72958,0,0,.77778],8819:[.22958,.72958,0,0,.77778],8822:[.1808,.675,0,0,.77778],8823:[.1808,.675,0,0,.77778],8828:[.13667,.63667,0,0,.77778],8829:[.13667,.63667,0,0,.77778],8830:[.22958,.72958,0,0,.77778],8831:[.22958,.72958,0,0,.77778],8832:[.20576,.70576,0,0,.77778],8833:[.20576,.70576,0,0,.77778],8840:[.30274,.79383,0,0,.77778],8841:[.30274,.79383,0,0,.77778],8842:[.13597,.63597,0,0,.77778],8843:[.13597,.63597,0,0,.77778],8847:[.03517,.54986,0,0,.77778],8848:[.03517,.54986,0,0,.77778],8858:[.08198,.58198,0,0,.77778],8859:[.08198,.58198,0,0,.77778],8861:[.08198,.58198,0,0,.77778],8862:[0,.675,0,0,.77778],8863:[0,.675,0,0,.77778],8864:[0,.675,0,0,.77778],8865:[0,.675,0,0,.77778],8872:[0,.69224,0,0,.61111],8873:[0,.69224,0,0,.72222],8874:[0,.69224,0,0,.88889],8876:[0,.68889,0,0,.61111],8877:[0,.68889,0,0,.61111],8878:[0,.68889,0,0,.72222],8879:[0,.68889,0,0,.72222],8882:[.03517,.54986,0,0,.77778],8883:[.03517,.54986,0,0,.77778],8884:[.13667,.63667,0,0,.77778],8885:[.13667,.63667,0,0,.77778],8888:[0,.54986,0,0,1.11111],8890:[.19444,.43056,0,0,.55556],8891:[.19444,.69224,0,0,.61111],8892:[.19444,.69224,0,0,.61111],8901:[0,.54986,0,0,.27778],8903:[.08167,.58167,0,0,.77778],8905:[.08167,.58167,0,0,.77778],8906:[.08167,.58167,0,0,.77778],8907:[0,.69224,0,0,.77778],8908:[0,.69224,0,0,.77778],8909:[-.03598,.46402,0,0,.77778],8910:[0,.54986,0,0,.76042],8911:[0,.54986,0,0,.76042],8912:[.03517,.54986,0,0,.77778],8913:[.03517,.54986,0,0,.77778],8914:[0,.54986,0,0,.66667],8915:[0,.54986,0,0,.66667],8916:[0,.69224,0,0,.66667],8918:[.0391,.5391,0,0,.77778],8919:[.0391,.5391,0,0,.77778],8920:[.03517,.54986,0,0,1.33334],8921:[.03517,.54986,0,0,1.33334],8922:[.38569,.88569,0,0,.77778],8923:[.38569,.88569,0,0,.77778],8926:[.13667,.63667,0,0,.77778],8927:[.13667,.63667,0,0,.77778],8928:[.30274,.79383,0,0,.77778],8929:[.30274,.79383,0,0,.77778],8934:[.23222,.74111,0,0,.77778],8935:[.23222,.74111,0,0,.77778],8936:[.23222,.74111,0,0,.77778],8937:[.23222,.74111,0,0,.77778],8938:[.20576,.70576,0,0,.77778],8939:[.20576,.70576,0,0,.77778],8940:[.30274,.79383,0,0,.77778],8941:[.30274,.79383,0,0,.77778],8994:[.19444,.69224,0,0,.77778],8995:[.19444,.69224,0,0,.77778],9416:[.15559,.69224,0,0,.90222],9484:[0,.69224,0,0,.5],9488:[0,.69224,0,0,.5],9492:[0,.37788,0,0,.5],9496:[0,.37788,0,0,.5],9585:[.19444,.68889,0,0,.88889],9586:[.19444,.74111,0,0,.88889],9632:[0,.675,0,0,.77778],9633:[0,.675,0,0,.77778],9650:[0,.54986,0,0,.72222],9651:[0,.54986,0,0,.72222],9654:[.03517,.54986,0,0,.77778],9660:[0,.54986,0,0,.72222],9661:[0,.54986,0,0,.72222],9664:[.03517,.54986,0,0,.77778],9674:[.11111,.69224,0,0,.66667],9733:[.19444,.69224,0,0,.94445],10003:[0,.69224,0,0,.83334],10016:[0,.69224,0,0,.83334],10731:[.11111,.69224,0,0,.66667],10846:[.19444,.75583,0,0,.61111],10877:[.13667,.63667,0,0,.77778],10878:[.13667,.63667,0,0,.77778],10885:[.25583,.75583,0,0,.77778],10886:[.25583,.75583,0,0,.77778],10887:[.13597,.63597,0,0,.77778],10888:[.13597,.63597,0,0,.77778],10889:[.26167,.75726,0,0,.77778],10890:[.26167,.75726,0,0,.77778],10891:[.48256,.98256,0,0,.77778],10892:[.48256,.98256,0,0,.77778],10901:[.13667,.63667,0,0,.77778],10902:[.13667,.63667,0,0,.77778],10933:[.25142,.75726,0,0,.77778],10934:[.25142,.75726,0,0,.77778],10935:[.26167,.75726,0,0,.77778],10936:[.26167,.75726,0,0,.77778],10937:[.26167,.75726,0,0,.77778],10938:[.26167,.75726,0,0,.77778],10949:[.25583,.75583,0,0,.77778],10950:[.25583,.75583,0,0,.77778],10955:[.28481,.79383,0,0,.77778],10956:[.28481,.79383,0,0,.77778],57350:[.08167,.58167,0,0,.22222],57351:[.08167,.58167,0,0,.38889],57352:[.08167,.58167,0,0,.77778],57353:[0,.43056,.04028,0,.66667],57356:[.25142,.75726,0,0,.77778],57357:[.25142,.75726,0,0,.77778],57358:[.41951,.91951,0,0,.77778],57359:[.30274,.79383,0,0,.77778],57360:[.30274,.79383,0,0,.77778],57361:[.41951,.91951,0,0,.77778],57366:[.25142,.75726,0,0,.77778],57367:[.25142,.75726,0,0,.77778],57368:[.25142,.75726,0,0,.77778],57369:[.25142,.75726,0,0,.77778],57370:[.13597,.63597,0,0,.77778],57371:[.13597,.63597,0,0,.77778]},"Caligraphic-Regular":{32:[0,0,0,0,.25],65:[0,.68333,0,.19445,.79847],66:[0,.68333,.03041,.13889,.65681],67:[0,.68333,.05834,.13889,.52653],68:[0,.68333,.02778,.08334,.77139],69:[0,.68333,.08944,.11111,.52778],70:[0,.68333,.09931,.11111,.71875],71:[.09722,.68333,.0593,.11111,.59487],72:[0,.68333,.00965,.11111,.84452],73:[0,.68333,.07382,0,.54452],74:[.09722,.68333,.18472,.16667,.67778],75:[0,.68333,.01445,.05556,.76195],76:[0,.68333,0,.13889,.68972],77:[0,.68333,0,.13889,1.2009],78:[0,.68333,.14736,.08334,.82049],79:[0,.68333,.02778,.11111,.79611],80:[0,.68333,.08222,.08334,.69556],81:[.09722,.68333,0,.11111,.81667],82:[0,.68333,0,.08334,.8475],83:[0,.68333,.075,.13889,.60556],84:[0,.68333,.25417,0,.54464],85:[0,.68333,.09931,.08334,.62583],86:[0,.68333,.08222,0,.61278],87:[0,.68333,.08222,.08334,.98778],88:[0,.68333,.14643,.13889,.7133],89:[.09722,.68333,.08222,.08334,.66834],90:[0,.68333,.07944,.13889,.72473],160:[0,0,0,0,.25]},"Fraktur-Regular":{32:[0,0,0,0,.25],33:[0,.69141,0,0,.29574],34:[0,.69141,0,0,.21471],38:[0,.69141,0,0,.73786],39:[0,.69141,0,0,.21201],40:[.24982,.74947,0,0,.38865],41:[.24982,.74947,0,0,.38865],42:[0,.62119,0,0,.27764],43:[.08319,.58283,0,0,.75623],44:[0,.10803,0,0,.27764],45:[.08319,.58283,0,0,.75623],46:[0,.10803,0,0,.27764],47:[.24982,.74947,0,0,.50181],48:[0,.47534,0,0,.50181],49:[0,.47534,0,0,.50181],50:[0,.47534,0,0,.50181],51:[.18906,.47534,0,0,.50181],52:[.18906,.47534,0,0,.50181],53:[.18906,.47534,0,0,.50181],54:[0,.69141,0,0,.50181],55:[.18906,.47534,0,0,.50181],56:[0,.69141,0,0,.50181],57:[.18906,.47534,0,0,.50181],58:[0,.47534,0,0,.21606],59:[.12604,.47534,0,0,.21606],61:[-.13099,.36866,0,0,.75623],63:[0,.69141,0,0,.36245],65:[0,.69141,0,0,.7176],66:[0,.69141,0,0,.88397],67:[0,.69141,0,0,.61254],68:[0,.69141,0,0,.83158],69:[0,.69141,0,0,.66278],70:[.12604,.69141,0,0,.61119],71:[0,.69141,0,0,.78539],72:[.06302,.69141,0,0,.7203],73:[0,.69141,0,0,.55448],74:[.12604,.69141,0,0,.55231],75:[0,.69141,0,0,.66845],76:[0,.69141,0,0,.66602],77:[0,.69141,0,0,1.04953],78:[0,.69141,0,0,.83212],79:[0,.69141,0,0,.82699],80:[.18906,.69141,0,0,.82753],81:[.03781,.69141,0,0,.82699],82:[0,.69141,0,0,.82807],83:[0,.69141,0,0,.82861],84:[0,.69141,0,0,.66899],85:[0,.69141,0,0,.64576],86:[0,.69141,0,0,.83131],87:[0,.69141,0,0,1.04602],88:[0,.69141,0,0,.71922],89:[.18906,.69141,0,0,.83293],90:[.12604,.69141,0,0,.60201],91:[.24982,.74947,0,0,.27764],93:[.24982,.74947,0,0,.27764],94:[0,.69141,0,0,.49965],97:[0,.47534,0,0,.50046],98:[0,.69141,0,0,.51315],99:[0,.47534,0,0,.38946],100:[0,.62119,0,0,.49857],101:[0,.47534,0,0,.40053],102:[.18906,.69141,0,0,.32626],103:[.18906,.47534,0,0,.5037],104:[.18906,.69141,0,0,.52126],105:[0,.69141,0,0,.27899],106:[0,.69141,0,0,.28088],107:[0,.69141,0,0,.38946],108:[0,.69141,0,0,.27953],109:[0,.47534,0,0,.76676],110:[0,.47534,0,0,.52666],111:[0,.47534,0,0,.48885],112:[.18906,.52396,0,0,.50046],113:[.18906,.47534,0,0,.48912],114:[0,.47534,0,0,.38919],115:[0,.47534,0,0,.44266],116:[0,.62119,0,0,.33301],117:[0,.47534,0,0,.5172],118:[0,.52396,0,0,.5118],119:[0,.52396,0,0,.77351],120:[.18906,.47534,0,0,.38865],121:[.18906,.47534,0,0,.49884],122:[.18906,.47534,0,0,.39054],160:[0,0,0,0,.25],8216:[0,.69141,0,0,.21471],8217:[0,.69141,0,0,.21471],58112:[0,.62119,0,0,.49749],58113:[0,.62119,0,0,.4983],58114:[.18906,.69141,0,0,.33328],58115:[.18906,.69141,0,0,.32923],58116:[.18906,.47534,0,0,.50343],58117:[0,.69141,0,0,.33301],58118:[0,.62119,0,0,.33409],58119:[0,.47534,0,0,.50073]},"Main-Bold":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.35],34:[0,.69444,0,0,.60278],35:[.19444,.69444,0,0,.95833],36:[.05556,.75,0,0,.575],37:[.05556,.75,0,0,.95833],38:[0,.69444,0,0,.89444],39:[0,.69444,0,0,.31944],40:[.25,.75,0,0,.44722],41:[.25,.75,0,0,.44722],42:[0,.75,0,0,.575],43:[.13333,.63333,0,0,.89444],44:[.19444,.15556,0,0,.31944],45:[0,.44444,0,0,.38333],46:[0,.15556,0,0,.31944],47:[.25,.75,0,0,.575],48:[0,.64444,0,0,.575],49:[0,.64444,0,0,.575],50:[0,.64444,0,0,.575],51:[0,.64444,0,0,.575],52:[0,.64444,0,0,.575],53:[0,.64444,0,0,.575],54:[0,.64444,0,0,.575],55:[0,.64444,0,0,.575],56:[0,.64444,0,0,.575],57:[0,.64444,0,0,.575],58:[0,.44444,0,0,.31944],59:[.19444,.44444,0,0,.31944],60:[.08556,.58556,0,0,.89444],61:[-.10889,.39111,0,0,.89444],62:[.08556,.58556,0,0,.89444],63:[0,.69444,0,0,.54305],64:[0,.69444,0,0,.89444],65:[0,.68611,0,0,.86944],66:[0,.68611,0,0,.81805],67:[0,.68611,0,0,.83055],68:[0,.68611,0,0,.88194],69:[0,.68611,0,0,.75555],70:[0,.68611,0,0,.72361],71:[0,.68611,0,0,.90416],72:[0,.68611,0,0,.9],73:[0,.68611,0,0,.43611],74:[0,.68611,0,0,.59444],75:[0,.68611,0,0,.90138],76:[0,.68611,0,0,.69166],77:[0,.68611,0,0,1.09166],78:[0,.68611,0,0,.9],79:[0,.68611,0,0,.86388],80:[0,.68611,0,0,.78611],81:[.19444,.68611,0,0,.86388],82:[0,.68611,0,0,.8625],83:[0,.68611,0,0,.63889],84:[0,.68611,0,0,.8],85:[0,.68611,0,0,.88472],86:[0,.68611,.01597,0,.86944],87:[0,.68611,.01597,0,1.18888],88:[0,.68611,0,0,.86944],89:[0,.68611,.02875,0,.86944],90:[0,.68611,0,0,.70277],91:[.25,.75,0,0,.31944],92:[.25,.75,0,0,.575],93:[.25,.75,0,0,.31944],94:[0,.69444,0,0,.575],95:[.31,.13444,.03194,0,.575],97:[0,.44444,0,0,.55902],98:[0,.69444,0,0,.63889],99:[0,.44444,0,0,.51111],100:[0,.69444,0,0,.63889],101:[0,.44444,0,0,.52708],102:[0,.69444,.10903,0,.35139],103:[.19444,.44444,.01597,0,.575],104:[0,.69444,0,0,.63889],105:[0,.69444,0,0,.31944],106:[.19444,.69444,0,0,.35139],107:[0,.69444,0,0,.60694],108:[0,.69444,0,0,.31944],109:[0,.44444,0,0,.95833],110:[0,.44444,0,0,.63889],111:[0,.44444,0,0,.575],112:[.19444,.44444,0,0,.63889],113:[.19444,.44444,0,0,.60694],114:[0,.44444,0,0,.47361],115:[0,.44444,0,0,.45361],116:[0,.63492,0,0,.44722],117:[0,.44444,0,0,.63889],118:[0,.44444,.01597,0,.60694],119:[0,.44444,.01597,0,.83055],120:[0,.44444,0,0,.60694],121:[.19444,.44444,.01597,0,.60694],122:[0,.44444,0,0,.51111],123:[.25,.75,0,0,.575],124:[.25,.75,0,0,.31944],125:[.25,.75,0,0,.575],126:[.35,.34444,0,0,.575],160:[0,0,0,0,.25],163:[0,.69444,0,0,.86853],168:[0,.69444,0,0,.575],172:[0,.44444,0,0,.76666],176:[0,.69444,0,0,.86944],177:[.13333,.63333,0,0,.89444],184:[.17014,0,0,0,.51111],198:[0,.68611,0,0,1.04166],215:[.13333,.63333,0,0,.89444],216:[.04861,.73472,0,0,.89444],223:[0,.69444,0,0,.59722],230:[0,.44444,0,0,.83055],247:[.13333,.63333,0,0,.89444],248:[.09722,.54167,0,0,.575],305:[0,.44444,0,0,.31944],338:[0,.68611,0,0,1.16944],339:[0,.44444,0,0,.89444],567:[.19444,.44444,0,0,.35139],710:[0,.69444,0,0,.575],711:[0,.63194,0,0,.575],713:[0,.59611,0,0,.575],714:[0,.69444,0,0,.575],715:[0,.69444,0,0,.575],728:[0,.69444,0,0,.575],729:[0,.69444,0,0,.31944],730:[0,.69444,0,0,.86944],732:[0,.69444,0,0,.575],733:[0,.69444,0,0,.575],915:[0,.68611,0,0,.69166],916:[0,.68611,0,0,.95833],920:[0,.68611,0,0,.89444],923:[0,.68611,0,0,.80555],926:[0,.68611,0,0,.76666],928:[0,.68611,0,0,.9],931:[0,.68611,0,0,.83055],933:[0,.68611,0,0,.89444],934:[0,.68611,0,0,.83055],936:[0,.68611,0,0,.89444],937:[0,.68611,0,0,.83055],8211:[0,.44444,.03194,0,.575],8212:[0,.44444,.03194,0,1.14999],8216:[0,.69444,0,0,.31944],8217:[0,.69444,0,0,.31944],8220:[0,.69444,0,0,.60278],8221:[0,.69444,0,0,.60278],8224:[.19444,.69444,0,0,.51111],8225:[.19444,.69444,0,0,.51111],8242:[0,.55556,0,0,.34444],8407:[0,.72444,.15486,0,.575],8463:[0,.69444,0,0,.66759],8465:[0,.69444,0,0,.83055],8467:[0,.69444,0,0,.47361],8472:[.19444,.44444,0,0,.74027],8476:[0,.69444,0,0,.83055],8501:[0,.69444,0,0,.70277],8592:[-.10889,.39111,0,0,1.14999],8593:[.19444,.69444,0,0,.575],8594:[-.10889,.39111,0,0,1.14999],8595:[.19444,.69444,0,0,.575],8596:[-.10889,.39111,0,0,1.14999],8597:[.25,.75,0,0,.575],8598:[.19444,.69444,0,0,1.14999],8599:[.19444,.69444,0,0,1.14999],8600:[.19444,.69444,0,0,1.14999],8601:[.19444,.69444,0,0,1.14999],8636:[-.10889,.39111,0,0,1.14999],8637:[-.10889,.39111,0,0,1.14999],8640:[-.10889,.39111,0,0,1.14999],8641:[-.10889,.39111,0,0,1.14999],8656:[-.10889,.39111,0,0,1.14999],8657:[.19444,.69444,0,0,.70277],8658:[-.10889,.39111,0,0,1.14999],8659:[.19444,.69444,0,0,.70277],8660:[-.10889,.39111,0,0,1.14999],8661:[.25,.75,0,0,.70277],8704:[0,.69444,0,0,.63889],8706:[0,.69444,.06389,0,.62847],8707:[0,.69444,0,0,.63889],8709:[.05556,.75,0,0,.575],8711:[0,.68611,0,0,.95833],8712:[.08556,.58556,0,0,.76666],8715:[.08556,.58556,0,0,.76666],8722:[.13333,.63333,0,0,.89444],8723:[.13333,.63333,0,0,.89444],8725:[.25,.75,0,0,.575],8726:[.25,.75,0,0,.575],8727:[-.02778,.47222,0,0,.575],8728:[-.02639,.47361,0,0,.575],8729:[-.02639,.47361,0,0,.575],8730:[.18,.82,0,0,.95833],8733:[0,.44444,0,0,.89444],8734:[0,.44444,0,0,1.14999],8736:[0,.69224,0,0,.72222],8739:[.25,.75,0,0,.31944],8741:[.25,.75,0,0,.575],8743:[0,.55556,0,0,.76666],8744:[0,.55556,0,0,.76666],8745:[0,.55556,0,0,.76666],8746:[0,.55556,0,0,.76666],8747:[.19444,.69444,.12778,0,.56875],8764:[-.10889,.39111,0,0,.89444],8768:[.19444,.69444,0,0,.31944],8771:[.00222,.50222,0,0,.89444],8773:[.027,.638,0,0,.894],8776:[.02444,.52444,0,0,.89444],8781:[.00222,.50222,0,0,.89444],8801:[.00222,.50222,0,0,.89444],8804:[.19667,.69667,0,0,.89444],8805:[.19667,.69667,0,0,.89444],8810:[.08556,.58556,0,0,1.14999],8811:[.08556,.58556,0,0,1.14999],8826:[.08556,.58556,0,0,.89444],8827:[.08556,.58556,0,0,.89444],8834:[.08556,.58556,0,0,.89444],8835:[.08556,.58556,0,0,.89444],8838:[.19667,.69667,0,0,.89444],8839:[.19667,.69667,0,0,.89444],8846:[0,.55556,0,0,.76666],8849:[.19667,.69667,0,0,.89444],8850:[.19667,.69667,0,0,.89444],8851:[0,.55556,0,0,.76666],8852:[0,.55556,0,0,.76666],8853:[.13333,.63333,0,0,.89444],8854:[.13333,.63333,0,0,.89444],8855:[.13333,.63333,0,0,.89444],8856:[.13333,.63333,0,0,.89444],8857:[.13333,.63333,0,0,.89444],8866:[0,.69444,0,0,.70277],8867:[0,.69444,0,0,.70277],8868:[0,.69444,0,0,.89444],8869:[0,.69444,0,0,.89444],8900:[-.02639,.47361,0,0,.575],8901:[-.02639,.47361,0,0,.31944],8902:[-.02778,.47222,0,0,.575],8968:[.25,.75,0,0,.51111],8969:[.25,.75,0,0,.51111],8970:[.25,.75,0,0,.51111],8971:[.25,.75,0,0,.51111],8994:[-.13889,.36111,0,0,1.14999],8995:[-.13889,.36111,0,0,1.14999],9651:[.19444,.69444,0,0,1.02222],9657:[-.02778,.47222,0,0,.575],9661:[.19444,.69444,0,0,1.02222],9667:[-.02778,.47222,0,0,.575],9711:[.19444,.69444,0,0,1.14999],9824:[.12963,.69444,0,0,.89444],9825:[.12963,.69444,0,0,.89444],9826:[.12963,.69444,0,0,.89444],9827:[.12963,.69444,0,0,.89444],9837:[0,.75,0,0,.44722],9838:[.19444,.69444,0,0,.44722],9839:[.19444,.69444,0,0,.44722],10216:[.25,.75,0,0,.44722],10217:[.25,.75,0,0,.44722],10815:[0,.68611,0,0,.9],10927:[.19667,.69667,0,0,.89444],10928:[.19667,.69667,0,0,.89444],57376:[.19444,.69444,0,0,0]},"Main-BoldItalic":{32:[0,0,0,0,.25],33:[0,.69444,.11417,0,.38611],34:[0,.69444,.07939,0,.62055],35:[.19444,.69444,.06833,0,.94444],37:[.05556,.75,.12861,0,.94444],38:[0,.69444,.08528,0,.88555],39:[0,.69444,.12945,0,.35555],40:[.25,.75,.15806,0,.47333],41:[.25,.75,.03306,0,.47333],42:[0,.75,.14333,0,.59111],43:[.10333,.60333,.03306,0,.88555],44:[.19444,.14722,0,0,.35555],45:[0,.44444,.02611,0,.41444],46:[0,.14722,0,0,.35555],47:[.25,.75,.15806,0,.59111],48:[0,.64444,.13167,0,.59111],49:[0,.64444,.13167,0,.59111],50:[0,.64444,.13167,0,.59111],51:[0,.64444,.13167,0,.59111],52:[.19444,.64444,.13167,0,.59111],53:[0,.64444,.13167,0,.59111],54:[0,.64444,.13167,0,.59111],55:[.19444,.64444,.13167,0,.59111],56:[0,.64444,.13167,0,.59111],57:[0,.64444,.13167,0,.59111],58:[0,.44444,.06695,0,.35555],59:[.19444,.44444,.06695,0,.35555],61:[-.10889,.39111,.06833,0,.88555],63:[0,.69444,.11472,0,.59111],64:[0,.69444,.09208,0,.88555],65:[0,.68611,0,0,.86555],66:[0,.68611,.0992,0,.81666],67:[0,.68611,.14208,0,.82666],68:[0,.68611,.09062,0,.87555],69:[0,.68611,.11431,0,.75666],70:[0,.68611,.12903,0,.72722],71:[0,.68611,.07347,0,.89527],72:[0,.68611,.17208,0,.8961],73:[0,.68611,.15681,0,.47166],74:[0,.68611,.145,0,.61055],75:[0,.68611,.14208,0,.89499],76:[0,.68611,0,0,.69777],77:[0,.68611,.17208,0,1.07277],78:[0,.68611,.17208,0,.8961],79:[0,.68611,.09062,0,.85499],80:[0,.68611,.0992,0,.78721],81:[.19444,.68611,.09062,0,.85499],82:[0,.68611,.02559,0,.85944],83:[0,.68611,.11264,0,.64999],84:[0,.68611,.12903,0,.7961],85:[0,.68611,.17208,0,.88083],86:[0,.68611,.18625,0,.86555],87:[0,.68611,.18625,0,1.15999],88:[0,.68611,.15681,0,.86555],89:[0,.68611,.19803,0,.86555],90:[0,.68611,.14208,0,.70888],91:[.25,.75,.1875,0,.35611],93:[.25,.75,.09972,0,.35611],94:[0,.69444,.06709,0,.59111],95:[.31,.13444,.09811,0,.59111],97:[0,.44444,.09426,0,.59111],98:[0,.69444,.07861,0,.53222],99:[0,.44444,.05222,0,.53222],100:[0,.69444,.10861,0,.59111],101:[0,.44444,.085,0,.53222],102:[.19444,.69444,.21778,0,.4],103:[.19444,.44444,.105,0,.53222],104:[0,.69444,.09426,0,.59111],105:[0,.69326,.11387,0,.35555],106:[.19444,.69326,.1672,0,.35555],107:[0,.69444,.11111,0,.53222],108:[0,.69444,.10861,0,.29666],109:[0,.44444,.09426,0,.94444],110:[0,.44444,.09426,0,.64999],111:[0,.44444,.07861,0,.59111],112:[.19444,.44444,.07861,0,.59111],113:[.19444,.44444,.105,0,.53222],114:[0,.44444,.11111,0,.50167],115:[0,.44444,.08167,0,.48694],116:[0,.63492,.09639,0,.385],117:[0,.44444,.09426,0,.62055],118:[0,.44444,.11111,0,.53222],119:[0,.44444,.11111,0,.76777],120:[0,.44444,.12583,0,.56055],121:[.19444,.44444,.105,0,.56166],122:[0,.44444,.13889,0,.49055],126:[.35,.34444,.11472,0,.59111],160:[0,0,0,0,.25],168:[0,.69444,.11473,0,.59111],176:[0,.69444,0,0,.94888],184:[.17014,0,0,0,.53222],198:[0,.68611,.11431,0,1.02277],216:[.04861,.73472,.09062,0,.88555],223:[.19444,.69444,.09736,0,.665],230:[0,.44444,.085,0,.82666],248:[.09722,.54167,.09458,0,.59111],305:[0,.44444,.09426,0,.35555],338:[0,.68611,.11431,0,1.14054],339:[0,.44444,.085,0,.82666],567:[.19444,.44444,.04611,0,.385],710:[0,.69444,.06709,0,.59111],711:[0,.63194,.08271,0,.59111],713:[0,.59444,.10444,0,.59111],714:[0,.69444,.08528,0,.59111],715:[0,.69444,0,0,.59111],728:[0,.69444,.10333,0,.59111],729:[0,.69444,.12945,0,.35555],730:[0,.69444,0,0,.94888],732:[0,.69444,.11472,0,.59111],733:[0,.69444,.11472,0,.59111],915:[0,.68611,.12903,0,.69777],916:[0,.68611,0,0,.94444],920:[0,.68611,.09062,0,.88555],923:[0,.68611,0,0,.80666],926:[0,.68611,.15092,0,.76777],928:[0,.68611,.17208,0,.8961],931:[0,.68611,.11431,0,.82666],933:[0,.68611,.10778,0,.88555],934:[0,.68611,.05632,0,.82666],936:[0,.68611,.10778,0,.88555],937:[0,.68611,.0992,0,.82666],8211:[0,.44444,.09811,0,.59111],8212:[0,.44444,.09811,0,1.18221],8216:[0,.69444,.12945,0,.35555],8217:[0,.69444,.12945,0,.35555],8220:[0,.69444,.16772,0,.62055],8221:[0,.69444,.07939,0,.62055]},"Main-Italic":{32:[0,0,0,0,.25],33:[0,.69444,.12417,0,.30667],34:[0,.69444,.06961,0,.51444],35:[.19444,.69444,.06616,0,.81777],37:[.05556,.75,.13639,0,.81777],38:[0,.69444,.09694,0,.76666],39:[0,.69444,.12417,0,.30667],40:[.25,.75,.16194,0,.40889],41:[.25,.75,.03694,0,.40889],42:[0,.75,.14917,0,.51111],43:[.05667,.56167,.03694,0,.76666],44:[.19444,.10556,0,0,.30667],45:[0,.43056,.02826,0,.35778],46:[0,.10556,0,0,.30667],47:[.25,.75,.16194,0,.51111],48:[0,.64444,.13556,0,.51111],49:[0,.64444,.13556,0,.51111],50:[0,.64444,.13556,0,.51111],51:[0,.64444,.13556,0,.51111],52:[.19444,.64444,.13556,0,.51111],53:[0,.64444,.13556,0,.51111],54:[0,.64444,.13556,0,.51111],55:[.19444,.64444,.13556,0,.51111],56:[0,.64444,.13556,0,.51111],57:[0,.64444,.13556,0,.51111],58:[0,.43056,.0582,0,.30667],59:[.19444,.43056,.0582,0,.30667],61:[-.13313,.36687,.06616,0,.76666],63:[0,.69444,.1225,0,.51111],64:[0,.69444,.09597,0,.76666],65:[0,.68333,0,0,.74333],66:[0,.68333,.10257,0,.70389],67:[0,.68333,.14528,0,.71555],68:[0,.68333,.09403,0,.755],69:[0,.68333,.12028,0,.67833],70:[0,.68333,.13305,0,.65277],71:[0,.68333,.08722,0,.77361],72:[0,.68333,.16389,0,.74333],73:[0,.68333,.15806,0,.38555],74:[0,.68333,.14028,0,.525],75:[0,.68333,.14528,0,.76888],76:[0,.68333,0,0,.62722],77:[0,.68333,.16389,0,.89666],78:[0,.68333,.16389,0,.74333],79:[0,.68333,.09403,0,.76666],80:[0,.68333,.10257,0,.67833],81:[.19444,.68333,.09403,0,.76666],82:[0,.68333,.03868,0,.72944],83:[0,.68333,.11972,0,.56222],84:[0,.68333,.13305,0,.71555],85:[0,.68333,.16389,0,.74333],86:[0,.68333,.18361,0,.74333],87:[0,.68333,.18361,0,.99888],88:[0,.68333,.15806,0,.74333],89:[0,.68333,.19383,0,.74333],90:[0,.68333,.14528,0,.61333],91:[.25,.75,.1875,0,.30667],93:[.25,.75,.10528,0,.30667],94:[0,.69444,.06646,0,.51111],95:[.31,.12056,.09208,0,.51111],97:[0,.43056,.07671,0,.51111],98:[0,.69444,.06312,0,.46],99:[0,.43056,.05653,0,.46],100:[0,.69444,.10333,0,.51111],101:[0,.43056,.07514,0,.46],102:[.19444,.69444,.21194,0,.30667],103:[.19444,.43056,.08847,0,.46],104:[0,.69444,.07671,0,.51111],105:[0,.65536,.1019,0,.30667],106:[.19444,.65536,.14467,0,.30667],107:[0,.69444,.10764,0,.46],108:[0,.69444,.10333,0,.25555],109:[0,.43056,.07671,0,.81777],110:[0,.43056,.07671,0,.56222],111:[0,.43056,.06312,0,.51111],112:[.19444,.43056,.06312,0,.51111],113:[.19444,.43056,.08847,0,.46],114:[0,.43056,.10764,0,.42166],115:[0,.43056,.08208,0,.40889],116:[0,.61508,.09486,0,.33222],117:[0,.43056,.07671,0,.53666],118:[0,.43056,.10764,0,.46],119:[0,.43056,.10764,0,.66444],120:[0,.43056,.12042,0,.46389],121:[.19444,.43056,.08847,0,.48555],122:[0,.43056,.12292,0,.40889],126:[.35,.31786,.11585,0,.51111],160:[0,0,0,0,.25],168:[0,.66786,.10474,0,.51111],176:[0,.69444,0,0,.83129],184:[.17014,0,0,0,.46],198:[0,.68333,.12028,0,.88277],216:[.04861,.73194,.09403,0,.76666],223:[.19444,.69444,.10514,0,.53666],230:[0,.43056,.07514,0,.71555],248:[.09722,.52778,.09194,0,.51111],338:[0,.68333,.12028,0,.98499],339:[0,.43056,.07514,0,.71555],710:[0,.69444,.06646,0,.51111],711:[0,.62847,.08295,0,.51111],713:[0,.56167,.10333,0,.51111],714:[0,.69444,.09694,0,.51111],715:[0,.69444,0,0,.51111],728:[0,.69444,.10806,0,.51111],729:[0,.66786,.11752,0,.30667],730:[0,.69444,0,0,.83129],732:[0,.66786,.11585,0,.51111],733:[0,.69444,.1225,0,.51111],915:[0,.68333,.13305,0,.62722],916:[0,.68333,0,0,.81777],920:[0,.68333,.09403,0,.76666],923:[0,.68333,0,0,.69222],926:[0,.68333,.15294,0,.66444],928:[0,.68333,.16389,0,.74333],931:[0,.68333,.12028,0,.71555],933:[0,.68333,.11111,0,.76666],934:[0,.68333,.05986,0,.71555],936:[0,.68333,.11111,0,.76666],937:[0,.68333,.10257,0,.71555],8211:[0,.43056,.09208,0,.51111],8212:[0,.43056,.09208,0,1.02222],8216:[0,.69444,.12417,0,.30667],8217:[0,.69444,.12417,0,.30667],8220:[0,.69444,.1685,0,.51444],8221:[0,.69444,.06961,0,.51444],8463:[0,.68889,0,0,.54028]},"Main-Regular":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.27778],34:[0,.69444,0,0,.5],35:[.19444,.69444,0,0,.83334],36:[.05556,.75,0,0,.5],37:[.05556,.75,0,0,.83334],38:[0,.69444,0,0,.77778],39:[0,.69444,0,0,.27778],40:[.25,.75,0,0,.38889],41:[.25,.75,0,0,.38889],42:[0,.75,0,0,.5],43:[.08333,.58333,0,0,.77778],44:[.19444,.10556,0,0,.27778],45:[0,.43056,0,0,.33333],46:[0,.10556,0,0,.27778],47:[.25,.75,0,0,.5],48:[0,.64444,0,0,.5],49:[0,.64444,0,0,.5],50:[0,.64444,0,0,.5],51:[0,.64444,0,0,.5],52:[0,.64444,0,0,.5],53:[0,.64444,0,0,.5],54:[0,.64444,0,0,.5],55:[0,.64444,0,0,.5],56:[0,.64444,0,0,.5],57:[0,.64444,0,0,.5],58:[0,.43056,0,0,.27778],59:[.19444,.43056,0,0,.27778],60:[.0391,.5391,0,0,.77778],61:[-.13313,.36687,0,0,.77778],62:[.0391,.5391,0,0,.77778],63:[0,.69444,0,0,.47222],64:[0,.69444,0,0,.77778],65:[0,.68333,0,0,.75],66:[0,.68333,0,0,.70834],67:[0,.68333,0,0,.72222],68:[0,.68333,0,0,.76389],69:[0,.68333,0,0,.68056],70:[0,.68333,0,0,.65278],71:[0,.68333,0,0,.78472],72:[0,.68333,0,0,.75],73:[0,.68333,0,0,.36111],74:[0,.68333,0,0,.51389],75:[0,.68333,0,0,.77778],76:[0,.68333,0,0,.625],77:[0,.68333,0,0,.91667],78:[0,.68333,0,0,.75],79:[0,.68333,0,0,.77778],80:[0,.68333,0,0,.68056],81:[.19444,.68333,0,0,.77778],82:[0,.68333,0,0,.73611],83:[0,.68333,0,0,.55556],84:[0,.68333,0,0,.72222],85:[0,.68333,0,0,.75],86:[0,.68333,.01389,0,.75],87:[0,.68333,.01389,0,1.02778],88:[0,.68333,0,0,.75],89:[0,.68333,.025,0,.75],90:[0,.68333,0,0,.61111],91:[.25,.75,0,0,.27778],92:[.25,.75,0,0,.5],93:[.25,.75,0,0,.27778],94:[0,.69444,0,0,.5],95:[.31,.12056,.02778,0,.5],97:[0,.43056,0,0,.5],98:[0,.69444,0,0,.55556],99:[0,.43056,0,0,.44445],100:[0,.69444,0,0,.55556],101:[0,.43056,0,0,.44445],102:[0,.69444,.07778,0,.30556],103:[.19444,.43056,.01389,0,.5],104:[0,.69444,0,0,.55556],105:[0,.66786,0,0,.27778],106:[.19444,.66786,0,0,.30556],107:[0,.69444,0,0,.52778],108:[0,.69444,0,0,.27778],109:[0,.43056,0,0,.83334],110:[0,.43056,0,0,.55556],111:[0,.43056,0,0,.5],112:[.19444,.43056,0,0,.55556],113:[.19444,.43056,0,0,.52778],114:[0,.43056,0,0,.39167],115:[0,.43056,0,0,.39445],116:[0,.61508,0,0,.38889],117:[0,.43056,0,0,.55556],118:[0,.43056,.01389,0,.52778],119:[0,.43056,.01389,0,.72222],120:[0,.43056,0,0,.52778],121:[.19444,.43056,.01389,0,.52778],122:[0,.43056,0,0,.44445],123:[.25,.75,0,0,.5],124:[.25,.75,0,0,.27778],125:[.25,.75,0,0,.5],126:[.35,.31786,0,0,.5],160:[0,0,0,0,.25],163:[0,.69444,0,0,.76909],167:[.19444,.69444,0,0,.44445],168:[0,.66786,0,0,.5],172:[0,.43056,0,0,.66667],176:[0,.69444,0,0,.75],177:[.08333,.58333,0,0,.77778],182:[.19444,.69444,0,0,.61111],184:[.17014,0,0,0,.44445],198:[0,.68333,0,0,.90278],215:[.08333,.58333,0,0,.77778],216:[.04861,.73194,0,0,.77778],223:[0,.69444,0,0,.5],230:[0,.43056,0,0,.72222],247:[.08333,.58333,0,0,.77778],248:[.09722,.52778,0,0,.5],305:[0,.43056,0,0,.27778],338:[0,.68333,0,0,1.01389],339:[0,.43056,0,0,.77778],567:[.19444,.43056,0,0,.30556],710:[0,.69444,0,0,.5],711:[0,.62847,0,0,.5],713:[0,.56778,0,0,.5],714:[0,.69444,0,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,0,0,.5],729:[0,.66786,0,0,.27778],730:[0,.69444,0,0,.75],732:[0,.66786,0,0,.5],733:[0,.69444,0,0,.5],915:[0,.68333,0,0,.625],916:[0,.68333,0,0,.83334],920:[0,.68333,0,0,.77778],923:[0,.68333,0,0,.69445],926:[0,.68333,0,0,.66667],928:[0,.68333,0,0,.75],931:[0,.68333,0,0,.72222],933:[0,.68333,0,0,.77778],934:[0,.68333,0,0,.72222],936:[0,.68333,0,0,.77778],937:[0,.68333,0,0,.72222],8211:[0,.43056,.02778,0,.5],8212:[0,.43056,.02778,0,1],8216:[0,.69444,0,0,.27778],8217:[0,.69444,0,0,.27778],8220:[0,.69444,0,0,.5],8221:[0,.69444,0,0,.5],8224:[.19444,.69444,0,0,.44445],8225:[.19444,.69444,0,0,.44445],8230:[0,.123,0,0,1.172],8242:[0,.55556,0,0,.275],8407:[0,.71444,.15382,0,.5],8463:[0,.68889,0,0,.54028],8465:[0,.69444,0,0,.72222],8467:[0,.69444,0,.11111,.41667],8472:[.19444,.43056,0,.11111,.63646],8476:[0,.69444,0,0,.72222],8501:[0,.69444,0,0,.61111],8592:[-.13313,.36687,0,0,1],8593:[.19444,.69444,0,0,.5],8594:[-.13313,.36687,0,0,1],8595:[.19444,.69444,0,0,.5],8596:[-.13313,.36687,0,0,1],8597:[.25,.75,0,0,.5],8598:[.19444,.69444,0,0,1],8599:[.19444,.69444,0,0,1],8600:[.19444,.69444,0,0,1],8601:[.19444,.69444,0,0,1],8614:[.011,.511,0,0,1],8617:[.011,.511,0,0,1.126],8618:[.011,.511,0,0,1.126],8636:[-.13313,.36687,0,0,1],8637:[-.13313,.36687,0,0,1],8640:[-.13313,.36687,0,0,1],8641:[-.13313,.36687,0,0,1],8652:[.011,.671,0,0,1],8656:[-.13313,.36687,0,0,1],8657:[.19444,.69444,0,0,.61111],8658:[-.13313,.36687,0,0,1],8659:[.19444,.69444,0,0,.61111],8660:[-.13313,.36687,0,0,1],8661:[.25,.75,0,0,.61111],8704:[0,.69444,0,0,.55556],8706:[0,.69444,.05556,.08334,.5309],8707:[0,.69444,0,0,.55556],8709:[.05556,.75,0,0,.5],8711:[0,.68333,0,0,.83334],8712:[.0391,.5391,0,0,.66667],8715:[.0391,.5391,0,0,.66667],8722:[.08333,.58333,0,0,.77778],8723:[.08333,.58333,0,0,.77778],8725:[.25,.75,0,0,.5],8726:[.25,.75,0,0,.5],8727:[-.03472,.46528,0,0,.5],8728:[-.05555,.44445,0,0,.5],8729:[-.05555,.44445,0,0,.5],8730:[.2,.8,0,0,.83334],8733:[0,.43056,0,0,.77778],8734:[0,.43056,0,0,1],8736:[0,.69224,0,0,.72222],8739:[.25,.75,0,0,.27778],8741:[.25,.75,0,0,.5],8743:[0,.55556,0,0,.66667],8744:[0,.55556,0,0,.66667],8745:[0,.55556,0,0,.66667],8746:[0,.55556,0,0,.66667],8747:[.19444,.69444,.11111,0,.41667],8764:[-.13313,.36687,0,0,.77778],8768:[.19444,.69444,0,0,.27778],8771:[-.03625,.46375,0,0,.77778],8773:[-.022,.589,0,0,.778],8776:[-.01688,.48312,0,0,.77778],8781:[-.03625,.46375,0,0,.77778],8784:[-.133,.673,0,0,.778],8801:[-.03625,.46375,0,0,.77778],8804:[.13597,.63597,0,0,.77778],8805:[.13597,.63597,0,0,.77778],8810:[.0391,.5391,0,0,1],8811:[.0391,.5391,0,0,1],8826:[.0391,.5391,0,0,.77778],8827:[.0391,.5391,0,0,.77778],8834:[.0391,.5391,0,0,.77778],8835:[.0391,.5391,0,0,.77778],8838:[.13597,.63597,0,0,.77778],8839:[.13597,.63597,0,0,.77778],8846:[0,.55556,0,0,.66667],8849:[.13597,.63597,0,0,.77778],8850:[.13597,.63597,0,0,.77778],8851:[0,.55556,0,0,.66667],8852:[0,.55556,0,0,.66667],8853:[.08333,.58333,0,0,.77778],8854:[.08333,.58333,0,0,.77778],8855:[.08333,.58333,0,0,.77778],8856:[.08333,.58333,0,0,.77778],8857:[.08333,.58333,0,0,.77778],8866:[0,.69444,0,0,.61111],8867:[0,.69444,0,0,.61111],8868:[0,.69444,0,0,.77778],8869:[0,.69444,0,0,.77778],8872:[.249,.75,0,0,.867],8900:[-.05555,.44445,0,0,.5],8901:[-.05555,.44445,0,0,.27778],8902:[-.03472,.46528,0,0,.5],8904:[.005,.505,0,0,.9],8942:[.03,.903,0,0,.278],8943:[-.19,.313,0,0,1.172],8945:[-.1,.823,0,0,1.282],8968:[.25,.75,0,0,.44445],8969:[.25,.75,0,0,.44445],8970:[.25,.75,0,0,.44445],8971:[.25,.75,0,0,.44445],8994:[-.14236,.35764,0,0,1],8995:[-.14236,.35764,0,0,1],9136:[.244,.744,0,0,.412],9137:[.244,.745,0,0,.412],9651:[.19444,.69444,0,0,.88889],9657:[-.03472,.46528,0,0,.5],9661:[.19444,.69444,0,0,.88889],9667:[-.03472,.46528,0,0,.5],9711:[.19444,.69444,0,0,1],9824:[.12963,.69444,0,0,.77778],9825:[.12963,.69444,0,0,.77778],9826:[.12963,.69444,0,0,.77778],9827:[.12963,.69444,0,0,.77778],9837:[0,.75,0,0,.38889],9838:[.19444,.69444,0,0,.38889],9839:[.19444,.69444,0,0,.38889],10216:[.25,.75,0,0,.38889],10217:[.25,.75,0,0,.38889],10222:[.244,.744,0,0,.412],10223:[.244,.745,0,0,.412],10229:[.011,.511,0,0,1.609],10230:[.011,.511,0,0,1.638],10231:[.011,.511,0,0,1.859],10232:[.024,.525,0,0,1.609],10233:[.024,.525,0,0,1.638],10234:[.024,.525,0,0,1.858],10236:[.011,.511,0,0,1.638],10815:[0,.68333,0,0,.75],10927:[.13597,.63597,0,0,.77778],10928:[.13597,.63597,0,0,.77778],57376:[.19444,.69444,0,0,0]},"Math-BoldItalic":{32:[0,0,0,0,.25],48:[0,.44444,0,0,.575],49:[0,.44444,0,0,.575],50:[0,.44444,0,0,.575],51:[.19444,.44444,0,0,.575],52:[.19444,.44444,0,0,.575],53:[.19444,.44444,0,0,.575],54:[0,.64444,0,0,.575],55:[.19444,.44444,0,0,.575],56:[0,.64444,0,0,.575],57:[.19444,.44444,0,0,.575],65:[0,.68611,0,0,.86944],66:[0,.68611,.04835,0,.8664],67:[0,.68611,.06979,0,.81694],68:[0,.68611,.03194,0,.93812],69:[0,.68611,.05451,0,.81007],70:[0,.68611,.15972,0,.68889],71:[0,.68611,0,0,.88673],72:[0,.68611,.08229,0,.98229],73:[0,.68611,.07778,0,.51111],74:[0,.68611,.10069,0,.63125],75:[0,.68611,.06979,0,.97118],76:[0,.68611,0,0,.75555],77:[0,.68611,.11424,0,1.14201],78:[0,.68611,.11424,0,.95034],79:[0,.68611,.03194,0,.83666],80:[0,.68611,.15972,0,.72309],81:[.19444,.68611,0,0,.86861],82:[0,.68611,.00421,0,.87235],83:[0,.68611,.05382,0,.69271],84:[0,.68611,.15972,0,.63663],85:[0,.68611,.11424,0,.80027],86:[0,.68611,.25555,0,.67778],87:[0,.68611,.15972,0,1.09305],88:[0,.68611,.07778,0,.94722],89:[0,.68611,.25555,0,.67458],90:[0,.68611,.06979,0,.77257],97:[0,.44444,0,0,.63287],98:[0,.69444,0,0,.52083],99:[0,.44444,0,0,.51342],100:[0,.69444,0,0,.60972],101:[0,.44444,0,0,.55361],102:[.19444,.69444,.11042,0,.56806],103:[.19444,.44444,.03704,0,.5449],104:[0,.69444,0,0,.66759],105:[0,.69326,0,0,.4048],106:[.19444,.69326,.0622,0,.47083],107:[0,.69444,.01852,0,.6037],108:[0,.69444,.0088,0,.34815],109:[0,.44444,0,0,1.0324],110:[0,.44444,0,0,.71296],111:[0,.44444,0,0,.58472],112:[.19444,.44444,0,0,.60092],113:[.19444,.44444,.03704,0,.54213],114:[0,.44444,.03194,0,.5287],115:[0,.44444,0,0,.53125],116:[0,.63492,0,0,.41528],117:[0,.44444,0,0,.68102],118:[0,.44444,.03704,0,.56666],119:[0,.44444,.02778,0,.83148],120:[0,.44444,0,0,.65903],121:[.19444,.44444,.03704,0,.59028],122:[0,.44444,.04213,0,.55509],160:[0,0,0,0,.25],915:[0,.68611,.15972,0,.65694],916:[0,.68611,0,0,.95833],920:[0,.68611,.03194,0,.86722],923:[0,.68611,0,0,.80555],926:[0,.68611,.07458,0,.84125],928:[0,.68611,.08229,0,.98229],931:[0,.68611,.05451,0,.88507],933:[0,.68611,.15972,0,.67083],934:[0,.68611,0,0,.76666],936:[0,.68611,.11653,0,.71402],937:[0,.68611,.04835,0,.8789],945:[0,.44444,0,0,.76064],946:[.19444,.69444,.03403,0,.65972],947:[.19444,.44444,.06389,0,.59003],948:[0,.69444,.03819,0,.52222],949:[0,.44444,0,0,.52882],950:[.19444,.69444,.06215,0,.50833],951:[.19444,.44444,.03704,0,.6],952:[0,.69444,.03194,0,.5618],953:[0,.44444,0,0,.41204],954:[0,.44444,0,0,.66759],955:[0,.69444,0,0,.67083],956:[.19444,.44444,0,0,.70787],957:[0,.44444,.06898,0,.57685],958:[.19444,.69444,.03021,0,.50833],959:[0,.44444,0,0,.58472],960:[0,.44444,.03704,0,.68241],961:[.19444,.44444,0,0,.6118],962:[.09722,.44444,.07917,0,.42361],963:[0,.44444,.03704,0,.68588],964:[0,.44444,.13472,0,.52083],965:[0,.44444,.03704,0,.63055],966:[.19444,.44444,0,0,.74722],967:[.19444,.44444,0,0,.71805],968:[.19444,.69444,.03704,0,.75833],969:[0,.44444,.03704,0,.71782],977:[0,.69444,0,0,.69155],981:[.19444,.69444,0,0,.7125],982:[0,.44444,.03194,0,.975],1009:[.19444,.44444,0,0,.6118],1013:[0,.44444,0,0,.48333],57649:[0,.44444,0,0,.39352],57911:[.19444,.44444,0,0,.43889]},"Math-Italic":{32:[0,0,0,0,.25],48:[0,.43056,0,0,.5],49:[0,.43056,0,0,.5],50:[0,.43056,0,0,.5],51:[.19444,.43056,0,0,.5],52:[.19444,.43056,0,0,.5],53:[.19444,.43056,0,0,.5],54:[0,.64444,0,0,.5],55:[.19444,.43056,0,0,.5],56:[0,.64444,0,0,.5],57:[.19444,.43056,0,0,.5],65:[0,.68333,0,.13889,.75],66:[0,.68333,.05017,.08334,.75851],67:[0,.68333,.07153,.08334,.71472],68:[0,.68333,.02778,.05556,.82792],69:[0,.68333,.05764,.08334,.7382],70:[0,.68333,.13889,.08334,.64306],71:[0,.68333,0,.08334,.78625],72:[0,.68333,.08125,.05556,.83125],73:[0,.68333,.07847,.11111,.43958],74:[0,.68333,.09618,.16667,.55451],75:[0,.68333,.07153,.05556,.84931],76:[0,.68333,0,.02778,.68056],77:[0,.68333,.10903,.08334,.97014],78:[0,.68333,.10903,.08334,.80347],79:[0,.68333,.02778,.08334,.76278],80:[0,.68333,.13889,.08334,.64201],81:[.19444,.68333,0,.08334,.79056],82:[0,.68333,.00773,.08334,.75929],83:[0,.68333,.05764,.08334,.6132],84:[0,.68333,.13889,.08334,.58438],85:[0,.68333,.10903,.02778,.68278],86:[0,.68333,.22222,0,.58333],87:[0,.68333,.13889,0,.94445],88:[0,.68333,.07847,.08334,.82847],89:[0,.68333,.22222,0,.58056],90:[0,.68333,.07153,.08334,.68264],97:[0,.43056,0,0,.52859],98:[0,.69444,0,0,.42917],99:[0,.43056,0,.05556,.43276],100:[0,.69444,0,.16667,.52049],101:[0,.43056,0,.05556,.46563],102:[.19444,.69444,.10764,.16667,.48959],103:[.19444,.43056,.03588,.02778,.47697],104:[0,.69444,0,0,.57616],105:[0,.65952,0,0,.34451],106:[.19444,.65952,.05724,0,.41181],107:[0,.69444,.03148,0,.5206],108:[0,.69444,.01968,.08334,.29838],109:[0,.43056,0,0,.87801],110:[0,.43056,0,0,.60023],111:[0,.43056,0,.05556,.48472],112:[.19444,.43056,0,.08334,.50313],113:[.19444,.43056,.03588,.08334,.44641],114:[0,.43056,.02778,.05556,.45116],115:[0,.43056,0,.05556,.46875],116:[0,.61508,0,.08334,.36111],117:[0,.43056,0,.02778,.57246],118:[0,.43056,.03588,.02778,.48472],119:[0,.43056,.02691,.08334,.71592],120:[0,.43056,0,.02778,.57153],121:[.19444,.43056,.03588,.05556,.49028],122:[0,.43056,.04398,.05556,.46505],160:[0,0,0,0,.25],915:[0,.68333,.13889,.08334,.61528],916:[0,.68333,0,.16667,.83334],920:[0,.68333,.02778,.08334,.76278],923:[0,.68333,0,.16667,.69445],926:[0,.68333,.07569,.08334,.74236],928:[0,.68333,.08125,.05556,.83125],931:[0,.68333,.05764,.08334,.77986],933:[0,.68333,.13889,.05556,.58333],934:[0,.68333,0,.08334,.66667],936:[0,.68333,.11,.05556,.61222],937:[0,.68333,.05017,.08334,.7724],945:[0,.43056,.0037,.02778,.6397],946:[.19444,.69444,.05278,.08334,.56563],947:[.19444,.43056,.05556,0,.51773],948:[0,.69444,.03785,.05556,.44444],949:[0,.43056,0,.08334,.46632],950:[.19444,.69444,.07378,.08334,.4375],951:[.19444,.43056,.03588,.05556,.49653],952:[0,.69444,.02778,.08334,.46944],953:[0,.43056,0,.05556,.35394],954:[0,.43056,0,0,.57616],955:[0,.69444,0,0,.58334],956:[.19444,.43056,0,.02778,.60255],957:[0,.43056,.06366,.02778,.49398],958:[.19444,.69444,.04601,.11111,.4375],959:[0,.43056,0,.05556,.48472],960:[0,.43056,.03588,0,.57003],961:[.19444,.43056,0,.08334,.51702],962:[.09722,.43056,.07986,.08334,.36285],963:[0,.43056,.03588,0,.57141],964:[0,.43056,.1132,.02778,.43715],965:[0,.43056,.03588,.02778,.54028],966:[.19444,.43056,0,.08334,.65417],967:[.19444,.43056,0,.05556,.62569],968:[.19444,.69444,.03588,.11111,.65139],969:[0,.43056,.03588,0,.62245],977:[0,.69444,0,.08334,.59144],981:[.19444,.69444,0,.08334,.59583],982:[0,.43056,.02778,0,.82813],1009:[.19444,.43056,0,.08334,.51702],1013:[0,.43056,0,.05556,.4059],57649:[0,.43056,0,.02778,.32246],57911:[.19444,.43056,0,.08334,.38403]},"SansSerif-Bold":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.36667],34:[0,.69444,0,0,.55834],35:[.19444,.69444,0,0,.91667],36:[.05556,.75,0,0,.55],37:[.05556,.75,0,0,1.02912],38:[0,.69444,0,0,.83056],39:[0,.69444,0,0,.30556],40:[.25,.75,0,0,.42778],41:[.25,.75,0,0,.42778],42:[0,.75,0,0,.55],43:[.11667,.61667,0,0,.85556],44:[.10556,.13056,0,0,.30556],45:[0,.45833,0,0,.36667],46:[0,.13056,0,0,.30556],47:[.25,.75,0,0,.55],48:[0,.69444,0,0,.55],49:[0,.69444,0,0,.55],50:[0,.69444,0,0,.55],51:[0,.69444,0,0,.55],52:[0,.69444,0,0,.55],53:[0,.69444,0,0,.55],54:[0,.69444,0,0,.55],55:[0,.69444,0,0,.55],56:[0,.69444,0,0,.55],57:[0,.69444,0,0,.55],58:[0,.45833,0,0,.30556],59:[.10556,.45833,0,0,.30556],61:[-.09375,.40625,0,0,.85556],63:[0,.69444,0,0,.51945],64:[0,.69444,0,0,.73334],65:[0,.69444,0,0,.73334],66:[0,.69444,0,0,.73334],67:[0,.69444,0,0,.70278],68:[0,.69444,0,0,.79445],69:[0,.69444,0,0,.64167],70:[0,.69444,0,0,.61111],71:[0,.69444,0,0,.73334],72:[0,.69444,0,0,.79445],73:[0,.69444,0,0,.33056],74:[0,.69444,0,0,.51945],75:[0,.69444,0,0,.76389],76:[0,.69444,0,0,.58056],77:[0,.69444,0,0,.97778],78:[0,.69444,0,0,.79445],79:[0,.69444,0,0,.79445],80:[0,.69444,0,0,.70278],81:[.10556,.69444,0,0,.79445],82:[0,.69444,0,0,.70278],83:[0,.69444,0,0,.61111],84:[0,.69444,0,0,.73334],85:[0,.69444,0,0,.76389],86:[0,.69444,.01528,0,.73334],87:[0,.69444,.01528,0,1.03889],88:[0,.69444,0,0,.73334],89:[0,.69444,.0275,0,.73334],90:[0,.69444,0,0,.67223],91:[.25,.75,0,0,.34306],93:[.25,.75,0,0,.34306],94:[0,.69444,0,0,.55],95:[.35,.10833,.03056,0,.55],97:[0,.45833,0,0,.525],98:[0,.69444,0,0,.56111],99:[0,.45833,0,0,.48889],100:[0,.69444,0,0,.56111],101:[0,.45833,0,0,.51111],102:[0,.69444,.07639,0,.33611],103:[.19444,.45833,.01528,0,.55],104:[0,.69444,0,0,.56111],105:[0,.69444,0,0,.25556],106:[.19444,.69444,0,0,.28611],107:[0,.69444,0,0,.53056],108:[0,.69444,0,0,.25556],109:[0,.45833,0,0,.86667],110:[0,.45833,0,0,.56111],111:[0,.45833,0,0,.55],112:[.19444,.45833,0,0,.56111],113:[.19444,.45833,0,0,.56111],114:[0,.45833,.01528,0,.37222],115:[0,.45833,0,0,.42167],116:[0,.58929,0,0,.40417],117:[0,.45833,0,0,.56111],118:[0,.45833,.01528,0,.5],119:[0,.45833,.01528,0,.74445],120:[0,.45833,0,0,.5],121:[.19444,.45833,.01528,0,.5],122:[0,.45833,0,0,.47639],126:[.35,.34444,0,0,.55],160:[0,0,0,0,.25],168:[0,.69444,0,0,.55],176:[0,.69444,0,0,.73334],180:[0,.69444,0,0,.55],184:[.17014,0,0,0,.48889],305:[0,.45833,0,0,.25556],567:[.19444,.45833,0,0,.28611],710:[0,.69444,0,0,.55],711:[0,.63542,0,0,.55],713:[0,.63778,0,0,.55],728:[0,.69444,0,0,.55],729:[0,.69444,0,0,.30556],730:[0,.69444,0,0,.73334],732:[0,.69444,0,0,.55],733:[0,.69444,0,0,.55],915:[0,.69444,0,0,.58056],916:[0,.69444,0,0,.91667],920:[0,.69444,0,0,.85556],923:[0,.69444,0,0,.67223],926:[0,.69444,0,0,.73334],928:[0,.69444,0,0,.79445],931:[0,.69444,0,0,.79445],933:[0,.69444,0,0,.85556],934:[0,.69444,0,0,.79445],936:[0,.69444,0,0,.85556],937:[0,.69444,0,0,.79445],8211:[0,.45833,.03056,0,.55],8212:[0,.45833,.03056,0,1.10001],8216:[0,.69444,0,0,.30556],8217:[0,.69444,0,0,.30556],8220:[0,.69444,0,0,.55834],8221:[0,.69444,0,0,.55834]},"SansSerif-Italic":{32:[0,0,0,0,.25],33:[0,.69444,.05733,0,.31945],34:[0,.69444,.00316,0,.5],35:[.19444,.69444,.05087,0,.83334],36:[.05556,.75,.11156,0,.5],37:[.05556,.75,.03126,0,.83334],38:[0,.69444,.03058,0,.75834],39:[0,.69444,.07816,0,.27778],40:[.25,.75,.13164,0,.38889],41:[.25,.75,.02536,0,.38889],42:[0,.75,.11775,0,.5],43:[.08333,.58333,.02536,0,.77778],44:[.125,.08333,0,0,.27778],45:[0,.44444,.01946,0,.33333],46:[0,.08333,0,0,.27778],47:[.25,.75,.13164,0,.5],48:[0,.65556,.11156,0,.5],49:[0,.65556,.11156,0,.5],50:[0,.65556,.11156,0,.5],51:[0,.65556,.11156,0,.5],52:[0,.65556,.11156,0,.5],53:[0,.65556,.11156,0,.5],54:[0,.65556,.11156,0,.5],55:[0,.65556,.11156,0,.5],56:[0,.65556,.11156,0,.5],57:[0,.65556,.11156,0,.5],58:[0,.44444,.02502,0,.27778],59:[.125,.44444,.02502,0,.27778],61:[-.13,.37,.05087,0,.77778],63:[0,.69444,.11809,0,.47222],64:[0,.69444,.07555,0,.66667],65:[0,.69444,0,0,.66667],66:[0,.69444,.08293,0,.66667],67:[0,.69444,.11983,0,.63889],68:[0,.69444,.07555,0,.72223],69:[0,.69444,.11983,0,.59722],70:[0,.69444,.13372,0,.56945],71:[0,.69444,.11983,0,.66667],72:[0,.69444,.08094,0,.70834],73:[0,.69444,.13372,0,.27778],74:[0,.69444,.08094,0,.47222],75:[0,.69444,.11983,0,.69445],76:[0,.69444,0,0,.54167],77:[0,.69444,.08094,0,.875],78:[0,.69444,.08094,0,.70834],79:[0,.69444,.07555,0,.73611],80:[0,.69444,.08293,0,.63889],81:[.125,.69444,.07555,0,.73611],82:[0,.69444,.08293,0,.64584],83:[0,.69444,.09205,0,.55556],84:[0,.69444,.13372,0,.68056],85:[0,.69444,.08094,0,.6875],86:[0,.69444,.1615,0,.66667],87:[0,.69444,.1615,0,.94445],88:[0,.69444,.13372,0,.66667],89:[0,.69444,.17261,0,.66667],90:[0,.69444,.11983,0,.61111],91:[.25,.75,.15942,0,.28889],93:[.25,.75,.08719,0,.28889],94:[0,.69444,.0799,0,.5],95:[.35,.09444,.08616,0,.5],97:[0,.44444,.00981,0,.48056],98:[0,.69444,.03057,0,.51667],99:[0,.44444,.08336,0,.44445],100:[0,.69444,.09483,0,.51667],101:[0,.44444,.06778,0,.44445],102:[0,.69444,.21705,0,.30556],103:[.19444,.44444,.10836,0,.5],104:[0,.69444,.01778,0,.51667],105:[0,.67937,.09718,0,.23889],106:[.19444,.67937,.09162,0,.26667],107:[0,.69444,.08336,0,.48889],108:[0,.69444,.09483,0,.23889],109:[0,.44444,.01778,0,.79445],110:[0,.44444,.01778,0,.51667],111:[0,.44444,.06613,0,.5],112:[.19444,.44444,.0389,0,.51667],113:[.19444,.44444,.04169,0,.51667],114:[0,.44444,.10836,0,.34167],115:[0,.44444,.0778,0,.38333],116:[0,.57143,.07225,0,.36111],117:[0,.44444,.04169,0,.51667],118:[0,.44444,.10836,0,.46111],119:[0,.44444,.10836,0,.68334],120:[0,.44444,.09169,0,.46111],121:[.19444,.44444,.10836,0,.46111],122:[0,.44444,.08752,0,.43472],126:[.35,.32659,.08826,0,.5],160:[0,0,0,0,.25],168:[0,.67937,.06385,0,.5],176:[0,.69444,0,0,.73752],184:[.17014,0,0,0,.44445],305:[0,.44444,.04169,0,.23889],567:[.19444,.44444,.04169,0,.26667],710:[0,.69444,.0799,0,.5],711:[0,.63194,.08432,0,.5],713:[0,.60889,.08776,0,.5],714:[0,.69444,.09205,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,.09483,0,.5],729:[0,.67937,.07774,0,.27778],730:[0,.69444,0,0,.73752],732:[0,.67659,.08826,0,.5],733:[0,.69444,.09205,0,.5],915:[0,.69444,.13372,0,.54167],916:[0,.69444,0,0,.83334],920:[0,.69444,.07555,0,.77778],923:[0,.69444,0,0,.61111],926:[0,.69444,.12816,0,.66667],928:[0,.69444,.08094,0,.70834],931:[0,.69444,.11983,0,.72222],933:[0,.69444,.09031,0,.77778],934:[0,.69444,.04603,0,.72222],936:[0,.69444,.09031,0,.77778],937:[0,.69444,.08293,0,.72222],8211:[0,.44444,.08616,0,.5],8212:[0,.44444,.08616,0,1],8216:[0,.69444,.07816,0,.27778],8217:[0,.69444,.07816,0,.27778],8220:[0,.69444,.14205,0,.5],8221:[0,.69444,.00316,0,.5]},"SansSerif-Regular":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.31945],34:[0,.69444,0,0,.5],35:[.19444,.69444,0,0,.83334],36:[.05556,.75,0,0,.5],37:[.05556,.75,0,0,.83334],38:[0,.69444,0,0,.75834],39:[0,.69444,0,0,.27778],40:[.25,.75,0,0,.38889],41:[.25,.75,0,0,.38889],42:[0,.75,0,0,.5],43:[.08333,.58333,0,0,.77778],44:[.125,.08333,0,0,.27778],45:[0,.44444,0,0,.33333],46:[0,.08333,0,0,.27778],47:[.25,.75,0,0,.5],48:[0,.65556,0,0,.5],49:[0,.65556,0,0,.5],50:[0,.65556,0,0,.5],51:[0,.65556,0,0,.5],52:[0,.65556,0,0,.5],53:[0,.65556,0,0,.5],54:[0,.65556,0,0,.5],55:[0,.65556,0,0,.5],56:[0,.65556,0,0,.5],57:[0,.65556,0,0,.5],58:[0,.44444,0,0,.27778],59:[.125,.44444,0,0,.27778],61:[-.13,.37,0,0,.77778],63:[0,.69444,0,0,.47222],64:[0,.69444,0,0,.66667],65:[0,.69444,0,0,.66667],66:[0,.69444,0,0,.66667],67:[0,.69444,0,0,.63889],68:[0,.69444,0,0,.72223],69:[0,.69444,0,0,.59722],70:[0,.69444,0,0,.56945],71:[0,.69444,0,0,.66667],72:[0,.69444,0,0,.70834],73:[0,.69444,0,0,.27778],74:[0,.69444,0,0,.47222],75:[0,.69444,0,0,.69445],76:[0,.69444,0,0,.54167],77:[0,.69444,0,0,.875],78:[0,.69444,0,0,.70834],79:[0,.69444,0,0,.73611],80:[0,.69444,0,0,.63889],81:[.125,.69444,0,0,.73611],82:[0,.69444,0,0,.64584],83:[0,.69444,0,0,.55556],84:[0,.69444,0,0,.68056],85:[0,.69444,0,0,.6875],86:[0,.69444,.01389,0,.66667],87:[0,.69444,.01389,0,.94445],88:[0,.69444,0,0,.66667],89:[0,.69444,.025,0,.66667],90:[0,.69444,0,0,.61111],91:[.25,.75,0,0,.28889],93:[.25,.75,0,0,.28889],94:[0,.69444,0,0,.5],95:[.35,.09444,.02778,0,.5],97:[0,.44444,0,0,.48056],98:[0,.69444,0,0,.51667],99:[0,.44444,0,0,.44445],100:[0,.69444,0,0,.51667],101:[0,.44444,0,0,.44445],102:[0,.69444,.06944,0,.30556],103:[.19444,.44444,.01389,0,.5],104:[0,.69444,0,0,.51667],105:[0,.67937,0,0,.23889],106:[.19444,.67937,0,0,.26667],107:[0,.69444,0,0,.48889],108:[0,.69444,0,0,.23889],109:[0,.44444,0,0,.79445],110:[0,.44444,0,0,.51667],111:[0,.44444,0,0,.5],112:[.19444,.44444,0,0,.51667],113:[.19444,.44444,0,0,.51667],114:[0,.44444,.01389,0,.34167],115:[0,.44444,0,0,.38333],116:[0,.57143,0,0,.36111],117:[0,.44444,0,0,.51667],118:[0,.44444,.01389,0,.46111],119:[0,.44444,.01389,0,.68334],120:[0,.44444,0,0,.46111],121:[.19444,.44444,.01389,0,.46111],122:[0,.44444,0,0,.43472],126:[.35,.32659,0,0,.5],160:[0,0,0,0,.25],168:[0,.67937,0,0,.5],176:[0,.69444,0,0,.66667],184:[.17014,0,0,0,.44445],305:[0,.44444,0,0,.23889],567:[.19444,.44444,0,0,.26667],710:[0,.69444,0,0,.5],711:[0,.63194,0,0,.5],713:[0,.60889,0,0,.5],714:[0,.69444,0,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,0,0,.5],729:[0,.67937,0,0,.27778],730:[0,.69444,0,0,.66667],732:[0,.67659,0,0,.5],733:[0,.69444,0,0,.5],915:[0,.69444,0,0,.54167],916:[0,.69444,0,0,.83334],920:[0,.69444,0,0,.77778],923:[0,.69444,0,0,.61111],926:[0,.69444,0,0,.66667],928:[0,.69444,0,0,.70834],931:[0,.69444,0,0,.72222],933:[0,.69444,0,0,.77778],934:[0,.69444,0,0,.72222],936:[0,.69444,0,0,.77778],937:[0,.69444,0,0,.72222],8211:[0,.44444,.02778,0,.5],8212:[0,.44444,.02778,0,1],8216:[0,.69444,0,0,.27778],8217:[0,.69444,0,0,.27778],8220:[0,.69444,0,0,.5],8221:[0,.69444,0,0,.5]},"Script-Regular":{32:[0,0,0,0,.25],65:[0,.7,.22925,0,.80253],66:[0,.7,.04087,0,.90757],67:[0,.7,.1689,0,.66619],68:[0,.7,.09371,0,.77443],69:[0,.7,.18583,0,.56162],70:[0,.7,.13634,0,.89544],71:[0,.7,.17322,0,.60961],72:[0,.7,.29694,0,.96919],73:[0,.7,.19189,0,.80907],74:[.27778,.7,.19189,0,1.05159],75:[0,.7,.31259,0,.91364],76:[0,.7,.19189,0,.87373],77:[0,.7,.15981,0,1.08031],78:[0,.7,.3525,0,.9015],79:[0,.7,.08078,0,.73787],80:[0,.7,.08078,0,1.01262],81:[0,.7,.03305,0,.88282],82:[0,.7,.06259,0,.85],83:[0,.7,.19189,0,.86767],84:[0,.7,.29087,0,.74697],85:[0,.7,.25815,0,.79996],86:[0,.7,.27523,0,.62204],87:[0,.7,.27523,0,.80532],88:[0,.7,.26006,0,.94445],89:[0,.7,.2939,0,.70961],90:[0,.7,.24037,0,.8212],160:[0,0,0,0,.25]},"Size1-Regular":{32:[0,0,0,0,.25],40:[.35001,.85,0,0,.45834],41:[.35001,.85,0,0,.45834],47:[.35001,.85,0,0,.57778],91:[.35001,.85,0,0,.41667],92:[.35001,.85,0,0,.57778],93:[.35001,.85,0,0,.41667],123:[.35001,.85,0,0,.58334],125:[.35001,.85,0,0,.58334],160:[0,0,0,0,.25],710:[0,.72222,0,0,.55556],732:[0,.72222,0,0,.55556],770:[0,.72222,0,0,.55556],771:[0,.72222,0,0,.55556],8214:[-99e-5,.601,0,0,.77778],8593:[1e-5,.6,0,0,.66667],8595:[1e-5,.6,0,0,.66667],8657:[1e-5,.6,0,0,.77778],8659:[1e-5,.6,0,0,.77778],8719:[.25001,.75,0,0,.94445],8720:[.25001,.75,0,0,.94445],8721:[.25001,.75,0,0,1.05556],8730:[.35001,.85,0,0,1],8739:[-.00599,.606,0,0,.33333],8741:[-.00599,.606,0,0,.55556],8747:[.30612,.805,.19445,0,.47222],8748:[.306,.805,.19445,0,.47222],8749:[.306,.805,.19445,0,.47222],8750:[.30612,.805,.19445,0,.47222],8896:[.25001,.75,0,0,.83334],8897:[.25001,.75,0,0,.83334],8898:[.25001,.75,0,0,.83334],8899:[.25001,.75,0,0,.83334],8968:[.35001,.85,0,0,.47222],8969:[.35001,.85,0,0,.47222],8970:[.35001,.85,0,0,.47222],8971:[.35001,.85,0,0,.47222],9168:[-99e-5,.601,0,0,.66667],10216:[.35001,.85,0,0,.47222],10217:[.35001,.85,0,0,.47222],10752:[.25001,.75,0,0,1.11111],10753:[.25001,.75,0,0,1.11111],10754:[.25001,.75,0,0,1.11111],10756:[.25001,.75,0,0,.83334],10758:[.25001,.75,0,0,.83334]},"Size2-Regular":{32:[0,0,0,0,.25],40:[.65002,1.15,0,0,.59722],41:[.65002,1.15,0,0,.59722],47:[.65002,1.15,0,0,.81111],91:[.65002,1.15,0,0,.47222],92:[.65002,1.15,0,0,.81111],93:[.65002,1.15,0,0,.47222],123:[.65002,1.15,0,0,.66667],125:[.65002,1.15,0,0,.66667],160:[0,0,0,0,.25],710:[0,.75,0,0,1],732:[0,.75,0,0,1],770:[0,.75,0,0,1],771:[0,.75,0,0,1],8719:[.55001,1.05,0,0,1.27778],8720:[.55001,1.05,0,0,1.27778],8721:[.55001,1.05,0,0,1.44445],8730:[.65002,1.15,0,0,1],8747:[.86225,1.36,.44445,0,.55556],8748:[.862,1.36,.44445,0,.55556],8749:[.862,1.36,.44445,0,.55556],8750:[.86225,1.36,.44445,0,.55556],8896:[.55001,1.05,0,0,1.11111],8897:[.55001,1.05,0,0,1.11111],8898:[.55001,1.05,0,0,1.11111],8899:[.55001,1.05,0,0,1.11111],8968:[.65002,1.15,0,0,.52778],8969:[.65002,1.15,0,0,.52778],8970:[.65002,1.15,0,0,.52778],8971:[.65002,1.15,0,0,.52778],10216:[.65002,1.15,0,0,.61111],10217:[.65002,1.15,0,0,.61111],10752:[.55001,1.05,0,0,1.51112],10753:[.55001,1.05,0,0,1.51112],10754:[.55001,1.05,0,0,1.51112],10756:[.55001,1.05,0,0,1.11111],10758:[.55001,1.05,0,0,1.11111]},"Size3-Regular":{32:[0,0,0,0,.25],40:[.95003,1.45,0,0,.73611],41:[.95003,1.45,0,0,.73611],47:[.95003,1.45,0,0,1.04445],91:[.95003,1.45,0,0,.52778],92:[.95003,1.45,0,0,1.04445],93:[.95003,1.45,0,0,.52778],123:[.95003,1.45,0,0,.75],125:[.95003,1.45,0,0,.75],160:[0,0,0,0,.25],710:[0,.75,0,0,1.44445],732:[0,.75,0,0,1.44445],770:[0,.75,0,0,1.44445],771:[0,.75,0,0,1.44445],8730:[.95003,1.45,0,0,1],8968:[.95003,1.45,0,0,.58334],8969:[.95003,1.45,0,0,.58334],8970:[.95003,1.45,0,0,.58334],8971:[.95003,1.45,0,0,.58334],10216:[.95003,1.45,0,0,.75],10217:[.95003,1.45,0,0,.75]},"Size4-Regular":{32:[0,0,0,0,.25],40:[1.25003,1.75,0,0,.79167],41:[1.25003,1.75,0,0,.79167],47:[1.25003,1.75,0,0,1.27778],91:[1.25003,1.75,0,0,.58334],92:[1.25003,1.75,0,0,1.27778],93:[1.25003,1.75,0,0,.58334],123:[1.25003,1.75,0,0,.80556],125:[1.25003,1.75,0,0,.80556],160:[0,0,0,0,.25],710:[0,.825,0,0,1.8889],732:[0,.825,0,0,1.8889],770:[0,.825,0,0,1.8889],771:[0,.825,0,0,1.8889],8730:[1.25003,1.75,0,0,1],8968:[1.25003,1.75,0,0,.63889],8969:[1.25003,1.75,0,0,.63889],8970:[1.25003,1.75,0,0,.63889],8971:[1.25003,1.75,0,0,.63889],9115:[.64502,1.155,0,0,.875],9116:[1e-5,.6,0,0,.875],9117:[.64502,1.155,0,0,.875],9118:[.64502,1.155,0,0,.875],9119:[1e-5,.6,0,0,.875],9120:[.64502,1.155,0,0,.875],9121:[.64502,1.155,0,0,.66667],9122:[-99e-5,.601,0,0,.66667],9123:[.64502,1.155,0,0,.66667],9124:[.64502,1.155,0,0,.66667],9125:[-99e-5,.601,0,0,.66667],9126:[.64502,1.155,0,0,.66667],9127:[1e-5,.9,0,0,.88889],9128:[.65002,1.15,0,0,.88889],9129:[.90001,0,0,0,.88889],9130:[0,.3,0,0,.88889],9131:[1e-5,.9,0,0,.88889],9132:[.65002,1.15,0,0,.88889],9133:[.90001,0,0,0,.88889],9143:[.88502,.915,0,0,1.05556],10216:[1.25003,1.75,0,0,.80556],10217:[1.25003,1.75,0,0,.80556],57344:[-.00499,.605,0,0,1.05556],57345:[-.00499,.605,0,0,1.05556],57680:[0,.12,0,0,.45],57681:[0,.12,0,0,.45],57682:[0,.12,0,0,.45],57683:[0,.12,0,0,.45]},"Typewriter-Regular":{32:[0,0,0,0,.525],33:[0,.61111,0,0,.525],34:[0,.61111,0,0,.525],35:[0,.61111,0,0,.525],36:[.08333,.69444,0,0,.525],37:[.08333,.69444,0,0,.525],38:[0,.61111,0,0,.525],39:[0,.61111,0,0,.525],40:[.08333,.69444,0,0,.525],41:[.08333,.69444,0,0,.525],42:[0,.52083,0,0,.525],43:[-.08056,.53055,0,0,.525],44:[.13889,.125,0,0,.525],45:[-.08056,.53055,0,0,.525],46:[0,.125,0,0,.525],47:[.08333,.69444,0,0,.525],48:[0,.61111,0,0,.525],49:[0,.61111,0,0,.525],50:[0,.61111,0,0,.525],51:[0,.61111,0,0,.525],52:[0,.61111,0,0,.525],53:[0,.61111,0,0,.525],54:[0,.61111,0,0,.525],55:[0,.61111,0,0,.525],56:[0,.61111,0,0,.525],57:[0,.61111,0,0,.525],58:[0,.43056,0,0,.525],59:[.13889,.43056,0,0,.525],60:[-.05556,.55556,0,0,.525],61:[-.19549,.41562,0,0,.525],62:[-.05556,.55556,0,0,.525],63:[0,.61111,0,0,.525],64:[0,.61111,0,0,.525],65:[0,.61111,0,0,.525],66:[0,.61111,0,0,.525],67:[0,.61111,0,0,.525],68:[0,.61111,0,0,.525],69:[0,.61111,0,0,.525],70:[0,.61111,0,0,.525],71:[0,.61111,0,0,.525],72:[0,.61111,0,0,.525],73:[0,.61111,0,0,.525],74:[0,.61111,0,0,.525],75:[0,.61111,0,0,.525],76:[0,.61111,0,0,.525],77:[0,.61111,0,0,.525],78:[0,.61111,0,0,.525],79:[0,.61111,0,0,.525],80:[0,.61111,0,0,.525],81:[.13889,.61111,0,0,.525],82:[0,.61111,0,0,.525],83:[0,.61111,0,0,.525],84:[0,.61111,0,0,.525],85:[0,.61111,0,0,.525],86:[0,.61111,0,0,.525],87:[0,.61111,0,0,.525],88:[0,.61111,0,0,.525],89:[0,.61111,0,0,.525],90:[0,.61111,0,0,.525],91:[.08333,.69444,0,0,.525],92:[.08333,.69444,0,0,.525],93:[.08333,.69444,0,0,.525],94:[0,.61111,0,0,.525],95:[.09514,0,0,0,.525],96:[0,.61111,0,0,.525],97:[0,.43056,0,0,.525],98:[0,.61111,0,0,.525],99:[0,.43056,0,0,.525],100:[0,.61111,0,0,.525],101:[0,.43056,0,0,.525],102:[0,.61111,0,0,.525],103:[.22222,.43056,0,0,.525],104:[0,.61111,0,0,.525],105:[0,.61111,0,0,.525],106:[.22222,.61111,0,0,.525],107:[0,.61111,0,0,.525],108:[0,.61111,0,0,.525],109:[0,.43056,0,0,.525],110:[0,.43056,0,0,.525],111:[0,.43056,0,0,.525],112:[.22222,.43056,0,0,.525],113:[.22222,.43056,0,0,.525],114:[0,.43056,0,0,.525],115:[0,.43056,0,0,.525],116:[0,.55358,0,0,.525],117:[0,.43056,0,0,.525],118:[0,.43056,0,0,.525],119:[0,.43056,0,0,.525],120:[0,.43056,0,0,.525],121:[.22222,.43056,0,0,.525],122:[0,.43056,0,0,.525],123:[.08333,.69444,0,0,.525],124:[.08333,.69444,0,0,.525],125:[.08333,.69444,0,0,.525],126:[0,.61111,0,0,.525],127:[0,.61111,0,0,.525],160:[0,0,0,0,.525],176:[0,.61111,0,0,.525],184:[.19445,0,0,0,.525],305:[0,.43056,0,0,.525],567:[.22222,.43056,0,0,.525],711:[0,.56597,0,0,.525],713:[0,.56555,0,0,.525],714:[0,.61111,0,0,.525],715:[0,.61111,0,0,.525],728:[0,.61111,0,0,.525],730:[0,.61111,0,0,.525],770:[0,.61111,0,0,.525],771:[0,.61111,0,0,.525],776:[0,.61111,0,0,.525],915:[0,.61111,0,0,.525],916:[0,.61111,0,0,.525],920:[0,.61111,0,0,.525],923:[0,.61111,0,0,.525],926:[0,.61111,0,0,.525],928:[0,.61111,0,0,.525],931:[0,.61111,0,0,.525],933:[0,.61111,0,0,.525],934:[0,.61111,0,0,.525],936:[0,.61111,0,0,.525],937:[0,.61111,0,0,.525],8216:[0,.61111,0,0,.525],8217:[0,.61111,0,0,.525],8242:[0,.61111,0,0,.525],9251:[.11111,.21944,0,0,.525]}},mk={slant:[.25,.25,.25],space:[0,0,0],stretch:[0,0,0],shrink:[0,0,0],xHeight:[.431,.431,.431],quad:[1,1.171,1.472],extraSpace:[0,0,0],num1:[.677,.732,.925],num2:[.394,.384,.387],num3:[.444,.471,.504],denom1:[.686,.752,1.025],denom2:[.345,.344,.532],sup1:[.413,.503,.504],sup2:[.363,.431,.404],sup3:[.289,.286,.294],sub1:[.15,.143,.2],sub2:[.247,.286,.4],supDrop:[.386,.353,.494],subDrop:[.05,.071,.1],delim1:[2.39,1.7,1.98],delim2:[1.01,1.157,1.42],axisHeight:[.25,.25,.25],defaultRuleThickness:[.04,.049,.049],bigOpSpacing1:[.111,.111,.111],bigOpSpacing2:[.166,.166,.166],bigOpSpacing3:[.2,.2,.2],bigOpSpacing4:[.6,.611,.611],bigOpSpacing5:[.1,.143,.143],sqrtRuleThickness:[.04,.04,.04],ptPerEm:[10,10,10],doubleRuleSep:[.2,.2,.2],arrayRuleWidth:[.04,.04,.04],fboxsep:[.3,.3,.3],fboxrule:[.04,.04,.04]},_Q={\u00C5:"A",\u00D0:"D",\u00DE:"o",\u00E5:"a",\u00F0:"d",\u00FE:"o",\u0410:"A",\u0411:"B",\u0412:"B",\u0413:"F",\u0414:"A",\u0415:"E",\u0416:"K",\u0417:"3",\u0418:"N",\u0419:"N",\u041A:"K",\u041B:"N",\u041C:"M",\u041D:"H",\u041E:"O",\u041F:"N",\u0420:"P",\u0421:"C",\u0422:"T",\u0423:"y",\u0424:"O",\u0425:"X",\u0426:"U",\u0427:"h",\u0428:"W",\u0429:"W",\u042A:"B",\u042B:"X",\u042C:"B",\u042D:"3",\u042E:"X",\u042F:"R",\u0430:"a",\u0431:"b",\u0432:"a",\u0433:"r",\u0434:"y",\u0435:"e",\u0436:"m",\u0437:"e",\u0438:"n",\u0439:"n",\u043A:"n",\u043B:"n",\u043C:"m",\u043D:"n",\u043E:"o",\u043F:"n",\u0440:"p",\u0441:"c",\u0442:"o",\u0443:"y",\u0444:"b",\u0445:"x",\u0446:"n",\u0447:"n",\u0448:"w",\u0449:"w",\u044A:"a",\u044B:"m",\u044C:"a",\u044D:"e",\u044E:"m",\u044F:"r"};cM={};Ei={math:{},text:{}};Z="math",Lt="text",fe="main",ze="ams",Si="accent-token",er="bin",lo="close",Yg="inner",xr="mathord",wa="op-token",El="open",Wb="punct",qe="rel",xh="spacing",je="textord";X(Z,fe,qe,"\u2261","\\equiv",!0);X(Z,fe,qe,"\u227A","\\prec",!0);X(Z,fe,qe,"\u227B","\\succ",!0);X(Z,fe,qe,"\u223C","\\sim",!0);X(Z,fe,qe,"\u22A5","\\perp");X(Z,fe,qe,"\u2AAF","\\preceq",!0);X(Z,fe,qe,"\u2AB0","\\succeq",!0);X(Z,fe,qe,"\u2243","\\simeq",!0);X(Z,fe,qe,"\u2223","\\mid",!0);X(Z,fe,qe,"\u226A","\\ll",!0);X(Z,fe,qe,"\u226B","\\gg",!0);X(Z,fe,qe,"\u224D","\\asymp",!0);X(Z,fe,qe,"\u2225","\\parallel");X(Z,fe,qe,"\u22C8","\\bowtie",!0);X(Z,fe,qe,"\u2323","\\smile",!0);X(Z,fe,qe,"\u2291","\\sqsubseteq",!0);X(Z,fe,qe,"\u2292","\\sqsupseteq",!0);X(Z,fe,qe,"\u2250","\\doteq",!0);X(Z,fe,qe,"\u2322","\\frown",!0);X(Z,fe,qe,"\u220B","\\ni",!0);X(Z,fe,qe,"\u221D","\\propto",!0);X(Z,fe,qe,"\u22A2","\\vdash",!0);X(Z,fe,qe,"\u22A3","\\dashv",!0);X(Z,fe,qe,"\u220B","\\owns");X(Z,fe,Wb,".","\\ldotp");X(Z,fe,Wb,"\u22C5","\\cdotp");X(Z,fe,Wb,"\u22C5","\xB7");X(Lt,fe,je,"\u22C5","\xB7");X(Z,fe,je,"#","\\#");X(Lt,fe,je,"#","\\#");X(Z,fe,je,"&","\\&");X(Lt,fe,je,"&","\\&");X(Z,fe,je,"\u2135","\\aleph",!0);X(Z,fe,je,"\u2200","\\forall",!0);X(Z,fe,je,"\u210F","\\hbar",!0);X(Z,fe,je,"\u2203","\\exists",!0);X(Z,fe,je,"\u2207","\\nabla",!0);X(Z,fe,je,"\u266D","\\flat",!0);X(Z,fe,je,"\u2113","\\ell",!0);X(Z,fe,je,"\u266E","\\natural",!0);X(Z,fe,je,"\u2663","\\clubsuit",!0);X(Z,fe,je,"\u2118","\\wp",!0);X(Z,fe,je,"\u266F","\\sharp",!0);X(Z,fe,je,"\u2662","\\diamondsuit",!0);X(Z,fe,je,"\u211C","\\Re",!0);X(Z,fe,je,"\u2661","\\heartsuit",!0);X(Z,fe,je,"\u2111","\\Im",!0);X(Z,fe,je,"\u2660","\\spadesuit",!0);X(Z,fe,je,"\xA7","\\S",!0);X(Lt,fe,je,"\xA7","\\S");X(Z,fe,je,"\xB6","\\P",!0);X(Lt,fe,je,"\xB6","\\P");X(Z,fe,je,"\u2020","\\dag");X(Lt,fe,je,"\u2020","\\dag");X(Lt,fe,je,"\u2020","\\textdagger");X(Z,fe,je,"\u2021","\\ddag");X(Lt,fe,je,"\u2021","\\ddag");X(Lt,fe,je,"\u2021","\\textdaggerdbl");X(Z,fe,lo,"\u23B1","\\rmoustache",!0);X(Z,fe,El,"\u23B0","\\lmoustache",!0);X(Z,fe,lo,"\u27EF","\\rgroup",!0);X(Z,fe,El,"\u27EE","\\lgroup",!0);X(Z,fe,er,"\u2213","\\mp",!0);X(Z,fe,er,"\u2296","\\ominus",!0);X(Z,fe,er,"\u228E","\\uplus",!0);X(Z,fe,er,"\u2293","\\sqcap",!0);X(Z,fe,er,"\u2217","\\ast");X(Z,fe,er,"\u2294","\\sqcup",!0);X(Z,fe,er,"\u25EF","\\bigcirc",!0);X(Z,fe,er,"\u2219","\\bullet",!0);X(Z,fe,er,"\u2021","\\ddagger");X(Z,fe,er,"\u2240","\\wr",!0);X(Z,fe,er,"\u2A3F","\\amalg");X(Z,fe,er,"&","\\And");X(Z,fe,qe,"\u27F5","\\longleftarrow",!0);X(Z,fe,qe,"\u21D0","\\Leftarrow",!0);X(Z,fe,qe,"\u27F8","\\Longleftarrow",!0);X(Z,fe,qe,"\u27F6","\\longrightarrow",!0);X(Z,fe,qe,"\u21D2","\\Rightarrow",!0);X(Z,fe,qe,"\u27F9","\\Longrightarrow",!0);X(Z,fe,qe,"\u2194","\\leftrightarrow",!0);X(Z,fe,qe,"\u27F7","\\longleftrightarrow",!0);X(Z,fe,qe,"\u21D4","\\Leftrightarrow",!0);X(Z,fe,qe,"\u27FA","\\Longleftrightarrow",!0);X(Z,fe,qe,"\u21A6","\\mapsto",!0);X(Z,fe,qe,"\u27FC","\\longmapsto",!0);X(Z,fe,qe,"\u2197","\\nearrow",!0);X(Z,fe,qe,"\u21A9","\\hookleftarrow",!0);X(Z,fe,qe,"\u21AA","\\hookrightarrow",!0);X(Z,fe,qe,"\u2198","\\searrow",!0);X(Z,fe,qe,"\u21BC","\\leftharpoonup",!0);X(Z,fe,qe,"\u21C0","\\rightharpoonup",!0);X(Z,fe,qe,"\u2199","\\swarrow",!0);X(Z,fe,qe,"\u21BD","\\leftharpoondown",!0);X(Z,fe,qe,"\u21C1","\\rightharpoondown",!0);X(Z,fe,qe,"\u2196","\\nwarrow",!0);X(Z,fe,qe,"\u21CC","\\rightleftharpoons",!0);X(Z,ze,qe,"\u226E","\\nless",!0);X(Z,ze,qe,"\uE010","\\@nleqslant");X(Z,ze,qe,"\uE011","\\@nleqq");X(Z,ze,qe,"\u2A87","\\lneq",!0);X(Z,ze,qe,"\u2268","\\lneqq",!0);X(Z,ze,qe,"\uE00C","\\@lvertneqq");X(Z,ze,qe,"\u22E6","\\lnsim",!0);X(Z,ze,qe,"\u2A89","\\lnapprox",!0);X(Z,ze,qe,"\u2280","\\nprec",!0);X(Z,ze,qe,"\u22E0","\\npreceq",!0);X(Z,ze,qe,"\u22E8","\\precnsim",!0);X(Z,ze,qe,"\u2AB9","\\precnapprox",!0);X(Z,ze,qe,"\u2241","\\nsim",!0);X(Z,ze,qe,"\uE006","\\@nshortmid");X(Z,ze,qe,"\u2224","\\nmid",!0);X(Z,ze,qe,"\u22AC","\\nvdash",!0);X(Z,ze,qe,"\u22AD","\\nvDash",!0);X(Z,ze,qe,"\u22EA","\\ntriangleleft");X(Z,ze,qe,"\u22EC","\\ntrianglelefteq",!0);X(Z,ze,qe,"\u228A","\\subsetneq",!0);X(Z,ze,qe,"\uE01A","\\@varsubsetneq");X(Z,ze,qe,"\u2ACB","\\subsetneqq",!0);X(Z,ze,qe,"\uE017","\\@varsubsetneqq");X(Z,ze,qe,"\u226F","\\ngtr",!0);X(Z,ze,qe,"\uE00F","\\@ngeqslant");X(Z,ze,qe,"\uE00E","\\@ngeqq");X(Z,ze,qe,"\u2A88","\\gneq",!0);X(Z,ze,qe,"\u2269","\\gneqq",!0);X(Z,ze,qe,"\uE00D","\\@gvertneqq");X(Z,ze,qe,"\u22E7","\\gnsim",!0);X(Z,ze,qe,"\u2A8A","\\gnapprox",!0);X(Z,ze,qe,"\u2281","\\nsucc",!0);X(Z,ze,qe,"\u22E1","\\nsucceq",!0);X(Z,ze,qe,"\u22E9","\\succnsim",!0);X(Z,ze,qe,"\u2ABA","\\succnapprox",!0);X(Z,ze,qe,"\u2246","\\ncong",!0);X(Z,ze,qe,"\uE007","\\@nshortparallel");X(Z,ze,qe,"\u2226","\\nparallel",!0);X(Z,ze,qe,"\u22AF","\\nVDash",!0);X(Z,ze,qe,"\u22EB","\\ntriangleright");X(Z,ze,qe,"\u22ED","\\ntrianglerighteq",!0);X(Z,ze,qe,"\uE018","\\@nsupseteqq");X(Z,ze,qe,"\u228B","\\supsetneq",!0);X(Z,ze,qe,"\uE01B","\\@varsupsetneq");X(Z,ze,qe,"\u2ACC","\\supsetneqq",!0);X(Z,ze,qe,"\uE019","\\@varsupsetneqq");X(Z,ze,qe,"\u22AE","\\nVdash",!0);X(Z,ze,qe,"\u2AB5","\\precneqq",!0);X(Z,ze,qe,"\u2AB6","\\succneqq",!0);X(Z,ze,qe,"\uE016","\\@nsubseteqq");X(Z,ze,er,"\u22B4","\\unlhd");X(Z,ze,er,"\u22B5","\\unrhd");X(Z,ze,qe,"\u219A","\\nleftarrow",!0);X(Z,ze,qe,"\u219B","\\nrightarrow",!0);X(Z,ze,qe,"\u21CD","\\nLeftarrow",!0);X(Z,ze,qe,"\u21CF","\\nRightarrow",!0);X(Z,ze,qe,"\u21AE","\\nleftrightarrow",!0);X(Z,ze,qe,"\u21CE","\\nLeftrightarrow",!0);X(Z,ze,qe,"\u25B3","\\vartriangle");X(Z,ze,je,"\u210F","\\hslash");X(Z,ze,je,"\u25BD","\\triangledown");X(Z,ze,je,"\u25CA","\\lozenge");X(Z,ze,je,"\u24C8","\\circledS");X(Z,ze,je,"\xAE","\\circledR");X(Lt,ze,je,"\xAE","\\circledR");X(Z,ze,je,"\u2221","\\measuredangle",!0);X(Z,ze,je,"\u2204","\\nexists");X(Z,ze,je,"\u2127","\\mho");X(Z,ze,je,"\u2132","\\Finv",!0);X(Z,ze,je,"\u2141","\\Game",!0);X(Z,ze,je,"\u2035","\\backprime");X(Z,ze,je,"\u25B2","\\blacktriangle");X(Z,ze,je,"\u25BC","\\blacktriangledown");X(Z,ze,je,"\u25A0","\\blacksquare");X(Z,ze,je,"\u29EB","\\blacklozenge");X(Z,ze,je,"\u2605","\\bigstar");X(Z,ze,je,"\u2222","\\sphericalangle",!0);X(Z,ze,je,"\u2201","\\complement",!0);X(Z,ze,je,"\xF0","\\eth",!0);X(Lt,fe,je,"\xF0","\xF0");X(Z,ze,je,"\u2571","\\diagup");X(Z,ze,je,"\u2572","\\diagdown");X(Z,ze,je,"\u25A1","\\square");X(Z,ze,je,"\u25A1","\\Box");X(Z,ze,je,"\u25CA","\\Diamond");X(Z,ze,je,"\xA5","\\yen",!0);X(Lt,ze,je,"\xA5","\\yen",!0);X(Z,ze,je,"\u2713","\\checkmark",!0);X(Lt,ze,je,"\u2713","\\checkmark");X(Z,ze,je,"\u2136","\\beth",!0);X(Z,ze,je,"\u2138","\\daleth",!0);X(Z,ze,je,"\u2137","\\gimel",!0);X(Z,ze,je,"\u03DD","\\digamma",!0);X(Z,ze,je,"\u03F0","\\varkappa");X(Z,ze,El,"\u250C","\\@ulcorner",!0);X(Z,ze,lo,"\u2510","\\@urcorner",!0);X(Z,ze,El,"\u2514","\\@llcorner",!0);X(Z,ze,lo,"\u2518","\\@lrcorner",!0);X(Z,ze,qe,"\u2266","\\leqq",!0);X(Z,ze,qe,"\u2A7D","\\leqslant",!0);X(Z,ze,qe,"\u2A95","\\eqslantless",!0);X(Z,ze,qe,"\u2272","\\lesssim",!0);X(Z,ze,qe,"\u2A85","\\lessapprox",!0);X(Z,ze,qe,"\u224A","\\approxeq",!0);X(Z,ze,er,"\u22D6","\\lessdot");X(Z,ze,qe,"\u22D8","\\lll",!0);X(Z,ze,qe,"\u2276","\\lessgtr",!0);X(Z,ze,qe,"\u22DA","\\lesseqgtr",!0);X(Z,ze,qe,"\u2A8B","\\lesseqqgtr",!0);X(Z,ze,qe,"\u2251","\\doteqdot");X(Z,ze,qe,"\u2253","\\risingdotseq",!0);X(Z,ze,qe,"\u2252","\\fallingdotseq",!0);X(Z,ze,qe,"\u223D","\\backsim",!0);X(Z,ze,qe,"\u22CD","\\backsimeq",!0);X(Z,ze,qe,"\u2AC5","\\subseteqq",!0);X(Z,ze,qe,"\u22D0","\\Subset",!0);X(Z,ze,qe,"\u228F","\\sqsubset",!0);X(Z,ze,qe,"\u227C","\\preccurlyeq",!0);X(Z,ze,qe,"\u22DE","\\curlyeqprec",!0);X(Z,ze,qe,"\u227E","\\precsim",!0);X(Z,ze,qe,"\u2AB7","\\precapprox",!0);X(Z,ze,qe,"\u22B2","\\vartriangleleft");X(Z,ze,qe,"\u22B4","\\trianglelefteq");X(Z,ze,qe,"\u22A8","\\vDash",!0);X(Z,ze,qe,"\u22AA","\\Vvdash",!0);X(Z,ze,qe,"\u2323","\\smallsmile");X(Z,ze,qe,"\u2322","\\smallfrown");X(Z,ze,qe,"\u224F","\\bumpeq",!0);X(Z,ze,qe,"\u224E","\\Bumpeq",!0);X(Z,ze,qe,"\u2267","\\geqq",!0);X(Z,ze,qe,"\u2A7E","\\geqslant",!0);X(Z,ze,qe,"\u2A96","\\eqslantgtr",!0);X(Z,ze,qe,"\u2273","\\gtrsim",!0);X(Z,ze,qe,"\u2A86","\\gtrapprox",!0);X(Z,ze,er,"\u22D7","\\gtrdot");X(Z,ze,qe,"\u22D9","\\ggg",!0);X(Z,ze,qe,"\u2277","\\gtrless",!0);X(Z,ze,qe,"\u22DB","\\gtreqless",!0);X(Z,ze,qe,"\u2A8C","\\gtreqqless",!0);X(Z,ze,qe,"\u2256","\\eqcirc",!0);X(Z,ze,qe,"\u2257","\\circeq",!0);X(Z,ze,qe,"\u225C","\\triangleq",!0);X(Z,ze,qe,"\u223C","\\thicksim");X(Z,ze,qe,"\u2248","\\thickapprox");X(Z,ze,qe,"\u2AC6","\\supseteqq",!0);X(Z,ze,qe,"\u22D1","\\Supset",!0);X(Z,ze,qe,"\u2290","\\sqsupset",!0);X(Z,ze,qe,"\u227D","\\succcurlyeq",!0);X(Z,ze,qe,"\u22DF","\\curlyeqsucc",!0);X(Z,ze,qe,"\u227F","\\succsim",!0);X(Z,ze,qe,"\u2AB8","\\succapprox",!0);X(Z,ze,qe,"\u22B3","\\vartriangleright");X(Z,ze,qe,"\u22B5","\\trianglerighteq");X(Z,ze,qe,"\u22A9","\\Vdash",!0);X(Z,ze,qe,"\u2223","\\shortmid");X(Z,ze,qe,"\u2225","\\shortparallel");X(Z,ze,qe,"\u226C","\\between",!0);X(Z,ze,qe,"\u22D4","\\pitchfork",!0);X(Z,ze,qe,"\u221D","\\varpropto");X(Z,ze,qe,"\u25C0","\\blacktriangleleft");X(Z,ze,qe,"\u2234","\\therefore",!0);X(Z,ze,qe,"\u220D","\\backepsilon");X(Z,ze,qe,"\u25B6","\\blacktriangleright");X(Z,ze,qe,"\u2235","\\because",!0);X(Z,ze,qe,"\u22D8","\\llless");X(Z,ze,qe,"\u22D9","\\gggtr");X(Z,ze,er,"\u22B2","\\lhd");X(Z,ze,er,"\u22B3","\\rhd");X(Z,ze,qe,"\u2242","\\eqsim",!0);X(Z,fe,qe,"\u22C8","\\Join");X(Z,ze,qe,"\u2251","\\Doteq",!0);X(Z,ze,er,"\u2214","\\dotplus",!0);X(Z,ze,er,"\u2216","\\smallsetminus");X(Z,ze,er,"\u22D2","\\Cap",!0);X(Z,ze,er,"\u22D3","\\Cup",!0);X(Z,ze,er,"\u2A5E","\\doublebarwedge",!0);X(Z,ze,er,"\u229F","\\boxminus",!0);X(Z,ze,er,"\u229E","\\boxplus",!0);X(Z,ze,er,"\u22C7","\\divideontimes",!0);X(Z,ze,er,"\u22C9","\\ltimes",!0);X(Z,ze,er,"\u22CA","\\rtimes",!0);X(Z,ze,er,"\u22CB","\\leftthreetimes",!0);X(Z,ze,er,"\u22CC","\\rightthreetimes",!0);X(Z,ze,er,"\u22CF","\\curlywedge",!0);X(Z,ze,er,"\u22CE","\\curlyvee",!0);X(Z,ze,er,"\u229D","\\circleddash",!0);X(Z,ze,er,"\u229B","\\circledast",!0);X(Z,ze,er,"\u22C5","\\centerdot");X(Z,ze,er,"\u22BA","\\intercal",!0);X(Z,ze,er,"\u22D2","\\doublecap");X(Z,ze,er,"\u22D3","\\doublecup");X(Z,ze,er,"\u22A0","\\boxtimes",!0);X(Z,ze,qe,"\u21E2","\\dashrightarrow",!0);X(Z,ze,qe,"\u21E0","\\dashleftarrow",!0);X(Z,ze,qe,"\u21C7","\\leftleftarrows",!0);X(Z,ze,qe,"\u21C6","\\leftrightarrows",!0);X(Z,ze,qe,"\u21DA","\\Lleftarrow",!0);X(Z,ze,qe,"\u219E","\\twoheadleftarrow",!0);X(Z,ze,qe,"\u21A2","\\leftarrowtail",!0);X(Z,ze,qe,"\u21AB","\\looparrowleft",!0);X(Z,ze,qe,"\u21CB","\\leftrightharpoons",!0);X(Z,ze,qe,"\u21B6","\\curvearrowleft",!0);X(Z,ze,qe,"\u21BA","\\circlearrowleft",!0);X(Z,ze,qe,"\u21B0","\\Lsh",!0);X(Z,ze,qe,"\u21C8","\\upuparrows",!0);X(Z,ze,qe,"\u21BF","\\upharpoonleft",!0);X(Z,ze,qe,"\u21C3","\\downharpoonleft",!0);X(Z,fe,qe,"\u22B6","\\origof",!0);X(Z,fe,qe,"\u22B7","\\imageof",!0);X(Z,ze,qe,"\u22B8","\\multimap",!0);X(Z,ze,qe,"\u21AD","\\leftrightsquigarrow",!0);X(Z,ze,qe,"\u21C9","\\rightrightarrows",!0);X(Z,ze,qe,"\u21C4","\\rightleftarrows",!0);X(Z,ze,qe,"\u21A0","\\twoheadrightarrow",!0);X(Z,ze,qe,"\u21A3","\\rightarrowtail",!0);X(Z,ze,qe,"\u21AC","\\looparrowright",!0);X(Z,ze,qe,"\u21B7","\\curvearrowright",!0);X(Z,ze,qe,"\u21BB","\\circlearrowright",!0);X(Z,ze,qe,"\u21B1","\\Rsh",!0);X(Z,ze,qe,"\u21CA","\\downdownarrows",!0);X(Z,ze,qe,"\u21BE","\\upharpoonright",!0);X(Z,ze,qe,"\u21C2","\\downharpoonright",!0);X(Z,ze,qe,"\u21DD","\\rightsquigarrow",!0);X(Z,ze,qe,"\u21DD","\\leadsto");X(Z,ze,qe,"\u21DB","\\Rrightarrow",!0);X(Z,ze,qe,"\u21BE","\\restriction");X(Z,fe,je,"\u2018","`");X(Z,fe,je,"$","\\$");X(Lt,fe,je,"$","\\$");X(Lt,fe,je,"$","\\textdollar");X(Z,fe,je,"%","\\%");X(Lt,fe,je,"%","\\%");X(Z,fe,je,"_","\\_");X(Lt,fe,je,"_","\\_");X(Lt,fe,je,"_","\\textunderscore");X(Z,fe,je,"\u2220","\\angle",!0);X(Z,fe,je,"\u221E","\\infty",!0);X(Z,fe,je,"\u2032","\\prime");X(Z,fe,je,"\u25B3","\\triangle");X(Z,fe,je,"\u0393","\\Gamma",!0);X(Z,fe,je,"\u0394","\\Delta",!0);X(Z,fe,je,"\u0398","\\Theta",!0);X(Z,fe,je,"\u039B","\\Lambda",!0);X(Z,fe,je,"\u039E","\\Xi",!0);X(Z,fe,je,"\u03A0","\\Pi",!0);X(Z,fe,je,"\u03A3","\\Sigma",!0);X(Z,fe,je,"\u03A5","\\Upsilon",!0);X(Z,fe,je,"\u03A6","\\Phi",!0);X(Z,fe,je,"\u03A8","\\Psi",!0);X(Z,fe,je,"\u03A9","\\Omega",!0);X(Z,fe,je,"A","\u0391");X(Z,fe,je,"B","\u0392");X(Z,fe,je,"E","\u0395");X(Z,fe,je,"Z","\u0396");X(Z,fe,je,"H","\u0397");X(Z,fe,je,"I","\u0399");X(Z,fe,je,"K","\u039A");X(Z,fe,je,"M","\u039C");X(Z,fe,je,"N","\u039D");X(Z,fe,je,"O","\u039F");X(Z,fe,je,"P","\u03A1");X(Z,fe,je,"T","\u03A4");X(Z,fe,je,"X","\u03A7");X(Z,fe,je,"\xAC","\\neg",!0);X(Z,fe,je,"\xAC","\\lnot");X(Z,fe,je,"\u22A4","\\top");X(Z,fe,je,"\u22A5","\\bot");X(Z,fe,je,"\u2205","\\emptyset");X(Z,ze,je,"\u2205","\\varnothing");X(Z,fe,xr,"\u03B1","\\alpha",!0);X(Z,fe,xr,"\u03B2","\\beta",!0);X(Z,fe,xr,"\u03B3","\\gamma",!0);X(Z,fe,xr,"\u03B4","\\delta",!0);X(Z,fe,xr,"\u03F5","\\epsilon",!0);X(Z,fe,xr,"\u03B6","\\zeta",!0);X(Z,fe,xr,"\u03B7","\\eta",!0);X(Z,fe,xr,"\u03B8","\\theta",!0);X(Z,fe,xr,"\u03B9","\\iota",!0);X(Z,fe,xr,"\u03BA","\\kappa",!0);X(Z,fe,xr,"\u03BB","\\lambda",!0);X(Z,fe,xr,"\u03BC","\\mu",!0);X(Z,fe,xr,"\u03BD","\\nu",!0);X(Z,fe,xr,"\u03BE","\\xi",!0);X(Z,fe,xr,"\u03BF","\\omicron",!0);X(Z,fe,xr,"\u03C0","\\pi",!0);X(Z,fe,xr,"\u03C1","\\rho",!0);X(Z,fe,xr,"\u03C3","\\sigma",!0);X(Z,fe,xr,"\u03C4","\\tau",!0);X(Z,fe,xr,"\u03C5","\\upsilon",!0);X(Z,fe,xr,"\u03D5","\\phi",!0);X(Z,fe,xr,"\u03C7","\\chi",!0);X(Z,fe,xr,"\u03C8","\\psi",!0);X(Z,fe,xr,"\u03C9","\\omega",!0);X(Z,fe,xr,"\u03B5","\\varepsilon",!0);X(Z,fe,xr,"\u03D1","\\vartheta",!0);X(Z,fe,xr,"\u03D6","\\varpi",!0);X(Z,fe,xr,"\u03F1","\\varrho",!0);X(Z,fe,xr,"\u03C2","\\varsigma",!0);X(Z,fe,xr,"\u03C6","\\varphi",!0);X(Z,fe,er,"\u2217","*",!0);X(Z,fe,er,"+","+");X(Z,fe,er,"\u2212","-",!0);X(Z,fe,er,"\u22C5","\\cdot",!0);X(Z,fe,er,"\u2218","\\circ",!0);X(Z,fe,er,"\xF7","\\div",!0);X(Z,fe,er,"\xB1","\\pm",!0);X(Z,fe,er,"\xD7","\\times",!0);X(Z,fe,er,"\u2229","\\cap",!0);X(Z,fe,er,"\u222A","\\cup",!0);X(Z,fe,er,"\u2216","\\setminus",!0);X(Z,fe,er,"\u2227","\\land");X(Z,fe,er,"\u2228","\\lor");X(Z,fe,er,"\u2227","\\wedge",!0);X(Z,fe,er,"\u2228","\\vee",!0);X(Z,fe,je,"\u221A","\\surd");X(Z,fe,El,"\u27E8","\\langle",!0);X(Z,fe,El,"\u2223","\\lvert");X(Z,fe,El,"\u2225","\\lVert");X(Z,fe,lo,"?","?");X(Z,fe,lo,"!","!");X(Z,fe,lo,"\u27E9","\\rangle",!0);X(Z,fe,lo,"\u2223","\\rvert");X(Z,fe,lo,"\u2225","\\rVert");X(Z,fe,qe,"=","=");X(Z,fe,qe,":",":");X(Z,fe,qe,"\u2248","\\approx",!0);X(Z,fe,qe,"\u2245","\\cong",!0);X(Z,fe,qe,"\u2265","\\ge");X(Z,fe,qe,"\u2265","\\geq",!0);X(Z,fe,qe,"\u2190","\\gets");X(Z,fe,qe,">","\\gt",!0);X(Z,fe,qe,"\u2208","\\in",!0);X(Z,fe,qe,"\uE020","\\@not");X(Z,fe,qe,"\u2282","\\subset",!0);X(Z,fe,qe,"\u2283","\\supset",!0);X(Z,fe,qe,"\u2286","\\subseteq",!0);X(Z,fe,qe,"\u2287","\\supseteq",!0);X(Z,ze,qe,"\u2288","\\nsubseteq",!0);X(Z,ze,qe,"\u2289","\\nsupseteq",!0);X(Z,fe,qe,"\u22A8","\\models");X(Z,fe,qe,"\u2190","\\leftarrow",!0);X(Z,fe,qe,"\u2264","\\le");X(Z,fe,qe,"\u2264","\\leq",!0);X(Z,fe,qe,"<","\\lt",!0);X(Z,fe,qe,"\u2192","\\rightarrow",!0);X(Z,fe,qe,"\u2192","\\to");X(Z,ze,qe,"\u2271","\\ngeq",!0);X(Z,ze,qe,"\u2270","\\nleq",!0);X(Z,fe,xh,"\xA0","\\ ");X(Z,fe,xh,"\xA0","\\space");X(Z,fe,xh,"\xA0","\\nobreakspace");X(Lt,fe,xh,"\xA0","\\ ");X(Lt,fe,xh,"\xA0"," ");X(Lt,fe,xh,"\xA0","\\space");X(Lt,fe,xh,"\xA0","\\nobreakspace");X(Z,fe,xh,"","\\nobreak");X(Z,fe,xh,"","\\allowbreak");X(Z,fe,Wb,",",",");X(Z,fe,Wb,";",";");X(Z,ze,er,"\u22BC","\\barwedge",!0);X(Z,ze,er,"\u22BB","\\veebar",!0);X(Z,fe,er,"\u2299","\\odot",!0);X(Z,fe,er,"\u2295","\\oplus",!0);X(Z,fe,er,"\u2297","\\otimes",!0);X(Z,fe,je,"\u2202","\\partial",!0);X(Z,fe,er,"\u2298","\\oslash",!0);X(Z,ze,er,"\u229A","\\circledcirc",!0);X(Z,ze,er,"\u22A1","\\boxdot",!0);X(Z,fe,er,"\u25B3","\\bigtriangleup");X(Z,fe,er,"\u25BD","\\bigtriangledown");X(Z,fe,er,"\u2020","\\dagger");X(Z,fe,er,"\u22C4","\\diamond");X(Z,fe,er,"\u22C6","\\star");X(Z,fe,er,"\u25C3","\\triangleleft");X(Z,fe,er,"\u25B9","\\triangleright");X(Z,fe,El,"{","\\{");X(Lt,fe,je,"{","\\{");X(Lt,fe,je,"{","\\textbraceleft");X(Z,fe,lo,"}","\\}");X(Lt,fe,je,"}","\\}");X(Lt,fe,je,"}","\\textbraceright");X(Z,fe,El,"{","\\lbrace");X(Z,fe,lo,"}","\\rbrace");X(Z,fe,El,"[","\\lbrack",!0);X(Lt,fe,je,"[","\\lbrack",!0);X(Z,fe,lo,"]","\\rbrack",!0);X(Lt,fe,je,"]","\\rbrack",!0);X(Z,fe,El,"(","\\lparen",!0);X(Z,fe,lo,")","\\rparen",!0);X(Lt,fe,je,"<","\\textless",!0);X(Lt,fe,je,">","\\textgreater",!0);X(Z,fe,El,"\u230A","\\lfloor",!0);X(Z,fe,lo,"\u230B","\\rfloor",!0);X(Z,fe,El,"\u2308","\\lceil",!0);X(Z,fe,lo,"\u2309","\\rceil",!0);X(Z,fe,je,"\\","\\backslash");X(Z,fe,je,"\u2223","|");X(Z,fe,je,"\u2223","\\vert");X(Lt,fe,je,"|","\\textbar",!0);X(Z,fe,je,"\u2225","\\|");X(Z,fe,je,"\u2225","\\Vert");X(Lt,fe,je,"\u2225","\\textbardbl");X(Lt,fe,je,"~","\\textasciitilde");X(Lt,fe,je,"\\","\\textbackslash");X(Lt,fe,je,"^","\\textasciicircum");X(Z,fe,qe,"\u2191","\\uparrow",!0);X(Z,fe,qe,"\u21D1","\\Uparrow",!0);X(Z,fe,qe,"\u2193","\\downarrow",!0);X(Z,fe,qe,"\u21D3","\\Downarrow",!0);X(Z,fe,qe,"\u2195","\\updownarrow",!0);X(Z,fe,qe,"\u21D5","\\Updownarrow",!0);X(Z,fe,wa,"\u2210","\\coprod");X(Z,fe,wa,"\u22C1","\\bigvee");X(Z,fe,wa,"\u22C0","\\bigwedge");X(Z,fe,wa,"\u2A04","\\biguplus");X(Z,fe,wa,"\u22C2","\\bigcap");X(Z,fe,wa,"\u22C3","\\bigcup");X(Z,fe,wa,"\u222B","\\int");X(Z,fe,wa,"\u222B","\\intop");X(Z,fe,wa,"\u222C","\\iint");X(Z,fe,wa,"\u222D","\\iiint");X(Z,fe,wa,"\u220F","\\prod");X(Z,fe,wa,"\u2211","\\sum");X(Z,fe,wa,"\u2A02","\\bigotimes");X(Z,fe,wa,"\u2A01","\\bigoplus");X(Z,fe,wa,"\u2A00","\\bigodot");X(Z,fe,wa,"\u222E","\\oint");X(Z,fe,wa,"\u222F","\\oiint");X(Z,fe,wa,"\u2230","\\oiiint");X(Z,fe,wa,"\u2A06","\\bigsqcup");X(Z,fe,wa,"\u222B","\\smallint");X(Lt,fe,Yg,"\u2026","\\textellipsis");X(Z,fe,Yg,"\u2026","\\mathellipsis");X(Lt,fe,Yg,"\u2026","\\ldots",!0);X(Z,fe,Yg,"\u2026","\\ldots",!0);X(Z,fe,Yg,"\u22EF","\\@cdots",!0);X(Z,fe,Yg,"\u22F1","\\ddots",!0);X(Z,fe,je,"\u22EE","\\varvdots");X(Lt,fe,je,"\u22EE","\\varvdots");X(Z,fe,Si,"\u02CA","\\acute");X(Z,fe,Si,"\u02CB","\\grave");X(Z,fe,Si,"\xA8","\\ddot");X(Z,fe,Si,"~","\\tilde");X(Z,fe,Si,"\u02C9","\\bar");X(Z,fe,Si,"\u02D8","\\breve");X(Z,fe,Si,"\u02C7","\\check");X(Z,fe,Si,"^","\\hat");X(Z,fe,Si,"\u20D7","\\vec");X(Z,fe,Si,"\u02D9","\\dot");X(Z,fe,Si,"\u02DA","\\mathring");X(Z,fe,xr,"\uE131","\\@imath");X(Z,fe,xr,"\uE237","\\@jmath");X(Z,fe,je,"\u0131","\u0131");X(Z,fe,je,"\u0237","\u0237");X(Lt,fe,je,"\u0131","\\i",!0);X(Lt,fe,je,"\u0237","\\j",!0);X(Lt,fe,je,"\xDF","\\ss",!0);X(Lt,fe,je,"\xE6","\\ae",!0);X(Lt,fe,je,"\u0153","\\oe",!0);X(Lt,fe,je,"\xF8","\\o",!0);X(Lt,fe,je,"\xC6","\\AE",!0);X(Lt,fe,je,"\u0152","\\OE",!0);X(Lt,fe,je,"\xD8","\\O",!0);X(Lt,fe,Si,"\u02CA","\\'");X(Lt,fe,Si,"\u02CB","\\`");X(Lt,fe,Si,"\u02C6","\\^");X(Lt,fe,Si,"\u02DC","\\~");X(Lt,fe,Si,"\u02C9","\\=");X(Lt,fe,Si,"\u02D8","\\u");X(Lt,fe,Si,"\u02D9","\\.");X(Lt,fe,Si,"\xB8","\\c");X(Lt,fe,Si,"\u02DA","\\r");X(Lt,fe,Si,"\u02C7","\\v");X(Lt,fe,Si,"\xA8",'\\"');X(Lt,fe,Si,"\u02DD","\\H");X(Lt,fe,Si,"\u25EF","\\textcircled");dJ={"--":!0,"---":!0,"``":!0,"''":!0};X(Lt,fe,je,"\u2013","--",!0);X(Lt,fe,je,"\u2013","\\textendash");X(Lt,fe,je,"\u2014","---",!0);X(Lt,fe,je,"\u2014","\\textemdash");X(Lt,fe,je,"\u2018","`",!0);X(Lt,fe,je,"\u2018","\\textquoteleft");X(Lt,fe,je,"\u2019","'",!0);X(Lt,fe,je,"\u2019","\\textquoteright");X(Lt,fe,je,"\u201C","``",!0);X(Lt,fe,je,"\u201C","\\textquotedblleft");X(Lt,fe,je,"\u201D","''",!0);X(Lt,fe,je,"\u201D","\\textquotedblright");X(Z,fe,je,"\xB0","\\degree",!0);X(Lt,fe,je,"\xB0","\\degree");X(Lt,fe,je,"\xB0","\\textdegree",!0);X(Z,fe,je,"\xA3","\\pounds");X(Z,fe,je,"\xA3","\\mathsterling",!0);X(Lt,fe,je,"\xA3","\\pounds");X(Lt,fe,je,"\xA3","\\textsterling",!0);X(Z,ze,je,"\u2720","\\maltese");X(Lt,ze,je,"\u2720","\\maltese");AQ='0123456789/@."';for(gk=0;gk{var e=t.charCodeAt(0),r=t.charCodeAt(1),n=(e-55296)*1024+(r-56320)+65536;if(119808<=n&&n<120484){var i=Math.floor((n-119808)/26);return PQ[i]}else if(120782<=n&&n<=120831){var a=Math.floor((n-120782)/10);return t$e[a]}else{if(n===120485||n===120486)return PQ[0];if(120486{if($f(t.classes)!==$f(e.classes)||t.skew!==e.skew||t.maxFontSize!==e.maxFontSize||t.italic!==0&&t.hasClass("mathnormal"))return!1;if(t.classes.length===1){var r=t.classes[0];if(r==="mbin"||r==="mord")return!1}for(var n of Object.keys(t.style))if(t.style[n]!==e.style[n])return!1;for(var i of Object.keys(e.style))if(t.style[i]!==e.style[i])return!1;return!0},pJ=t=>{for(var e=0;er&&(r=s.height),s.depth>n&&(n=s.depth),s.maxFontSize>i&&(i=s.maxFontSize)}e.height=r,e.depth=n,e.maxFontSize=i},Mt=function(e,r,n,i){var a=new Gf(e,r,n,i);return XM(a),a},qf=(t,e,r,n)=>new Gf(t,e,r,n),Vg=function(e,r,n){var i=Mt([e],[],r);return i.height=Math.max(n||r.fontMetrics().defaultRuleThickness,r.minRuleThickness),i.style.borderBottomWidth=Gt(i.height),i.maxFontSize=1,i},a$e=function(e,r,n,i){var a=new Hg(e,r,n,i);return XM(a),a},bh=function(e){var r=new zf(e);return XM(r),r},Wg=function(e,r){return e instanceof zf?Mt([],[e],r):e},s$e=function(e){if(e.positionType==="individualShift"){for(var r=e.children,n=[r[0]],i=-r[0].shift-r[0].elem.depth,a=i,s=1;s{var r=Mt(["mspace"],[],e),n=$i(t,e);return r.style.marginRight=Gt(n),r},bk=(t,e,r)=>{var n,i;switch(t){case"amsrm":n="AMS";break;case"textrm":n="Main";break;case"textsf":n="SansSerif";break;case"texttt":n="Typewriter";break;default:n=t}return e==="textbf"&&r==="textit"?i="BoldItalic":e==="textbf"?i="Bold":r==="textit"?i="Italic":i="Regular",n+"-"+i},IM={mathbf:{variant:"bold",fontName:"Main-Bold"},mathrm:{variant:"normal",fontName:"Main-Regular"},textit:{variant:"italic",fontName:"Main-Italic"},mathit:{variant:"italic",fontName:"Main-Italic"},mathnormal:{variant:"italic",fontName:"Math-Italic"},mathsfit:{variant:"sans-serif-italic",fontName:"SansSerif-Italic"},mathbb:{variant:"double-struck",fontName:"AMS-Regular"},mathcal:{variant:"script",fontName:"Caligraphic-Regular"},mathfrak:{variant:"fraktur",fontName:"Fraktur-Regular"},mathscr:{variant:"script",fontName:"Script-Regular"},mathsf:{variant:"sans-serif",fontName:"SansSerif-Regular"},mathtt:{variant:"monospace",fontName:"Typewriter-Regular"}},gJ={vec:["vec",.471,.714],oiintSize1:["oiintSize1",.957,.499],oiintSize2:["oiintSize2",1.472,.659],oiiintSize1:["oiiintSize1",1.304,.499],oiiintSize2:["oiiintSize2",1.98,.659]},yJ=function(e,r){var[n,i,a]=gJ[e],s=new qc(n),o=new qu([s],{width:Gt(i),height:Gt(a),style:"width:"+Gt(i),viewBox:"0 0 "+1e3*i+" "+1e3*a,preserveAspectRatio:"xMinYMin"}),l=qf(["overlay"],[o],r);return l.height=a,l.style.height=Gt(a),l.style.width=Gt(i),l},zi={number:3,unit:"mu"},m1={number:4,unit:"mu"},gh={number:5,unit:"mu"},o$e={mord:{mop:zi,mbin:m1,mrel:gh,minner:zi},mop:{mord:zi,mop:zi,mrel:gh,minner:zi},mbin:{mord:m1,mop:m1,mopen:m1,minner:m1},mrel:{mord:gh,mop:gh,mopen:gh,minner:gh},mopen:{},mclose:{mop:zi,mbin:m1,mrel:gh,minner:zi},mpunct:{mord:zi,mop:zi,mrel:gh,mopen:zi,mclose:zi,mpunct:zi,minner:zi},minner:{mord:zi,mop:zi,mbin:m1,mrel:gh,mopen:zi,mpunct:zi,minner:zi}},l$e={mord:{mop:zi},mop:{mord:zi,mop:zi},mbin:{},mrel:{},mopen:{},mclose:{mop:zi},mpunct:{},minner:{mop:zi}},vJ={},Rk={},Dk={};Ik=function(e){return e.type==="ordgroup"&&e.body.length===1?e.body[0]:e},ba=function(e){return e.type==="ordgroup"?e.body:[e]},u$e=new Set(["leftmost","mbin","mopen","mrel","mop","mpunct"]),c$e=new Set(["rightmost","mrel","mclose","mpunct"]),h$e={display:Rr.DISPLAY,text:Rr.TEXT,script:Rr.SCRIPT,scriptscript:Rr.SCRIPTSCRIPT},f$e={mord:"mord",mop:"mop",mbin:"mbin",mrel:"mrel",mopen:"mopen",mclose:"mclose",mpunct:"mpunct",minner:"minner"},Pa=function(e,r,n,i){i===void 0&&(i=[null,null]);for(var a=[],s=0;s{var y=g.classes[0],v=m.classes[0];y==="mbin"&&c$e.has(v)?g.classes[0]="mord":v==="mbin"&&u$e.has(y)&&(m.classes[0]="mord")},{node:f},d,p),MM(a,(m,g)=>{var y,v,x=OM(g),k=OM(m),_=x&&k?m.hasClass("mtight")?(y=l$e[x])==null?void 0:y[k]:(v=o$e[x])==null?void 0:v[k]:null;if(_)return mJ(_,u)},{node:f},d,p),a},MM=function(e,r,n,i,a){i&&e.push(i);for(var s=0;sd=>{e.splice(f+1,0,d),s++})(s)}i&&e.pop()},xJ=function(e){return e instanceof zf||e instanceof Hg||e instanceof Gf&&e.hasClass("enclosing")?e:null},NM=function(e,r){var n=xJ(e);if(n){var i=n.children;if(i.length){if(r==="right")return NM(i[i.length-1],"right");if(r==="left")return NM(i[0],"left")}}return e},OM=function(e,r){if(!e)return null;r&&(e=NM(e,r));var n=e.classes[0];return f$e[n]||null},Vb=function(e,r){var n=["nulldelimiter"].concat(e.baseSizingClasses());return Mt(r.concat(n))},Cn=function(e,r,n){if(!e)return Mt();if(Rk[e.type]){var i=Rk[e.type](e,r);if(n&&r.size!==n.size){i=Mt(r.sizingClasses(n),[i],r);var a=r.sizeMultiplier/n.sizeMultiplier;i.height*=a,i.depth*=a}return i}else throw new Ft("Got group of unknown type: '"+e.type+"'")};Pt=class{constructor(e,r,n){this.type=void 0,this.attributes=void 0,this.children=void 0,this.classes=void 0,this.type=e,this.attributes={},this.children=r||[],this.classes=n||[]}setAttribute(e,r){this.attributes[e]=r}getAttribute(e){return this.attributes[e]}toNode(){var e=document.createElementNS("http://www.w3.org/1998/Math/MathML",this.type);for(var r in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,r)&&e.setAttribute(r,this.attributes[r]);this.classes.length>0&&(e.className=$f(this.classes));for(var n=0;n0&&(e+=' class ="'+Gs($f(this.classes))+'"'),e+=">";for(var n=0;n",e}toText(){return this.children.map(e=>e.toText()).join("")}},Yi=class{constructor(e){this.text=void 0,this.text=e}toNode(){return document.createTextNode(this.text)}toMarkup(){return Gs(this.toText())}toText(){return this.text}},Mk=class{constructor(e){this.width=void 0,this.character=void 0,this.width=e,e>=.05555&&e<=.05556?this.character="\u200A":e>=.1666&&e<=.1667?this.character="\u2009":e>=.2222&&e<=.2223?this.character="\u2005":e>=.2777&&e<=.2778?this.character="\u2005\u200A":e>=-.05556&&e<=-.05555?this.character="\u200A\u2063":e>=-.1667&&e<=-.1666?this.character="\u2009\u2063":e>=-.2223&&e<=-.2222?this.character="\u205F\u2063":e>=-.2778&&e<=-.2777?this.character="\u2005\u2063":this.character=null}toNode(){if(this.character)return document.createTextNode(this.character);var e=document.createElementNS("http://www.w3.org/1998/Math/MathML","mspace");return e.setAttribute("width",Gt(this.width)),e}toMarkup(){return this.character?""+this.character+"":''}toText(){return this.character?this.character:" "}},d$e=new Set(["\\imath","\\jmath"]),p$e=new Set(["mrow","mtable"]),tu=function(e,r,n){return Ei[r][e]&&Ei[r][e].replace&&e.charCodeAt(0)!==55349&&!(dJ.hasOwnProperty(e)&&n&&(n.fontFamily&&n.fontFamily.slice(4,6)==="tt"||n.font&&n.font.slice(4,6)==="tt"))&&(e=Ei[r][e].replace),new Yi(e)},jM=function(e){return e.length===1?e[0]:new Pt("mrow",e)},m$e={mathit:"italic",boldsymbol:t=>t.type==="textord"?"bold":"bold-italic",mathbf:"bold",mathbb:"double-struck",mathsfit:"sans-serif-italic",mathfrak:"fraktur",mathscr:"script",mathcal:"script",mathsf:"sans-serif",mathtt:"monospace"},KM=(t,e)=>{if(t.mode==="text"){if(e.fontFamily==="texttt")return"monospace";if(e.fontFamily==="textsf")return e.fontShape==="textit"&&e.fontWeight==="textbf"?"sans-serif-bold-italic":e.fontShape==="textit"?"sans-serif-italic":e.fontWeight==="textbf"?"bold-sans-serif":"sans-serif";if(e.fontShape==="textit"&&e.fontWeight==="textbf")return"bold-italic";if(e.fontShape==="textit")return"italic";if(e.fontWeight==="textbf")return"bold"}var r=e.font;if(!r||r==="mathnormal")return null;var n=t.mode,i=m$e[r];if(i)return typeof i=="function"?i(t):i;var a=t.text;if(d$e.has(a))return null;if(Ei[n][a]){var s=Ei[n][a].replace;s&&(a=s)}var o=IM[r].fontName;return WM(a,o,n)?IM[r].variant:null};Sl=function(e,r,n){if(e.length===1){var i=Jn(e[0],r);return n&&i instanceof Pt&&i.type==="mo"&&(i.setAttribute("lspace","0em"),i.setAttribute("rspace","0em")),[i]}for(var a=[],s,o=0;o=1&&(s.type==="mn"||dM(s))){var u=l.children[0];u instanceof Pt&&u.type==="mn"&&(u.children=[...s.children,...u.children],a.pop())}else if(s.type==="mi"&&s.children.length===1){var h=s.children[0];if(h instanceof Yi&&h.text==="\u0338"&&(l.type==="mo"||l.type==="mi"||l.type==="mn")){var f=l.children[0];f instanceof Yi&&f.text.length>0&&(f.text=f.text.slice(0,1)+"\u0338"+f.text.slice(1),a.pop())}}}a.push(l),s=l}return a},Uf=function(e,r,n){return jM(Sl(e,r,n))},Jn=function(e,r){if(!e)return new Pt("mrow");if(Dk[e.type])return Dk[e.type](e,r);throw new Ft("Got group of unknown type: '"+e.type+"'")};g$e=[[1,1,1],[2,1,1],[3,1,1],[4,2,1],[5,2,1],[6,3,1],[7,4,2],[8,6,3],[9,7,6],[10,8,7],[11,10,9]],FQ=[.5,.6,.7,.8,.9,1,1.2,1.44,1.728,2.074,2.488],zQ=function(e,r){return r.size<2?e:g$e[e-1][r.size-1]},Nk=class t{constructor(e){this.style=void 0,this.color=void 0,this.size=void 0,this.textSize=void 0,this.phantom=void 0,this.font=void 0,this.fontFamily=void 0,this.fontWeight=void 0,this.fontShape=void 0,this.sizeMultiplier=void 0,this.maxSize=void 0,this.minRuleThickness=void 0,this._fontMetrics=void 0,this.style=e.style,this.color=e.color,this.size=e.size||t.BASESIZE,this.textSize=e.textSize||this.size,this.phantom=!!e.phantom,this.font=e.font||"",this.fontFamily=e.fontFamily||"",this.fontWeight=e.fontWeight||"",this.fontShape=e.fontShape||"",this.sizeMultiplier=FQ[this.size-1],this.maxSize=e.maxSize,this.minRuleThickness=e.minRuleThickness,this._fontMetrics=void 0}extend(e){var r={style:this.style,size:this.size,textSize:this.textSize,color:this.color,phantom:this.phantom,font:this.font,fontFamily:this.fontFamily,fontWeight:this.fontWeight,fontShape:this.fontShape,maxSize:this.maxSize,minRuleThickness:this.minRuleThickness};return Object.assign(r,e),new t(r)}havingStyle(e){return this.style===e?this:this.extend({style:e,size:zQ(this.textSize,e)})}havingCrampedStyle(){return this.havingStyle(this.style.cramp())}havingSize(e){return this.size===e&&this.textSize===e?this:this.extend({style:this.style.text(),size:e,textSize:e,sizeMultiplier:FQ[e-1]})}havingBaseStyle(e){e=e||this.style.text();var r=zQ(t.BASESIZE,e);return this.size===r&&this.textSize===t.BASESIZE&&this.style===e?this:this.extend({style:e,size:r})}havingBaseSizing(){var e;switch(this.style.id){case 4:case 5:e=3;break;case 6:case 7:e=1;break;default:e=6}return this.extend({style:this.style.text(),size:e})}withColor(e){return this.extend({color:e})}withPhantom(){return this.extend({phantom:!0})}withFont(e){return this.extend({font:e})}withTextFontFamily(e){return this.extend({fontFamily:e,font:""})}withTextFontWeight(e){return this.extend({fontWeight:e,font:""})}withTextFontShape(e){return this.extend({fontShape:e,font:""})}sizingClasses(e){return e.size!==this.size?["sizing","reset-size"+e.size,"size"+this.size]:[]}baseSizingClasses(){return this.size!==t.BASESIZE?["sizing","reset-size"+this.size,"size"+t.BASESIZE]:[]}fontMetrics(){return this._fontMetrics||(this._fontMetrics=Jze(this.size)),this._fontMetrics}getColor(){return this.phantom?"transparent":this.color}};Nk.BASESIZE=6;wJ=function(e){return new Nk({style:e.displayMode?Rr.DISPLAY:Rr.TEXT,maxSize:e.maxSize,minRuleThickness:e.minRuleThickness})},kJ=function(e,r){if(r.displayMode){var n=["katex-display"];r.leqno&&n.push("leqno"),r.fleqn&&n.push("fleqn"),e=Mt(n,[e])}return e},y$e=function(e,r,n){var i=wJ(n),a;if(n.output==="mathml")return BQ(e,r,i,n.displayMode,!0);if(n.output==="html"){var s=PM(e,i);a=Mt(["katex"],[s])}else{var o=BQ(e,r,i,n.displayMode,!1),l=PM(e,i);a=Mt(["katex"],[o,l])}return kJ(a,n)},v$e=function(e,r,n){var i=wJ(n),a=PM(e,i),s=Mt(["katex"],[a]);return kJ(s,n)},x$e={widehat:"^",widecheck:"\u02C7",widetilde:"~",utilde:"~",overleftarrow:"\u2190",underleftarrow:"\u2190",xleftarrow:"\u2190",overrightarrow:"\u2192",underrightarrow:"\u2192",xrightarrow:"\u2192",underbrace:"\u23DF",overbrace:"\u23DE",underbracket:"\u23B5",overbracket:"\u23B4",overgroup:"\u23E0",undergroup:"\u23E1",overleftrightarrow:"\u2194",underleftrightarrow:"\u2194",xleftrightarrow:"\u2194",Overrightarrow:"\u21D2",xRightarrow:"\u21D2",overleftharpoon:"\u21BC",xleftharpoonup:"\u21BC",overrightharpoon:"\u21C0",xrightharpoonup:"\u21C0",xLeftarrow:"\u21D0",xLeftrightarrow:"\u21D4",xhookleftarrow:"\u21A9",xhookrightarrow:"\u21AA",xmapsto:"\u21A6",xrightharpoondown:"\u21C1",xleftharpoondown:"\u21BD",xrightleftharpoons:"\u21CC",xleftrightharpoons:"\u21CB",xtwoheadleftarrow:"\u219E",xtwoheadrightarrow:"\u21A0",xlongequal:"=",xtofrom:"\u21C4",xrightleftarrows:"\u21C4",xrightequilibrium:"\u21CC",xleftequilibrium:"\u21CB","\\cdrightarrow":"\u2192","\\cdleftarrow":"\u2190","\\cdlongequal":"="},zk=function(e){var r=new Pt("mo",[new Yi(x$e[e.replace(/^\\/,"")])]);return r.setAttribute("stretchy","true"),r},b$e={overrightarrow:[["rightarrow"],.888,522,"xMaxYMin"],overleftarrow:[["leftarrow"],.888,522,"xMinYMin"],underrightarrow:[["rightarrow"],.888,522,"xMaxYMin"],underleftarrow:[["leftarrow"],.888,522,"xMinYMin"],xrightarrow:[["rightarrow"],1.469,522,"xMaxYMin"],"\\cdrightarrow":[["rightarrow"],3,522,"xMaxYMin"],xleftarrow:[["leftarrow"],1.469,522,"xMinYMin"],"\\cdleftarrow":[["leftarrow"],3,522,"xMinYMin"],Overrightarrow:[["doublerightarrow"],.888,560,"xMaxYMin"],xRightarrow:[["doublerightarrow"],1.526,560,"xMaxYMin"],xLeftarrow:[["doubleleftarrow"],1.526,560,"xMinYMin"],overleftharpoon:[["leftharpoon"],.888,522,"xMinYMin"],xleftharpoonup:[["leftharpoon"],.888,522,"xMinYMin"],xleftharpoondown:[["leftharpoondown"],.888,522,"xMinYMin"],overrightharpoon:[["rightharpoon"],.888,522,"xMaxYMin"],xrightharpoonup:[["rightharpoon"],.888,522,"xMaxYMin"],xrightharpoondown:[["rightharpoondown"],.888,522,"xMaxYMin"],xlongequal:[["longequal"],.888,334,"xMinYMin"],"\\cdlongequal":[["longequal"],3,334,"xMinYMin"],xtwoheadleftarrow:[["twoheadleftarrow"],.888,334,"xMinYMin"],xtwoheadrightarrow:[["twoheadrightarrow"],.888,334,"xMaxYMin"],overleftrightarrow:[["leftarrow","rightarrow"],.888,522],overbrace:[["leftbrace","midbrace","rightbrace"],1.6,548],underbrace:[["leftbraceunder","midbraceunder","rightbraceunder"],1.6,548],underleftrightarrow:[["leftarrow","rightarrow"],.888,522],xleftrightarrow:[["leftarrow","rightarrow"],1.75,522],xLeftrightarrow:[["doubleleftarrow","doublerightarrow"],1.75,560],xrightleftharpoons:[["leftharpoondownplus","rightharpoonplus"],1.75,716],xleftrightharpoons:[["leftharpoonplus","rightharpoondownplus"],1.75,716],xhookleftarrow:[["leftarrow","righthook"],1.08,522],xhookrightarrow:[["lefthook","rightarrow"],1.08,522],overlinesegment:[["leftlinesegment","rightlinesegment"],.888,522],underlinesegment:[["leftlinesegment","rightlinesegment"],.888,522],overbracket:[["leftbracketover","rightbracketover"],1.6,440],underbracket:[["leftbracketunder","rightbracketunder"],1.6,410],overgroup:[["leftgroup","rightgroup"],.888,342],undergroup:[["leftgroupunder","rightgroupunder"],.888,342],xmapsto:[["leftmapsto","rightarrow"],1.5,522],xtofrom:[["leftToFrom","rightToFrom"],1.75,528],xrightleftarrows:[["baraboveleftarrow","rightarrowabovebar"],1.75,901],xrightequilibrium:[["baraboveshortleftharpoon","rightharpoonaboveshortbar"],1.75,716],xleftequilibrium:[["shortbaraboveleftharpoon","shortrightharpoonabovebar"],1.75,716]},w$e=new Set(["widehat","widecheck","widetilde","utilde"]),$k=function(e,r){function n(){var o=4e5,l=e.label.slice(1);if(w$e.has(l)&&"base"in e){var u=e.base.type==="ordgroup"?e.base.body.length:1,h,f,d;if(u>5)l==="widehat"||l==="widecheck"?(h=420,o=2364,d=.42,f=l+"4"):(h=312,o=2340,d=.34,f="tilde4");else{var p=[1,1,2,2,3,3][u];l==="widehat"||l==="widecheck"?(o=[0,1062,2364,2364,2364][p],h=[0,239,300,360,420][p],d=[0,.24,.3,.3,.36,.42][p],f=l+p):(o=[0,600,1033,2339,2340][p],h=[0,260,286,306,312][p],d=[0,.26,.286,.3,.306,.34][p],f="tilde"+p)}var m=new qc(f),g=new qu([m],{width:"100%",height:Gt(d),viewBox:"0 0 "+o+" "+h,preserveAspectRatio:"none"});return{span:qf([],[g],r),minWidth:0,height:d}}else{var y=[],v=b$e[l];if(!v)throw new Error('No SVG data for "'+l+'".');var[x,k,_]=v,T=_/1e3,S=x.length,R,A;if(S===1){if(v.length!==4)throw new Error('Expected 4-tuple for single-path SVG data "'+l+'".');R=["hide-tail"],A=[v[3]]}else if(S===2)R=["halfarrow-left","halfarrow-right"],A=["xMinYMin","xMaxYMin"];else if(S===3)R=["brace-left","brace-center","brace-right"],A=["xMinYMin","xMidYMin","xMaxYMin"];else throw new Error(`Correct katexImagesData or update code here to support + `+S+" children.");for(var I=0;I0&&(i.style.minWidth=Gt(a)),i},k$e=function(e,r,n,i,a){var s,o=e.height+e.depth+n+i;if(/fbox|color|angl/.test(r)){if(s=Mt(["stretchy",r],[],a),r==="fbox"){var l=a.color&&a.getColor();l&&(s.style.borderColor=l)}}else{var u=[];/^[bx]cancel$/.test(r)&&u.push(new Hb({x1:"0",y1:"0",x2:"100%",y2:"100%","stroke-width":"0.046em"})),/^x?cancel$/.test(r)&&u.push(new Hb({x1:"0",y1:"100%",x2:"100%",y2:"0","stroke-width":"0.046em"}));var h=new qu(u,{width:"100%",height:Gt(o)});s=qf([],[h],a)}return s.height=o,s.style.height=Gt(o),s},T$e={bin:1,close:1,inner:1,open:1,punct:1,rel:1},E$e={"accent-token":1,mathord:1,"op-token":1,spacing:1,textord:1};TJ=t=>{if(t instanceof oo)return t;if(Qze(t)&&t.children.length===1)return TJ(t.children[0])},ZM=(t,e)=>{var r,n,i;t&&t.type==="supsub"?(n=$r(t.base,"accent"),r=n.base,t.base=r,i=Zze(Cn(t,e)),t.base=n):(n=$r(t,"accent"),r=n.base);var a=Cn(r,e.havingCrampedStyle()),s=n.isShifty&&vh(r),o=0;if(s){var l,u;o=(l=(u=TJ(a))==null?void 0:u.skew)!=null?l:0}var h=n.label==="\\c",f=h?a.height+a.depth:Math.min(a.height,e.fontMetrics().xHeight),d;if(n.isStretchy)d=$k(n,e),d=Sn({positionType:"firstBaseline",children:[{type:"elem",elem:a},{type:"elem",elem:d,wrapperClasses:["svg-align"],wrapperStyle:o>0?{width:"calc(100% - "+Gt(2*o)+")",marginLeft:Gt(2*o)}:void 0}]});else{var p,m;n.label==="\\vec"?(p=yJ("vec",e),m=gJ.vec[1]):(p=Fk({type:"textord",mode:n.mode,text:n.label},e,"textord"),p=Kze(p),p.italic=0,m=p.width,h&&(f+=p.depth)),d=Mt(["accent-body"],[p]);var g=n.label==="\\textcircled";g&&(d.classes.push("accent-full"),f=a.height);var y=o;g||(y-=m/2),d.style.left=Gt(y),n.label==="\\textcircled"&&(d.style.top=".2em"),d=Sn({positionType:"firstBaseline",children:[{type:"elem",elem:a},{type:"kern",size:-f},{type:"elem",elem:d}]})}var v=Mt(["mord","accent"],[d],e);return i?(i.children[0]=v,i.height=Math.max(v.height,i.height),i.classes[0]="mord",i):v},EJ=(t,e)=>{var r=t.isStretchy?zk(t.label):new Pt("mo",[tu(t.label,t.mode)]),n=new Pt("mover",[Jn(t.base,e),r]);return n.setAttribute("accent","true"),n},C$e=new RegExp(["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring"].map(t=>"\\"+t).join("|"));jt({type:"accent",names:["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring","\\widecheck","\\widehat","\\widetilde","\\overrightarrow","\\overleftarrow","\\Overrightarrow","\\overleftrightarrow","\\overgroup","\\overlinesegment","\\overleftharpoon","\\overrightharpoon"],props:{numArgs:1},handler:(t,e)=>{var r=Ik(e[0]),n=!C$e.test(t.funcName),i=!n||t.funcName==="\\widehat"||t.funcName==="\\widetilde"||t.funcName==="\\widecheck";return{type:"accent",mode:t.parser.mode,label:t.funcName,isStretchy:n,isShifty:i,base:r}},htmlBuilder:ZM,mathmlBuilder:EJ});jt({type:"accent",names:["\\'","\\`","\\^","\\~","\\=","\\u","\\.",'\\"',"\\c","\\r","\\H","\\v","\\textcircled"],props:{numArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:["primitive"]},handler:(t,e)=>{var r=e[0],n=t.parser.mode;return n==="math"&&(t.parser.settings.reportNonstrict("mathVsTextAccents","LaTeX's accent "+t.funcName+" works only in text mode"),n="text"),{type:"accent",mode:n,label:t.funcName,isStretchy:!1,isShifty:!0,base:r}},htmlBuilder:ZM,mathmlBuilder:EJ});jt({type:"accentUnder",names:["\\underleftarrow","\\underrightarrow","\\underleftrightarrow","\\undergroup","\\underlinesegment","\\utilde"],props:{numArgs:1},handler:(t,e)=>{var{parser:r,funcName:n}=t,i=e[0];return{type:"accentUnder",mode:r.mode,label:n,base:i}},htmlBuilder:(t,e)=>{var r=Cn(t.base,e),n=$k(t,e),i=t.label==="\\utilde"?.12:0,a=Sn({positionType:"top",positionData:r.height,children:[{type:"elem",elem:n,wrapperClasses:["svg-align"]},{type:"kern",size:i},{type:"elem",elem:r}]});return Mt(["mord","accentunder"],[a],e)},mathmlBuilder:(t,e)=>{var r=zk(t.label),n=new Pt("munder",[Jn(t.base,e),r]);return n.setAttribute("accentunder","true"),n}});kk=t=>{var e=new Pt("mpadded",t?[t]:[]);return e.setAttribute("width","+0.6em"),e.setAttribute("lspace","0.3em"),e};jt({type:"xArrow",names:["\\xleftarrow","\\xrightarrow","\\xLeftarrow","\\xRightarrow","\\xleftrightarrow","\\xLeftrightarrow","\\xhookleftarrow","\\xhookrightarrow","\\xmapsto","\\xrightharpoondown","\\xrightharpoonup","\\xleftharpoondown","\\xleftharpoonup","\\xrightleftharpoons","\\xleftrightharpoons","\\xlongequal","\\xtwoheadrightarrow","\\xtwoheadleftarrow","\\xtofrom","\\xrightleftarrows","\\xrightequilibrium","\\xleftequilibrium","\\\\cdrightarrow","\\\\cdleftarrow","\\\\cdlongequal"],props:{numArgs:1,numOptionalArgs:1},handler(t,e,r){var{parser:n,funcName:i}=t;return{type:"xArrow",mode:n.mode,label:i,body:e[0],below:r[0]}},htmlBuilder(t,e){var r=e.style,n=e.havingStyle(r.sup()),i=Wg(Cn(t.body,n,e),e),a=t.label.slice(0,2)==="\\x"?"x":"cd";i.classes.push(a+"-arrow-pad");var s;t.below&&(n=e.havingStyle(r.sub()),s=Wg(Cn(t.below,n,e),e),s.classes.push(a+"-arrow-pad"));var o=$k(t,e),l=-e.fontMetrics().axisHeight+.5*o.height,u=-e.fontMetrics().axisHeight-.5*o.height-.111;(i.depth>.25||t.label==="\\xleftequilibrium")&&(u-=i.depth);var h;if(s){var f=-e.fontMetrics().axisHeight+s.height+.5*o.height+.111;h=Sn({positionType:"individualShift",children:[{type:"elem",elem:i,shift:u},{type:"elem",elem:o,shift:l,wrapperClasses:["svg-align"]},{type:"elem",elem:s,shift:f}]})}else h=Sn({positionType:"individualShift",children:[{type:"elem",elem:i,shift:u},{type:"elem",elem:o,shift:l,wrapperClasses:["svg-align"]}]});return Mt(["mrel","x-arrow"],[h],e)},mathmlBuilder(t,e){var r=zk(t.label);r.setAttribute("minsize",t.label.charAt(0)==="x"?"1.75em":"3.0em");var n;if(t.body){var i=kk(Jn(t.body,e));if(t.below){var a=kk(Jn(t.below,e));n=new Pt("munderover",[r,a,i])}else n=new Pt("mover",[r,i])}else if(t.below){var s=kk(Jn(t.below,e));n=new Pt("munder",[r,s])}else n=kk(),n=new Pt("mover",[r,n]);return n}});jt({type:"mclass",names:["\\mathord","\\mathbin","\\mathrel","\\mathopen","\\mathclose","\\mathpunct","\\mathinner"],props:{numArgs:1,primitive:!0},handler(t,e){var{parser:r,funcName:n}=t,i=e[0];return{type:"mclass",mode:r.mode,mclass:"m"+n.slice(5),body:ba(i),isCharacterBox:vh(i)}},htmlBuilder:SJ,mathmlBuilder:CJ});Uk=t=>{var e=t.type==="ordgroup"&&t.body.length?t.body[0]:t;return e.type==="atom"&&(e.family==="bin"||e.family==="rel")?"m"+e.family:"mord"};jt({type:"mclass",names:["\\@binrel"],props:{numArgs:2},handler(t,e){var{parser:r}=t;return{type:"mclass",mode:r.mode,mclass:Uk(e[0]),body:ba(e[1]),isCharacterBox:vh(e[1])}}});jt({type:"mclass",names:["\\stackrel","\\overset","\\underset"],props:{numArgs:2},handler(t,e){var{parser:r,funcName:n}=t,i=e[1],a=e[0],s;n!=="\\stackrel"?s=Uk(i):s="mrel";var o={type:"op",mode:i.mode,limits:!0,alwaysHandleSupSub:!0,parentIsSupSub:!1,symbol:!1,suppressBaseShift:n!=="\\stackrel",body:ba(i)},l={type:"supsub",mode:a.mode,base:o,sup:n==="\\underset"?null:a,sub:n==="\\underset"?a:null};return{type:"mclass",mode:r.mode,mclass:s,body:[l],isCharacterBox:vh(l)}},htmlBuilder:SJ,mathmlBuilder:CJ});jt({type:"pmb",names:["\\pmb"],props:{numArgs:1,allowedInText:!0},handler(t,e){var{parser:r}=t;return{type:"pmb",mode:r.mode,mclass:Uk(e[0]),body:ba(e[0])}},htmlBuilder(t,e){var r=Pa(t.body,e,!0),n=Mt([t.mclass],r,e);return n.style.textShadow="0.02em 0.01em 0.04px",n},mathmlBuilder(t,e){var r=Sl(t.body,e),n=new Pt("mstyle",r);return n.setAttribute("style","text-shadow: 0.02em 0.01em 0.04px"),n}});_$e={">":"\\\\cdrightarrow","<":"\\\\cdleftarrow","=":"\\\\cdlongequal",A:"\\uparrow",V:"\\downarrow","|":"\\Vert",".":"no arrow"},$Q=()=>({type:"styling",body:[],mode:"math",style:"display",resetFont:!0}),GQ=t=>t.type==="textord"&&t.text==="@",A$e=(t,e)=>(t.type==="mathord"||t.type==="atom")&&t.text===e;jt({type:"cdlabel",names:["\\\\cdleft","\\\\cdright"],props:{numArgs:1},handler(t,e){var{parser:r,funcName:n}=t;return{type:"cdlabel",mode:r.mode,side:n.slice(4),label:e[0]}},htmlBuilder(t,e){var r=e.havingStyle(e.style.sup()),n=Wg(Cn(t.label,r,e),e);return n.classes.push("cd-label-"+t.side),n.style.bottom=Gt(.8-n.depth),n.height=0,n.depth=0,n},mathmlBuilder(t,e){var r=new Pt("mrow",[Jn(t.label,e)]);return r=new Pt("mpadded",[r]),r.setAttribute("width","0"),t.side==="left"&&r.setAttribute("lspace","-1width"),r.setAttribute("voffset","0.7em"),r=new Pt("mstyle",[r]),r.setAttribute("displaystyle","false"),r.setAttribute("scriptlevel","1"),r}});jt({type:"cdlabelparent",names:["\\\\cdparent"],props:{numArgs:1},handler(t,e){var{parser:r}=t;return{type:"cdlabelparent",mode:r.mode,fragment:e[0]}},htmlBuilder(t,e){var r=Wg(Cn(t.fragment,e),e);return r.classes.push("cd-vert-arrow"),r},mathmlBuilder(t,e){return new Pt("mrow",[Jn(t.fragment,e)])}});jt({type:"textord",names:["\\@char"],props:{numArgs:1,allowedInText:!0},handler(t,e){for(var{parser:r}=t,n=$r(e[0],"ordgroup"),i=n.body,a="",s=0;s=1114111)throw new Ft("\\@char with invalid code point "+a);return l<=65535?u=String.fromCharCode(l):(l-=65536,u=String.fromCharCode((l>>10)+55296,(l&1023)+56320)),{type:"textord",mode:r.mode,text:u}}});_J=(t,e)=>{var r=Pa(t.body,e.withColor(t.color),!1);return bh(r)},AJ=(t,e)=>{var r=Sl(t.body,e.withColor(t.color)),n=new Pt("mstyle",r);return n.setAttribute("mathcolor",t.color),n};jt({type:"color",names:["\\textcolor"],props:{numArgs:2,allowedInText:!0,argTypes:["color","original"]},handler(t,e){var{parser:r}=t,n=$r(e[0],"color-token").color,i=e[1];return{type:"color",mode:r.mode,color:n,body:ba(i)}},htmlBuilder:_J,mathmlBuilder:AJ});jt({type:"color",names:["\\color"],props:{numArgs:1,allowedInText:!0,argTypes:["color"]},handler(t,e){var{parser:r,breakOnTokenText:n}=t,i=$r(e[0],"color-token").color;r.gullet.macros.set("\\current@color",i);var a=r.parseExpression(!0,n);return{type:"color",mode:r.mode,color:i,body:a}},htmlBuilder:_J,mathmlBuilder:AJ});jt({type:"cr",names:["\\\\"],props:{numArgs:0,numOptionalArgs:0,allowedInText:!0},handler(t,e,r){var{parser:n}=t,i=n.gullet.future().text==="["?n.parseSizeGroup(!0):null,a=!n.settings.displayMode||!n.settings.useStrictBehavior("newLineInDisplayMode","In LaTeX, \\\\ or \\newline does nothing in display mode");return{type:"cr",mode:n.mode,newLine:a,size:i&&$r(i,"size").value}},htmlBuilder(t,e){var r=Mt(["mspace"],[],e);return t.newLine&&(r.classes.push("newline"),t.size&&(r.style.marginTop=Gt($i(t.size,e)))),r},mathmlBuilder(t,e){var r=new Pt("mspace");return t.newLine&&(r.setAttribute("linebreak","newline"),t.size&&r.setAttribute("height",Gt($i(t.size,e)))),r}});BM={"\\global":"\\global","\\long":"\\\\globallong","\\\\globallong":"\\\\globallong","\\def":"\\gdef","\\gdef":"\\gdef","\\edef":"\\xdef","\\xdef":"\\xdef","\\let":"\\\\globallet","\\futurelet":"\\\\globalfuture"},LJ=t=>{var e=t.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(e))throw new Ft("Expected a control sequence",t);return e},D$e=t=>{var e=t.gullet.popToken();return e.text==="="&&(e=t.gullet.popToken(),e.text===" "&&(e=t.gullet.popToken())),e},RJ=(t,e,r,n)=>{var i=t.gullet.macros.get(r.text);i==null&&(r.noexpand=!0,i={tokens:[r],numArgs:0,unexpandable:!t.gullet.isExpandable(r.text)}),t.gullet.macros.set(e,i,n)};jt({type:"internal",names:["\\global","\\long","\\\\globallong"],props:{numArgs:0,allowedInText:!0},handler(t){var{parser:e,funcName:r}=t;e.consumeSpaces();var n=e.fetch();if(BM[n.text])return(r==="\\global"||r==="\\\\globallong")&&(n.text=BM[n.text]),$r(e.parseFunction(),"internal");throw new Ft("Invalid token after macro prefix",n)}});jt({type:"internal",names:["\\def","\\gdef","\\edef","\\xdef"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(t){var{parser:e,funcName:r}=t,n=e.gullet.popToken(),i=n.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(i))throw new Ft("Expected a control sequence",n);for(var a=0,s,o=[[]];e.gullet.future().text!=="{";)if(n=e.gullet.popToken(),n.text==="#"){if(e.gullet.future().text==="{"){s=e.gullet.future(),o[a].push("{");break}if(n=e.gullet.popToken(),!/^[1-9]$/.test(n.text))throw new Ft('Invalid argument number "'+n.text+'"');if(parseInt(n.text)!==a+1)throw new Ft('Argument number "'+n.text+'" out of order');a++,o.push([])}else{if(n.text==="EOF")throw new Ft("Expected a macro definition");o[a].push(n.text)}var{tokens:l}=e.gullet.consumeArg();return s&&l.unshift(s),(r==="\\edef"||r==="\\xdef")&&(l=e.gullet.expandTokens(l),l.reverse()),e.gullet.macros.set(i,{tokens:l,numArgs:a,delimiters:o},r===BM[r]),{type:"internal",mode:e.mode}}});jt({type:"internal",names:["\\let","\\\\globallet"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(t){var{parser:e,funcName:r}=t,n=LJ(e.gullet.popToken());e.gullet.consumeSpaces();var i=D$e(e);return RJ(e,n,i,r==="\\\\globallet"),{type:"internal",mode:e.mode}}});jt({type:"internal",names:["\\futurelet","\\\\globalfuture"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(t){var{parser:e,funcName:r}=t,n=LJ(e.gullet.popToken()),i=e.gullet.popToken(),a=e.gullet.popToken();return RJ(e,n,a,r==="\\\\globalfuture"),e.gullet.pushToken(a),e.gullet.pushToken(i),{type:"internal",mode:e.mode}}});$b=function(e,r,n){var i=Ei.math[e]&&Ei.math[e].replace,a=WM(i||e,r,n);if(!a)throw new Error("Unsupported symbol "+e+" and font size "+r+".");return a},QM=function(e,r,n,i){var a=n.havingBaseStyle(r),s=Mt(i.concat(a.sizingClasses(n)),[e],n),o=a.sizeMultiplier/n.sizeMultiplier;return s.height*=o,s.depth*=o,s.maxFontSize=a.sizeMultiplier,s},DJ=function(e,r,n){var i=r.havingBaseStyle(n),a=(1-r.sizeMultiplier/i.sizeMultiplier)*r.fontMetrics().axisHeight;e.classes.push("delimcenter"),e.style.top=Gt(a),e.height-=a,e.depth+=a},I$e=function(e,r,n,i,a,s){var o=ao(e,"Main-Regular",a,i),l=QM(o,r,i,s);return n&&DJ(l,i,r),l},M$e=function(e,r,n,i){return ao(e,"Size"+r+"-Regular",n,i)},IJ=function(e,r,n,i,a,s){var o=M$e(e,r,a,i),l=QM(Mt(["delimsizing","size"+r],[o],i),Rr.TEXT,i,s);return n&&DJ(l,i,Rr.TEXT),l},pM=function(e,r,n){var i;r==="Size1-Regular"?i="delim-size1":i="delim-size4";var a=Mt(["delimsizinginner",i],[Mt([],[ao(e,r,n)])]);return{type:"elem",elem:a}},mM=function(e,r,n){var i=Gc["Size4-Regular"][e.charCodeAt(0)]?Gc["Size4-Regular"][e.charCodeAt(0)][4]:Gc["Size1-Regular"][e.charCodeAt(0)][4],a=new qc("inner",Hze(e,Math.round(1e3*r))),s=new qu([a],{width:Gt(i),height:Gt(r),style:"width:"+Gt(i),viewBox:"0 0 "+1e3*i+" "+Math.round(1e3*r),preserveAspectRatio:"xMinYMin"}),o=qf([],[s],n);return o.height=r,o.style.height=Gt(r),o.style.width=Gt(i),{type:"elem",elem:o}},FM=.008,Tk={type:"kern",size:-1*FM},N$e=new Set(["|","\\lvert","\\rvert","\\vert"]),O$e=new Set(["\\|","\\lVert","\\rVert","\\Vert"]),MJ=function(e,r,n,i,a,s){var o,l,u,h,f="",d=0;o=u=h=e,l=null;var p="Size1-Regular";e==="\\uparrow"?u=h="\u23D0":e==="\\Uparrow"?u=h="\u2016":e==="\\downarrow"?o=u="\u23D0":e==="\\Downarrow"?o=u="\u2016":e==="\\updownarrow"?(o="\\uparrow",u="\u23D0",h="\\downarrow"):e==="\\Updownarrow"?(o="\\Uparrow",u="\u2016",h="\\Downarrow"):N$e.has(e)?(u="\u2223",f="vert",d=333):O$e.has(e)?(u="\u2225",f="doublevert",d=556):e==="["||e==="\\lbrack"?(o="\u23A1",u="\u23A2",h="\u23A3",p="Size4-Regular",f="lbrack",d=667):e==="]"||e==="\\rbrack"?(o="\u23A4",u="\u23A5",h="\u23A6",p="Size4-Regular",f="rbrack",d=667):e==="\\lfloor"||e==="\u230A"?(u=o="\u23A2",h="\u23A3",p="Size4-Regular",f="lfloor",d=667):e==="\\lceil"||e==="\u2308"?(o="\u23A1",u=h="\u23A2",p="Size4-Regular",f="lceil",d=667):e==="\\rfloor"||e==="\u230B"?(u=o="\u23A5",h="\u23A6",p="Size4-Regular",f="rfloor",d=667):e==="\\rceil"||e==="\u2309"?(o="\u23A4",u=h="\u23A5",p="Size4-Regular",f="rceil",d=667):e==="("||e==="\\lparen"?(o="\u239B",u="\u239C",h="\u239D",p="Size4-Regular",f="lparen",d=875):e===")"||e==="\\rparen"?(o="\u239E",u="\u239F",h="\u23A0",p="Size4-Regular",f="rparen",d=875):e==="\\{"||e==="\\lbrace"?(o="\u23A7",l="\u23A8",h="\u23A9",u="\u23AA",p="Size4-Regular"):e==="\\}"||e==="\\rbrace"?(o="\u23AB",l="\u23AC",h="\u23AD",u="\u23AA",p="Size4-Regular"):e==="\\lgroup"||e==="\u27EE"?(o="\u23A7",h="\u23A9",u="\u23AA",p="Size4-Regular"):e==="\\rgroup"||e==="\u27EF"?(o="\u23AB",h="\u23AD",u="\u23AA",p="Size4-Regular"):e==="\\lmoustache"||e==="\u23B0"?(o="\u23A7",h="\u23AD",u="\u23AA",p="Size4-Regular"):(e==="\\rmoustache"||e==="\u23B1")&&(o="\u23AB",h="\u23A9",u="\u23AA",p="Size4-Regular");var m=$b(o,p,a),g=m.height+m.depth,y=$b(u,p,a),v=y.height+y.depth,x=$b(h,p,a),k=x.height+x.depth,_=0,T=1;if(l!==null){var S=$b(l,p,a);_=S.height+S.depth,T=2}var R=g+k+_,A=Math.max(0,Math.ceil((r-R)/(T*v))),I=R+A*T*v,P=i.fontMetrics().axisHeight;n&&(P*=i.sizeMultiplier);var O=I/2-P,C=[];if(f.length>0){var N=I-g-k,B=Math.round(I*1e3),F=Vze(f,Math.round(N*1e3)),M=new qc(f,F),$=Gt(d/1e3),z=Gt(B/1e3),q=new qu([M],{width:$,height:z,viewBox:"0 0 "+d+" "+B}),V=qf([],[q],i);V.height=B/1e3,V.style.width=$,V.style.height=z,C.push({type:"elem",elem:V})}else{if(C.push(pM(h,p,a)),C.push(Tk),l===null){var U=I-g-k+2*FM;C.push(mM(u,U,i))}else{var J=(I-g-k-_)/2+2*FM;C.push(mM(u,J,i)),C.push(Tk),C.push(pM(l,p,a)),C.push(Tk),C.push(mM(u,J,i))}C.push(Tk),C.push(pM(o,p,a))}var se=i.havingBaseStyle(Rr.TEXT),re=Sn({positionType:"bottom",positionData:O,children:C});return QM(Mt(["delimsizing","mult"],[re],se),Rr.TEXT,i,s)},gM=80,yM=.08,vM=function(e,r,n,i,a){var s=Uze(e,i,n),o=new qc(e,s),l=new qu([o],{width:"400em",height:Gt(r),viewBox:"0 0 400000 "+n,preserveAspectRatio:"xMinYMin slice"});return qf(["hide-tail"],[l],a)},P$e=function(e,r){var n=r.havingBaseSizing(),i=FJ("\\surd",e*n.sizeMultiplier,BJ,n),a=n.sizeMultiplier,s=Math.max(0,r.minRuleThickness-r.fontMetrics().sqrtRuleThickness),o,l,u,h,f;return i.type==="small"?(h=1e3+1e3*s+gM,e<1?a=1:e<1.4&&(a=.7),l=(1+s+yM)/a,u=(1+s)/a,o=vM("sqrtMain",l,h,s,r),o.style.minWidth="0.853em",f=.833/a):i.type==="large"?(h=(1e3+gM)*Gb[i.size],u=(Gb[i.size]+s)/a,l=(Gb[i.size]+s+yM)/a,o=vM("sqrtSize"+i.size,l,h,s,r),o.style.minWidth="1.02em",f=1/a):(l=e+s+yM,u=e+s,h=Math.floor(1e3*e+s)+gM,o=vM("sqrtTall",l,h,s,r),o.style.minWidth="0.742em",f=1.056),o.height=u,o.style.height=Gt(l),{span:o,advanceWidth:f,ruleWidth:(r.fontMetrics().sqrtRuleThickness+s)*a}},NJ=new Set(["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","\u230A","\u230B","\\lceil","\\rceil","\u2308","\u2309","\\surd"]),B$e=new Set(["\\uparrow","\\downarrow","\\updownarrow","\\Uparrow","\\Downarrow","\\Updownarrow","|","\\|","\\vert","\\Vert","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","\u27EE","\u27EF","\\lmoustache","\\rmoustache","\u23B0","\u23B1"]),OJ=new Set(["<",">","\\langle","\\rangle","/","\\backslash","\\lt","\\gt"]),Gb=[0,1.2,1.8,2.4,3],PJ=function(e,r,n,i,a){if(e==="<"||e==="\\lt"||e==="\u27E8"?e="\\langle":(e===">"||e==="\\gt"||e==="\u27E9")&&(e="\\rangle"),NJ.has(e)||OJ.has(e))return IJ(e,r,!1,n,i,a);if(B$e.has(e))return MJ(e,Gb[r],!1,n,i,a);throw new Ft("Illegal delimiter: '"+e+"'")},F$e=[{type:"small",style:Rr.SCRIPTSCRIPT},{type:"small",style:Rr.SCRIPT},{type:"small",style:Rr.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4}],z$e=[{type:"small",style:Rr.SCRIPTSCRIPT},{type:"small",style:Rr.SCRIPT},{type:"small",style:Rr.TEXT},{type:"stack"}],BJ=[{type:"small",style:Rr.SCRIPTSCRIPT},{type:"small",style:Rr.SCRIPT},{type:"small",style:Rr.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4},{type:"stack"}],$$e=function(e){if(e.type==="small")return"Main-Regular";if(e.type==="large")return"Size"+e.size+"-Regular";if(e.type==="stack")return"Size4-Regular";var r=e.type;throw new Error("Add support for delim type '"+r+"' here.")},FJ=function(e,r,n,i){for(var a=Math.min(2,3-i.style.size),s=a;sr)return o}return n[n.length-1]},zM=function(e,r,n,i,a,s){e==="<"||e==="\\lt"||e==="\u27E8"?e="\\langle":(e===">"||e==="\\gt"||e==="\u27E9")&&(e="\\rangle");var o;OJ.has(e)?o=F$e:NJ.has(e)?o=BJ:o=z$e;var l=FJ(e,r,o,i);return l.type==="small"?I$e(e,l.style,n,i,a,s):l.type==="large"?IJ(e,l.size,n,i,a,s):MJ(e,r,n,i,a,s)},xM=function(e,r,n,i,a,s){var o=i.fontMetrics().axisHeight*i.sizeMultiplier,l=901,u=5/i.fontMetrics().ptPerEm,h=Math.max(r-o,n+o),f=Math.max(h/500*l,2*h-u);return zM(e,f,!0,i,a,s)},qQ={"\\bigl":{mclass:"mopen",size:1},"\\Bigl":{mclass:"mopen",size:2},"\\biggl":{mclass:"mopen",size:3},"\\Biggl":{mclass:"mopen",size:4},"\\bigr":{mclass:"mclose",size:1},"\\Bigr":{mclass:"mclose",size:2},"\\biggr":{mclass:"mclose",size:3},"\\Biggr":{mclass:"mclose",size:4},"\\bigm":{mclass:"mrel",size:1},"\\Bigm":{mclass:"mrel",size:2},"\\biggm":{mclass:"mrel",size:3},"\\Biggm":{mclass:"mrel",size:4},"\\big":{mclass:"mord",size:1},"\\Big":{mclass:"mord",size:2},"\\bigg":{mclass:"mord",size:3},"\\Bigg":{mclass:"mord",size:4}},G$e=new Set(["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","\u230A","\u230B","\\lceil","\\rceil","\u2308","\u2309","<",">","\\langle","\u27E8","\\rangle","\u27E9","\\lt","\\gt","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","\u27EE","\u27EF","\\lmoustache","\\rmoustache","\u23B0","\u23B1","/","\\backslash","|","\\vert","\\|","\\Vert","\\uparrow","\\Uparrow","\\downarrow","\\Downarrow","\\updownarrow","\\Updownarrow","."]);jt({type:"delimsizing",names:["\\bigl","\\Bigl","\\biggl","\\Biggl","\\bigr","\\Bigr","\\biggr","\\Biggr","\\bigm","\\Bigm","\\biggm","\\Biggm","\\big","\\Big","\\bigg","\\Bigg"],props:{numArgs:1,argTypes:["primitive"]},handler:(t,e)=>{var r=Hk(e[0],t);return{type:"delimsizing",mode:t.parser.mode,size:qQ[t.funcName].size,mclass:qQ[t.funcName].mclass,delim:r.text}},htmlBuilder:(t,e)=>t.delim==="."?Mt([t.mclass]):PJ(t.delim,t.size,e,t.mode,[t.mclass]),mathmlBuilder:t=>{var e=[];t.delim!=="."&&e.push(tu(t.delim,t.mode));var r=new Pt("mo",e);t.mclass==="mopen"||t.mclass==="mclose"?r.setAttribute("fence","true"):r.setAttribute("fence","false"),r.setAttribute("stretchy","true");var n=Gt(Gb[t.size]);return r.setAttribute("minsize",n),r.setAttribute("maxsize",n),r}});jt({type:"leftright-right",names:["\\right"],props:{numArgs:1,primitive:!0},handler:(t,e)=>{var r=t.parser.gullet.macros.get("\\current@color");if(r&&typeof r!="string")throw new Ft("\\current@color set to non-string in \\right");return{type:"leftright-right",mode:t.parser.mode,delim:Hk(e[0],t).text,color:r}}});jt({type:"leftright",names:["\\left"],props:{numArgs:1,primitive:!0},handler:(t,e)=>{var r=Hk(e[0],t),n=t.parser;++n.leftrightDepth;var i=n.parseExpression(!1);--n.leftrightDepth,n.expect("\\right",!1);var a=$r(n.parseFunction(),"leftright-right");return{type:"leftright",mode:n.mode,body:i,left:r.text,right:a.delim,rightColor:a.color}},htmlBuilder:(t,e)=>{HQ(t);for(var r=Pa(t.body,e,!0,["mopen","mclose"]),n=0,i=0,a=!1,s=0;s{HQ(t);var r=Sl(t.body,e);if(t.left!=="."){var n=new Pt("mo",[tu(t.left,t.mode)]);n.setAttribute("fence","true"),r.unshift(n)}if(t.right!=="."){var i=new Pt("mo",[tu(t.right,t.mode)]);i.setAttribute("fence","true"),t.rightColor&&i.setAttribute("mathcolor",t.rightColor),r.push(i)}return jM(r)}});jt({type:"middle",names:["\\middle"],props:{numArgs:1,primitive:!0},handler:(t,e)=>{var r=Hk(e[0],t);if(!t.parser.leftrightDepth)throw new Ft("\\middle without preceding \\left",r);return{type:"middle",mode:t.parser.mode,delim:r.text}},htmlBuilder:(t,e)=>{var r;return t.delim==="."?r=Vb(e,[]):(r=PJ(t.delim,1,e,t.mode,[]),r.isMiddle={delim:t.delim,options:e}),r},mathmlBuilder:(t,e)=>{var r=t.delim==="\\vert"||t.delim==="|"?tu("|","text"):tu(t.delim,t.mode),n=new Pt("mo",[r]);return n.setAttribute("fence","true"),n.setAttribute("lspace","0.05em"),n.setAttribute("rspace","0.05em"),n}});Vk=(t,e)=>{var r=Wg(Cn(t.body,e),e),n=t.label.slice(1),i=e.sizeMultiplier,a,s,o=vh(t.body);if(n==="sout")a=Mt(["stretchy","sout"]),a.height=e.fontMetrics().defaultRuleThickness/i,s=-.5*e.fontMetrics().xHeight;else if(n==="phase"){var l=$i({number:.6,unit:"pt"},e),u=$i({number:.35,unit:"ex"},e),h=e.havingBaseSizing();i=i/h.sizeMultiplier;var f=r.height+r.depth+l+u;r.style.paddingLeft=Gt(f/2+l);var d=Math.floor(1e3*f*i),p=Gze(d),m=new qu([new qc("phase",p)],{width:"400em",height:Gt(d/1e3),viewBox:"0 0 400000 "+d,preserveAspectRatio:"xMinYMin slice"});a=qf(["hide-tail"],[m],e),a.style.height=Gt(f),s=r.depth+l+u}else{/cancel/.test(n)?o||r.classes.push("cancel-pad"):n==="angl"?r.classes.push("anglpad"):r.classes.push("boxpad");var g,y,v=0;/box/.test(n)?(v=Math.max(e.fontMetrics().fboxrule,e.minRuleThickness),g=e.fontMetrics().fboxsep+(n==="colorbox"?0:v),y=g):n==="angl"?(v=Math.max(e.fontMetrics().defaultRuleThickness,e.minRuleThickness),g=4*v,y=Math.max(0,.25-r.depth)):(g=o?.2:0,y=g),a=k$e(r,n,g,y,e),/fbox|boxed|fcolorbox/.test(n)?(a.style.borderStyle="solid",a.style.borderWidth=Gt(v)):n==="angl"&&v!==.049&&(a.style.borderTopWidth=Gt(v),a.style.borderRightWidth=Gt(v)),s=r.depth+y,t.backgroundColor&&(a.style.backgroundColor=t.backgroundColor,t.borderColor&&(a.style.borderColor=t.borderColor))}var x;if(t.backgroundColor)x=Sn({positionType:"individualShift",children:[{type:"elem",elem:a,shift:s},{type:"elem",elem:r,shift:0}]});else{var k=/cancel|phase/.test(n)?["svg-align"]:[];x=Sn({positionType:"individualShift",children:[{type:"elem",elem:r,shift:0},{type:"elem",elem:a,shift:s,wrapperClasses:k}]})}return/cancel/.test(n)&&(x.height=r.height,x.depth=r.depth),/cancel/.test(n)&&!o?Mt(["mord","cancel-lap"],[x],e):Mt(["mord"],[x],e)},Wk=(t,e)=>{var r,n=new Pt(t.label.includes("colorbox")?"mpadded":"menclose",[Jn(t.body,e)]);switch(t.label){case"\\cancel":n.setAttribute("notation","updiagonalstrike");break;case"\\bcancel":n.setAttribute("notation","downdiagonalstrike");break;case"\\phase":n.setAttribute("notation","phasorangle");break;case"\\sout":n.setAttribute("notation","horizontalstrike");break;case"\\fbox":n.setAttribute("notation","box");break;case"\\angl":n.setAttribute("notation","actuarial");break;case"\\fcolorbox":case"\\colorbox":if(r=e.fontMetrics().fboxsep*e.fontMetrics().ptPerEm,n.setAttribute("width","+"+2*r+"pt"),n.setAttribute("height","+"+2*r+"pt"),n.setAttribute("lspace",r+"pt"),n.setAttribute("voffset",r+"pt"),t.label==="\\fcolorbox"){var i=Math.max(e.fontMetrics().fboxrule,e.minRuleThickness);n.setAttribute("style","border: "+Gt(i)+" solid "+t.borderColor)}break;case"\\xcancel":n.setAttribute("notation","updiagonalstrike downdiagonalstrike");break}return t.backgroundColor&&n.setAttribute("mathbackground",t.backgroundColor),n};jt({type:"enclose",names:["\\colorbox"],props:{numArgs:2,allowedInText:!0,argTypes:["color","hbox"]},handler(t,e,r){var{parser:n,funcName:i}=t,a=$r(e[0],"color-token").color,s=e[1];return{type:"enclose",mode:n.mode,label:i,backgroundColor:a,body:s}},htmlBuilder:Vk,mathmlBuilder:Wk});jt({type:"enclose",names:["\\fcolorbox"],props:{numArgs:3,allowedInText:!0,argTypes:["color","color","hbox"]},handler(t,e,r){var{parser:n,funcName:i}=t,a=$r(e[0],"color-token").color,s=$r(e[1],"color-token").color,o=e[2];return{type:"enclose",mode:n.mode,label:i,backgroundColor:s,borderColor:a,body:o}},htmlBuilder:Vk,mathmlBuilder:Wk});jt({type:"enclose",names:["\\fbox"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!0},handler(t,e){var{parser:r}=t;return{type:"enclose",mode:r.mode,label:"\\fbox",body:e[0]}}});jt({type:"enclose",names:["\\cancel","\\bcancel","\\xcancel","\\phase"],props:{numArgs:1},handler(t,e){var{parser:r,funcName:n}=t,i=e[0];return{type:"enclose",mode:r.mode,label:n,body:i}},htmlBuilder:Vk,mathmlBuilder:Wk});jt({type:"enclose",names:["\\sout"],props:{numArgs:1,allowedInText:!0},handler(t,e){var{parser:r,funcName:n}=t;r.mode==="math"&&r.settings.reportNonstrict("mathVsSout","LaTeX's \\sout works only in text mode");var i=e[0];return{type:"enclose",mode:r.mode,label:n,body:i}},htmlBuilder:Vk,mathmlBuilder:Wk});jt({type:"enclose",names:["\\angl"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!1},handler(t,e){var{parser:r}=t;return{type:"enclose",mode:r.mode,label:"\\angl",body:e[0]}}});zJ={};$J={};Uo=class t{constructor(e,r,n){this.lexer=void 0,this.start=void 0,this.end=void 0,this.lexer=e,this.start=r,this.end=n}static range(e,r){return r?!e||!e.loc||!r.loc||e.loc.lexer!==r.loc.lexer?null:new t(e.loc.lexer,e.loc.start,r.loc.end):e&&e.loc}},Tl=class t{constructor(e,r){this.text=void 0,this.loc=void 0,this.noexpand=void 0,this.treatAsRelax=void 0,this.text=e,this.loc=r}range(e,r){return new t(r,Uo.range(this,e))}};Yk=t=>{var e=t.parser.settings;if(!e.displayMode)throw new Ft("{"+t.envName+"} can be used only in display mode.")},q$e=new Set(["gather","gather*"]);Hc=function(e,r){var n,i,a=e.body.length,s=e.hLinesBeforeRow,o=0,l=new Array(a),u=[],h=Math.max(r.fontMetrics().arrayRuleWidth,r.minRuleThickness),f=1/r.fontMetrics().ptPerEm,d=5*f;if(e.colSeparationType&&e.colSeparationType==="small"){var p=r.havingStyle(Rr.SCRIPT).sizeMultiplier;d=.2778*(p/r.sizeMultiplier)}var m=e.colSeparationType==="CD"?$i({number:3,unit:"ex"},r):12*f,g=3*f,y=e.arraystretch*m,v=.7*y,x=.3*y,k=0;function _(Ve){for(var ke=0;ke0&&(k+=.25),u.push({pos:k,isDashed:Ve[ke]})}for(_(s[0]),n=0;n0&&(O+=x,RVe))for(n=0;n=o)){var ue=void 0;if(i>0||e.hskipBeforeAndAfter){var ie,le;ue=(ie=(le=se)==null?void 0:le.pregap)!=null?ie:d,ue!==0&&(F=Mt(["arraycolsep"],[]),F.style.width=Gt(ue),B.push(F))}var oe=[];for(n=0;n0){for(var Ye=Vg("hline",r,h),Ge=Vg("hdashline",r,h),rt=[{type:"elem",elem:Ae,shift:0}];u.length>0;){var Xe=u.pop(),Ze=Xe.pos-C;Xe.isDashed?rt.push({type:"elem",elem:Ge,shift:Ze}):rt.push({type:"elem",elem:Ye,shift:Ze})}Ae=Sn({positionType:"individualShift",children:rt})}if($.length===0)return Mt(["mord"],[Ae],r);var Pe=Sn({positionType:"individualShift",children:$}),Re=Mt(["tag"],[Pe],r);return bh([Ae,Re])},U$e={c:"center ",l:"left ",r:"right "},Vc=function(e,r){for(var n=[],i=new Pt("mtd",[],["mtr-glue"]),a=new Pt("mtd",[],["mml-eqn-num"]),s=0;s0){var m=e.cols,g="",y=!1,v=0,x=m.length;m[0].type==="separator"&&(d+="top ",v=1),m[m.length-1].type==="separator"&&(d+="bottom ",x-=1);for(var k=v;k0?"left ":"",d+=I[I.length-1].length>0?"right ":"";for(var P=1;P0&&p&&(y=1),n[m]={type:"align",align:g,pregap:y,postgap:0}}return s.colSeparationType=p?"align":"alignat",s};Uc({type:"array",names:["array","darray"],props:{numArgs:1},handler(t,e){var r=qk(e[0]),n=r?[e[0]]:$r(e[0],"ordgroup").body,i=n.map(function(s){var o=Gk(s),l=o.text;if("lcr".includes(l))return{type:"align",align:l};if(l==="|")return{type:"separator",separator:"|"};if(l===":")return{type:"separator",separator:":"};throw new Ft("Unknown column alignment: "+l,s)}),a={cols:i,hskipBeforeAndAfter:!0,maxNumCols:i.length};return Hf(t.parser,a,eN(t.envName))},htmlBuilder:Hc,mathmlBuilder:Vc});Uc({type:"array",names:["matrix","pmatrix","bmatrix","Bmatrix","vmatrix","Vmatrix","matrix*","pmatrix*","bmatrix*","Bmatrix*","vmatrix*","Vmatrix*"],props:{numArgs:0},handler(t){var e={matrix:null,pmatrix:["(",")"],bmatrix:["[","]"],Bmatrix:["\\{","\\}"],vmatrix:["|","|"],Vmatrix:["\\Vert","\\Vert"]}[t.envName.replace("*","")],r="c",n={hskipBeforeAndAfter:!1,cols:[{type:"align",align:r}]};if(t.envName.charAt(t.envName.length-1)==="*"){var i=t.parser;if(i.consumeSpaces(),i.fetch().text==="["){if(i.consume(),i.consumeSpaces(),r=i.fetch().text,!"lcr".includes(r))throw new Ft("Expected l or c or r",i.nextToken);i.consume(),i.consumeSpaces(),i.expect("]"),i.consume(),n.cols=[{type:"align",align:r}]}}var a=Hf(t.parser,n,eN(t.envName)),s=Math.max(0,...a.body.map(o=>o.length));return a.cols=new Array(s).fill({type:"align",align:r}),e?{type:"leftright",mode:t.mode,body:[a],left:e[0],right:e[1],rightColor:void 0}:a},htmlBuilder:Hc,mathmlBuilder:Vc});Uc({type:"array",names:["smallmatrix"],props:{numArgs:0},handler(t){var e={arraystretch:.5},r=Hf(t.parser,e,"script");return r.colSeparationType="small",r},htmlBuilder:Hc,mathmlBuilder:Vc});Uc({type:"array",names:["subarray"],props:{numArgs:1},handler(t,e){var r=qk(e[0]),n=r?[e[0]]:$r(e[0],"ordgroup").body,i=n.map(function(o){var l=Gk(o),u=l.text;if("lc".includes(u))return{type:"align",align:u};throw new Ft("Unknown column alignment: "+u,o)});if(i.length>1)throw new Ft("{subarray} can contain only one column");var a={cols:i,hskipBeforeAndAfter:!1,arraystretch:.5},s=Hf(t.parser,a,"script");if(s.body.length>0&&s.body[0].length>1)throw new Ft("{subarray} can contain only one column");return s},htmlBuilder:Hc,mathmlBuilder:Vc});Uc({type:"array",names:["cases","dcases","rcases","drcases"],props:{numArgs:0},handler(t){var e={arraystretch:1.2,cols:[{type:"align",align:"l",pregap:0,postgap:1},{type:"align",align:"l",pregap:0,postgap:0}]},r=Hf(t.parser,e,eN(t.envName));return{type:"leftright",mode:t.mode,body:[r],left:t.envName.includes("r")?".":"\\{",right:t.envName.includes("r")?"\\}":".",rightColor:void 0}},htmlBuilder:Hc,mathmlBuilder:Vc});Uc({type:"array",names:["align","align*","aligned","split"],props:{numArgs:0},handler:GJ,htmlBuilder:Hc,mathmlBuilder:Vc});Uc({type:"array",names:["gathered","gather","gather*"],props:{numArgs:0},handler(t){q$e.has(t.envName)&&Yk(t);var e={cols:[{type:"align",align:"c"}],addJot:!0,colSeparationType:"gather",autoTag:JM(t.envName),emptySingleRow:!0,leqno:t.parser.settings.leqno};return Hf(t.parser,e,"display")},htmlBuilder:Hc,mathmlBuilder:Vc});Uc({type:"array",names:["alignat","alignat*","alignedat"],props:{numArgs:1},handler:GJ,htmlBuilder:Hc,mathmlBuilder:Vc});Uc({type:"array",names:["equation","equation*"],props:{numArgs:0},handler(t){Yk(t);var e={autoTag:JM(t.envName),emptySingleRow:!0,singleRow:!0,maxNumCols:1,leqno:t.parser.settings.leqno};return Hf(t.parser,e,"display")},htmlBuilder:Hc,mathmlBuilder:Vc});Uc({type:"array",names:["CD"],props:{numArgs:0},handler(t){return Yk(t),R$e(t.parser)},htmlBuilder:Hc,mathmlBuilder:Vc});Se("\\nonumber","\\gdef\\@eqnsw{0}");Se("\\notag","\\nonumber");jt({type:"text",names:["\\hline","\\hdashline"],props:{numArgs:0,allowedInText:!0,allowedInMath:!0},handler(t,e){throw new Ft(t.funcName+" valid only within array environment")}});WQ=zJ;jt({type:"environment",names:["\\begin","\\end"],props:{numArgs:1,argTypes:["text"]},handler(t,e){var{parser:r,funcName:n}=t,i=e[0];if(i.type!=="ordgroup")throw new Ft("Invalid environment name",i);for(var a="",s=0;s{var r=t.font,n=e.withFont(r);return Cn(t.body,n)},UJ=(t,e)=>{var r=t.font,n=e.withFont(r);return Jn(t.body,n)},YQ={"\\Bbb":"\\mathbb","\\bold":"\\mathbf","\\frak":"\\mathfrak"};jt({type:"font",names:["\\mathrm","\\mathit","\\mathbf","\\mathnormal","\\mathsfit","\\mathbb","\\mathcal","\\mathfrak","\\mathscr","\\mathsf","\\mathtt","\\Bbb","\\bold","\\frak"],props:{numArgs:1,allowedInArgument:!0},handler:(t,e)=>{var{parser:r,funcName:n}=t,i=Ik(e[0]),a=n;return a in YQ&&(a=YQ[a]),{type:"font",mode:r.mode,font:a.slice(1),body:i}},htmlBuilder:qJ,mathmlBuilder:UJ});jt({type:"mclass",names:["\\boldsymbol","\\bm"],props:{numArgs:1},handler:(t,e)=>{var{parser:r}=t,n=e[0];return{type:"mclass",mode:r.mode,mclass:Uk(n),body:[{type:"font",mode:r.mode,font:"boldsymbol",body:n}],isCharacterBox:vh(n)}}});jt({type:"font",names:["\\rm","\\sf","\\tt","\\bf","\\it","\\cal"],props:{numArgs:0,allowedInText:!0},handler:(t,e)=>{var{parser:r,funcName:n,breakOnTokenText:i}=t,{mode:a}=r,s=r.parseExpression(!0,i);return{type:"font",mode:a,font:"math"+n.slice(1),body:{type:"ordgroup",mode:r.mode,body:s}}},htmlBuilder:qJ,mathmlBuilder:UJ});H$e=(t,e)=>{var r=e.style,n=r.fracNum(),i=r.fracDen(),a;a=e.havingStyle(n);var s=Cn(t.numer,a,e);if(t.continued){var o=8.5/e.fontMetrics().ptPerEm,l=3.5/e.fontMetrics().ptPerEm;s.height=s.height0?m=3*d:m=7*d,g=e.fontMetrics().denom1):(f>0?(p=e.fontMetrics().num2,m=d):(p=e.fontMetrics().num3,m=3*d),g=e.fontMetrics().denom2);var y;if(h){var x=e.fontMetrics().axisHeight;p-s.depth-(x+.5*f){var r=new Pt("mfrac",[Jn(t.numer,e),Jn(t.denom,e)]);if(!t.hasBarLine)r.setAttribute("linethickness","0px");else if(t.barSize){var n=$i(t.barSize,e);r.setAttribute("linethickness",Gt(n))}if(t.leftDelim!=null||t.rightDelim!=null){var i=[];if(t.leftDelim!=null){var a=new Pt("mo",[new Yi(t.leftDelim.replace("\\",""))]);a.setAttribute("fence","true"),i.push(a)}if(i.push(r),t.rightDelim!=null){var s=new Pt("mo",[new Yi(t.rightDelim.replace("\\",""))]);s.setAttribute("fence","true"),i.push(s)}return jM(i)}return r},HJ=(t,e)=>{if(!e)return t;var r={type:"styling",mode:t.mode,style:e,body:[t]};return r};jt({type:"genfrac",names:["\\cfrac","\\dfrac","\\frac","\\tfrac","\\dbinom","\\binom","\\tbinom","\\\\atopfrac","\\\\bracefrac","\\\\brackfrac"],props:{numArgs:2,allowedInArgument:!0},handler:(t,e)=>{var{parser:r,funcName:n}=t,i=e[0],a=e[1],s,o=null,l=null;switch(n){case"\\cfrac":case"\\dfrac":case"\\frac":case"\\tfrac":s=!0;break;case"\\\\atopfrac":s=!1;break;case"\\dbinom":case"\\binom":case"\\tbinom":s=!1,o="(",l=")";break;case"\\\\bracefrac":s=!1,o="\\{",l="\\}";break;case"\\\\brackfrac":s=!1,o="[",l="]";break;default:throw new Error("Unrecognized genfrac command")}var u=n==="\\cfrac",h=null;return u||n.startsWith("\\d")?h="display":n.startsWith("\\t")&&(h="text"),HJ({type:"genfrac",mode:r.mode,numer:i,denom:a,continued:u,hasBarLine:s,leftDelim:o,rightDelim:l,barSize:null},h)},htmlBuilder:H$e,mathmlBuilder:V$e});jt({type:"infix",names:["\\over","\\choose","\\atop","\\brace","\\brack"],props:{numArgs:0,infix:!0},handler(t){var{parser:e,funcName:r,token:n}=t,i;switch(r){case"\\over":i="\\frac";break;case"\\choose":i="\\binom";break;case"\\atop":i="\\\\atopfrac";break;case"\\brace":i="\\\\bracefrac";break;case"\\brack":i="\\\\brackfrac";break;default:throw new Error("Unrecognized infix genfrac command")}return{type:"infix",mode:e.mode,replaceWith:i,token:n}}});XQ=["display","text","script","scriptscript"],jQ=function(e){var r=null;return e.length>0&&(r=e,r=r==="."?null:r),r};jt({type:"genfrac",names:["\\genfrac"],props:{numArgs:6,allowedInArgument:!0,argTypes:["math","math","size","text","math","math"]},handler(t,e){var{parser:r}=t,n=e[4],i=e[5],a=Ik(e[0]),s=a.type==="atom"&&a.family==="open"?jQ(a.text):null,o=Ik(e[1]),l=o.type==="atom"&&o.family==="close"?jQ(o.text):null,u=$r(e[2],"size"),h,f=null;u.isBlank?h=!0:(f=u.value,h=f.number>0);var d=null,p=e[3];if(p.type==="ordgroup"){if(p.body.length>0){var m=$r(p.body[0],"textord");d=XQ[Number(m.text)]}}else p=$r(p,"textord"),d=XQ[Number(p.text)];return HJ({type:"genfrac",mode:r.mode,numer:n,denom:i,continued:!1,hasBarLine:h,barSize:f,leftDelim:s,rightDelim:l},d)}});jt({type:"infix",names:["\\above"],props:{numArgs:1,argTypes:["size"],infix:!0},handler(t,e){var{parser:r,funcName:n,token:i}=t;return{type:"infix",mode:r.mode,replaceWith:"\\\\abovefrac",size:$r(e[0],"size").value,token:i}}});jt({type:"genfrac",names:["\\\\abovefrac"],props:{numArgs:3,argTypes:["math","size","math"]},handler:(t,e)=>{var{parser:r,funcName:n}=t,i=e[0],a=$r(e[1],"infix").size;if(!a)throw new Error("\\\\abovefrac expected size, but got "+String(a));var s=e[2],o=a.number>0;return{type:"genfrac",mode:r.mode,numer:i,denom:s,continued:!1,hasBarLine:o,barSize:a,leftDelim:null,rightDelim:null}}});VJ=(t,e)=>{var r=e.style,n,i;t.type==="supsub"?(n=t.sup?Cn(t.sup,e.havingStyle(r.sup()),e):Cn(t.sub,e.havingStyle(r.sub()),e),i=$r(t.base,"horizBrace")):i=$r(t,"horizBrace");var a=Cn(i.base,e.havingBaseStyle(Rr.DISPLAY)),s=$k(i,e),o;if(i.isOver?o=Sn({positionType:"firstBaseline",children:[{type:"elem",elem:a},{type:"kern",size:.1},{type:"elem",elem:s,wrapperClasses:["svg-align"]}]}):o=Sn({positionType:"bottom",positionData:a.depth+.1+s.height,children:[{type:"elem",elem:s,wrapperClasses:["svg-align"]},{type:"kern",size:.1},{type:"elem",elem:a}]}),n){var l=Mt(["minner",i.isOver?"mover":"munder"],[o],e);i.isOver?o=Sn({positionType:"firstBaseline",children:[{type:"elem",elem:l},{type:"kern",size:.2},{type:"elem",elem:n}]}):o=Sn({positionType:"bottom",positionData:l.depth+.2+n.height+n.depth,children:[{type:"elem",elem:n},{type:"kern",size:.2},{type:"elem",elem:l}]})}return Mt(["minner",i.isOver?"mover":"munder"],[o],e)},W$e=(t,e)=>{var r=zk(t.label);return new Pt(t.isOver?"mover":"munder",[Jn(t.base,e),r])};jt({type:"horizBrace",names:["\\overbrace","\\underbrace","\\overbracket","\\underbracket"],props:{numArgs:1},handler(t,e){var{parser:r,funcName:n}=t;return{type:"horizBrace",mode:r.mode,label:n,isOver:n.includes("\\over"),base:e[0]}},htmlBuilder:VJ,mathmlBuilder:W$e});jt({type:"href",names:["\\href"],props:{numArgs:2,argTypes:["url","original"],allowedInText:!0},handler:(t,e)=>{var{parser:r}=t,n=e[1],i=$r(e[0],"url").url;return r.settings.isTrusted({command:"\\href",url:i})?{type:"href",mode:r.mode,href:i,body:ba(n)}:r.formatUnsupportedCmd("\\href")},htmlBuilder:(t,e)=>{var r=Pa(t.body,e,!1);return a$e(t.href,[],r,e)},mathmlBuilder:(t,e)=>{var r=Uf(t.body,e);return r instanceof Pt||(r=new Pt("mrow",[r])),r.setAttribute("href",t.href),r}});jt({type:"href",names:["\\url"],props:{numArgs:1,argTypes:["url"],allowedInText:!0},handler:(t,e)=>{var{parser:r}=t,n=$r(e[0],"url").url;if(!r.settings.isTrusted({command:"\\url",url:n}))return r.formatUnsupportedCmd("\\url");for(var i=[],a=0;a{var{parser:r,funcName:n,token:i}=t,a=$r(e[0],"raw").string,s=e[1];r.settings.strict&&r.settings.reportNonstrict("htmlExtension","HTML extension is disabled on strict mode");var o,l={};switch(n){case"\\htmlClass":l.class=a,o={command:"\\htmlClass",class:a};break;case"\\htmlId":l.id=a,o={command:"\\htmlId",id:a};break;case"\\htmlStyle":l.style=a,o={command:"\\htmlStyle",style:a};break;case"\\htmlData":{for(var u=a.split(","),h=0;h{var r=Pa(t.body,e,!1),n=["enclosing"];t.attributes.class&&n.push(...t.attributes.class.trim().split(/\s+/));var i=Mt(n,r,e);for(var a in t.attributes)a!=="class"&&t.attributes.hasOwnProperty(a)&&i.setAttribute(a,t.attributes[a]);return i},mathmlBuilder:(t,e)=>Uf(t.body,e)});jt({type:"htmlmathml",names:["\\html@mathml"],props:{numArgs:2,allowedInArgument:!0,allowedInText:!0},handler:(t,e)=>{var{parser:r}=t;return{type:"htmlmathml",mode:r.mode,html:ba(e[0]),mathml:ba(e[1])}},htmlBuilder:(t,e)=>{var r=Pa(t.html,e,!1);return bh(r)},mathmlBuilder:(t,e)=>Uf(t.mathml,e)});bM=function(e){if(/^[-+]? *(\d+(\.\d*)?|\.\d+)$/.test(e))return{number:+e,unit:"bp"};var r=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(e);if(!r)throw new Ft("Invalid size: '"+e+"' in \\includegraphics");var n={number:+(r[1]+r[2]),unit:r[3]};if(!lJ(n))throw new Ft("Invalid unit: '"+n.unit+"' in \\includegraphics.");return n};jt({type:"includegraphics",names:["\\includegraphics"],props:{numArgs:1,numOptionalArgs:1,argTypes:["raw","url"],allowedInText:!1},handler:(t,e,r)=>{var{parser:n}=t,i={number:0,unit:"em"},a={number:.9,unit:"em"},s={number:0,unit:"em"},o="";if(r[0])for(var l=$r(r[0],"raw").string,u=l.split(","),h=0;h{var r=$i(t.height,e),n=0;t.totalheight.number>0&&(n=$i(t.totalheight,e)-r);var i=0;t.width.number>0&&(i=$i(t.width,e));var a={height:Gt(r+n)};i>0&&(a.width=Gt(i)),n>0&&(a.verticalAlign=Gt(-n));var s=new CM(t.src,t.alt,a);return s.height=r,s.depth=n,s},mathmlBuilder:(t,e)=>{var r=new Pt("mglyph",[]);r.setAttribute("alt",t.alt);var n=$i(t.height,e),i=0;if(t.totalheight.number>0&&(i=$i(t.totalheight,e)-n,r.setAttribute("valign",Gt(-i))),r.setAttribute("height",Gt(n+i)),t.width.number>0){var a=$i(t.width,e);r.setAttribute("width",Gt(a))}return r.setAttribute("src",t.src),r}});jt({type:"kern",names:["\\kern","\\mkern","\\hskip","\\mskip"],props:{numArgs:1,argTypes:["size"],primitive:!0,allowedInText:!0},handler(t,e){var{parser:r,funcName:n}=t,i=$r(e[0],"size");if(r.settings.strict){var a=n[1]==="m",s=i.value.unit==="mu";a?(s||r.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+n+" supports only mu units, "+("not "+i.value.unit+" units")),r.mode!=="math"&&r.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+n+" works only in math mode")):s&&r.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+n+" doesn't support mu units")}return{type:"kern",mode:r.mode,dimension:i.value}},htmlBuilder(t,e){return mJ(t.dimension,e)},mathmlBuilder(t,e){var r=$i(t.dimension,e);return new Mk(r)}});jt({type:"lap",names:["\\mathllap","\\mathrlap","\\mathclap"],props:{numArgs:1,allowedInText:!0},handler:(t,e)=>{var{parser:r,funcName:n}=t,i=e[0];return{type:"lap",mode:r.mode,alignment:n.slice(5),body:i}},htmlBuilder:(t,e)=>{var r;t.alignment==="clap"?(r=Mt([],[Cn(t.body,e)]),r=Mt(["inner"],[r],e)):r=Mt(["inner"],[Cn(t.body,e)]);var n=Mt(["fix"],[]),i=Mt([t.alignment],[r,n],e),a=Mt(["strut"]);return a.style.height=Gt(i.height+i.depth),i.depth&&(a.style.verticalAlign=Gt(-i.depth)),i.children.unshift(a),i=Mt(["thinbox"],[i],e),Mt(["mord","vbox"],[i],e)},mathmlBuilder:(t,e)=>{var r=new Pt("mpadded",[Jn(t.body,e)]);if(t.alignment!=="rlap"){var n=t.alignment==="llap"?"-1":"-0.5";r.setAttribute("lspace",n+"width")}return r.setAttribute("width","0px"),r}});jt({type:"styling",names:["\\(","$"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(t,e){var{funcName:r,parser:n}=t,i=n.mode;n.switchMode("math");var a=r==="\\("?"\\)":"$",s=n.parseExpression(!1,a);return n.expect(a),n.switchMode(i),{type:"styling",mode:n.mode,style:"text",resetFont:!0,body:s}}});jt({type:"text",names:["\\)","\\]"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(t,e){throw new Ft("Mismatched "+t.funcName)}});KQ=(t,e)=>{switch(e.style.size){case Rr.DISPLAY.size:return t.display;case Rr.TEXT.size:return t.text;case Rr.SCRIPT.size:return t.script;case Rr.SCRIPTSCRIPT.size:return t.scriptscript;default:return t.text}};jt({type:"mathchoice",names:["\\mathchoice"],props:{numArgs:4,primitive:!0},handler:(t,e)=>{var{parser:r}=t;return{type:"mathchoice",mode:r.mode,display:ba(e[0]),text:ba(e[1]),script:ba(e[2]),scriptscript:ba(e[3])}},htmlBuilder:(t,e)=>{var r=KQ(t,e),n=Pa(r,e,!1);return bh(n)},mathmlBuilder:(t,e)=>{var r=KQ(t,e);return Uf(r,e)}});WJ=(t,e,r,n,i,a,s)=>{t=Mt([],[t]);var o=r&&vh(r),l,u;if(e){var h=Cn(e,n.havingStyle(i.sup()),n);u={elem:h,kern:Math.max(n.fontMetrics().bigOpSpacing1,n.fontMetrics().bigOpSpacing3-h.depth)}}if(r){var f=Cn(r,n.havingStyle(i.sub()),n);l={elem:f,kern:Math.max(n.fontMetrics().bigOpSpacing2,n.fontMetrics().bigOpSpacing4-f.height)}}var d;if(u&&l){var p=n.fontMetrics().bigOpSpacing5+l.elem.height+l.elem.depth+l.kern+t.depth+s;d=Sn({positionType:"bottom",positionData:p,children:[{type:"kern",size:n.fontMetrics().bigOpSpacing5},{type:"elem",elem:l.elem,marginLeft:Gt(-a)},{type:"kern",size:l.kern},{type:"elem",elem:t},{type:"kern",size:u.kern},{type:"elem",elem:u.elem,marginLeft:Gt(a)},{type:"kern",size:n.fontMetrics().bigOpSpacing5}]})}else if(l){var m=t.height-s;d=Sn({positionType:"top",positionData:m,children:[{type:"kern",size:n.fontMetrics().bigOpSpacing5},{type:"elem",elem:l.elem,marginLeft:Gt(-a)},{type:"kern",size:l.kern},{type:"elem",elem:t}]})}else if(u){var g=t.depth+s;d=Sn({positionType:"bottom",positionData:g,children:[{type:"elem",elem:t},{type:"kern",size:u.kern},{type:"elem",elem:u.elem,marginLeft:Gt(a)},{type:"kern",size:n.fontMetrics().bigOpSpacing5}]})}else return t;var y=[d];if(l&&a!==0&&!o){var v=Mt(["mspace"],[],n);v.style.marginRight=Gt(a),y.unshift(v)}return Mt(["mop","op-limits"],y,n)},YJ=new Set(["\\smallint"]),Xg=(t,e)=>{var r,n,i=!1,a;t.type==="supsub"?(r=t.sup,n=t.sub,a=$r(t.base,"op"),i=!0):a=$r(t,"op");var s=e.style,o=!1;s.size===Rr.DISPLAY.size&&a.symbol&&!YJ.has(a.name)&&(o=!0);var l,u;if(a.symbol){var h=o?"Size2-Regular":"Size1-Regular",f="";if((a.name==="\\oiint"||a.name==="\\oiiint")&&(f=a.name.slice(1),a.name=f==="oiint"?"\\iint":"\\iiint"),l=ao(a.name,h,"math",e,["mop","op-symbol",o?"large-op":"small-op"]),u=l.italic,f.length>0){var d=yJ(f+"Size"+(o?"2":"1"),e);l=Sn({positionType:"individualShift",children:[{type:"elem",elem:l,shift:0},{type:"elem",elem:d,shift:o?.08:0}]}),a.name="\\"+f,l.classes.unshift("mop"),l.italic=u}}else if(a.body){var p=Pa(a.body,e,!0);p.length===1&&p[0]instanceof oo?(l=p[0],l.classes[0]="mop"):l=Mt(["mop"],p,e)}else{for(var m=[],g=1;g{var r;if(t.symbol)r=new Pt("mo",[tu(t.name,t.mode)]),YJ.has(t.name)&&r.setAttribute("largeop","false");else if(t.body)r=new Pt("mo",Sl(t.body,e));else{r=new Pt("mi",[new Yi(t.name.slice(1))]);var n=new Pt("mo",[tu("\u2061","text")]);t.parentIsSupSub?r=new Pt("mrow",[r,n]):r=bJ([r,n])}return r},Y$e={"\u220F":"\\prod","\u2210":"\\coprod","\u2211":"\\sum","\u22C0":"\\bigwedge","\u22C1":"\\bigvee","\u22C2":"\\bigcap","\u22C3":"\\bigcup","\u2A00":"\\bigodot","\u2A01":"\\bigoplus","\u2A02":"\\bigotimes","\u2A04":"\\biguplus","\u2A06":"\\bigsqcup"};jt({type:"op",names:["\\coprod","\\bigvee","\\bigwedge","\\biguplus","\\bigcap","\\bigcup","\\intop","\\prod","\\sum","\\bigotimes","\\bigoplus","\\bigodot","\\bigsqcup","\\smallint","\u220F","\u2210","\u2211","\u22C0","\u22C1","\u22C2","\u22C3","\u2A00","\u2A01","\u2A02","\u2A04","\u2A06"],props:{numArgs:0},handler:(t,e)=>{var{parser:r,funcName:n}=t,i=n;return i.length===1&&(i=Y$e[i]),{type:"op",mode:r.mode,limits:!0,parentIsSupSub:!1,symbol:!0,name:i}},htmlBuilder:Xg,mathmlBuilder:Yb});jt({type:"op",names:["\\mathop"],props:{numArgs:1,primitive:!0},handler:(t,e)=>{var{parser:r}=t,n=e[0];return{type:"op",mode:r.mode,limits:!1,parentIsSupSub:!1,symbol:!1,body:ba(n)}},htmlBuilder:Xg,mathmlBuilder:Yb});X$e={"\u222B":"\\int","\u222C":"\\iint","\u222D":"\\iiint","\u222E":"\\oint","\u222F":"\\oiint","\u2230":"\\oiiint"};jt({type:"op",names:["\\arcsin","\\arccos","\\arctan","\\arctg","\\arcctg","\\arg","\\ch","\\cos","\\cosec","\\cosh","\\cot","\\cotg","\\coth","\\csc","\\ctg","\\cth","\\deg","\\dim","\\exp","\\hom","\\ker","\\lg","\\ln","\\log","\\sec","\\sin","\\sinh","\\sh","\\tan","\\tanh","\\tg","\\th"],props:{numArgs:0},handler(t){var{parser:e,funcName:r}=t;return{type:"op",mode:e.mode,limits:!1,parentIsSupSub:!1,symbol:!1,name:r}},htmlBuilder:Xg,mathmlBuilder:Yb});jt({type:"op",names:["\\det","\\gcd","\\inf","\\lim","\\max","\\min","\\Pr","\\sup"],props:{numArgs:0},handler(t){var{parser:e,funcName:r}=t;return{type:"op",mode:e.mode,limits:!0,parentIsSupSub:!1,symbol:!1,name:r}},htmlBuilder:Xg,mathmlBuilder:Yb});jt({type:"op",names:["\\int","\\iint","\\iiint","\\oint","\\oiint","\\oiiint","\u222B","\u222C","\u222D","\u222E","\u222F","\u2230"],props:{numArgs:0,allowedInArgument:!0},handler(t){var{parser:e,funcName:r}=t,n=r;return n.length===1&&(n=X$e[n]),{type:"op",mode:e.mode,limits:!1,parentIsSupSub:!1,symbol:!0,name:n}},htmlBuilder:Xg,mathmlBuilder:Yb});XJ=(t,e)=>{var r,n,i=!1,a;t.type==="supsub"?(r=t.sup,n=t.sub,a=$r(t.base,"operatorname"),i=!0):a=$r(t,"operatorname");var s;if(a.body.length>0){for(var o=a.body.map(f=>{var d="text"in f?f.text:void 0;return typeof d=="string"?{type:"textord",mode:f.mode,text:d}:f}),l=Pa(o,e.withFont("mathrm"),!0),u=0;u{for(var r=Sl(t.body,e.withFont("mathrm")),n=!0,i=0;ih.toText()).join("");r=[new Yi(o)]}var l=new Pt("mi",r);l.setAttribute("mathvariant","normal");var u=new Pt("mo",[tu("\u2061","text")]);return t.parentIsSupSub?new Pt("mrow",[l,u]):bJ([l,u])};jt({type:"operatorname",names:["\\operatorname@","\\operatornamewithlimits"],props:{numArgs:1},handler:(t,e)=>{var{parser:r,funcName:n}=t,i=e[0];return{type:"operatorname",mode:r.mode,body:ba(i),alwaysHandleSupSub:n==="\\operatornamewithlimits",limits:!1,parentIsSupSub:!1}},htmlBuilder:XJ,mathmlBuilder:j$e});Se("\\operatorname","\\@ifstar\\operatornamewithlimits\\operatorname@");y1({type:"ordgroup",htmlBuilder(t,e){return t.semisimple?bh(Pa(t.body,e,!1)):Mt(["mord"],Pa(t.body,e,!0),e)},mathmlBuilder(t,e){return Uf(t.body,e,!0)}});jt({type:"overline",names:["\\overline"],props:{numArgs:1},handler(t,e){var{parser:r}=t,n=e[0];return{type:"overline",mode:r.mode,body:n}},htmlBuilder(t,e){var r=Cn(t.body,e.havingCrampedStyle()),n=Vg("overline-line",e),i=e.fontMetrics().defaultRuleThickness,a=Sn({positionType:"firstBaseline",children:[{type:"elem",elem:r},{type:"kern",size:3*i},{type:"elem",elem:n},{type:"kern",size:i}]});return Mt(["mord","overline"],[a],e)},mathmlBuilder(t,e){var r=new Pt("mo",[new Yi("\u203E")]);r.setAttribute("stretchy","true");var n=new Pt("mover",[Jn(t.body,e),r]);return n.setAttribute("accent","true"),n}});jt({type:"phantom",names:["\\phantom"],props:{numArgs:1,allowedInText:!0},handler:(t,e)=>{var{parser:r}=t,n=e[0];return{type:"phantom",mode:r.mode,body:ba(n)}},htmlBuilder:(t,e)=>{var r=Pa(t.body,e.withPhantom(),!1);return bh(r)},mathmlBuilder:(t,e)=>{var r=Sl(t.body,e);return new Pt("mphantom",r)}});Se("\\hphantom","\\smash{\\phantom{#1}}");jt({type:"vphantom",names:["\\vphantom"],props:{numArgs:1,allowedInText:!0},handler:(t,e)=>{var{parser:r}=t,n=e[0];return{type:"vphantom",mode:r.mode,body:n}},htmlBuilder:(t,e)=>{var r=Mt(["inner"],[Cn(t.body,e.withPhantom())]),n=Mt(["fix"],[]);return Mt(["mord","rlap"],[r,n],e)},mathmlBuilder:(t,e)=>{var r=Sl(ba(t.body),e),n=new Pt("mphantom",r),i=new Pt("mpadded",[n]);return i.setAttribute("width","0px"),i}});jt({type:"raisebox",names:["\\raisebox"],props:{numArgs:2,argTypes:["size","hbox"],allowedInText:!0},handler(t,e){var{parser:r}=t,n=$r(e[0],"size").value,i=e[1];return{type:"raisebox",mode:r.mode,dy:n,body:i}},htmlBuilder(t,e){var r=Cn(t.body,e),n=$i(t.dy,e);return Sn({positionType:"shift",positionData:-n,children:[{type:"elem",elem:r}]})},mathmlBuilder(t,e){var r=new Pt("mpadded",[Jn(t.body,e)]),n=t.dy.number+t.dy.unit;return r.setAttribute("voffset",n),r}});jt({type:"internal",names:["\\relax"],props:{numArgs:0,allowedInText:!0,allowedInArgument:!0},handler(t){var{parser:e}=t;return{type:"internal",mode:e.mode}}});jt({type:"rule",names:["\\rule"],props:{numArgs:2,numOptionalArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:["size","size","size"]},handler(t,e,r){var{parser:n}=t,i=r[0],a=$r(e[0],"size"),s=$r(e[1],"size");return{type:"rule",mode:n.mode,shift:i&&$r(i,"size").value,width:a.value,height:s.value}},htmlBuilder(t,e){var r=Mt(["mord","rule"],[],e),n=$i(t.width,e),i=$i(t.height,e),a=t.shift?$i(t.shift,e):0;return r.style.borderRightWidth=Gt(n),r.style.borderTopWidth=Gt(i),r.style.bottom=Gt(a),r.width=n,r.height=i+a,r.depth=-a,r.maxFontSize=i*1.125*e.sizeMultiplier,r},mathmlBuilder(t,e){var r=$i(t.width,e),n=$i(t.height,e),i=t.shift?$i(t.shift,e):0,a=e.color&&e.getColor()||"black",s=new Pt("mspace");s.setAttribute("mathbackground",a),s.setAttribute("width",Gt(r)),s.setAttribute("height",Gt(n));var o=new Pt("mpadded",[s]);return i>=0?o.setAttribute("height",Gt(i)):(o.setAttribute("height",Gt(i)),o.setAttribute("depth",Gt(-i))),o.setAttribute("voffset",Gt(i)),o}});ZQ=["\\tiny","\\sixptsize","\\scriptsize","\\footnotesize","\\small","\\normalsize","\\large","\\Large","\\LARGE","\\huge","\\Huge"],K$e=(t,e)=>{var r=e.havingSize(t.size);return jJ(t.body,r,e)};jt({type:"sizing",names:ZQ,props:{numArgs:0,allowedInText:!0},handler:(t,e)=>{var{breakOnTokenText:r,funcName:n,parser:i}=t,a=i.parseExpression(!1,r);return{type:"sizing",mode:i.mode,size:ZQ.indexOf(n)+1,body:a}},htmlBuilder:K$e,mathmlBuilder:(t,e)=>{var r=e.havingSize(t.size),n=Sl(t.body,r),i=new Pt("mstyle",n);return i.setAttribute("mathsize",Gt(r.sizeMultiplier)),i}});jt({type:"smash",names:["\\smash"],props:{numArgs:1,numOptionalArgs:1,allowedInText:!0},handler:(t,e,r)=>{var{parser:n}=t,i=!1,a=!1,s=r[0]&&$r(r[0],"ordgroup");if(s)for(var o,l=0;l{var r=Mt([],[Cn(t.body,e)]);if(!t.smashHeight&&!t.smashDepth)return r;if(t.smashHeight&&(r.height=0),t.smashDepth&&(r.depth=0),t.smashHeight&&t.smashDepth)return Mt(["mord","smash"],[r],e);if(r.children)for(var n=0;n{var r=new Pt("mpadded",[Jn(t.body,e)]);return t.smashHeight&&r.setAttribute("height","0px"),t.smashDepth&&r.setAttribute("depth","0px"),r}});jt({type:"sqrt",names:["\\sqrt"],props:{numArgs:1,numOptionalArgs:1},handler(t,e,r){var{parser:n}=t,i=r[0],a=e[0];return{type:"sqrt",mode:n.mode,body:a,index:i}},htmlBuilder(t,e){var r=Cn(t.body,e.havingCrampedStyle());r.height===0&&(r.height=e.fontMetrics().xHeight),r=Wg(r,e);var n=e.fontMetrics(),i=n.defaultRuleThickness,a=i;e.style.idr.height+r.depth+s&&(s=(s+f-r.height-r.depth)/2);var d=l.height-r.height-s-u;r.style.paddingLeft=Gt(h);var p=Sn({positionType:"firstBaseline",children:[{type:"elem",elem:r,wrapperClasses:["svg-align"]},{type:"kern",size:-(r.height+d)},{type:"elem",elem:l},{type:"kern",size:u}]});if(t.index){var m=e.havingStyle(Rr.SCRIPTSCRIPT),g=Cn(t.index,m,e),y=.6*(p.height-p.depth),v=Sn({positionType:"shift",positionData:-y,children:[{type:"elem",elem:g}]}),x=Mt(["root"],[v]);return Mt(["mord","sqrt"],[x,p],e)}else return Mt(["mord","sqrt"],[p],e)},mathmlBuilder(t,e){var{body:r,index:n}=t;return n?new Pt("mroot",[Jn(r,e),Jn(n,e)]):new Pt("msqrt",[Jn(r,e)])}});$M={display:Rr.DISPLAY,text:Rr.TEXT,script:Rr.SCRIPT,scriptscript:Rr.SCRIPTSCRIPT};jt({type:"styling",names:["\\displaystyle","\\textstyle","\\scriptstyle","\\scriptscriptstyle"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(t,e){var{breakOnTokenText:r,funcName:n,parser:i}=t,a=i.parseExpression(!0,r),s=n.slice(1,n.length-5);if(!Z$e(s))throw new Error("Unknown style: "+s);return{type:"styling",mode:i.mode,style:s,body:a}},htmlBuilder(t,e){var r=$M[t.style],n=e.havingStyle(r);return t.resetFont&&(n=n.withFont("")),jJ(t.body,n,e)},mathmlBuilder(t,e){var r=$M[t.style],n=e.havingStyle(r);t.resetFont&&(n=n.withFont(""));var i=Sl(t.body,n),a=new Pt("mstyle",i),s={display:["0","true"],text:["0","false"],script:["1","false"],scriptscript:["2","false"]},o=s[t.style];return a.setAttribute("scriptlevel",o[0]),a.setAttribute("displaystyle",o[1]),a}});Q$e=function(e,r){var n=e.base;if(n)if(n.type==="op"){var i=n.limits&&(r.style.size===Rr.DISPLAY.size||n.alwaysHandleSupSub);return i?Xg:null}else if(n.type==="operatorname"){var a=n.alwaysHandleSupSub&&(r.style.size===Rr.DISPLAY.size||n.limits);return a?XJ:null}else{if(n.type==="accent")return vh(n.base)?ZM:null;if(n.type==="horizBrace"){var s=!e.sub;return s===n.isOver?VJ:null}else return null}else return null};y1({type:"supsub",htmlBuilder(t,e){var r=Q$e(t,e);if(r)return r(t,e);var{base:n,sup:i,sub:a}=t,s=Cn(n,e),o,l,u=e.fontMetrics(),h=0,f=0,d=n&&vh(n);if(i){var p=e.havingStyle(e.style.sup());o=Cn(i,p,e),d||(h=s.height-p.fontMetrics().supDrop*p.sizeMultiplier/e.sizeMultiplier)}if(a){var m=e.havingStyle(e.style.sub());l=Cn(a,m,e),d||(f=s.depth+m.fontMetrics().subDrop*m.sizeMultiplier/e.sizeMultiplier)}var g;e.style===Rr.DISPLAY?g=u.sup1:e.style.cramped?g=u.sup3:g=u.sup2;var y=e.sizeMultiplier,v=Gt(.5/u.ptPerEm/y),x=null;if(l){var k=t.base&&t.base.type==="op"&&t.base.name&&(t.base.name==="\\oiint"||t.base.name==="\\oiiint");if(s instanceof oo||k){var _;x=Gt(-((_=s.italic)!=null?_:0))}}var T;if(o&&l){h=Math.max(h,g,o.depth+.25*u.xHeight),f=Math.max(f,u.sub2);var S=u.defaultRuleThickness,R=4*S;if(h-o.depth-(l.height-f)0&&(h+=A,f-=A)}var I=[{type:"elem",elem:l,shift:f,marginRight:v,marginLeft:x},{type:"elem",elem:o,shift:-h,marginRight:v}];T=Sn({positionType:"individualShift",children:I})}else if(l){f=Math.max(f,u.sub1,l.height-.8*u.xHeight);var P=[{type:"elem",elem:l,marginLeft:x,marginRight:v}];T=Sn({positionType:"shift",positionData:f,children:P})}else if(o)h=Math.max(h,g,o.depth+.25*u.xHeight),T=Sn({positionType:"shift",positionData:-h,children:[{type:"elem",elem:o,marginRight:v}]});else throw new Error("supsub must have either sup or sub.");var O=OM(s,"right")||"mord";return Mt([O],[s,Mt(["msupsub"],[T])],e)},mathmlBuilder(t,e){var r=!1,n,i;t.base&&t.base.type==="horizBrace"&&(i=!!t.sup,i===t.base.isOver&&(r=!0,n=t.base.isOver)),t.base&&(t.base.type==="op"||t.base.type==="operatorname")&&(t.base.parentIsSupSub=!0);var a=[Jn(t.base,e)];t.sub&&a.push(Jn(t.sub,e)),t.sup&&a.push(Jn(t.sup,e));var s;if(r)s=n?"mover":"munder";else if(t.sub)if(t.sup){var u=t.base;u&&u.type==="op"&&u.limits&&e.style===Rr.DISPLAY||u&&u.type==="operatorname"&&u.alwaysHandleSupSub&&(e.style===Rr.DISPLAY||u.limits)?s="munderover":s="msubsup"}else{var l=t.base;l&&l.type==="op"&&l.limits&&(e.style===Rr.DISPLAY||l.alwaysHandleSupSub)||l&&l.type==="operatorname"&&l.alwaysHandleSupSub&&(l.limits||e.style===Rr.DISPLAY)?s="munder":s="msub"}else{var o=t.base;o&&o.type==="op"&&o.limits&&(e.style===Rr.DISPLAY||o.alwaysHandleSupSub)||o&&o.type==="operatorname"&&o.alwaysHandleSupSub&&(o.limits||e.style===Rr.DISPLAY)?s="mover":s="msup"}return new Pt(s,a)}});y1({type:"atom",htmlBuilder(t,e){return YM(t.text,t.mode,e,["m"+t.family])},mathmlBuilder(t,e){var r=new Pt("mo",[tu(t.text,t.mode)]);if(t.family==="bin"){var n=KM(t,e);n==="bold-italic"&&r.setAttribute("mathvariant",n)}else t.family==="punct"?r.setAttribute("separator","true"):(t.family==="open"||t.family==="close")&&r.setAttribute("stretchy","false");return r}});KJ={mi:"italic",mn:"normal",mtext:"normal"};y1({type:"mathord",htmlBuilder(t,e){return Fk(t,e,"mathord")},mathmlBuilder(t,e){var r=new Pt("mi",[tu(t.text,t.mode,e)]),n=KM(t,e)||"italic";return n!==KJ[r.type]&&r.setAttribute("mathvariant",n),r}});y1({type:"textord",htmlBuilder(t,e){return Fk(t,e,"textord")},mathmlBuilder(t,e){var r=tu(t.text,t.mode,e),n=KM(t,e)||"normal",i;return t.mode==="text"?i=new Pt("mtext",[r]):/[0-9]/.test(t.text)?i=new Pt("mn",[r]):t.text==="\\prime"?i=new Pt("mo",[r]):i=new Pt("mi",[r]),n!==KJ[i.type]&&i.setAttribute("mathvariant",n),i}});wM={"\\nobreak":"nobreak","\\allowbreak":"allowbreak"},kM={" ":{},"\\ ":{},"~":{className:"nobreak"},"\\space":{},"\\nobreakspace":{className:"nobreak"}};y1({type:"spacing",htmlBuilder(t,e){if(kM.hasOwnProperty(t.text)){var r=kM[t.text].className||"";if(t.mode==="text"){var n=Fk(t,e,"textord");return n.classes.push(r),n}else return Mt(["mspace",r],[YM(t.text,t.mode,e)],e)}else{if(wM.hasOwnProperty(t.text))return Mt(["mspace",wM[t.text]],[],e);throw new Ft('Unknown type of space "'+t.text+'"')}},mathmlBuilder(t,e){var r;if(kM.hasOwnProperty(t.text))r=new Pt("mtext",[new Yi("\xA0")]);else{if(wM.hasOwnProperty(t.text))return new Pt("mspace");throw new Ft('Unknown type of space "'+t.text+'"')}return r}});QQ=()=>{var t=new Pt("mtd",[]);return t.setAttribute("width","50%"),t};y1({type:"tag",mathmlBuilder(t,e){var r=new Pt("mtable",[new Pt("mtr",[QQ(),new Pt("mtd",[Uf(t.body,e)]),QQ(),new Pt("mtd",[Uf(t.tag,e)])])]);return r.setAttribute("width","100%"),r}});JQ={"\\text":void 0,"\\textrm":"textrm","\\textsf":"textsf","\\texttt":"texttt","\\textnormal":"textrm"},eJ={"\\textbf":"textbf","\\textmd":"textmd"},J$e={"\\textit":"textit","\\textup":"textup"},tJ=(t,e)=>{var r=t.font;if(r){if(JQ[r])return e.withTextFontFamily(JQ[r]);if(eJ[r])return e.withTextFontWeight(eJ[r]);if(r==="\\emph")return e.fontShape==="textit"?e.withTextFontShape("textup"):e.withTextFontShape("textit")}else return e;return e.withTextFontShape(J$e[r])};jt({type:"text",names:["\\text","\\textrm","\\textsf","\\texttt","\\textnormal","\\textbf","\\textmd","\\textit","\\textup","\\emph"],props:{numArgs:1,argTypes:["text"],allowedInArgument:!0,allowedInText:!0},handler(t,e){var{parser:r,funcName:n}=t,i=e[0];return{type:"text",mode:r.mode,body:ba(i),font:n}},htmlBuilder(t,e){var r=tJ(t,e),n=Pa(t.body,r,!0);return Mt(["mord","text"],n,r)},mathmlBuilder(t,e){var r=tJ(t,e);return Uf(t.body,r)}});jt({type:"underline",names:["\\underline"],props:{numArgs:1,allowedInText:!0},handler(t,e){var{parser:r}=t;return{type:"underline",mode:r.mode,body:e[0]}},htmlBuilder(t,e){var r=Cn(t.body,e),n=Vg("underline-line",e),i=e.fontMetrics().defaultRuleThickness,a=Sn({positionType:"top",positionData:r.height,children:[{type:"kern",size:i},{type:"elem",elem:n},{type:"kern",size:3*i},{type:"elem",elem:r}]});return Mt(["mord","underline"],[a],e)},mathmlBuilder(t,e){var r=new Pt("mo",[new Yi("\u203E")]);r.setAttribute("stretchy","true");var n=new Pt("munder",[Jn(t.body,e),r]);return n.setAttribute("accentunder","true"),n}});jt({type:"vcenter",names:["\\vcenter"],props:{numArgs:1,argTypes:["original"],allowedInText:!1},handler(t,e){var{parser:r}=t;return{type:"vcenter",mode:r.mode,body:e[0]}},htmlBuilder(t,e){var r=Cn(t.body,e),n=e.fontMetrics().axisHeight,i=.5*(r.height-n-(r.depth+n));return Sn({positionType:"shift",positionData:i,children:[{type:"elem",elem:r}]})},mathmlBuilder(t,e){var r=new Pt("mpadded",[Jn(t.body,e)],["vcenter"]);return new Pt("mrow",[r])}});jt({type:"verb",names:["\\verb"],props:{numArgs:0,allowedInText:!0},handler(t,e,r){throw new Ft("\\verb ended by end of line instead of matching delimiter")},htmlBuilder(t,e){for(var r=rJ(t),n=[],i=e.havingStyle(e.style.text()),a=0;at.body.replace(/ /g,t.star?"\u2423":"\xA0"),Ff=vJ,ZJ=`[ \r + ]`,eGe="\\\\[a-zA-Z@]+",tGe="\\\\[^\uD800-\uDFFF]",rGe="("+eGe+")"+ZJ+"*",nGe=`\\\\( |[ \r ]+ -?)[ \r ]*`,aD="[\u0300-\u036F]",PBe=new RegExp(aD+"+$"),BBe="("+VZ+"+)|"+(OBe+"|")+"([!-\\[\\]-\u2027\u202A-\uD7FF\uF900-\uFFFF]"+(aD+"*")+"|[\uD800-\uDBFF][\uDC00-\uDFFF]"+(aD+"*")+"|\\\\verb\\*([^]).*?\\4|\\\\verb([^*a-zA-Z]).*?\\5"+("|"+MBe)+("|"+NBe+")"),fT=class{constructor(e,r){this.input=void 0,this.settings=void 0,this.tokenRegex=void 0,this.catcodes=void 0,this.input=e,this.settings=r,this.tokenRegex=new RegExp(BBe,"g"),this.catcodes={"%":14,"~":13}}setCatcode(e,r){this.catcodes[e]=r}lex(){var e=this.input,r=this.tokenRegex.lastIndex;if(r===e.length)return new Io("EOF",new Zs(this,r,r));var n=this.tokenRegex.exec(e);if(n===null||n.index!==r)throw new ht("Unexpected character: '"+e[r]+"'",new Io(e[r],new Zs(this,r,r+1)));var a=n[6]||n[3]||(n[2]?"\\ ":" ");if(this.catcodes[a]===14){var i=e.indexOf(` -`,this.tokenRegex.lastIndex);return i===-1?(this.tokenRegex.lastIndex=e.length,this.settings.reportNonstrict("commentAtEnd","% comment has no terminating newline; LaTeX would fail because of commenting the end of math mode (e.g. $)")):this.tokenRegex.lastIndex=i+1,this.lex()}return new Io(a,new Zs(this,r,this.tokenRegex.lastIndex))}},iD=class{constructor(e,r){e===void 0&&(e={}),r===void 0&&(r={}),this.current=void 0,this.builtins=void 0,this.undefStack=void 0,this.current=r,this.builtins=e,this.undefStack=[]}beginGroup(){this.undefStack.push({})}endGroup(){if(this.undefStack.length===0)throw new ht("Unbalanced namespace destruction: attempt to pop global namespace; please report this as a bug");var e=this.undefStack.pop();for(var r in e)e.hasOwnProperty(r)&&(e[r]==null?delete this.current[r]:this.current[r]=e[r])}endGroups(){for(;this.undefStack.length>0;)this.endGroup()}has(e){return this.current.hasOwnProperty(e)||this.builtins.hasOwnProperty(e)}get(e){return this.current.hasOwnProperty(e)?this.current[e]:this.builtins[e]}set(e,r,n){if(n===void 0&&(n=!1),n){for(var a=0;a0&&(this.undefStack[this.undefStack.length-1][e]=r)}else{var i=this.undefStack[this.undefStack.length-1];i&&!i.hasOwnProperty(e)&&(i[e]=this.current[e])}r==null?delete this.current[e]:this.current[e]=r}},FBe=NZ;ce("\\noexpand",function(t){var e=t.popToken();return t.isExpandable(e.text)&&(e.noexpand=!0,e.treatAsRelax=!0),{tokens:[e],numArgs:0}});ce("\\expandafter",function(t){var e=t.popToken();return t.expandOnce(!0),{tokens:[e],numArgs:0}});ce("\\@firstoftwo",function(t){var e=t.consumeArgs(2);return{tokens:e[0],numArgs:0}});ce("\\@secondoftwo",function(t){var e=t.consumeArgs(2);return{tokens:e[1],numArgs:0}});ce("\\@ifnextchar",function(t){var e=t.consumeArgs(3);t.consumeSpaces();var r=t.future();return e[0].length===1&&e[0][0].text===r.text?{tokens:e[1],numArgs:0}:{tokens:e[2],numArgs:0}});ce("\\@ifstar","\\@ifnextchar *{\\@firstoftwo{#1}}");ce("\\TextOrMath",function(t){var e=t.consumeArgs(2);return t.mode==="text"?{tokens:e[0],numArgs:0}:{tokens:e[1],numArgs:0}});KK={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,a:10,A:10,b:11,B:11,c:12,C:12,d:13,D:13,e:14,E:14,f:15,F:15};ce("\\char",function(t){var e=t.popToken(),r,n=0;if(e.text==="'")r=8,e=t.popToken();else if(e.text==='"')r=16,e=t.popToken();else if(e.text==="`")if(e=t.popToken(),e.text[0]==="\\")n=e.text.charCodeAt(1);else{if(e.text==="EOF")throw new ht("\\char` missing argument");n=e.text.charCodeAt(0)}else r=10;if(r){if(n=KK[e.text],n==null||n>=r)throw new ht("Invalid base-"+r+" digit "+e.text);for(var a;(a=KK[t.future().text])!=null&&a{var a=t.consumeArg().tokens;if(a.length!==1)throw new ht("\\newcommand's first argument must be a macro name");var i=a[0].text,s=t.isDefined(i);if(s&&!e)throw new ht("\\newcommand{"+i+"} attempting to redefine "+(i+"; use \\renewcommand"));if(!s&&!r)throw new ht("\\renewcommand{"+i+"} when command "+i+" does not yet exist; use \\newcommand");var o=0;if(a=t.consumeArg().tokens,a.length===1&&a[0].text==="["){for(var l="",u=t.expandNextToken();u.text!=="]"&&u.text!=="EOF";)l+=u.text,u=t.expandNextToken();if(!l.match(/^\s*[0-9]+\s*$/))throw new ht("Invalid number of arguments: "+l);o=parseInt(l),a=t.consumeArg().tokens}return s&&n||t.macros.set(i,{tokens:a,numArgs:o}),""};ce("\\newcommand",t=>yD(t,!1,!0,!1));ce("\\renewcommand",t=>yD(t,!0,!1,!1));ce("\\providecommand",t=>yD(t,!0,!0,!0));ce("\\message",t=>{var e=t.consumeArgs(1)[0];return console.log(e.reverse().map(r=>r.text).join("")),""});ce("\\errmessage",t=>{var e=t.consumeArgs(1)[0];return console.error(e.reverse().map(r=>r.text).join("")),""});ce("\\show",t=>{var e=t.popToken(),r=e.text;return console.log(e,t.macros.get(r),Mf[r],$n.math[r],$n.text[r]),""});ce("\\bgroup","{");ce("\\egroup","}");ce("~","\\nobreakspace");ce("\\lq","`");ce("\\rq","'");ce("\\aa","\\r a");ce("\\AA","\\r A");ce("\\textcopyright","\\html@mathml{\\textcircled{c}}{\\char`\xA9}");ce("\\copyright","\\TextOrMath{\\textcopyright}{\\text{\\textcopyright}}");ce("\\textregistered","\\html@mathml{\\textcircled{\\scriptsize R}}{\\char`\xAE}");ce("\u212C","\\mathscr{B}");ce("\u2130","\\mathscr{E}");ce("\u2131","\\mathscr{F}");ce("\u210B","\\mathscr{H}");ce("\u2110","\\mathscr{I}");ce("\u2112","\\mathscr{L}");ce("\u2133","\\mathscr{M}");ce("\u211B","\\mathscr{R}");ce("\u212D","\\mathfrak{C}");ce("\u210C","\\mathfrak{H}");ce("\u2128","\\mathfrak{Z}");ce("\\Bbbk","\\Bbb{k}");ce("\\llap","\\mathllap{\\textrm{#1}}");ce("\\rlap","\\mathrlap{\\textrm{#1}}");ce("\\clap","\\mathclap{\\textrm{#1}}");ce("\\mathstrut","\\vphantom{(}");ce("\\underbar","\\underline{\\text{#1}}");ce("\\not",'\\html@mathml{\\mathrel{\\mathrlap\\@not}\\nobreak}{\\char"338}');ce("\\neq","\\html@mathml{\\mathrel{\\not=}}{\\mathrel{\\char`\u2260}}");ce("\\ne","\\neq");ce("\u2260","\\neq");ce("\\notin","\\html@mathml{\\mathrel{{\\in}\\mathllap{/\\mskip1mu}}}{\\mathrel{\\char`\u2209}}");ce("\u2209","\\notin");ce("\u2258","\\html@mathml{\\mathrel{=\\kern{-1em}\\raisebox{0.4em}{$\\scriptsize\\frown$}}}{\\mathrel{\\char`\u2258}}");ce("\u2259","\\html@mathml{\\stackrel{\\tiny\\wedge}{=}}{\\mathrel{\\char`\u2258}}");ce("\u225A","\\html@mathml{\\stackrel{\\tiny\\vee}{=}}{\\mathrel{\\char`\u225A}}");ce("\u225B","\\html@mathml{\\stackrel{\\scriptsize\\star}{=}}{\\mathrel{\\char`\u225B}}");ce("\u225D","\\html@mathml{\\stackrel{\\tiny\\mathrm{def}}{=}}{\\mathrel{\\char`\u225D}}");ce("\u225E","\\html@mathml{\\stackrel{\\tiny\\mathrm{m}}{=}}{\\mathrel{\\char`\u225E}}");ce("\u225F","\\html@mathml{\\stackrel{\\tiny?}{=}}{\\mathrel{\\char`\u225F}}");ce("\u27C2","\\perp");ce("\u203C","\\mathclose{!\\mkern-0.8mu!}");ce("\u220C","\\notni");ce("\u231C","\\ulcorner");ce("\u231D","\\urcorner");ce("\u231E","\\llcorner");ce("\u231F","\\lrcorner");ce("\xA9","\\copyright");ce("\xAE","\\textregistered");ce("\\ulcorner",'\\html@mathml{\\@ulcorner}{\\mathop{\\char"231c}}');ce("\\urcorner",'\\html@mathml{\\@urcorner}{\\mathop{\\char"231d}}');ce("\\llcorner",'\\html@mathml{\\@llcorner}{\\mathop{\\char"231e}}');ce("\\lrcorner",'\\html@mathml{\\@lrcorner}{\\mathop{\\char"231f}}');ce("\\vdots","{\\varvdots\\rule{0pt}{15pt}}");ce("\u22EE","\\vdots");ce("\\varGamma","\\mathit{\\Gamma}");ce("\\varDelta","\\mathit{\\Delta}");ce("\\varTheta","\\mathit{\\Theta}");ce("\\varLambda","\\mathit{\\Lambda}");ce("\\varXi","\\mathit{\\Xi}");ce("\\varPi","\\mathit{\\Pi}");ce("\\varSigma","\\mathit{\\Sigma}");ce("\\varUpsilon","\\mathit{\\Upsilon}");ce("\\varPhi","\\mathit{\\Phi}");ce("\\varPsi","\\mathit{\\Psi}");ce("\\varOmega","\\mathit{\\Omega}");ce("\\substack","\\begin{subarray}{c}#1\\end{subarray}");ce("\\colon","\\nobreak\\mskip2mu\\mathpunct{}\\mathchoice{\\mkern-3mu}{\\mkern-3mu}{}{}{:}\\mskip6mu\\relax");ce("\\boxed","\\fbox{$\\displaystyle{#1}$}");ce("\\iff","\\DOTSB\\;\\Longleftrightarrow\\;");ce("\\implies","\\DOTSB\\;\\Longrightarrow\\;");ce("\\impliedby","\\DOTSB\\;\\Longleftarrow\\;");ce("\\dddot","{\\overset{\\raisebox{-0.1ex}{\\normalsize ...}}{#1}}");ce("\\ddddot","{\\overset{\\raisebox{-0.1ex}{\\normalsize ....}}{#1}}");ZK={",":"\\dotsc","\\not":"\\dotsb","+":"\\dotsb","=":"\\dotsb","<":"\\dotsb",">":"\\dotsb","-":"\\dotsb","*":"\\dotsb",":":"\\dotsb","\\DOTSB":"\\dotsb","\\coprod":"\\dotsb","\\bigvee":"\\dotsb","\\bigwedge":"\\dotsb","\\biguplus":"\\dotsb","\\bigcap":"\\dotsb","\\bigcup":"\\dotsb","\\prod":"\\dotsb","\\sum":"\\dotsb","\\bigotimes":"\\dotsb","\\bigoplus":"\\dotsb","\\bigodot":"\\dotsb","\\bigsqcup":"\\dotsb","\\And":"\\dotsb","\\longrightarrow":"\\dotsb","\\Longrightarrow":"\\dotsb","\\longleftarrow":"\\dotsb","\\Longleftarrow":"\\dotsb","\\longleftrightarrow":"\\dotsb","\\Longleftrightarrow":"\\dotsb","\\mapsto":"\\dotsb","\\longmapsto":"\\dotsb","\\hookrightarrow":"\\dotsb","\\doteq":"\\dotsb","\\mathbin":"\\dotsb","\\mathrel":"\\dotsb","\\relbar":"\\dotsb","\\Relbar":"\\dotsb","\\xrightarrow":"\\dotsb","\\xleftarrow":"\\dotsb","\\DOTSI":"\\dotsi","\\int":"\\dotsi","\\oint":"\\dotsi","\\iint":"\\dotsi","\\iiint":"\\dotsi","\\iiiint":"\\dotsi","\\idotsint":"\\dotsi","\\DOTSX":"\\dotsx"},zBe=new Set(["bin","rel"]);ce("\\dots",function(t){var e="\\dotso",r=t.expandAfterFuture().text;return r in ZK?e=ZK[r]:(r.slice(0,4)==="\\not"||r in $n.math&&zBe.has($n.math[r].group))&&(e="\\dotsb"),e});xD={")":!0,"]":!0,"\\rbrack":!0,"\\}":!0,"\\rbrace":!0,"\\rangle":!0,"\\rceil":!0,"\\rfloor":!0,"\\rgroup":!0,"\\rmoustache":!0,"\\right":!0,"\\bigr":!0,"\\biggr":!0,"\\Bigr":!0,"\\Biggr":!0,$:!0,";":!0,".":!0,",":!0};ce("\\dotso",function(t){var e=t.future().text;return e in xD?"\\ldots\\,":"\\ldots"});ce("\\dotsc",function(t){var e=t.future().text;return e in xD&&e!==","?"\\ldots\\,":"\\ldots"});ce("\\cdots",function(t){var e=t.future().text;return e in xD?"\\@cdots\\,":"\\@cdots"});ce("\\dotsb","\\cdots");ce("\\dotsm","\\cdots");ce("\\dotsi","\\!\\cdots");ce("\\dotsx","\\ldots\\,");ce("\\DOTSI","\\relax");ce("\\DOTSB","\\relax");ce("\\DOTSX","\\relax");ce("\\tmspace","\\TextOrMath{\\kern#1#3}{\\mskip#1#2}\\relax");ce("\\,","\\tmspace+{3mu}{.1667em}");ce("\\thinspace","\\,");ce("\\>","\\mskip{4mu}");ce("\\:","\\tmspace+{4mu}{.2222em}");ce("\\medspace","\\:");ce("\\;","\\tmspace+{5mu}{.2777em}");ce("\\thickspace","\\;");ce("\\!","\\tmspace-{3mu}{.1667em}");ce("\\negthinspace","\\!");ce("\\negmedspace","\\tmspace-{4mu}{.2222em}");ce("\\negthickspace","\\tmspace-{5mu}{.277em}");ce("\\enspace","\\kern.5em ");ce("\\enskip","\\hskip.5em\\relax");ce("\\quad","\\hskip1em\\relax");ce("\\qquad","\\hskip2em\\relax");ce("\\tag","\\@ifstar\\tag@literal\\tag@paren");ce("\\tag@paren","\\tag@literal{({#1})}");ce("\\tag@literal",t=>{if(t.macros.get("\\df@tag"))throw new ht("Multiple \\tag");return"\\gdef\\df@tag{\\text{#1}}"});ce("\\bmod","\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}\\mathbin{\\rm mod}\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}");ce("\\pod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern8mu}{\\mkern8mu}{\\mkern8mu}(#1)");ce("\\pmod","\\pod{{\\rm mod}\\mkern6mu#1}");ce("\\mod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern12mu}{\\mkern12mu}{\\mkern12mu}{\\rm mod}\\,\\,#1");ce("\\newline","\\\\\\relax");ce("\\TeX","\\textrm{\\html@mathml{T\\kern-.1667em\\raisebox{-.5ex}{E}\\kern-.125emX}{TeX}}");HZ=mt($u["Main-Regular"][84][1]-.7*$u["Main-Regular"][65][1]);ce("\\LaTeX","\\textrm{\\html@mathml{"+("L\\kern-.36em\\raisebox{"+HZ+"}{\\scriptstyle A}")+"\\kern-.15em\\TeX}{LaTeX}}");ce("\\KaTeX","\\textrm{\\html@mathml{"+("K\\kern-.17em\\raisebox{"+HZ+"}{\\scriptstyle A}")+"\\kern-.15em\\TeX}{KaTeX}}");ce("\\hspace","\\@ifstar\\@hspacer\\@hspace");ce("\\@hspace","\\hskip #1\\relax");ce("\\@hspacer","\\rule{0pt}{0pt}\\hskip #1\\relax");ce("\\ordinarycolon",":");ce("\\vcentcolon","\\mathrel{\\mathop\\ordinarycolon}");ce("\\dblcolon",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-.9mu}\\vcentcolon}}{\\mathop{\\char"2237}}');ce("\\coloneqq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2254}}');ce("\\Coloneqq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2237\\char"3d}}');ce("\\coloneq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"3a\\char"2212}}');ce("\\Coloneq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"2237\\char"2212}}');ce("\\eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2255}}');ce("\\Eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"3d\\char"2237}}');ce("\\eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2239}}');ce("\\Eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"2212\\char"2237}}');ce("\\colonapprox",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"3a\\char"2248}}');ce("\\Colonapprox",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"2237\\char"2248}}');ce("\\colonsim",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"3a\\char"223c}}');ce("\\Colonsim",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"2237\\char"223c}}');ce("\u2237","\\dblcolon");ce("\u2239","\\eqcolon");ce("\u2254","\\coloneqq");ce("\u2255","\\eqqcolon");ce("\u2A74","\\Coloneqq");ce("\\ratio","\\vcentcolon");ce("\\coloncolon","\\dblcolon");ce("\\colonequals","\\coloneqq");ce("\\coloncolonequals","\\Coloneqq");ce("\\equalscolon","\\eqqcolon");ce("\\equalscoloncolon","\\Eqqcolon");ce("\\colonminus","\\coloneq");ce("\\coloncolonminus","\\Coloneq");ce("\\minuscolon","\\eqcolon");ce("\\minuscoloncolon","\\Eqcolon");ce("\\coloncolonapprox","\\Colonapprox");ce("\\coloncolonsim","\\Colonsim");ce("\\simcolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\vcentcolon}");ce("\\simcoloncolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\dblcolon}");ce("\\approxcolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\vcentcolon}");ce("\\approxcoloncolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\dblcolon}");ce("\\notni","\\html@mathml{\\not\\ni}{\\mathrel{\\char`\u220C}}");ce("\\limsup","\\DOTSB\\operatorname*{lim\\,sup}");ce("\\liminf","\\DOTSB\\operatorname*{lim\\,inf}");ce("\\injlim","\\DOTSB\\operatorname*{inj\\,lim}");ce("\\projlim","\\DOTSB\\operatorname*{proj\\,lim}");ce("\\varlimsup","\\DOTSB\\operatorname*{\\overline{lim}}");ce("\\varliminf","\\DOTSB\\operatorname*{\\underline{lim}}");ce("\\varinjlim","\\DOTSB\\operatorname*{\\underrightarrow{lim}}");ce("\\varprojlim","\\DOTSB\\operatorname*{\\underleftarrow{lim}}");ce("\\gvertneqq","\\html@mathml{\\@gvertneqq}{\u2269}");ce("\\lvertneqq","\\html@mathml{\\@lvertneqq}{\u2268}");ce("\\ngeqq","\\html@mathml{\\@ngeqq}{\u2271}");ce("\\ngeqslant","\\html@mathml{\\@ngeqslant}{\u2271}");ce("\\nleqq","\\html@mathml{\\@nleqq}{\u2270}");ce("\\nleqslant","\\html@mathml{\\@nleqslant}{\u2270}");ce("\\nshortmid","\\html@mathml{\\@nshortmid}{\u2224}");ce("\\nshortparallel","\\html@mathml{\\@nshortparallel}{\u2226}");ce("\\nsubseteqq","\\html@mathml{\\@nsubseteqq}{\u2288}");ce("\\nsupseteqq","\\html@mathml{\\@nsupseteqq}{\u2289}");ce("\\varsubsetneq","\\html@mathml{\\@varsubsetneq}{\u228A}");ce("\\varsubsetneqq","\\html@mathml{\\@varsubsetneqq}{\u2ACB}");ce("\\varsupsetneq","\\html@mathml{\\@varsupsetneq}{\u228B}");ce("\\varsupsetneqq","\\html@mathml{\\@varsupsetneqq}{\u2ACC}");ce("\\imath","\\html@mathml{\\@imath}{\u0131}");ce("\\jmath","\\html@mathml{\\@jmath}{\u0237}");ce("\\llbracket","\\html@mathml{\\mathopen{[\\mkern-3.2mu[}}{\\mathopen{\\char`\u27E6}}");ce("\\rrbracket","\\html@mathml{\\mathclose{]\\mkern-3.2mu]}}{\\mathclose{\\char`\u27E7}}");ce("\u27E6","\\llbracket");ce("\u27E7","\\rrbracket");ce("\\lBrace","\\html@mathml{\\mathopen{\\{\\mkern-3.2mu[}}{\\mathopen{\\char`\u2983}}");ce("\\rBrace","\\html@mathml{\\mathclose{]\\mkern-3.2mu\\}}}{\\mathclose{\\char`\u2984}}");ce("\u2983","\\lBrace");ce("\u2984","\\rBrace");ce("\\minuso","\\mathbin{\\html@mathml{{\\mathrlap{\\mathchoice{\\kern{0.145em}}{\\kern{0.145em}}{\\kern{0.1015em}}{\\kern{0.0725em}}\\circ}{-}}}{\\char`\u29B5}}");ce("\u29B5","\\minuso");ce("\\darr","\\downarrow");ce("\\dArr","\\Downarrow");ce("\\Darr","\\Downarrow");ce("\\lang","\\langle");ce("\\rang","\\rangle");ce("\\uarr","\\uparrow");ce("\\uArr","\\Uparrow");ce("\\Uarr","\\Uparrow");ce("\\N","\\mathbb{N}");ce("\\R","\\mathbb{R}");ce("\\Z","\\mathbb{Z}");ce("\\alef","\\aleph");ce("\\alefsym","\\aleph");ce("\\Alpha","\\mathrm{A}");ce("\\Beta","\\mathrm{B}");ce("\\bull","\\bullet");ce("\\Chi","\\mathrm{X}");ce("\\clubs","\\clubsuit");ce("\\cnums","\\mathbb{C}");ce("\\Complex","\\mathbb{C}");ce("\\Dagger","\\ddagger");ce("\\diamonds","\\diamondsuit");ce("\\empty","\\emptyset");ce("\\Epsilon","\\mathrm{E}");ce("\\Eta","\\mathrm{H}");ce("\\exist","\\exists");ce("\\harr","\\leftrightarrow");ce("\\hArr","\\Leftrightarrow");ce("\\Harr","\\Leftrightarrow");ce("\\hearts","\\heartsuit");ce("\\image","\\Im");ce("\\infin","\\infty");ce("\\Iota","\\mathrm{I}");ce("\\isin","\\in");ce("\\Kappa","\\mathrm{K}");ce("\\larr","\\leftarrow");ce("\\lArr","\\Leftarrow");ce("\\Larr","\\Leftarrow");ce("\\lrarr","\\leftrightarrow");ce("\\lrArr","\\Leftrightarrow");ce("\\Lrarr","\\Leftrightarrow");ce("\\Mu","\\mathrm{M}");ce("\\natnums","\\mathbb{N}");ce("\\Nu","\\mathrm{N}");ce("\\Omicron","\\mathrm{O}");ce("\\plusmn","\\pm");ce("\\rarr","\\rightarrow");ce("\\rArr","\\Rightarrow");ce("\\Rarr","\\Rightarrow");ce("\\real","\\Re");ce("\\reals","\\mathbb{R}");ce("\\Reals","\\mathbb{R}");ce("\\Rho","\\mathrm{P}");ce("\\sdot","\\cdot");ce("\\sect","\\S");ce("\\spades","\\spadesuit");ce("\\sub","\\subset");ce("\\sube","\\subseteq");ce("\\supe","\\supseteq");ce("\\Tau","\\mathrm{T}");ce("\\thetasym","\\vartheta");ce("\\weierp","\\wp");ce("\\Zeta","\\mathrm{Z}");ce("\\argmin","\\DOTSB\\operatorname*{arg\\,min}");ce("\\argmax","\\DOTSB\\operatorname*{arg\\,max}");ce("\\plim","\\DOTSB\\mathop{\\operatorname{plim}}\\limits");ce("\\bra","\\mathinner{\\langle{#1}|}");ce("\\ket","\\mathinner{|{#1}\\rangle}");ce("\\braket","\\mathinner{\\langle{#1}\\rangle}");ce("\\Bra","\\left\\langle#1\\right|");ce("\\Ket","\\left|#1\\right\\rangle");WZ=t=>e=>{var r=e.consumeArg().tokens,n=e.consumeArg().tokens,a=e.consumeArg().tokens,i=e.consumeArg().tokens,s=e.macros.get("|"),o=e.macros.get("\\|");e.macros.beginGroup();var l=f=>d=>{t&&(d.macros.set("|",s),a.length&&d.macros.set("\\|",o));var p=f;if(!f&&a.length){var m=d.future();m.text==="|"&&(d.popToken(),p=!0)}return{tokens:p?a:n,numArgs:0}};e.macros.set("|",l(!1)),a.length&&e.macros.set("\\|",l(!0));var u=e.consumeArg().tokens,h=e.expandTokens([...i,...u,...r]);return e.macros.endGroup(),{tokens:h.reverse(),numArgs:0}};ce("\\bra@ket",WZ(!1));ce("\\bra@set",WZ(!0));ce("\\Braket","\\bra@ket{\\left\\langle}{\\,\\middle\\vert\\,}{\\,\\middle\\vert\\,}{\\right\\rangle}");ce("\\Set","\\bra@set{\\left\\{\\:}{\\;\\middle\\vert\\;}{\\;\\middle\\Vert\\;}{\\:\\right\\}}");ce("\\set","\\bra@set{\\{\\,}{\\mid}{}{\\,\\}}");ce("\\angln","{\\angl n}");ce("\\blue","\\textcolor{##6495ed}{#1}");ce("\\orange","\\textcolor{##ffa500}{#1}");ce("\\pink","\\textcolor{##ff00af}{#1}");ce("\\red","\\textcolor{##df0030}{#1}");ce("\\green","\\textcolor{##28ae7b}{#1}");ce("\\gray","\\textcolor{gray}{#1}");ce("\\purple","\\textcolor{##9d38bd}{#1}");ce("\\blueA","\\textcolor{##ccfaff}{#1}");ce("\\blueB","\\textcolor{##80f6ff}{#1}");ce("\\blueC","\\textcolor{##63d9ea}{#1}");ce("\\blueD","\\textcolor{##11accd}{#1}");ce("\\blueE","\\textcolor{##0c7f99}{#1}");ce("\\tealA","\\textcolor{##94fff5}{#1}");ce("\\tealB","\\textcolor{##26edd5}{#1}");ce("\\tealC","\\textcolor{##01d1c1}{#1}");ce("\\tealD","\\textcolor{##01a995}{#1}");ce("\\tealE","\\textcolor{##208170}{#1}");ce("\\greenA","\\textcolor{##b6ffb0}{#1}");ce("\\greenB","\\textcolor{##8af281}{#1}");ce("\\greenC","\\textcolor{##74cf70}{#1}");ce("\\greenD","\\textcolor{##1fab54}{#1}");ce("\\greenE","\\textcolor{##0d923f}{#1}");ce("\\goldA","\\textcolor{##ffd0a9}{#1}");ce("\\goldB","\\textcolor{##ffbb71}{#1}");ce("\\goldC","\\textcolor{##ff9c39}{#1}");ce("\\goldD","\\textcolor{##e07d10}{#1}");ce("\\goldE","\\textcolor{##a75a05}{#1}");ce("\\redA","\\textcolor{##fca9a9}{#1}");ce("\\redB","\\textcolor{##ff8482}{#1}");ce("\\redC","\\textcolor{##f9685d}{#1}");ce("\\redD","\\textcolor{##e84d39}{#1}");ce("\\redE","\\textcolor{##bc2612}{#1}");ce("\\maroonA","\\textcolor{##ffbde0}{#1}");ce("\\maroonB","\\textcolor{##ff92c6}{#1}");ce("\\maroonC","\\textcolor{##ed5fa6}{#1}");ce("\\maroonD","\\textcolor{##ca337c}{#1}");ce("\\maroonE","\\textcolor{##9e034e}{#1}");ce("\\purpleA","\\textcolor{##ddd7ff}{#1}");ce("\\purpleB","\\textcolor{##c6b9fc}{#1}");ce("\\purpleC","\\textcolor{##aa87ff}{#1}");ce("\\purpleD","\\textcolor{##7854ab}{#1}");ce("\\purpleE","\\textcolor{##543b78}{#1}");ce("\\mintA","\\textcolor{##f5f9e8}{#1}");ce("\\mintB","\\textcolor{##edf2df}{#1}");ce("\\mintC","\\textcolor{##e0e5cc}{#1}");ce("\\grayA","\\textcolor{##f6f7f7}{#1}");ce("\\grayB","\\textcolor{##f0f1f2}{#1}");ce("\\grayC","\\textcolor{##e3e5e6}{#1}");ce("\\grayD","\\textcolor{##d6d8da}{#1}");ce("\\grayE","\\textcolor{##babec2}{#1}");ce("\\grayF","\\textcolor{##888d93}{#1}");ce("\\grayG","\\textcolor{##626569}{#1}");ce("\\grayH","\\textcolor{##3b3e40}{#1}");ce("\\grayI","\\textcolor{##21242c}{#1}");ce("\\kaBlue","\\textcolor{##314453}{#1}");ce("\\kaGreen","\\textcolor{##71B307}{#1}");YZ={"^":!0,_:!0,"\\limits":!0,"\\nolimits":!0},sD=class{constructor(e,r,n){this.settings=void 0,this.expansionCount=void 0,this.lexer=void 0,this.macros=void 0,this.stack=void 0,this.mode=void 0,this.settings=r,this.expansionCount=0,this.feed(e),this.macros=new iD(FBe,r.macros),this.mode=n,this.stack=[]}feed(e){this.lexer=new fT(e,this.settings)}switchMode(e){this.mode=e}beginGroup(){this.macros.beginGroup()}endGroup(){this.macros.endGroup()}endGroups(){this.macros.endGroups()}future(){return this.stack.length===0&&this.pushToken(this.lexer.lex()),this.stack[this.stack.length-1]}popToken(){return this.future(),this.stack.pop()}pushToken(e){this.stack.push(e)}pushTokens(e){this.stack.push(...e)}scanArgument(e){var r,n,a;if(e){if(this.consumeSpaces(),this.future().text!=="[")return null;r=this.popToken(),{tokens:a,end:n}=this.consumeArg(["]"])}else({tokens:a,start:r,end:n}=this.consumeArg());return this.pushToken(new Io("EOF",n.loc)),this.pushTokens(a),new Io("",Zs.range(r,n))}consumeSpaces(){for(;;){var e=this.future();if(e.text===" ")this.stack.pop();else break}}consumeArg(e){var r=[],n=e&&e.length>0;n||this.consumeSpaces();var a=this.future(),i,s=0,o=0;do{if(i=this.popToken(),r.push(i),i.text==="{")++s;else if(i.text==="}"){if(--s,s===-1)throw new ht("Extra }",i)}else if(i.text==="EOF")throw new ht("Unexpected end of input in a macro argument, expected '"+(e&&n?e[o]:"}")+"'",i);if(e&&n)if((s===0||s===1&&e[o]==="{")&&i.text===e[o]){if(++o,o===e.length){r.splice(-o,o);break}}else o=0}while(s!==0||n);return a.text==="{"&&r[r.length-1].text==="}"&&(r.pop(),r.shift()),r.reverse(),{tokens:r,start:a,end:i}}consumeArgs(e,r){if(r){if(r.length!==e+1)throw new ht("The length of delimiters doesn't match the number of args!");for(var n=r[0],a=0;athis.settings.maxExpand)throw new ht("Too many expansions: infinite loop or need to increase maxExpand setting")}expandOnce(e){var r=this.popToken(),n=r.text,a=r.noexpand?null:this._getExpansion(n);if(a==null||e&&a.unexpandable){if(e&&a==null&&n[0]==="\\"&&!this.isDefined(n))throw new ht("Undefined control sequence: "+n);return this.pushToken(r),!1}this.countExpansion(1);var i=a.tokens,s=this.consumeArgs(a.numArgs,a.delimiters);if(a.numArgs){i=i.slice();for(var o=i.length-1;o>=0;--o){var l=i[o];if(l.text==="#"){if(o===0)throw new ht("Incomplete placeholder at end of macro body",l);if(l=i[--o],l.text==="#")i.splice(o+1,1);else if(/^[1-9]$/.test(l.text))i.splice(o,2,...s[+l.text-1]);else throw new ht("Not a valid argument number",l)}}}return this.pushTokens(i),i.length}expandAfterFuture(){return this.expandOnce(),this.future()}expandNextToken(){for(;;)if(this.expandOnce()===!1){var e=this.stack.pop();return e.treatAsRelax&&(e.text="\\relax"),e}}expandMacro(e){return this.macros.has(e)?this.expandTokens([new Io(e)]):void 0}expandTokens(e){var r=[],n=this.stack.length;for(this.pushTokens(e);this.stack.length>n;)if(this.expandOnce(!0)===!1){var a=this.stack.pop();a.treatAsRelax&&(a.noexpand=!1,a.treatAsRelax=!1),r.push(a)}return this.countExpansion(r.length),r}expandMacroAsText(e){var r=this.expandMacro(e);return r&&r.map(n=>n.text).join("")}_getExpansion(e){var r=this.macros.get(e);if(r==null)return r;if(e.length===1){var n=this.lexer.catcodes[e];if(n!=null&&n!==13)return}var a=typeof r=="function"?r(this):r;if(typeof a=="string"){var i=0;if(a.includes("#"))for(var s=a.replace(/##/g,"");s.includes("#"+(i+1));)++i;for(var o=new fT(a,this.settings),l=[],u=o.lex();u.text!=="EOF";)l.push(u),u=o.lex();l.reverse();var h={tokens:l,numArgs:i};return h}return a}isDefined(e){return this.macros.has(e)||Mf.hasOwnProperty(e)||$n.math.hasOwnProperty(e)||$n.text.hasOwnProperty(e)||YZ.hasOwnProperty(e)}isExpandable(e){var r=this.macros.get(e);return r!=null?typeof r=="string"||typeof r=="function"||!r.unexpandable:Mf.hasOwnProperty(e)&&!Mf[e].primitive}},QK=/^[₊₋₌₍₎₀₁₂₃₄₅₆₇₈₉ₐₑₕᵢⱼₖₗₘₙₒₚᵣₛₜᵤᵥₓᵦᵧᵨᵩᵪ]/,tT=Object.freeze({"\u208A":"+","\u208B":"-","\u208C":"=","\u208D":"(","\u208E":")","\u2080":"0","\u2081":"1","\u2082":"2","\u2083":"3","\u2084":"4","\u2085":"5","\u2086":"6","\u2087":"7","\u2088":"8","\u2089":"9","\u2090":"a","\u2091":"e","\u2095":"h","\u1D62":"i","\u2C7C":"j","\u2096":"k","\u2097":"l","\u2098":"m","\u2099":"n","\u2092":"o","\u209A":"p","\u1D63":"r","\u209B":"s","\u209C":"t","\u1D64":"u","\u1D65":"v","\u2093":"x","\u1D66":"\u03B2","\u1D67":"\u03B3","\u1D68":"\u03C1","\u1D69":"\u03D5","\u1D6A":"\u03C7","\u207A":"+","\u207B":"-","\u207C":"=","\u207D":"(","\u207E":")","\u2070":"0","\xB9":"1","\xB2":"2","\xB3":"3","\u2074":"4","\u2075":"5","\u2076":"6","\u2077":"7","\u2078":"8","\u2079":"9","\u1D2C":"A","\u1D2E":"B","\u1D30":"D","\u1D31":"E","\u1D33":"G","\u1D34":"H","\u1D35":"I","\u1D36":"J","\u1D37":"K","\u1D38":"L","\u1D39":"M","\u1D3A":"N","\u1D3C":"O","\u1D3E":"P","\u1D3F":"R","\u1D40":"T","\u1D41":"U","\u2C7D":"V","\u1D42":"W","\u1D43":"a","\u1D47":"b","\u1D9C":"c","\u1D48":"d","\u1D49":"e","\u1DA0":"f","\u1D4D":"g",\u02B0:"h","\u2071":"i",\u02B2:"j","\u1D4F":"k",\u02E1:"l","\u1D50":"m",\u207F:"n","\u1D52":"o","\u1D56":"p",\u02B3:"r",\u02E2:"s","\u1D57":"t","\u1D58":"u","\u1D5B":"v",\u02B7:"w",\u02E3:"x",\u02B8:"y","\u1DBB":"z","\u1D5D":"\u03B2","\u1D5E":"\u03B3","\u1D5F":"\u03B4","\u1D60":"\u03D5","\u1D61":"\u03C7","\u1DBF":"\u03B8"}),$I={"\u0301":{text:"\\'",math:"\\acute"},"\u0300":{text:"\\`",math:"\\grave"},"\u0308":{text:'\\"',math:"\\ddot"},"\u0303":{text:"\\~",math:"\\tilde"},"\u0304":{text:"\\=",math:"\\bar"},"\u0306":{text:"\\u",math:"\\breve"},"\u030C":{text:"\\v",math:"\\check"},"\u0302":{text:"\\^",math:"\\hat"},"\u0307":{text:"\\.",math:"\\dot"},"\u030A":{text:"\\r",math:"\\mathring"},"\u030B":{text:"\\H"},"\u0327":{text:"\\c"}},JK={\u00E1:"a\u0301",\u00E0:"a\u0300",\u00E4:"a\u0308",\u01DF:"a\u0308\u0304",\u00E3:"a\u0303",\u0101:"a\u0304",\u0103:"a\u0306",\u1EAF:"a\u0306\u0301",\u1EB1:"a\u0306\u0300",\u1EB5:"a\u0306\u0303",\u01CE:"a\u030C",\u00E2:"a\u0302",\u1EA5:"a\u0302\u0301",\u1EA7:"a\u0302\u0300",\u1EAB:"a\u0302\u0303",\u0227:"a\u0307",\u01E1:"a\u0307\u0304",\u00E5:"a\u030A",\u01FB:"a\u030A\u0301",\u1E03:"b\u0307",\u0107:"c\u0301",\u1E09:"c\u0327\u0301",\u010D:"c\u030C",\u0109:"c\u0302",\u010B:"c\u0307",\u00E7:"c\u0327",\u010F:"d\u030C",\u1E0B:"d\u0307",\u1E11:"d\u0327",\u00E9:"e\u0301",\u00E8:"e\u0300",\u00EB:"e\u0308",\u1EBD:"e\u0303",\u0113:"e\u0304",\u1E17:"e\u0304\u0301",\u1E15:"e\u0304\u0300",\u0115:"e\u0306",\u1E1D:"e\u0327\u0306",\u011B:"e\u030C",\u00EA:"e\u0302",\u1EBF:"e\u0302\u0301",\u1EC1:"e\u0302\u0300",\u1EC5:"e\u0302\u0303",\u0117:"e\u0307",\u0229:"e\u0327",\u1E1F:"f\u0307",\u01F5:"g\u0301",\u1E21:"g\u0304",\u011F:"g\u0306",\u01E7:"g\u030C",\u011D:"g\u0302",\u0121:"g\u0307",\u0123:"g\u0327",\u1E27:"h\u0308",\u021F:"h\u030C",\u0125:"h\u0302",\u1E23:"h\u0307",\u1E29:"h\u0327",\u00ED:"i\u0301",\u00EC:"i\u0300",\u00EF:"i\u0308",\u1E2F:"i\u0308\u0301",\u0129:"i\u0303",\u012B:"i\u0304",\u012D:"i\u0306",\u01D0:"i\u030C",\u00EE:"i\u0302",\u01F0:"j\u030C",\u0135:"j\u0302",\u1E31:"k\u0301",\u01E9:"k\u030C",\u0137:"k\u0327",\u013A:"l\u0301",\u013E:"l\u030C",\u013C:"l\u0327",\u1E3F:"m\u0301",\u1E41:"m\u0307",\u0144:"n\u0301",\u01F9:"n\u0300",\u00F1:"n\u0303",\u0148:"n\u030C",\u1E45:"n\u0307",\u0146:"n\u0327",\u00F3:"o\u0301",\u00F2:"o\u0300",\u00F6:"o\u0308",\u022B:"o\u0308\u0304",\u00F5:"o\u0303",\u1E4D:"o\u0303\u0301",\u1E4F:"o\u0303\u0308",\u022D:"o\u0303\u0304",\u014D:"o\u0304",\u1E53:"o\u0304\u0301",\u1E51:"o\u0304\u0300",\u014F:"o\u0306",\u01D2:"o\u030C",\u00F4:"o\u0302",\u1ED1:"o\u0302\u0301",\u1ED3:"o\u0302\u0300",\u1ED7:"o\u0302\u0303",\u022F:"o\u0307",\u0231:"o\u0307\u0304",\u0151:"o\u030B",\u1E55:"p\u0301",\u1E57:"p\u0307",\u0155:"r\u0301",\u0159:"r\u030C",\u1E59:"r\u0307",\u0157:"r\u0327",\u015B:"s\u0301",\u1E65:"s\u0301\u0307",\u0161:"s\u030C",\u1E67:"s\u030C\u0307",\u015D:"s\u0302",\u1E61:"s\u0307",\u015F:"s\u0327",\u1E97:"t\u0308",\u0165:"t\u030C",\u1E6B:"t\u0307",\u0163:"t\u0327",\u00FA:"u\u0301",\u00F9:"u\u0300",\u00FC:"u\u0308",\u01D8:"u\u0308\u0301",\u01DC:"u\u0308\u0300",\u01D6:"u\u0308\u0304",\u01DA:"u\u0308\u030C",\u0169:"u\u0303",\u1E79:"u\u0303\u0301",\u016B:"u\u0304",\u1E7B:"u\u0304\u0308",\u016D:"u\u0306",\u01D4:"u\u030C",\u00FB:"u\u0302",\u016F:"u\u030A",\u0171:"u\u030B",\u1E7D:"v\u0303",\u1E83:"w\u0301",\u1E81:"w\u0300",\u1E85:"w\u0308",\u0175:"w\u0302",\u1E87:"w\u0307",\u1E98:"w\u030A",\u1E8D:"x\u0308",\u1E8B:"x\u0307",\u00FD:"y\u0301",\u1EF3:"y\u0300",\u00FF:"y\u0308",\u1EF9:"y\u0303",\u0233:"y\u0304",\u0177:"y\u0302",\u1E8F:"y\u0307",\u1E99:"y\u030A",\u017A:"z\u0301",\u017E:"z\u030C",\u1E91:"z\u0302",\u017C:"z\u0307",\u00C1:"A\u0301",\u00C0:"A\u0300",\u00C4:"A\u0308",\u01DE:"A\u0308\u0304",\u00C3:"A\u0303",\u0100:"A\u0304",\u0102:"A\u0306",\u1EAE:"A\u0306\u0301",\u1EB0:"A\u0306\u0300",\u1EB4:"A\u0306\u0303",\u01CD:"A\u030C",\u00C2:"A\u0302",\u1EA4:"A\u0302\u0301",\u1EA6:"A\u0302\u0300",\u1EAA:"A\u0302\u0303",\u0226:"A\u0307",\u01E0:"A\u0307\u0304",\u00C5:"A\u030A",\u01FA:"A\u030A\u0301",\u1E02:"B\u0307",\u0106:"C\u0301",\u1E08:"C\u0327\u0301",\u010C:"C\u030C",\u0108:"C\u0302",\u010A:"C\u0307",\u00C7:"C\u0327",\u010E:"D\u030C",\u1E0A:"D\u0307",\u1E10:"D\u0327",\u00C9:"E\u0301",\u00C8:"E\u0300",\u00CB:"E\u0308",\u1EBC:"E\u0303",\u0112:"E\u0304",\u1E16:"E\u0304\u0301",\u1E14:"E\u0304\u0300",\u0114:"E\u0306",\u1E1C:"E\u0327\u0306",\u011A:"E\u030C",\u00CA:"E\u0302",\u1EBE:"E\u0302\u0301",\u1EC0:"E\u0302\u0300",\u1EC4:"E\u0302\u0303",\u0116:"E\u0307",\u0228:"E\u0327",\u1E1E:"F\u0307",\u01F4:"G\u0301",\u1E20:"G\u0304",\u011E:"G\u0306",\u01E6:"G\u030C",\u011C:"G\u0302",\u0120:"G\u0307",\u0122:"G\u0327",\u1E26:"H\u0308",\u021E:"H\u030C",\u0124:"H\u0302",\u1E22:"H\u0307",\u1E28:"H\u0327",\u00CD:"I\u0301",\u00CC:"I\u0300",\u00CF:"I\u0308",\u1E2E:"I\u0308\u0301",\u0128:"I\u0303",\u012A:"I\u0304",\u012C:"I\u0306",\u01CF:"I\u030C",\u00CE:"I\u0302",\u0130:"I\u0307",\u0134:"J\u0302",\u1E30:"K\u0301",\u01E8:"K\u030C",\u0136:"K\u0327",\u0139:"L\u0301",\u013D:"L\u030C",\u013B:"L\u0327",\u1E3E:"M\u0301",\u1E40:"M\u0307",\u0143:"N\u0301",\u01F8:"N\u0300",\u00D1:"N\u0303",\u0147:"N\u030C",\u1E44:"N\u0307",\u0145:"N\u0327",\u00D3:"O\u0301",\u00D2:"O\u0300",\u00D6:"O\u0308",\u022A:"O\u0308\u0304",\u00D5:"O\u0303",\u1E4C:"O\u0303\u0301",\u1E4E:"O\u0303\u0308",\u022C:"O\u0303\u0304",\u014C:"O\u0304",\u1E52:"O\u0304\u0301",\u1E50:"O\u0304\u0300",\u014E:"O\u0306",\u01D1:"O\u030C",\u00D4:"O\u0302",\u1ED0:"O\u0302\u0301",\u1ED2:"O\u0302\u0300",\u1ED6:"O\u0302\u0303",\u022E:"O\u0307",\u0230:"O\u0307\u0304",\u0150:"O\u030B",\u1E54:"P\u0301",\u1E56:"P\u0307",\u0154:"R\u0301",\u0158:"R\u030C",\u1E58:"R\u0307",\u0156:"R\u0327",\u015A:"S\u0301",\u1E64:"S\u0301\u0307",\u0160:"S\u030C",\u1E66:"S\u030C\u0307",\u015C:"S\u0302",\u1E60:"S\u0307",\u015E:"S\u0327",\u0164:"T\u030C",\u1E6A:"T\u0307",\u0162:"T\u0327",\u00DA:"U\u0301",\u00D9:"U\u0300",\u00DC:"U\u0308",\u01D7:"U\u0308\u0301",\u01DB:"U\u0308\u0300",\u01D5:"U\u0308\u0304",\u01D9:"U\u0308\u030C",\u0168:"U\u0303",\u1E78:"U\u0303\u0301",\u016A:"U\u0304",\u1E7A:"U\u0304\u0308",\u016C:"U\u0306",\u01D3:"U\u030C",\u00DB:"U\u0302",\u016E:"U\u030A",\u0170:"U\u030B",\u1E7C:"V\u0303",\u1E82:"W\u0301",\u1E80:"W\u0300",\u1E84:"W\u0308",\u0174:"W\u0302",\u1E86:"W\u0307",\u1E8C:"X\u0308",\u1E8A:"X\u0307",\u00DD:"Y\u0301",\u1EF2:"Y\u0300",\u0178:"Y\u0308",\u1EF8:"Y\u0303",\u0232:"Y\u0304",\u0176:"Y\u0302",\u1E8E:"Y\u0307",\u0179:"Z\u0301",\u017D:"Z\u030C",\u1E90:"Z\u0302",\u017B:"Z\u0307",\u03AC:"\u03B1\u0301",\u1F70:"\u03B1\u0300",\u1FB1:"\u03B1\u0304",\u1FB0:"\u03B1\u0306",\u03AD:"\u03B5\u0301",\u1F72:"\u03B5\u0300",\u03AE:"\u03B7\u0301",\u1F74:"\u03B7\u0300",\u03AF:"\u03B9\u0301",\u1F76:"\u03B9\u0300",\u03CA:"\u03B9\u0308",\u0390:"\u03B9\u0308\u0301",\u1FD2:"\u03B9\u0308\u0300",\u1FD1:"\u03B9\u0304",\u1FD0:"\u03B9\u0306",\u03CC:"\u03BF\u0301",\u1F78:"\u03BF\u0300",\u03CD:"\u03C5\u0301",\u1F7A:"\u03C5\u0300",\u03CB:"\u03C5\u0308",\u03B0:"\u03C5\u0308\u0301",\u1FE2:"\u03C5\u0308\u0300",\u1FE1:"\u03C5\u0304",\u1FE0:"\u03C5\u0306",\u03CE:"\u03C9\u0301",\u1F7C:"\u03C9\u0300",\u038E:"\u03A5\u0301",\u1FEA:"\u03A5\u0300",\u03AB:"\u03A5\u0308",\u1FE9:"\u03A5\u0304",\u1FE8:"\u03A5\u0306",\u038F:"\u03A9\u0301",\u1FFA:"\u03A9\u0300"},dT=class t{constructor(e,r){this.mode=void 0,this.gullet=void 0,this.settings=void 0,this.leftrightDepth=void 0,this.nextToken=void 0,this.mode="math",this.gullet=new sD(e,r,this.mode),this.settings=r,this.leftrightDepth=0,this.nextToken=null}expect(e,r){if(r===void 0&&(r=!0),this.fetch().text!==e)throw new ht("Expected '"+e+"', got '"+this.fetch().text+"'",this.fetch());r&&this.consume()}consume(){this.nextToken=null}fetch(){return this.nextToken==null&&(this.nextToken=this.gullet.expandNextToken()),this.nextToken}switchMode(e){this.mode=e,this.gullet.switchMode(e)}parse(){this.settings.globalGroup||this.gullet.beginGroup(),this.settings.colorIsTextColor&&this.gullet.macros.set("\\color","\\textcolor");try{var e=this.parseExpression(!1);return this.expect("EOF"),this.settings.globalGroup||this.gullet.endGroup(),e}finally{this.gullet.endGroups()}}subparse(e){var r=this.nextToken;this.consume(),this.gullet.pushToken(new Io("}")),this.gullet.pushTokens(e);var n=this.parseExpression(!1);return this.expect("}"),this.nextToken=r,n}parseExpression(e,r){for(var n=[];;){this.mode==="math"&&this.consumeSpaces();var a=this.fetch();if(t.endOfExpression.has(a.text)||r&&a.text===r||e&&Mf[a.text]&&Mf[a.text].infix)break;var i=this.parseAtom(r);if(i){if(i.type==="internal")continue}else break;n.push(i)}return this.mode==="text"&&this.formLigatures(n),this.handleInfixNodes(n)}handleInfixNodes(e){for(var r=-1,n,a=0;a=128)this.settings.strict&&(eZ(r.charCodeAt(0))?this.mode==="math"&&this.settings.reportNonstrict("unicodeTextInMathMode",'Unicode text character "'+r[0]+'" used in math mode',e):this.settings.reportNonstrict("unknownSymbol",'Unrecognized Unicode character "'+r[0]+'"'+(" ("+r.charCodeAt(0)+")"),e)),s={type:"textord",mode:"text",loc:Zs.range(e),text:r};else return null;if(this.consume(),i)for(var h=0;h{e instanceof Element&&e.tagName==="A"&&e.hasAttribute("target")&&e.setAttribute(t,e.getAttribute("target")??"")}),Df.addHook("afterSanitizeAttributes",e=>{e instanceof Element&&e.tagName==="A"&&e.hasAttribute(t)&&(e.setAttribute("target",e.getAttribute(t)??""),e.removeAttribute(t),e.getAttribute("target")==="_blank"&&e.setAttribute("rel","noopener"))})}var oQ,sQ,x,dp,yh,te,AT,al,CD,jg,GBe,Gg,SD,fp,Ub,_D,lQ,uQ,kD,ra,LT,RT,ws,Ug,UBe,qBe,qg,VBe,HBe,Vg,WBe,pp,Hg,YBe,XBe,Wg,jBe,KBe,Hu,xh,cQ,hQ,ZBe,or,Gb,QBe,mp,Qs,fQ,Xg,$b,IT,dQ,pQ,mQ,AD,LD,wr,gQ,vQ,qb,JBe,rQ,eFe,yQ,gp,tFe,rFe,bQ,nQ,Er,nFe,aFe,iFe,sFe,wQ,oFe,Br,lFe,uFe,Wu,TD,cFe,hFe,aQ,ED,Ha,Kg,Gf,Ze,fFe,dFe,gn,Vl,ST,pFe,mFe,kQ,DT,RD,ID,DD,ND,Cr,Sr,_r,Ar,Lr,Fr,Rr,iQ,gFe,Te,Vb,NT,MT,MD,vFe,_T,Hb,OT,Yg,yFe,ur=A(()=>{oQ=ii(zk(),1);Lo();Lo();Lo();Lo();Lo();Lo();SI();sQ=Object.defineProperty,x=(t,e)=>sQ(t,"name",{value:e,configurable:!0}),dp=(t,e)=>{for(var r in e)sQ(t,r,{get:e[r],enumerable:!0})},yh={trace:0,debug:1,info:2,warn:3,error:4,fatal:5},te={trace:x((...t)=>{},"trace"),debug:x((...t)=>{},"debug"),info:x((...t)=>{},"info"),warn:x((...t)=>{},"warn"),error:x((...t)=>{},"error"),fatal:x((...t)=>{},"fatal")},AT=x(function(t="fatal"){let e=yh.fatal;typeof t=="string"?t.toLowerCase()in yh&&(e=yh[t]):typeof t=="number"&&(e=t),te.trace=()=>{},te.debug=()=>{},te.info=()=>{},te.warn=()=>{},te.error=()=>{},te.fatal=()=>{},e<=yh.fatal&&(te.fatal=console.error?console.error.bind(console,al("FATAL"),"color: orange"):console.log.bind(console,"\x1B[35m",al("FATAL"))),e<=yh.error&&(te.error=console.error?console.error.bind(console,al("ERROR"),"color: orange"):console.log.bind(console,"\x1B[31m",al("ERROR"))),e<=yh.warn&&(te.warn=console.warn?console.warn.bind(console,al("WARN"),"color: orange"):console.log.bind(console,"\x1B[33m",al("WARN"))),e<=yh.info&&(te.info=console.info?console.info.bind(console,al("INFO"),"color: lightblue"):console.log.bind(console,"\x1B[34m",al("INFO"))),e<=yh.debug&&(te.debug=console.debug?console.debug.bind(console,al("DEBUG"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",al("DEBUG"))),e<=yh.trace&&(te.trace=console.debug?console.debug.bind(console,al("TRACE"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",al("TRACE")))},"setLogLevel"),al=x(t=>`%c${(0,oQ.default)().format("ss.SSS")} : ${t} : `,"format"),CD=/^-{3}\s*[\n\r](.*?)[\n\r]-{3}\s*[\n\r]+/s,jg=/%{2}{\s*(?:(\w+)\s*:|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,GBe=/\s*%%.*\n/gm,SD=(Gg=class extends Error{constructor(e){super(e),this.name="UnknownDiagramError"}},x(Gg,"UnknownDiagramError"),Gg),fp={},Ub=x(function(t,e){t=t.replace(CD,"").replace(jg,"").replace(GBe,` -`);for(let[r,{detector:n}]of Object.entries(fp))if(n(t,e))return r;throw new SD(`No diagram type detected matching given configuration for text: ${t}`)},"detectType"),_D=x((...t)=>{for(let{id:e,detector:r,loader:n}of t)lQ(e,r,n)},"registerLazyLoadedDiagrams"),lQ=x((t,e,r)=>{fp[t]&&te.warn(`Detector with key ${t} already exists. Overwriting.`),fp[t]={detector:e,loader:r},te.debug(`Detector with key ${t} added${r?" with loader":""}`)},"addDetector"),uQ=x(t=>fp[t].loader,"getDiagramLoader"),kD=x((t,e,{depth:r=2,clobber:n=!1}={})=>{let a={depth:r,clobber:n};return Array.isArray(e)&&!Array.isArray(t)?(e.forEach(i=>kD(t,i,a)),t):Array.isArray(e)&&Array.isArray(t)?(e.forEach(i=>{t.includes(i)||t.push(i)}),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(i=>{typeof e[i]=="object"&&(t[i]===void 0||typeof t[i]=="object")?(t[i]===void 0&&(t[i]=Array.isArray(e[i])?[]:{}),t[i]=kD(t[i],e[i],{depth:r-1,clobber:n})):(n||typeof t[i]!="object"&&typeof e[i]!="object")&&(t[i]=e[i])}),t)},"assignWithDepth"),ra=kD,LT="#ffffff",RT="#f2f2f2",ws=x((t,e)=>e?Oe(t,{s:-40,l:10}):Oe(t,{s:-40,l:-10}),"mkBorder"),UBe=(Ug=class{constructor(){this.background="#f4f4f4",this.primaryColor="#fff4dd",this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px"}updateColors(){if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||Oe(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||Oe(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||ws(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||ws(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||ws(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||ws(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||vt(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||vt(this.tertiaryColor),this.lineColor=this.lineColor||vt(this.background),this.arrowheadColor=this.arrowheadColor||vt(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?Lt(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||Lt(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||vt(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||wt(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.darkMode?(this.rowOdd=this.rowOdd||Lt(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||Lt(this.mainBkg,10)):(this.rowOdd=this.rowOdd||wt(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||wt(this.mainBkg,5)),this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||this.tertiaryColor,this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||Oe(this.primaryColor,{h:30}),this.cScale4=this.cScale4||Oe(this.primaryColor,{h:60}),this.cScale5=this.cScale5||Oe(this.primaryColor,{h:90}),this.cScale6=this.cScale6||Oe(this.primaryColor,{h:120}),this.cScale7=this.cScale7||Oe(this.primaryColor,{h:150}),this.cScale8=this.cScale8||Oe(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||Oe(this.primaryColor,{h:270}),this.cScale10=this.cScale10||Oe(this.primaryColor,{h:300}),this.cScale11=this.cScale11||Oe(this.primaryColor,{h:330}),this.darkMode)for(let r=0;r{this[n]=e[n]}),this.updateColors(),r.forEach(n=>{this[n]=e[n]})}},x(Ug,"Theme"),Ug),qBe=x(t=>{let e=new UBe;return e.calculate(t),e},"getThemeVariables"),VBe=(qg=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=wt(this.primaryColor,16),this.tertiaryColor=Oe(this.primaryColor,{h:-160}),this.primaryBorderColor=vt(this.background),this.secondaryBorderColor=ws(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=ws(this.tertiaryColor,this.darkMode),this.primaryTextColor=vt(this.primaryColor),this.secondaryTextColor=vt(this.secondaryColor),this.tertiaryTextColor=vt(this.tertiaryColor),this.lineColor=vt(this.background),this.textColor=vt(this.background),this.mainBkg="#1f2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=wt(vt("#323D47"),10),this.lineColor="calculated",this.border1="#ccc",this.border2=ms(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=Lt("#EAE8D9",30),this.altSectionBkgColor="calculated",this.sectionBkgColor2="#EAE8D9",this.excludeBkgColor=Lt(this.sectionBkgColor,10),this.taskBorderColor=ms(255,255,255,70),this.taskBkgColor="calculated",this.taskTextColor="calculated",this.taskTextLightColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor=ms(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.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.rowOdd=this.rowOdd||wt(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||Lt(this.mainBkg,10),this.labelColor="calculated",this.errorBkgColor="#a44141",this.errorTextColor="#ddd"}updateColors(){this.secondBkg=wt(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=wt(this.labelBackground,25),this.actorBorder=this.border1,this.actorBkg=this.mainBkg,this.actorTextColor=this.mainContrastColor,this.actorLineColor=this.actorBorder,this.signalColor=this.mainContrastColor,this.signalTextColor=this.mainContrastColor,this.labelBoxBkgColor=this.actorBkg,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.mainContrastColor,this.loopTextColor=this.mainContrastColor,this.noteBorderColor=this.secondaryBorderColor,this.noteBkgColor=this.secondBkg,this.noteTextColor=this.secondaryTextColor,this.activationBorderColor=this.border1,this.activationBkgColor=this.secondBkg,this.altSectionBkgColor=this.background,this.taskBkgColor=wt(this.mainBkg,23),this.taskTextColor=this.darkTextColor,this.taskTextLightColor=this.mainContrastColor,this.taskTextOutsideColor=this.taskTextLightColor,this.gridColor=this.mainContrastColor,this.doneTaskBkgColor=this.mainContrastColor,this.taskTextDarkColor=this.darkTextColor,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#555",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.primaryBorderColor,this.specialStateColor="#f4f4f4",this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=Oe(this.primaryColor,{h:64}),this.fillType3=Oe(this.secondaryColor,{h:64}),this.fillType4=Oe(this.primaryColor,{h:-64}),this.fillType5=Oe(this.secondaryColor,{h:-64}),this.fillType6=Oe(this.primaryColor,{h:128}),this.fillType7=Oe(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||Oe(this.primaryColor,{h:30}),this.cScale4=this.cScale4||Oe(this.primaryColor,{h:60}),this.cScale5=this.cScale5||Oe(this.primaryColor,{h:90}),this.cScale6=this.cScale6||Oe(this.primaryColor,{h:120}),this.cScale7=this.cScale7||Oe(this.primaryColor,{h:150}),this.cScale8=this.cScale8||Oe(this.primaryColor,{h:210}),this.cScale9=this.cScale9||Oe(this.primaryColor,{h:270}),this.cScale10=this.cScale10||Oe(this.primaryColor,{h:300}),this.cScale11=this.cScale11||Oe(this.primaryColor,{h:330});for(let e=0;e{this[n]=e[n]}),this.updateColors(),r.forEach(n=>{this[n]=e[n]})}},x(qg,"Theme"),qg),HBe=x(t=>{let e=new VBe;return e.calculate(t),e},"getThemeVariables"),WBe=(Vg=class{constructor(){this.background="#f4f4f4",this.primaryColor="#ECECFF",this.secondaryColor=Oe(this.primaryColor,{h:120}),this.secondaryColor="#ffffde",this.tertiaryColor=Oe(this.primaryColor,{h:-160}),this.primaryBorderColor=ws(this.primaryColor,this.darkMode),this.secondaryBorderColor=ws(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=ws(this.tertiaryColor,this.darkMode),this.primaryTextColor=vt(this.primaryColor),this.secondaryTextColor=vt(this.secondaryColor),this.tertiaryTextColor=vt(this.tertiaryColor),this.lineColor=vt(this.background),this.textColor=vt(this.background),this.background="white",this.mainBkg="#ECECFF",this.secondBkg="#ffffde",this.lineColor="#333333",this.border1="#9370DB",this.border2="#aaaa33",this.arrowheadColor="#333333",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.labelBackground="rgba(232,232,232, 0.8)",this.textColor="#333",this.THEME_COLOR_LIMIT=12,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="calculated",this.edgeLabelBackground="calculated",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="black",this.actorLineColor="calculated",this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="calculated",this.altSectionBkgColor="calculated",this.sectionBkgColor2="calculated",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="calculated",this.taskTextLightColor="calculated",this.taskTextColor=this.taskTextLightColor,this.taskTextDarkColor="calculated",this.taskTextOutsideColor=this.taskTextDarkColor,this.taskTextClickableColor="calculated",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="calculated",this.critBorderColor="calculated",this.critBkgColor="calculated",this.todayLineColor="calculated",this.sectionBkgColor=ms(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.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.rowOdd="calculated",this.rowEven="calculated",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.updateColors()}updateColors(){this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||Oe(this.primaryColor,{h:30}),this.cScale4=this.cScale4||Oe(this.primaryColor,{h:60}),this.cScale5=this.cScale5||Oe(this.primaryColor,{h:90}),this.cScale6=this.cScale6||Oe(this.primaryColor,{h:120}),this.cScale7=this.cScale7||Oe(this.primaryColor,{h:150}),this.cScale8=this.cScale8||Oe(this.primaryColor,{h:210}),this.cScale9=this.cScale9||Oe(this.primaryColor,{h:270}),this.cScale10=this.cScale10||Oe(this.primaryColor,{h:300}),this.cScale11=this.cScale11||Oe(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||Lt(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||Lt(this.tertiaryColor,40);for(let e=0;e{this[n]==="calculated"&&(this[n]=void 0)}),typeof e!="object"){this.updateColors();return}let r=Object.keys(e);r.forEach(n=>{this[n]=e[n]}),this.updateColors(),r.forEach(n=>{this[n]=e[n]})}},x(Vg,"Theme"),Vg),pp=x(t=>{let e=new WBe;return e.calculate(t),e},"getThemeVariables"),YBe=(Hg=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=wt("#cde498",10),this.primaryBorderColor=ws(this.primaryColor,this.darkMode),this.secondaryBorderColor=ws(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=ws(this.tertiaryColor,this.darkMode),this.primaryTextColor=vt(this.primaryColor),this.secondaryTextColor=vt(this.secondaryColor),this.tertiaryTextColor=vt(this.primaryColor),this.lineColor=vt(this.background),this.textColor=vt(this.background),this.THEME_COLOR_LIMIT=12,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="#333",this.edgeLabelBackground="#e8e8e8",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="black",this.actorLineColor="calculated",this.signalColor="#333",this.signalTextColor="#333",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="#326932",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="#6eaa49",this.altSectionBkgColor="white",this.sectionBkgColor2="#6eaa49",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="#487e3a",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="black",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="lightgrey",this.doneTaskBkgColor="lightgrey",this.doneTaskBorderColor="grey",this.critBorderColor="#ff8888",this.critBkgColor="red",this.todayLineColor="red",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222"}updateColors(){this.actorBorder=Lt(this.mainBkg,20),this.actorBkg=this.mainBkg,this.labelBoxBkgColor=this.actorBkg,this.labelTextColor=this.actorTextColor,this.loopTextColor=this.actorTextColor,this.noteBorderColor=this.border2,this.noteTextColor=this.actorTextColor,this.actorLineColor=this.actorBorder,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||Oe(this.primaryColor,{h:30}),this.cScale4=this.cScale4||Oe(this.primaryColor,{h:60}),this.cScale5=this.cScale5||Oe(this.primaryColor,{h:90}),this.cScale6=this.cScale6||Oe(this.primaryColor,{h:120}),this.cScale7=this.cScale7||Oe(this.primaryColor,{h:150}),this.cScale8=this.cScale8||Oe(this.primaryColor,{h:210}),this.cScale9=this.cScale9||Oe(this.primaryColor,{h:270}),this.cScale10=this.cScale10||Oe(this.primaryColor,{h:300}),this.cScale11=this.cScale11||Oe(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||Lt(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||Lt(this.tertiaryColor,40);for(let e=0;e{this[n]=e[n]}),this.updateColors(),r.forEach(n=>{this[n]=e[n]})}},x(Hg,"Theme"),Hg),XBe=x(t=>{let e=new YBe;return e.calculate(t),e},"getThemeVariables"),jBe=(Wg=class{constructor(){this.primaryColor="#eee",this.contrast="#707070",this.secondaryColor=wt(this.contrast,55),this.background="#ffffff",this.tertiaryColor=Oe(this.primaryColor,{h:-160}),this.primaryBorderColor=ws(this.primaryColor,this.darkMode),this.secondaryBorderColor=ws(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=ws(this.tertiaryColor,this.darkMode),this.primaryTextColor=vt(this.primaryColor),this.secondaryTextColor=vt(this.secondaryColor),this.tertiaryTextColor=vt(this.tertiaryColor),this.lineColor=vt(this.background),this.textColor=vt(this.background),this.mainBkg="#eee",this.secondBkg="calculated",this.lineColor="#666",this.border1="#999",this.border2="calculated",this.note="#ffa",this.text="#333",this.critical="#d42",this.done="#bbb",this.arrowheadColor="#333333",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.THEME_COLOR_LIMIT=12,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="calculated",this.edgeLabelBackground="white",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="calculated",this.actorLineColor=this.actorBorder,this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="calculated",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="calculated",this.altSectionBkgColor="white",this.sectionBkgColor2="calculated",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="calculated",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="calculated",this.critBkgColor="calculated",this.critBorderColor="calculated",this.todayLineColor="calculated",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.rowOdd=this.rowOdd||wt(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||"#f4f4f4",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222"}updateColors(){this.secondBkg=wt(this.contrast,55),this.border2=this.contrast,this.actorBorder=wt(this.border1,23),this.actorBkg=this.mainBkg,this.actorTextColor=this.text,this.actorLineColor=this.actorBorder,this.signalColor=this.text,this.signalTextColor=this.text,this.labelBoxBkgColor=this.actorBkg,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.text,this.loopTextColor=this.text,this.noteBorderColor="#999",this.noteBkgColor="#666",this.noteTextColor="#fff",this.cScale0=this.cScale0||"#555",this.cScale1=this.cScale1||"#F4F4F4",this.cScale2=this.cScale2||"#555",this.cScale3=this.cScale3||"#BBB",this.cScale4=this.cScale4||"#777",this.cScale5=this.cScale5||"#999",this.cScale6=this.cScale6||"#DDD",this.cScale7=this.cScale7||"#FFF",this.cScale8=this.cScale8||"#DDD",this.cScale9=this.cScale9||"#BBB",this.cScale10=this.cScale10||"#999",this.cScale11=this.cScale11||"#777";for(let e=0;e{this[n]=e[n]}),this.updateColors(),r.forEach(n=>{this[n]=e[n]})}},x(Wg,"Theme"),Wg),KBe=x(t=>{let e=new jBe;return e.calculate(t),e},"getThemeVariables"),Hu={base:{getThemeVariables:qBe},dark:{getThemeVariables:HBe},default:{getThemeVariables:pp},forest:{getThemeVariables:XBe},neutral:{getThemeVariables:KBe}},xh={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,hideEmptyMembersBox:!1},state:{useMaxWidth:!0,titleTopMargin:25,dividerMargin:10,sizeUnit:5,padding:8,textHeight:10,titleShift:-15,noteMargin:10,forkWidth:70,forkHeight:7,miniPadding:2,fontSizeFactor:5.02,fontSize:24,labelHeight:16,edgeLengthFactor:"20",compositTitleSize:35,radius:5,defaultRenderer:"dagre-wrapper"},er:{useMaxWidth:!0,titleTopMargin:25,diagramPadding:20,layoutDirection:"TB",minEntityWidth:100,minEntityHeight:75,entityPadding:15,nodeSpacing:140,rankSpacing:80,stroke:"gray",fill:"honeydew",fontSize:12},pie:{useMaxWidth:!0,textPosition:.75},quadrantChart:{useMaxWidth:!0,chartWidth:500,chartHeight:500,titleFontSize:20,titlePadding:10,quadrantPadding:5,xAxisLabelPadding:5,yAxisLabelPadding:5,xAxisLabelFontSize:16,yAxisLabelFontSize:16,quadrantLabelFontSize:16,quadrantTextTopPadding:5,pointTextPadding:5,pointLabelFontSize:12,pointRadius:5,xAxisPosition:"top",yAxisPosition:"left",quadrantInternalBorderStrokeWidth:1,quadrantExternalBorderStrokeWidth:2},xyChart:{useMaxWidth:!0,width:700,height:500,titleFontSize:20,titlePadding:10,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},kanban:{useMaxWidth:!0,padding:8,sectionWidth:200,ticketBaseUrl:""},timeline:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,leftMargin:150,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",bottomMarginAdj:1,rightAngles:!1,taskFontSize:14,taskFontFamily:'"Open Sans", sans-serif',taskMargin:50,activationWidth:10,textPlacement:"fo",actorColours:["#8FBC8F","#7CFC00","#00FFFF","#20B2AA","#B0E0E6","#FFFFE0"],sectionFills:["#191970","#8B008B","#4B0082","#2F4F4F","#800000","#8B4513","#00008B"],sectionColours:["#fff"],disableMulticolor:!1},gitGraph:{useMaxWidth:!0,titleTopMargin:25,diagramPadding:8,nodeLabel:{width:75,height:100,x:-25,y:0},mainBranchName:"main",mainBranchOrder:0,showCommitLabel:!0,showBranches:!0,rotateCommitLabel:!0,parallelCommits:!1,arrowMarkerAbsolute:!1},c4:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,c4ShapeMargin:50,c4ShapePadding:20,width:216,height:60,boxMargin:10,c4ShapeInRow:4,nextLinePaddingX:0,c4BoundaryInRow:2,personFontSize:14,personFontFamily:'"Open Sans", sans-serif',personFontWeight:"normal",external_personFontSize:14,external_personFontFamily:'"Open Sans", sans-serif',external_personFontWeight:"normal",systemFontSize:14,systemFontFamily:'"Open Sans", sans-serif',systemFontWeight:"normal",external_systemFontSize:14,external_systemFontFamily:'"Open Sans", sans-serif',external_systemFontWeight:"normal",system_dbFontSize:14,system_dbFontFamily:'"Open Sans", sans-serif',system_dbFontWeight:"normal",external_system_dbFontSize:14,external_system_dbFontFamily:'"Open Sans", sans-serif',external_system_dbFontWeight:"normal",system_queueFontSize:14,system_queueFontFamily:'"Open Sans", sans-serif',system_queueFontWeight:"normal",external_system_queueFontSize:14,external_system_queueFontFamily:'"Open Sans", sans-serif',external_system_queueFontWeight:"normal",boundaryFontSize:14,boundaryFontFamily:'"Open Sans", sans-serif',boundaryFontWeight:"normal",messageFontSize:12,messageFontFamily:'"Open Sans", sans-serif',messageFontWeight:"normal",containerFontSize:14,containerFontFamily:'"Open Sans", sans-serif',containerFontWeight:"normal",external_containerFontSize:14,external_containerFontFamily:'"Open Sans", sans-serif',external_containerFontWeight:"normal",container_dbFontSize:14,container_dbFontFamily:'"Open Sans", sans-serif',container_dbFontWeight:"normal",external_container_dbFontSize:14,external_container_dbFontFamily:'"Open Sans", sans-serif',external_container_dbFontWeight:"normal",container_queueFontSize:14,container_queueFontFamily:'"Open Sans", sans-serif',container_queueFontWeight:"normal",external_container_queueFontSize:14,external_container_queueFontFamily:'"Open Sans", sans-serif',external_container_queueFontWeight:"normal",componentFontSize:14,componentFontFamily:'"Open Sans", sans-serif',componentFontWeight:"normal",external_componentFontSize:14,external_componentFontFamily:'"Open Sans", sans-serif',external_componentFontWeight:"normal",component_dbFontSize:14,component_dbFontFamily:'"Open Sans", sans-serif',component_dbFontWeight:"normal",external_component_dbFontSize:14,external_component_dbFontFamily:'"Open Sans", sans-serif',external_component_dbFontWeight:"normal",component_queueFontSize:14,component_queueFontFamily:'"Open Sans", sans-serif',component_queueFontWeight:"normal",external_component_queueFontSize:14,external_component_queueFontFamily:'"Open Sans", sans-serif',external_component_queueFontWeight:"normal",wrap:!0,wrapPadding:10,person_bg_color:"#08427B",person_border_color:"#073B6F",external_person_bg_color:"#686868",external_person_border_color:"#8A8A8A",system_bg_color:"#1168BD",system_border_color:"#3C7FC0",system_db_bg_color:"#1168BD",system_db_border_color:"#3C7FC0",system_queue_bg_color:"#1168BD",system_queue_border_color:"#3C7FC0",external_system_bg_color:"#999999",external_system_border_color:"#8A8A8A",external_system_db_bg_color:"#999999",external_system_db_border_color:"#8A8A8A",external_system_queue_bg_color:"#999999",external_system_queue_border_color:"#8A8A8A",container_bg_color:"#438DD5",container_border_color:"#3C7FC0",container_db_bg_color:"#438DD5",container_db_border_color:"#3C7FC0",container_queue_bg_color:"#438DD5",container_queue_border_color:"#3C7FC0",external_container_bg_color:"#B3B3B3",external_container_border_color:"#A6A6A6",external_container_db_bg_color:"#B3B3B3",external_container_db_border_color:"#A6A6A6",external_container_queue_bg_color:"#B3B3B3",external_container_queue_border_color:"#A6A6A6",component_bg_color:"#85BBF0",component_border_color:"#78A8D8",component_db_bg_color:"#85BBF0",component_db_border_color:"#78A8D8",component_queue_bg_color:"#85BBF0",component_queue_border_color:"#78A8D8",external_component_bg_color:"#CCCCCC",external_component_border_color:"#BFBFBF",external_component_db_bg_color:"#CCCCCC",external_component_db_border_color:"#BFBFBF",external_component_queue_bg_color:"#CCCCCC",external_component_queue_border_color:"#BFBFBF"},sankey:{useMaxWidth:!0,width:600,height:400,linkColor:"gradient",nodeAlignment:"justify",showValues:!0,prefix:"",suffix:""},block:{useMaxWidth:!0,padding:8},packet:{useMaxWidth:!0,rowHeight:32,bitWidth:32,bitsPerRow:32,showBits:!0,paddingX:5,paddingY:5},architecture:{useMaxWidth:!0,padding:40,iconSize:80,fontSize:16},radar:{useMaxWidth:!0,width:600,height:600,marginTop:50,marginRight:50,marginBottom:50,marginLeft:50,axisScaleFactor:1,axisLabelFactor:1.05,curveTension:.17},theme:"default",look:"classic",handDrawnSeed:0,layout:"dagre",maxTextSize:5e4,maxEdges:500,darkMode:!1,fontFamily:'"trebuchet ms", verdana, arial, sans-serif;',logLevel:5,securityLevel:"strict",startOnLoad:!0,arrowMarkerAbsolute:!1,secure:["secure","securityLevel","startOnLoad","maxTextSize","suppressErrorRendering","maxEdges"],legacyMathML:!1,forceLegacyMathML:!1,deterministicIds:!1,fontSize:16,markdownAutoWrap:!0,suppressErrorRendering:!1},cQ={...xh,deterministicIDSeed:void 0,elk:{mergeEdges:!1,nodePlacementStrategy:"BRANDES_KOEPF"},themeCSS:void 0,themeVariables:Hu.default.getThemeVariables(),sequence:{...xh.sequence,messageFont:x(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont"),noteFont:x(function(){return{fontFamily:this.noteFontFamily,fontSize:this.noteFontSize,fontWeight:this.noteFontWeight}},"noteFont"),actorFont:x(function(){return{fontFamily:this.actorFontFamily,fontSize:this.actorFontSize,fontWeight:this.actorFontWeight}},"actorFont")},class:{hideEmptyMembersBox:!1},gantt:{...xh.gantt,tickInterval:void 0,useWidth:void 0},c4:{...xh.c4,useWidth:void 0,personFont:x(function(){return{fontFamily:this.personFontFamily,fontSize:this.personFontSize,fontWeight:this.personFontWeight}},"personFont"),external_personFont:x(function(){return{fontFamily:this.external_personFontFamily,fontSize:this.external_personFontSize,fontWeight:this.external_personFontWeight}},"external_personFont"),systemFont:x(function(){return{fontFamily:this.systemFontFamily,fontSize:this.systemFontSize,fontWeight:this.systemFontWeight}},"systemFont"),external_systemFont:x(function(){return{fontFamily:this.external_systemFontFamily,fontSize:this.external_systemFontSize,fontWeight:this.external_systemFontWeight}},"external_systemFont"),system_dbFont:x(function(){return{fontFamily:this.system_dbFontFamily,fontSize:this.system_dbFontSize,fontWeight:this.system_dbFontWeight}},"system_dbFont"),external_system_dbFont:x(function(){return{fontFamily:this.external_system_dbFontFamily,fontSize:this.external_system_dbFontSize,fontWeight:this.external_system_dbFontWeight}},"external_system_dbFont"),system_queueFont:x(function(){return{fontFamily:this.system_queueFontFamily,fontSize:this.system_queueFontSize,fontWeight:this.system_queueFontWeight}},"system_queueFont"),external_system_queueFont:x(function(){return{fontFamily:this.external_system_queueFontFamily,fontSize:this.external_system_queueFontSize,fontWeight:this.external_system_queueFontWeight}},"external_system_queueFont"),containerFont:x(function(){return{fontFamily:this.containerFontFamily,fontSize:this.containerFontSize,fontWeight:this.containerFontWeight}},"containerFont"),external_containerFont:x(function(){return{fontFamily:this.external_containerFontFamily,fontSize:this.external_containerFontSize,fontWeight:this.external_containerFontWeight}},"external_containerFont"),container_dbFont:x(function(){return{fontFamily:this.container_dbFontFamily,fontSize:this.container_dbFontSize,fontWeight:this.container_dbFontWeight}},"container_dbFont"),external_container_dbFont:x(function(){return{fontFamily:this.external_container_dbFontFamily,fontSize:this.external_container_dbFontSize,fontWeight:this.external_container_dbFontWeight}},"external_container_dbFont"),container_queueFont:x(function(){return{fontFamily:this.container_queueFontFamily,fontSize:this.container_queueFontSize,fontWeight:this.container_queueFontWeight}},"container_queueFont"),external_container_queueFont:x(function(){return{fontFamily:this.external_container_queueFontFamily,fontSize:this.external_container_queueFontSize,fontWeight:this.external_container_queueFontWeight}},"external_container_queueFont"),componentFont:x(function(){return{fontFamily:this.componentFontFamily,fontSize:this.componentFontSize,fontWeight:this.componentFontWeight}},"componentFont"),external_componentFont:x(function(){return{fontFamily:this.external_componentFontFamily,fontSize:this.external_componentFontSize,fontWeight:this.external_componentFontWeight}},"external_componentFont"),component_dbFont:x(function(){return{fontFamily:this.component_dbFontFamily,fontSize:this.component_dbFontSize,fontWeight:this.component_dbFontWeight}},"component_dbFont"),external_component_dbFont:x(function(){return{fontFamily:this.external_component_dbFontFamily,fontSize:this.external_component_dbFontSize,fontWeight:this.external_component_dbFontWeight}},"external_component_dbFont"),component_queueFont:x(function(){return{fontFamily:this.component_queueFontFamily,fontSize:this.component_queueFontSize,fontWeight:this.component_queueFontWeight}},"component_queueFont"),external_component_queueFont:x(function(){return{fontFamily:this.external_component_queueFontFamily,fontSize:this.external_component_queueFontSize,fontWeight:this.external_component_queueFontWeight}},"external_component_queueFont"),boundaryFont:x(function(){return{fontFamily:this.boundaryFontFamily,fontSize:this.boundaryFontSize,fontWeight:this.boundaryFontWeight}},"boundaryFont"),messageFont:x(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont")},pie:{...xh.pie,useWidth:984},xyChart:{...xh.xyChart,useWidth:void 0},requirement:{...xh.requirement,useWidth:void 0},packet:{...xh.packet},radar:{...xh.radar}},hQ=x((t,e="")=>Object.keys(t).reduce((r,n)=>Array.isArray(t[n])?r:typeof t[n]=="object"&&t[n]!==null?[...r,e+n,...hQ(t[n],"")]:[...r,e+n],[]),"keyify"),ZBe=new Set(hQ(cQ,"")),or=cQ,Gb=x(t=>{if(te.debug("sanitizeDirective called with",t),!(typeof t!="object"||t==null)){if(Array.isArray(t)){t.forEach(e=>Gb(e));return}for(let e of Object.keys(t)){if(te.debug("Checking key",e),e.startsWith("__")||e.includes("proto")||e.includes("constr")||!ZBe.has(e)||t[e]==null){te.debug("sanitize deleting key: ",e),delete t[e];continue}if(typeof t[e]=="object"){te.debug("sanitizing object",e),Gb(t[e]);continue}let r=["themeCSS","fontFamily","altFontFamily"];for(let n of r)e.includes(n)&&(te.debug("sanitizing css option",e),t[e]=QBe(t[e]))}if(t.themeVariables)for(let e of Object.keys(t.themeVariables)){let r=t.themeVariables[e];r?.match&&!r.match(/^[\d "#%(),.;A-Za-z]+$/)&&(t.themeVariables[e]="")}te.debug("After sanitization",t)}},"sanitizeDirective"),QBe=x(t=>{let e=0,r=0;for(let n of t){if(e{let r=ra({},t),n={};for(let a of e)gQ(a),n=ra(n,a);if(r=ra(r,n),n.theme&&n.theme in Hu){let a=ra({},fQ),i=ra(a.themeVariables||{},n.themeVariables);r.theme&&r.theme in Hu&&(r.themeVariables=Hu[r.theme].getThemeVariables(i))}return $b=r,yQ($b),$b},"updateCurrentConfig"),dQ=x(t=>(Qs=ra({},mp),Qs=ra(Qs,t),t.theme&&Hu[t.theme]&&(Qs.themeVariables=Hu[t.theme].getThemeVariables(t.themeVariables)),IT(Qs,Xg),Qs),"setSiteConfig"),pQ=x(t=>{fQ=ra({},t)},"saveConfigFromInitialize"),mQ=x(t=>(Qs=ra(Qs,t),IT(Qs,Xg),Qs),"updateSiteConfig"),AD=x(()=>ra({},Qs),"getSiteConfig"),LD=x(t=>(yQ(t),ra($b,t),wr()),"setConfig"),wr=x(()=>ra({},$b),"getConfig"),gQ=x(t=>{t&&(["secure",...Qs.secure??[]].forEach(e=>{Object.hasOwn(t,e)&&(te.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"&&gQ(t[e])}))},"sanitize"),vQ=x(t=>{Gb(t),t.fontFamily&&!t.themeVariables?.fontFamily&&(t.themeVariables={...t.themeVariables,fontFamily:t.fontFamily}),Xg.push(t),IT(Qs,Xg)},"addDirective"),qb=x((t=Qs)=>{Xg=[],IT(t,Xg)},"reset"),JBe={LAZY_LOAD_DEPRECATED:"The configuration options lazyLoadedDiagrams and loadExternalDiagramsAtStartup are deprecated. Please use registerExternalDiagrams instead."},rQ={},eFe=x(t=>{rQ[t]||(te.warn(JBe[t]),rQ[t]=!0)},"issueWarning"),yQ=x(t=>{t&&(t.lazyLoadedDiagrams||t.loadExternalDiagramsAtStartup)&&eFe("LAZY_LOAD_DEPRECATED")},"checkConfig"),gp=//gi,tFe=x(t=>t?wQ(t).replace(/\\n/g,"#br#").split("#br#"):[""],"getRows"),rFe=(()=>{let t=!1;return()=>{t||(xQ(),t=!0)}})();x(xQ,"setupDompurifyHooks");bQ=x(t=>(rFe(),Df.sanitize(t)),"removeScript"),nQ=x((t,e)=>{if(e.flowchart?.htmlLabels!==!1){let r=e.securityLevel;r==="antiscript"||r==="strict"?t=bQ(t):r!=="loose"&&(t=wQ(t),t=t.replace(//g,">"),t=t.replace(/=/g,"="),t=sFe(t))}return t},"sanitizeMore"),Er=x((t,e)=>t&&(e.dompurifyConfig?t=Df.sanitize(nQ(t,e),e.dompurifyConfig).toString():t=Df.sanitize(nQ(t,e),{FORBID_TAGS:["style"]}).toString(),t),"sanitizeText"),nFe=x((t,e)=>typeof t=="string"?Er(t,e):t.flat().map(r=>Er(r,e)),"sanitizeTextOrArray"),aFe=x(t=>gp.test(t),"hasBreaks"),iFe=x(t=>t.split(gp),"splitBreaks"),sFe=x(t=>t.replace(/#br#/g,"
"),"placeholderToBreak"),wQ=x(t=>t.replace(gp,"#br#"),"breakToPlaceholder"),oFe=x(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},"getUrl"),Br=x(t=>!(t===!1||["false","null","0"].includes(String(t).trim().toLowerCase())),"evaluate"),lFe=x(function(...t){let e=t.filter(r=>!isNaN(r));return Math.max(...e)},"getMax"),uFe=x(function(...t){let e=t.filter(r=>!isNaN(r));return Math.min(...e)},"getMin"),Wu=x(function(t){let e=t.split(/(,)/),r=[];for(let n=0;n0&&n+1Math.max(0,t.split(e).length-1),"countOccurrence"),cFe=x((t,e)=>{let r=TD(t,"~"),n=TD(e,"~");return r===1&&n===1},"shouldCombineSets"),hFe=x(t=>{let e=TD(t,"~"),r=!1;if(e<=1)return t;e%2!==0&&t.startsWith("~")&&(t=t.substring(1),r=!0);let n=[...t],a=n.indexOf("~"),i=n.lastIndexOf("~");for(;a!==-1&&i!==-1&&a!==i;)n[a]="<",n[i]=">",a=n.indexOf("~"),i=n.lastIndexOf("~");return r&&n.unshift("~"),n.join("")},"processSet"),aQ=x(()=>window.MathMLElement!==void 0,"isMathMLSupported"),ED=/\$\$(.*)\$\$/g,Ha=x(t=>(t.match(ED)?.length??0)>0,"hasKatex"),Kg=x(async(t,e)=>{t=await Gf(t,e);let r=document.createElement("div");r.innerHTML=t,r.id="katex-temp",r.style.visibility="hidden",r.style.position="absolute",r.style.top="0",document.querySelector("body")?.insertAdjacentElement("beforeend",r);let a={width:r.clientWidth,height:r.clientHeight};return r.remove(),a},"calculateMathMLDimensions"),Gf=x(async(t,e)=>{if(!Ha(t))return t;if(!(aQ()||e.legacyMathML||e.forceLegacyMathML))return t.replace(ED,"MathML is unsupported in this environment.");let{default:r}=await Promise.resolve().then(()=>(tQ(),eQ)),n=e.forceLegacyMathML||!aQ()&&e.legacyMathML?"htmlAndMathml":"mathml";return t.split(gp).map(a=>Ha(a)?`
${a}
`:`
${a}
`).join("").replace(ED,(a,i)=>r.renderToString(i,{throwOnError:!0,displayMode:!0,output:n}).replace(/\n/g," ").replace(//g,""))},"renderKatex"),Ze={getRows:tFe,sanitizeText:Er,sanitizeTextOrArray:nFe,hasBreaks:aFe,splitBreaks:iFe,lineBreakRegex:gp,removeScript:bQ,getUrl:oFe,evaluate:Br,getMax:lFe,getMin:uFe},fFe=x(function(t,e){for(let r of e)t.attr(r[0],r[1])},"d3Attrs"),dFe=x(function(t,e,r){let n=new Map;return r?(n.set("width","100%"),n.set("style",`max-width: ${e}px;`)):(n.set("height",t),n.set("width",e)),n},"calculateSvgSizeAttrs"),gn=x(function(t,e,r,n){let a=dFe(e,r,n);fFe(t,a)},"configureSvgSize"),Vl=x(function(t,e,r,n){let a=e.node().getBBox(),i=a.width,s=a.height;te.info(`SVG bounds: ${i}x${s}`,a);let o=0,l=0;te.info(`Graph bounds: ${o}x${l}`,t),o=i+r*2,l=s+r*2,te.info(`Calculated bounds: ${o}x${l}`),gn(e,l,o,n);let u=`${a.x-r} ${a.y-r} ${a.width+2*r} ${a.height+2*r}`;e.attr("viewBox",u)},"setupGraphViewbox"),ST={},pFe=x((t,e,r)=>{let n="";return t in ST&&ST[t]?n=ST[t](r):te.warn(`No theme found for ${t}`),` & { +?)[ \r ]*`,GM="[\u0300-\u036F]",iGe=new RegExp(GM+"+$"),aGe="("+ZJ+"+)|"+(nGe+"|")+"([!-\\[\\]-\u2027\u202A-\uD7FF\uF900-\uFFFF]"+(GM+"*")+"|[\uD800-\uDBFF][\uDC00-\uDFFF]"+(GM+"*")+"|\\\\verb\\*([^]).*?\\4|\\\\verb([^*a-zA-Z]).*?\\5"+("|"+rGe)+("|"+tGe+")"),Ok=class{constructor(e,r){this.input=void 0,this.settings=void 0,this.tokenRegex=void 0,this.catcodes=void 0,this.input=e,this.settings=r,this.tokenRegex=new RegExp(aGe,"g"),this.catcodes={"%":14,"~":13}}setCatcode(e,r){this.catcodes[e]=r}lex(){var e=this.input,r=this.tokenRegex.lastIndex;if(r===e.length)return new Tl("EOF",new Uo(this,r,r));var n=this.tokenRegex.exec(e);if(n===null||n.index!==r)throw new Ft("Unexpected character: '"+e[r]+"'",new Tl(e[r],new Uo(this,r,r+1)));var i=n[6]||n[3]||(n[2]?"\\ ":" ");if(this.catcodes[i]===14){var a=e.indexOf(` +`,this.tokenRegex.lastIndex);return a===-1?(this.tokenRegex.lastIndex=e.length,this.settings.reportNonstrict("commentAtEnd","% comment has no terminating newline; LaTeX would fail because of commenting the end of math mode (e.g. $)")):this.tokenRegex.lastIndex=a+1,this.lex()}return new Tl(i,new Uo(this,r,this.tokenRegex.lastIndex))}},qM=class{constructor(e,r){e===void 0&&(e={}),r===void 0&&(r={}),this.current=void 0,this.builtins=void 0,this.undefStack=void 0,this.current=r,this.builtins=e,this.undefStack=[]}beginGroup(){this.undefStack.push({})}endGroup(){if(this.undefStack.length===0)throw new Ft("Unbalanced namespace destruction: attempt to pop global namespace; please report this as a bug");var e=this.undefStack.pop();for(var r in e)e.hasOwnProperty(r)&&(e[r]==null?delete this.current[r]:this.current[r]=e[r])}endGroups(){for(;this.undefStack.length>0;)this.endGroup()}has(e){return this.current.hasOwnProperty(e)||this.builtins.hasOwnProperty(e)}get(e){return this.current.hasOwnProperty(e)?this.current[e]:this.builtins[e]}set(e,r,n){if(n===void 0&&(n=!1),n){for(var i=0;i0&&(this.undefStack[this.undefStack.length-1][e]=r)}else{var a=this.undefStack[this.undefStack.length-1];a&&!a.hasOwnProperty(e)&&(a[e]=this.current[e])}r==null?delete this.current[e]:this.current[e]=r}},sGe=$J;Se("\\noexpand",function(t){var e=t.popToken();return t.isExpandable(e.text)&&(e.noexpand=!0,e.treatAsRelax=!0),{tokens:[e],numArgs:0}});Se("\\expandafter",function(t){var e=t.popToken();return t.expandOnce(!0),{tokens:[e],numArgs:0}});Se("\\@firstoftwo",function(t){var e=t.consumeArgs(2);return{tokens:e[0],numArgs:0}});Se("\\@secondoftwo",function(t){var e=t.consumeArgs(2);return{tokens:e[1],numArgs:0}});Se("\\@ifnextchar",function(t){var e=t.consumeArgs(3);t.consumeSpaces();var r=t.future();return e[0].length===1&&e[0][0].text===r.text?{tokens:e[1],numArgs:0}:{tokens:e[2],numArgs:0}});Se("\\@ifstar","\\@ifnextchar *{\\@firstoftwo{#1}}");Se("\\TextOrMath",function(t){var e=t.consumeArgs(2);return t.mode==="text"?{tokens:e[0],numArgs:0}:{tokens:e[1],numArgs:0}});nJ={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,a:10,A:10,b:11,B:11,c:12,C:12,d:13,D:13,e:14,E:14,f:15,F:15};Se("\\char",function(t){var e=t.popToken(),r,n=0;if(e.text==="'")r=8,e=t.popToken();else if(e.text==='"')r=16,e=t.popToken();else if(e.text==="`")if(e=t.popToken(),e.text[0]==="\\")n=e.text.charCodeAt(1);else{if(e.text==="EOF")throw new Ft("\\char` missing argument");n=e.text.charCodeAt(0)}else r=10;if(r){if(n=nJ[e.text],n==null||n>=r)throw new Ft("Invalid base-"+r+" digit "+e.text);for(var i;(i=nJ[t.future().text])!=null&&i{var i=t.consumeArg().tokens;if(i.length!==1)throw new Ft("\\newcommand's first argument must be a macro name");var a=i[0].text,s=t.isDefined(a);if(s&&!e)throw new Ft("\\newcommand{"+a+"} attempting to redefine "+(a+"; use \\renewcommand"));if(!s&&!r)throw new Ft("\\renewcommand{"+a+"} when command "+a+" does not yet exist; use \\newcommand");var o=0;if(i=t.consumeArg().tokens,i.length===1&&i[0].text==="["){for(var l="",u=t.expandNextToken();u.text!=="]"&&u.text!=="EOF";)l+=u.text,u=t.expandNextToken();if(!l.match(/^\s*[0-9]+\s*$/))throw new Ft("Invalid number of arguments: "+l);o=parseInt(l),i=t.consumeArg().tokens}return s&&n||t.macros.set(a,{tokens:i,numArgs:o}),""};Se("\\newcommand",t=>tN(t,!1,!0,!1));Se("\\renewcommand",t=>tN(t,!0,!1,!1));Se("\\providecommand",t=>tN(t,!0,!0,!0));Se("\\message",t=>{var e=t.consumeArgs(1)[0];return console.log(e.reverse().map(r=>r.text).join("")),""});Se("\\errmessage",t=>{var e=t.consumeArgs(1)[0];return console.error(e.reverse().map(r=>r.text).join("")),""});Se("\\show",t=>{var e=t.popToken(),r=e.text;return console.log(e,t.macros.get(r),Ff[r],Ei.math[r],Ei.text[r]),""});Se("\\bgroup","{");Se("\\egroup","}");Se("~","\\nobreakspace");Se("\\lq","`");Se("\\rq","'");Se("\\aa","\\r a");Se("\\AA","\\r A");Se("\\textcopyright","\\html@mathml{\\textcircled{c}}{\\char`\xA9}");Se("\\copyright","\\TextOrMath{\\textcopyright}{\\text{\\textcopyright}}");Se("\\textregistered","\\html@mathml{\\textcircled{\\scriptsize R}}{\\char`\xAE}");Se("\u212C","\\mathscr{B}");Se("\u2130","\\mathscr{E}");Se("\u2131","\\mathscr{F}");Se("\u210B","\\mathscr{H}");Se("\u2110","\\mathscr{I}");Se("\u2112","\\mathscr{L}");Se("\u2133","\\mathscr{M}");Se("\u211B","\\mathscr{R}");Se("\u212D","\\mathfrak{C}");Se("\u210C","\\mathfrak{H}");Se("\u2128","\\mathfrak{Z}");Se("\\Bbbk","\\Bbb{k}");Se("\\llap","\\mathllap{\\textrm{#1}}");Se("\\rlap","\\mathrlap{\\textrm{#1}}");Se("\\clap","\\mathclap{\\textrm{#1}}");Se("\\mathstrut","\\vphantom{(}");Se("\\underbar","\\underline{\\text{#1}}");Se("\\not",'\\html@mathml{\\mathrel{\\mathrlap\\@not}\\nobreak}{\\char"338}');Se("\\neq","\\html@mathml{\\mathrel{\\not=}}{\\mathrel{\\char`\u2260}}");Se("\\ne","\\neq");Se("\u2260","\\neq");Se("\\notin","\\html@mathml{\\mathrel{{\\in}\\mathllap{/\\mskip1mu}}}{\\mathrel{\\char`\u2209}}");Se("\u2209","\\notin");Se("\u2258","\\html@mathml{\\mathrel{=\\kern{-1em}\\raisebox{0.4em}{$\\scriptsize\\frown$}}}{\\mathrel{\\char`\u2258}}");Se("\u2259","\\html@mathml{\\stackrel{\\tiny\\wedge}{=}}{\\mathrel{\\char`\u2258}}");Se("\u225A","\\html@mathml{\\stackrel{\\tiny\\vee}{=}}{\\mathrel{\\char`\u225A}}");Se("\u225B","\\html@mathml{\\stackrel{\\scriptsize\\star}{=}}{\\mathrel{\\char`\u225B}}");Se("\u225D","\\html@mathml{\\stackrel{\\tiny\\mathrm{def}}{=}}{\\mathrel{\\char`\u225D}}");Se("\u225E","\\html@mathml{\\stackrel{\\tiny\\mathrm{m}}{=}}{\\mathrel{\\char`\u225E}}");Se("\u225F","\\html@mathml{\\stackrel{\\tiny?}{=}}{\\mathrel{\\char`\u225F}}");Se("\u27C2","\\perp");Se("\u203C","\\mathclose{!\\mkern-0.8mu!}");Se("\u220C","\\notni");Se("\u231C","\\ulcorner");Se("\u231D","\\urcorner");Se("\u231E","\\llcorner");Se("\u231F","\\lrcorner");Se("\xA9","\\copyright");Se("\xAE","\\textregistered");Se("\\ulcorner",'\\html@mathml{\\@ulcorner}{\\mathop{\\char"231c}}');Se("\\urcorner",'\\html@mathml{\\@urcorner}{\\mathop{\\char"231d}}');Se("\\llcorner",'\\html@mathml{\\@llcorner}{\\mathop{\\char"231e}}');Se("\\lrcorner",'\\html@mathml{\\@lrcorner}{\\mathop{\\char"231f}}');Se("\\vdots","{\\varvdots\\rule{0pt}{15pt}}");Se("\u22EE","\\vdots");Se("\\varGamma","\\mathit{\\Gamma}");Se("\\varDelta","\\mathit{\\Delta}");Se("\\varTheta","\\mathit{\\Theta}");Se("\\varLambda","\\mathit{\\Lambda}");Se("\\varXi","\\mathit{\\Xi}");Se("\\varPi","\\mathit{\\Pi}");Se("\\varSigma","\\mathit{\\Sigma}");Se("\\varUpsilon","\\mathit{\\Upsilon}");Se("\\varPhi","\\mathit{\\Phi}");Se("\\varPsi","\\mathit{\\Psi}");Se("\\varOmega","\\mathit{\\Omega}");Se("\\substack","\\begin{subarray}{c}#1\\end{subarray}");Se("\\colon","\\nobreak\\mskip2mu\\mathpunct{}\\mathchoice{\\mkern-3mu}{\\mkern-3mu}{}{}{:}\\mskip6mu\\relax");Se("\\boxed","\\fbox{$\\displaystyle{#1}$}");Se("\\iff","\\DOTSB\\;\\Longleftrightarrow\\;");Se("\\implies","\\DOTSB\\;\\Longrightarrow\\;");Se("\\impliedby","\\DOTSB\\;\\Longleftarrow\\;");Se("\\dddot","{\\overset{\\raisebox{-0.1ex}{\\normalsize ...}}{#1}}");Se("\\ddddot","{\\overset{\\raisebox{-0.1ex}{\\normalsize ....}}{#1}}");iJ={",":"\\dotsc","\\not":"\\dotsb","+":"\\dotsb","=":"\\dotsb","<":"\\dotsb",">":"\\dotsb","-":"\\dotsb","*":"\\dotsb",":":"\\dotsb","\\DOTSB":"\\dotsb","\\coprod":"\\dotsb","\\bigvee":"\\dotsb","\\bigwedge":"\\dotsb","\\biguplus":"\\dotsb","\\bigcap":"\\dotsb","\\bigcup":"\\dotsb","\\prod":"\\dotsb","\\sum":"\\dotsb","\\bigotimes":"\\dotsb","\\bigoplus":"\\dotsb","\\bigodot":"\\dotsb","\\bigsqcup":"\\dotsb","\\And":"\\dotsb","\\longrightarrow":"\\dotsb","\\Longrightarrow":"\\dotsb","\\longleftarrow":"\\dotsb","\\Longleftarrow":"\\dotsb","\\longleftrightarrow":"\\dotsb","\\Longleftrightarrow":"\\dotsb","\\mapsto":"\\dotsb","\\longmapsto":"\\dotsb","\\hookrightarrow":"\\dotsb","\\doteq":"\\dotsb","\\mathbin":"\\dotsb","\\mathrel":"\\dotsb","\\relbar":"\\dotsb","\\Relbar":"\\dotsb","\\xrightarrow":"\\dotsb","\\xleftarrow":"\\dotsb","\\DOTSI":"\\dotsi","\\int":"\\dotsi","\\oint":"\\dotsi","\\iint":"\\dotsi","\\iiint":"\\dotsi","\\iiiint":"\\dotsi","\\idotsint":"\\dotsi","\\DOTSX":"\\dotsx"},oGe=new Set(["bin","rel"]);Se("\\dots",function(t){var e="\\dotso",r=t.expandAfterFuture().text;return r in iJ?e=iJ[r]:(r.slice(0,4)==="\\not"||r in Ei.math&&oGe.has(Ei.math[r].group))&&(e="\\dotsb"),e});rN={")":!0,"]":!0,"\\rbrack":!0,"\\}":!0,"\\rbrace":!0,"\\rangle":!0,"\\rceil":!0,"\\rfloor":!0,"\\rgroup":!0,"\\rmoustache":!0,"\\right":!0,"\\bigr":!0,"\\biggr":!0,"\\Bigr":!0,"\\Biggr":!0,$:!0,";":!0,".":!0,",":!0};Se("\\dotso",function(t){var e=t.future().text;return e in rN?"\\ldots\\,":"\\ldots"});Se("\\dotsc",function(t){var e=t.future().text;return e in rN&&e!==","?"\\ldots\\,":"\\ldots"});Se("\\cdots",function(t){var e=t.future().text;return e in rN?"\\@cdots\\,":"\\@cdots"});Se("\\dotsb","\\cdots");Se("\\dotsm","\\cdots");Se("\\dotsi","\\!\\cdots");Se("\\dotsx","\\ldots\\,");Se("\\DOTSI","\\relax");Se("\\DOTSB","\\relax");Se("\\DOTSX","\\relax");Se("\\tmspace","\\TextOrMath{\\kern#1#3}{\\mskip#1#2}\\relax");Se("\\,","\\tmspace+{3mu}{.1667em}");Se("\\thinspace","\\,");Se("\\>","\\mskip{4mu}");Se("\\:","\\tmspace+{4mu}{.2222em}");Se("\\medspace","\\:");Se("\\;","\\tmspace+{5mu}{.2777em}");Se("\\thickspace","\\;");Se("\\!","\\tmspace-{3mu}{.1667em}");Se("\\negthinspace","\\!");Se("\\negmedspace","\\tmspace-{4mu}{.2222em}");Se("\\negthickspace","\\tmspace-{5mu}{.277em}");Se("\\enspace","\\kern.5em ");Se("\\enskip","\\hskip.5em\\relax");Se("\\quad","\\hskip1em\\relax");Se("\\qquad","\\hskip2em\\relax");Se("\\tag","\\@ifstar\\tag@literal\\tag@paren");Se("\\tag@paren","\\tag@literal{({#1})}");Se("\\tag@literal",t=>{if(t.macros.get("\\df@tag"))throw new Ft("Multiple \\tag");return"\\gdef\\df@tag{\\text{#1}}"});Se("\\bmod","\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}\\mathbin{\\rm mod}\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}");Se("\\pod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern8mu}{\\mkern8mu}{\\mkern8mu}(#1)");Se("\\pmod","\\pod{{\\rm mod}\\mkern6mu#1}");Se("\\mod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern12mu}{\\mkern12mu}{\\mkern12mu}{\\rm mod}\\,\\,#1");Se("\\newline","\\\\\\relax");Se("\\TeX","\\textrm{\\html@mathml{T\\kern-.1667em\\raisebox{-.5ex}{E}\\kern-.125emX}{TeX}}");QJ=Gt(Gc["Main-Regular"][84][1]-.7*Gc["Main-Regular"][65][1]);Se("\\LaTeX","\\textrm{\\html@mathml{"+("L\\kern-.36em\\raisebox{"+QJ+"}{\\scriptstyle A}")+"\\kern-.15em\\TeX}{LaTeX}}");Se("\\KaTeX","\\textrm{\\html@mathml{"+("K\\kern-.17em\\raisebox{"+QJ+"}{\\scriptstyle A}")+"\\kern-.15em\\TeX}{KaTeX}}");Se("\\hspace","\\@ifstar\\@hspacer\\@hspace");Se("\\@hspace","\\hskip #1\\relax");Se("\\@hspacer","\\rule{0pt}{0pt}\\hskip #1\\relax");Se("\\ordinarycolon",":");Se("\\vcentcolon","\\mathrel{\\mathop\\ordinarycolon}");Se("\\dblcolon",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-.9mu}\\vcentcolon}}{\\mathop{\\char"2237}}');Se("\\coloneqq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2254}}');Se("\\Coloneqq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2237\\char"3d}}');Se("\\coloneq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"3a\\char"2212}}');Se("\\Coloneq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"2237\\char"2212}}');Se("\\eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2255}}');Se("\\Eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"3d\\char"2237}}');Se("\\eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2239}}');Se("\\Eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"2212\\char"2237}}');Se("\\colonapprox",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"3a\\char"2248}}');Se("\\Colonapprox",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"2237\\char"2248}}');Se("\\colonsim",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"3a\\char"223c}}');Se("\\Colonsim",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"2237\\char"223c}}');Se("\u2237","\\dblcolon");Se("\u2239","\\eqcolon");Se("\u2254","\\coloneqq");Se("\u2255","\\eqqcolon");Se("\u2A74","\\Coloneqq");Se("\\ratio","\\vcentcolon");Se("\\coloncolon","\\dblcolon");Se("\\colonequals","\\coloneqq");Se("\\coloncolonequals","\\Coloneqq");Se("\\equalscolon","\\eqqcolon");Se("\\equalscoloncolon","\\Eqqcolon");Se("\\colonminus","\\coloneq");Se("\\coloncolonminus","\\Coloneq");Se("\\minuscolon","\\eqcolon");Se("\\minuscoloncolon","\\Eqcolon");Se("\\coloncolonapprox","\\Colonapprox");Se("\\coloncolonsim","\\Colonsim");Se("\\simcolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\vcentcolon}");Se("\\simcoloncolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\dblcolon}");Se("\\approxcolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\vcentcolon}");Se("\\approxcoloncolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\dblcolon}");Se("\\notni","\\html@mathml{\\not\\ni}{\\mathrel{\\char`\u220C}}");Se("\\limsup","\\DOTSB\\operatorname*{lim\\,sup}");Se("\\liminf","\\DOTSB\\operatorname*{lim\\,inf}");Se("\\injlim","\\DOTSB\\operatorname*{inj\\,lim}");Se("\\projlim","\\DOTSB\\operatorname*{proj\\,lim}");Se("\\varlimsup","\\DOTSB\\operatorname*{\\overline{lim}}");Se("\\varliminf","\\DOTSB\\operatorname*{\\underline{lim}}");Se("\\varinjlim","\\DOTSB\\operatorname*{\\underrightarrow{lim}}");Se("\\varprojlim","\\DOTSB\\operatorname*{\\underleftarrow{lim}}");Se("\\gvertneqq","\\html@mathml{\\@gvertneqq}{\u2269}");Se("\\lvertneqq","\\html@mathml{\\@lvertneqq}{\u2268}");Se("\\ngeqq","\\html@mathml{\\@ngeqq}{\u2271}");Se("\\ngeqslant","\\html@mathml{\\@ngeqslant}{\u2271}");Se("\\nleqq","\\html@mathml{\\@nleqq}{\u2270}");Se("\\nleqslant","\\html@mathml{\\@nleqslant}{\u2270}");Se("\\nshortmid","\\html@mathml{\\@nshortmid}{\u2224}");Se("\\nshortparallel","\\html@mathml{\\@nshortparallel}{\u2226}");Se("\\nsubseteqq","\\html@mathml{\\@nsubseteqq}{\u2288}");Se("\\nsupseteqq","\\html@mathml{\\@nsupseteqq}{\u2289}");Se("\\varsubsetneq","\\html@mathml{\\@varsubsetneq}{\u228A}");Se("\\varsubsetneqq","\\html@mathml{\\@varsubsetneqq}{\u2ACB}");Se("\\varsupsetneq","\\html@mathml{\\@varsupsetneq}{\u228B}");Se("\\varsupsetneqq","\\html@mathml{\\@varsupsetneqq}{\u2ACC}");Se("\\imath","\\html@mathml{\\@imath}{\u0131}");Se("\\jmath","\\html@mathml{\\@jmath}{\u0237}");Se("\\llbracket","\\html@mathml{\\mathopen{[\\mkern-3.2mu[}}{\\mathopen{\\char`\u27E6}}");Se("\\rrbracket","\\html@mathml{\\mathclose{]\\mkern-3.2mu]}}{\\mathclose{\\char`\u27E7}}");Se("\u27E6","\\llbracket");Se("\u27E7","\\rrbracket");Se("\\lBrace","\\html@mathml{\\mathopen{\\{\\mkern-3.2mu[}}{\\mathopen{\\char`\u2983}}");Se("\\rBrace","\\html@mathml{\\mathclose{]\\mkern-3.2mu\\}}}{\\mathclose{\\char`\u2984}}");Se("\u2983","\\lBrace");Se("\u2984","\\rBrace");Se("\\minuso","\\mathbin{\\html@mathml{{\\mathrlap{\\mathchoice{\\kern{0.145em}}{\\kern{0.145em}}{\\kern{0.1015em}}{\\kern{0.0725em}}\\circ}{-}}}{\\char`\u29B5}}");Se("\u29B5","\\minuso");Se("\\darr","\\downarrow");Se("\\dArr","\\Downarrow");Se("\\Darr","\\Downarrow");Se("\\lang","\\langle");Se("\\rang","\\rangle");Se("\\uarr","\\uparrow");Se("\\uArr","\\Uparrow");Se("\\Uarr","\\Uparrow");Se("\\N","\\mathbb{N}");Se("\\R","\\mathbb{R}");Se("\\Z","\\mathbb{Z}");Se("\\alef","\\aleph");Se("\\alefsym","\\aleph");Se("\\Alpha","\\mathrm{A}");Se("\\Beta","\\mathrm{B}");Se("\\bull","\\bullet");Se("\\Chi","\\mathrm{X}");Se("\\clubs","\\clubsuit");Se("\\cnums","\\mathbb{C}");Se("\\Complex","\\mathbb{C}");Se("\\Dagger","\\ddagger");Se("\\diamonds","\\diamondsuit");Se("\\empty","\\emptyset");Se("\\Epsilon","\\mathrm{E}");Se("\\Eta","\\mathrm{H}");Se("\\exist","\\exists");Se("\\harr","\\leftrightarrow");Se("\\hArr","\\Leftrightarrow");Se("\\Harr","\\Leftrightarrow");Se("\\hearts","\\heartsuit");Se("\\image","\\Im");Se("\\infin","\\infty");Se("\\Iota","\\mathrm{I}");Se("\\isin","\\in");Se("\\Kappa","\\mathrm{K}");Se("\\larr","\\leftarrow");Se("\\lArr","\\Leftarrow");Se("\\Larr","\\Leftarrow");Se("\\lrarr","\\leftrightarrow");Se("\\lrArr","\\Leftrightarrow");Se("\\Lrarr","\\Leftrightarrow");Se("\\Mu","\\mathrm{M}");Se("\\natnums","\\mathbb{N}");Se("\\Nu","\\mathrm{N}");Se("\\Omicron","\\mathrm{O}");Se("\\plusmn","\\pm");Se("\\rarr","\\rightarrow");Se("\\rArr","\\Rightarrow");Se("\\Rarr","\\Rightarrow");Se("\\real","\\Re");Se("\\reals","\\mathbb{R}");Se("\\Reals","\\mathbb{R}");Se("\\Rho","\\mathrm{P}");Se("\\sdot","\\cdot");Se("\\sect","\\S");Se("\\spades","\\spadesuit");Se("\\sub","\\subset");Se("\\sube","\\subseteq");Se("\\supe","\\supseteq");Se("\\Tau","\\mathrm{T}");Se("\\thetasym","\\vartheta");Se("\\weierp","\\wp");Se("\\Zeta","\\mathrm{Z}");Se("\\argmin","\\DOTSB\\operatorname*{arg\\,min}");Se("\\argmax","\\DOTSB\\operatorname*{arg\\,max}");Se("\\plim","\\DOTSB\\mathop{\\operatorname{plim}}\\limits");Se("\\bra","\\mathinner{\\langle{#1}|}");Se("\\ket","\\mathinner{|{#1}\\rangle}");Se("\\braket","\\mathinner{\\langle{#1}\\rangle}");Se("\\Bra","\\left\\langle#1\\right|");Se("\\Ket","\\left|#1\\right\\rangle");JJ=t=>e=>{var r=e.consumeArg().tokens,n=e.consumeArg().tokens,i=e.consumeArg().tokens,a=e.consumeArg().tokens,s=e.macros.get("|"),o=e.macros.get("\\|");e.macros.beginGroup();var l=f=>d=>{t&&(d.macros.set("|",s),i.length&&d.macros.set("\\|",o));var p=f;if(!f&&i.length){var m=d.future();m.text==="|"&&(d.popToken(),p=!0)}return{tokens:p?i:n,numArgs:0}};e.macros.set("|",l(!1)),i.length&&e.macros.set("\\|",l(!0));var u=e.consumeArg().tokens,h=e.expandTokens([...a,...u,...r]);return e.macros.endGroup(),{tokens:h.reverse(),numArgs:0}};Se("\\bra@ket",JJ(!1));Se("\\bra@set",JJ(!0));Se("\\Braket","\\bra@ket{\\left\\langle}{\\,\\middle\\vert\\,}{\\,\\middle\\vert\\,}{\\right\\rangle}");Se("\\Set","\\bra@set{\\left\\{\\:}{\\;\\middle\\vert\\;}{\\;\\middle\\Vert\\;}{\\:\\right\\}}");Se("\\set","\\bra@set{\\{\\,}{\\mid}{}{\\,\\}}");Se("\\angln","{\\angl n}");Se("\\blue","\\textcolor{##6495ed}{#1}");Se("\\orange","\\textcolor{##ffa500}{#1}");Se("\\pink","\\textcolor{##ff00af}{#1}");Se("\\red","\\textcolor{##df0030}{#1}");Se("\\green","\\textcolor{##28ae7b}{#1}");Se("\\gray","\\textcolor{gray}{#1}");Se("\\purple","\\textcolor{##9d38bd}{#1}");Se("\\blueA","\\textcolor{##ccfaff}{#1}");Se("\\blueB","\\textcolor{##80f6ff}{#1}");Se("\\blueC","\\textcolor{##63d9ea}{#1}");Se("\\blueD","\\textcolor{##11accd}{#1}");Se("\\blueE","\\textcolor{##0c7f99}{#1}");Se("\\tealA","\\textcolor{##94fff5}{#1}");Se("\\tealB","\\textcolor{##26edd5}{#1}");Se("\\tealC","\\textcolor{##01d1c1}{#1}");Se("\\tealD","\\textcolor{##01a995}{#1}");Se("\\tealE","\\textcolor{##208170}{#1}");Se("\\greenA","\\textcolor{##b6ffb0}{#1}");Se("\\greenB","\\textcolor{##8af281}{#1}");Se("\\greenC","\\textcolor{##74cf70}{#1}");Se("\\greenD","\\textcolor{##1fab54}{#1}");Se("\\greenE","\\textcolor{##0d923f}{#1}");Se("\\goldA","\\textcolor{##ffd0a9}{#1}");Se("\\goldB","\\textcolor{##ffbb71}{#1}");Se("\\goldC","\\textcolor{##ff9c39}{#1}");Se("\\goldD","\\textcolor{##e07d10}{#1}");Se("\\goldE","\\textcolor{##a75a05}{#1}");Se("\\redA","\\textcolor{##fca9a9}{#1}");Se("\\redB","\\textcolor{##ff8482}{#1}");Se("\\redC","\\textcolor{##f9685d}{#1}");Se("\\redD","\\textcolor{##e84d39}{#1}");Se("\\redE","\\textcolor{##bc2612}{#1}");Se("\\maroonA","\\textcolor{##ffbde0}{#1}");Se("\\maroonB","\\textcolor{##ff92c6}{#1}");Se("\\maroonC","\\textcolor{##ed5fa6}{#1}");Se("\\maroonD","\\textcolor{##ca337c}{#1}");Se("\\maroonE","\\textcolor{##9e034e}{#1}");Se("\\purpleA","\\textcolor{##ddd7ff}{#1}");Se("\\purpleB","\\textcolor{##c6b9fc}{#1}");Se("\\purpleC","\\textcolor{##aa87ff}{#1}");Se("\\purpleD","\\textcolor{##7854ab}{#1}");Se("\\purpleE","\\textcolor{##543b78}{#1}");Se("\\mintA","\\textcolor{##f5f9e8}{#1}");Se("\\mintB","\\textcolor{##edf2df}{#1}");Se("\\mintC","\\textcolor{##e0e5cc}{#1}");Se("\\grayA","\\textcolor{##f6f7f7}{#1}");Se("\\grayB","\\textcolor{##f0f1f2}{#1}");Se("\\grayC","\\textcolor{##e3e5e6}{#1}");Se("\\grayD","\\textcolor{##d6d8da}{#1}");Se("\\grayE","\\textcolor{##babec2}{#1}");Se("\\grayF","\\textcolor{##888d93}{#1}");Se("\\grayG","\\textcolor{##626569}{#1}");Se("\\grayH","\\textcolor{##3b3e40}{#1}");Se("\\grayI","\\textcolor{##21242c}{#1}");Se("\\kaBlue","\\textcolor{##314453}{#1}");Se("\\kaGreen","\\textcolor{##71B307}{#1}");eee={"^":!0,_:!0,"\\limits":!0,"\\nolimits":!0},UM=class{constructor(e,r,n){this.settings=void 0,this.expansionCount=void 0,this.lexer=void 0,this.macros=void 0,this.stack=void 0,this.mode=void 0,this.settings=r,this.expansionCount=0,this.feed(e),this.macros=new qM(sGe,r.macros),this.mode=n,this.stack=[]}feed(e){this.lexer=new Ok(e,this.settings)}switchMode(e){this.mode=e}beginGroup(){this.macros.beginGroup()}endGroup(){this.macros.endGroup()}endGroups(){this.macros.endGroups()}future(){return this.stack.length===0&&this.pushToken(this.lexer.lex()),this.stack[this.stack.length-1]}popToken(){return this.future(),this.stack.pop()}pushToken(e){this.stack.push(e)}pushTokens(e){this.stack.push(...e)}scanArgument(e){var r,n,i;if(e){if(this.consumeSpaces(),this.future().text!=="[")return null;r=this.popToken(),{tokens:i,end:n}=this.consumeArg(["]"])}else({tokens:i,start:r,end:n}=this.consumeArg());return this.pushToken(new Tl("EOF",n.loc)),this.pushTokens(i),new Tl("",Uo.range(r,n))}consumeSpaces(){for(;;){var e=this.future();if(e.text===" ")this.stack.pop();else break}}consumeArg(e){var r=[],n=e&&e.length>0;n||this.consumeSpaces();var i=this.future(),a,s=0,o=0;do{if(a=this.popToken(),r.push(a),a.text==="{")++s;else if(a.text==="}"){if(--s,s===-1)throw new Ft("Extra }",a)}else if(a.text==="EOF")throw new Ft("Unexpected end of input in a macro argument, expected '"+(e&&n?e[o]:"}")+"'",a);if(e&&n)if((s===0||s===1&&e[o]==="{")&&a.text===e[o]){if(++o,o===e.length){r.splice(-o,o);break}}else o=0}while(s!==0||n);return i.text==="{"&&r[r.length-1].text==="}"&&(r.pop(),r.shift()),r.reverse(),{tokens:r,start:i,end:a}}consumeArgs(e,r){if(r){if(r.length!==e+1)throw new Ft("The length of delimiters doesn't match the number of args!");for(var n=r[0],i=0;ithis.settings.maxExpand)throw new Ft("Too many expansions: infinite loop or need to increase maxExpand setting")}expandOnce(e){var r=this.popToken(),n=r.text,i=r.noexpand?null:this._getExpansion(n);if(i==null||e&&i.unexpandable){if(e&&i==null&&n[0]==="\\"&&!this.isDefined(n))throw new Ft("Undefined control sequence: "+n);return this.pushToken(r),!1}this.countExpansion(1);var a=i.tokens,s=this.consumeArgs(i.numArgs,i.delimiters);if(i.numArgs){a=a.slice();for(var o=a.length-1;o>=0;--o){var l=a[o];if(l.text==="#"){if(o===0)throw new Ft("Incomplete placeholder at end of macro body",l);if(l=a[--o],l.text==="#")a.splice(o+1,1);else if(/^[1-9]$/.test(l.text))a.splice(o,2,...s[+l.text-1]);else throw new Ft("Not a valid argument number",l)}}}return this.pushTokens(a),a.length}expandAfterFuture(){return this.expandOnce(),this.future()}expandNextToken(){for(;;)if(this.expandOnce()===!1){var e=this.stack.pop();return e.treatAsRelax&&(e.text="\\relax"),e}}expandMacro(e){return this.macros.has(e)?this.expandTokens([new Tl(e)]):void 0}expandTokens(e){var r=[],n=this.stack.length;for(this.pushTokens(e);this.stack.length>n;)if(this.expandOnce(!0)===!1){var i=this.stack.pop();i.treatAsRelax&&(i.noexpand=!1,i.treatAsRelax=!1),r.push(i)}return this.countExpansion(r.length),r}expandMacroAsText(e){var r=this.expandMacro(e);return r&&r.map(n=>n.text).join("")}_getExpansion(e){var r=this.macros.get(e);if(r==null)return r;if(e.length===1){var n=this.lexer.catcodes[e];if(n!=null&&n!==13)return}var i=typeof r=="function"?r(this):r;if(typeof i=="string"){var a=0;if(i.includes("#"))for(var s=i.replace(/##/g,"");s.includes("#"+(a+1));)++a;for(var o=new Ok(i,this.settings),l=[],u=o.lex();u.text!=="EOF";)l.push(u),u=o.lex();l.reverse();var h={tokens:l,numArgs:a};return h}return i}isDefined(e){return this.macros.has(e)||Ff.hasOwnProperty(e)||Ei.math.hasOwnProperty(e)||Ei.text.hasOwnProperty(e)||eee.hasOwnProperty(e)}isExpandable(e){var r=this.macros.get(e);return r!=null?typeof r=="string"||typeof r=="function"||!r.unexpandable:Ff.hasOwnProperty(e)&&!Ff[e].primitive}},aJ=/^[₊₋₌₍₎₀₁₂₃₄₅₆₇₈₉ₐₑₕᵢⱼₖₗₘₙₒₚᵣₛₜᵤᵥₓᵦᵧᵨᵩᵪ]/,Ek=Object.freeze({"\u208A":"+","\u208B":"-","\u208C":"=","\u208D":"(","\u208E":")","\u2080":"0","\u2081":"1","\u2082":"2","\u2083":"3","\u2084":"4","\u2085":"5","\u2086":"6","\u2087":"7","\u2088":"8","\u2089":"9","\u2090":"a","\u2091":"e","\u2095":"h","\u1D62":"i","\u2C7C":"j","\u2096":"k","\u2097":"l","\u2098":"m","\u2099":"n","\u2092":"o","\u209A":"p","\u1D63":"r","\u209B":"s","\u209C":"t","\u1D64":"u","\u1D65":"v","\u2093":"x","\u1D66":"\u03B2","\u1D67":"\u03B3","\u1D68":"\u03C1","\u1D69":"\u03D5","\u1D6A":"\u03C7","\u207A":"+","\u207B":"-","\u207C":"=","\u207D":"(","\u207E":")","\u2070":"0","\xB9":"1","\xB2":"2","\xB3":"3","\u2074":"4","\u2075":"5","\u2076":"6","\u2077":"7","\u2078":"8","\u2079":"9","\u1D2C":"A","\u1D2E":"B","\u1D30":"D","\u1D31":"E","\u1D33":"G","\u1D34":"H","\u1D35":"I","\u1D36":"J","\u1D37":"K","\u1D38":"L","\u1D39":"M","\u1D3A":"N","\u1D3C":"O","\u1D3E":"P","\u1D3F":"R","\u1D40":"T","\u1D41":"U","\u2C7D":"V","\u1D42":"W","\u1D43":"a","\u1D47":"b","\u1D9C":"c","\u1D48":"d","\u1D49":"e","\u1DA0":"f","\u1D4D":"g",\u02B0:"h","\u2071":"i",\u02B2:"j","\u1D4F":"k",\u02E1:"l","\u1D50":"m",\u207F:"n","\u1D52":"o","\u1D56":"p",\u02B3:"r",\u02E2:"s","\u1D57":"t","\u1D58":"u","\u1D5B":"v",\u02B7:"w",\u02E3:"x",\u02B8:"y","\u1DBB":"z","\u1D5D":"\u03B2","\u1D5E":"\u03B3","\u1D5F":"\u03B4","\u1D60":"\u03D5","\u1D61":"\u03C7","\u1DBF":"\u03B8"}),TM={"\u0301":{text:"\\'",math:"\\acute"},"\u0300":{text:"\\`",math:"\\grave"},"\u0308":{text:'\\"',math:"\\ddot"},"\u0303":{text:"\\~",math:"\\tilde"},"\u0304":{text:"\\=",math:"\\bar"},"\u0306":{text:"\\u",math:"\\breve"},"\u030C":{text:"\\v",math:"\\check"},"\u0302":{text:"\\^",math:"\\hat"},"\u0307":{text:"\\.",math:"\\dot"},"\u030A":{text:"\\r",math:"\\mathring"},"\u030B":{text:"\\H"},"\u0327":{text:"\\c"}},sJ={\u00E1:"a\u0301",\u00E0:"a\u0300",\u00E4:"a\u0308",\u01DF:"a\u0308\u0304",\u00E3:"a\u0303",\u0101:"a\u0304",\u0103:"a\u0306",\u1EAF:"a\u0306\u0301",\u1EB1:"a\u0306\u0300",\u1EB5:"a\u0306\u0303",\u01CE:"a\u030C",\u00E2:"a\u0302",\u1EA5:"a\u0302\u0301",\u1EA7:"a\u0302\u0300",\u1EAB:"a\u0302\u0303",\u0227:"a\u0307",\u01E1:"a\u0307\u0304",\u00E5:"a\u030A",\u01FB:"a\u030A\u0301",\u1E03:"b\u0307",\u0107:"c\u0301",\u1E09:"c\u0327\u0301",\u010D:"c\u030C",\u0109:"c\u0302",\u010B:"c\u0307",\u00E7:"c\u0327",\u010F:"d\u030C",\u1E0B:"d\u0307",\u1E11:"d\u0327",\u00E9:"e\u0301",\u00E8:"e\u0300",\u00EB:"e\u0308",\u1EBD:"e\u0303",\u0113:"e\u0304",\u1E17:"e\u0304\u0301",\u1E15:"e\u0304\u0300",\u0115:"e\u0306",\u1E1D:"e\u0327\u0306",\u011B:"e\u030C",\u00EA:"e\u0302",\u1EBF:"e\u0302\u0301",\u1EC1:"e\u0302\u0300",\u1EC5:"e\u0302\u0303",\u0117:"e\u0307",\u0229:"e\u0327",\u1E1F:"f\u0307",\u01F5:"g\u0301",\u1E21:"g\u0304",\u011F:"g\u0306",\u01E7:"g\u030C",\u011D:"g\u0302",\u0121:"g\u0307",\u0123:"g\u0327",\u1E27:"h\u0308",\u021F:"h\u030C",\u0125:"h\u0302",\u1E23:"h\u0307",\u1E29:"h\u0327",\u00ED:"i\u0301",\u00EC:"i\u0300",\u00EF:"i\u0308",\u1E2F:"i\u0308\u0301",\u0129:"i\u0303",\u012B:"i\u0304",\u012D:"i\u0306",\u01D0:"i\u030C",\u00EE:"i\u0302",\u01F0:"j\u030C",\u0135:"j\u0302",\u1E31:"k\u0301",\u01E9:"k\u030C",\u0137:"k\u0327",\u013A:"l\u0301",\u013E:"l\u030C",\u013C:"l\u0327",\u1E3F:"m\u0301",\u1E41:"m\u0307",\u0144:"n\u0301",\u01F9:"n\u0300",\u00F1:"n\u0303",\u0148:"n\u030C",\u1E45:"n\u0307",\u0146:"n\u0327",\u00F3:"o\u0301",\u00F2:"o\u0300",\u00F6:"o\u0308",\u022B:"o\u0308\u0304",\u00F5:"o\u0303",\u1E4D:"o\u0303\u0301",\u1E4F:"o\u0303\u0308",\u022D:"o\u0303\u0304",\u014D:"o\u0304",\u1E53:"o\u0304\u0301",\u1E51:"o\u0304\u0300",\u014F:"o\u0306",\u01D2:"o\u030C",\u00F4:"o\u0302",\u1ED1:"o\u0302\u0301",\u1ED3:"o\u0302\u0300",\u1ED7:"o\u0302\u0303",\u022F:"o\u0307",\u0231:"o\u0307\u0304",\u0151:"o\u030B",\u1E55:"p\u0301",\u1E57:"p\u0307",\u0155:"r\u0301",\u0159:"r\u030C",\u1E59:"r\u0307",\u0157:"r\u0327",\u015B:"s\u0301",\u1E65:"s\u0301\u0307",\u0161:"s\u030C",\u1E67:"s\u030C\u0307",\u015D:"s\u0302",\u1E61:"s\u0307",\u015F:"s\u0327",\u1E97:"t\u0308",\u0165:"t\u030C",\u1E6B:"t\u0307",\u0163:"t\u0327",\u00FA:"u\u0301",\u00F9:"u\u0300",\u00FC:"u\u0308",\u01D8:"u\u0308\u0301",\u01DC:"u\u0308\u0300",\u01D6:"u\u0308\u0304",\u01DA:"u\u0308\u030C",\u0169:"u\u0303",\u1E79:"u\u0303\u0301",\u016B:"u\u0304",\u1E7B:"u\u0304\u0308",\u016D:"u\u0306",\u01D4:"u\u030C",\u00FB:"u\u0302",\u016F:"u\u030A",\u0171:"u\u030B",\u1E7D:"v\u0303",\u1E83:"w\u0301",\u1E81:"w\u0300",\u1E85:"w\u0308",\u0175:"w\u0302",\u1E87:"w\u0307",\u1E98:"w\u030A",\u1E8D:"x\u0308",\u1E8B:"x\u0307",\u00FD:"y\u0301",\u1EF3:"y\u0300",\u00FF:"y\u0308",\u1EF9:"y\u0303",\u0233:"y\u0304",\u0177:"y\u0302",\u1E8F:"y\u0307",\u1E99:"y\u030A",\u017A:"z\u0301",\u017E:"z\u030C",\u1E91:"z\u0302",\u017C:"z\u0307",\u00C1:"A\u0301",\u00C0:"A\u0300",\u00C4:"A\u0308",\u01DE:"A\u0308\u0304",\u00C3:"A\u0303",\u0100:"A\u0304",\u0102:"A\u0306",\u1EAE:"A\u0306\u0301",\u1EB0:"A\u0306\u0300",\u1EB4:"A\u0306\u0303",\u01CD:"A\u030C",\u00C2:"A\u0302",\u1EA4:"A\u0302\u0301",\u1EA6:"A\u0302\u0300",\u1EAA:"A\u0302\u0303",\u0226:"A\u0307",\u01E0:"A\u0307\u0304",\u00C5:"A\u030A",\u01FA:"A\u030A\u0301",\u1E02:"B\u0307",\u0106:"C\u0301",\u1E08:"C\u0327\u0301",\u010C:"C\u030C",\u0108:"C\u0302",\u010A:"C\u0307",\u00C7:"C\u0327",\u010E:"D\u030C",\u1E0A:"D\u0307",\u1E10:"D\u0327",\u00C9:"E\u0301",\u00C8:"E\u0300",\u00CB:"E\u0308",\u1EBC:"E\u0303",\u0112:"E\u0304",\u1E16:"E\u0304\u0301",\u1E14:"E\u0304\u0300",\u0114:"E\u0306",\u1E1C:"E\u0327\u0306",\u011A:"E\u030C",\u00CA:"E\u0302",\u1EBE:"E\u0302\u0301",\u1EC0:"E\u0302\u0300",\u1EC4:"E\u0302\u0303",\u0116:"E\u0307",\u0228:"E\u0327",\u1E1E:"F\u0307",\u01F4:"G\u0301",\u1E20:"G\u0304",\u011E:"G\u0306",\u01E6:"G\u030C",\u011C:"G\u0302",\u0120:"G\u0307",\u0122:"G\u0327",\u1E26:"H\u0308",\u021E:"H\u030C",\u0124:"H\u0302",\u1E22:"H\u0307",\u1E28:"H\u0327",\u00CD:"I\u0301",\u00CC:"I\u0300",\u00CF:"I\u0308",\u1E2E:"I\u0308\u0301",\u0128:"I\u0303",\u012A:"I\u0304",\u012C:"I\u0306",\u01CF:"I\u030C",\u00CE:"I\u0302",\u0130:"I\u0307",\u0134:"J\u0302",\u1E30:"K\u0301",\u01E8:"K\u030C",\u0136:"K\u0327",\u0139:"L\u0301",\u013D:"L\u030C",\u013B:"L\u0327",\u1E3E:"M\u0301",\u1E40:"M\u0307",\u0143:"N\u0301",\u01F8:"N\u0300",\u00D1:"N\u0303",\u0147:"N\u030C",\u1E44:"N\u0307",\u0145:"N\u0327",\u00D3:"O\u0301",\u00D2:"O\u0300",\u00D6:"O\u0308",\u022A:"O\u0308\u0304",\u00D5:"O\u0303",\u1E4C:"O\u0303\u0301",\u1E4E:"O\u0303\u0308",\u022C:"O\u0303\u0304",\u014C:"O\u0304",\u1E52:"O\u0304\u0301",\u1E50:"O\u0304\u0300",\u014E:"O\u0306",\u01D1:"O\u030C",\u00D4:"O\u0302",\u1ED0:"O\u0302\u0301",\u1ED2:"O\u0302\u0300",\u1ED6:"O\u0302\u0303",\u022E:"O\u0307",\u0230:"O\u0307\u0304",\u0150:"O\u030B",\u1E54:"P\u0301",\u1E56:"P\u0307",\u0154:"R\u0301",\u0158:"R\u030C",\u1E58:"R\u0307",\u0156:"R\u0327",\u015A:"S\u0301",\u1E64:"S\u0301\u0307",\u0160:"S\u030C",\u1E66:"S\u030C\u0307",\u015C:"S\u0302",\u1E60:"S\u0307",\u015E:"S\u0327",\u0164:"T\u030C",\u1E6A:"T\u0307",\u0162:"T\u0327",\u00DA:"U\u0301",\u00D9:"U\u0300",\u00DC:"U\u0308",\u01D7:"U\u0308\u0301",\u01DB:"U\u0308\u0300",\u01D5:"U\u0308\u0304",\u01D9:"U\u0308\u030C",\u0168:"U\u0303",\u1E78:"U\u0303\u0301",\u016A:"U\u0304",\u1E7A:"U\u0304\u0308",\u016C:"U\u0306",\u01D3:"U\u030C",\u00DB:"U\u0302",\u016E:"U\u030A",\u0170:"U\u030B",\u1E7C:"V\u0303",\u1E82:"W\u0301",\u1E80:"W\u0300",\u1E84:"W\u0308",\u0174:"W\u0302",\u1E86:"W\u0307",\u1E8C:"X\u0308",\u1E8A:"X\u0307",\u00DD:"Y\u0301",\u1EF2:"Y\u0300",\u0178:"Y\u0308",\u1EF8:"Y\u0303",\u0232:"Y\u0304",\u0176:"Y\u0302",\u1E8E:"Y\u0307",\u0179:"Z\u0301",\u017D:"Z\u030C",\u1E90:"Z\u0302",\u017B:"Z\u0307",\u03AC:"\u03B1\u0301",\u1F70:"\u03B1\u0300",\u1FB1:"\u03B1\u0304",\u1FB0:"\u03B1\u0306",\u03AD:"\u03B5\u0301",\u1F72:"\u03B5\u0300",\u03AE:"\u03B7\u0301",\u1F74:"\u03B7\u0300",\u03AF:"\u03B9\u0301",\u1F76:"\u03B9\u0300",\u03CA:"\u03B9\u0308",\u0390:"\u03B9\u0308\u0301",\u1FD2:"\u03B9\u0308\u0300",\u1FD1:"\u03B9\u0304",\u1FD0:"\u03B9\u0306",\u03CC:"\u03BF\u0301",\u1F78:"\u03BF\u0300",\u03CD:"\u03C5\u0301",\u1F7A:"\u03C5\u0300",\u03CB:"\u03C5\u0308",\u03B0:"\u03C5\u0308\u0301",\u1FE2:"\u03C5\u0308\u0300",\u1FE1:"\u03C5\u0304",\u1FE0:"\u03C5\u0306",\u03CE:"\u03C9\u0301",\u1F7C:"\u03C9\u0300",\u038E:"\u03A5\u0301",\u1FEA:"\u03A5\u0300",\u03AB:"\u03A5\u0308",\u1FE9:"\u03A5\u0304",\u1FE8:"\u03A5\u0306",\u038F:"\u03A9\u0301",\u1FFA:"\u03A9\u0300"},Pk=class t{constructor(e,r){this.mode=void 0,this.gullet=void 0,this.settings=void 0,this.leftrightDepth=void 0,this.nextToken=void 0,this.mode="math",this.gullet=new UM(e,r,this.mode),this.settings=r,this.leftrightDepth=0,this.nextToken=null}expect(e,r){if(r===void 0&&(r=!0),this.fetch().text!==e)throw new Ft("Expected '"+e+"', got '"+this.fetch().text+"'",this.fetch());r&&this.consume()}consume(){this.nextToken=null}fetch(){return this.nextToken==null&&(this.nextToken=this.gullet.expandNextToken()),this.nextToken}switchMode(e){this.mode=e,this.gullet.switchMode(e)}parse(){this.settings.globalGroup||this.gullet.beginGroup(),this.settings.colorIsTextColor&&this.gullet.macros.set("\\color","\\textcolor");try{var e=this.parseExpression(!1);return this.expect("EOF"),this.settings.globalGroup||this.gullet.endGroup(),e}finally{this.gullet.endGroups()}}subparse(e){var r=this.nextToken;this.consume(),this.gullet.pushToken(new Tl("}")),this.gullet.pushTokens(e);var n=this.parseExpression(!1);return this.expect("}"),this.nextToken=r,n}parseExpression(e,r){for(var n=[];;){this.mode==="math"&&this.consumeSpaces();var i=this.fetch();if(t.endOfExpression.has(i.text)||r&&i.text===r||e&&Ff[i.text]&&Ff[i.text].infix)break;var a=this.parseAtom(r);if(a){if(a.type==="internal")continue}else break;n.push(a)}return this.mode==="text"&&this.formLigatures(n),this.handleInfixNodes(n)}handleInfixNodes(e){for(var r=-1,n,i=0;i=128)this.settings.strict&&(oJ(r.charCodeAt(0))?this.mode==="math"&&this.settings.reportNonstrict("unicodeTextInMathMode",'Unicode text character "'+r[0]+'" used in math mode',e):this.settings.reportNonstrict("unknownSymbol",'Unrecognized Unicode character "'+r[0]+'"'+(" ("+r.charCodeAt(0)+")"),e)),s={type:"textord",mode:"text",loc:Uo.range(e),text:r};else return null;if(this.consume(),a)for(var h=0;h{(function(e,r){typeof Xb=="object"&&typeof oN=="object"?oN.exports=r():typeof define=="function"&&define.amd?define([],r):typeof Xb=="object"?Xb.katex=r():e.katex=r()})(typeof self<"u"?self:Xb,function(){return(function(){"use strict";var t={};(function(){t.d=function(E,w){for(var L in w)t.o(w,L)&&!t.o(E,L)&&Object.defineProperty(E,L,{enumerable:!0,get:w[L]})}})(),(function(){t.o=function(E,w){return Object.prototype.hasOwnProperty.call(E,w)}})();var e={};t.d(e,{default:function(){return bPe}});class r extends Error{constructor(w,L){let G="KaTeX parse error: "+w,Y,Q,ae=L&&L.loc;if(ae&&ae.start<=ae.end){let be=ae.lexer.input;Y=ae.start,Q=ae.end,Y===be.length?G+=" at end of input: ":G+=" at position "+(Y+1)+": ";let Ie=be.slice(Y,Q).replace(/[^]/g,"$&\u0332"),$e;Y>15?$e="\u2026"+be.slice(Y-15,Y):$e=be.slice(0,Y);let it;Q+15E.replace(i,"-$1").toLowerCase(),s={"&":"&",">":">","<":"<",'"':""","'":"'"},o=/[&><"']/g,l=E=>String(E).replace(o,w=>s[w]),u=E=>E.type==="ordgroup"||E.type==="color"?E.body.length===1?u(E.body[0]):E:E.type==="font"?u(E.body):E,h=new Set(["mathord","textord","atom"]),f=E=>h.has(u(E).type),d=E=>{let w=/^[\x00-\x20]*([^\\/#?]*?)(:|�*58|�*3a|&colon)/i.exec(E);return w?w[2]!==":"||!/^[a-zA-Z][a-zA-Z0-9+\-.]*$/.test(w[1])?null:w[1].toLowerCase():"_relative"},p={displayMode:{type:"boolean",description:"Render math in display mode, which puts the math in display style (so \\int and \\sum are large, for example), and centers the math on the page on its own line.",cli:"-d, --display-mode"},output:{type:{enum:["htmlAndMathml","html","mathml"]},description:"Determines the markup language of the output.",cli:"-F, --format "},leqno:{type:"boolean",description:"Render display math in leqno style (left-justified tags)."},fleqn:{type:"boolean",description:"Render display math flush left."},throwOnError:{type:"boolean",default:!0,cli:"-t, --no-throw-on-error",cliDescription:"Render errors (in the color given by --error-color) instead of throwing a ParseError exception when encountering an error."},errorColor:{type:"string",default:"#cc0000",cli:"-c, --error-color ",cliDescription:"A color string given in the format 'rgb' or 'rrggbb' (no #). This option determines the color of errors rendered by the -t option.",cliProcessor:E=>"#"+E},macros:{type:"object",cli:"-m, --macro ",cliDescription:"Define custom macro of the form '\\foo:expansion' (use multiple -m arguments for multiple macros).",cliDefault:[],cliProcessor:(E,w)=>(w.push(E),w)},minRuleThickness:{type:"number",description:"Specifies a minimum thickness, in ems, for fraction lines, `\\sqrt` top lines, `{array}` vertical lines, `\\hline`, `\\hdashline`, `\\underline`, `\\overline`, and the borders of `\\fbox`, `\\boxed`, and `\\fcolorbox`.",processor:E=>Math.max(0,E),cli:"--min-rule-thickness ",cliProcessor:parseFloat},colorIsTextColor:{type:"boolean",description:"Makes \\color behave like LaTeX's 2-argument \\textcolor, instead of LaTeX's one-argument \\color mode change.",cli:"-b, --color-is-text-color"},strict:{type:[{enum:["warn","ignore","error"]},"boolean","function"],description:"Turn on strict / LaTeX faithfulness mode, which throws an error if the input uses features that are not supported by LaTeX.",cli:"-S, --strict",cliDefault:!1},trust:{type:["boolean","function"],description:"Trust the input, enabling all HTML features such as \\url.",cli:"-T, --trust"},maxSize:{type:"number",default:1/0,description:"If non-zero, all user-specified sizes, e.g. in \\rule{500em}{500em}, will be capped to maxSize ems. Otherwise, elements and spaces can be arbitrarily large",processor:E=>Math.max(0,E),cli:"-s, --max-size ",cliProcessor:parseInt},maxExpand:{type:"number",default:1e3,description:"Limit the number of macro expansions to the specified number, to prevent e.g. infinite macro loops. If set to Infinity, the macro expander will try to fully expand as in LaTeX.",processor:E=>Math.max(0,E),cli:"-e, --max-expand ",cliProcessor:E=>E==="Infinity"?1/0:parseInt(E)},globalGroup:{type:"boolean",cli:!1}};function m(E){if(typeof E!="string")return E.enum[0];switch(E){case"boolean":return!1;case"string":return"";case"number":return 0;case"object":return{};default:throw new Error("Unexpected schema type; settings must declare an explicit default.")}}function g(E){if(E.default!==void 0)return E.default;let w=Array.isArray(E.type)?E.type[0]:E.type;return m(w)}function y(E,w,L,G){let Y=L[w];E[w]=Y!==void 0?G.processor?G.processor(Y):Y:g(G)}class v{constructor(w){w===void 0&&(w={}),this.displayMode=void 0,this.output=void 0,this.leqno=void 0,this.fleqn=void 0,this.throwOnError=void 0,this.errorColor=void 0,this.macros=void 0,this.minRuleThickness=void 0,this.colorIsTextColor=void 0,this.strict=void 0,this.trust=void 0,this.maxSize=void 0,this.maxExpand=void 0,this.globalGroup=void 0,w=w||{};for(let L of Object.keys(p)){let G=p[L];G&&y(this,L,w,G)}}reportNonstrict(w,L,G){let Y=this.strict;if(typeof Y=="function"&&(Y=Y(w,L,G)),!(!Y||Y==="ignore")){if(Y===!0||Y==="error")throw new n("LaTeX-incompatible input and strict mode is set to 'error': "+(L+" ["+w+"]"),G);Y==="warn"?typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+(L+" ["+w+"]")):typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to "+("unrecognized '"+Y+"': "+L+" ["+w+"]"))}}useStrictBehavior(w,L,G){let Y=this.strict;if(typeof Y=="function")try{Y=Y(w,L,G)}catch{Y="error"}return!Y||Y==="ignore"?!1:Y===!0||Y==="error"?!0:Y==="warn"?(typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+(L+" ["+w+"]")),!1):(typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to "+("unrecognized '"+Y+"': "+L+" ["+w+"]")),!1)}isTrusted(w){if("url"in w&&w.url&&!w.protocol){let G=d(w.url);if(G==null)return!1;w.protocol=G}return!!(typeof this.trust=="function"?this.trust(w):this.trust)}}class x{constructor(w,L,G){this.id=void 0,this.size=void 0,this.cramped=void 0,this.id=w,this.size=L,this.cramped=G}sup(){return O[C[this.id]]}sub(){return O[N[this.id]]}fracNum(){return O[B[this.id]]}fracDen(){return O[F[this.id]]}cramp(){return O[M[this.id]]}text(){return O[$[this.id]]}isTight(){return this.size>=2}}let k=0,_=1,T=2,S=3,R=4,A=5,I=6,P=7,O=[new x(k,0,!1),new x(_,0,!0),new x(T,1,!1),new x(S,1,!0),new x(R,2,!1),new x(A,2,!0),new x(I,3,!1),new x(P,3,!0)],C=[R,A,R,A,I,P,I,P],N=[A,A,A,A,P,P,P,P],B=[T,S,R,A,I,P,I,P],F=[S,S,A,A,P,P,P,P],M=[_,_,S,S,A,A,P,P],$=[k,_,T,S,T,S,T,S];var z={DISPLAY:O[k],TEXT:O[T],SCRIPT:O[R],SCRIPTSCRIPT:O[I]};let q=[{name:"latin",blocks:[[256,591],[768,879]]},{name:"cyrillic",blocks:[[1024,1279]]},{name:"armenian",blocks:[[1328,1423]]},{name:"brahmic",blocks:[[2304,4255]]},{name:"georgian",blocks:[[4256,4351]]},{name:"cjk",blocks:[[12288,12543],[19968,40879],[65280,65376]]},{name:"hangul",blocks:[[44032,55215]]}];function V(E){for(let w=0;w=Y[0]&&E<=Y[1])return L.name}}return null}let U=[];q.forEach(E=>E.blocks.forEach(w=>U.push(...w)));function J(E){for(let w=0;w=U[w]&&E<=U[w+1])return!0;return!1}let se=E=>E+" "+E,re=80,me=function(E,w){return"M95,"+(622+E+w)+` +c-2.7,0,-7.17,-2.7,-13.5,-8c-5.8,-5.3,-9.5,-10,-9.5,-14 +c0,-2,0.3,-3.3,1,-4c1.3,-2.7,23.83,-20.7,67.5,-54 +c44.2,-33.3,65.8,-50.3,66.5,-51c1.3,-1.3,3,-2,5,-2c4.7,0,8.7,3.3,12,10 +s173,378,173,378c0.7,0,35.3,-71,104,-213c68.7,-142,137.5,-285,206.5,-429 +c69,-144,104.5,-217.7,106.5,-221 +l`+E/2.075+" -"+E+` +c5.3,-9.3,12,-14,20,-14 +H400000v`+(40+E)+`H845.2724 +s-225.272,467,-225.272,467s-235,486,-235,486c-2.7,4.7,-9,7,-19,7 +c-6,0,-10,-1,-12,-3s-194,-422,-194,-422s-65,47,-65,47z +M`+(834+E)+" "+w+"h400000v"+(40+E)+"h-400000z"},ge=function(E,w){return"M263,"+(601+E+w)+`c0.7,0,18,39.7,52,119 +c34,79.3,68.167,158.7,102.5,238c34.3,79.3,51.8,119.3,52.5,120 +c340,-704.7,510.7,-1060.3,512,-1067 +l`+E/2.084+" -"+E+` +c4.7,-7.3,11,-11,19,-11 +H40000v`+(40+E)+`H1012.3 +s-271.3,567,-271.3,567c-38.7,80.7,-84,175,-136,283c-52,108,-89.167,185.3,-111.5,232 +c-22.3,46.7,-33.8,70.3,-34.5,71c-4.7,4.7,-12.3,7,-23,7s-12,-1,-12,-1 +s-109,-253,-109,-253c-72.7,-168,-109.3,-252,-110,-252c-10.7,8,-22,16.7,-34,26 +c-22,17.3,-33.3,26,-34,26s-26,-26,-26,-26s76,-59,76,-59s76,-60,76,-60z +M`+(1001+E)+" "+w+"h400000v"+(40+E)+"h-400000z"},ye=function(E,w){return"M983 "+(10+E+w)+` +l`+E/3.13+" -"+E+` +c4,-6.7,10,-10,18,-10 H400000v`+(40+E)+` +H1013.1s-83.4,268,-264.1,840c-180.7,572,-277,876.3,-289,913c-4.7,4.7,-12.7,7,-24,7 +s-12,0,-12,0c-1.3,-3.3,-3.7,-11.7,-7,-25c-35.3,-125.3,-106.7,-373.3,-214,-744 +c-10,12,-21,25,-33,39s-32,39,-32,39c-6,-5.3,-15,-14,-27,-26s25,-30,25,-30 +c26.7,-32.7,52,-63,76,-91s52,-60,52,-60s208,722,208,722 +c56,-175.3,126.3,-397.3,211,-666c84.7,-268.7,153.8,-488.2,207.5,-658.5 +c53.7,-170.3,84.5,-266.8,92.5,-289.5z +M`+(1001+E)+" "+w+"h400000v"+(40+E)+"h-400000z"},_e=function(E,w){return"M424,"+(2398+E+w)+` +c-1.3,-0.7,-38.5,-172,-111.5,-514c-73,-342,-109.8,-513.3,-110.5,-514 +c0,-2,-10.7,14.3,-32,49c-4.7,7.3,-9.8,15.7,-15.5,25c-5.7,9.3,-9.8,16,-12.5,20 +s-5,7,-5,7c-4,-3.3,-8.3,-7.7,-13,-13s-13,-13,-13,-13s76,-122,76,-122s77,-121,77,-121 +s209,968,209,968c0,-2,84.7,-361.7,254,-1079c169.3,-717.3,254.7,-1077.7,256,-1081 +l`+E/4.223+" -"+E+`c4,-6.7,10,-10,18,-10 H400000 +v`+(40+E)+`H1014.6 +s-87.3,378.7,-272.6,1166c-185.3,787.3,-279.3,1182.3,-282,1185 +c-2,6,-10,9,-24,9 +c-8,0,-12,-0.7,-12,-2z M`+(1001+E)+" "+w+` +h400000v`+(40+E)+"h-400000z"},ue=function(E,w){return"M473,"+(2713+E+w)+` +c339.3,-1799.3,509.3,-2700,510,-2702 l`+E/5.298+" -"+E+` +c3.3,-7.3,9.3,-11,18,-11 H400000v`+(40+E)+`H1017.7 +s-90.5,478,-276.2,1466c-185.7,988,-279.5,1483,-281.5,1485c-2,6,-10,9,-24,9 +c-8,0,-12,-0.7,-12,-2c0,-1.3,-5.3,-32,-16,-92c-50.7,-293.3,-119.7,-693.3,-207,-1200 +c0,-1.3,-5.3,8.7,-16,30c-10.7,21.3,-21.3,42.7,-32,64s-16,33,-16,33s-26,-26,-26,-26 +s76,-153,76,-153s77,-151,77,-151c0.7,0.7,35.7,202,105,604c67.3,400.7,102,602.7,104, +606zM`+(1001+E)+" "+w+"h400000v"+(40+E)+"H1017.7z"},ie=function(E){let w=E/2;return"M400000 "+E+" H0 L"+w+" 0 l65 45 L145 "+(E-80)+" H400000z"},le=function(E,w,L){let G=L-54-w-E;return"M702 "+(E+w)+"H400000"+(40+E)+` +H742v`+G+`l-4 4-4 4c-.667.7 -2 1.5-4 2.5s-4.167 1.833-6.5 2.5-5.5 1-9.5 1 +h-12l-28-84c-16.667-52-96.667 -294.333-240-727l-212 -643 -85 170 +c-4-3.333-8.333-7.667-13 -13l-13-13l77-155 77-156c66 199.333 139 419.667 +219 661 l218 661zM702 `+w+"H400000v"+(40+E)+"H742z"},oe=function(E,w,L){w=1e3*w;let G="";switch(E){case"sqrtMain":G=me(w,re);break;case"sqrtSize1":G=ge(w,re);break;case"sqrtSize2":G=ye(w,re);break;case"sqrtSize3":G=_e(w,re);break;case"sqrtSize4":G=ue(w,re);break;case"sqrtTall":G=le(w,re,L)}return G},ne=function(E,w){switch(E){case"\u239C":return se("M291 0 H417 V"+w+" H291z");case"\u2223":return se("M145 0 H188 V"+w+" H145z");case"\u2225":return se("M145 0 H188 V"+w+" H145z")+se("M367 0 H410 V"+w+" H367z");case"\u239F":return se("M457 0 H583 V"+w+" H457z");case"\u23A2":return se("M319 0 H403 V"+w+" H319z");case"\u23A5":return se("M263 0 H347 V"+w+" H263z");case"\u23AA":return se("M384 0 H504 V"+w+" H384z");case"\u23D0":return se("M312 0 H355 V"+w+" H312z");case"\u2016":return se("M257 0 H300 V"+w+" H257z")+se("M478 0 H521 V"+w+" H478z");default:return""}},pe={doubleleftarrow:`M262 157 +l10-10c34-36 62.7-77 86-123 3.3-8 5-13.3 5-16 0-5.3-6.7-8-20-8-7.3 + 0-12.2.5-14.5 1.5-2.3 1-4.8 4.5-7.5 10.5-49.3 97.3-121.7 169.3-217 216-28 + 14-57.3 25-88 33-6.7 2-11 3.8-13 5.5-2 1.7-3 4.2-3 7.5s1 5.8 3 7.5 +c2 1.7 6.3 3.5 13 5.5 68 17.3 128.2 47.8 180.5 91.5 52.3 43.7 93.8 96.2 124.5 + 157.5 9.3 8 15.3 12.3 18 13h6c12-.7 18-4 18-10 0-2-1.7-7-5-15-23.3-46-52-87 +-86-123l-10-10h399738v-40H218c328 0 0 0 0 0l-10-8c-26.7-20-65.7-43-117-69 2.7 +-2 6-3.7 10-5 36.7-16 72.3-37.3 107-64l10-8h399782v-40z +m8 0v40h399730v-40zm0 194v40h399730v-40z`,doublerightarrow:`M399738 392l +-10 10c-34 36-62.7 77-86 123-3.3 8-5 13.3-5 16 0 5.3 6.7 8 20 8 7.3 0 12.2-.5 + 14.5-1.5 2.3-1 4.8-4.5 7.5-10.5 49.3-97.3 121.7-169.3 217-216 28-14 57.3-25 88 +-33 6.7-2 11-3.8 13-5.5 2-1.7 3-4.2 3-7.5s-1-5.8-3-7.5c-2-1.7-6.3-3.5-13-5.5-68 +-17.3-128.2-47.8-180.5-91.5-52.3-43.7-93.8-96.2-124.5-157.5-9.3-8-15.3-12.3-18 +-13h-6c-12 .7-18 4-18 10 0 2 1.7 7 5 15 23.3 46 52 87 86 123l10 10H0v40h399782 +c-328 0 0 0 0 0l10 8c26.7 20 65.7 43 117 69-2.7 2-6 3.7-10 5-36.7 16-72.3 37.3 +-107 64l-10 8H0v40zM0 157v40h399730v-40zm0 194v40h399730v-40z`,leftarrow:`M400000 241H110l3-3c68.7-52.7 113.7-120 + 135-202 4-14.7 6-23 6-25 0-7.3-7-11-21-11-8 0-13.2.8-15.5 2.5-2.3 1.7-4.2 5.8 +-5.5 12.5-1.3 4.7-2.7 10.3-4 17-12 48.7-34.8 92-68.5 130S65.3 228.3 18 247 +c-10 4-16 7.7-18 11 0 8.7 6 14.3 18 17 47.3 18.7 87.8 47 121.5 85S196 441.3 208 + 490c.7 2 1.3 5 2 9s1.2 6.7 1.5 8c.3 1.3 1 3.3 2 6s2.2 4.5 3.5 5.5c1.3 1 3.3 + 1.8 6 2.5s6 1 10 1c14 0 21-3.7 21-11 0-2-2-10.3-6-25-20-79.3-65-146.7-135-202 + l-3-3h399890zM100 241v40h399900v-40z`,leftbrace:`M6 548l-6-6v-35l6-11c56-104 135.3-181.3 238-232 57.3-28.7 117 +-45 179-50h399577v120H403c-43.3 7-81 15-113 26-100.7 33-179.7 91-237 174-2.7 + 5-6 9-10 13-.7 1-7.3 1-20 1H6z`,leftbraceunder:`M0 6l6-6h17c12.688 0 19.313.3 20 1 4 4 7.313 8.3 10 13 + 35.313 51.3 80.813 93.8 136.5 127.5 55.688 33.7 117.188 55.8 184.5 66.5.688 + 0 2 .3 4 1 18.688 2.7 76 4.3 172 5h399450v120H429l-6-1c-124.688-8-235-61.7 +-331-161C60.687 138.7 32.312 99.3 7 54L0 41V6z`,leftgroup:`M400000 80 +H435C64 80 168.3 229.4 21 260c-5.9 1.2-18 0-18 0-2 0-3-1-3-3v-38C76 61 257 0 + 435 0h399565z`,leftgroupunder:`M400000 262 +H435C64 262 168.3 112.6 21 82c-5.9-1.2-18 0-18 0-2 0-3 1-3 3v38c76 158 257 219 + 435 219h399565z`,leftharpoon:`M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3 +-3.3 10.2-9.5 20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5 +-18.3 3-21-1.3-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7 +-196 228-6.7 4.7-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40z`,leftharpoonplus:`M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3-3.3 10.2-9.5 + 20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5-18.3 3-21-1.3 +-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7-196 228-6.7 4.7 +-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40zM0 435v40h400000v-40z +m0 0v40h400000v-40z`,leftharpoondown:`M7 241c-4 4-6.333 8.667-7 14 0 5.333.667 9 2 11s5.333 + 5.333 12 10c90.667 54 156 130 196 228 3.333 10.667 6.333 16.333 9 17 2 .667 5 + 1 9 1h5c10.667 0 16.667-2 18-6 2-2.667 1-9.667-3-21-32-87.333-82.667-157.667 +-152-211l-3-3h399907v-40zM93 281 H400000 v-40L7 241z`,leftharpoondownplus:`M7 435c-4 4-6.3 8.7-7 14 0 5.3.7 9 2 11s5.3 5.3 12 + 10c90.7 54 156 130 196 228 3.3 10.7 6.3 16.3 9 17 2 .7 5 1 9 1h5c10.7 0 16.7 +-2 18-6 2-2.7 1-9.7-3-21-32-87.3-82.7-157.7-152-211l-3-3h399907v-40H7zm93 0 +v40h399900v-40zM0 241v40h399900v-40zm0 0v40h399900v-40z`,lefthook:`M400000 281 H103s-33-11.2-61-33.5S0 197.3 0 164s14.2-61.2 42.5 +-83.5C70.8 58.2 104 47 142 47 c16.7 0 25 6.7 25 20 0 12-8.7 18.7-26 20-40 3.3 +-68.7 15.7-86 37-10 12-15 25.3-15 40 0 22.7 9.8 40.7 29.5 54 19.7 13.3 43.5 21 + 71.5 23h399859zM103 281v-40h399897v40z`,leftlinesegment:se("M40 281 V428 H0 V94 H40 V241 H400000 v40z"),leftbracketunder:se("M0 0 h120 V290 H399995 v120 H0z"),leftbracketover:se("M0 440 h120 V150 H399995 v-120 H0z"),leftmapsto:se("M40 281 V448H0V74H40V241H400000v40z"),leftToFrom:`M0 147h400000v40H0zm0 214c68 40 115.7 95.7 143 167h22c15.3 0 23 +-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69-70-101l-7-8h399905v-40H95l7-8 +c28.7-32 52-65.7 70-101 10.7-23.3 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 265.3 + 68 321 0 361zm0-174v-40h399900v40zm100 154v40h399900v-40z`,longequal:se("M0 50 h400000 v40H0z m0 194h40000v40H0z"),midbrace:`M200428 334 +c-100.7-8.3-195.3-44-280-108-55.3-42-101.7-93-139-153l-9-14c-2.7 4-5.7 8.7-9 14 +-53.3 86.7-123.7 153-211 199-66.7 36-137.3 56.3-212 62H0V214h199568c178.3-11.7 + 311.7-78.3 403-201 6-8 9.7-12 11-12 .7-.7 6.7-1 18-1s17.3.3 18 1c1.3 0 5 4 11 + 12 44.7 59.3 101.3 106.3 170 141s145.3 54.3 229 60h199572v120z`,midbraceunder:`M199572 214 +c100.7 8.3 195.3 44 280 108 55.3 42 101.7 93 139 153l9 14c2.7-4 5.7-8.7 9-14 + 53.3-86.7 123.7-153 211-199 66.7-36 137.3-56.3 212-62h199568v120H200432c-178.3 + 11.7-311.7 78.3-403 201-6 8-9.7 12-11 12-.7.7-6.7 1-18 1s-17.3-.3-18-1c-1.3 0 +-5-4-11-12-44.7-59.3-101.3-106.3-170-141s-145.3-54.3-229-60H0V214z`,oiintSize1:`M512.6 71.6c272.6 0 320.3 106.8 320.3 178.2 0 70.8-47.7 177.6 +-320.3 177.6S193.1 320.6 193.1 249.8c0-71.4 46.9-178.2 319.5-178.2z +m368.1 178.2c0-86.4-60.9-215.4-368.1-215.4-306.4 0-367.3 129-367.3 215.4 0 85.8 +60.9 214.8 367.3 214.8 307.2 0 368.1-129 368.1-214.8z`,oiintSize2:`M757.8 100.1c384.7 0 451.1 137.6 451.1 230 0 91.3-66.4 228.8 +-451.1 228.8-386.3 0-452.7-137.5-452.7-228.8 0-92.4 66.4-230 452.7-230z +m502.4 230c0-111.2-82.4-277.2-502.4-277.2s-504 166-504 277.2 +c0 110 84 276 504 276s502.4-166 502.4-276z`,oiiintSize1:`M681.4 71.6c408.9 0 480.5 106.8 480.5 178.2 0 70.8-71.6 177.6 +-480.5 177.6S202.1 320.6 202.1 249.8c0-71.4 70.5-178.2 479.3-178.2z +m525.8 178.2c0-86.4-86.8-215.4-525.7-215.4-437.9 0-524.7 129-524.7 215.4 0 +85.8 86.8 214.8 524.7 214.8 438.9 0 525.7-129 525.7-214.8z`,oiiintSize2:`M1021.2 53c603.6 0 707.8 165.8 707.8 277.2 0 110-104.2 275.8 +-707.8 275.8-606 0-710.2-165.8-710.2-275.8C311 218.8 415.2 53 1021.2 53z +m770.4 277.1c0-131.2-126.4-327.6-770.5-327.6S248.4 198.9 248.4 330.1 +c0 130 128.8 326.4 772.7 326.4s770.5-196.4 770.5-326.4z`,rightarrow:`M0 241v40h399891c-47.3 35.3-84 78-110 128 +-16.7 32-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20 + 11 8 0 13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7 + 39-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85 +-40.5-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5 +-12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67 + 151.7 139 205zm0 0v40h399900v-40z`,rightbrace:`M400000 542l +-6 6h-17c-12.7 0-19.3-.3-20-1-4-4-7.3-8.3-10-13-35.3-51.3-80.8-93.8-136.5-127.5 +s-117.2-55.8-184.5-66.5c-.7 0-2-.3-4-1-18.7-2.7-76-4.3-172-5H0V214h399571l6 1 +c124.7 8 235 61.7 331 161 31.3 33.3 59.7 72.7 85 118l7 13v35z`,rightbraceunder:`M399994 0l6 6v35l-6 11c-56 104-135.3 181.3-238 232-57.3 + 28.7-117 45-179 50H-300V214h399897c43.3-7 81-15 113-26 100.7-33 179.7-91 237 +-174 2.7-5 6-9 10-13 .7-1 7.3-1 20-1h17z`,rightgroup:`M0 80h399565c371 0 266.7 149.4 414 180 5.9 1.2 18 0 18 0 2 0 + 3-1 3-3v-38c-76-158-257-219-435-219H0z`,rightgroupunder:`M0 262h399565c371 0 266.7-149.4 414-180 5.9-1.2 18 0 18 + 0 2 0 3 1 3 3v38c-76 158-257 219-435 219H0z`,rightharpoon:`M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3 +-3.7-15.3-11-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2 +-10.7 0-16.7 2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58 + 69.2 92 94.5zm0 0v40h399900v-40z`,rightharpoonplus:`M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3-3.7-15.3-11 +-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2-10.7 0-16.7 + 2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58 69.2 92 94.5z +m0 0v40h399900v-40z m100 194v40h399900v-40zm0 0v40h399900v-40z`,rightharpoondown:`M399747 511c0 7.3 6.7 11 20 11 8 0 13-.8 15-2.5s4.7-6.8 + 8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3 8.5-5.8 9.5 +-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3-64.7 57-92 95 +-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 241v40h399900v-40z`,rightharpoondownplus:`M399747 705c0 7.3 6.7 11 20 11 8 0 13-.8 + 15-2.5s4.7-6.8 8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3 + 8.5-5.8 9.5-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3 +-64.7 57-92 95-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 435v40h399900v-40z +m0-194v40h400000v-40zm0 0v40h400000v-40z`,righthook:`M399859 241c-764 0 0 0 0 0 40-3.3 68.7-15.7 86-37 10-12 15-25.3 + 15-40 0-22.7-9.8-40.7-29.5-54-19.7-13.3-43.5-21-71.5-23-17.3-1.3-26-8-26-20 0 +-13.3 8.7-20 26-20 38 0 71 11.2 99 33.5 0 0 7 5.6 21 16.7 14 11.2 21 33.5 21 + 66.8s-14 61.2-42 83.5c-28 22.3-61 33.5-99 33.5L0 241z M0 281v-40h399859v40z`,rightlinesegment:se("M399960 241 V94 h40 V428 h-40 V281 H0 v-40z"),rightbracketunder:se("M399995 0 h-120 V290 H0 v120 H400000z"),rightbracketover:se("M399995 440 h-120 V150 H0 v-120 H399995z"),rightToFrom:`M400000 167c-70.7-42-118-97.7-142-167h-23c-15.3 0-23 .3-23 + 1 0 1.3 5.3 13.7 16 37 18 35.3 41.3 69 70 101l7 8H0v40h399905l-7 8c-28.7 32 +-52 65.7-70 101-10.7 23.3-16 35.7-16 37 0 .7 7.7 1 23 1h23c24-69.3 71.3-125 142 +-167z M100 147v40h399900v-40zM0 341v40h399900v-40z`,twoheadleftarrow:`M0 167c68 40 + 115.7 95.7 143 167h22c15.3 0 23-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69 +-70-101l-7-8h125l9 7c50.7 39.3 85 86 103 140h46c0-4.7-6.3-18.7-19-42-18-35.3 +-40-67.3-66-96l-9-9h399716v-40H284l9-9c26-28.7 48-60.7 66-96 12.7-23.333 19 +-37.333 19-42h-46c-18 54-52.3 100.7-103 140l-9 7H95l7-8c28.7-32 52-65.7 70-101 + 10.7-23.333 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 71.3 68 127 0 167z`,twoheadrightarrow:`M400000 167 +c-68-40-115.7-95.7-143-167h-22c-15.3 0-23 .3-23 1 0 1.3 5.3 13.7 16 37 18 35.3 + 41.3 69 70 101l7 8h-125l-9-7c-50.7-39.3-85-86-103-140h-46c0 4.7 6.3 18.7 19 42 + 18 35.3 40 67.3 66 96l9 9H0v40h399716l-9 9c-26 28.7-48 60.7-66 96-12.7 23.333 +-19 37.333-19 42h46c18-54 52.3-100.7 103-140l9-7h125l-7 8c-28.7 32-52 65.7-70 + 101-10.7 23.333-16 35.7-16 37 0 .7 7.7 1 23 1h22c27.3-71.3 75-127 143-167z`,tilde1:`M200 55.538c-77 0-168 73.953-177 73.953-3 0-7 +-2.175-9-5.437L2 97c-1-2-2-4-2-6 0-4 2-7 5-9l20-12C116 12 171 0 207 0c86 0 + 114 68 191 68 78 0 168-68 177-68 4 0 7 2 9 5l12 19c1 2.175 2 4.35 2 6.525 0 + 4.35-2 7.613-5 9.788l-19 13.05c-92 63.077-116.937 75.308-183 76.128 +-68.267.847-113-73.952-191-73.952z`,tilde2:`M344 55.266c-142 0-300.638 81.316-311.5 86.418 +-8.01 3.762-22.5 10.91-23.5 5.562L1 120c-1-2-1-3-1-4 0-5 3-9 8-10l18.4-9C160.9 + 31.9 283 0 358 0c148 0 188 122 331 122s314-97 326-97c4 0 8 2 10 7l7 21.114 +c1 2.14 1 3.21 1 4.28 0 5.347-3 9.626-7 10.696l-22.3 12.622C852.6 158.372 751 + 181.476 676 181.476c-149 0-189-126.21-332-126.21z`,tilde3:`M786 59C457 59 32 175.242 13 175.242c-6 0-10-3.457 +-11-10.37L.15 138c-1-7 3-12 10-13l19.2-6.4C378.4 40.7 634.3 0 804.3 0c337 0 + 411.8 157 746.8 157 328 0 754-112 773-112 5 0 10 3 11 9l1 14.075c1 8.066-.697 + 16.595-6.697 17.492l-21.052 7.31c-367.9 98.146-609.15 122.696-778.15 122.696 + -338 0-409-156.573-744-156.573z`,tilde4:`M786 58C457 58 32 177.487 13 177.487c-6 0-10-3.345 +-11-10.035L.15 143c-1-7 3-12 10-13l22-6.7C381.2 35 637.15 0 807.15 0c337 0 409 + 177 744 177 328 0 754-127 773-127 5 0 10 3 11 9l1 14.794c1 7.805-3 13.38-9 + 14.495l-20.7 5.574c-366.85 99.79-607.3 139.372-776.3 139.372-338 0-409 + -175.236-744-175.236z`,vec:`M377 20c0-5.333 1.833-10 5.5-14S391 0 397 0c4.667 0 8.667 1.667 12 5 +3.333 2.667 6.667 9 10 19 6.667 24.667 20.333 43.667 41 57 7.333 4.667 11 +10.667 11 18 0 6-1 10-3 12s-6.667 5-14 9c-28.667 14.667-53.667 35.667-75 63 +-1.333 1.333-3.167 3.5-5.5 6.5s-4 4.833-5 5.5c-1 .667-2.5 1.333-4.5 2s-4.333 1 +-7 1c-4.667 0-9.167-1.833-13.5-5.5S337 184 337 178c0-12.667 15.667-32.333 47-59 +H213l-171-1c-8.667-6-13-12.333-13-19 0-4.667 4.333-11.333 13-20h359 +c-16-25.333-24-45-24-59z`,widehat1:`M529 0h5l519 115c5 1 9 5 9 10 0 1-1 2-1 3l-4 22 +c-1 5-5 9-11 9h-2L532 67 19 159h-2c-5 0-9-4-11-9l-5-22c-1-6 2-12 8-13z`,widehat2:`M1181 0h2l1171 176c6 0 10 5 10 11l-2 23c-1 6-5 10 +-11 10h-1L1182 67 15 220h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,widehat3:`M1181 0h2l1171 236c6 0 10 5 10 11l-2 23c-1 6-5 10 +-11 10h-1L1182 67 15 280h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,widehat4:`M1181 0h2l1171 296c6 0 10 5 10 11l-2 23c-1 6-5 10 +-11 10h-1L1182 67 15 340h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,widecheck1:`M529,159h5l519,-115c5,-1,9,-5,9,-10c0,-1,-1,-2,-1,-3l-4,-22c-1, +-5,-5,-9,-11,-9h-2l-512,92l-513,-92h-2c-5,0,-9,4,-11,9l-5,22c-1,6,2,12,8,13z`,widecheck2:`M1181,220h2l1171,-176c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10, +-11,-10h-1l-1168,153l-1167,-153h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,widecheck3:`M1181,280h2l1171,-236c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10, +-11,-10h-1l-1168,213l-1167,-213h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,widecheck4:`M1181,340h2l1171,-296c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10, +-11,-10h-1l-1168,273l-1167,-273h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,baraboveleftarrow:`M400000 620h-399890l3 -3c68.7 -52.7 113.7 -120 135 -202 +c4 -14.7 6 -23 6 -25c0 -7.3 -7 -11 -21 -11c-8 0 -13.2 0.8 -15.5 2.5 +c-2.3 1.7 -4.2 5.8 -5.5 12.5c-1.3 4.7 -2.7 10.3 -4 17c-12 48.7 -34.8 92 -68.5 130 +s-74.2 66.3 -121.5 85c-10 4 -16 7.7 -18 11c0 8.7 6 14.3 18 17c47.3 18.7 87.8 47 +121.5 85s56.5 81.3 68.5 130c0.7 2 1.3 5 2 9s1.2 6.7 1.5 8c0.3 1.3 1 3.3 2 6 +s2.2 4.5 3.5 5.5c1.3 1 3.3 1.8 6 2.5s6 1 10 1c14 0 21 -3.7 21 -11 +c0 -2 -2 -10.3 -6 -25c-20 -79.3 -65 -146.7 -135 -202l-3 -3h399890z +M100 620v40h399900v-40z M0 241v40h399900v-40zM0 241v40h399900v-40z`,rightarrowabovebar:`M0 241v40h399891c-47.3 35.3-84 78-110 128-16.7 32 +-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20 11 8 0 +13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7 39 +-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85-40.5 +-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5 +-12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67 +151.7 139 205zm96 379h399894v40H0zm0 0h399904v40H0z`,baraboveshortleftharpoon:`M507,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11 +c1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17 +c2,0.7,5,1,9,1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21 +c-32,-87.3,-82.7,-157.7,-152,-211c0,0,-3,-3,-3,-3l399351,0l0,-40 +c-398570,0,-399437,0,-399437,0z M593 435 v40 H399500 v-40z +M0 281 v-40 H399908 v40z M0 281 v-40 H399908 v40z`,rightharpoonaboveshortbar:`M0,241 l0,40c399126,0,399993,0,399993,0 +c4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199, +-231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6 +c-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z +M0 241 v40 H399908 v-40z M0 475 v-40 H399500 v40z M0 475 v-40 H399500 v40z`,shortbaraboveleftharpoon:`M7,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11 +c1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17c2,0.7,5,1,9, +1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21c-32,-87.3,-82.7,-157.7, +-152,-211c0,0,-3,-3,-3,-3l399907,0l0,-40c-399126,0,-399993,0,-399993,0z +M93 435 v40 H400000 v-40z M500 241 v40 H400000 v-40z M500 241 v40 H400000 v-40z`,shortrightharpoonabovebar:`M53,241l0,40c398570,0,399437,0,399437,0 +c4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199, +-231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6 +c-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z +M500 241 v40 H399408 v-40z M500 435 v40 H400000 v-40z`},te=function(E,w){switch(E){case"lbrack":return"M403 1759 V84 H666 V0 H319 V1759 v"+w+` v1759 v84 h347 v-84 +H403z M403 1759 V0 H319 V1759 v`+w+" v1759 v84 h84z";case"rbrack":return"M347 1759 V0 H0 V84 H263 V1759 v"+w+` v1759 H0 v84 H347z +M347 1759 V0 H263 V1759 v`+w+" v1759 h84z";case"vert":return"M145 15 v585 v"+w+` v585 c2.667,10,9.667,15,21,15 +c10,0,16.667,-5,20,-15 v-585 v`+-w+` v-585 c-2.667,-10,-9.667,-15,-21,-15 +c-10,0,-16.667,5,-20,15z M188 15 H145 v585 v`+w+" v585 h43z";case"doublevert":return"M145 15 v585 v"+w+` v585 c2.667,10,9.667,15,21,15 +c10,0,16.667,-5,20,-15 v-585 v`+-w+` v-585 c-2.667,-10,-9.667,-15,-21,-15 +c-10,0,-16.667,5,-20,15z M188 15 H145 v585 v`+w+` v585 h43z +M367 15 v585 v`+w+` v585 c2.667,10,9.667,15,21,15 +c10,0,16.667,-5,20,-15 v-585 v`+-w+` v-585 c-2.667,-10,-9.667,-15,-21,-15 +c-10,0,-16.667,5,-20,15z M410 15 H367 v585 v`+w+" v585 h43z";case"lfloor":return"M319 602 V0 H403 V602 v"+w+` v1715 h263 v84 H319z +MM319 602 V0 H403 V602 v`+w+" v1715 H319z";case"rfloor":return"M319 602 V0 H403 V602 v"+w+` v1799 H0 v-84 H319z +MM319 602 V0 H403 V602 v`+w+" v1715 H319z";case"lceil":return"M403 1759 V84 H666 V0 H319 V1759 v"+w+` v602 h84z +M403 1759 V0 H319 V1759 v`+w+" v602 h84z";case"rceil":return"M347 1759 V0 H0 V84 H263 V1759 v"+w+` v602 h84z +M347 1759 V0 h-84 V1759 v`+w+" v602 h84z";case"lparen":return`M863,9c0,-2,-2,-5,-6,-9c0,0,-17,0,-17,0c-12.7,0,-19.3,0.3,-20,1 +c-5.3,5.3,-10.3,11,-15,17c-242.7,294.7,-395.3,682,-458,1162c-21.3,163.3,-33.3,349, +-36,557 l0,`+(w+84)+`c0.2,6,0,26,0,60c2,159.3,10,310.7,24,454c53.3,528,210, +949.7,470,1265c4.7,6,9.7,11.7,15,17c0.7,0.7,7,1,19,1c0,0,18,0,18,0c4,-4,6,-7,6,-9 +c0,-2.7,-3.3,-8.7,-10,-18c-135.3,-192.7,-235.5,-414.3,-300.5,-665c-65,-250.7,-102.5, +-544.7,-112.5,-882c-2,-104,-3,-167,-3,-189 +l0,-`+(w+92)+`c0,-162.7,5.7,-314,17,-454c20.7,-272,63.7,-513,129,-723c65.3, +-210,155.3,-396.3,270,-559c6.7,-9.3,10,-15.3,10,-18z`;case"rparen":return`M76,0c-16.7,0,-25,3,-25,9c0,2,2,6.3,6,13c21.3,28.7,42.3,60.3, +63,95c96.7,156.7,172.8,332.5,228.5,527.5c55.7,195,92.8,416.5,111.5,664.5 +c11.3,139.3,17,290.7,17,454c0,28,1.7,43,3.3,45l0,`+(w+9)+` +c-3,4,-3.3,16.7,-3.3,38c0,162,-5.7,313.7,-17,455c-18.7,248,-55.8,469.3,-111.5,664 +c-55.7,194.7,-131.8,370.3,-228.5,527c-20.7,34.7,-41.7,66.3,-63,95c-2,3.3,-4,7,-6,11 +c0,7.3,5.7,11,17,11c0,0,11,0,11,0c9.3,0,14.3,-0.3,15,-1c5.3,-5.3,10.3,-11,15,-17 +c242.7,-294.7,395.3,-681.7,458,-1161c21.3,-164.7,33.3,-350.7,36,-558 +l0,-`+(w+144)+`c-2,-159.3,-10,-310.7,-24,-454c-53.3,-528,-210,-949.7, +-470,-1265c-4.7,-6,-9.7,-11.7,-15,-17c-0.7,-0.7,-6.7,-1,-18,-1z`;default:throw new Error("Unknown stretchy delimiter.")}};function He(E){return"toText"in E}class de{constructor(w){this.children=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,this.children=w,this.classes=[],this.height=0,this.depth=0,this.maxFontSize=0,this.style={}}hasClass(w){return this.classes.includes(w)}toNode(){let w=document.createDocumentFragment();for(let L=0;L{if(He(w))return w.toText();throw new Error("Expected MathDomNode with toText, got "+w.constructor.name)}).join("")}}let ce={pt:1,mm:7227/2540,cm:7227/254,in:72.27,bp:803/800,pc:12,dd:1238/1157,cc:14856/1157,nd:685/642,nc:1370/107,sp:1/65536,px:803/800},st={ex:!0,em:!0,mu:!0},Ae=function(E){return typeof E!="string"&&(E=E.unit),E in ce||E in st||E==="ex"},Ye=function(E,w){let L;if(E.unit in ce)L=ce[E.unit]/w.fontMetrics().ptPerEm/w.sizeMultiplier;else if(E.unit==="mu")L=w.fontMetrics().cssEmPerMu;else{let G;if(w.style.isTight()?G=w.havingStyle(w.style.text()):G=w,E.unit==="ex")L=G.fontMetrics().xHeight;else if(E.unit==="em")L=G.fontMetrics().quad;else throw new n("Invalid unit: '"+E.unit+"'");G!==w&&(L*=G.sizeMultiplier/w.sizeMultiplier)}return Math.min(E.number*L,w.maxSize)},Ge=function(E){return+E.toFixed(4)+"em"},rt=function(E){return E.filter(w=>w).join(" ")},Xe=function(E){let w="";for(let L of Object.keys(E)){let G=E[L];G!==void 0&&(w+=a(L)+":"+G+";")}return w},Ze=function(E,w,L){if(this.classes=E||[],this.attributes={},this.height=0,this.depth=0,this.maxFontSize=0,this.style=L||{},w){w.style.isTight()&&this.classes.push("mtight");let G=w.getColor();G&&(this.style.color=G)}},Pe=function(E){let w=document.createElement(E);w.className=rt(this.classes),Object.assign(w.style,this.style);for(let L of Object.keys(this.attributes))w.setAttribute(L,this.attributes[L]);for(let L=0;L/=\x00-\x1f]/,Ve=function(E){let w="<"+E;this.classes.length&&(w+=' class="'+l(rt(this.classes))+'"');let L=Xe(this.style);L&&(w+=' style="'+l(L)+'"');for(let G of Object.keys(this.attributes)){if(Re.test(G))throw new n("Invalid attribute name '"+G+"'");w+=" "+G+'="'+l(this.attributes[G])+'"'}w+=">";for(let G=0;G",w};class ke{constructor(w,L,G,Y){this.children=void 0,this.attributes=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.width=void 0,this.maxFontSize=void 0,this.style=void 0,this.italic=void 0,Ze.call(this,w,G,Y),this.children=L||[]}setAttribute(w,L){this.attributes[w]=L}hasClass(w){return this.classes.includes(w)}toNode(){return Pe.call(this,"span")}toMarkup(){return Ve.call(this,"span")}}class xe{constructor(w,L,G,Y){this.children=void 0,this.attributes=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,Ze.call(this,L,Y),this.children=G||[],this.setAttribute("href",w)}setAttribute(w,L){this.attributes[w]=L}hasClass(w){return this.classes.includes(w)}toNode(){return Pe.call(this,"a")}toMarkup(){return Ve.call(this,"a")}}class H{constructor(w,L,G){this.src=void 0,this.alt=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,this.alt=L,this.src=w,this.classes=["mord"],this.height=0,this.depth=0,this.maxFontSize=0,this.style=G}hasClass(w){return this.classes.includes(w)}toNode(){let w=document.createElement("img");return w.src=this.src,w.alt=this.alt,w.className="mord",Object.assign(w.style,this.style),w}toMarkup(){let w=''+l(this.alt)+'0&&(L=document.createElement("span"),L.style.marginRight=Ge(this.italic)),this.classes.length>0&&(L=L||document.createElement("span"),L.className=rt(this.classes)),Object.keys(this.style).length>0&&(L=L||document.createElement("span"),Object.assign(L.style,this.style)),L?(L.appendChild(w),L):w}toMarkup(){let w=!1,L="0&&(G+="margin-right:"+Ge(this.italic)+";"),G+=Xe(this.style),G&&(w=!0,L+=' style="'+l(G)+'"');let Y=l(this.text);return w?(L+=">",L+=Y,L+="",L):Y}}class we{constructor(w,L){this.children=void 0,this.attributes=void 0,this.children=w||[],this.attributes=L||{}}toNode(){let L=document.createElementNS("http://www.w3.org/2000/svg","svg");for(let G of Object.keys(this.attributes))L.setAttribute(G,this.attributes[G]);for(let G=0;G':''}}class Ke{constructor(w){this.attributes=void 0,this.attributes=w||{}}toNode(){let L=document.createElementNS("http://www.w3.org/2000/svg","line");for(let G of Object.keys(this.attributes))L.setAttribute(G,this.attributes[G]);return L}toMarkup(){let w=" but got "+String(E)+".")}let nt=E=>E instanceof ke||E instanceof xe||E instanceof de;var We={"AMS-Regular":{32:[0,0,0,0,.25],65:[0,.68889,0,0,.72222],66:[0,.68889,0,0,.66667],67:[0,.68889,0,0,.72222],68:[0,.68889,0,0,.72222],69:[0,.68889,0,0,.66667],70:[0,.68889,0,0,.61111],71:[0,.68889,0,0,.77778],72:[0,.68889,0,0,.77778],73:[0,.68889,0,0,.38889],74:[.16667,.68889,0,0,.5],75:[0,.68889,0,0,.77778],76:[0,.68889,0,0,.66667],77:[0,.68889,0,0,.94445],78:[0,.68889,0,0,.72222],79:[.16667,.68889,0,0,.77778],80:[0,.68889,0,0,.61111],81:[.16667,.68889,0,0,.77778],82:[0,.68889,0,0,.72222],83:[0,.68889,0,0,.55556],84:[0,.68889,0,0,.66667],85:[0,.68889,0,0,.72222],86:[0,.68889,0,0,.72222],87:[0,.68889,0,0,1],88:[0,.68889,0,0,.72222],89:[0,.68889,0,0,.72222],90:[0,.68889,0,0,.66667],107:[0,.68889,0,0,.55556],160:[0,0,0,0,.25],165:[0,.675,.025,0,.75],174:[.15559,.69224,0,0,.94666],240:[0,.68889,0,0,.55556],295:[0,.68889,0,0,.54028],710:[0,.825,0,0,2.33334],732:[0,.9,0,0,2.33334],770:[0,.825,0,0,2.33334],771:[0,.9,0,0,2.33334],989:[.08167,.58167,0,0,.77778],1008:[0,.43056,.04028,0,.66667],8245:[0,.54986,0,0,.275],8463:[0,.68889,0,0,.54028],8487:[0,.68889,0,0,.72222],8498:[0,.68889,0,0,.55556],8502:[0,.68889,0,0,.66667],8503:[0,.68889,0,0,.44445],8504:[0,.68889,0,0,.66667],8513:[0,.68889,0,0,.63889],8592:[-.03598,.46402,0,0,.5],8594:[-.03598,.46402,0,0,.5],8602:[-.13313,.36687,0,0,1],8603:[-.13313,.36687,0,0,1],8606:[.01354,.52239,0,0,1],8608:[.01354,.52239,0,0,1],8610:[.01354,.52239,0,0,1.11111],8611:[.01354,.52239,0,0,1.11111],8619:[0,.54986,0,0,1],8620:[0,.54986,0,0,1],8621:[-.13313,.37788,0,0,1.38889],8622:[-.13313,.36687,0,0,1],8624:[0,.69224,0,0,.5],8625:[0,.69224,0,0,.5],8630:[0,.43056,0,0,1],8631:[0,.43056,0,0,1],8634:[.08198,.58198,0,0,.77778],8635:[.08198,.58198,0,0,.77778],8638:[.19444,.69224,0,0,.41667],8639:[.19444,.69224,0,0,.41667],8642:[.19444,.69224,0,0,.41667],8643:[.19444,.69224,0,0,.41667],8644:[.1808,.675,0,0,1],8646:[.1808,.675,0,0,1],8647:[.1808,.675,0,0,1],8648:[.19444,.69224,0,0,.83334],8649:[.1808,.675,0,0,1],8650:[.19444,.69224,0,0,.83334],8651:[.01354,.52239,0,0,1],8652:[.01354,.52239,0,0,1],8653:[-.13313,.36687,0,0,1],8654:[-.13313,.36687,0,0,1],8655:[-.13313,.36687,0,0,1],8666:[.13667,.63667,0,0,1],8667:[.13667,.63667,0,0,1],8669:[-.13313,.37788,0,0,1],8672:[-.064,.437,0,0,1.334],8674:[-.064,.437,0,0,1.334],8705:[0,.825,0,0,.5],8708:[0,.68889,0,0,.55556],8709:[.08167,.58167,0,0,.77778],8717:[0,.43056,0,0,.42917],8722:[-.03598,.46402,0,0,.5],8724:[.08198,.69224,0,0,.77778],8726:[.08167,.58167,0,0,.77778],8733:[0,.69224,0,0,.77778],8736:[0,.69224,0,0,.72222],8737:[0,.69224,0,0,.72222],8738:[.03517,.52239,0,0,.72222],8739:[.08167,.58167,0,0,.22222],8740:[.25142,.74111,0,0,.27778],8741:[.08167,.58167,0,0,.38889],8742:[.25142,.74111,0,0,.5],8756:[0,.69224,0,0,.66667],8757:[0,.69224,0,0,.66667],8764:[-.13313,.36687,0,0,.77778],8765:[-.13313,.37788,0,0,.77778],8769:[-.13313,.36687,0,0,.77778],8770:[-.03625,.46375,0,0,.77778],8774:[.30274,.79383,0,0,.77778],8776:[-.01688,.48312,0,0,.77778],8778:[.08167,.58167,0,0,.77778],8782:[.06062,.54986,0,0,.77778],8783:[.06062,.54986,0,0,.77778],8785:[.08198,.58198,0,0,.77778],8786:[.08198,.58198,0,0,.77778],8787:[.08198,.58198,0,0,.77778],8790:[0,.69224,0,0,.77778],8791:[.22958,.72958,0,0,.77778],8796:[.08198,.91667,0,0,.77778],8806:[.25583,.75583,0,0,.77778],8807:[.25583,.75583,0,0,.77778],8808:[.25142,.75726,0,0,.77778],8809:[.25142,.75726,0,0,.77778],8812:[.25583,.75583,0,0,.5],8814:[.20576,.70576,0,0,.77778],8815:[.20576,.70576,0,0,.77778],8816:[.30274,.79383,0,0,.77778],8817:[.30274,.79383,0,0,.77778],8818:[.22958,.72958,0,0,.77778],8819:[.22958,.72958,0,0,.77778],8822:[.1808,.675,0,0,.77778],8823:[.1808,.675,0,0,.77778],8828:[.13667,.63667,0,0,.77778],8829:[.13667,.63667,0,0,.77778],8830:[.22958,.72958,0,0,.77778],8831:[.22958,.72958,0,0,.77778],8832:[.20576,.70576,0,0,.77778],8833:[.20576,.70576,0,0,.77778],8840:[.30274,.79383,0,0,.77778],8841:[.30274,.79383,0,0,.77778],8842:[.13597,.63597,0,0,.77778],8843:[.13597,.63597,0,0,.77778],8847:[.03517,.54986,0,0,.77778],8848:[.03517,.54986,0,0,.77778],8858:[.08198,.58198,0,0,.77778],8859:[.08198,.58198,0,0,.77778],8861:[.08198,.58198,0,0,.77778],8862:[0,.675,0,0,.77778],8863:[0,.675,0,0,.77778],8864:[0,.675,0,0,.77778],8865:[0,.675,0,0,.77778],8872:[0,.69224,0,0,.61111],8873:[0,.69224,0,0,.72222],8874:[0,.69224,0,0,.88889],8876:[0,.68889,0,0,.61111],8877:[0,.68889,0,0,.61111],8878:[0,.68889,0,0,.72222],8879:[0,.68889,0,0,.72222],8882:[.03517,.54986,0,0,.77778],8883:[.03517,.54986,0,0,.77778],8884:[.13667,.63667,0,0,.77778],8885:[.13667,.63667,0,0,.77778],8888:[0,.54986,0,0,1.11111],8890:[.19444,.43056,0,0,.55556],8891:[.19444,.69224,0,0,.61111],8892:[.19444,.69224,0,0,.61111],8901:[0,.54986,0,0,.27778],8903:[.08167,.58167,0,0,.77778],8905:[.08167,.58167,0,0,.77778],8906:[.08167,.58167,0,0,.77778],8907:[0,.69224,0,0,.77778],8908:[0,.69224,0,0,.77778],8909:[-.03598,.46402,0,0,.77778],8910:[0,.54986,0,0,.76042],8911:[0,.54986,0,0,.76042],8912:[.03517,.54986,0,0,.77778],8913:[.03517,.54986,0,0,.77778],8914:[0,.54986,0,0,.66667],8915:[0,.54986,0,0,.66667],8916:[0,.69224,0,0,.66667],8918:[.0391,.5391,0,0,.77778],8919:[.0391,.5391,0,0,.77778],8920:[.03517,.54986,0,0,1.33334],8921:[.03517,.54986,0,0,1.33334],8922:[.38569,.88569,0,0,.77778],8923:[.38569,.88569,0,0,.77778],8926:[.13667,.63667,0,0,.77778],8927:[.13667,.63667,0,0,.77778],8928:[.30274,.79383,0,0,.77778],8929:[.30274,.79383,0,0,.77778],8934:[.23222,.74111,0,0,.77778],8935:[.23222,.74111,0,0,.77778],8936:[.23222,.74111,0,0,.77778],8937:[.23222,.74111,0,0,.77778],8938:[.20576,.70576,0,0,.77778],8939:[.20576,.70576,0,0,.77778],8940:[.30274,.79383,0,0,.77778],8941:[.30274,.79383,0,0,.77778],8994:[.19444,.69224,0,0,.77778],8995:[.19444,.69224,0,0,.77778],9416:[.15559,.69224,0,0,.90222],9484:[0,.69224,0,0,.5],9488:[0,.69224,0,0,.5],9492:[0,.37788,0,0,.5],9496:[0,.37788,0,0,.5],9585:[.19444,.68889,0,0,.88889],9586:[.19444,.74111,0,0,.88889],9632:[0,.675,0,0,.77778],9633:[0,.675,0,0,.77778],9650:[0,.54986,0,0,.72222],9651:[0,.54986,0,0,.72222],9654:[.03517,.54986,0,0,.77778],9660:[0,.54986,0,0,.72222],9661:[0,.54986,0,0,.72222],9664:[.03517,.54986,0,0,.77778],9674:[.11111,.69224,0,0,.66667],9733:[.19444,.69224,0,0,.94445],10003:[0,.69224,0,0,.83334],10016:[0,.69224,0,0,.83334],10731:[.11111,.69224,0,0,.66667],10846:[.19444,.75583,0,0,.61111],10877:[.13667,.63667,0,0,.77778],10878:[.13667,.63667,0,0,.77778],10885:[.25583,.75583,0,0,.77778],10886:[.25583,.75583,0,0,.77778],10887:[.13597,.63597,0,0,.77778],10888:[.13597,.63597,0,0,.77778],10889:[.26167,.75726,0,0,.77778],10890:[.26167,.75726,0,0,.77778],10891:[.48256,.98256,0,0,.77778],10892:[.48256,.98256,0,0,.77778],10901:[.13667,.63667,0,0,.77778],10902:[.13667,.63667,0,0,.77778],10933:[.25142,.75726,0,0,.77778],10934:[.25142,.75726,0,0,.77778],10935:[.26167,.75726,0,0,.77778],10936:[.26167,.75726,0,0,.77778],10937:[.26167,.75726,0,0,.77778],10938:[.26167,.75726,0,0,.77778],10949:[.25583,.75583,0,0,.77778],10950:[.25583,.75583,0,0,.77778],10955:[.28481,.79383,0,0,.77778],10956:[.28481,.79383,0,0,.77778],57350:[.08167,.58167,0,0,.22222],57351:[.08167,.58167,0,0,.38889],57352:[.08167,.58167,0,0,.77778],57353:[0,.43056,.04028,0,.66667],57356:[.25142,.75726,0,0,.77778],57357:[.25142,.75726,0,0,.77778],57358:[.41951,.91951,0,0,.77778],57359:[.30274,.79383,0,0,.77778],57360:[.30274,.79383,0,0,.77778],57361:[.41951,.91951,0,0,.77778],57366:[.25142,.75726,0,0,.77778],57367:[.25142,.75726,0,0,.77778],57368:[.25142,.75726,0,0,.77778],57369:[.25142,.75726,0,0,.77778],57370:[.13597,.63597,0,0,.77778],57371:[.13597,.63597,0,0,.77778]},"Caligraphic-Regular":{32:[0,0,0,0,.25],65:[0,.68333,0,.19445,.79847],66:[0,.68333,.03041,.13889,.65681],67:[0,.68333,.05834,.13889,.52653],68:[0,.68333,.02778,.08334,.77139],69:[0,.68333,.08944,.11111,.52778],70:[0,.68333,.09931,.11111,.71875],71:[.09722,.68333,.0593,.11111,.59487],72:[0,.68333,.00965,.11111,.84452],73:[0,.68333,.07382,0,.54452],74:[.09722,.68333,.18472,.16667,.67778],75:[0,.68333,.01445,.05556,.76195],76:[0,.68333,0,.13889,.68972],77:[0,.68333,0,.13889,1.2009],78:[0,.68333,.14736,.08334,.82049],79:[0,.68333,.02778,.11111,.79611],80:[0,.68333,.08222,.08334,.69556],81:[.09722,.68333,0,.11111,.81667],82:[0,.68333,0,.08334,.8475],83:[0,.68333,.075,.13889,.60556],84:[0,.68333,.25417,0,.54464],85:[0,.68333,.09931,.08334,.62583],86:[0,.68333,.08222,0,.61278],87:[0,.68333,.08222,.08334,.98778],88:[0,.68333,.14643,.13889,.7133],89:[.09722,.68333,.08222,.08334,.66834],90:[0,.68333,.07944,.13889,.72473],160:[0,0,0,0,.25]},"Fraktur-Regular":{32:[0,0,0,0,.25],33:[0,.69141,0,0,.29574],34:[0,.69141,0,0,.21471],38:[0,.69141,0,0,.73786],39:[0,.69141,0,0,.21201],40:[.24982,.74947,0,0,.38865],41:[.24982,.74947,0,0,.38865],42:[0,.62119,0,0,.27764],43:[.08319,.58283,0,0,.75623],44:[0,.10803,0,0,.27764],45:[.08319,.58283,0,0,.75623],46:[0,.10803,0,0,.27764],47:[.24982,.74947,0,0,.50181],48:[0,.47534,0,0,.50181],49:[0,.47534,0,0,.50181],50:[0,.47534,0,0,.50181],51:[.18906,.47534,0,0,.50181],52:[.18906,.47534,0,0,.50181],53:[.18906,.47534,0,0,.50181],54:[0,.69141,0,0,.50181],55:[.18906,.47534,0,0,.50181],56:[0,.69141,0,0,.50181],57:[.18906,.47534,0,0,.50181],58:[0,.47534,0,0,.21606],59:[.12604,.47534,0,0,.21606],61:[-.13099,.36866,0,0,.75623],63:[0,.69141,0,0,.36245],65:[0,.69141,0,0,.7176],66:[0,.69141,0,0,.88397],67:[0,.69141,0,0,.61254],68:[0,.69141,0,0,.83158],69:[0,.69141,0,0,.66278],70:[.12604,.69141,0,0,.61119],71:[0,.69141,0,0,.78539],72:[.06302,.69141,0,0,.7203],73:[0,.69141,0,0,.55448],74:[.12604,.69141,0,0,.55231],75:[0,.69141,0,0,.66845],76:[0,.69141,0,0,.66602],77:[0,.69141,0,0,1.04953],78:[0,.69141,0,0,.83212],79:[0,.69141,0,0,.82699],80:[.18906,.69141,0,0,.82753],81:[.03781,.69141,0,0,.82699],82:[0,.69141,0,0,.82807],83:[0,.69141,0,0,.82861],84:[0,.69141,0,0,.66899],85:[0,.69141,0,0,.64576],86:[0,.69141,0,0,.83131],87:[0,.69141,0,0,1.04602],88:[0,.69141,0,0,.71922],89:[.18906,.69141,0,0,.83293],90:[.12604,.69141,0,0,.60201],91:[.24982,.74947,0,0,.27764],93:[.24982,.74947,0,0,.27764],94:[0,.69141,0,0,.49965],97:[0,.47534,0,0,.50046],98:[0,.69141,0,0,.51315],99:[0,.47534,0,0,.38946],100:[0,.62119,0,0,.49857],101:[0,.47534,0,0,.40053],102:[.18906,.69141,0,0,.32626],103:[.18906,.47534,0,0,.5037],104:[.18906,.69141,0,0,.52126],105:[0,.69141,0,0,.27899],106:[0,.69141,0,0,.28088],107:[0,.69141,0,0,.38946],108:[0,.69141,0,0,.27953],109:[0,.47534,0,0,.76676],110:[0,.47534,0,0,.52666],111:[0,.47534,0,0,.48885],112:[.18906,.52396,0,0,.50046],113:[.18906,.47534,0,0,.48912],114:[0,.47534,0,0,.38919],115:[0,.47534,0,0,.44266],116:[0,.62119,0,0,.33301],117:[0,.47534,0,0,.5172],118:[0,.52396,0,0,.5118],119:[0,.52396,0,0,.77351],120:[.18906,.47534,0,0,.38865],121:[.18906,.47534,0,0,.49884],122:[.18906,.47534,0,0,.39054],160:[0,0,0,0,.25],8216:[0,.69141,0,0,.21471],8217:[0,.69141,0,0,.21471],58112:[0,.62119,0,0,.49749],58113:[0,.62119,0,0,.4983],58114:[.18906,.69141,0,0,.33328],58115:[.18906,.69141,0,0,.32923],58116:[.18906,.47534,0,0,.50343],58117:[0,.69141,0,0,.33301],58118:[0,.62119,0,0,.33409],58119:[0,.47534,0,0,.50073]},"Main-Bold":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.35],34:[0,.69444,0,0,.60278],35:[.19444,.69444,0,0,.95833],36:[.05556,.75,0,0,.575],37:[.05556,.75,0,0,.95833],38:[0,.69444,0,0,.89444],39:[0,.69444,0,0,.31944],40:[.25,.75,0,0,.44722],41:[.25,.75,0,0,.44722],42:[0,.75,0,0,.575],43:[.13333,.63333,0,0,.89444],44:[.19444,.15556,0,0,.31944],45:[0,.44444,0,0,.38333],46:[0,.15556,0,0,.31944],47:[.25,.75,0,0,.575],48:[0,.64444,0,0,.575],49:[0,.64444,0,0,.575],50:[0,.64444,0,0,.575],51:[0,.64444,0,0,.575],52:[0,.64444,0,0,.575],53:[0,.64444,0,0,.575],54:[0,.64444,0,0,.575],55:[0,.64444,0,0,.575],56:[0,.64444,0,0,.575],57:[0,.64444,0,0,.575],58:[0,.44444,0,0,.31944],59:[.19444,.44444,0,0,.31944],60:[.08556,.58556,0,0,.89444],61:[-.10889,.39111,0,0,.89444],62:[.08556,.58556,0,0,.89444],63:[0,.69444,0,0,.54305],64:[0,.69444,0,0,.89444],65:[0,.68611,0,0,.86944],66:[0,.68611,0,0,.81805],67:[0,.68611,0,0,.83055],68:[0,.68611,0,0,.88194],69:[0,.68611,0,0,.75555],70:[0,.68611,0,0,.72361],71:[0,.68611,0,0,.90416],72:[0,.68611,0,0,.9],73:[0,.68611,0,0,.43611],74:[0,.68611,0,0,.59444],75:[0,.68611,0,0,.90138],76:[0,.68611,0,0,.69166],77:[0,.68611,0,0,1.09166],78:[0,.68611,0,0,.9],79:[0,.68611,0,0,.86388],80:[0,.68611,0,0,.78611],81:[.19444,.68611,0,0,.86388],82:[0,.68611,0,0,.8625],83:[0,.68611,0,0,.63889],84:[0,.68611,0,0,.8],85:[0,.68611,0,0,.88472],86:[0,.68611,.01597,0,.86944],87:[0,.68611,.01597,0,1.18888],88:[0,.68611,0,0,.86944],89:[0,.68611,.02875,0,.86944],90:[0,.68611,0,0,.70277],91:[.25,.75,0,0,.31944],92:[.25,.75,0,0,.575],93:[.25,.75,0,0,.31944],94:[0,.69444,0,0,.575],95:[.31,.13444,.03194,0,.575],97:[0,.44444,0,0,.55902],98:[0,.69444,0,0,.63889],99:[0,.44444,0,0,.51111],100:[0,.69444,0,0,.63889],101:[0,.44444,0,0,.52708],102:[0,.69444,.10903,0,.35139],103:[.19444,.44444,.01597,0,.575],104:[0,.69444,0,0,.63889],105:[0,.69444,0,0,.31944],106:[.19444,.69444,0,0,.35139],107:[0,.69444,0,0,.60694],108:[0,.69444,0,0,.31944],109:[0,.44444,0,0,.95833],110:[0,.44444,0,0,.63889],111:[0,.44444,0,0,.575],112:[.19444,.44444,0,0,.63889],113:[.19444,.44444,0,0,.60694],114:[0,.44444,0,0,.47361],115:[0,.44444,0,0,.45361],116:[0,.63492,0,0,.44722],117:[0,.44444,0,0,.63889],118:[0,.44444,.01597,0,.60694],119:[0,.44444,.01597,0,.83055],120:[0,.44444,0,0,.60694],121:[.19444,.44444,.01597,0,.60694],122:[0,.44444,0,0,.51111],123:[.25,.75,0,0,.575],124:[.25,.75,0,0,.31944],125:[.25,.75,0,0,.575],126:[.35,.34444,0,0,.575],160:[0,0,0,0,.25],163:[0,.69444,0,0,.86853],168:[0,.69444,0,0,.575],172:[0,.44444,0,0,.76666],176:[0,.69444,0,0,.86944],177:[.13333,.63333,0,0,.89444],184:[.17014,0,0,0,.51111],198:[0,.68611,0,0,1.04166],215:[.13333,.63333,0,0,.89444],216:[.04861,.73472,0,0,.89444],223:[0,.69444,0,0,.59722],230:[0,.44444,0,0,.83055],247:[.13333,.63333,0,0,.89444],248:[.09722,.54167,0,0,.575],305:[0,.44444,0,0,.31944],338:[0,.68611,0,0,1.16944],339:[0,.44444,0,0,.89444],567:[.19444,.44444,0,0,.35139],710:[0,.69444,0,0,.575],711:[0,.63194,0,0,.575],713:[0,.59611,0,0,.575],714:[0,.69444,0,0,.575],715:[0,.69444,0,0,.575],728:[0,.69444,0,0,.575],729:[0,.69444,0,0,.31944],730:[0,.69444,0,0,.86944],732:[0,.69444,0,0,.575],733:[0,.69444,0,0,.575],915:[0,.68611,0,0,.69166],916:[0,.68611,0,0,.95833],920:[0,.68611,0,0,.89444],923:[0,.68611,0,0,.80555],926:[0,.68611,0,0,.76666],928:[0,.68611,0,0,.9],931:[0,.68611,0,0,.83055],933:[0,.68611,0,0,.89444],934:[0,.68611,0,0,.83055],936:[0,.68611,0,0,.89444],937:[0,.68611,0,0,.83055],8211:[0,.44444,.03194,0,.575],8212:[0,.44444,.03194,0,1.14999],8216:[0,.69444,0,0,.31944],8217:[0,.69444,0,0,.31944],8220:[0,.69444,0,0,.60278],8221:[0,.69444,0,0,.60278],8224:[.19444,.69444,0,0,.51111],8225:[.19444,.69444,0,0,.51111],8242:[0,.55556,0,0,.34444],8407:[0,.72444,.15486,0,.575],8463:[0,.69444,0,0,.66759],8465:[0,.69444,0,0,.83055],8467:[0,.69444,0,0,.47361],8472:[.19444,.44444,0,0,.74027],8476:[0,.69444,0,0,.83055],8501:[0,.69444,0,0,.70277],8592:[-.10889,.39111,0,0,1.14999],8593:[.19444,.69444,0,0,.575],8594:[-.10889,.39111,0,0,1.14999],8595:[.19444,.69444,0,0,.575],8596:[-.10889,.39111,0,0,1.14999],8597:[.25,.75,0,0,.575],8598:[.19444,.69444,0,0,1.14999],8599:[.19444,.69444,0,0,1.14999],8600:[.19444,.69444,0,0,1.14999],8601:[.19444,.69444,0,0,1.14999],8636:[-.10889,.39111,0,0,1.14999],8637:[-.10889,.39111,0,0,1.14999],8640:[-.10889,.39111,0,0,1.14999],8641:[-.10889,.39111,0,0,1.14999],8656:[-.10889,.39111,0,0,1.14999],8657:[.19444,.69444,0,0,.70277],8658:[-.10889,.39111,0,0,1.14999],8659:[.19444,.69444,0,0,.70277],8660:[-.10889,.39111,0,0,1.14999],8661:[.25,.75,0,0,.70277],8704:[0,.69444,0,0,.63889],8706:[0,.69444,.06389,0,.62847],8707:[0,.69444,0,0,.63889],8709:[.05556,.75,0,0,.575],8711:[0,.68611,0,0,.95833],8712:[.08556,.58556,0,0,.76666],8715:[.08556,.58556,0,0,.76666],8722:[.13333,.63333,0,0,.89444],8723:[.13333,.63333,0,0,.89444],8725:[.25,.75,0,0,.575],8726:[.25,.75,0,0,.575],8727:[-.02778,.47222,0,0,.575],8728:[-.02639,.47361,0,0,.575],8729:[-.02639,.47361,0,0,.575],8730:[.18,.82,0,0,.95833],8733:[0,.44444,0,0,.89444],8734:[0,.44444,0,0,1.14999],8736:[0,.69224,0,0,.72222],8739:[.25,.75,0,0,.31944],8741:[.25,.75,0,0,.575],8743:[0,.55556,0,0,.76666],8744:[0,.55556,0,0,.76666],8745:[0,.55556,0,0,.76666],8746:[0,.55556,0,0,.76666],8747:[.19444,.69444,.12778,0,.56875],8764:[-.10889,.39111,0,0,.89444],8768:[.19444,.69444,0,0,.31944],8771:[.00222,.50222,0,0,.89444],8773:[.027,.638,0,0,.894],8776:[.02444,.52444,0,0,.89444],8781:[.00222,.50222,0,0,.89444],8801:[.00222,.50222,0,0,.89444],8804:[.19667,.69667,0,0,.89444],8805:[.19667,.69667,0,0,.89444],8810:[.08556,.58556,0,0,1.14999],8811:[.08556,.58556,0,0,1.14999],8826:[.08556,.58556,0,0,.89444],8827:[.08556,.58556,0,0,.89444],8834:[.08556,.58556,0,0,.89444],8835:[.08556,.58556,0,0,.89444],8838:[.19667,.69667,0,0,.89444],8839:[.19667,.69667,0,0,.89444],8846:[0,.55556,0,0,.76666],8849:[.19667,.69667,0,0,.89444],8850:[.19667,.69667,0,0,.89444],8851:[0,.55556,0,0,.76666],8852:[0,.55556,0,0,.76666],8853:[.13333,.63333,0,0,.89444],8854:[.13333,.63333,0,0,.89444],8855:[.13333,.63333,0,0,.89444],8856:[.13333,.63333,0,0,.89444],8857:[.13333,.63333,0,0,.89444],8866:[0,.69444,0,0,.70277],8867:[0,.69444,0,0,.70277],8868:[0,.69444,0,0,.89444],8869:[0,.69444,0,0,.89444],8900:[-.02639,.47361,0,0,.575],8901:[-.02639,.47361,0,0,.31944],8902:[-.02778,.47222,0,0,.575],8968:[.25,.75,0,0,.51111],8969:[.25,.75,0,0,.51111],8970:[.25,.75,0,0,.51111],8971:[.25,.75,0,0,.51111],8994:[-.13889,.36111,0,0,1.14999],8995:[-.13889,.36111,0,0,1.14999],9651:[.19444,.69444,0,0,1.02222],9657:[-.02778,.47222,0,0,.575],9661:[.19444,.69444,0,0,1.02222],9667:[-.02778,.47222,0,0,.575],9711:[.19444,.69444,0,0,1.14999],9824:[.12963,.69444,0,0,.89444],9825:[.12963,.69444,0,0,.89444],9826:[.12963,.69444,0,0,.89444],9827:[.12963,.69444,0,0,.89444],9837:[0,.75,0,0,.44722],9838:[.19444,.69444,0,0,.44722],9839:[.19444,.69444,0,0,.44722],10216:[.25,.75,0,0,.44722],10217:[.25,.75,0,0,.44722],10815:[0,.68611,0,0,.9],10927:[.19667,.69667,0,0,.89444],10928:[.19667,.69667,0,0,.89444],57376:[.19444,.69444,0,0,0]},"Main-BoldItalic":{32:[0,0,0,0,.25],33:[0,.69444,.11417,0,.38611],34:[0,.69444,.07939,0,.62055],35:[.19444,.69444,.06833,0,.94444],37:[.05556,.75,.12861,0,.94444],38:[0,.69444,.08528,0,.88555],39:[0,.69444,.12945,0,.35555],40:[.25,.75,.15806,0,.47333],41:[.25,.75,.03306,0,.47333],42:[0,.75,.14333,0,.59111],43:[.10333,.60333,.03306,0,.88555],44:[.19444,.14722,0,0,.35555],45:[0,.44444,.02611,0,.41444],46:[0,.14722,0,0,.35555],47:[.25,.75,.15806,0,.59111],48:[0,.64444,.13167,0,.59111],49:[0,.64444,.13167,0,.59111],50:[0,.64444,.13167,0,.59111],51:[0,.64444,.13167,0,.59111],52:[.19444,.64444,.13167,0,.59111],53:[0,.64444,.13167,0,.59111],54:[0,.64444,.13167,0,.59111],55:[.19444,.64444,.13167,0,.59111],56:[0,.64444,.13167,0,.59111],57:[0,.64444,.13167,0,.59111],58:[0,.44444,.06695,0,.35555],59:[.19444,.44444,.06695,0,.35555],61:[-.10889,.39111,.06833,0,.88555],63:[0,.69444,.11472,0,.59111],64:[0,.69444,.09208,0,.88555],65:[0,.68611,0,0,.86555],66:[0,.68611,.0992,0,.81666],67:[0,.68611,.14208,0,.82666],68:[0,.68611,.09062,0,.87555],69:[0,.68611,.11431,0,.75666],70:[0,.68611,.12903,0,.72722],71:[0,.68611,.07347,0,.89527],72:[0,.68611,.17208,0,.8961],73:[0,.68611,.15681,0,.47166],74:[0,.68611,.145,0,.61055],75:[0,.68611,.14208,0,.89499],76:[0,.68611,0,0,.69777],77:[0,.68611,.17208,0,1.07277],78:[0,.68611,.17208,0,.8961],79:[0,.68611,.09062,0,.85499],80:[0,.68611,.0992,0,.78721],81:[.19444,.68611,.09062,0,.85499],82:[0,.68611,.02559,0,.85944],83:[0,.68611,.11264,0,.64999],84:[0,.68611,.12903,0,.7961],85:[0,.68611,.17208,0,.88083],86:[0,.68611,.18625,0,.86555],87:[0,.68611,.18625,0,1.15999],88:[0,.68611,.15681,0,.86555],89:[0,.68611,.19803,0,.86555],90:[0,.68611,.14208,0,.70888],91:[.25,.75,.1875,0,.35611],93:[.25,.75,.09972,0,.35611],94:[0,.69444,.06709,0,.59111],95:[.31,.13444,.09811,0,.59111],97:[0,.44444,.09426,0,.59111],98:[0,.69444,.07861,0,.53222],99:[0,.44444,.05222,0,.53222],100:[0,.69444,.10861,0,.59111],101:[0,.44444,.085,0,.53222],102:[.19444,.69444,.21778,0,.4],103:[.19444,.44444,.105,0,.53222],104:[0,.69444,.09426,0,.59111],105:[0,.69326,.11387,0,.35555],106:[.19444,.69326,.1672,0,.35555],107:[0,.69444,.11111,0,.53222],108:[0,.69444,.10861,0,.29666],109:[0,.44444,.09426,0,.94444],110:[0,.44444,.09426,0,.64999],111:[0,.44444,.07861,0,.59111],112:[.19444,.44444,.07861,0,.59111],113:[.19444,.44444,.105,0,.53222],114:[0,.44444,.11111,0,.50167],115:[0,.44444,.08167,0,.48694],116:[0,.63492,.09639,0,.385],117:[0,.44444,.09426,0,.62055],118:[0,.44444,.11111,0,.53222],119:[0,.44444,.11111,0,.76777],120:[0,.44444,.12583,0,.56055],121:[.19444,.44444,.105,0,.56166],122:[0,.44444,.13889,0,.49055],126:[.35,.34444,.11472,0,.59111],160:[0,0,0,0,.25],168:[0,.69444,.11473,0,.59111],176:[0,.69444,0,0,.94888],184:[.17014,0,0,0,.53222],198:[0,.68611,.11431,0,1.02277],216:[.04861,.73472,.09062,0,.88555],223:[.19444,.69444,.09736,0,.665],230:[0,.44444,.085,0,.82666],248:[.09722,.54167,.09458,0,.59111],305:[0,.44444,.09426,0,.35555],338:[0,.68611,.11431,0,1.14054],339:[0,.44444,.085,0,.82666],567:[.19444,.44444,.04611,0,.385],710:[0,.69444,.06709,0,.59111],711:[0,.63194,.08271,0,.59111],713:[0,.59444,.10444,0,.59111],714:[0,.69444,.08528,0,.59111],715:[0,.69444,0,0,.59111],728:[0,.69444,.10333,0,.59111],729:[0,.69444,.12945,0,.35555],730:[0,.69444,0,0,.94888],732:[0,.69444,.11472,0,.59111],733:[0,.69444,.11472,0,.59111],915:[0,.68611,.12903,0,.69777],916:[0,.68611,0,0,.94444],920:[0,.68611,.09062,0,.88555],923:[0,.68611,0,0,.80666],926:[0,.68611,.15092,0,.76777],928:[0,.68611,.17208,0,.8961],931:[0,.68611,.11431,0,.82666],933:[0,.68611,.10778,0,.88555],934:[0,.68611,.05632,0,.82666],936:[0,.68611,.10778,0,.88555],937:[0,.68611,.0992,0,.82666],8211:[0,.44444,.09811,0,.59111],8212:[0,.44444,.09811,0,1.18221],8216:[0,.69444,.12945,0,.35555],8217:[0,.69444,.12945,0,.35555],8220:[0,.69444,.16772,0,.62055],8221:[0,.69444,.07939,0,.62055]},"Main-Italic":{32:[0,0,0,0,.25],33:[0,.69444,.12417,0,.30667],34:[0,.69444,.06961,0,.51444],35:[.19444,.69444,.06616,0,.81777],37:[.05556,.75,.13639,0,.81777],38:[0,.69444,.09694,0,.76666],39:[0,.69444,.12417,0,.30667],40:[.25,.75,.16194,0,.40889],41:[.25,.75,.03694,0,.40889],42:[0,.75,.14917,0,.51111],43:[.05667,.56167,.03694,0,.76666],44:[.19444,.10556,0,0,.30667],45:[0,.43056,.02826,0,.35778],46:[0,.10556,0,0,.30667],47:[.25,.75,.16194,0,.51111],48:[0,.64444,.13556,0,.51111],49:[0,.64444,.13556,0,.51111],50:[0,.64444,.13556,0,.51111],51:[0,.64444,.13556,0,.51111],52:[.19444,.64444,.13556,0,.51111],53:[0,.64444,.13556,0,.51111],54:[0,.64444,.13556,0,.51111],55:[.19444,.64444,.13556,0,.51111],56:[0,.64444,.13556,0,.51111],57:[0,.64444,.13556,0,.51111],58:[0,.43056,.0582,0,.30667],59:[.19444,.43056,.0582,0,.30667],61:[-.13313,.36687,.06616,0,.76666],63:[0,.69444,.1225,0,.51111],64:[0,.69444,.09597,0,.76666],65:[0,.68333,0,0,.74333],66:[0,.68333,.10257,0,.70389],67:[0,.68333,.14528,0,.71555],68:[0,.68333,.09403,0,.755],69:[0,.68333,.12028,0,.67833],70:[0,.68333,.13305,0,.65277],71:[0,.68333,.08722,0,.77361],72:[0,.68333,.16389,0,.74333],73:[0,.68333,.15806,0,.38555],74:[0,.68333,.14028,0,.525],75:[0,.68333,.14528,0,.76888],76:[0,.68333,0,0,.62722],77:[0,.68333,.16389,0,.89666],78:[0,.68333,.16389,0,.74333],79:[0,.68333,.09403,0,.76666],80:[0,.68333,.10257,0,.67833],81:[.19444,.68333,.09403,0,.76666],82:[0,.68333,.03868,0,.72944],83:[0,.68333,.11972,0,.56222],84:[0,.68333,.13305,0,.71555],85:[0,.68333,.16389,0,.74333],86:[0,.68333,.18361,0,.74333],87:[0,.68333,.18361,0,.99888],88:[0,.68333,.15806,0,.74333],89:[0,.68333,.19383,0,.74333],90:[0,.68333,.14528,0,.61333],91:[.25,.75,.1875,0,.30667],93:[.25,.75,.10528,0,.30667],94:[0,.69444,.06646,0,.51111],95:[.31,.12056,.09208,0,.51111],97:[0,.43056,.07671,0,.51111],98:[0,.69444,.06312,0,.46],99:[0,.43056,.05653,0,.46],100:[0,.69444,.10333,0,.51111],101:[0,.43056,.07514,0,.46],102:[.19444,.69444,.21194,0,.30667],103:[.19444,.43056,.08847,0,.46],104:[0,.69444,.07671,0,.51111],105:[0,.65536,.1019,0,.30667],106:[.19444,.65536,.14467,0,.30667],107:[0,.69444,.10764,0,.46],108:[0,.69444,.10333,0,.25555],109:[0,.43056,.07671,0,.81777],110:[0,.43056,.07671,0,.56222],111:[0,.43056,.06312,0,.51111],112:[.19444,.43056,.06312,0,.51111],113:[.19444,.43056,.08847,0,.46],114:[0,.43056,.10764,0,.42166],115:[0,.43056,.08208,0,.40889],116:[0,.61508,.09486,0,.33222],117:[0,.43056,.07671,0,.53666],118:[0,.43056,.10764,0,.46],119:[0,.43056,.10764,0,.66444],120:[0,.43056,.12042,0,.46389],121:[.19444,.43056,.08847,0,.48555],122:[0,.43056,.12292,0,.40889],126:[.35,.31786,.11585,0,.51111],160:[0,0,0,0,.25],168:[0,.66786,.10474,0,.51111],176:[0,.69444,0,0,.83129],184:[.17014,0,0,0,.46],198:[0,.68333,.12028,0,.88277],216:[.04861,.73194,.09403,0,.76666],223:[.19444,.69444,.10514,0,.53666],230:[0,.43056,.07514,0,.71555],248:[.09722,.52778,.09194,0,.51111],338:[0,.68333,.12028,0,.98499],339:[0,.43056,.07514,0,.71555],710:[0,.69444,.06646,0,.51111],711:[0,.62847,.08295,0,.51111],713:[0,.56167,.10333,0,.51111],714:[0,.69444,.09694,0,.51111],715:[0,.69444,0,0,.51111],728:[0,.69444,.10806,0,.51111],729:[0,.66786,.11752,0,.30667],730:[0,.69444,0,0,.83129],732:[0,.66786,.11585,0,.51111],733:[0,.69444,.1225,0,.51111],915:[0,.68333,.13305,0,.62722],916:[0,.68333,0,0,.81777],920:[0,.68333,.09403,0,.76666],923:[0,.68333,0,0,.69222],926:[0,.68333,.15294,0,.66444],928:[0,.68333,.16389,0,.74333],931:[0,.68333,.12028,0,.71555],933:[0,.68333,.11111,0,.76666],934:[0,.68333,.05986,0,.71555],936:[0,.68333,.11111,0,.76666],937:[0,.68333,.10257,0,.71555],8211:[0,.43056,.09208,0,.51111],8212:[0,.43056,.09208,0,1.02222],8216:[0,.69444,.12417,0,.30667],8217:[0,.69444,.12417,0,.30667],8220:[0,.69444,.1685,0,.51444],8221:[0,.69444,.06961,0,.51444],8463:[0,.68889,0,0,.54028]},"Main-Regular":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.27778],34:[0,.69444,0,0,.5],35:[.19444,.69444,0,0,.83334],36:[.05556,.75,0,0,.5],37:[.05556,.75,0,0,.83334],38:[0,.69444,0,0,.77778],39:[0,.69444,0,0,.27778],40:[.25,.75,0,0,.38889],41:[.25,.75,0,0,.38889],42:[0,.75,0,0,.5],43:[.08333,.58333,0,0,.77778],44:[.19444,.10556,0,0,.27778],45:[0,.43056,0,0,.33333],46:[0,.10556,0,0,.27778],47:[.25,.75,0,0,.5],48:[0,.64444,0,0,.5],49:[0,.64444,0,0,.5],50:[0,.64444,0,0,.5],51:[0,.64444,0,0,.5],52:[0,.64444,0,0,.5],53:[0,.64444,0,0,.5],54:[0,.64444,0,0,.5],55:[0,.64444,0,0,.5],56:[0,.64444,0,0,.5],57:[0,.64444,0,0,.5],58:[0,.43056,0,0,.27778],59:[.19444,.43056,0,0,.27778],60:[.0391,.5391,0,0,.77778],61:[-.13313,.36687,0,0,.77778],62:[.0391,.5391,0,0,.77778],63:[0,.69444,0,0,.47222],64:[0,.69444,0,0,.77778],65:[0,.68333,0,0,.75],66:[0,.68333,0,0,.70834],67:[0,.68333,0,0,.72222],68:[0,.68333,0,0,.76389],69:[0,.68333,0,0,.68056],70:[0,.68333,0,0,.65278],71:[0,.68333,0,0,.78472],72:[0,.68333,0,0,.75],73:[0,.68333,0,0,.36111],74:[0,.68333,0,0,.51389],75:[0,.68333,0,0,.77778],76:[0,.68333,0,0,.625],77:[0,.68333,0,0,.91667],78:[0,.68333,0,0,.75],79:[0,.68333,0,0,.77778],80:[0,.68333,0,0,.68056],81:[.19444,.68333,0,0,.77778],82:[0,.68333,0,0,.73611],83:[0,.68333,0,0,.55556],84:[0,.68333,0,0,.72222],85:[0,.68333,0,0,.75],86:[0,.68333,.01389,0,.75],87:[0,.68333,.01389,0,1.02778],88:[0,.68333,0,0,.75],89:[0,.68333,.025,0,.75],90:[0,.68333,0,0,.61111],91:[.25,.75,0,0,.27778],92:[.25,.75,0,0,.5],93:[.25,.75,0,0,.27778],94:[0,.69444,0,0,.5],95:[.31,.12056,.02778,0,.5],97:[0,.43056,0,0,.5],98:[0,.69444,0,0,.55556],99:[0,.43056,0,0,.44445],100:[0,.69444,0,0,.55556],101:[0,.43056,0,0,.44445],102:[0,.69444,.07778,0,.30556],103:[.19444,.43056,.01389,0,.5],104:[0,.69444,0,0,.55556],105:[0,.66786,0,0,.27778],106:[.19444,.66786,0,0,.30556],107:[0,.69444,0,0,.52778],108:[0,.69444,0,0,.27778],109:[0,.43056,0,0,.83334],110:[0,.43056,0,0,.55556],111:[0,.43056,0,0,.5],112:[.19444,.43056,0,0,.55556],113:[.19444,.43056,0,0,.52778],114:[0,.43056,0,0,.39167],115:[0,.43056,0,0,.39445],116:[0,.61508,0,0,.38889],117:[0,.43056,0,0,.55556],118:[0,.43056,.01389,0,.52778],119:[0,.43056,.01389,0,.72222],120:[0,.43056,0,0,.52778],121:[.19444,.43056,.01389,0,.52778],122:[0,.43056,0,0,.44445],123:[.25,.75,0,0,.5],124:[.25,.75,0,0,.27778],125:[.25,.75,0,0,.5],126:[.35,.31786,0,0,.5],160:[0,0,0,0,.25],163:[0,.69444,0,0,.76909],167:[.19444,.69444,0,0,.44445],168:[0,.66786,0,0,.5],172:[0,.43056,0,0,.66667],176:[0,.69444,0,0,.75],177:[.08333,.58333,0,0,.77778],182:[.19444,.69444,0,0,.61111],184:[.17014,0,0,0,.44445],198:[0,.68333,0,0,.90278],215:[.08333,.58333,0,0,.77778],216:[.04861,.73194,0,0,.77778],223:[0,.69444,0,0,.5],230:[0,.43056,0,0,.72222],247:[.08333,.58333,0,0,.77778],248:[.09722,.52778,0,0,.5],305:[0,.43056,0,0,.27778],338:[0,.68333,0,0,1.01389],339:[0,.43056,0,0,.77778],567:[.19444,.43056,0,0,.30556],710:[0,.69444,0,0,.5],711:[0,.62847,0,0,.5],713:[0,.56778,0,0,.5],714:[0,.69444,0,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,0,0,.5],729:[0,.66786,0,0,.27778],730:[0,.69444,0,0,.75],732:[0,.66786,0,0,.5],733:[0,.69444,0,0,.5],915:[0,.68333,0,0,.625],916:[0,.68333,0,0,.83334],920:[0,.68333,0,0,.77778],923:[0,.68333,0,0,.69445],926:[0,.68333,0,0,.66667],928:[0,.68333,0,0,.75],931:[0,.68333,0,0,.72222],933:[0,.68333,0,0,.77778],934:[0,.68333,0,0,.72222],936:[0,.68333,0,0,.77778],937:[0,.68333,0,0,.72222],8211:[0,.43056,.02778,0,.5],8212:[0,.43056,.02778,0,1],8216:[0,.69444,0,0,.27778],8217:[0,.69444,0,0,.27778],8220:[0,.69444,0,0,.5],8221:[0,.69444,0,0,.5],8224:[.19444,.69444,0,0,.44445],8225:[.19444,.69444,0,0,.44445],8230:[0,.123,0,0,1.172],8242:[0,.55556,0,0,.275],8407:[0,.71444,.15382,0,.5],8463:[0,.68889,0,0,.54028],8465:[0,.69444,0,0,.72222],8467:[0,.69444,0,.11111,.41667],8472:[.19444,.43056,0,.11111,.63646],8476:[0,.69444,0,0,.72222],8501:[0,.69444,0,0,.61111],8592:[-.13313,.36687,0,0,1],8593:[.19444,.69444,0,0,.5],8594:[-.13313,.36687,0,0,1],8595:[.19444,.69444,0,0,.5],8596:[-.13313,.36687,0,0,1],8597:[.25,.75,0,0,.5],8598:[.19444,.69444,0,0,1],8599:[.19444,.69444,0,0,1],8600:[.19444,.69444,0,0,1],8601:[.19444,.69444,0,0,1],8614:[.011,.511,0,0,1],8617:[.011,.511,0,0,1.126],8618:[.011,.511,0,0,1.126],8636:[-.13313,.36687,0,0,1],8637:[-.13313,.36687,0,0,1],8640:[-.13313,.36687,0,0,1],8641:[-.13313,.36687,0,0,1],8652:[.011,.671,0,0,1],8656:[-.13313,.36687,0,0,1],8657:[.19444,.69444,0,0,.61111],8658:[-.13313,.36687,0,0,1],8659:[.19444,.69444,0,0,.61111],8660:[-.13313,.36687,0,0,1],8661:[.25,.75,0,0,.61111],8704:[0,.69444,0,0,.55556],8706:[0,.69444,.05556,.08334,.5309],8707:[0,.69444,0,0,.55556],8709:[.05556,.75,0,0,.5],8711:[0,.68333,0,0,.83334],8712:[.0391,.5391,0,0,.66667],8715:[.0391,.5391,0,0,.66667],8722:[.08333,.58333,0,0,.77778],8723:[.08333,.58333,0,0,.77778],8725:[.25,.75,0,0,.5],8726:[.25,.75,0,0,.5],8727:[-.03472,.46528,0,0,.5],8728:[-.05555,.44445,0,0,.5],8729:[-.05555,.44445,0,0,.5],8730:[.2,.8,0,0,.83334],8733:[0,.43056,0,0,.77778],8734:[0,.43056,0,0,1],8736:[0,.69224,0,0,.72222],8739:[.25,.75,0,0,.27778],8741:[.25,.75,0,0,.5],8743:[0,.55556,0,0,.66667],8744:[0,.55556,0,0,.66667],8745:[0,.55556,0,0,.66667],8746:[0,.55556,0,0,.66667],8747:[.19444,.69444,.11111,0,.41667],8764:[-.13313,.36687,0,0,.77778],8768:[.19444,.69444,0,0,.27778],8771:[-.03625,.46375,0,0,.77778],8773:[-.022,.589,0,0,.778],8776:[-.01688,.48312,0,0,.77778],8781:[-.03625,.46375,0,0,.77778],8784:[-.133,.673,0,0,.778],8801:[-.03625,.46375,0,0,.77778],8804:[.13597,.63597,0,0,.77778],8805:[.13597,.63597,0,0,.77778],8810:[.0391,.5391,0,0,1],8811:[.0391,.5391,0,0,1],8826:[.0391,.5391,0,0,.77778],8827:[.0391,.5391,0,0,.77778],8834:[.0391,.5391,0,0,.77778],8835:[.0391,.5391,0,0,.77778],8838:[.13597,.63597,0,0,.77778],8839:[.13597,.63597,0,0,.77778],8846:[0,.55556,0,0,.66667],8849:[.13597,.63597,0,0,.77778],8850:[.13597,.63597,0,0,.77778],8851:[0,.55556,0,0,.66667],8852:[0,.55556,0,0,.66667],8853:[.08333,.58333,0,0,.77778],8854:[.08333,.58333,0,0,.77778],8855:[.08333,.58333,0,0,.77778],8856:[.08333,.58333,0,0,.77778],8857:[.08333,.58333,0,0,.77778],8866:[0,.69444,0,0,.61111],8867:[0,.69444,0,0,.61111],8868:[0,.69444,0,0,.77778],8869:[0,.69444,0,0,.77778],8872:[.249,.75,0,0,.867],8900:[-.05555,.44445,0,0,.5],8901:[-.05555,.44445,0,0,.27778],8902:[-.03472,.46528,0,0,.5],8904:[.005,.505,0,0,.9],8942:[.03,.903,0,0,.278],8943:[-.19,.313,0,0,1.172],8945:[-.1,.823,0,0,1.282],8968:[.25,.75,0,0,.44445],8969:[.25,.75,0,0,.44445],8970:[.25,.75,0,0,.44445],8971:[.25,.75,0,0,.44445],8994:[-.14236,.35764,0,0,1],8995:[-.14236,.35764,0,0,1],9136:[.244,.744,0,0,.412],9137:[.244,.745,0,0,.412],9651:[.19444,.69444,0,0,.88889],9657:[-.03472,.46528,0,0,.5],9661:[.19444,.69444,0,0,.88889],9667:[-.03472,.46528,0,0,.5],9711:[.19444,.69444,0,0,1],9824:[.12963,.69444,0,0,.77778],9825:[.12963,.69444,0,0,.77778],9826:[.12963,.69444,0,0,.77778],9827:[.12963,.69444,0,0,.77778],9837:[0,.75,0,0,.38889],9838:[.19444,.69444,0,0,.38889],9839:[.19444,.69444,0,0,.38889],10216:[.25,.75,0,0,.38889],10217:[.25,.75,0,0,.38889],10222:[.244,.744,0,0,.412],10223:[.244,.745,0,0,.412],10229:[.011,.511,0,0,1.609],10230:[.011,.511,0,0,1.638],10231:[.011,.511,0,0,1.859],10232:[.024,.525,0,0,1.609],10233:[.024,.525,0,0,1.638],10234:[.024,.525,0,0,1.858],10236:[.011,.511,0,0,1.638],10815:[0,.68333,0,0,.75],10927:[.13597,.63597,0,0,.77778],10928:[.13597,.63597,0,0,.77778],57376:[.19444,.69444,0,0,0]},"Math-BoldItalic":{32:[0,0,0,0,.25],48:[0,.44444,0,0,.575],49:[0,.44444,0,0,.575],50:[0,.44444,0,0,.575],51:[.19444,.44444,0,0,.575],52:[.19444,.44444,0,0,.575],53:[.19444,.44444,0,0,.575],54:[0,.64444,0,0,.575],55:[.19444,.44444,0,0,.575],56:[0,.64444,0,0,.575],57:[.19444,.44444,0,0,.575],65:[0,.68611,0,0,.86944],66:[0,.68611,.04835,0,.8664],67:[0,.68611,.06979,0,.81694],68:[0,.68611,.03194,0,.93812],69:[0,.68611,.05451,0,.81007],70:[0,.68611,.15972,0,.68889],71:[0,.68611,0,0,.88673],72:[0,.68611,.08229,0,.98229],73:[0,.68611,.07778,0,.51111],74:[0,.68611,.10069,0,.63125],75:[0,.68611,.06979,0,.97118],76:[0,.68611,0,0,.75555],77:[0,.68611,.11424,0,1.14201],78:[0,.68611,.11424,0,.95034],79:[0,.68611,.03194,0,.83666],80:[0,.68611,.15972,0,.72309],81:[.19444,.68611,0,0,.86861],82:[0,.68611,.00421,0,.87235],83:[0,.68611,.05382,0,.69271],84:[0,.68611,.15972,0,.63663],85:[0,.68611,.11424,0,.80027],86:[0,.68611,.25555,0,.67778],87:[0,.68611,.15972,0,1.09305],88:[0,.68611,.07778,0,.94722],89:[0,.68611,.25555,0,.67458],90:[0,.68611,.06979,0,.77257],97:[0,.44444,0,0,.63287],98:[0,.69444,0,0,.52083],99:[0,.44444,0,0,.51342],100:[0,.69444,0,0,.60972],101:[0,.44444,0,0,.55361],102:[.19444,.69444,.11042,0,.56806],103:[.19444,.44444,.03704,0,.5449],104:[0,.69444,0,0,.66759],105:[0,.69326,0,0,.4048],106:[.19444,.69326,.0622,0,.47083],107:[0,.69444,.01852,0,.6037],108:[0,.69444,.0088,0,.34815],109:[0,.44444,0,0,1.0324],110:[0,.44444,0,0,.71296],111:[0,.44444,0,0,.58472],112:[.19444,.44444,0,0,.60092],113:[.19444,.44444,.03704,0,.54213],114:[0,.44444,.03194,0,.5287],115:[0,.44444,0,0,.53125],116:[0,.63492,0,0,.41528],117:[0,.44444,0,0,.68102],118:[0,.44444,.03704,0,.56666],119:[0,.44444,.02778,0,.83148],120:[0,.44444,0,0,.65903],121:[.19444,.44444,.03704,0,.59028],122:[0,.44444,.04213,0,.55509],160:[0,0,0,0,.25],915:[0,.68611,.15972,0,.65694],916:[0,.68611,0,0,.95833],920:[0,.68611,.03194,0,.86722],923:[0,.68611,0,0,.80555],926:[0,.68611,.07458,0,.84125],928:[0,.68611,.08229,0,.98229],931:[0,.68611,.05451,0,.88507],933:[0,.68611,.15972,0,.67083],934:[0,.68611,0,0,.76666],936:[0,.68611,.11653,0,.71402],937:[0,.68611,.04835,0,.8789],945:[0,.44444,0,0,.76064],946:[.19444,.69444,.03403,0,.65972],947:[.19444,.44444,.06389,0,.59003],948:[0,.69444,.03819,0,.52222],949:[0,.44444,0,0,.52882],950:[.19444,.69444,.06215,0,.50833],951:[.19444,.44444,.03704,0,.6],952:[0,.69444,.03194,0,.5618],953:[0,.44444,0,0,.41204],954:[0,.44444,0,0,.66759],955:[0,.69444,0,0,.67083],956:[.19444,.44444,0,0,.70787],957:[0,.44444,.06898,0,.57685],958:[.19444,.69444,.03021,0,.50833],959:[0,.44444,0,0,.58472],960:[0,.44444,.03704,0,.68241],961:[.19444,.44444,0,0,.6118],962:[.09722,.44444,.07917,0,.42361],963:[0,.44444,.03704,0,.68588],964:[0,.44444,.13472,0,.52083],965:[0,.44444,.03704,0,.63055],966:[.19444,.44444,0,0,.74722],967:[.19444,.44444,0,0,.71805],968:[.19444,.69444,.03704,0,.75833],969:[0,.44444,.03704,0,.71782],977:[0,.69444,0,0,.69155],981:[.19444,.69444,0,0,.7125],982:[0,.44444,.03194,0,.975],1009:[.19444,.44444,0,0,.6118],1013:[0,.44444,0,0,.48333],57649:[0,.44444,0,0,.39352],57911:[.19444,.44444,0,0,.43889]},"Math-Italic":{32:[0,0,0,0,.25],48:[0,.43056,0,0,.5],49:[0,.43056,0,0,.5],50:[0,.43056,0,0,.5],51:[.19444,.43056,0,0,.5],52:[.19444,.43056,0,0,.5],53:[.19444,.43056,0,0,.5],54:[0,.64444,0,0,.5],55:[.19444,.43056,0,0,.5],56:[0,.64444,0,0,.5],57:[.19444,.43056,0,0,.5],65:[0,.68333,0,.13889,.75],66:[0,.68333,.05017,.08334,.75851],67:[0,.68333,.07153,.08334,.71472],68:[0,.68333,.02778,.05556,.82792],69:[0,.68333,.05764,.08334,.7382],70:[0,.68333,.13889,.08334,.64306],71:[0,.68333,0,.08334,.78625],72:[0,.68333,.08125,.05556,.83125],73:[0,.68333,.07847,.11111,.43958],74:[0,.68333,.09618,.16667,.55451],75:[0,.68333,.07153,.05556,.84931],76:[0,.68333,0,.02778,.68056],77:[0,.68333,.10903,.08334,.97014],78:[0,.68333,.10903,.08334,.80347],79:[0,.68333,.02778,.08334,.76278],80:[0,.68333,.13889,.08334,.64201],81:[.19444,.68333,0,.08334,.79056],82:[0,.68333,.00773,.08334,.75929],83:[0,.68333,.05764,.08334,.6132],84:[0,.68333,.13889,.08334,.58438],85:[0,.68333,.10903,.02778,.68278],86:[0,.68333,.22222,0,.58333],87:[0,.68333,.13889,0,.94445],88:[0,.68333,.07847,.08334,.82847],89:[0,.68333,.22222,0,.58056],90:[0,.68333,.07153,.08334,.68264],97:[0,.43056,0,0,.52859],98:[0,.69444,0,0,.42917],99:[0,.43056,0,.05556,.43276],100:[0,.69444,0,.16667,.52049],101:[0,.43056,0,.05556,.46563],102:[.19444,.69444,.10764,.16667,.48959],103:[.19444,.43056,.03588,.02778,.47697],104:[0,.69444,0,0,.57616],105:[0,.65952,0,0,.34451],106:[.19444,.65952,.05724,0,.41181],107:[0,.69444,.03148,0,.5206],108:[0,.69444,.01968,.08334,.29838],109:[0,.43056,0,0,.87801],110:[0,.43056,0,0,.60023],111:[0,.43056,0,.05556,.48472],112:[.19444,.43056,0,.08334,.50313],113:[.19444,.43056,.03588,.08334,.44641],114:[0,.43056,.02778,.05556,.45116],115:[0,.43056,0,.05556,.46875],116:[0,.61508,0,.08334,.36111],117:[0,.43056,0,.02778,.57246],118:[0,.43056,.03588,.02778,.48472],119:[0,.43056,.02691,.08334,.71592],120:[0,.43056,0,.02778,.57153],121:[.19444,.43056,.03588,.05556,.49028],122:[0,.43056,.04398,.05556,.46505],160:[0,0,0,0,.25],915:[0,.68333,.13889,.08334,.61528],916:[0,.68333,0,.16667,.83334],920:[0,.68333,.02778,.08334,.76278],923:[0,.68333,0,.16667,.69445],926:[0,.68333,.07569,.08334,.74236],928:[0,.68333,.08125,.05556,.83125],931:[0,.68333,.05764,.08334,.77986],933:[0,.68333,.13889,.05556,.58333],934:[0,.68333,0,.08334,.66667],936:[0,.68333,.11,.05556,.61222],937:[0,.68333,.05017,.08334,.7724],945:[0,.43056,.0037,.02778,.6397],946:[.19444,.69444,.05278,.08334,.56563],947:[.19444,.43056,.05556,0,.51773],948:[0,.69444,.03785,.05556,.44444],949:[0,.43056,0,.08334,.46632],950:[.19444,.69444,.07378,.08334,.4375],951:[.19444,.43056,.03588,.05556,.49653],952:[0,.69444,.02778,.08334,.46944],953:[0,.43056,0,.05556,.35394],954:[0,.43056,0,0,.57616],955:[0,.69444,0,0,.58334],956:[.19444,.43056,0,.02778,.60255],957:[0,.43056,.06366,.02778,.49398],958:[.19444,.69444,.04601,.11111,.4375],959:[0,.43056,0,.05556,.48472],960:[0,.43056,.03588,0,.57003],961:[.19444,.43056,0,.08334,.51702],962:[.09722,.43056,.07986,.08334,.36285],963:[0,.43056,.03588,0,.57141],964:[0,.43056,.1132,.02778,.43715],965:[0,.43056,.03588,.02778,.54028],966:[.19444,.43056,0,.08334,.65417],967:[.19444,.43056,0,.05556,.62569],968:[.19444,.69444,.03588,.11111,.65139],969:[0,.43056,.03588,0,.62245],977:[0,.69444,0,.08334,.59144],981:[.19444,.69444,0,.08334,.59583],982:[0,.43056,.02778,0,.82813],1009:[.19444,.43056,0,.08334,.51702],1013:[0,.43056,0,.05556,.4059],57649:[0,.43056,0,.02778,.32246],57911:[.19444,.43056,0,.08334,.38403]},"SansSerif-Bold":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.36667],34:[0,.69444,0,0,.55834],35:[.19444,.69444,0,0,.91667],36:[.05556,.75,0,0,.55],37:[.05556,.75,0,0,1.02912],38:[0,.69444,0,0,.83056],39:[0,.69444,0,0,.30556],40:[.25,.75,0,0,.42778],41:[.25,.75,0,0,.42778],42:[0,.75,0,0,.55],43:[.11667,.61667,0,0,.85556],44:[.10556,.13056,0,0,.30556],45:[0,.45833,0,0,.36667],46:[0,.13056,0,0,.30556],47:[.25,.75,0,0,.55],48:[0,.69444,0,0,.55],49:[0,.69444,0,0,.55],50:[0,.69444,0,0,.55],51:[0,.69444,0,0,.55],52:[0,.69444,0,0,.55],53:[0,.69444,0,0,.55],54:[0,.69444,0,0,.55],55:[0,.69444,0,0,.55],56:[0,.69444,0,0,.55],57:[0,.69444,0,0,.55],58:[0,.45833,0,0,.30556],59:[.10556,.45833,0,0,.30556],61:[-.09375,.40625,0,0,.85556],63:[0,.69444,0,0,.51945],64:[0,.69444,0,0,.73334],65:[0,.69444,0,0,.73334],66:[0,.69444,0,0,.73334],67:[0,.69444,0,0,.70278],68:[0,.69444,0,0,.79445],69:[0,.69444,0,0,.64167],70:[0,.69444,0,0,.61111],71:[0,.69444,0,0,.73334],72:[0,.69444,0,0,.79445],73:[0,.69444,0,0,.33056],74:[0,.69444,0,0,.51945],75:[0,.69444,0,0,.76389],76:[0,.69444,0,0,.58056],77:[0,.69444,0,0,.97778],78:[0,.69444,0,0,.79445],79:[0,.69444,0,0,.79445],80:[0,.69444,0,0,.70278],81:[.10556,.69444,0,0,.79445],82:[0,.69444,0,0,.70278],83:[0,.69444,0,0,.61111],84:[0,.69444,0,0,.73334],85:[0,.69444,0,0,.76389],86:[0,.69444,.01528,0,.73334],87:[0,.69444,.01528,0,1.03889],88:[0,.69444,0,0,.73334],89:[0,.69444,.0275,0,.73334],90:[0,.69444,0,0,.67223],91:[.25,.75,0,0,.34306],93:[.25,.75,0,0,.34306],94:[0,.69444,0,0,.55],95:[.35,.10833,.03056,0,.55],97:[0,.45833,0,0,.525],98:[0,.69444,0,0,.56111],99:[0,.45833,0,0,.48889],100:[0,.69444,0,0,.56111],101:[0,.45833,0,0,.51111],102:[0,.69444,.07639,0,.33611],103:[.19444,.45833,.01528,0,.55],104:[0,.69444,0,0,.56111],105:[0,.69444,0,0,.25556],106:[.19444,.69444,0,0,.28611],107:[0,.69444,0,0,.53056],108:[0,.69444,0,0,.25556],109:[0,.45833,0,0,.86667],110:[0,.45833,0,0,.56111],111:[0,.45833,0,0,.55],112:[.19444,.45833,0,0,.56111],113:[.19444,.45833,0,0,.56111],114:[0,.45833,.01528,0,.37222],115:[0,.45833,0,0,.42167],116:[0,.58929,0,0,.40417],117:[0,.45833,0,0,.56111],118:[0,.45833,.01528,0,.5],119:[0,.45833,.01528,0,.74445],120:[0,.45833,0,0,.5],121:[.19444,.45833,.01528,0,.5],122:[0,.45833,0,0,.47639],126:[.35,.34444,0,0,.55],160:[0,0,0,0,.25],168:[0,.69444,0,0,.55],176:[0,.69444,0,0,.73334],180:[0,.69444,0,0,.55],184:[.17014,0,0,0,.48889],305:[0,.45833,0,0,.25556],567:[.19444,.45833,0,0,.28611],710:[0,.69444,0,0,.55],711:[0,.63542,0,0,.55],713:[0,.63778,0,0,.55],728:[0,.69444,0,0,.55],729:[0,.69444,0,0,.30556],730:[0,.69444,0,0,.73334],732:[0,.69444,0,0,.55],733:[0,.69444,0,0,.55],915:[0,.69444,0,0,.58056],916:[0,.69444,0,0,.91667],920:[0,.69444,0,0,.85556],923:[0,.69444,0,0,.67223],926:[0,.69444,0,0,.73334],928:[0,.69444,0,0,.79445],931:[0,.69444,0,0,.79445],933:[0,.69444,0,0,.85556],934:[0,.69444,0,0,.79445],936:[0,.69444,0,0,.85556],937:[0,.69444,0,0,.79445],8211:[0,.45833,.03056,0,.55],8212:[0,.45833,.03056,0,1.10001],8216:[0,.69444,0,0,.30556],8217:[0,.69444,0,0,.30556],8220:[0,.69444,0,0,.55834],8221:[0,.69444,0,0,.55834]},"SansSerif-Italic":{32:[0,0,0,0,.25],33:[0,.69444,.05733,0,.31945],34:[0,.69444,.00316,0,.5],35:[.19444,.69444,.05087,0,.83334],36:[.05556,.75,.11156,0,.5],37:[.05556,.75,.03126,0,.83334],38:[0,.69444,.03058,0,.75834],39:[0,.69444,.07816,0,.27778],40:[.25,.75,.13164,0,.38889],41:[.25,.75,.02536,0,.38889],42:[0,.75,.11775,0,.5],43:[.08333,.58333,.02536,0,.77778],44:[.125,.08333,0,0,.27778],45:[0,.44444,.01946,0,.33333],46:[0,.08333,0,0,.27778],47:[.25,.75,.13164,0,.5],48:[0,.65556,.11156,0,.5],49:[0,.65556,.11156,0,.5],50:[0,.65556,.11156,0,.5],51:[0,.65556,.11156,0,.5],52:[0,.65556,.11156,0,.5],53:[0,.65556,.11156,0,.5],54:[0,.65556,.11156,0,.5],55:[0,.65556,.11156,0,.5],56:[0,.65556,.11156,0,.5],57:[0,.65556,.11156,0,.5],58:[0,.44444,.02502,0,.27778],59:[.125,.44444,.02502,0,.27778],61:[-.13,.37,.05087,0,.77778],63:[0,.69444,.11809,0,.47222],64:[0,.69444,.07555,0,.66667],65:[0,.69444,0,0,.66667],66:[0,.69444,.08293,0,.66667],67:[0,.69444,.11983,0,.63889],68:[0,.69444,.07555,0,.72223],69:[0,.69444,.11983,0,.59722],70:[0,.69444,.13372,0,.56945],71:[0,.69444,.11983,0,.66667],72:[0,.69444,.08094,0,.70834],73:[0,.69444,.13372,0,.27778],74:[0,.69444,.08094,0,.47222],75:[0,.69444,.11983,0,.69445],76:[0,.69444,0,0,.54167],77:[0,.69444,.08094,0,.875],78:[0,.69444,.08094,0,.70834],79:[0,.69444,.07555,0,.73611],80:[0,.69444,.08293,0,.63889],81:[.125,.69444,.07555,0,.73611],82:[0,.69444,.08293,0,.64584],83:[0,.69444,.09205,0,.55556],84:[0,.69444,.13372,0,.68056],85:[0,.69444,.08094,0,.6875],86:[0,.69444,.1615,0,.66667],87:[0,.69444,.1615,0,.94445],88:[0,.69444,.13372,0,.66667],89:[0,.69444,.17261,0,.66667],90:[0,.69444,.11983,0,.61111],91:[.25,.75,.15942,0,.28889],93:[.25,.75,.08719,0,.28889],94:[0,.69444,.0799,0,.5],95:[.35,.09444,.08616,0,.5],97:[0,.44444,.00981,0,.48056],98:[0,.69444,.03057,0,.51667],99:[0,.44444,.08336,0,.44445],100:[0,.69444,.09483,0,.51667],101:[0,.44444,.06778,0,.44445],102:[0,.69444,.21705,0,.30556],103:[.19444,.44444,.10836,0,.5],104:[0,.69444,.01778,0,.51667],105:[0,.67937,.09718,0,.23889],106:[.19444,.67937,.09162,0,.26667],107:[0,.69444,.08336,0,.48889],108:[0,.69444,.09483,0,.23889],109:[0,.44444,.01778,0,.79445],110:[0,.44444,.01778,0,.51667],111:[0,.44444,.06613,0,.5],112:[.19444,.44444,.0389,0,.51667],113:[.19444,.44444,.04169,0,.51667],114:[0,.44444,.10836,0,.34167],115:[0,.44444,.0778,0,.38333],116:[0,.57143,.07225,0,.36111],117:[0,.44444,.04169,0,.51667],118:[0,.44444,.10836,0,.46111],119:[0,.44444,.10836,0,.68334],120:[0,.44444,.09169,0,.46111],121:[.19444,.44444,.10836,0,.46111],122:[0,.44444,.08752,0,.43472],126:[.35,.32659,.08826,0,.5],160:[0,0,0,0,.25],168:[0,.67937,.06385,0,.5],176:[0,.69444,0,0,.73752],184:[.17014,0,0,0,.44445],305:[0,.44444,.04169,0,.23889],567:[.19444,.44444,.04169,0,.26667],710:[0,.69444,.0799,0,.5],711:[0,.63194,.08432,0,.5],713:[0,.60889,.08776,0,.5],714:[0,.69444,.09205,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,.09483,0,.5],729:[0,.67937,.07774,0,.27778],730:[0,.69444,0,0,.73752],732:[0,.67659,.08826,0,.5],733:[0,.69444,.09205,0,.5],915:[0,.69444,.13372,0,.54167],916:[0,.69444,0,0,.83334],920:[0,.69444,.07555,0,.77778],923:[0,.69444,0,0,.61111],926:[0,.69444,.12816,0,.66667],928:[0,.69444,.08094,0,.70834],931:[0,.69444,.11983,0,.72222],933:[0,.69444,.09031,0,.77778],934:[0,.69444,.04603,0,.72222],936:[0,.69444,.09031,0,.77778],937:[0,.69444,.08293,0,.72222],8211:[0,.44444,.08616,0,.5],8212:[0,.44444,.08616,0,1],8216:[0,.69444,.07816,0,.27778],8217:[0,.69444,.07816,0,.27778],8220:[0,.69444,.14205,0,.5],8221:[0,.69444,.00316,0,.5]},"SansSerif-Regular":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.31945],34:[0,.69444,0,0,.5],35:[.19444,.69444,0,0,.83334],36:[.05556,.75,0,0,.5],37:[.05556,.75,0,0,.83334],38:[0,.69444,0,0,.75834],39:[0,.69444,0,0,.27778],40:[.25,.75,0,0,.38889],41:[.25,.75,0,0,.38889],42:[0,.75,0,0,.5],43:[.08333,.58333,0,0,.77778],44:[.125,.08333,0,0,.27778],45:[0,.44444,0,0,.33333],46:[0,.08333,0,0,.27778],47:[.25,.75,0,0,.5],48:[0,.65556,0,0,.5],49:[0,.65556,0,0,.5],50:[0,.65556,0,0,.5],51:[0,.65556,0,0,.5],52:[0,.65556,0,0,.5],53:[0,.65556,0,0,.5],54:[0,.65556,0,0,.5],55:[0,.65556,0,0,.5],56:[0,.65556,0,0,.5],57:[0,.65556,0,0,.5],58:[0,.44444,0,0,.27778],59:[.125,.44444,0,0,.27778],61:[-.13,.37,0,0,.77778],63:[0,.69444,0,0,.47222],64:[0,.69444,0,0,.66667],65:[0,.69444,0,0,.66667],66:[0,.69444,0,0,.66667],67:[0,.69444,0,0,.63889],68:[0,.69444,0,0,.72223],69:[0,.69444,0,0,.59722],70:[0,.69444,0,0,.56945],71:[0,.69444,0,0,.66667],72:[0,.69444,0,0,.70834],73:[0,.69444,0,0,.27778],74:[0,.69444,0,0,.47222],75:[0,.69444,0,0,.69445],76:[0,.69444,0,0,.54167],77:[0,.69444,0,0,.875],78:[0,.69444,0,0,.70834],79:[0,.69444,0,0,.73611],80:[0,.69444,0,0,.63889],81:[.125,.69444,0,0,.73611],82:[0,.69444,0,0,.64584],83:[0,.69444,0,0,.55556],84:[0,.69444,0,0,.68056],85:[0,.69444,0,0,.6875],86:[0,.69444,.01389,0,.66667],87:[0,.69444,.01389,0,.94445],88:[0,.69444,0,0,.66667],89:[0,.69444,.025,0,.66667],90:[0,.69444,0,0,.61111],91:[.25,.75,0,0,.28889],93:[.25,.75,0,0,.28889],94:[0,.69444,0,0,.5],95:[.35,.09444,.02778,0,.5],97:[0,.44444,0,0,.48056],98:[0,.69444,0,0,.51667],99:[0,.44444,0,0,.44445],100:[0,.69444,0,0,.51667],101:[0,.44444,0,0,.44445],102:[0,.69444,.06944,0,.30556],103:[.19444,.44444,.01389,0,.5],104:[0,.69444,0,0,.51667],105:[0,.67937,0,0,.23889],106:[.19444,.67937,0,0,.26667],107:[0,.69444,0,0,.48889],108:[0,.69444,0,0,.23889],109:[0,.44444,0,0,.79445],110:[0,.44444,0,0,.51667],111:[0,.44444,0,0,.5],112:[.19444,.44444,0,0,.51667],113:[.19444,.44444,0,0,.51667],114:[0,.44444,.01389,0,.34167],115:[0,.44444,0,0,.38333],116:[0,.57143,0,0,.36111],117:[0,.44444,0,0,.51667],118:[0,.44444,.01389,0,.46111],119:[0,.44444,.01389,0,.68334],120:[0,.44444,0,0,.46111],121:[.19444,.44444,.01389,0,.46111],122:[0,.44444,0,0,.43472],126:[.35,.32659,0,0,.5],160:[0,0,0,0,.25],168:[0,.67937,0,0,.5],176:[0,.69444,0,0,.66667],184:[.17014,0,0,0,.44445],305:[0,.44444,0,0,.23889],567:[.19444,.44444,0,0,.26667],710:[0,.69444,0,0,.5],711:[0,.63194,0,0,.5],713:[0,.60889,0,0,.5],714:[0,.69444,0,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,0,0,.5],729:[0,.67937,0,0,.27778],730:[0,.69444,0,0,.66667],732:[0,.67659,0,0,.5],733:[0,.69444,0,0,.5],915:[0,.69444,0,0,.54167],916:[0,.69444,0,0,.83334],920:[0,.69444,0,0,.77778],923:[0,.69444,0,0,.61111],926:[0,.69444,0,0,.66667],928:[0,.69444,0,0,.70834],931:[0,.69444,0,0,.72222],933:[0,.69444,0,0,.77778],934:[0,.69444,0,0,.72222],936:[0,.69444,0,0,.77778],937:[0,.69444,0,0,.72222],8211:[0,.44444,.02778,0,.5],8212:[0,.44444,.02778,0,1],8216:[0,.69444,0,0,.27778],8217:[0,.69444,0,0,.27778],8220:[0,.69444,0,0,.5],8221:[0,.69444,0,0,.5]},"Script-Regular":{32:[0,0,0,0,.25],65:[0,.7,.22925,0,.80253],66:[0,.7,.04087,0,.90757],67:[0,.7,.1689,0,.66619],68:[0,.7,.09371,0,.77443],69:[0,.7,.18583,0,.56162],70:[0,.7,.13634,0,.89544],71:[0,.7,.17322,0,.60961],72:[0,.7,.29694,0,.96919],73:[0,.7,.19189,0,.80907],74:[.27778,.7,.19189,0,1.05159],75:[0,.7,.31259,0,.91364],76:[0,.7,.19189,0,.87373],77:[0,.7,.15981,0,1.08031],78:[0,.7,.3525,0,.9015],79:[0,.7,.08078,0,.73787],80:[0,.7,.08078,0,1.01262],81:[0,.7,.03305,0,.88282],82:[0,.7,.06259,0,.85],83:[0,.7,.19189,0,.86767],84:[0,.7,.29087,0,.74697],85:[0,.7,.25815,0,.79996],86:[0,.7,.27523,0,.62204],87:[0,.7,.27523,0,.80532],88:[0,.7,.26006,0,.94445],89:[0,.7,.2939,0,.70961],90:[0,.7,.24037,0,.8212],160:[0,0,0,0,.25]},"Size1-Regular":{32:[0,0,0,0,.25],40:[.35001,.85,0,0,.45834],41:[.35001,.85,0,0,.45834],47:[.35001,.85,0,0,.57778],91:[.35001,.85,0,0,.41667],92:[.35001,.85,0,0,.57778],93:[.35001,.85,0,0,.41667],123:[.35001,.85,0,0,.58334],125:[.35001,.85,0,0,.58334],160:[0,0,0,0,.25],710:[0,.72222,0,0,.55556],732:[0,.72222,0,0,.55556],770:[0,.72222,0,0,.55556],771:[0,.72222,0,0,.55556],8214:[-99e-5,.601,0,0,.77778],8593:[1e-5,.6,0,0,.66667],8595:[1e-5,.6,0,0,.66667],8657:[1e-5,.6,0,0,.77778],8659:[1e-5,.6,0,0,.77778],8719:[.25001,.75,0,0,.94445],8720:[.25001,.75,0,0,.94445],8721:[.25001,.75,0,0,1.05556],8730:[.35001,.85,0,0,1],8739:[-.00599,.606,0,0,.33333],8741:[-.00599,.606,0,0,.55556],8747:[.30612,.805,.19445,0,.47222],8748:[.306,.805,.19445,0,.47222],8749:[.306,.805,.19445,0,.47222],8750:[.30612,.805,.19445,0,.47222],8896:[.25001,.75,0,0,.83334],8897:[.25001,.75,0,0,.83334],8898:[.25001,.75,0,0,.83334],8899:[.25001,.75,0,0,.83334],8968:[.35001,.85,0,0,.47222],8969:[.35001,.85,0,0,.47222],8970:[.35001,.85,0,0,.47222],8971:[.35001,.85,0,0,.47222],9168:[-99e-5,.601,0,0,.66667],10216:[.35001,.85,0,0,.47222],10217:[.35001,.85,0,0,.47222],10752:[.25001,.75,0,0,1.11111],10753:[.25001,.75,0,0,1.11111],10754:[.25001,.75,0,0,1.11111],10756:[.25001,.75,0,0,.83334],10758:[.25001,.75,0,0,.83334]},"Size2-Regular":{32:[0,0,0,0,.25],40:[.65002,1.15,0,0,.59722],41:[.65002,1.15,0,0,.59722],47:[.65002,1.15,0,0,.81111],91:[.65002,1.15,0,0,.47222],92:[.65002,1.15,0,0,.81111],93:[.65002,1.15,0,0,.47222],123:[.65002,1.15,0,0,.66667],125:[.65002,1.15,0,0,.66667],160:[0,0,0,0,.25],710:[0,.75,0,0,1],732:[0,.75,0,0,1],770:[0,.75,0,0,1],771:[0,.75,0,0,1],8719:[.55001,1.05,0,0,1.27778],8720:[.55001,1.05,0,0,1.27778],8721:[.55001,1.05,0,0,1.44445],8730:[.65002,1.15,0,0,1],8747:[.86225,1.36,.44445,0,.55556],8748:[.862,1.36,.44445,0,.55556],8749:[.862,1.36,.44445,0,.55556],8750:[.86225,1.36,.44445,0,.55556],8896:[.55001,1.05,0,0,1.11111],8897:[.55001,1.05,0,0,1.11111],8898:[.55001,1.05,0,0,1.11111],8899:[.55001,1.05,0,0,1.11111],8968:[.65002,1.15,0,0,.52778],8969:[.65002,1.15,0,0,.52778],8970:[.65002,1.15,0,0,.52778],8971:[.65002,1.15,0,0,.52778],10216:[.65002,1.15,0,0,.61111],10217:[.65002,1.15,0,0,.61111],10752:[.55001,1.05,0,0,1.51112],10753:[.55001,1.05,0,0,1.51112],10754:[.55001,1.05,0,0,1.51112],10756:[.55001,1.05,0,0,1.11111],10758:[.55001,1.05,0,0,1.11111]},"Size3-Regular":{32:[0,0,0,0,.25],40:[.95003,1.45,0,0,.73611],41:[.95003,1.45,0,0,.73611],47:[.95003,1.45,0,0,1.04445],91:[.95003,1.45,0,0,.52778],92:[.95003,1.45,0,0,1.04445],93:[.95003,1.45,0,0,.52778],123:[.95003,1.45,0,0,.75],125:[.95003,1.45,0,0,.75],160:[0,0,0,0,.25],710:[0,.75,0,0,1.44445],732:[0,.75,0,0,1.44445],770:[0,.75,0,0,1.44445],771:[0,.75,0,0,1.44445],8730:[.95003,1.45,0,0,1],8968:[.95003,1.45,0,0,.58334],8969:[.95003,1.45,0,0,.58334],8970:[.95003,1.45,0,0,.58334],8971:[.95003,1.45,0,0,.58334],10216:[.95003,1.45,0,0,.75],10217:[.95003,1.45,0,0,.75]},"Size4-Regular":{32:[0,0,0,0,.25],40:[1.25003,1.75,0,0,.79167],41:[1.25003,1.75,0,0,.79167],47:[1.25003,1.75,0,0,1.27778],91:[1.25003,1.75,0,0,.58334],92:[1.25003,1.75,0,0,1.27778],93:[1.25003,1.75,0,0,.58334],123:[1.25003,1.75,0,0,.80556],125:[1.25003,1.75,0,0,.80556],160:[0,0,0,0,.25],710:[0,.825,0,0,1.8889],732:[0,.825,0,0,1.8889],770:[0,.825,0,0,1.8889],771:[0,.825,0,0,1.8889],8730:[1.25003,1.75,0,0,1],8968:[1.25003,1.75,0,0,.63889],8969:[1.25003,1.75,0,0,.63889],8970:[1.25003,1.75,0,0,.63889],8971:[1.25003,1.75,0,0,.63889],9115:[.64502,1.155,0,0,.875],9116:[1e-5,.6,0,0,.875],9117:[.64502,1.155,0,0,.875],9118:[.64502,1.155,0,0,.875],9119:[1e-5,.6,0,0,.875],9120:[.64502,1.155,0,0,.875],9121:[.64502,1.155,0,0,.66667],9122:[-99e-5,.601,0,0,.66667],9123:[.64502,1.155,0,0,.66667],9124:[.64502,1.155,0,0,.66667],9125:[-99e-5,.601,0,0,.66667],9126:[.64502,1.155,0,0,.66667],9127:[1e-5,.9,0,0,.88889],9128:[.65002,1.15,0,0,.88889],9129:[.90001,0,0,0,.88889],9130:[0,.3,0,0,.88889],9131:[1e-5,.9,0,0,.88889],9132:[.65002,1.15,0,0,.88889],9133:[.90001,0,0,0,.88889],9143:[.88502,.915,0,0,1.05556],10216:[1.25003,1.75,0,0,.80556],10217:[1.25003,1.75,0,0,.80556],57344:[-.00499,.605,0,0,1.05556],57345:[-.00499,.605,0,0,1.05556],57680:[0,.12,0,0,.45],57681:[0,.12,0,0,.45],57682:[0,.12,0,0,.45],57683:[0,.12,0,0,.45]},"Typewriter-Regular":{32:[0,0,0,0,.525],33:[0,.61111,0,0,.525],34:[0,.61111,0,0,.525],35:[0,.61111,0,0,.525],36:[.08333,.69444,0,0,.525],37:[.08333,.69444,0,0,.525],38:[0,.61111,0,0,.525],39:[0,.61111,0,0,.525],40:[.08333,.69444,0,0,.525],41:[.08333,.69444,0,0,.525],42:[0,.52083,0,0,.525],43:[-.08056,.53055,0,0,.525],44:[.13889,.125,0,0,.525],45:[-.08056,.53055,0,0,.525],46:[0,.125,0,0,.525],47:[.08333,.69444,0,0,.525],48:[0,.61111,0,0,.525],49:[0,.61111,0,0,.525],50:[0,.61111,0,0,.525],51:[0,.61111,0,0,.525],52:[0,.61111,0,0,.525],53:[0,.61111,0,0,.525],54:[0,.61111,0,0,.525],55:[0,.61111,0,0,.525],56:[0,.61111,0,0,.525],57:[0,.61111,0,0,.525],58:[0,.43056,0,0,.525],59:[.13889,.43056,0,0,.525],60:[-.05556,.55556,0,0,.525],61:[-.19549,.41562,0,0,.525],62:[-.05556,.55556,0,0,.525],63:[0,.61111,0,0,.525],64:[0,.61111,0,0,.525],65:[0,.61111,0,0,.525],66:[0,.61111,0,0,.525],67:[0,.61111,0,0,.525],68:[0,.61111,0,0,.525],69:[0,.61111,0,0,.525],70:[0,.61111,0,0,.525],71:[0,.61111,0,0,.525],72:[0,.61111,0,0,.525],73:[0,.61111,0,0,.525],74:[0,.61111,0,0,.525],75:[0,.61111,0,0,.525],76:[0,.61111,0,0,.525],77:[0,.61111,0,0,.525],78:[0,.61111,0,0,.525],79:[0,.61111,0,0,.525],80:[0,.61111,0,0,.525],81:[.13889,.61111,0,0,.525],82:[0,.61111,0,0,.525],83:[0,.61111,0,0,.525],84:[0,.61111,0,0,.525],85:[0,.61111,0,0,.525],86:[0,.61111,0,0,.525],87:[0,.61111,0,0,.525],88:[0,.61111,0,0,.525],89:[0,.61111,0,0,.525],90:[0,.61111,0,0,.525],91:[.08333,.69444,0,0,.525],92:[.08333,.69444,0,0,.525],93:[.08333,.69444,0,0,.525],94:[0,.61111,0,0,.525],95:[.09514,0,0,0,.525],96:[0,.61111,0,0,.525],97:[0,.43056,0,0,.525],98:[0,.61111,0,0,.525],99:[0,.43056,0,0,.525],100:[0,.61111,0,0,.525],101:[0,.43056,0,0,.525],102:[0,.61111,0,0,.525],103:[.22222,.43056,0,0,.525],104:[0,.61111,0,0,.525],105:[0,.61111,0,0,.525],106:[.22222,.61111,0,0,.525],107:[0,.61111,0,0,.525],108:[0,.61111,0,0,.525],109:[0,.43056,0,0,.525],110:[0,.43056,0,0,.525],111:[0,.43056,0,0,.525],112:[.22222,.43056,0,0,.525],113:[.22222,.43056,0,0,.525],114:[0,.43056,0,0,.525],115:[0,.43056,0,0,.525],116:[0,.55358,0,0,.525],117:[0,.43056,0,0,.525],118:[0,.43056,0,0,.525],119:[0,.43056,0,0,.525],120:[0,.43056,0,0,.525],121:[.22222,.43056,0,0,.525],122:[0,.43056,0,0,.525],123:[.08333,.69444,0,0,.525],124:[.08333,.69444,0,0,.525],125:[.08333,.69444,0,0,.525],126:[0,.61111,0,0,.525],127:[0,.61111,0,0,.525],160:[0,0,0,0,.525],176:[0,.61111,0,0,.525],184:[.19445,0,0,0,.525],305:[0,.43056,0,0,.525],567:[.22222,.43056,0,0,.525],711:[0,.56597,0,0,.525],713:[0,.56555,0,0,.525],714:[0,.61111,0,0,.525],715:[0,.61111,0,0,.525],728:[0,.61111,0,0,.525],730:[0,.61111,0,0,.525],770:[0,.61111,0,0,.525],771:[0,.61111,0,0,.525],776:[0,.61111,0,0,.525],915:[0,.61111,0,0,.525],916:[0,.61111,0,0,.525],920:[0,.61111,0,0,.525],923:[0,.61111,0,0,.525],926:[0,.61111,0,0,.525],928:[0,.61111,0,0,.525],931:[0,.61111,0,0,.525],933:[0,.61111,0,0,.525],934:[0,.61111,0,0,.525],936:[0,.61111,0,0,.525],937:[0,.61111,0,0,.525],8216:[0,.61111,0,0,.525],8217:[0,.61111,0,0,.525],8242:[0,.61111,0,0,.525],9251:[.11111,.21944,0,0,.525]}};let ut={slant:[.25,.25,.25],space:[0,0,0],stretch:[0,0,0],shrink:[0,0,0],xHeight:[.431,.431,.431],quad:[1,1.171,1.472],extraSpace:[0,0,0],num1:[.677,.732,.925],num2:[.394,.384,.387],num3:[.444,.471,.504],denom1:[.686,.752,1.025],denom2:[.345,.344,.532],sup1:[.413,.503,.504],sup2:[.363,.431,.404],sup3:[.289,.286,.294],sub1:[.15,.143,.2],sub2:[.247,.286,.4],supDrop:[.386,.353,.494],subDrop:[.05,.071,.1],delim1:[2.39,1.7,1.98],delim2:[1.01,1.157,1.42],axisHeight:[.25,.25,.25],defaultRuleThickness:[.04,.049,.049],bigOpSpacing1:[.111,.111,.111],bigOpSpacing2:[.166,.166,.166],bigOpSpacing3:[.2,.2,.2],bigOpSpacing4:[.6,.611,.611],bigOpSpacing5:[.1,.143,.143],sqrtRuleThickness:[.04,.04,.04],ptPerEm:[10,10,10],doubleRuleSep:[.2,.2,.2],arrayRuleWidth:[.04,.04,.04],fboxsep:[.3,.3,.3],fboxrule:[.04,.04,.04]},vt={\u00C5:"A",\u00D0:"D",\u00DE:"o",\u00E5:"a",\u00F0:"d",\u00FE:"o",\u0410:"A",\u0411:"B",\u0412:"B",\u0413:"F",\u0414:"A",\u0415:"E",\u0416:"K",\u0417:"3",\u0418:"N",\u0419:"N",\u041A:"K",\u041B:"N",\u041C:"M",\u041D:"H",\u041E:"O",\u041F:"N",\u0420:"P",\u0421:"C",\u0422:"T",\u0423:"y",\u0424:"O",\u0425:"X",\u0426:"U",\u0427:"h",\u0428:"W",\u0429:"W",\u042A:"B",\u042B:"X",\u042C:"B",\u042D:"3",\u042E:"X",\u042F:"R",\u0430:"a",\u0431:"b",\u0432:"a",\u0433:"r",\u0434:"y",\u0435:"e",\u0436:"m",\u0437:"e",\u0438:"n",\u0439:"n",\u043A:"n",\u043B:"n",\u043C:"m",\u043D:"n",\u043E:"o",\u043F:"n",\u0440:"p",\u0441:"c",\u0442:"o",\u0443:"y",\u0444:"b",\u0445:"x",\u0446:"n",\u0447:"n",\u0448:"w",\u0449:"w",\u044A:"a",\u044B:"m",\u044C:"a",\u044D:"e",\u044E:"m",\u044F:"r"};function gt(E,w){We[E]=w}function mt(E,w,L){if(!We[w])throw new Error("Font metrics not found for font: "+w+".");let G=E.charCodeAt(0),Y=We[w][G];if(!Y&&E[0]in vt&&(G=vt[E[0]].charCodeAt(0),Y=We[w][G]),!Y&&L==="text"&&J(G)&&(Y=We[w][77]),Y)return{depth:Y[0],height:Y[1],italic:Y[2],skew:Y[3],width:Y[4]}}let ft={};function Dt(E){let w;if(E>=5?w=0:E>=3?w=1:w=2,!ft[w]){let L=ft[w]={cssEmPerMu:ut.quad[w]/18};for(let G in ut)ut.hasOwnProperty(G)&&(L[G]=ut[G][w])}return ft[w]}let ht={math:{},text:{}};var yt=ht;function W(E,w,L,G,Y,Q){ht[E][Y]={font:w,group:L,replace:G},Q&&G&&(ht[E][G]=ht[E][Y])}let j="math",Je="text",ee="main",Te="ams",bt="accent-token",at="bin",It="close",At="inner",Ut="mathord",Bt="op-token",Kt="open",vr="punct",Me="rel",kr="spacing",Ue="textord";W(j,ee,Me,"\u2261","\\equiv",!0),W(j,ee,Me,"\u227A","\\prec",!0),W(j,ee,Me,"\u227B","\\succ",!0),W(j,ee,Me,"\u223C","\\sim",!0),W(j,ee,Me,"\u22A5","\\perp"),W(j,ee,Me,"\u2AAF","\\preceq",!0),W(j,ee,Me,"\u2AB0","\\succeq",!0),W(j,ee,Me,"\u2243","\\simeq",!0),W(j,ee,Me,"\u2223","\\mid",!0),W(j,ee,Me,"\u226A","\\ll",!0),W(j,ee,Me,"\u226B","\\gg",!0),W(j,ee,Me,"\u224D","\\asymp",!0),W(j,ee,Me,"\u2225","\\parallel"),W(j,ee,Me,"\u22C8","\\bowtie",!0),W(j,ee,Me,"\u2323","\\smile",!0),W(j,ee,Me,"\u2291","\\sqsubseteq",!0),W(j,ee,Me,"\u2292","\\sqsupseteq",!0),W(j,ee,Me,"\u2250","\\doteq",!0),W(j,ee,Me,"\u2322","\\frown",!0),W(j,ee,Me,"\u220B","\\ni",!0),W(j,ee,Me,"\u221D","\\propto",!0),W(j,ee,Me,"\u22A2","\\vdash",!0),W(j,ee,Me,"\u22A3","\\dashv",!0),W(j,ee,Me,"\u220B","\\owns"),W(j,ee,vr,".","\\ldotp"),W(j,ee,vr,"\u22C5","\\cdotp"),W(j,ee,vr,"\u22C5","\xB7"),W(Je,ee,Ue,"\u22C5","\xB7"),W(j,ee,Ue,"#","\\#"),W(Je,ee,Ue,"#","\\#"),W(j,ee,Ue,"&","\\&"),W(Je,ee,Ue,"&","\\&"),W(j,ee,Ue,"\u2135","\\aleph",!0),W(j,ee,Ue,"\u2200","\\forall",!0),W(j,ee,Ue,"\u210F","\\hbar",!0),W(j,ee,Ue,"\u2203","\\exists",!0),W(j,ee,Ue,"\u2207","\\nabla",!0),W(j,ee,Ue,"\u266D","\\flat",!0),W(j,ee,Ue,"\u2113","\\ell",!0),W(j,ee,Ue,"\u266E","\\natural",!0),W(j,ee,Ue,"\u2663","\\clubsuit",!0),W(j,ee,Ue,"\u2118","\\wp",!0),W(j,ee,Ue,"\u266F","\\sharp",!0),W(j,ee,Ue,"\u2662","\\diamondsuit",!0),W(j,ee,Ue,"\u211C","\\Re",!0),W(j,ee,Ue,"\u2661","\\heartsuit",!0),W(j,ee,Ue,"\u2111","\\Im",!0),W(j,ee,Ue,"\u2660","\\spadesuit",!0),W(j,ee,Ue,"\xA7","\\S",!0),W(Je,ee,Ue,"\xA7","\\S"),W(j,ee,Ue,"\xB6","\\P",!0),W(Je,ee,Ue,"\xB6","\\P"),W(j,ee,Ue,"\u2020","\\dag"),W(Je,ee,Ue,"\u2020","\\dag"),W(Je,ee,Ue,"\u2020","\\textdagger"),W(j,ee,Ue,"\u2021","\\ddag"),W(Je,ee,Ue,"\u2021","\\ddag"),W(Je,ee,Ue,"\u2021","\\textdaggerdbl"),W(j,ee,It,"\u23B1","\\rmoustache",!0),W(j,ee,Kt,"\u23B0","\\lmoustache",!0),W(j,ee,It,"\u27EF","\\rgroup",!0),W(j,ee,Kt,"\u27EE","\\lgroup",!0),W(j,ee,at,"\u2213","\\mp",!0),W(j,ee,at,"\u2296","\\ominus",!0),W(j,ee,at,"\u228E","\\uplus",!0),W(j,ee,at,"\u2293","\\sqcap",!0),W(j,ee,at,"\u2217","\\ast"),W(j,ee,at,"\u2294","\\sqcup",!0),W(j,ee,at,"\u25EF","\\bigcirc",!0),W(j,ee,at,"\u2219","\\bullet",!0),W(j,ee,at,"\u2021","\\ddagger"),W(j,ee,at,"\u2240","\\wr",!0),W(j,ee,at,"\u2A3F","\\amalg"),W(j,ee,at,"&","\\And"),W(j,ee,Me,"\u27F5","\\longleftarrow",!0),W(j,ee,Me,"\u21D0","\\Leftarrow",!0),W(j,ee,Me,"\u27F8","\\Longleftarrow",!0),W(j,ee,Me,"\u27F6","\\longrightarrow",!0),W(j,ee,Me,"\u21D2","\\Rightarrow",!0),W(j,ee,Me,"\u27F9","\\Longrightarrow",!0),W(j,ee,Me,"\u2194","\\leftrightarrow",!0),W(j,ee,Me,"\u27F7","\\longleftrightarrow",!0),W(j,ee,Me,"\u21D4","\\Leftrightarrow",!0),W(j,ee,Me,"\u27FA","\\Longleftrightarrow",!0),W(j,ee,Me,"\u21A6","\\mapsto",!0),W(j,ee,Me,"\u27FC","\\longmapsto",!0),W(j,ee,Me,"\u2197","\\nearrow",!0),W(j,ee,Me,"\u21A9","\\hookleftarrow",!0),W(j,ee,Me,"\u21AA","\\hookrightarrow",!0),W(j,ee,Me,"\u2198","\\searrow",!0),W(j,ee,Me,"\u21BC","\\leftharpoonup",!0),W(j,ee,Me,"\u21C0","\\rightharpoonup",!0),W(j,ee,Me,"\u2199","\\swarrow",!0),W(j,ee,Me,"\u21BD","\\leftharpoondown",!0),W(j,ee,Me,"\u21C1","\\rightharpoondown",!0),W(j,ee,Me,"\u2196","\\nwarrow",!0),W(j,ee,Me,"\u21CC","\\rightleftharpoons",!0),W(j,Te,Me,"\u226E","\\nless",!0),W(j,Te,Me,"\uE010","\\@nleqslant"),W(j,Te,Me,"\uE011","\\@nleqq"),W(j,Te,Me,"\u2A87","\\lneq",!0),W(j,Te,Me,"\u2268","\\lneqq",!0),W(j,Te,Me,"\uE00C","\\@lvertneqq"),W(j,Te,Me,"\u22E6","\\lnsim",!0),W(j,Te,Me,"\u2A89","\\lnapprox",!0),W(j,Te,Me,"\u2280","\\nprec",!0),W(j,Te,Me,"\u22E0","\\npreceq",!0),W(j,Te,Me,"\u22E8","\\precnsim",!0),W(j,Te,Me,"\u2AB9","\\precnapprox",!0),W(j,Te,Me,"\u2241","\\nsim",!0),W(j,Te,Me,"\uE006","\\@nshortmid"),W(j,Te,Me,"\u2224","\\nmid",!0),W(j,Te,Me,"\u22AC","\\nvdash",!0),W(j,Te,Me,"\u22AD","\\nvDash",!0),W(j,Te,Me,"\u22EA","\\ntriangleleft"),W(j,Te,Me,"\u22EC","\\ntrianglelefteq",!0),W(j,Te,Me,"\u228A","\\subsetneq",!0),W(j,Te,Me,"\uE01A","\\@varsubsetneq"),W(j,Te,Me,"\u2ACB","\\subsetneqq",!0),W(j,Te,Me,"\uE017","\\@varsubsetneqq"),W(j,Te,Me,"\u226F","\\ngtr",!0),W(j,Te,Me,"\uE00F","\\@ngeqslant"),W(j,Te,Me,"\uE00E","\\@ngeqq"),W(j,Te,Me,"\u2A88","\\gneq",!0),W(j,Te,Me,"\u2269","\\gneqq",!0),W(j,Te,Me,"\uE00D","\\@gvertneqq"),W(j,Te,Me,"\u22E7","\\gnsim",!0),W(j,Te,Me,"\u2A8A","\\gnapprox",!0),W(j,Te,Me,"\u2281","\\nsucc",!0),W(j,Te,Me,"\u22E1","\\nsucceq",!0),W(j,Te,Me,"\u22E9","\\succnsim",!0),W(j,Te,Me,"\u2ABA","\\succnapprox",!0),W(j,Te,Me,"\u2246","\\ncong",!0),W(j,Te,Me,"\uE007","\\@nshortparallel"),W(j,Te,Me,"\u2226","\\nparallel",!0),W(j,Te,Me,"\u22AF","\\nVDash",!0),W(j,Te,Me,"\u22EB","\\ntriangleright"),W(j,Te,Me,"\u22ED","\\ntrianglerighteq",!0),W(j,Te,Me,"\uE018","\\@nsupseteqq"),W(j,Te,Me,"\u228B","\\supsetneq",!0),W(j,Te,Me,"\uE01B","\\@varsupsetneq"),W(j,Te,Me,"\u2ACC","\\supsetneqq",!0),W(j,Te,Me,"\uE019","\\@varsupsetneqq"),W(j,Te,Me,"\u22AE","\\nVdash",!0),W(j,Te,Me,"\u2AB5","\\precneqq",!0),W(j,Te,Me,"\u2AB6","\\succneqq",!0),W(j,Te,Me,"\uE016","\\@nsubseteqq"),W(j,Te,at,"\u22B4","\\unlhd"),W(j,Te,at,"\u22B5","\\unrhd"),W(j,Te,Me,"\u219A","\\nleftarrow",!0),W(j,Te,Me,"\u219B","\\nrightarrow",!0),W(j,Te,Me,"\u21CD","\\nLeftarrow",!0),W(j,Te,Me,"\u21CF","\\nRightarrow",!0),W(j,Te,Me,"\u21AE","\\nleftrightarrow",!0),W(j,Te,Me,"\u21CE","\\nLeftrightarrow",!0),W(j,Te,Me,"\u25B3","\\vartriangle"),W(j,Te,Ue,"\u210F","\\hslash"),W(j,Te,Ue,"\u25BD","\\triangledown"),W(j,Te,Ue,"\u25CA","\\lozenge"),W(j,Te,Ue,"\u24C8","\\circledS"),W(j,Te,Ue,"\xAE","\\circledR"),W(Je,Te,Ue,"\xAE","\\circledR"),W(j,Te,Ue,"\u2221","\\measuredangle",!0),W(j,Te,Ue,"\u2204","\\nexists"),W(j,Te,Ue,"\u2127","\\mho"),W(j,Te,Ue,"\u2132","\\Finv",!0),W(j,Te,Ue,"\u2141","\\Game",!0),W(j,Te,Ue,"\u2035","\\backprime"),W(j,Te,Ue,"\u25B2","\\blacktriangle"),W(j,Te,Ue,"\u25BC","\\blacktriangledown"),W(j,Te,Ue,"\u25A0","\\blacksquare"),W(j,Te,Ue,"\u29EB","\\blacklozenge"),W(j,Te,Ue,"\u2605","\\bigstar"),W(j,Te,Ue,"\u2222","\\sphericalangle",!0),W(j,Te,Ue,"\u2201","\\complement",!0),W(j,Te,Ue,"\xF0","\\eth",!0),W(Je,ee,Ue,"\xF0","\xF0"),W(j,Te,Ue,"\u2571","\\diagup"),W(j,Te,Ue,"\u2572","\\diagdown"),W(j,Te,Ue,"\u25A1","\\square"),W(j,Te,Ue,"\u25A1","\\Box"),W(j,Te,Ue,"\u25CA","\\Diamond"),W(j,Te,Ue,"\xA5","\\yen",!0),W(Je,Te,Ue,"\xA5","\\yen",!0),W(j,Te,Ue,"\u2713","\\checkmark",!0),W(Je,Te,Ue,"\u2713","\\checkmark"),W(j,Te,Ue,"\u2136","\\beth",!0),W(j,Te,Ue,"\u2138","\\daleth",!0),W(j,Te,Ue,"\u2137","\\gimel",!0),W(j,Te,Ue,"\u03DD","\\digamma",!0),W(j,Te,Ue,"\u03F0","\\varkappa"),W(j,Te,Kt,"\u250C","\\@ulcorner",!0),W(j,Te,It,"\u2510","\\@urcorner",!0),W(j,Te,Kt,"\u2514","\\@llcorner",!0),W(j,Te,It,"\u2518","\\@lrcorner",!0),W(j,Te,Me,"\u2266","\\leqq",!0),W(j,Te,Me,"\u2A7D","\\leqslant",!0),W(j,Te,Me,"\u2A95","\\eqslantless",!0),W(j,Te,Me,"\u2272","\\lesssim",!0),W(j,Te,Me,"\u2A85","\\lessapprox",!0),W(j,Te,Me,"\u224A","\\approxeq",!0),W(j,Te,at,"\u22D6","\\lessdot"),W(j,Te,Me,"\u22D8","\\lll",!0),W(j,Te,Me,"\u2276","\\lessgtr",!0),W(j,Te,Me,"\u22DA","\\lesseqgtr",!0),W(j,Te,Me,"\u2A8B","\\lesseqqgtr",!0),W(j,Te,Me,"\u2251","\\doteqdot"),W(j,Te,Me,"\u2253","\\risingdotseq",!0),W(j,Te,Me,"\u2252","\\fallingdotseq",!0),W(j,Te,Me,"\u223D","\\backsim",!0),W(j,Te,Me,"\u22CD","\\backsimeq",!0),W(j,Te,Me,"\u2AC5","\\subseteqq",!0),W(j,Te,Me,"\u22D0","\\Subset",!0),W(j,Te,Me,"\u228F","\\sqsubset",!0),W(j,Te,Me,"\u227C","\\preccurlyeq",!0),W(j,Te,Me,"\u22DE","\\curlyeqprec",!0),W(j,Te,Me,"\u227E","\\precsim",!0),W(j,Te,Me,"\u2AB7","\\precapprox",!0),W(j,Te,Me,"\u22B2","\\vartriangleleft"),W(j,Te,Me,"\u22B4","\\trianglelefteq"),W(j,Te,Me,"\u22A8","\\vDash",!0),W(j,Te,Me,"\u22AA","\\Vvdash",!0),W(j,Te,Me,"\u2323","\\smallsmile"),W(j,Te,Me,"\u2322","\\smallfrown"),W(j,Te,Me,"\u224F","\\bumpeq",!0),W(j,Te,Me,"\u224E","\\Bumpeq",!0),W(j,Te,Me,"\u2267","\\geqq",!0),W(j,Te,Me,"\u2A7E","\\geqslant",!0),W(j,Te,Me,"\u2A96","\\eqslantgtr",!0),W(j,Te,Me,"\u2273","\\gtrsim",!0),W(j,Te,Me,"\u2A86","\\gtrapprox",!0),W(j,Te,at,"\u22D7","\\gtrdot"),W(j,Te,Me,"\u22D9","\\ggg",!0),W(j,Te,Me,"\u2277","\\gtrless",!0),W(j,Te,Me,"\u22DB","\\gtreqless",!0),W(j,Te,Me,"\u2A8C","\\gtreqqless",!0),W(j,Te,Me,"\u2256","\\eqcirc",!0),W(j,Te,Me,"\u2257","\\circeq",!0),W(j,Te,Me,"\u225C","\\triangleq",!0),W(j,Te,Me,"\u223C","\\thicksim"),W(j,Te,Me,"\u2248","\\thickapprox"),W(j,Te,Me,"\u2AC6","\\supseteqq",!0),W(j,Te,Me,"\u22D1","\\Supset",!0),W(j,Te,Me,"\u2290","\\sqsupset",!0),W(j,Te,Me,"\u227D","\\succcurlyeq",!0),W(j,Te,Me,"\u22DF","\\curlyeqsucc",!0),W(j,Te,Me,"\u227F","\\succsim",!0),W(j,Te,Me,"\u2AB8","\\succapprox",!0),W(j,Te,Me,"\u22B3","\\vartriangleright"),W(j,Te,Me,"\u22B5","\\trianglerighteq"),W(j,Te,Me,"\u22A9","\\Vdash",!0),W(j,Te,Me,"\u2223","\\shortmid"),W(j,Te,Me,"\u2225","\\shortparallel"),W(j,Te,Me,"\u226C","\\between",!0),W(j,Te,Me,"\u22D4","\\pitchfork",!0),W(j,Te,Me,"\u221D","\\varpropto"),W(j,Te,Me,"\u25C0","\\blacktriangleleft"),W(j,Te,Me,"\u2234","\\therefore",!0),W(j,Te,Me,"\u220D","\\backepsilon"),W(j,Te,Me,"\u25B6","\\blacktriangleright"),W(j,Te,Me,"\u2235","\\because",!0),W(j,Te,Me,"\u22D8","\\llless"),W(j,Te,Me,"\u22D9","\\gggtr"),W(j,Te,at,"\u22B2","\\lhd"),W(j,Te,at,"\u22B3","\\rhd"),W(j,Te,Me,"\u2242","\\eqsim",!0),W(j,ee,Me,"\u22C8","\\Join"),W(j,Te,Me,"\u2251","\\Doteq",!0),W(j,Te,at,"\u2214","\\dotplus",!0),W(j,Te,at,"\u2216","\\smallsetminus"),W(j,Te,at,"\u22D2","\\Cap",!0),W(j,Te,at,"\u22D3","\\Cup",!0),W(j,Te,at,"\u2A5E","\\doublebarwedge",!0),W(j,Te,at,"\u229F","\\boxminus",!0),W(j,Te,at,"\u229E","\\boxplus",!0),W(j,Te,at,"\u22C7","\\divideontimes",!0),W(j,Te,at,"\u22C9","\\ltimes",!0),W(j,Te,at,"\u22CA","\\rtimes",!0),W(j,Te,at,"\u22CB","\\leftthreetimes",!0),W(j,Te,at,"\u22CC","\\rightthreetimes",!0),W(j,Te,at,"\u22CF","\\curlywedge",!0),W(j,Te,at,"\u22CE","\\curlyvee",!0),W(j,Te,at,"\u229D","\\circleddash",!0),W(j,Te,at,"\u229B","\\circledast",!0),W(j,Te,at,"\u22C5","\\centerdot"),W(j,Te,at,"\u22BA","\\intercal",!0),W(j,Te,at,"\u22D2","\\doublecap"),W(j,Te,at,"\u22D3","\\doublecup"),W(j,Te,at,"\u22A0","\\boxtimes",!0),W(j,Te,Me,"\u21E2","\\dashrightarrow",!0),W(j,Te,Me,"\u21E0","\\dashleftarrow",!0),W(j,Te,Me,"\u21C7","\\leftleftarrows",!0),W(j,Te,Me,"\u21C6","\\leftrightarrows",!0),W(j,Te,Me,"\u21DA","\\Lleftarrow",!0),W(j,Te,Me,"\u219E","\\twoheadleftarrow",!0),W(j,Te,Me,"\u21A2","\\leftarrowtail",!0),W(j,Te,Me,"\u21AB","\\looparrowleft",!0),W(j,Te,Me,"\u21CB","\\leftrightharpoons",!0),W(j,Te,Me,"\u21B6","\\curvearrowleft",!0),W(j,Te,Me,"\u21BA","\\circlearrowleft",!0),W(j,Te,Me,"\u21B0","\\Lsh",!0),W(j,Te,Me,"\u21C8","\\upuparrows",!0),W(j,Te,Me,"\u21BF","\\upharpoonleft",!0),W(j,Te,Me,"\u21C3","\\downharpoonleft",!0),W(j,ee,Me,"\u22B6","\\origof",!0),W(j,ee,Me,"\u22B7","\\imageof",!0),W(j,Te,Me,"\u22B8","\\multimap",!0),W(j,Te,Me,"\u21AD","\\leftrightsquigarrow",!0),W(j,Te,Me,"\u21C9","\\rightrightarrows",!0),W(j,Te,Me,"\u21C4","\\rightleftarrows",!0),W(j,Te,Me,"\u21A0","\\twoheadrightarrow",!0),W(j,Te,Me,"\u21A3","\\rightarrowtail",!0),W(j,Te,Me,"\u21AC","\\looparrowright",!0),W(j,Te,Me,"\u21B7","\\curvearrowright",!0),W(j,Te,Me,"\u21BB","\\circlearrowright",!0),W(j,Te,Me,"\u21B1","\\Rsh",!0),W(j,Te,Me,"\u21CA","\\downdownarrows",!0),W(j,Te,Me,"\u21BE","\\upharpoonright",!0),W(j,Te,Me,"\u21C2","\\downharpoonright",!0),W(j,Te,Me,"\u21DD","\\rightsquigarrow",!0),W(j,Te,Me,"\u21DD","\\leadsto"),W(j,Te,Me,"\u21DB","\\Rrightarrow",!0),W(j,Te,Me,"\u21BE","\\restriction"),W(j,ee,Ue,"\u2018","`"),W(j,ee,Ue,"$","\\$"),W(Je,ee,Ue,"$","\\$"),W(Je,ee,Ue,"$","\\textdollar"),W(j,ee,Ue,"%","\\%"),W(Je,ee,Ue,"%","\\%"),W(j,ee,Ue,"_","\\_"),W(Je,ee,Ue,"_","\\_"),W(Je,ee,Ue,"_","\\textunderscore"),W(j,ee,Ue,"\u2220","\\angle",!0),W(j,ee,Ue,"\u221E","\\infty",!0),W(j,ee,Ue,"\u2032","\\prime"),W(j,ee,Ue,"\u25B3","\\triangle"),W(j,ee,Ue,"\u0393","\\Gamma",!0),W(j,ee,Ue,"\u0394","\\Delta",!0),W(j,ee,Ue,"\u0398","\\Theta",!0),W(j,ee,Ue,"\u039B","\\Lambda",!0),W(j,ee,Ue,"\u039E","\\Xi",!0),W(j,ee,Ue,"\u03A0","\\Pi",!0),W(j,ee,Ue,"\u03A3","\\Sigma",!0),W(j,ee,Ue,"\u03A5","\\Upsilon",!0),W(j,ee,Ue,"\u03A6","\\Phi",!0),W(j,ee,Ue,"\u03A8","\\Psi",!0),W(j,ee,Ue,"\u03A9","\\Omega",!0),W(j,ee,Ue,"A","\u0391"),W(j,ee,Ue,"B","\u0392"),W(j,ee,Ue,"E","\u0395"),W(j,ee,Ue,"Z","\u0396"),W(j,ee,Ue,"H","\u0397"),W(j,ee,Ue,"I","\u0399"),W(j,ee,Ue,"K","\u039A"),W(j,ee,Ue,"M","\u039C"),W(j,ee,Ue,"N","\u039D"),W(j,ee,Ue,"O","\u039F"),W(j,ee,Ue,"P","\u03A1"),W(j,ee,Ue,"T","\u03A4"),W(j,ee,Ue,"X","\u03A7"),W(j,ee,Ue,"\xAC","\\neg",!0),W(j,ee,Ue,"\xAC","\\lnot"),W(j,ee,Ue,"\u22A4","\\top"),W(j,ee,Ue,"\u22A5","\\bot"),W(j,ee,Ue,"\u2205","\\emptyset"),W(j,Te,Ue,"\u2205","\\varnothing"),W(j,ee,Ut,"\u03B1","\\alpha",!0),W(j,ee,Ut,"\u03B2","\\beta",!0),W(j,ee,Ut,"\u03B3","\\gamma",!0),W(j,ee,Ut,"\u03B4","\\delta",!0),W(j,ee,Ut,"\u03F5","\\epsilon",!0),W(j,ee,Ut,"\u03B6","\\zeta",!0),W(j,ee,Ut,"\u03B7","\\eta",!0),W(j,ee,Ut,"\u03B8","\\theta",!0),W(j,ee,Ut,"\u03B9","\\iota",!0),W(j,ee,Ut,"\u03BA","\\kappa",!0),W(j,ee,Ut,"\u03BB","\\lambda",!0),W(j,ee,Ut,"\u03BC","\\mu",!0),W(j,ee,Ut,"\u03BD","\\nu",!0),W(j,ee,Ut,"\u03BE","\\xi",!0),W(j,ee,Ut,"\u03BF","\\omicron",!0),W(j,ee,Ut,"\u03C0","\\pi",!0),W(j,ee,Ut,"\u03C1","\\rho",!0),W(j,ee,Ut,"\u03C3","\\sigma",!0),W(j,ee,Ut,"\u03C4","\\tau",!0),W(j,ee,Ut,"\u03C5","\\upsilon",!0),W(j,ee,Ut,"\u03D5","\\phi",!0),W(j,ee,Ut,"\u03C7","\\chi",!0),W(j,ee,Ut,"\u03C8","\\psi",!0),W(j,ee,Ut,"\u03C9","\\omega",!0),W(j,ee,Ut,"\u03B5","\\varepsilon",!0),W(j,ee,Ut,"\u03D1","\\vartheta",!0),W(j,ee,Ut,"\u03D6","\\varpi",!0),W(j,ee,Ut,"\u03F1","\\varrho",!0),W(j,ee,Ut,"\u03C2","\\varsigma",!0),W(j,ee,Ut,"\u03C6","\\varphi",!0),W(j,ee,at,"\u2217","*",!0),W(j,ee,at,"+","+"),W(j,ee,at,"\u2212","-",!0),W(j,ee,at,"\u22C5","\\cdot",!0),W(j,ee,at,"\u2218","\\circ",!0),W(j,ee,at,"\xF7","\\div",!0),W(j,ee,at,"\xB1","\\pm",!0),W(j,ee,at,"\xD7","\\times",!0),W(j,ee,at,"\u2229","\\cap",!0),W(j,ee,at,"\u222A","\\cup",!0),W(j,ee,at,"\u2216","\\setminus",!0),W(j,ee,at,"\u2227","\\land"),W(j,ee,at,"\u2228","\\lor"),W(j,ee,at,"\u2227","\\wedge",!0),W(j,ee,at,"\u2228","\\vee",!0),W(j,ee,Ue,"\u221A","\\surd"),W(j,ee,Kt,"\u27E8","\\langle",!0),W(j,ee,Kt,"\u2223","\\lvert"),W(j,ee,Kt,"\u2225","\\lVert"),W(j,ee,It,"?","?"),W(j,ee,It,"!","!"),W(j,ee,It,"\u27E9","\\rangle",!0),W(j,ee,It,"\u2223","\\rvert"),W(j,ee,It,"\u2225","\\rVert"),W(j,ee,Me,"=","="),W(j,ee,Me,":",":"),W(j,ee,Me,"\u2248","\\approx",!0),W(j,ee,Me,"\u2245","\\cong",!0),W(j,ee,Me,"\u2265","\\ge"),W(j,ee,Me,"\u2265","\\geq",!0),W(j,ee,Me,"\u2190","\\gets"),W(j,ee,Me,">","\\gt",!0),W(j,ee,Me,"\u2208","\\in",!0),W(j,ee,Me,"\uE020","\\@not"),W(j,ee,Me,"\u2282","\\subset",!0),W(j,ee,Me,"\u2283","\\supset",!0),W(j,ee,Me,"\u2286","\\subseteq",!0),W(j,ee,Me,"\u2287","\\supseteq",!0),W(j,Te,Me,"\u2288","\\nsubseteq",!0),W(j,Te,Me,"\u2289","\\nsupseteq",!0),W(j,ee,Me,"\u22A8","\\models"),W(j,ee,Me,"\u2190","\\leftarrow",!0),W(j,ee,Me,"\u2264","\\le"),W(j,ee,Me,"\u2264","\\leq",!0),W(j,ee,Me,"<","\\lt",!0),W(j,ee,Me,"\u2192","\\rightarrow",!0),W(j,ee,Me,"\u2192","\\to"),W(j,Te,Me,"\u2271","\\ngeq",!0),W(j,Te,Me,"\u2270","\\nleq",!0),W(j,ee,kr,"\xA0","\\ "),W(j,ee,kr,"\xA0","\\space"),W(j,ee,kr,"\xA0","\\nobreakspace"),W(Je,ee,kr,"\xA0","\\ "),W(Je,ee,kr,"\xA0"," "),W(Je,ee,kr,"\xA0","\\space"),W(Je,ee,kr,"\xA0","\\nobreakspace"),W(j,ee,kr,"","\\nobreak"),W(j,ee,kr,"","\\allowbreak"),W(j,ee,vr,",",","),W(j,ee,vr,";",";"),W(j,Te,at,"\u22BC","\\barwedge",!0),W(j,Te,at,"\u22BB","\\veebar",!0),W(j,ee,at,"\u2299","\\odot",!0),W(j,ee,at,"\u2295","\\oplus",!0),W(j,ee,at,"\u2297","\\otimes",!0),W(j,ee,Ue,"\u2202","\\partial",!0),W(j,ee,at,"\u2298","\\oslash",!0),W(j,Te,at,"\u229A","\\circledcirc",!0),W(j,Te,at,"\u22A1","\\boxdot",!0),W(j,ee,at,"\u25B3","\\bigtriangleup"),W(j,ee,at,"\u25BD","\\bigtriangledown"),W(j,ee,at,"\u2020","\\dagger"),W(j,ee,at,"\u22C4","\\diamond"),W(j,ee,at,"\u22C6","\\star"),W(j,ee,at,"\u25C3","\\triangleleft"),W(j,ee,at,"\u25B9","\\triangleright"),W(j,ee,Kt,"{","\\{"),W(Je,ee,Ue,"{","\\{"),W(Je,ee,Ue,"{","\\textbraceleft"),W(j,ee,It,"}","\\}"),W(Je,ee,Ue,"}","\\}"),W(Je,ee,Ue,"}","\\textbraceright"),W(j,ee,Kt,"{","\\lbrace"),W(j,ee,It,"}","\\rbrace"),W(j,ee,Kt,"[","\\lbrack",!0),W(Je,ee,Ue,"[","\\lbrack",!0),W(j,ee,It,"]","\\rbrack",!0),W(Je,ee,Ue,"]","\\rbrack",!0),W(j,ee,Kt,"(","\\lparen",!0),W(j,ee,It,")","\\rparen",!0),W(Je,ee,Ue,"<","\\textless",!0),W(Je,ee,Ue,">","\\textgreater",!0),W(j,ee,Kt,"\u230A","\\lfloor",!0),W(j,ee,It,"\u230B","\\rfloor",!0),W(j,ee,Kt,"\u2308","\\lceil",!0),W(j,ee,It,"\u2309","\\rceil",!0),W(j,ee,Ue,"\\","\\backslash"),W(j,ee,Ue,"\u2223","|"),W(j,ee,Ue,"\u2223","\\vert"),W(Je,ee,Ue,"|","\\textbar",!0),W(j,ee,Ue,"\u2225","\\|"),W(j,ee,Ue,"\u2225","\\Vert"),W(Je,ee,Ue,"\u2225","\\textbardbl"),W(Je,ee,Ue,"~","\\textasciitilde"),W(Je,ee,Ue,"\\","\\textbackslash"),W(Je,ee,Ue,"^","\\textasciicircum"),W(j,ee,Me,"\u2191","\\uparrow",!0),W(j,ee,Me,"\u21D1","\\Uparrow",!0),W(j,ee,Me,"\u2193","\\downarrow",!0),W(j,ee,Me,"\u21D3","\\Downarrow",!0),W(j,ee,Me,"\u2195","\\updownarrow",!0),W(j,ee,Me,"\u21D5","\\Updownarrow",!0),W(j,ee,Bt,"\u2210","\\coprod"),W(j,ee,Bt,"\u22C1","\\bigvee"),W(j,ee,Bt,"\u22C0","\\bigwedge"),W(j,ee,Bt,"\u2A04","\\biguplus"),W(j,ee,Bt,"\u22C2","\\bigcap"),W(j,ee,Bt,"\u22C3","\\bigcup"),W(j,ee,Bt,"\u222B","\\int"),W(j,ee,Bt,"\u222B","\\intop"),W(j,ee,Bt,"\u222C","\\iint"),W(j,ee,Bt,"\u222D","\\iiint"),W(j,ee,Bt,"\u220F","\\prod"),W(j,ee,Bt,"\u2211","\\sum"),W(j,ee,Bt,"\u2A02","\\bigotimes"),W(j,ee,Bt,"\u2A01","\\bigoplus"),W(j,ee,Bt,"\u2A00","\\bigodot"),W(j,ee,Bt,"\u222E","\\oint"),W(j,ee,Bt,"\u222F","\\oiint"),W(j,ee,Bt,"\u2230","\\oiiint"),W(j,ee,Bt,"\u2A06","\\bigsqcup"),W(j,ee,Bt,"\u222B","\\smallint"),W(Je,ee,At,"\u2026","\\textellipsis"),W(j,ee,At,"\u2026","\\mathellipsis"),W(Je,ee,At,"\u2026","\\ldots",!0),W(j,ee,At,"\u2026","\\ldots",!0),W(j,ee,At,"\u22EF","\\@cdots",!0),W(j,ee,At,"\u22F1","\\ddots",!0),W(j,ee,Ue,"\u22EE","\\varvdots"),W(Je,ee,Ue,"\u22EE","\\varvdots"),W(j,ee,bt,"\u02CA","\\acute"),W(j,ee,bt,"\u02CB","\\grave"),W(j,ee,bt,"\xA8","\\ddot"),W(j,ee,bt,"~","\\tilde"),W(j,ee,bt,"\u02C9","\\bar"),W(j,ee,bt,"\u02D8","\\breve"),W(j,ee,bt,"\u02C7","\\check"),W(j,ee,bt,"^","\\hat"),W(j,ee,bt,"\u20D7","\\vec"),W(j,ee,bt,"\u02D9","\\dot"),W(j,ee,bt,"\u02DA","\\mathring"),W(j,ee,Ut,"\uE131","\\@imath"),W(j,ee,Ut,"\uE237","\\@jmath"),W(j,ee,Ue,"\u0131","\u0131"),W(j,ee,Ue,"\u0237","\u0237"),W(Je,ee,Ue,"\u0131","\\i",!0),W(Je,ee,Ue,"\u0237","\\j",!0),W(Je,ee,Ue,"\xDF","\\ss",!0),W(Je,ee,Ue,"\xE6","\\ae",!0),W(Je,ee,Ue,"\u0153","\\oe",!0),W(Je,ee,Ue,"\xF8","\\o",!0),W(Je,ee,Ue,"\xC6","\\AE",!0),W(Je,ee,Ue,"\u0152","\\OE",!0),W(Je,ee,Ue,"\xD8","\\O",!0),W(Je,ee,bt,"\u02CA","\\'"),W(Je,ee,bt,"\u02CB","\\`"),W(Je,ee,bt,"\u02C6","\\^"),W(Je,ee,bt,"\u02DC","\\~"),W(Je,ee,bt,"\u02C9","\\="),W(Je,ee,bt,"\u02D8","\\u"),W(Je,ee,bt,"\u02D9","\\."),W(Je,ee,bt,"\xB8","\\c"),W(Je,ee,bt,"\u02DA","\\r"),W(Je,ee,bt,"\u02C7","\\v"),W(Je,ee,bt,"\xA8",'\\"'),W(Je,ee,bt,"\u02DD","\\H"),W(Je,ee,bt,"\u25EF","\\textcircled");let Bn={"--":!0,"---":!0,"``":!0,"''":!0};W(Je,ee,Ue,"\u2013","--",!0),W(Je,ee,Ue,"\u2013","\\textendash"),W(Je,ee,Ue,"\u2014","---",!0),W(Je,ee,Ue,"\u2014","\\textemdash"),W(Je,ee,Ue,"\u2018","`",!0),W(Je,ee,Ue,"\u2018","\\textquoteleft"),W(Je,ee,Ue,"\u2019","'",!0),W(Je,ee,Ue,"\u2019","\\textquoteright"),W(Je,ee,Ue,"\u201C","``",!0),W(Je,ee,Ue,"\u201C","\\textquotedblleft"),W(Je,ee,Ue,"\u201D","''",!0),W(Je,ee,Ue,"\u201D","\\textquotedblright"),W(j,ee,Ue,"\xB0","\\degree",!0),W(Je,ee,Ue,"\xB0","\\degree"),W(Je,ee,Ue,"\xB0","\\textdegree",!0),W(j,ee,Ue,"\xA3","\\pounds"),W(j,ee,Ue,"\xA3","\\mathsterling",!0),W(Je,ee,Ue,"\xA3","\\pounds"),W(Je,ee,Ue,"\xA3","\\textsterling",!0),W(j,Te,Ue,"\u2720","\\maltese"),W(Je,Te,Ue,"\u2720","\\maltese");let un='0123456789/@."';for(let E=0;E{let w=E.charCodeAt(0),L=E.charCodeAt(1),G=(w-55296)*1024+(L-56320)+65536;if(119808<=G&&G<120484){let Y=Math.floor((G-119808)/26);return qn[Y]}else if(120782<=G&&G<=120831){let Y=Math.floor((G-120782)/10);return Oe[Y]}else{if(G===120485||G===120486)return qn[0];if(120486{if(rt(E.classes)!==rt(w.classes)||E.skew!==w.skew||E.maxFontSize!==w.maxFontSize||E.italic!==0&&E.hasClass("mathnormal"))return!1;if(E.classes.length===1){let L=E.classes[0];if(L==="mbin"||L==="mord")return!1}for(let L of Object.keys(E.style))if(E.style[L]!==w.style[L])return!1;for(let L of Object.keys(w.style))if(E.style[L]!==w.style[L])return!1;return!0},Xl=E=>{for(let w=0;ww&&(w=Q.height),Q.depth>L&&(L=Q.depth),Q.maxFontSize>G&&(G=Q.maxFontSize)}E.height=w,E.depth=L,E.maxFontSize=G},_t=function(E,w,L,G){let Y=new ke(E,w,L,G);return Ic(Y),Y},Go=(E,w,L,G)=>new ke(E,w,L,G),Nt=function(E,w,L){let G=_t([E],[],w);return G.height=Math.max(L||w.fontMetrics().defaultRuleThickness,w.minRuleThickness),G.style.borderBottomWidth=Ge(G.height),G.maxFontSize=1,G},Ne=function(E,w,L,G){let Y=new xe(E,w,L,G);return Ic(Y),Y},et=function(E){let w=new de(E);return Ic(w),w},Tt=function(E,w){return E instanceof de?_t([],[E],w):E},Zt=function(E){if(E.positionType==="individualShift"){let L=E.children,G=[L[0]],Y=-L[0].shift-L[0].elem.depth,Q=Y;for(let ae=1;ae{let L=_t(["mspace"],[],w),G=Ye(E,w);return L.style.marginRight=Ge(G),L},kn=(E,w,L)=>{let G,Y;switch(E){case"amsrm":G="AMS";break;case"textrm":G="Main";break;case"textsf":G="SansSerif";break;case"texttt":G="Typewriter";break;default:G=E}return w==="textbf"&&L==="textit"?Y="BoldItalic":w==="textbf"?Y="Bold":L==="textit"?Y="Italic":Y="Regular",G+"-"+Y},jn={mathbf:{variant:"bold",fontName:"Main-Bold"},mathrm:{variant:"normal",fontName:"Main-Regular"},textit:{variant:"italic",fontName:"Main-Italic"},mathit:{variant:"italic",fontName:"Main-Italic"},mathnormal:{variant:"italic",fontName:"Math-Italic"},mathsfit:{variant:"sans-serif-italic",fontName:"SansSerif-Italic"},mathbb:{variant:"double-struck",fontName:"AMS-Regular"},mathcal:{variant:"script",fontName:"Caligraphic-Regular"},mathfrak:{variant:"fraktur",fontName:"Fraktur-Regular"},mathscr:{variant:"script",fontName:"Script-Regular"},mathsf:{variant:"sans-serif",fontName:"SansSerif-Regular"},mathtt:{variant:"monospace",fontName:"Typewriter-Regular"}},Ia={vec:["vec",.471,.714],oiintSize1:["oiintSize1",.957,.499],oiintSize2:["oiintSize2",1.472,.659],oiiintSize1:["oiiintSize1",1.304,.499],oiiintSize2:["oiiintSize2",1.98,.659]},Kn=function(E,w){let[L,G,Y]=Ia[E],Q=new Ee(L),ae=new we([Q],{width:Ge(G),height:Ge(Y),style:"width:"+Ge(G),viewBox:"0 0 "+1e3*G+" "+1e3*Y,preserveAspectRatio:"xMinYMin"}),be=Go(["overlay"],[ae],w);return be.height=Y,be.style.height=Ge(Y),be.style.width=Ge(G),be},Vr={number:3,unit:"mu"},Un={number:4,unit:"mu"},xl={number:5,unit:"mu"},no={mord:{mop:Vr,mbin:Un,mrel:xl,minner:Vr},mop:{mord:Vr,mop:Vr,mrel:xl,minner:Vr},mbin:{mord:Un,mop:Un,mopen:Un,minner:Un},mrel:{mord:xl,mop:xl,mopen:xl,minner:xl},mopen:{},mclose:{mop:Vr,mbin:Un,mrel:xl,minner:Vr},mpunct:{mord:Vr,mop:Vr,mrel:xl,mopen:Vr,mclose:Vr,mpunct:Vr,minner:Vr},minner:{mord:Vr,mop:Vr,mbin:Un,mrel:xl,mopen:Vr,mpunct:Vr,minner:Vr}},yOe={mord:{mop:Vr},mop:{mord:Vr,mop:Vr},mbin:{},mrel:{},mopen:{},mclose:{mop:Vr},mpunct:{},minner:{mop:Vr}},Ij={},Tw={},Ew={};function Qt(E){let{type:w,names:L,props:G,handler:Y,htmlBuilder:Q,mathmlBuilder:ae}=E,be={type:w,numArgs:G.numArgs,argTypes:G.argTypes,allowedInArgument:!!G.allowedInArgument,allowedInText:!!G.allowedInText,allowedInMath:G.allowedInMath===void 0?!0:G.allowedInMath,numOptionalArgs:G.numOptionalArgs||0,infix:!!G.infix,primitive:!!G.primitive,handler:Y};for(let Ie=0;Ie{let ct=it.classes[0],pt=$e.classes[0];ct==="mbin"&&xOe.has(pt)?it.classes[0]="mord":pt==="mbin"&&vOe.has(ct)&&($e.classes[0]="mord")},{node:ae},be,Ie),bD(Y,($e,it)=>{var ct,pt;let wt=kD(it),Et=kD($e),Jt=wt&&Et?$e.hasClass("mtight")?(ct=yOe[wt])==null?void 0:ct[Et]:(pt=no[wt])==null?void 0:pt[Et]:null;if(Jt)return Er(Jt,Q)},{node:ae},be,Ie),Y},bD=function(E,w,L,G,Y){G&&E.push(G);let Q=0;for(;Qit=>{E.splice($e+1,0,it),Q++})(Q)}G&&E.pop()},Mj=function(E){return E instanceof de||E instanceof xe||E instanceof ke&&E.hasClass("enclosing")?E:null},wD=function(E,w){let L=Mj(E);if(L){let G=L.children;if(G.length){if(w==="right")return wD(G[G.length-1],"right");if(w==="left")return wD(G[0],"left")}}return E},kD=function(E,w){if(!E)return null;w&&(E=wD(E,w));let L=E.classes[0];return wOe[L]||null},Sb=function(E,w){let L=["nulldelimiter"].concat(E.baseSizingClasses());return _t(w.concat(L))},Tn=function(E,w,L){if(!E)return _t();if(Tw[E.type]){let G=Tw[E.type](E,w);if(L&&w.size!==L.size){G=_t(w.sizingClasses(L),[G],w);let Y=w.sizeMultiplier/L.sizeMultiplier;G.height*=Y,G.depth*=Y}return G}else throw new n("Got group of unknown type: '"+E.type+"'")};function Cw(E,w){let L=_t(["base"],E,w),G=_t(["strut"]);return G.style.height=Ge(L.height+L.depth),L.depth&&(G.style.verticalAlign=Ge(-L.depth)),L.children.unshift(G),L}function TD(E,w){let L=null;E.length===1&&E[0].type==="tag"&&(L=E[0].tag,E=E[0].body);let G=Ma(E,w,"root"),Y;G.length===2&&G[1].hasClass("tag")&&(Y=G.pop());let Q=[],ae=[];for(let $e=0;$e0&&(Q.push(Cw(ae,w)),ae=[]),Q.push(G[$e]));ae.length>0&&Q.push(Cw(ae,w));let be;L?(be=Cw(Ma(L,w,!0),w),be.classes=["tag"],Q.push(be)):Y&&Q.push(Y);let Ie=_t(["katex-html"],Q);if(Ie.setAttribute("aria-hidden","true"),be){let $e=be.children[0];$e.style.height=Ge(Ie.height+Ie.depth),Ie.depth&&($e.style.verticalAlign=Ge(-Ie.depth))}return Ie}function Nj(E){return new de(E)}class zt{constructor(w,L,G){this.type=void 0,this.attributes=void 0,this.children=void 0,this.classes=void 0,this.type=w,this.attributes={},this.children=L||[],this.classes=G||[]}setAttribute(w,L){this.attributes[w]=L}getAttribute(w){return this.attributes[w]}toNode(){let w=document.createElementNS("http://www.w3.org/1998/Math/MathML",this.type);for(let L in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,L)&&w.setAttribute(L,this.attributes[L]);this.classes.length>0&&(w.className=rt(this.classes));for(let L=0;L0&&(w+=' class ="'+l(rt(this.classes))+'"'),w+=">";for(let L=0;L",w}toText(){return this.children.map(w=>w.toText()).join("")}}class ma{constructor(w){this.text=void 0,this.text=w}toNode(){return document.createTextNode(this.text)}toMarkup(){return l(this.toText())}toText(){return this.text}}class Oj{constructor(w){this.width=void 0,this.character=void 0,this.width=w,w>=.05555&&w<=.05556?this.character="\u200A":w>=.1666&&w<=.1667?this.character="\u2009":w>=.2222&&w<=.2223?this.character="\u2005":w>=.2777&&w<=.2778?this.character="\u2005\u200A":w>=-.05556&&w<=-.05555?this.character="\u200A\u2063":w>=-.1667&&w<=-.1666?this.character="\u2009\u2063":w>=-.2223&&w<=-.2222?this.character="\u205F\u2063":w>=-.2778&&w<=-.2777?this.character="\u2005\u2063":this.character=null}toNode(){if(this.character)return document.createTextNode(this.character);{let w=document.createElementNS("http://www.w3.org/1998/Math/MathML","mspace");return w.setAttribute("width",Ge(this.width)),w}}toMarkup(){return this.character?""+this.character+"":''}toText(){return this.character?this.character:" "}}let kOe=new Set(["\\imath","\\jmath"]),TOe=new Set(["mrow","mtable"]),jl=function(E,w,L){return yt[w][E]&&yt[w][E].replace&&E.charCodeAt(0)!==55349&&!(Bn.hasOwnProperty(E)&&L&&(L.fontFamily&&L.fontFamily.slice(4,6)==="tt"||L.font&&L.font.slice(4,6)==="tt"))&&(E=yt[w][E].replace),new ma(E)},ED=function(E){return E.length===1?E[0]:new zt("mrow",E)},EOe={mathit:"italic",boldsymbol:E=>E.type==="textord"?"bold":"bold-italic",mathbf:"bold",mathbb:"double-struck",mathsfit:"sans-serif-italic",mathfrak:"fraktur",mathscr:"script",mathcal:"script",mathsf:"sans-serif",mathtt:"monospace"},SD=(E,w)=>{if(E.mode==="text"){if(w.fontFamily==="texttt")return"monospace";if(w.fontFamily==="textsf")return w.fontShape==="textit"&&w.fontWeight==="textbf"?"sans-serif-bold-italic":w.fontShape==="textit"?"sans-serif-italic":w.fontWeight==="textbf"?"bold-sans-serif":"sans-serif";if(w.fontShape==="textit"&&w.fontWeight==="textbf")return"bold-italic";if(w.fontShape==="textit")return"italic";if(w.fontWeight==="textbf")return"bold"}let L=w.font;if(!L||L==="mathnormal")return null;let G=E.mode,Y=EOe[L];if(Y)return typeof Y=="function"?Y(E):Y;let Q=E.text;if(kOe.has(Q))return null;if(yt[G][Q]){let be=yt[G][Q].replace;be&&(Q=be)}let ae=jn[L].fontName;return mt(Q,ae,G)?jn[L].variant:null};function CD(E){if(!E)return!1;if(E.type==="mi"&&E.children.length===1){let w=E.children[0];return w instanceof ma&&w.text==="."}else if(E.type==="mo"&&E.children.length===1&&E.getAttribute("separator")==="true"&&E.getAttribute("lspace")==="0em"&&E.getAttribute("rspace")==="0em"){let w=E.children[0];return w instanceof ma&&w.text===","}else return!1}let bl=function(E,w,L){if(E.length===1){let Q=Zn(E[0],w);return L&&Q instanceof zt&&Q.type==="mo"&&(Q.setAttribute("lspace","0em"),Q.setAttribute("rspace","0em")),[Q]}let G=[],Y;for(let Q=0;Q=1&&(Y.type==="mn"||CD(Y))){let be=ae.children[0];be instanceof zt&&be.type==="mn"&&(be.children=[...Y.children,...be.children],G.pop())}else if(Y.type==="mi"&&Y.children.length===1){let be=Y.children[0];if(be instanceof ma&&be.text==="\u0338"&&(ae.type==="mo"||ae.type==="mi"||ae.type==="mn")){let Ie=ae.children[0];Ie instanceof ma&&Ie.text.length>0&&(Ie.text=Ie.text.slice(0,1)+"\u0338"+Ie.text.slice(1),G.pop())}}}G.push(ae),Y=ae}return G},Df=function(E,w,L){return ED(bl(E,w,L))},Zn=function(E,w){if(!E)return new zt("mrow");if(Ew[E.type])return Ew[E.type](E,w);throw new n("Got group of unknown type: '"+E.type+"'")};function Pj(E,w,L,G,Y){let Q=bl(E,L),ae;Q.length===1&&Q[0]instanceof zt&&TOe.has(Q[0].type)?ae=Q[0]:ae=new zt("mrow",Q);let be=new zt("annotation",[new ma(w)]);be.setAttribute("encoding","application/x-tex");let Ie=new zt("semantics",[ae,be]),$e=new zt("math",[Ie]);return $e.setAttribute("xmlns","http://www.w3.org/1998/Math/MathML"),G&&$e.setAttribute("display","block"),_t([Y?"katex":"katex-mathml"],[$e])}let SOe=[[1,1,1],[2,1,1],[3,1,1],[4,2,1],[5,2,1],[6,3,1],[7,4,2],[8,6,3],[9,7,6],[10,8,7],[11,10,9]],Bj=[.5,.6,.7,.8,.9,1,1.2,1.44,1.728,2.074,2.488],Fj=function(E,w){return w.size<2?E:SOe[E-1][w.size-1]};class ch{constructor(w){this.style=void 0,this.color=void 0,this.size=void 0,this.textSize=void 0,this.phantom=void 0,this.font=void 0,this.fontFamily=void 0,this.fontWeight=void 0,this.fontShape=void 0,this.sizeMultiplier=void 0,this.maxSize=void 0,this.minRuleThickness=void 0,this._fontMetrics=void 0,this.style=w.style,this.color=w.color,this.size=w.size||ch.BASESIZE,this.textSize=w.textSize||this.size,this.phantom=!!w.phantom,this.font=w.font||"",this.fontFamily=w.fontFamily||"",this.fontWeight=w.fontWeight||"",this.fontShape=w.fontShape||"",this.sizeMultiplier=Bj[this.size-1],this.maxSize=w.maxSize,this.minRuleThickness=w.minRuleThickness,this._fontMetrics=void 0}extend(w){let L={style:this.style,size:this.size,textSize:this.textSize,color:this.color,phantom:this.phantom,font:this.font,fontFamily:this.fontFamily,fontWeight:this.fontWeight,fontShape:this.fontShape,maxSize:this.maxSize,minRuleThickness:this.minRuleThickness};return Object.assign(L,w),new ch(L)}havingStyle(w){return this.style===w?this:this.extend({style:w,size:Fj(this.textSize,w)})}havingCrampedStyle(){return this.havingStyle(this.style.cramp())}havingSize(w){return this.size===w&&this.textSize===w?this:this.extend({style:this.style.text(),size:w,textSize:w,sizeMultiplier:Bj[w-1]})}havingBaseStyle(w){w=w||this.style.text();let L=Fj(ch.BASESIZE,w);return this.size===L&&this.textSize===ch.BASESIZE&&this.style===w?this:this.extend({style:w,size:L})}havingBaseSizing(){let w;switch(this.style.id){case 4:case 5:w=3;break;case 6:case 7:w=1;break;default:w=6}return this.extend({style:this.style.text(),size:w})}withColor(w){return this.extend({color:w})}withPhantom(){return this.extend({phantom:!0})}withFont(w){return this.extend({font:w})}withTextFontFamily(w){return this.extend({fontFamily:w,font:""})}withTextFontWeight(w){return this.extend({fontWeight:w,font:""})}withTextFontShape(w){return this.extend({fontShape:w,font:""})}sizingClasses(w){return w.size!==this.size?["sizing","reset-size"+w.size,"size"+this.size]:[]}baseSizingClasses(){return this.size!==ch.BASESIZE?["sizing","reset-size"+this.size,"size"+ch.BASESIZE]:[]}fontMetrics(){return this._fontMetrics||(this._fontMetrics=Dt(this.size)),this._fontMetrics}getColor(){return this.phantom?"transparent":this.color}}ch.BASESIZE=6;var COe=ch;let zj=function(E){return new COe({style:E.displayMode?z.DISPLAY:z.TEXT,maxSize:E.maxSize,minRuleThickness:E.minRuleThickness})},$j=function(E,w){if(w.displayMode){let L=["katex-display"];w.leqno&&L.push("leqno"),w.fleqn&&L.push("fleqn"),E=_t(L,[E])}return E},_Oe=function(E,w,L){let G=zj(L),Y;if(L.output==="mathml")return Pj(E,w,G,L.displayMode,!0);if(L.output==="html"){let Q=TD(E,G);Y=_t(["katex"],[Q])}else{let Q=Pj(E,w,G,L.displayMode,!1),ae=TD(E,G);Y=_t(["katex"],[Q,ae])}return $j(Y,L)},AOe=function(E,w,L){let G=zj(L),Y=TD(E,G),Q=_t(["katex"],[Y]);return $j(Q,L)};var FIt=null;let LOe={widehat:"^",widecheck:"\u02C7",widetilde:"~",utilde:"~",overleftarrow:"\u2190",underleftarrow:"\u2190",xleftarrow:"\u2190",overrightarrow:"\u2192",underrightarrow:"\u2192",xrightarrow:"\u2192",underbrace:"\u23DF",overbrace:"\u23DE",underbracket:"\u23B5",overbracket:"\u23B4",overgroup:"\u23E0",undergroup:"\u23E1",overleftrightarrow:"\u2194",underleftrightarrow:"\u2194",xleftrightarrow:"\u2194",Overrightarrow:"\u21D2",xRightarrow:"\u21D2",overleftharpoon:"\u21BC",xleftharpoonup:"\u21BC",overrightharpoon:"\u21C0",xrightharpoonup:"\u21C0",xLeftarrow:"\u21D0",xLeftrightarrow:"\u21D4",xhookleftarrow:"\u21A9",xhookrightarrow:"\u21AA",xmapsto:"\u21A6",xrightharpoondown:"\u21C1",xleftharpoondown:"\u21BD",xrightleftharpoons:"\u21CC",xleftrightharpoons:"\u21CB",xtwoheadleftarrow:"\u219E",xtwoheadrightarrow:"\u21A0",xlongequal:"=",xtofrom:"\u21C4",xrightleftarrows:"\u21C4",xrightequilibrium:"\u21CC",xleftequilibrium:"\u21CB","\\cdrightarrow":"\u2192","\\cdleftarrow":"\u2190","\\cdlongequal":"="},_w=function(E){let w=new zt("mo",[new ma(LOe[E.replace(/^\\/,"")])]);return w.setAttribute("stretchy","true"),w},ROe={overrightarrow:[["rightarrow"],.888,522,"xMaxYMin"],overleftarrow:[["leftarrow"],.888,522,"xMinYMin"],underrightarrow:[["rightarrow"],.888,522,"xMaxYMin"],underleftarrow:[["leftarrow"],.888,522,"xMinYMin"],xrightarrow:[["rightarrow"],1.469,522,"xMaxYMin"],"\\cdrightarrow":[["rightarrow"],3,522,"xMaxYMin"],xleftarrow:[["leftarrow"],1.469,522,"xMinYMin"],"\\cdleftarrow":[["leftarrow"],3,522,"xMinYMin"],Overrightarrow:[["doublerightarrow"],.888,560,"xMaxYMin"],xRightarrow:[["doublerightarrow"],1.526,560,"xMaxYMin"],xLeftarrow:[["doubleleftarrow"],1.526,560,"xMinYMin"],overleftharpoon:[["leftharpoon"],.888,522,"xMinYMin"],xleftharpoonup:[["leftharpoon"],.888,522,"xMinYMin"],xleftharpoondown:[["leftharpoondown"],.888,522,"xMinYMin"],overrightharpoon:[["rightharpoon"],.888,522,"xMaxYMin"],xrightharpoonup:[["rightharpoon"],.888,522,"xMaxYMin"],xrightharpoondown:[["rightharpoondown"],.888,522,"xMaxYMin"],xlongequal:[["longequal"],.888,334,"xMinYMin"],"\\cdlongequal":[["longequal"],3,334,"xMinYMin"],xtwoheadleftarrow:[["twoheadleftarrow"],.888,334,"xMinYMin"],xtwoheadrightarrow:[["twoheadrightarrow"],.888,334,"xMaxYMin"],overleftrightarrow:[["leftarrow","rightarrow"],.888,522],overbrace:[["leftbrace","midbrace","rightbrace"],1.6,548],underbrace:[["leftbraceunder","midbraceunder","rightbraceunder"],1.6,548],underleftrightarrow:[["leftarrow","rightarrow"],.888,522],xleftrightarrow:[["leftarrow","rightarrow"],1.75,522],xLeftrightarrow:[["doubleleftarrow","doublerightarrow"],1.75,560],xrightleftharpoons:[["leftharpoondownplus","rightharpoonplus"],1.75,716],xleftrightharpoons:[["leftharpoonplus","rightharpoondownplus"],1.75,716],xhookleftarrow:[["leftarrow","righthook"],1.08,522],xhookrightarrow:[["lefthook","rightarrow"],1.08,522],overlinesegment:[["leftlinesegment","rightlinesegment"],.888,522],underlinesegment:[["leftlinesegment","rightlinesegment"],.888,522],overbracket:[["leftbracketover","rightbracketover"],1.6,440],underbracket:[["leftbracketunder","rightbracketunder"],1.6,410],overgroup:[["leftgroup","rightgroup"],.888,342],undergroup:[["leftgroupunder","rightgroupunder"],.888,342],xmapsto:[["leftmapsto","rightarrow"],1.5,522],xtofrom:[["leftToFrom","rightToFrom"],1.75,528],xrightleftarrows:[["baraboveleftarrow","rightarrowabovebar"],1.75,901],xrightequilibrium:[["baraboveshortleftharpoon","rightharpoonaboveshortbar"],1.75,716],xleftequilibrium:[["shortbaraboveleftharpoon","shortrightharpoonabovebar"],1.75,716]},DOe=new Set(["widehat","widecheck","widetilde","utilde"]),Aw=function(E,w){function L(){let ae=4e5,be=E.label.slice(1);if(DOe.has(be)&&"base"in E){let Ie=E.base.type==="ordgroup"?E.base.body.length:1,$e,it,ct;if(Ie>5)be==="widehat"||be==="widecheck"?($e=420,ae=2364,ct=.42,it=be+"4"):($e=312,ae=2340,ct=.34,it="tilde4");else{let Et=[1,1,2,2,3,3][Ie];be==="widehat"||be==="widecheck"?(ae=[0,1062,2364,2364,2364][Et],$e=[0,239,300,360,420][Et],ct=[0,.24,.3,.3,.36,.42][Et],it=be+Et):(ae=[0,600,1033,2339,2340][Et],$e=[0,260,286,306,312][Et],ct=[0,.26,.286,.3,.306,.34][Et],it="tilde"+Et)}let pt=new Ee(it),wt=new we([pt],{width:"100%",height:Ge(ct),viewBox:"0 0 "+ae+" "+$e,preserveAspectRatio:"none"});return{span:Go([],[wt],w),minWidth:0,height:ct}}else{let Ie=[],$e=ROe[be];if(!$e)throw new Error('No SVG data for "'+be+'".');let[it,ct,pt]=$e,wt=pt/1e3,Et=it.length,Jt,zr;if(Et===1){if($e.length!==4)throw new Error('Expected 4-tuple for single-path SVG data "'+be+'".');Jt=["hide-tail"],zr=[$e[3]]}else if(Et===2)Jt=["halfarrow-left","halfarrow-right"],zr=["xMinYMin","xMaxYMin"];else if(Et===3)Jt=["brace-left","brace-center","brace-right"],zr=["xMinYMin","xMidYMin","xMaxYMin"];else throw new Error(`Correct katexImagesData or update code here to support + `+Et+" children.");for(let Lr=0;Lr0&&(G.style.minWidth=Ge(Y)),G},IOe=function(E,w,L,G,Y){let Q,ae=E.height+E.depth+L+G;if(/fbox|color|angl/.test(w)){if(Q=_t(["stretchy",w],[],Y),w==="fbox"){let be=Y.color&&Y.getColor();be&&(Q.style.borderColor=be)}}else{let be=[];/^[bx]cancel$/.test(w)&&be.push(new Ke({x1:"0",y1:"0",x2:"100%",y2:"100%","stroke-width":"0.046em"})),/^x?cancel$/.test(w)&&be.push(new Ke({x1:"0",y1:"100%",x2:"100%",y2:"0","stroke-width":"0.046em"}));let Ie=new we(be,{width:"100%",height:Ge(ae)});Q=Go([],[Ie],Y)}return Q.height=ae,Q.style.height=Ge(ae),Q},MOe={bin:1,close:1,inner:1,open:1,punct:1,rel:1},NOe={"accent-token":1,mathord:1,"op-token":1,spacing:1,textord:1};function OOe(E){return E in MOe}function Fr(E,w){if(!E||E.type!==w)throw new Error("Expected node of type "+w+", but got "+(E?"node of type "+E.type:String(E)));return E}function Lw(E){let w=Rw(E);if(!w)throw new Error("Expected node of symbol group type, but got "+(E?"node of type "+E.type:String(E)));return w}function Rw(E){return E&&(E.type==="atom"||NOe.hasOwnProperty(E.type))?E:null}let Gj=E=>{if(E instanceof K)return E;if(nt(E)&&E.children.length===1)return Gj(E.children[0])},_D=(E,w)=>{let L,G,Y;E&&E.type==="supsub"?(G=Fr(E.base,"accent"),L=G.base,E.base=L,Y=De(Tn(E,w)),E.base=G):(G=Fr(E,"accent"),L=G.base);let Q=Tn(L,w.havingCrampedStyle()),ae=G.isShifty&&f(L),be=0;if(ae){var Ie,$e;be=(Ie=($e=Gj(Q))==null?void 0:$e.skew)!=null?Ie:0}let it=G.label==="\\c",ct=it?Q.height+Q.depth:Math.min(Q.height,w.fontMetrics().xHeight),pt;if(G.isStretchy)pt=Aw(G,w),pt=Ot({positionType:"firstBaseline",children:[{type:"elem",elem:Q},{type:"elem",elem:pt,wrapperClasses:["svg-align"],wrapperStyle:be>0?{width:"calc(100% - "+Ge(2*be)+")",marginLeft:Ge(2*be)}:void 0}]},w);else{let Et,Jt;G.label==="\\vec"?(Et=Kn("vec",w),Jt=Ia.vec[1]):(Et=uh({type:"textord",mode:G.mode,text:G.label},w,"textord"),Et=Be(Et),Et.italic=0,Jt=Et.width,it&&(ct+=Et.depth)),pt=_t(["accent-body"],[Et]);let zr=G.label==="\\textcircled";zr&&(pt.classes.push("accent-full"),ct=Q.height);let Lr=be;zr||(Lr-=Jt/2),pt.style.left=Ge(Lr),G.label==="\\textcircled"&&(pt.style.top=".2em"),pt=Ot({positionType:"firstBaseline",children:[{type:"elem",elem:Q},{type:"kern",size:-ct},{type:"elem",elem:pt}]},w)}let wt=_t(["mord","accent"],[pt],w);return Y?(Y.children[0]=wt,Y.height=Math.max(wt.height,Y.height),Y.classes[0]="mord",Y):wt},qj=(E,w)=>{let L=E.isStretchy?_w(E.label):new zt("mo",[jl(E.label,E.mode)]),G=new zt("mover",[Zn(E.base,w),L]);return G.setAttribute("accent","true"),G},POe=new RegExp(["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring"].map(E=>"\\"+E).join("|"));Qt({type:"accent",names:["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring","\\widecheck","\\widehat","\\widetilde","\\overrightarrow","\\overleftarrow","\\Overrightarrow","\\overleftrightarrow","\\overgroup","\\overlinesegment","\\overleftharpoon","\\overrightharpoon"],props:{numArgs:1},handler:(E,w)=>{let L=Sw(w[0]),G=!POe.test(E.funcName),Y=!G||E.funcName==="\\widehat"||E.funcName==="\\widetilde"||E.funcName==="\\widecheck";return{type:"accent",mode:E.parser.mode,label:E.funcName,isStretchy:G,isShifty:Y,base:L}},htmlBuilder:_D,mathmlBuilder:qj}),Qt({type:"accent",names:["\\'","\\`","\\^","\\~","\\=","\\u","\\.",'\\"',"\\c","\\r","\\H","\\v","\\textcircled"],props:{numArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:["primitive"]},handler:(E,w)=>{let L=w[0],G=E.parser.mode;return G==="math"&&(E.parser.settings.reportNonstrict("mathVsTextAccents","LaTeX's accent "+E.funcName+" works only in text mode"),G="text"),{type:"accent",mode:G,label:E.funcName,isStretchy:!1,isShifty:!0,base:L}},htmlBuilder:_D,mathmlBuilder:qj}),Qt({type:"accentUnder",names:["\\underleftarrow","\\underrightarrow","\\underleftrightarrow","\\undergroup","\\underlinesegment","\\utilde"],props:{numArgs:1},handler:(E,w)=>{let{parser:L,funcName:G}=E,Y=w[0];return{type:"accentUnder",mode:L.mode,label:G,base:Y}},htmlBuilder:(E,w)=>{let L=Tn(E.base,w),G=Aw(E,w),Y=E.label==="\\utilde"?.12:0,Q=Ot({positionType:"top",positionData:L.height,children:[{type:"elem",elem:G,wrapperClasses:["svg-align"]},{type:"kern",size:Y},{type:"elem",elem:L}]},w);return _t(["mord","accentunder"],[Q],w)},mathmlBuilder:(E,w)=>{let L=_w(E.label),G=new zt("munder",[Zn(E.base,w),L]);return G.setAttribute("accentunder","true"),G}});let Dw=E=>{let w=new zt("mpadded",E?[E]:[]);return w.setAttribute("width","+0.6em"),w.setAttribute("lspace","0.3em"),w};Qt({type:"xArrow",names:["\\xleftarrow","\\xrightarrow","\\xLeftarrow","\\xRightarrow","\\xleftrightarrow","\\xLeftrightarrow","\\xhookleftarrow","\\xhookrightarrow","\\xmapsto","\\xrightharpoondown","\\xrightharpoonup","\\xleftharpoondown","\\xleftharpoonup","\\xrightleftharpoons","\\xleftrightharpoons","\\xlongequal","\\xtwoheadrightarrow","\\xtwoheadleftarrow","\\xtofrom","\\xrightleftarrows","\\xrightequilibrium","\\xleftequilibrium","\\\\cdrightarrow","\\\\cdleftarrow","\\\\cdlongequal"],props:{numArgs:1,numOptionalArgs:1},handler(E,w,L){let{parser:G,funcName:Y}=E;return{type:"xArrow",mode:G.mode,label:Y,body:w[0],below:L[0]}},htmlBuilder(E,w){let L=w.style,G=w.havingStyle(L.sup()),Y=Tt(Tn(E.body,G,w),w),Q=E.label.slice(0,2)==="\\x"?"x":"cd";Y.classes.push(Q+"-arrow-pad");let ae;E.below&&(G=w.havingStyle(L.sub()),ae=Tt(Tn(E.below,G,w),w),ae.classes.push(Q+"-arrow-pad"));let be=Aw(E,w),Ie=-w.fontMetrics().axisHeight+.5*be.height,$e=-w.fontMetrics().axisHeight-.5*be.height-.111;(Y.depth>.25||E.label==="\\xleftequilibrium")&&($e-=Y.depth);let it;if(ae){let ct=-w.fontMetrics().axisHeight+ae.height+.5*be.height+.111;it=Ot({positionType:"individualShift",children:[{type:"elem",elem:Y,shift:$e},{type:"elem",elem:be,shift:Ie,wrapperClasses:["svg-align"]},{type:"elem",elem:ae,shift:ct}]},w)}else it=Ot({positionType:"individualShift",children:[{type:"elem",elem:Y,shift:$e},{type:"elem",elem:be,shift:Ie,wrapperClasses:["svg-align"]}]},w);return _t(["mrel","x-arrow"],[it],w)},mathmlBuilder(E,w){let L=_w(E.label);L.setAttribute("minsize",E.label.charAt(0)==="x"?"1.75em":"3.0em");let G;if(E.body){let Y=Dw(Zn(E.body,w));if(E.below){let Q=Dw(Zn(E.below,w));G=new zt("munderover",[L,Q,Y])}else G=new zt("mover",[L,Y])}else if(E.below){let Y=Dw(Zn(E.below,w));G=new zt("munder",[L,Y])}else G=Dw(),G=new zt("mover",[L,G]);return G}});function Uj(E,w){let L=Ma(E.body,w,!0);return _t([E.mclass],L,w)}function Hj(E,w){let L,G=bl(E.body,w);return E.mclass==="minner"?L=new zt("mpadded",G):E.mclass==="mord"?E.isCharacterBox?(L=G[0],L.type="mi"):L=new zt("mi",G):(E.isCharacterBox?(L=G[0],L.type="mo"):L=new zt("mo",G),E.mclass==="mbin"?(L.attributes.lspace="0.22em",L.attributes.rspace="0.22em"):E.mclass==="mpunct"?(L.attributes.lspace="0em",L.attributes.rspace="0.17em"):E.mclass==="mopen"||E.mclass==="mclose"?(L.attributes.lspace="0em",L.attributes.rspace="0em"):E.mclass==="minner"&&(L.attributes.lspace="0.0556em",L.attributes.width="+0.1111em")),L}Qt({type:"mclass",names:["\\mathord","\\mathbin","\\mathrel","\\mathopen","\\mathclose","\\mathpunct","\\mathinner"],props:{numArgs:1,primitive:!0},handler(E,w){let{parser:L,funcName:G}=E,Y=w[0];return{type:"mclass",mode:L.mode,mclass:"m"+G.slice(5),body:pa(Y),isCharacterBox:f(Y)}},htmlBuilder:Uj,mathmlBuilder:Hj});let Iw=E=>{let w=E.type==="ordgroup"&&E.body.length?E.body[0]:E;return w.type==="atom"&&(w.family==="bin"||w.family==="rel")?"m"+w.family:"mord"};Qt({type:"mclass",names:["\\@binrel"],props:{numArgs:2},handler(E,w){let{parser:L}=E;return{type:"mclass",mode:L.mode,mclass:Iw(w[0]),body:pa(w[1]),isCharacterBox:f(w[1])}}}),Qt({type:"mclass",names:["\\stackrel","\\overset","\\underset"],props:{numArgs:2},handler(E,w){let{parser:L,funcName:G}=E,Y=w[1],Q=w[0],ae;G!=="\\stackrel"?ae=Iw(Y):ae="mrel";let be={type:"op",mode:Y.mode,limits:!0,alwaysHandleSupSub:!0,parentIsSupSub:!1,symbol:!1,suppressBaseShift:G!=="\\stackrel",body:pa(Y)},Ie={type:"supsub",mode:Q.mode,base:be,sup:G==="\\underset"?null:Q,sub:G==="\\underset"?Q:null};return{type:"mclass",mode:L.mode,mclass:ae,body:[Ie],isCharacterBox:f(Ie)}},htmlBuilder:Uj,mathmlBuilder:Hj}),Qt({type:"pmb",names:["\\pmb"],props:{numArgs:1,allowedInText:!0},handler(E,w){let{parser:L}=E;return{type:"pmb",mode:L.mode,mclass:Iw(w[0]),body:pa(w[0])}},htmlBuilder(E,w){let L=Ma(E.body,w,!0),G=_t([E.mclass],L,w);return G.style.textShadow="0.02em 0.01em 0.04px",G},mathmlBuilder(E,w){let L=bl(E.body,w),G=new zt("mstyle",L);return G.setAttribute("style","text-shadow: 0.02em 0.01em 0.04px"),G}});let BOe={">":"\\\\cdrightarrow","<":"\\\\cdleftarrow","=":"\\\\cdlongequal",A:"\\uparrow",V:"\\downarrow","|":"\\Vert",".":"no arrow"},Vj=()=>({type:"styling",body:[],mode:"math",style:"display",resetFont:!0}),Wj=E=>E.type==="textord"&&E.text==="@",FOe=(E,w)=>(E.type==="mathord"||E.type==="atom")&&E.text===w;function zOe(E,w,L){let G=BOe[E];switch(G){case"\\\\cdrightarrow":case"\\\\cdleftarrow":return L.callFunction(G,[w[0]],[w[1]]);case"\\uparrow":case"\\downarrow":{let Y=L.callFunction("\\\\cdleft",[w[0]],[]),Q={type:"atom",text:G,mode:"math",family:"rel"},ae=L.callFunction("\\Big",[Q],[]),be=L.callFunction("\\\\cdright",[w[1]],[]),Ie={type:"ordgroup",mode:"math",body:[Y,ae,be]};return L.callFunction("\\\\cdparent",[Ie],[])}case"\\\\cdlongequal":return L.callFunction("\\\\cdlongequal",[],[]);case"\\Vert":{let Y={type:"textord",text:"\\Vert",mode:"math"};return L.callFunction("\\Big",[Y],[])}default:return{type:"textord",text:" ",mode:"math"}}}function $Oe(E){let w=[];for(E.gullet.beginGroup(),E.gullet.macros.set("\\cr","\\\\\\relax"),E.gullet.beginGroup();;){w.push(E.parseExpression(!1,"\\\\")),E.gullet.endGroup(),E.gullet.beginGroup();let Q=E.fetch().text;if(Q==="&"||Q==="\\\\")E.consume();else if(Q==="\\end"){w[w.length-1].length===0&&w.pop();break}else throw new n("Expected \\\\ or \\cr or \\end",E.nextToken)}let L=[],G=[L];for(let Q=0;QAV".includes($e))for(let wt=0;wt<2;wt++){let Et=!0;for(let Jt=Ie+1;JtAV=|." after @',ae[Ie]);let pt={type:"styling",body:[zOe($e,it,E)],mode:"math",style:"display",resetFont:!0};L.push(pt),be=Vj()}Q%2===0?L.push(be):L.shift(),L=[],G.push(L)}E.gullet.endGroup(),E.gullet.endGroup();let Y=new Array(G[0].length).fill({type:"align",align:"c",pregap:.25,postgap:.25});return{type:"array",mode:"math",body:G,arraystretch:1,addJot:!0,rowGaps:[null],cols:Y,colSeparationType:"CD",hLinesBeforeRow:new Array(G.length+1).fill([])}}Qt({type:"cdlabel",names:["\\\\cdleft","\\\\cdright"],props:{numArgs:1},handler(E,w){let{parser:L,funcName:G}=E;return{type:"cdlabel",mode:L.mode,side:G.slice(4),label:w[0]}},htmlBuilder(E,w){let L=w.havingStyle(w.style.sup()),G=Tt(Tn(E.label,L,w),w);return G.classes.push("cd-label-"+E.side),G.style.bottom=Ge(.8-G.depth),G.height=0,G.depth=0,G},mathmlBuilder(E,w){let L=new zt("mrow",[Zn(E.label,w)]);return L=new zt("mpadded",[L]),L.setAttribute("width","0"),E.side==="left"&&L.setAttribute("lspace","-1width"),L.setAttribute("voffset","0.7em"),L=new zt("mstyle",[L]),L.setAttribute("displaystyle","false"),L.setAttribute("scriptlevel","1"),L}}),Qt({type:"cdlabelparent",names:["\\\\cdparent"],props:{numArgs:1},handler(E,w){let{parser:L}=E;return{type:"cdlabelparent",mode:L.mode,fragment:w[0]}},htmlBuilder(E,w){let L=Tt(Tn(E.fragment,w),w);return L.classes.push("cd-vert-arrow"),L},mathmlBuilder(E,w){return new zt("mrow",[Zn(E.fragment,w)])}}),Qt({type:"textord",names:["\\@char"],props:{numArgs:1,allowedInText:!0},handler(E,w){let{parser:L}=E,Y=Fr(w[0],"ordgroup").body,Q="";for(let Ie=0;Ie=1114111)throw new n("\\@char with invalid code point "+Q);return ae<=65535?be=String.fromCharCode(ae):(ae-=65536,be=String.fromCharCode((ae>>10)+55296,(ae&1023)+56320)),{type:"textord",mode:L.mode,text:be}}});let Yj=(E,w)=>{let L=Ma(E.body,w.withColor(E.color),!1);return et(L)},Xj=(E,w)=>{let L=bl(E.body,w.withColor(E.color)),G=new zt("mstyle",L);return G.setAttribute("mathcolor",E.color),G};Qt({type:"color",names:["\\textcolor"],props:{numArgs:2,allowedInText:!0,argTypes:["color","original"]},handler(E,w){let{parser:L}=E,G=Fr(w[0],"color-token").color,Y=w[1];return{type:"color",mode:L.mode,color:G,body:pa(Y)}},htmlBuilder:Yj,mathmlBuilder:Xj}),Qt({type:"color",names:["\\color"],props:{numArgs:1,allowedInText:!0,argTypes:["color"]},handler(E,w){let{parser:L,breakOnTokenText:G}=E,Y=Fr(w[0],"color-token").color;L.gullet.macros.set("\\current@color",Y);let Q=L.parseExpression(!0,G);return{type:"color",mode:L.mode,color:Y,body:Q}},htmlBuilder:Yj,mathmlBuilder:Xj}),Qt({type:"cr",names:["\\\\"],props:{numArgs:0,numOptionalArgs:0,allowedInText:!0},handler(E,w,L){let{parser:G}=E,Y=G.gullet.future().text==="["?G.parseSizeGroup(!0):null,Q=!G.settings.displayMode||!G.settings.useStrictBehavior("newLineInDisplayMode","In LaTeX, \\\\ or \\newline does nothing in display mode");return{type:"cr",mode:G.mode,newLine:Q,size:Y&&Fr(Y,"size").value}},htmlBuilder(E,w){let L=_t(["mspace"],[],w);return E.newLine&&(L.classes.push("newline"),E.size&&(L.style.marginTop=Ge(Ye(E.size,w)))),L},mathmlBuilder(E,w){let L=new zt("mspace");return E.newLine&&(L.setAttribute("linebreak","newline"),E.size&&L.setAttribute("height",Ge(Ye(E.size,w)))),L}});let AD={"\\global":"\\global","\\long":"\\\\globallong","\\\\globallong":"\\\\globallong","\\def":"\\gdef","\\gdef":"\\gdef","\\edef":"\\xdef","\\xdef":"\\xdef","\\let":"\\\\globallet","\\futurelet":"\\\\globalfuture"},jj=E=>{let w=E.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(w))throw new n("Expected a control sequence",E);return w},GOe=E=>{let w=E.gullet.popToken();return w.text==="="&&(w=E.gullet.popToken(),w.text===" "&&(w=E.gullet.popToken())),w},Kj=(E,w,L,G)=>{let Y=E.gullet.macros.get(L.text);Y==null&&(L.noexpand=!0,Y={tokens:[L],numArgs:0,unexpandable:!E.gullet.isExpandable(L.text)}),E.gullet.macros.set(w,Y,G)};Qt({type:"internal",names:["\\global","\\long","\\\\globallong"],props:{numArgs:0,allowedInText:!0},handler(E){let{parser:w,funcName:L}=E;w.consumeSpaces();let G=w.fetch();if(AD[G.text])return(L==="\\global"||L==="\\\\globallong")&&(G.text=AD[G.text]),Fr(w.parseFunction(),"internal");throw new n("Invalid token after macro prefix",G)}}),Qt({type:"internal",names:["\\def","\\gdef","\\edef","\\xdef"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(E){let{parser:w,funcName:L}=E,G=w.gullet.popToken(),Y=G.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(Y))throw new n("Expected a control sequence",G);let Q=0,ae,be=[[]];for(;w.gullet.future().text!=="{";)if(G=w.gullet.popToken(),G.text==="#"){if(w.gullet.future().text==="{"){ae=w.gullet.future(),be[Q].push("{");break}if(G=w.gullet.popToken(),!/^[1-9]$/.test(G.text))throw new n('Invalid argument number "'+G.text+'"');if(parseInt(G.text)!==Q+1)throw new n('Argument number "'+G.text+'" out of order');Q++,be.push([])}else{if(G.text==="EOF")throw new n("Expected a macro definition");be[Q].push(G.text)}let{tokens:Ie}=w.gullet.consumeArg();return ae&&Ie.unshift(ae),(L==="\\edef"||L==="\\xdef")&&(Ie=w.gullet.expandTokens(Ie),Ie.reverse()),w.gullet.macros.set(Y,{tokens:Ie,numArgs:Q,delimiters:be},L===AD[L]),{type:"internal",mode:w.mode}}}),Qt({type:"internal",names:["\\let","\\\\globallet"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(E){let{parser:w,funcName:L}=E,G=jj(w.gullet.popToken());w.gullet.consumeSpaces();let Y=GOe(w);return Kj(w,G,Y,L==="\\\\globallet"),{type:"internal",mode:w.mode}}}),Qt({type:"internal",names:["\\futurelet","\\\\globalfuture"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(E){let{parser:w,funcName:L}=E,G=jj(w.gullet.popToken()),Y=w.gullet.popToken(),Q=w.gullet.popToken();return Kj(w,G,Q,L==="\\\\globalfuture"),w.gullet.pushToken(Q),w.gullet.pushToken(Y),{type:"internal",mode:w.mode}}});let Cb=function(E,w,L){let G=yt.math[E]&&yt.math[E].replace,Y=mt(G||E,w,L);if(!Y)throw new Error("Unsupported symbol "+E+" and font size "+w+".");return Y},LD=function(E,w,L,G){let Y=L.havingBaseStyle(w),Q=_t(G.concat(Y.sizingClasses(L)),[E],L),ae=Y.sizeMultiplier/L.sizeMultiplier;return Q.height*=ae,Q.depth*=ae,Q.maxFontSize=Y.sizeMultiplier,Q},Zj=function(E,w,L){let G=w.havingBaseStyle(L),Y=(1-w.sizeMultiplier/G.sizeMultiplier)*w.fontMetrics().axisHeight;E.classes.push("delimcenter"),E.style.top=Ge(Y),E.height-=Y,E.depth+=Y},qOe=function(E,w,L,G,Y,Q){let ae=ia(E,"Main-Regular",Y,G),be=LD(ae,w,G,Q);return L&&Zj(be,G,w),be},UOe=function(E,w,L,G){return ia(E,"Size"+w+"-Regular",L,G)},Qj=function(E,w,L,G,Y,Q){let ae=UOe(E,w,Y,G),be=LD(_t(["delimsizing","size"+w],[ae],G),z.TEXT,G,Q);return L&&Zj(be,G,z.TEXT),be},RD=function(E,w,L){let G;return w==="Size1-Regular"?G="delim-size1":G="delim-size4",{type:"elem",elem:_t(["delimsizinginner",G],[_t([],[ia(E,w,L)])])}},DD=function(E,w,L){let G=We["Size4-Regular"][E.charCodeAt(0)]?We["Size4-Regular"][E.charCodeAt(0)][4]:We["Size1-Regular"][E.charCodeAt(0)][4],Y=new Ee("inner",ne(E,Math.round(1e3*w))),Q=new we([Y],{width:Ge(G),height:Ge(w),style:"width:"+Ge(G),viewBox:"0 0 "+1e3*G+" "+Math.round(1e3*w),preserveAspectRatio:"xMinYMin"}),ae=Go([],[Q],L);return ae.height=w,ae.style.height=Ge(w),ae.style.width=Ge(G),{type:"elem",elem:ae}},ID=.008,Mw={type:"kern",size:-1*ID},HOe=new Set(["|","\\lvert","\\rvert","\\vert"]),VOe=new Set(["\\|","\\lVert","\\rVert","\\Vert"]),Jj=function(E,w,L,G,Y,Q){let ae,be,Ie,$e,it="",ct=0;ae=Ie=$e=E,be=null;let pt="Size1-Regular";E==="\\uparrow"?Ie=$e="\u23D0":E==="\\Uparrow"?Ie=$e="\u2016":E==="\\downarrow"?ae=Ie="\u23D0":E==="\\Downarrow"?ae=Ie="\u2016":E==="\\updownarrow"?(ae="\\uparrow",Ie="\u23D0",$e="\\downarrow"):E==="\\Updownarrow"?(ae="\\Uparrow",Ie="\u2016",$e="\\Downarrow"):HOe.has(E)?(Ie="\u2223",it="vert",ct=333):VOe.has(E)?(Ie="\u2225",it="doublevert",ct=556):E==="["||E==="\\lbrack"?(ae="\u23A1",Ie="\u23A2",$e="\u23A3",pt="Size4-Regular",it="lbrack",ct=667):E==="]"||E==="\\rbrack"?(ae="\u23A4",Ie="\u23A5",$e="\u23A6",pt="Size4-Regular",it="rbrack",ct=667):E==="\\lfloor"||E==="\u230A"?(Ie=ae="\u23A2",$e="\u23A3",pt="Size4-Regular",it="lfloor",ct=667):E==="\\lceil"||E==="\u2308"?(ae="\u23A1",Ie=$e="\u23A2",pt="Size4-Regular",it="lceil",ct=667):E==="\\rfloor"||E==="\u230B"?(Ie=ae="\u23A5",$e="\u23A6",pt="Size4-Regular",it="rfloor",ct=667):E==="\\rceil"||E==="\u2309"?(ae="\u23A4",Ie=$e="\u23A5",pt="Size4-Regular",it="rceil",ct=667):E==="("||E==="\\lparen"?(ae="\u239B",Ie="\u239C",$e="\u239D",pt="Size4-Regular",it="lparen",ct=875):E===")"||E==="\\rparen"?(ae="\u239E",Ie="\u239F",$e="\u23A0",pt="Size4-Regular",it="rparen",ct=875):E==="\\{"||E==="\\lbrace"?(ae="\u23A7",be="\u23A8",$e="\u23A9",Ie="\u23AA",pt="Size4-Regular"):E==="\\}"||E==="\\rbrace"?(ae="\u23AB",be="\u23AC",$e="\u23AD",Ie="\u23AA",pt="Size4-Regular"):E==="\\lgroup"||E==="\u27EE"?(ae="\u23A7",$e="\u23A9",Ie="\u23AA",pt="Size4-Regular"):E==="\\rgroup"||E==="\u27EF"?(ae="\u23AB",$e="\u23AD",Ie="\u23AA",pt="Size4-Regular"):E==="\\lmoustache"||E==="\u23B0"?(ae="\u23A7",$e="\u23AD",Ie="\u23AA",pt="Size4-Regular"):(E==="\\rmoustache"||E==="\u23B1")&&(ae="\u23AB",$e="\u23A9",Ie="\u23AA",pt="Size4-Regular");let wt=Cb(ae,pt,Y),Et=wt.height+wt.depth,Jt=Cb(Ie,pt,Y),zr=Jt.height+Jt.depth,Lr=Cb($e,pt,Y),Kr=Lr.height+Lr.depth,ga=0,Fn=1;if(be!==null){let Kl=Cb(be,pt,Y);ga=Kl.height+Kl.depth,Fn=2}let ya=Et+Kr+ga,xs=Math.max(0,Math.ceil((w-ya)/(Fn*zr))),va=ya+xs*Fn*zr,Ag=G.fontMetrics().axisHeight;L&&(Ag*=G.sizeMultiplier);let $w=va/2-Ag,io=[];if(it.length>0){let Kl=va-Et-Kr,Lg=Math.round(va*1e3),Rg=te(it,Math.round(Kl*1e3)),En=new Ee(it,Rg),aa=Ge(ct/1e3),yi=Ge(Lg/1e3),xa=new we([En],{width:aa,height:yi,viewBox:"0 0 "+ct+" "+Lg}),Zl=Go([],[xa],G);Zl.height=Lg/1e3,Zl.style.width=aa,Zl.style.height=yi,io.push({type:"elem",elem:Zl})}else{if(io.push(RD($e,pt,Y)),io.push(Mw),be===null){let Kl=va-Et-Kr+2*ID;io.push(DD(Ie,Kl,G))}else{let Kl=(va-Et-Kr-ga)/2+2*ID;io.push(DD(Ie,Kl,G)),io.push(Mw),io.push(RD(be,pt,Y)),io.push(Mw),io.push(DD(Ie,Kl,G))}io.push(Mw),io.push(RD(ae,pt,Y))}let Lb=G.havingBaseStyle(z.TEXT),Gw=Ot({positionType:"bottom",positionData:$w,children:io},Lb);return LD(_t(["delimsizing","mult"],[Gw],Lb),z.TEXT,G,Q)},MD=80,ND=.08,OD=function(E,w,L,G,Y){let Q=oe(E,G,L),ae=new Ee(E,Q),be=new we([ae],{width:"400em",height:Ge(w),viewBox:"0 0 400000 "+L,preserveAspectRatio:"xMinYMin slice"});return Go(["hide-tail"],[be],Y)},WOe=function(E,w){let L=w.havingBaseSizing(),G=iK("\\surd",E*L.sizeMultiplier,nK,L),Y=L.sizeMultiplier,Q=Math.max(0,w.minRuleThickness-w.fontMetrics().sqrtRuleThickness),ae,be,Ie,$e,it;return G.type==="small"?($e=1e3+1e3*Q+MD,E<1?Y=1:E<1.4&&(Y=.7),be=(1+Q+ND)/Y,Ie=(1+Q)/Y,ae=OD("sqrtMain",be,$e,Q,w),ae.style.minWidth="0.853em",it=.833/Y):G.type==="large"?($e=(1e3+MD)*_b[G.size],Ie=(_b[G.size]+Q)/Y,be=(_b[G.size]+Q+ND)/Y,ae=OD("sqrtSize"+G.size,be,$e,Q,w),ae.style.minWidth="1.02em",it=1/Y):(be=E+Q+ND,Ie=E+Q,$e=Math.floor(1e3*E+Q)+MD,ae=OD("sqrtTall",be,$e,Q,w),ae.style.minWidth="0.742em",it=1.056),ae.height=Ie,ae.style.height=Ge(be),{span:ae,advanceWidth:it,ruleWidth:(w.fontMetrics().sqrtRuleThickness+Q)*Y}},eK=new Set(["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","\u230A","\u230B","\\lceil","\\rceil","\u2308","\u2309","\\surd"]),YOe=new Set(["\\uparrow","\\downarrow","\\updownarrow","\\Uparrow","\\Downarrow","\\Updownarrow","|","\\|","\\vert","\\Vert","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","\u27EE","\u27EF","\\lmoustache","\\rmoustache","\u23B0","\u23B1"]),tK=new Set(["<",">","\\langle","\\rangle","/","\\backslash","\\lt","\\gt"]),_b=[0,1.2,1.8,2.4,3],rK=function(E,w,L,G,Y){if(E==="<"||E==="\\lt"||E==="\u27E8"?E="\\langle":(E===">"||E==="\\gt"||E==="\u27E9")&&(E="\\rangle"),eK.has(E)||tK.has(E))return Qj(E,w,!1,L,G,Y);if(YOe.has(E))return Jj(E,_b[w],!1,L,G,Y);throw new n("Illegal delimiter: '"+E+"'")},XOe=[{type:"small",style:z.SCRIPTSCRIPT},{type:"small",style:z.SCRIPT},{type:"small",style:z.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4}],jOe=[{type:"small",style:z.SCRIPTSCRIPT},{type:"small",style:z.SCRIPT},{type:"small",style:z.TEXT},{type:"stack"}],nK=[{type:"small",style:z.SCRIPTSCRIPT},{type:"small",style:z.SCRIPT},{type:"small",style:z.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4},{type:"stack"}],KOe=function(E){if(E.type==="small")return"Main-Regular";if(E.type==="large")return"Size"+E.size+"-Regular";if(E.type==="stack")return"Size4-Regular";{let w=E.type;throw new Error("Add support for delim type '"+w+"' here.")}},iK=function(E,w,L,G){let Y=Math.min(2,3-G.style.size);for(let Q=Y;Qw)return ae}return L[L.length-1]},PD=function(E,w,L,G,Y,Q){E==="<"||E==="\\lt"||E==="\u27E8"?E="\\langle":(E===">"||E==="\\gt"||E==="\u27E9")&&(E="\\rangle");let ae;tK.has(E)?ae=XOe:eK.has(E)?ae=nK:ae=jOe;let be=iK(E,w,ae,G);return be.type==="small"?qOe(E,be.style,L,G,Y,Q):be.type==="large"?Qj(E,be.size,L,G,Y,Q):Jj(E,w,L,G,Y,Q)},BD=function(E,w,L,G,Y,Q){let ae=G.fontMetrics().axisHeight*G.sizeMultiplier,be=901,Ie=5/G.fontMetrics().ptPerEm,$e=Math.max(w-ae,L+ae),it=Math.max($e/500*be,2*$e-Ie);return PD(E,it,!0,G,Y,Q)},aK={"\\bigl":{mclass:"mopen",size:1},"\\Bigl":{mclass:"mopen",size:2},"\\biggl":{mclass:"mopen",size:3},"\\Biggl":{mclass:"mopen",size:4},"\\bigr":{mclass:"mclose",size:1},"\\Bigr":{mclass:"mclose",size:2},"\\biggr":{mclass:"mclose",size:3},"\\Biggr":{mclass:"mclose",size:4},"\\bigm":{mclass:"mrel",size:1},"\\Bigm":{mclass:"mrel",size:2},"\\biggm":{mclass:"mrel",size:3},"\\Biggm":{mclass:"mrel",size:4},"\\big":{mclass:"mord",size:1},"\\Big":{mclass:"mord",size:2},"\\bigg":{mclass:"mord",size:3},"\\Bigg":{mclass:"mord",size:4}},ZOe=new Set(["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","\u230A","\u230B","\\lceil","\\rceil","\u2308","\u2309","<",">","\\langle","\u27E8","\\rangle","\u27E9","\\lt","\\gt","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","\u27EE","\u27EF","\\lmoustache","\\rmoustache","\u23B0","\u23B1","/","\\backslash","|","\\vert","\\|","\\Vert","\\uparrow","\\Uparrow","\\downarrow","\\Downarrow","\\updownarrow","\\Updownarrow","."]);function sK(E){return"isMiddle"in E}function Nw(E,w){let L=Rw(E);if(L&&ZOe.has(L.text))return L;throw L?new n("Invalid delimiter '"+L.text+"' after '"+w.funcName+"'",E):new n("Invalid delimiter type '"+E.type+"'",E)}Qt({type:"delimsizing",names:["\\bigl","\\Bigl","\\biggl","\\Biggl","\\bigr","\\Bigr","\\biggr","\\Biggr","\\bigm","\\Bigm","\\biggm","\\Biggm","\\big","\\Big","\\bigg","\\Bigg"],props:{numArgs:1,argTypes:["primitive"]},handler:(E,w)=>{let L=Nw(w[0],E);return{type:"delimsizing",mode:E.parser.mode,size:aK[E.funcName].size,mclass:aK[E.funcName].mclass,delim:L.text}},htmlBuilder:(E,w)=>E.delim==="."?_t([E.mclass]):rK(E.delim,E.size,w,E.mode,[E.mclass]),mathmlBuilder:E=>{let w=[];E.delim!=="."&&w.push(jl(E.delim,E.mode));let L=new zt("mo",w);E.mclass==="mopen"||E.mclass==="mclose"?L.setAttribute("fence","true"):L.setAttribute("fence","false"),L.setAttribute("stretchy","true");let G=Ge(_b[E.size]);return L.setAttribute("minsize",G),L.setAttribute("maxsize",G),L}});function oK(E){if(!E.body)throw new Error("Bug: The leftright ParseNode wasn't fully parsed.")}Qt({type:"leftright-right",names:["\\right"],props:{numArgs:1,primitive:!0},handler:(E,w)=>{let L=E.parser.gullet.macros.get("\\current@color");if(L&&typeof L!="string")throw new n("\\current@color set to non-string in \\right");return{type:"leftright-right",mode:E.parser.mode,delim:Nw(w[0],E).text,color:L}}}),Qt({type:"leftright",names:["\\left"],props:{numArgs:1,primitive:!0},handler:(E,w)=>{let L=Nw(w[0],E),G=E.parser;++G.leftrightDepth;let Y=G.parseExpression(!1);--G.leftrightDepth,G.expect("\\right",!1);let Q=Fr(G.parseFunction(),"leftright-right");return{type:"leftright",mode:G.mode,body:Y,left:L.text,right:Q.delim,rightColor:Q.color}},htmlBuilder:(E,w)=>{oK(E);let L=Ma(E.body,w,!0,["mopen","mclose"]),G=0,Y=0,Q=!1;for(let Ie=0;Ie{oK(E);let L=bl(E.body,w);if(E.left!=="."){let G=new zt("mo",[jl(E.left,E.mode)]);G.setAttribute("fence","true"),L.unshift(G)}if(E.right!=="."){let G=new zt("mo",[jl(E.right,E.mode)]);G.setAttribute("fence","true"),E.rightColor&&G.setAttribute("mathcolor",E.rightColor),L.push(G)}return ED(L)}}),Qt({type:"middle",names:["\\middle"],props:{numArgs:1,primitive:!0},handler:(E,w)=>{let L=Nw(w[0],E);if(!E.parser.leftrightDepth)throw new n("\\middle without preceding \\left",L);return{type:"middle",mode:E.parser.mode,delim:L.text}},htmlBuilder:(E,w)=>{let L;return E.delim==="."?L=Sb(w,[]):(L=rK(E.delim,1,w,E.mode,[]),L.isMiddle={delim:E.delim,options:w}),L},mathmlBuilder:(E,w)=>{let L=E.delim==="\\vert"||E.delim==="|"?jl("|","text"):jl(E.delim,E.mode),G=new zt("mo",[L]);return G.setAttribute("fence","true"),G.setAttribute("lspace","0.05em"),G.setAttribute("rspace","0.05em"),G}});let Ow=(E,w)=>{let L=Tt(Tn(E.body,w),w),G=E.label.slice(1),Y=w.sizeMultiplier,Q,ae,be=f(E.body);if(G==="sout")Q=_t(["stretchy","sout"]),Q.height=w.fontMetrics().defaultRuleThickness/Y,ae=-.5*w.fontMetrics().xHeight;else if(G==="phase"){let $e=Ye({number:.6,unit:"pt"},w),it=Ye({number:.35,unit:"ex"},w),ct=w.havingBaseSizing();Y=Y/ct.sizeMultiplier;let pt=L.height+L.depth+$e+it;L.style.paddingLeft=Ge(pt/2+$e);let wt=Math.floor(1e3*pt*Y),Et=ie(wt),Jt=new we([new Ee("phase",Et)],{width:"400em",height:Ge(wt/1e3),viewBox:"0 0 400000 "+wt,preserveAspectRatio:"xMinYMin slice"});Q=Go(["hide-tail"],[Jt],w),Q.style.height=Ge(pt),ae=L.depth+$e+it}else{/cancel/.test(G)?be||L.classes.push("cancel-pad"):G==="angl"?L.classes.push("anglpad"):L.classes.push("boxpad");let $e,it,ct=0;/box/.test(G)?(ct=Math.max(w.fontMetrics().fboxrule,w.minRuleThickness),$e=w.fontMetrics().fboxsep+(G==="colorbox"?0:ct),it=$e):G==="angl"?(ct=Math.max(w.fontMetrics().defaultRuleThickness,w.minRuleThickness),$e=4*ct,it=Math.max(0,.25-L.depth)):($e=be?.2:0,it=$e),Q=IOe(L,G,$e,it,w),/fbox|boxed|fcolorbox/.test(G)?(Q.style.borderStyle="solid",Q.style.borderWidth=Ge(ct)):G==="angl"&&ct!==.049&&(Q.style.borderTopWidth=Ge(ct),Q.style.borderRightWidth=Ge(ct)),ae=L.depth+it,E.backgroundColor&&(Q.style.backgroundColor=E.backgroundColor,E.borderColor&&(Q.style.borderColor=E.borderColor))}let Ie;if(E.backgroundColor)Ie=Ot({positionType:"individualShift",children:[{type:"elem",elem:Q,shift:ae},{type:"elem",elem:L,shift:0}]},w);else{let $e=/cancel|phase/.test(G)?["svg-align"]:[];Ie=Ot({positionType:"individualShift",children:[{type:"elem",elem:L,shift:0},{type:"elem",elem:Q,shift:ae,wrapperClasses:$e}]},w)}return/cancel/.test(G)&&(Ie.height=L.height,Ie.depth=L.depth),/cancel/.test(G)&&!be?_t(["mord","cancel-lap"],[Ie],w):_t(["mord"],[Ie],w)},Pw=(E,w)=>{let L,G=new zt(E.label.includes("colorbox")?"mpadded":"menclose",[Zn(E.body,w)]);switch(E.label){case"\\cancel":G.setAttribute("notation","updiagonalstrike");break;case"\\bcancel":G.setAttribute("notation","downdiagonalstrike");break;case"\\phase":G.setAttribute("notation","phasorangle");break;case"\\sout":G.setAttribute("notation","horizontalstrike");break;case"\\fbox":G.setAttribute("notation","box");break;case"\\angl":G.setAttribute("notation","actuarial");break;case"\\fcolorbox":case"\\colorbox":if(L=w.fontMetrics().fboxsep*w.fontMetrics().ptPerEm,G.setAttribute("width","+"+2*L+"pt"),G.setAttribute("height","+"+2*L+"pt"),G.setAttribute("lspace",L+"pt"),G.setAttribute("voffset",L+"pt"),E.label==="\\fcolorbox"){let Y=Math.max(w.fontMetrics().fboxrule,w.minRuleThickness);G.setAttribute("style","border: "+Ge(Y)+" solid "+E.borderColor)}break;case"\\xcancel":G.setAttribute("notation","updiagonalstrike downdiagonalstrike");break}return E.backgroundColor&&G.setAttribute("mathbackground",E.backgroundColor),G};Qt({type:"enclose",names:["\\colorbox"],props:{numArgs:2,allowedInText:!0,argTypes:["color","hbox"]},handler(E,w,L){let{parser:G,funcName:Y}=E,Q=Fr(w[0],"color-token").color,ae=w[1];return{type:"enclose",mode:G.mode,label:Y,backgroundColor:Q,body:ae}},htmlBuilder:Ow,mathmlBuilder:Pw}),Qt({type:"enclose",names:["\\fcolorbox"],props:{numArgs:3,allowedInText:!0,argTypes:["color","color","hbox"]},handler(E,w,L){let{parser:G,funcName:Y}=E,Q=Fr(w[0],"color-token").color,ae=Fr(w[1],"color-token").color,be=w[2];return{type:"enclose",mode:G.mode,label:Y,backgroundColor:ae,borderColor:Q,body:be}},htmlBuilder:Ow,mathmlBuilder:Pw}),Qt({type:"enclose",names:["\\fbox"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!0},handler(E,w){let{parser:L}=E;return{type:"enclose",mode:L.mode,label:"\\fbox",body:w[0]}}}),Qt({type:"enclose",names:["\\cancel","\\bcancel","\\xcancel","\\phase"],props:{numArgs:1},handler(E,w){let{parser:L,funcName:G}=E,Y=w[0];return{type:"enclose",mode:L.mode,label:G,body:Y}},htmlBuilder:Ow,mathmlBuilder:Pw}),Qt({type:"enclose",names:["\\sout"],props:{numArgs:1,allowedInText:!0},handler(E,w){let{parser:L,funcName:G}=E;L.mode==="math"&&L.settings.reportNonstrict("mathVsSout","LaTeX's \\sout works only in text mode");let Y=w[0];return{type:"enclose",mode:L.mode,label:G,body:Y}},htmlBuilder:Ow,mathmlBuilder:Pw}),Qt({type:"enclose",names:["\\angl"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!1},handler(E,w){let{parser:L}=E;return{type:"enclose",mode:L.mode,label:"\\angl",body:w[0]}}});let lK={};function Mc(E){let{type:w,names:L,props:G,handler:Y,htmlBuilder:Q,mathmlBuilder:ae}=E,be={type:w,numArgs:G.numArgs||0,allowedInText:!1,numOptionalArgs:0,handler:Y};for(let Ie=0;Ie{if(!E.parser.settings.displayMode)throw new n("{"+E.envName+"} can be used only in display mode.")},QOe=new Set(["gather","gather*"]);function FD(E){if(!E.includes("ed"))return!E.includes("*")}function If(E,w,L){let{hskipBeforeAndAfter:G,addJot:Y,cols:Q,arraystretch:ae,colSeparationType:be,autoTag:Ie,singleRow:$e,emptySingleRow:it,maxNumCols:ct,leqno:pt}=w;if(E.gullet.beginGroup(),$e||E.gullet.macros.set("\\cr","\\\\\\relax"),!ae){let Fn=E.gullet.expandMacroAsText("\\arraystretch");if(Fn==null)ae=1;else if(ae=parseFloat(Fn),!ae||ae<0)throw new n("Invalid \\arraystretch: "+Fn)}E.gullet.beginGroup();let wt=[],Et=[wt],Jt=[],zr=[],Lr=Ie!=null?[]:void 0;function Kr(){Ie&&E.gullet.macros.set("\\@eqnsw","1",!0)}function ga(){Lr&&(E.gullet.macros.get("\\df@tag")?(Lr.push(E.subparse([new wl("\\df@tag")])),E.gullet.macros.set("\\df@tag",void 0,!0)):Lr.push(!!Ie&&E.gullet.macros.get("\\@eqnsw")==="1"))}for(Kr(),zr.push(cK(E));;){let Fn=E.parseExpression(!1,$e?"\\end":"\\\\");E.gullet.endGroup(),E.gullet.beginGroup();let ya={type:"ordgroup",mode:E.mode,body:Fn};L&&(ya={type:"styling",mode:E.mode,style:L,resetFont:!0,body:[ya]}),wt.push(ya);let xs=E.fetch().text;if(xs==="&"){if(ct&&wt.length===ct){if($e||be)throw new n("Too many tab characters: &",E.nextToken);E.settings.reportNonstrict("textEnv","Too few columns specified in the {array} column argument.")}E.consume()}else if(xs==="\\end"){ga(),wt.length===1&&ya.type==="styling"&&ya.body.length===1&&ya.body[0].type==="ordgroup"&&ya.body[0].body.length===0&&(Et.length>1||!it)&&Et.pop(),zr.length0&&(Lr+=.25),Ie.push({pos:Lr,isDashed:En[aa]})}for(Kr(Q[0]),L=0;L0&&(hh+=zr,yiEn))for(L=0;L=ae)continue;let yi;if(G>0||E.hskipBeforeAndAfter){var Lb,Gw;yi=(Lb=(Gw=En)==null?void 0:Gw.pregap)!=null?Lb:ct,yi!==0&&(xs=_t(["arraycolsep"],[]),xs.style.width=Ge(yi),ya.push(xs))}let xa=[];for(L=0;L0){let En=Nt("hline",w,$e),aa=Nt("hdashline",w,$e),yi=[{type:"elem",elem:Rg,shift:0}];for(;Ie.length>0;){let xa=Ie.pop(),Zl=xa.pos-ga;xa.isDashed?yi.push({type:"elem",elem:aa,shift:Zl}):yi.push({type:"elem",elem:En,shift:Zl})}Rg=Ot({positionType:"individualShift",children:yi},w)}if(Ag.length===0)return _t(["mord"],[Rg],w);{let En=Ot({positionType:"individualShift",children:Ag},w),aa=_t(["tag"],[En],w);return et([Rg,aa])}},JOe={c:"center ",l:"left ",r:"right "},Oc=function(E,w){let L=[],G=new zt("mtd",[],["mtr-glue"]),Y=new zt("mtd",[],["mml-eqn-num"]);for(let ct=0;ct0){let ct=E.cols,pt="",wt=!1,Et=0,Jt=ct.length;ct[0].type==="separator"&&(be+="top ",Et=1),ct[ct.length-1].type==="separator"&&(be+="bottom ",Jt-=1);for(let zr=Et;zr0?"left ":"",be+=it[it.length-1].length>0?"right ":"";for(let ct=1;ct0&&$e&&(pt=1),L[it]={type:"align",align:ct,pregap:pt,postgap:0}}return Q.colSeparationType=$e?"align":"alignat",Q};Mc({type:"array",names:["array","darray"],props:{numArgs:1},handler(E,w){let Y=(Rw(w[0])?[w[0]]:Fr(w[0],"ordgroup").body).map(function(ae){let Ie=Lw(ae).text;if("lcr".includes(Ie))return{type:"align",align:Ie};if(Ie==="|")return{type:"separator",separator:"|"};if(Ie===":")return{type:"separator",separator:":"};throw new n("Unknown column alignment: "+Ie,ae)}),Q={cols:Y,hskipBeforeAndAfter:!0,maxNumCols:Y.length};return If(E.parser,Q,zD(E.envName))},htmlBuilder:Nc,mathmlBuilder:Oc}),Mc({type:"array",names:["matrix","pmatrix","bmatrix","Bmatrix","vmatrix","Vmatrix","matrix*","pmatrix*","bmatrix*","Bmatrix*","vmatrix*","Vmatrix*"],props:{numArgs:0},handler(E){let w={matrix:null,pmatrix:["(",")"],bmatrix:["[","]"],Bmatrix:["\\{","\\}"],vmatrix:["|","|"],Vmatrix:["\\Vert","\\Vert"]}[E.envName.replace("*","")],L="c",G={hskipBeforeAndAfter:!1,cols:[{type:"align",align:L}]};if(E.envName.charAt(E.envName.length-1)==="*"){let ae=E.parser;if(ae.consumeSpaces(),ae.fetch().text==="["){if(ae.consume(),ae.consumeSpaces(),L=ae.fetch().text,!"lcr".includes(L))throw new n("Expected l or c or r",ae.nextToken);ae.consume(),ae.consumeSpaces(),ae.expect("]"),ae.consume(),G.cols=[{type:"align",align:L}]}}let Y=If(E.parser,G,zD(E.envName)),Q=Math.max(0,...Y.body.map(ae=>ae.length));return Y.cols=new Array(Q).fill({type:"align",align:L}),w?{type:"leftright",mode:E.mode,body:[Y],left:w[0],right:w[1],rightColor:void 0}:Y},htmlBuilder:Nc,mathmlBuilder:Oc}),Mc({type:"array",names:["smallmatrix"],props:{numArgs:0},handler(E){let w={arraystretch:.5},L=If(E.parser,w,"script");return L.colSeparationType="small",L},htmlBuilder:Nc,mathmlBuilder:Oc}),Mc({type:"array",names:["subarray"],props:{numArgs:1},handler(E,w){let Y=(Rw(w[0])?[w[0]]:Fr(w[0],"ordgroup").body).map(function(be){let $e=Lw(be).text;if("lc".includes($e))return{type:"align",align:$e};throw new n("Unknown column alignment: "+$e,be)});if(Y.length>1)throw new n("{subarray} can contain only one column");let Q={cols:Y,hskipBeforeAndAfter:!1,arraystretch:.5},ae=If(E.parser,Q,"script");if(ae.body.length>0&&ae.body[0].length>1)throw new n("{subarray} can contain only one column");return ae},htmlBuilder:Nc,mathmlBuilder:Oc}),Mc({type:"array",names:["cases","dcases","rcases","drcases"],props:{numArgs:0},handler(E){let w={arraystretch:1.2,cols:[{type:"align",align:"l",pregap:0,postgap:1},{type:"align",align:"l",pregap:0,postgap:0}]},L=If(E.parser,w,zD(E.envName));return{type:"leftright",mode:E.mode,body:[L],left:E.envName.includes("r")?".":"\\{",right:E.envName.includes("r")?"\\}":".",rightColor:void 0}},htmlBuilder:Nc,mathmlBuilder:Oc}),Mc({type:"array",names:["align","align*","aligned","split"],props:{numArgs:0},handler:hK,htmlBuilder:Nc,mathmlBuilder:Oc}),Mc({type:"array",names:["gathered","gather","gather*"],props:{numArgs:0},handler(E){QOe.has(E.envName)&&Bw(E);let w={cols:[{type:"align",align:"c"}],addJot:!0,colSeparationType:"gather",autoTag:FD(E.envName),emptySingleRow:!0,leqno:E.parser.settings.leqno};return If(E.parser,w,"display")},htmlBuilder:Nc,mathmlBuilder:Oc}),Mc({type:"array",names:["alignat","alignat*","alignedat"],props:{numArgs:1},handler:hK,htmlBuilder:Nc,mathmlBuilder:Oc}),Mc({type:"array",names:["equation","equation*"],props:{numArgs:0},handler(E){Bw(E);let w={autoTag:FD(E.envName),emptySingleRow:!0,singleRow:!0,maxNumCols:1,leqno:E.parser.settings.leqno};return If(E.parser,w,"display")},htmlBuilder:Nc,mathmlBuilder:Oc}),Mc({type:"array",names:["CD"],props:{numArgs:0},handler(E){return Bw(E),$Oe(E.parser)},htmlBuilder:Nc,mathmlBuilder:Oc}),Ce("\\nonumber","\\gdef\\@eqnsw{0}"),Ce("\\notag","\\nonumber"),Qt({type:"text",names:["\\hline","\\hdashline"],props:{numArgs:0,allowedInText:!0,allowedInMath:!0},handler(E,w){throw new n(E.funcName+" valid only within array environment")}});var fK=lK;Qt({type:"environment",names:["\\begin","\\end"],props:{numArgs:1,argTypes:["text"]},handler(E,w){let{parser:L,funcName:G}=E,Y=w[0];if(Y.type!=="ordgroup")throw new n("Invalid environment name",Y);let Q="";for(let ae=0;ae{let L=E.font,G=w.withFont(L);return Tn(E.body,G)},pK=(E,w)=>{let L=E.font,G=w.withFont(L);return Zn(E.body,G)},mK={"\\Bbb":"\\mathbb","\\bold":"\\mathbf","\\frak":"\\mathfrak"};Qt({type:"font",names:["\\mathrm","\\mathit","\\mathbf","\\mathnormal","\\mathsfit","\\mathbb","\\mathcal","\\mathfrak","\\mathscr","\\mathsf","\\mathtt","\\Bbb","\\bold","\\frak"],props:{numArgs:1,allowedInArgument:!0},handler:(E,w)=>{let{parser:L,funcName:G}=E,Y=Sw(w[0]),Q=G;return Q in mK&&(Q=mK[Q]),{type:"font",mode:L.mode,font:Q.slice(1),body:Y}},htmlBuilder:dK,mathmlBuilder:pK}),Qt({type:"mclass",names:["\\boldsymbol","\\bm"],props:{numArgs:1},handler:(E,w)=>{let{parser:L}=E,G=w[0];return{type:"mclass",mode:L.mode,mclass:Iw(G),body:[{type:"font",mode:L.mode,font:"boldsymbol",body:G}],isCharacterBox:f(G)}}}),Qt({type:"font",names:["\\rm","\\sf","\\tt","\\bf","\\it","\\cal"],props:{numArgs:0,allowedInText:!0},handler:(E,w)=>{let{parser:L,funcName:G,breakOnTokenText:Y}=E,{mode:Q}=L,ae=L.parseExpression(!0,Y);return{type:"font",mode:Q,font:"math"+G.slice(1),body:{type:"ordgroup",mode:L.mode,body:ae}}},htmlBuilder:dK,mathmlBuilder:pK});let ePe=(E,w)=>{let L=w.style,G=L.fracNum(),Y=L.fracDen(),Q;Q=w.havingStyle(G);let ae=Tn(E.numer,Q,w);if(E.continued){let Kr=8.5/w.fontMetrics().ptPerEm,ga=3.5/w.fontMetrics().ptPerEm;ae.height=ae.height0?pt=3*it:pt=7*it,wt=w.fontMetrics().denom1):($e>0?(ct=w.fontMetrics().num2,pt=it):(ct=w.fontMetrics().num3,pt=3*it),wt=w.fontMetrics().denom2);let Et;if(Ie){let Kr=w.fontMetrics().axisHeight;ct-ae.depth-(Kr+.5*$e){let L=new zt("mfrac",[Zn(E.numer,w),Zn(E.denom,w)]);if(!E.hasBarLine)L.setAttribute("linethickness","0px");else if(E.barSize){let G=Ye(E.barSize,w);L.setAttribute("linethickness",Ge(G))}if(E.leftDelim!=null||E.rightDelim!=null){let G=[];if(E.leftDelim!=null){let Y=new zt("mo",[new ma(E.leftDelim.replace("\\",""))]);Y.setAttribute("fence","true"),G.push(Y)}if(G.push(L),E.rightDelim!=null){let Y=new zt("mo",[new ma(E.rightDelim.replace("\\",""))]);Y.setAttribute("fence","true"),G.push(Y)}return ED(G)}return L},gK=(E,w)=>w?{type:"styling",mode:E.mode,style:w,body:[E]}:E;Qt({type:"genfrac",names:["\\cfrac","\\dfrac","\\frac","\\tfrac","\\dbinom","\\binom","\\tbinom","\\\\atopfrac","\\\\bracefrac","\\\\brackfrac"],props:{numArgs:2,allowedInArgument:!0},handler:(E,w)=>{let{parser:L,funcName:G}=E,Y=w[0],Q=w[1],ae,be=null,Ie=null;switch(G){case"\\cfrac":case"\\dfrac":case"\\frac":case"\\tfrac":ae=!0;break;case"\\\\atopfrac":ae=!1;break;case"\\dbinom":case"\\binom":case"\\tbinom":ae=!1,be="(",Ie=")";break;case"\\\\bracefrac":ae=!1,be="\\{",Ie="\\}";break;case"\\\\brackfrac":ae=!1,be="[",Ie="]";break;default:throw new Error("Unrecognized genfrac command")}let $e=G==="\\cfrac",it=null;return $e||G.startsWith("\\d")?it="display":G.startsWith("\\t")&&(it="text"),gK({type:"genfrac",mode:L.mode,numer:Y,denom:Q,continued:$e,hasBarLine:ae,leftDelim:be,rightDelim:Ie,barSize:null},it)},htmlBuilder:ePe,mathmlBuilder:tPe}),Qt({type:"infix",names:["\\over","\\choose","\\atop","\\brace","\\brack"],props:{numArgs:0,infix:!0},handler(E){let{parser:w,funcName:L,token:G}=E,Y;switch(L){case"\\over":Y="\\frac";break;case"\\choose":Y="\\binom";break;case"\\atop":Y="\\\\atopfrac";break;case"\\brace":Y="\\\\bracefrac";break;case"\\brack":Y="\\\\brackfrac";break;default:throw new Error("Unrecognized infix genfrac command")}return{type:"infix",mode:w.mode,replaceWith:Y,token:G}}});let yK=["display","text","script","scriptscript"],vK=function(E){let w=null;return E.length>0&&(w=E,w=w==="."?null:w),w};Qt({type:"genfrac",names:["\\genfrac"],props:{numArgs:6,allowedInArgument:!0,argTypes:["math","math","size","text","math","math"]},handler(E,w){let{parser:L}=E,G=w[4],Y=w[5],Q=Sw(w[0]),ae=Q.type==="atom"&&Q.family==="open"?vK(Q.text):null,be=Sw(w[1]),Ie=be.type==="atom"&&be.family==="close"?vK(be.text):null,$e=Fr(w[2],"size"),it,ct=null;$e.isBlank?it=!0:(ct=$e.value,it=ct.number>0);let pt=null,wt=w[3];if(wt.type==="ordgroup"){if(wt.body.length>0){let Et=Fr(wt.body[0],"textord");pt=yK[Number(Et.text)]}}else wt=Fr(wt,"textord"),pt=yK[Number(wt.text)];return gK({type:"genfrac",mode:L.mode,numer:G,denom:Y,continued:!1,hasBarLine:it,barSize:ct,leftDelim:ae,rightDelim:Ie},pt)}}),Qt({type:"infix",names:["\\above"],props:{numArgs:1,argTypes:["size"],infix:!0},handler(E,w){let{parser:L,funcName:G,token:Y}=E;return{type:"infix",mode:L.mode,replaceWith:"\\\\abovefrac",size:Fr(w[0],"size").value,token:Y}}}),Qt({type:"genfrac",names:["\\\\abovefrac"],props:{numArgs:3,argTypes:["math","size","math"]},handler:(E,w)=>{let{parser:L,funcName:G}=E,Y=w[0],Q=Fr(w[1],"infix").size;if(!Q)throw new Error("\\\\abovefrac expected size, but got "+String(Q));let ae=w[2],be=Q.number>0;return{type:"genfrac",mode:L.mode,numer:Y,denom:ae,continued:!1,hasBarLine:be,barSize:Q,leftDelim:null,rightDelim:null}}});let xK=(E,w)=>{let L=w.style,G,Y;E.type==="supsub"?(G=E.sup?Tn(E.sup,w.havingStyle(L.sup()),w):Tn(E.sub,w.havingStyle(L.sub()),w),Y=Fr(E.base,"horizBrace")):Y=Fr(E,"horizBrace");let Q=Tn(Y.base,w.havingBaseStyle(z.DISPLAY)),ae=Aw(Y,w),be;if(Y.isOver?be=Ot({positionType:"firstBaseline",children:[{type:"elem",elem:Q},{type:"kern",size:.1},{type:"elem",elem:ae,wrapperClasses:["svg-align"]}]},w):be=Ot({positionType:"bottom",positionData:Q.depth+.1+ae.height,children:[{type:"elem",elem:ae,wrapperClasses:["svg-align"]},{type:"kern",size:.1},{type:"elem",elem:Q}]},w),G){let Ie=_t(["minner",Y.isOver?"mover":"munder"],[be],w);Y.isOver?be=Ot({positionType:"firstBaseline",children:[{type:"elem",elem:Ie},{type:"kern",size:.2},{type:"elem",elem:G}]},w):be=Ot({positionType:"bottom",positionData:Ie.depth+.2+G.height+G.depth,children:[{type:"elem",elem:G},{type:"kern",size:.2},{type:"elem",elem:Ie}]},w)}return _t(["minner",Y.isOver?"mover":"munder"],[be],w)};Qt({type:"horizBrace",names:["\\overbrace","\\underbrace","\\overbracket","\\underbracket"],props:{numArgs:1},handler(E,w){let{parser:L,funcName:G}=E;return{type:"horizBrace",mode:L.mode,label:G,isOver:G.includes("\\over"),base:w[0]}},htmlBuilder:xK,mathmlBuilder:(E,w)=>{let L=_w(E.label);return new zt(E.isOver?"mover":"munder",[Zn(E.base,w),L])}}),Qt({type:"href",names:["\\href"],props:{numArgs:2,argTypes:["url","original"],allowedInText:!0},handler:(E,w)=>{let{parser:L}=E,G=w[1],Y=Fr(w[0],"url").url;return L.settings.isTrusted({command:"\\href",url:Y})?{type:"href",mode:L.mode,href:Y,body:pa(G)}:L.formatUnsupportedCmd("\\href")},htmlBuilder:(E,w)=>{let L=Ma(E.body,w,!1);return Ne(E.href,[],L,w)},mathmlBuilder:(E,w)=>{let L=Df(E.body,w);return L instanceof zt||(L=new zt("mrow",[L])),L.setAttribute("href",E.href),L}}),Qt({type:"href",names:["\\url"],props:{numArgs:1,argTypes:["url"],allowedInText:!0},handler:(E,w)=>{let{parser:L}=E,G=Fr(w[0],"url").url;if(!L.settings.isTrusted({command:"\\url",url:G}))return L.formatUnsupportedCmd("\\url");let Y=[];for(let ae=0;ae{let{parser:L,funcName:G,token:Y}=E,Q=Fr(w[0],"raw").string,ae=w[1];L.settings.strict&&L.settings.reportNonstrict("htmlExtension","HTML extension is disabled on strict mode");let be,Ie={};switch(G){case"\\htmlClass":Ie.class=Q,be={command:"\\htmlClass",class:Q};break;case"\\htmlId":Ie.id=Q,be={command:"\\htmlId",id:Q};break;case"\\htmlStyle":Ie.style=Q,be={command:"\\htmlStyle",style:Q};break;case"\\htmlData":{let $e=Q.split(",");for(let it=0;it<$e.length;it++){let ct=$e[it],pt=ct.indexOf("=");if(pt<0)throw new n("\\htmlData key/value '"+ct+"' missing equals sign");let wt=ct.slice(0,pt),Et=ct.slice(pt+1);Ie["data-"+wt.trim()]=Et}be={command:"\\htmlData",attributes:Ie};break}default:throw new Error("Unrecognized html command")}return L.settings.isTrusted(be)?{type:"html",mode:L.mode,attributes:Ie,body:pa(ae)}:L.formatUnsupportedCmd(G)},htmlBuilder:(E,w)=>{let L=Ma(E.body,w,!1),G=["enclosing"];E.attributes.class&&G.push(...E.attributes.class.trim().split(/\s+/));let Y=_t(G,L,w);for(let Q in E.attributes)Q!=="class"&&E.attributes.hasOwnProperty(Q)&&Y.setAttribute(Q,E.attributes[Q]);return Y},mathmlBuilder:(E,w)=>Df(E.body,w)}),Qt({type:"htmlmathml",names:["\\html@mathml"],props:{numArgs:2,allowedInArgument:!0,allowedInText:!0},handler:(E,w)=>{let{parser:L}=E;return{type:"htmlmathml",mode:L.mode,html:pa(w[0]),mathml:pa(w[1])}},htmlBuilder:(E,w)=>{let L=Ma(E.html,w,!1);return et(L)},mathmlBuilder:(E,w)=>Df(E.mathml,w)});let $D=function(E){if(/^[-+]? *(\d+(\.\d*)?|\.\d+)$/.test(E))return{number:+E,unit:"bp"};{let w=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(E);if(!w)throw new n("Invalid size: '"+E+"' in \\includegraphics");let L={number:+(w[1]+w[2]),unit:w[3]};if(!Ae(L))throw new n("Invalid unit: '"+L.unit+"' in \\includegraphics.");return L}};Qt({type:"includegraphics",names:["\\includegraphics"],props:{numArgs:1,numOptionalArgs:1,argTypes:["raw","url"],allowedInText:!1},handler:(E,w,L)=>{let{parser:G}=E,Y={number:0,unit:"em"},Q={number:.9,unit:"em"},ae={number:0,unit:"em"},be="";if(L[0]){let it=Fr(L[0],"raw").string.split(",");for(let ct=0;ct{let L=Ye(E.height,w),G=0;E.totalheight.number>0&&(G=Ye(E.totalheight,w)-L);let Y=0;E.width.number>0&&(Y=Ye(E.width,w));let Q={height:Ge(L+G)};Y>0&&(Q.width=Ge(Y)),G>0&&(Q.verticalAlign=Ge(-G));let ae=new H(E.src,E.alt,Q);return ae.height=L,ae.depth=G,ae},mathmlBuilder:(E,w)=>{let L=new zt("mglyph",[]);L.setAttribute("alt",E.alt);let G=Ye(E.height,w),Y=0;if(E.totalheight.number>0&&(Y=Ye(E.totalheight,w)-G,L.setAttribute("valign",Ge(-Y))),L.setAttribute("height",Ge(G+Y)),E.width.number>0){let Q=Ye(E.width,w);L.setAttribute("width",Ge(Q))}return L.setAttribute("src",E.src),L}}),Qt({type:"kern",names:["\\kern","\\mkern","\\hskip","\\mskip"],props:{numArgs:1,argTypes:["size"],primitive:!0,allowedInText:!0},handler(E,w){let{parser:L,funcName:G}=E,Y=Fr(w[0],"size");if(L.settings.strict){let Q=G[1]==="m",ae=Y.value.unit==="mu";Q?(ae||L.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+G+" supports only mu units, "+("not "+Y.value.unit+" units")),L.mode!=="math"&&L.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+G+" works only in math mode")):ae&&L.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+G+" doesn't support mu units")}return{type:"kern",mode:L.mode,dimension:Y.value}},htmlBuilder(E,w){return Er(E.dimension,w)},mathmlBuilder(E,w){let L=Ye(E.dimension,w);return new Oj(L)}}),Qt({type:"lap",names:["\\mathllap","\\mathrlap","\\mathclap"],props:{numArgs:1,allowedInText:!0},handler:(E,w)=>{let{parser:L,funcName:G}=E,Y=w[0];return{type:"lap",mode:L.mode,alignment:G.slice(5),body:Y}},htmlBuilder:(E,w)=>{let L;E.alignment==="clap"?(L=_t([],[Tn(E.body,w)]),L=_t(["inner"],[L],w)):L=_t(["inner"],[Tn(E.body,w)]);let G=_t(["fix"],[]),Y=_t([E.alignment],[L,G],w),Q=_t(["strut"]);return Q.style.height=Ge(Y.height+Y.depth),Y.depth&&(Q.style.verticalAlign=Ge(-Y.depth)),Y.children.unshift(Q),Y=_t(["thinbox"],[Y],w),_t(["mord","vbox"],[Y],w)},mathmlBuilder:(E,w)=>{let L=new zt("mpadded",[Zn(E.body,w)]);if(E.alignment!=="rlap"){let G=E.alignment==="llap"?"-1":"-0.5";L.setAttribute("lspace",G+"width")}return L.setAttribute("width","0px"),L}}),Qt({type:"styling",names:["\\(","$"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(E,w){let{funcName:L,parser:G}=E,Y=G.mode;G.switchMode("math");let Q=L==="\\("?"\\)":"$",ae=G.parseExpression(!1,Q);return G.expect(Q),G.switchMode(Y),{type:"styling",mode:G.mode,style:"text",resetFont:!0,body:ae}}}),Qt({type:"text",names:["\\)","\\]"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(E,w){throw new n("Mismatched "+E.funcName)}});let bK=(E,w)=>{switch(w.style.size){case z.DISPLAY.size:return E.display;case z.TEXT.size:return E.text;case z.SCRIPT.size:return E.script;case z.SCRIPTSCRIPT.size:return E.scriptscript;default:return E.text}};Qt({type:"mathchoice",names:["\\mathchoice"],props:{numArgs:4,primitive:!0},handler:(E,w)=>{let{parser:L}=E;return{type:"mathchoice",mode:L.mode,display:pa(w[0]),text:pa(w[1]),script:pa(w[2]),scriptscript:pa(w[3])}},htmlBuilder:(E,w)=>{let L=bK(E,w),G=Ma(L,w,!1);return et(G)},mathmlBuilder:(E,w)=>{let L=bK(E,w);return Df(L,w)}});let wK=(E,w,L,G,Y,Q,ae)=>{E=_t([],[E]);let be=L&&f(L),Ie,$e;if(w){let pt=Tn(w,G.havingStyle(Y.sup()),G);$e={elem:pt,kern:Math.max(G.fontMetrics().bigOpSpacing1,G.fontMetrics().bigOpSpacing3-pt.depth)}}if(L){let pt=Tn(L,G.havingStyle(Y.sub()),G);Ie={elem:pt,kern:Math.max(G.fontMetrics().bigOpSpacing2,G.fontMetrics().bigOpSpacing4-pt.height)}}let it;if($e&&Ie){let pt=G.fontMetrics().bigOpSpacing5+Ie.elem.height+Ie.elem.depth+Ie.kern+E.depth+ae;it=Ot({positionType:"bottom",positionData:pt,children:[{type:"kern",size:G.fontMetrics().bigOpSpacing5},{type:"elem",elem:Ie.elem,marginLeft:Ge(-Q)},{type:"kern",size:Ie.kern},{type:"elem",elem:E},{type:"kern",size:$e.kern},{type:"elem",elem:$e.elem,marginLeft:Ge(Q)},{type:"kern",size:G.fontMetrics().bigOpSpacing5}]},G)}else if(Ie){let pt=E.height-ae;it=Ot({positionType:"top",positionData:pt,children:[{type:"kern",size:G.fontMetrics().bigOpSpacing5},{type:"elem",elem:Ie.elem,marginLeft:Ge(-Q)},{type:"kern",size:Ie.kern},{type:"elem",elem:E}]},G)}else if($e){let pt=E.depth+ae;it=Ot({positionType:"bottom",positionData:pt,children:[{type:"elem",elem:E},{type:"kern",size:$e.kern},{type:"elem",elem:$e.elem,marginLeft:Ge(Q)},{type:"kern",size:G.fontMetrics().bigOpSpacing5}]},G)}else return E;let ct=[it];if(Ie&&Q!==0&&!be){let pt=_t(["mspace"],[],G);pt.style.marginRight=Ge(Q),ct.unshift(pt)}return _t(["mop","op-limits"],ct,G)},kK=new Set(["\\smallint"]),_g=(E,w)=>{let L,G,Y=!1,Q;E.type==="supsub"?(L=E.sup,G=E.sub,Q=Fr(E.base,"op"),Y=!0):Q=Fr(E,"op");let ae=w.style,be=!1;ae.size===z.DISPLAY.size&&Q.symbol&&!kK.has(Q.name)&&(be=!0);let Ie,$e;if(Q.symbol){let wt=be?"Size2-Regular":"Size1-Regular",Et="";if((Q.name==="\\oiint"||Q.name==="\\oiiint")&&(Et=Q.name.slice(1),Q.name=Et==="oiint"?"\\iint":"\\iiint"),Ie=ia(Q.name,wt,"math",w,["mop","op-symbol",be?"large-op":"small-op"]),$e=Ie.italic,Et.length>0){let Jt=Kn(Et+"Size"+(be?"2":"1"),w);Ie=Ot({positionType:"individualShift",children:[{type:"elem",elem:Ie,shift:0},{type:"elem",elem:Jt,shift:be?.08:0}]},w),Q.name="\\"+Et,Ie.classes.unshift("mop"),Ie.italic=$e}}else if(Q.body){let wt=Ma(Q.body,w,!0);wt.length===1&&wt[0]instanceof K?(Ie=wt[0],Ie.classes[0]="mop"):Ie=_t(["mop"],wt,w)}else{let wt=[];for(let Et=1;Et{let L;if(E.symbol)L=new zt("mo",[jl(E.name,E.mode)]),kK.has(E.name)&&L.setAttribute("largeop","false");else if(E.body)L=new zt("mo",bl(E.body,w));else{L=new zt("mi",[new ma(E.name.slice(1))]);let G=new zt("mo",[jl("\u2061","text")]);E.parentIsSupSub?L=new zt("mrow",[L,G]):L=Nj([L,G])}return L},rPe={"\u220F":"\\prod","\u2210":"\\coprod","\u2211":"\\sum","\u22C0":"\\bigwedge","\u22C1":"\\bigvee","\u22C2":"\\bigcap","\u22C3":"\\bigcup","\u2A00":"\\bigodot","\u2A01":"\\bigoplus","\u2A02":"\\bigotimes","\u2A04":"\\biguplus","\u2A06":"\\bigsqcup"};Qt({type:"op",names:["\\coprod","\\bigvee","\\bigwedge","\\biguplus","\\bigcap","\\bigcup","\\intop","\\prod","\\sum","\\bigotimes","\\bigoplus","\\bigodot","\\bigsqcup","\\smallint","\u220F","\u2210","\u2211","\u22C0","\u22C1","\u22C2","\u22C3","\u2A00","\u2A01","\u2A02","\u2A04","\u2A06"],props:{numArgs:0},handler:(E,w)=>{let{parser:L,funcName:G}=E,Y=G;return Y.length===1&&(Y=rPe[Y]),{type:"op",mode:L.mode,limits:!0,parentIsSupSub:!1,symbol:!0,name:Y}},htmlBuilder:_g,mathmlBuilder:Ab}),Qt({type:"op",names:["\\mathop"],props:{numArgs:1,primitive:!0},handler:(E,w)=>{let{parser:L}=E,G=w[0];return{type:"op",mode:L.mode,limits:!1,parentIsSupSub:!1,symbol:!1,body:pa(G)}},htmlBuilder:_g,mathmlBuilder:Ab});let nPe={"\u222B":"\\int","\u222C":"\\iint","\u222D":"\\iiint","\u222E":"\\oint","\u222F":"\\oiint","\u2230":"\\oiiint"};Qt({type:"op",names:["\\arcsin","\\arccos","\\arctan","\\arctg","\\arcctg","\\arg","\\ch","\\cos","\\cosec","\\cosh","\\cot","\\cotg","\\coth","\\csc","\\ctg","\\cth","\\deg","\\dim","\\exp","\\hom","\\ker","\\lg","\\ln","\\log","\\sec","\\sin","\\sinh","\\sh","\\tan","\\tanh","\\tg","\\th"],props:{numArgs:0},handler(E){let{parser:w,funcName:L}=E;return{type:"op",mode:w.mode,limits:!1,parentIsSupSub:!1,symbol:!1,name:L}},htmlBuilder:_g,mathmlBuilder:Ab}),Qt({type:"op",names:["\\det","\\gcd","\\inf","\\lim","\\max","\\min","\\Pr","\\sup"],props:{numArgs:0},handler(E){let{parser:w,funcName:L}=E;return{type:"op",mode:w.mode,limits:!0,parentIsSupSub:!1,symbol:!1,name:L}},htmlBuilder:_g,mathmlBuilder:Ab}),Qt({type:"op",names:["\\int","\\iint","\\iiint","\\oint","\\oiint","\\oiiint","\u222B","\u222C","\u222D","\u222E","\u222F","\u2230"],props:{numArgs:0,allowedInArgument:!0},handler(E){let{parser:w,funcName:L}=E,G=L;return G.length===1&&(G=nPe[G]),{type:"op",mode:w.mode,limits:!1,parentIsSupSub:!1,symbol:!0,name:G}},htmlBuilder:_g,mathmlBuilder:Ab});let TK=(E,w)=>{let L,G,Y=!1,Q;E.type==="supsub"?(L=E.sup,G=E.sub,Q=Fr(E.base,"operatorname"),Y=!0):Q=Fr(E,"operatorname");let ae;if(Q.body.length>0){let be=Q.body.map($e=>{let it="text"in $e?$e.text:void 0;return typeof it=="string"?{type:"textord",mode:$e.mode,text:it}:$e}),Ie=Ma(be,w.withFont("mathrm"),!0);for(let $e=0;$e{let{parser:L,funcName:G}=E,Y=w[0];return{type:"operatorname",mode:L.mode,body:pa(Y),alwaysHandleSupSub:G==="\\operatornamewithlimits",limits:!1,parentIsSupSub:!1}},htmlBuilder:TK,mathmlBuilder:(E,w)=>{let L=bl(E.body,w.withFont("mathrm")),G=!0;for(let ae=0;aebe.toText()).join("");L=[new ma(ae)]}let Y=new zt("mi",L);Y.setAttribute("mathvariant","normal");let Q=new zt("mo",[jl("\u2061","text")]);return E.parentIsSupSub?new zt("mrow",[Y,Q]):Nj([Y,Q])}}),Ce("\\operatorname","\\@ifstar\\operatornamewithlimits\\operatorname@"),n1({type:"ordgroup",htmlBuilder(E,w){return E.semisimple?et(Ma(E.body,w,!1)):_t(["mord"],Ma(E.body,w,!0),w)},mathmlBuilder(E,w){return Df(E.body,w,!0)}}),Qt({type:"overline",names:["\\overline"],props:{numArgs:1},handler(E,w){let{parser:L}=E,G=w[0];return{type:"overline",mode:L.mode,body:G}},htmlBuilder(E,w){let L=Tn(E.body,w.havingCrampedStyle()),G=Nt("overline-line",w),Y=w.fontMetrics().defaultRuleThickness,Q=Ot({positionType:"firstBaseline",children:[{type:"elem",elem:L},{type:"kern",size:3*Y},{type:"elem",elem:G},{type:"kern",size:Y}]},w);return _t(["mord","overline"],[Q],w)},mathmlBuilder(E,w){let L=new zt("mo",[new ma("\u203E")]);L.setAttribute("stretchy","true");let G=new zt("mover",[Zn(E.body,w),L]);return G.setAttribute("accent","true"),G}}),Qt({type:"phantom",names:["\\phantom"],props:{numArgs:1,allowedInText:!0},handler:(E,w)=>{let{parser:L}=E,G=w[0];return{type:"phantom",mode:L.mode,body:pa(G)}},htmlBuilder:(E,w)=>{let L=Ma(E.body,w.withPhantom(),!1);return et(L)},mathmlBuilder:(E,w)=>{let L=bl(E.body,w);return new zt("mphantom",L)}}),Ce("\\hphantom","\\smash{\\phantom{#1}}"),Qt({type:"vphantom",names:["\\vphantom"],props:{numArgs:1,allowedInText:!0},handler:(E,w)=>{let{parser:L}=E,G=w[0];return{type:"vphantom",mode:L.mode,body:G}},htmlBuilder:(E,w)=>{let L=_t(["inner"],[Tn(E.body,w.withPhantom())]),G=_t(["fix"],[]);return _t(["mord","rlap"],[L,G],w)},mathmlBuilder:(E,w)=>{let L=bl(pa(E.body),w),G=new zt("mphantom",L),Y=new zt("mpadded",[G]);return Y.setAttribute("width","0px"),Y}}),Qt({type:"raisebox",names:["\\raisebox"],props:{numArgs:2,argTypes:["size","hbox"],allowedInText:!0},handler(E,w){let{parser:L}=E,G=Fr(w[0],"size").value,Y=w[1];return{type:"raisebox",mode:L.mode,dy:G,body:Y}},htmlBuilder(E,w){let L=Tn(E.body,w),G=Ye(E.dy,w);return Ot({positionType:"shift",positionData:-G,children:[{type:"elem",elem:L}]},w)},mathmlBuilder(E,w){let L=new zt("mpadded",[Zn(E.body,w)]),G=E.dy.number+E.dy.unit;return L.setAttribute("voffset",G),L}}),Qt({type:"internal",names:["\\relax"],props:{numArgs:0,allowedInText:!0,allowedInArgument:!0},handler(E){let{parser:w}=E;return{type:"internal",mode:w.mode}}}),Qt({type:"rule",names:["\\rule"],props:{numArgs:2,numOptionalArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:["size","size","size"]},handler(E,w,L){let{parser:G}=E,Y=L[0],Q=Fr(w[0],"size"),ae=Fr(w[1],"size");return{type:"rule",mode:G.mode,shift:Y&&Fr(Y,"size").value,width:Q.value,height:ae.value}},htmlBuilder(E,w){let L=_t(["mord","rule"],[],w),G=Ye(E.width,w),Y=Ye(E.height,w),Q=E.shift?Ye(E.shift,w):0;return L.style.borderRightWidth=Ge(G),L.style.borderTopWidth=Ge(Y),L.style.bottom=Ge(Q),L.width=G,L.height=Y+Q,L.depth=-Q,L.maxFontSize=Y*1.125*w.sizeMultiplier,L},mathmlBuilder(E,w){let L=Ye(E.width,w),G=Ye(E.height,w),Y=E.shift?Ye(E.shift,w):0,Q=w.color&&w.getColor()||"black",ae=new zt("mspace");ae.setAttribute("mathbackground",Q),ae.setAttribute("width",Ge(L)),ae.setAttribute("height",Ge(G));let be=new zt("mpadded",[ae]);return Y>=0?be.setAttribute("height",Ge(Y)):(be.setAttribute("height",Ge(Y)),be.setAttribute("depth",Ge(-Y))),be.setAttribute("voffset",Ge(Y)),be}});function EK(E,w,L){let G=Ma(E,w,!1),Y=w.sizeMultiplier/L.sizeMultiplier;for(let Q=0;Q{let{breakOnTokenText:L,funcName:G,parser:Y}=E,Q=Y.parseExpression(!1,L);return{type:"sizing",mode:Y.mode,size:SK.indexOf(G)+1,body:Q}},htmlBuilder:(E,w)=>{let L=w.havingSize(E.size);return EK(E.body,L,w)},mathmlBuilder:(E,w)=>{let L=w.havingSize(E.size),G=bl(E.body,L),Y=new zt("mstyle",G);return Y.setAttribute("mathsize",Ge(L.sizeMultiplier)),Y}}),Qt({type:"smash",names:["\\smash"],props:{numArgs:1,numOptionalArgs:1,allowedInText:!0},handler:(E,w,L)=>{let{parser:G}=E,Y=!1,Q=!1,ae=L[0]&&Fr(L[0],"ordgroup");if(ae){let Ie;for(let $e=0;$e{let L=_t([],[Tn(E.body,w)]);if(!E.smashHeight&&!E.smashDepth)return L;if(E.smashHeight&&(L.height=0),E.smashDepth&&(L.depth=0),E.smashHeight&&E.smashDepth)return _t(["mord","smash"],[L],w);if(L.children)for(let Y=0;Y{let L=new zt("mpadded",[Zn(E.body,w)]);return E.smashHeight&&L.setAttribute("height","0px"),E.smashDepth&&L.setAttribute("depth","0px"),L}}),Qt({type:"sqrt",names:["\\sqrt"],props:{numArgs:1,numOptionalArgs:1},handler(E,w,L){let{parser:G}=E,Y=L[0],Q=w[0];return{type:"sqrt",mode:G.mode,body:Q,index:Y}},htmlBuilder(E,w){let L=Tn(E.body,w.havingCrampedStyle());L.height===0&&(L.height=w.fontMetrics().xHeight),L=Tt(L,w);let Y=w.fontMetrics().defaultRuleThickness,Q=Y;w.style.idL.height+L.depth+ae&&(ae=(ae+ct-L.height-L.depth)/2);let pt=Ie.height-L.height-ae-$e;L.style.paddingLeft=Ge(it);let wt=Ot({positionType:"firstBaseline",children:[{type:"elem",elem:L,wrapperClasses:["svg-align"]},{type:"kern",size:-(L.height+pt)},{type:"elem",elem:Ie},{type:"kern",size:$e}]},w);if(E.index){let Et=w.havingStyle(z.SCRIPTSCRIPT),Jt=Tn(E.index,Et,w),zr=.6*(wt.height-wt.depth),Lr=Ot({positionType:"shift",positionData:-zr,children:[{type:"elem",elem:Jt}]},w),Kr=_t(["root"],[Lr]);return _t(["mord","sqrt"],[Kr,wt],w)}else return _t(["mord","sqrt"],[wt],w)},mathmlBuilder(E,w){let{body:L,index:G}=E;return G?new zt("mroot",[Zn(L,w),Zn(G,w)]):new zt("msqrt",[Zn(L,w)])}});let GD={display:z.DISPLAY,text:z.TEXT,script:z.SCRIPT,scriptscript:z.SCRIPTSCRIPT};function iPe(E){return E in GD}Qt({type:"styling",names:["\\displaystyle","\\textstyle","\\scriptstyle","\\scriptscriptstyle"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(E,w){let{breakOnTokenText:L,funcName:G,parser:Y}=E,Q=Y.parseExpression(!0,L),ae=G.slice(1,G.length-5);if(!iPe(ae))throw new Error("Unknown style: "+ae);return{type:"styling",mode:Y.mode,style:ae,body:Q}},htmlBuilder(E,w){let L=GD[E.style],G=w.havingStyle(L);return E.resetFont&&(G=G.withFont("")),EK(E.body,G,w)},mathmlBuilder(E,w){let L=GD[E.style],G=w.havingStyle(L);E.resetFont&&(G=G.withFont(""));let Y=bl(E.body,G),Q=new zt("mstyle",Y),be={display:["0","true"],text:["0","false"],script:["1","false"],scriptscript:["2","false"]}[E.style];return Q.setAttribute("scriptlevel",be[0]),Q.setAttribute("displaystyle",be[1]),Q}});let aPe=function(E,w){let L=E.base;return L?L.type==="op"?L.limits&&(w.style.size===z.DISPLAY.size||L.alwaysHandleSupSub)?_g:null:L.type==="operatorname"?L.alwaysHandleSupSub&&(w.style.size===z.DISPLAY.size||L.limits)?TK:null:L.type==="accent"?f(L.base)?_D:null:L.type==="horizBrace"&&!E.sub===L.isOver?xK:null:null};n1({type:"supsub",htmlBuilder(E,w){let L=aPe(E,w);if(L)return L(E,w);let{base:G,sup:Y,sub:Q}=E,ae=Tn(G,w),be,Ie,$e=w.fontMetrics(),it=0,ct=0,pt=G&&f(G);if(Y){let Fn=w.havingStyle(w.style.sup());be=Tn(Y,Fn,w),pt||(it=ae.height-Fn.fontMetrics().supDrop*Fn.sizeMultiplier/w.sizeMultiplier)}if(Q){let Fn=w.havingStyle(w.style.sub());Ie=Tn(Q,Fn,w),pt||(ct=ae.depth+Fn.fontMetrics().subDrop*Fn.sizeMultiplier/w.sizeMultiplier)}let wt;w.style===z.DISPLAY?wt=$e.sup1:w.style.cramped?wt=$e.sup3:wt=$e.sup2;let Et=w.sizeMultiplier,Jt=Ge(.5/$e.ptPerEm/Et),zr=null;if(Ie){let Fn=E.base&&E.base.type==="op"&&E.base.name&&(E.base.name==="\\oiint"||E.base.name==="\\oiiint");if(ae instanceof K||Fn){var Lr;zr=Ge(-((Lr=ae.italic)!=null?Lr:0))}}let Kr;if(be&&Ie){it=Math.max(it,wt,be.depth+.25*$e.xHeight),ct=Math.max(ct,$e.sub2);let ya=4*$e.defaultRuleThickness;if(it-be.depth-(Ie.height-ct)0&&(it+=va,ct-=va)}let xs=[{type:"elem",elem:Ie,shift:ct,marginRight:Jt,marginLeft:zr},{type:"elem",elem:be,shift:-it,marginRight:Jt}];Kr=Ot({positionType:"individualShift",children:xs},w)}else if(Ie)ct=Math.max(ct,$e.sub1,Ie.height-.8*$e.xHeight),Kr=Ot({positionType:"shift",positionData:ct,children:[{type:"elem",elem:Ie,marginLeft:zr,marginRight:Jt}]},w);else if(be)it=Math.max(it,wt,be.depth+.25*$e.xHeight),Kr=Ot({positionType:"shift",positionData:-it,children:[{type:"elem",elem:be,marginRight:Jt}]},w);else throw new Error("supsub must have either sup or sub.");let ga=kD(ae,"right")||"mord";return _t([ga],[ae,_t(["msupsub"],[Kr])],w)},mathmlBuilder(E,w){let L=!1,G,Y;E.base&&E.base.type==="horizBrace"&&(Y=!!E.sup,Y===E.base.isOver&&(L=!0,G=E.base.isOver)),E.base&&(E.base.type==="op"||E.base.type==="operatorname")&&(E.base.parentIsSupSub=!0);let Q=[Zn(E.base,w)];E.sub&&Q.push(Zn(E.sub,w)),E.sup&&Q.push(Zn(E.sup,w));let ae;if(L)ae=G?"mover":"munder";else if(E.sub)if(E.sup){let be=E.base;be&&be.type==="op"&&be.limits&&w.style===z.DISPLAY||be&&be.type==="operatorname"&&be.alwaysHandleSupSub&&(w.style===z.DISPLAY||be.limits)?ae="munderover":ae="msubsup"}else{let be=E.base;be&&be.type==="op"&&be.limits&&(w.style===z.DISPLAY||be.alwaysHandleSupSub)||be&&be.type==="operatorname"&&be.alwaysHandleSupSub&&(be.limits||w.style===z.DISPLAY)?ae="munder":ae="msub"}else{let be=E.base;be&&be.type==="op"&&be.limits&&(w.style===z.DISPLAY||be.alwaysHandleSupSub)||be&&be.type==="operatorname"&&be.alwaysHandleSupSub&&(be.limits||w.style===z.DISPLAY)?ae="mover":ae="msup"}return new zt(ae,Q)}}),n1({type:"atom",htmlBuilder(E,w){return Rf(E.text,E.mode,w,["m"+E.family])},mathmlBuilder(E,w){let L=new zt("mo",[jl(E.text,E.mode)]);if(E.family==="bin"){let G=SD(E,w);G==="bold-italic"&&L.setAttribute("mathvariant",G)}else E.family==="punct"?L.setAttribute("separator","true"):(E.family==="open"||E.family==="close")&&L.setAttribute("stretchy","false");return L}});let CK={mi:"italic",mn:"normal",mtext:"normal"};n1({type:"mathord",htmlBuilder(E,w){return uh(E,w,"mathord")},mathmlBuilder(E,w){let L=new zt("mi",[jl(E.text,E.mode,w)]),G=SD(E,w)||"italic";return G!==CK[L.type]&&L.setAttribute("mathvariant",G),L}}),n1({type:"textord",htmlBuilder(E,w){return uh(E,w,"textord")},mathmlBuilder(E,w){let L=jl(E.text,E.mode,w),G=SD(E,w)||"normal",Y;return E.mode==="text"?Y=new zt("mtext",[L]):/[0-9]/.test(E.text)?Y=new zt("mn",[L]):E.text==="\\prime"?Y=new zt("mo",[L]):Y=new zt("mi",[L]),G!==CK[Y.type]&&Y.setAttribute("mathvariant",G),Y}});let qD={"\\nobreak":"nobreak","\\allowbreak":"allowbreak"},UD={" ":{},"\\ ":{},"~":{className:"nobreak"},"\\space":{},"\\nobreakspace":{className:"nobreak"}};n1({type:"spacing",htmlBuilder(E,w){if(UD.hasOwnProperty(E.text)){let L=UD[E.text].className||"";if(E.mode==="text"){let G=uh(E,w,"textord");return G.classes.push(L),G}else return _t(["mspace",L],[Rf(E.text,E.mode,w)],w)}else{if(qD.hasOwnProperty(E.text))return _t(["mspace",qD[E.text]],[],w);throw new n('Unknown type of space "'+E.text+'"')}},mathmlBuilder(E,w){let L;if(UD.hasOwnProperty(E.text))L=new zt("mtext",[new ma("\xA0")]);else{if(qD.hasOwnProperty(E.text))return new zt("mspace");throw new n('Unknown type of space "'+E.text+'"')}return L}});let _K=()=>{let E=new zt("mtd",[]);return E.setAttribute("width","50%"),E};n1({type:"tag",mathmlBuilder(E,w){let L=new zt("mtable",[new zt("mtr",[_K(),new zt("mtd",[Df(E.body,w)]),_K(),new zt("mtd",[Df(E.tag,w)])])]);return L.setAttribute("width","100%"),L}});let AK={"\\text":void 0,"\\textrm":"textrm","\\textsf":"textsf","\\texttt":"texttt","\\textnormal":"textrm"},LK={"\\textbf":"textbf","\\textmd":"textmd"},sPe={"\\textit":"textit","\\textup":"textup"},RK=(E,w)=>{let L=E.font;if(L){if(AK[L])return w.withTextFontFamily(AK[L]);if(LK[L])return w.withTextFontWeight(LK[L]);if(L==="\\emph")return w.fontShape==="textit"?w.withTextFontShape("textup"):w.withTextFontShape("textit")}else return w;return w.withTextFontShape(sPe[L])};Qt({type:"text",names:["\\text","\\textrm","\\textsf","\\texttt","\\textnormal","\\textbf","\\textmd","\\textit","\\textup","\\emph"],props:{numArgs:1,argTypes:["text"],allowedInArgument:!0,allowedInText:!0},handler(E,w){let{parser:L,funcName:G}=E,Y=w[0];return{type:"text",mode:L.mode,body:pa(Y),font:G}},htmlBuilder(E,w){let L=RK(E,w),G=Ma(E.body,L,!0);return _t(["mord","text"],G,L)},mathmlBuilder(E,w){let L=RK(E,w);return Df(E.body,L)}}),Qt({type:"underline",names:["\\underline"],props:{numArgs:1,allowedInText:!0},handler(E,w){let{parser:L}=E;return{type:"underline",mode:L.mode,body:w[0]}},htmlBuilder(E,w){let L=Tn(E.body,w),G=Nt("underline-line",w),Y=w.fontMetrics().defaultRuleThickness,Q=Ot({positionType:"top",positionData:L.height,children:[{type:"kern",size:Y},{type:"elem",elem:G},{type:"kern",size:3*Y},{type:"elem",elem:L}]},w);return _t(["mord","underline"],[Q],w)},mathmlBuilder(E,w){let L=new zt("mo",[new ma("\u203E")]);L.setAttribute("stretchy","true");let G=new zt("munder",[Zn(E.body,w),L]);return G.setAttribute("accentunder","true"),G}}),Qt({type:"vcenter",names:["\\vcenter"],props:{numArgs:1,argTypes:["original"],allowedInText:!1},handler(E,w){let{parser:L}=E;return{type:"vcenter",mode:L.mode,body:w[0]}},htmlBuilder(E,w){let L=Tn(E.body,w),G=w.fontMetrics().axisHeight,Y=.5*(L.height-G-(L.depth+G));return Ot({positionType:"shift",positionData:Y,children:[{type:"elem",elem:L}]},w)},mathmlBuilder(E,w){let L=new zt("mpadded",[Zn(E.body,w)],["vcenter"]);return new zt("mrow",[L])}}),Qt({type:"verb",names:["\\verb"],props:{numArgs:0,allowedInText:!0},handler(E,w,L){throw new n("\\verb ended by end of line instead of matching delimiter")},htmlBuilder(E,w){let L=DK(E),G=[],Y=w.havingStyle(w.style.text());for(let Q=0;QE.body.replace(/ /g,E.star?"\u2423":"\xA0");var Mf=Ij;let IK=`[ \r + ]`,oPe="\\\\[a-zA-Z@]+",lPe="\\\\[^\uD800-\uDFFF]",uPe="("+oPe+")"+IK+"*",cPe=`\\\\( +|[ \r ]+ +?)[ \r ]*`,HD="[\u0300-\u036F]",hPe=new RegExp(HD+"+$"),fPe="("+IK+"+)|"+(cPe+"|")+"([!-\\[\\]-\u2027\u202A-\uD7FF\uF900-\uFFFF]"+(HD+"*")+"|[\uD800-\uDBFF][\uDC00-\uDFFF]"+(HD+"*")+"|\\\\verb\\*([^]).*?\\4|\\\\verb([^*a-zA-Z]).*?\\5"+("|"+uPe)+("|"+lPe+")");class MK{constructor(w,L){this.input=void 0,this.settings=void 0,this.tokenRegex=void 0,this.catcodes=void 0,this.input=w,this.settings=L,this.tokenRegex=new RegExp(fPe,"g"),this.catcodes={"%":14,"~":13}}setCatcode(w,L){this.catcodes[w]=L}lex(){let w=this.input,L=this.tokenRegex.lastIndex;if(L===w.length)return new wl("EOF",new qo(this,L,L));let G=this.tokenRegex.exec(w);if(G===null||G.index!==L)throw new n("Unexpected character: '"+w[L]+"'",new wl(w[L],new qo(this,L,L+1)));let Y=G[6]||G[3]||(G[2]?"\\ ":" ");if(this.catcodes[Y]===14){let Q=w.indexOf(` +`,this.tokenRegex.lastIndex);return Q===-1?(this.tokenRegex.lastIndex=w.length,this.settings.reportNonstrict("commentAtEnd","% comment has no terminating newline; LaTeX would fail because of commenting the end of math mode (e.g. $)")):this.tokenRegex.lastIndex=Q+1,this.lex()}return new wl(Y,new qo(this,L,this.tokenRegex.lastIndex))}}class dPe{constructor(w,L){w===void 0&&(w={}),L===void 0&&(L={}),this.current=void 0,this.builtins=void 0,this.undefStack=void 0,this.current=L,this.builtins=w,this.undefStack=[]}beginGroup(){this.undefStack.push({})}endGroup(){if(this.undefStack.length===0)throw new n("Unbalanced namespace destruction: attempt to pop global namespace; please report this as a bug");let w=this.undefStack.pop();for(let L in w)w.hasOwnProperty(L)&&(w[L]==null?delete this.current[L]:this.current[L]=w[L])}endGroups(){for(;this.undefStack.length>0;)this.endGroup()}has(w){return this.current.hasOwnProperty(w)||this.builtins.hasOwnProperty(w)}get(w){return this.current.hasOwnProperty(w)?this.current[w]:this.builtins[w]}set(w,L,G){if(G===void 0&&(G=!1),G){for(let Y=0;Y0&&(this.undefStack[this.undefStack.length-1][w]=L)}else{let Y=this.undefStack[this.undefStack.length-1];Y&&!Y.hasOwnProperty(w)&&(Y[w]=this.current[w])}L==null?delete this.current[w]:this.current[w]=L}}var pPe=uK;Ce("\\noexpand",function(E){let w=E.popToken();return E.isExpandable(w.text)&&(w.noexpand=!0,w.treatAsRelax=!0),{tokens:[w],numArgs:0}}),Ce("\\expandafter",function(E){let w=E.popToken();return E.expandOnce(!0),{tokens:[w],numArgs:0}}),Ce("\\@firstoftwo",function(E){return{tokens:E.consumeArgs(2)[0],numArgs:0}}),Ce("\\@secondoftwo",function(E){return{tokens:E.consumeArgs(2)[1],numArgs:0}}),Ce("\\@ifnextchar",function(E){let w=E.consumeArgs(3);E.consumeSpaces();let L=E.future();return w[0].length===1&&w[0][0].text===L.text?{tokens:w[1],numArgs:0}:{tokens:w[2],numArgs:0}}),Ce("\\@ifstar","\\@ifnextchar *{\\@firstoftwo{#1}}"),Ce("\\TextOrMath",function(E){let w=E.consumeArgs(2);return E.mode==="text"?{tokens:w[0],numArgs:0}:{tokens:w[1],numArgs:0}});let NK={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,a:10,A:10,b:11,B:11,c:12,C:12,d:13,D:13,e:14,E:14,f:15,F:15};Ce("\\char",function(E){let w=E.popToken(),L,G=0;if(w.text==="'")L=8,w=E.popToken();else if(w.text==='"')L=16,w=E.popToken();else if(w.text==="`")if(w=E.popToken(),w.text[0]==="\\")G=w.text.charCodeAt(1);else{if(w.text==="EOF")throw new n("\\char` missing argument");G=w.text.charCodeAt(0)}else L=10;if(L){if(G=NK[w.text],G==null||G>=L)throw new n("Invalid base-"+L+" digit "+w.text);let Y;for(;(Y=NK[E.future().text])!=null&&Y{let Y=E.consumeArg().tokens;if(Y.length!==1)throw new n("\\newcommand's first argument must be a macro name");let Q=Y[0].text,ae=E.isDefined(Q);if(ae&&!w)throw new n("\\newcommand{"+Q+"} attempting to redefine "+(Q+"; use \\renewcommand"));if(!ae&&!L)throw new n("\\renewcommand{"+Q+"} when command "+Q+" does not yet exist; use \\newcommand");let be=0;if(Y=E.consumeArg().tokens,Y.length===1&&Y[0].text==="["){let Ie="",$e=E.expandNextToken();for(;$e.text!=="]"&&$e.text!=="EOF";)Ie+=$e.text,$e=E.expandNextToken();if(!Ie.match(/^\s*[0-9]+\s*$/))throw new n("Invalid number of arguments: "+Ie);be=parseInt(Ie),Y=E.consumeArg().tokens}return ae&&G||E.macros.set(Q,{tokens:Y,numArgs:be}),""};Ce("\\newcommand",E=>VD(E,!1,!0,!1)),Ce("\\renewcommand",E=>VD(E,!0,!1,!1)),Ce("\\providecommand",E=>VD(E,!0,!0,!0)),Ce("\\message",E=>{let w=E.consumeArgs(1)[0];return console.log(w.reverse().map(L=>L.text).join("")),""}),Ce("\\errmessage",E=>{let w=E.consumeArgs(1)[0];return console.error(w.reverse().map(L=>L.text).join("")),""}),Ce("\\show",E=>{let w=E.popToken(),L=w.text;return console.log(w,E.macros.get(L),Mf[L],yt.math[L],yt.text[L]),""}),Ce("\\bgroup","{"),Ce("\\egroup","}"),Ce("~","\\nobreakspace"),Ce("\\lq","`"),Ce("\\rq","'"),Ce("\\aa","\\r a"),Ce("\\AA","\\r A"),Ce("\\textcopyright","\\html@mathml{\\textcircled{c}}{\\char`\xA9}"),Ce("\\copyright","\\TextOrMath{\\textcopyright}{\\text{\\textcopyright}}"),Ce("\\textregistered","\\html@mathml{\\textcircled{\\scriptsize R}}{\\char`\xAE}"),Ce("\u212C","\\mathscr{B}"),Ce("\u2130","\\mathscr{E}"),Ce("\u2131","\\mathscr{F}"),Ce("\u210B","\\mathscr{H}"),Ce("\u2110","\\mathscr{I}"),Ce("\u2112","\\mathscr{L}"),Ce("\u2133","\\mathscr{M}"),Ce("\u211B","\\mathscr{R}"),Ce("\u212D","\\mathfrak{C}"),Ce("\u210C","\\mathfrak{H}"),Ce("\u2128","\\mathfrak{Z}"),Ce("\\Bbbk","\\Bbb{k}"),Ce("\\llap","\\mathllap{\\textrm{#1}}"),Ce("\\rlap","\\mathrlap{\\textrm{#1}}"),Ce("\\clap","\\mathclap{\\textrm{#1}}"),Ce("\\mathstrut","\\vphantom{(}"),Ce("\\underbar","\\underline{\\text{#1}}"),Ce("\\not",'\\html@mathml{\\mathrel{\\mathrlap\\@not}\\nobreak}{\\char"338}'),Ce("\\neq","\\html@mathml{\\mathrel{\\not=}}{\\mathrel{\\char`\u2260}}"),Ce("\\ne","\\neq"),Ce("\u2260","\\neq"),Ce("\\notin","\\html@mathml{\\mathrel{{\\in}\\mathllap{/\\mskip1mu}}}{\\mathrel{\\char`\u2209}}"),Ce("\u2209","\\notin"),Ce("\u2258","\\html@mathml{\\mathrel{=\\kern{-1em}\\raisebox{0.4em}{$\\scriptsize\\frown$}}}{\\mathrel{\\char`\u2258}}"),Ce("\u2259","\\html@mathml{\\stackrel{\\tiny\\wedge}{=}}{\\mathrel{\\char`\u2258}}"),Ce("\u225A","\\html@mathml{\\stackrel{\\tiny\\vee}{=}}{\\mathrel{\\char`\u225A}}"),Ce("\u225B","\\html@mathml{\\stackrel{\\scriptsize\\star}{=}}{\\mathrel{\\char`\u225B}}"),Ce("\u225D","\\html@mathml{\\stackrel{\\tiny\\mathrm{def}}{=}}{\\mathrel{\\char`\u225D}}"),Ce("\u225E","\\html@mathml{\\stackrel{\\tiny\\mathrm{m}}{=}}{\\mathrel{\\char`\u225E}}"),Ce("\u225F","\\html@mathml{\\stackrel{\\tiny?}{=}}{\\mathrel{\\char`\u225F}}"),Ce("\u27C2","\\perp"),Ce("\u203C","\\mathclose{!\\mkern-0.8mu!}"),Ce("\u220C","\\notni"),Ce("\u231C","\\ulcorner"),Ce("\u231D","\\urcorner"),Ce("\u231E","\\llcorner"),Ce("\u231F","\\lrcorner"),Ce("\xA9","\\copyright"),Ce("\xAE","\\textregistered"),Ce("\\ulcorner",'\\html@mathml{\\@ulcorner}{\\mathop{\\char"231c}}'),Ce("\\urcorner",'\\html@mathml{\\@urcorner}{\\mathop{\\char"231d}}'),Ce("\\llcorner",'\\html@mathml{\\@llcorner}{\\mathop{\\char"231e}}'),Ce("\\lrcorner",'\\html@mathml{\\@lrcorner}{\\mathop{\\char"231f}}'),Ce("\\vdots","{\\varvdots\\rule{0pt}{15pt}}"),Ce("\u22EE","\\vdots"),Ce("\\varGamma","\\mathit{\\Gamma}"),Ce("\\varDelta","\\mathit{\\Delta}"),Ce("\\varTheta","\\mathit{\\Theta}"),Ce("\\varLambda","\\mathit{\\Lambda}"),Ce("\\varXi","\\mathit{\\Xi}"),Ce("\\varPi","\\mathit{\\Pi}"),Ce("\\varSigma","\\mathit{\\Sigma}"),Ce("\\varUpsilon","\\mathit{\\Upsilon}"),Ce("\\varPhi","\\mathit{\\Phi}"),Ce("\\varPsi","\\mathit{\\Psi}"),Ce("\\varOmega","\\mathit{\\Omega}"),Ce("\\substack","\\begin{subarray}{c}#1\\end{subarray}"),Ce("\\colon","\\nobreak\\mskip2mu\\mathpunct{}\\mathchoice{\\mkern-3mu}{\\mkern-3mu}{}{}{:}\\mskip6mu\\relax"),Ce("\\boxed","\\fbox{$\\displaystyle{#1}$}"),Ce("\\iff","\\DOTSB\\;\\Longleftrightarrow\\;"),Ce("\\implies","\\DOTSB\\;\\Longrightarrow\\;"),Ce("\\impliedby","\\DOTSB\\;\\Longleftarrow\\;"),Ce("\\dddot","{\\overset{\\raisebox{-0.1ex}{\\normalsize ...}}{#1}}"),Ce("\\ddddot","{\\overset{\\raisebox{-0.1ex}{\\normalsize ....}}{#1}}");let OK={",":"\\dotsc","\\not":"\\dotsb","+":"\\dotsb","=":"\\dotsb","<":"\\dotsb",">":"\\dotsb","-":"\\dotsb","*":"\\dotsb",":":"\\dotsb","\\DOTSB":"\\dotsb","\\coprod":"\\dotsb","\\bigvee":"\\dotsb","\\bigwedge":"\\dotsb","\\biguplus":"\\dotsb","\\bigcap":"\\dotsb","\\bigcup":"\\dotsb","\\prod":"\\dotsb","\\sum":"\\dotsb","\\bigotimes":"\\dotsb","\\bigoplus":"\\dotsb","\\bigodot":"\\dotsb","\\bigsqcup":"\\dotsb","\\And":"\\dotsb","\\longrightarrow":"\\dotsb","\\Longrightarrow":"\\dotsb","\\longleftarrow":"\\dotsb","\\Longleftarrow":"\\dotsb","\\longleftrightarrow":"\\dotsb","\\Longleftrightarrow":"\\dotsb","\\mapsto":"\\dotsb","\\longmapsto":"\\dotsb","\\hookrightarrow":"\\dotsb","\\doteq":"\\dotsb","\\mathbin":"\\dotsb","\\mathrel":"\\dotsb","\\relbar":"\\dotsb","\\Relbar":"\\dotsb","\\xrightarrow":"\\dotsb","\\xleftarrow":"\\dotsb","\\DOTSI":"\\dotsi","\\int":"\\dotsi","\\oint":"\\dotsi","\\iint":"\\dotsi","\\iiint":"\\dotsi","\\iiiint":"\\dotsi","\\idotsint":"\\dotsi","\\DOTSX":"\\dotsx"},mPe=new Set(["bin","rel"]);Ce("\\dots",function(E){let w="\\dotso",L=E.expandAfterFuture().text;return L in OK?w=OK[L]:(L.slice(0,4)==="\\not"||L in yt.math&&mPe.has(yt.math[L].group))&&(w="\\dotsb"),w});let WD={")":!0,"]":!0,"\\rbrack":!0,"\\}":!0,"\\rbrace":!0,"\\rangle":!0,"\\rceil":!0,"\\rfloor":!0,"\\rgroup":!0,"\\rmoustache":!0,"\\right":!0,"\\bigr":!0,"\\biggr":!0,"\\Bigr":!0,"\\Biggr":!0,$:!0,";":!0,".":!0,",":!0};Ce("\\dotso",function(E){return E.future().text in WD?"\\ldots\\,":"\\ldots"}),Ce("\\dotsc",function(E){let w=E.future().text;return w in WD&&w!==","?"\\ldots\\,":"\\ldots"}),Ce("\\cdots",function(E){return E.future().text in WD?"\\@cdots\\,":"\\@cdots"}),Ce("\\dotsb","\\cdots"),Ce("\\dotsm","\\cdots"),Ce("\\dotsi","\\!\\cdots"),Ce("\\dotsx","\\ldots\\,"),Ce("\\DOTSI","\\relax"),Ce("\\DOTSB","\\relax"),Ce("\\DOTSX","\\relax"),Ce("\\tmspace","\\TextOrMath{\\kern#1#3}{\\mskip#1#2}\\relax"),Ce("\\,","\\tmspace+{3mu}{.1667em}"),Ce("\\thinspace","\\,"),Ce("\\>","\\mskip{4mu}"),Ce("\\:","\\tmspace+{4mu}{.2222em}"),Ce("\\medspace","\\:"),Ce("\\;","\\tmspace+{5mu}{.2777em}"),Ce("\\thickspace","\\;"),Ce("\\!","\\tmspace-{3mu}{.1667em}"),Ce("\\negthinspace","\\!"),Ce("\\negmedspace","\\tmspace-{4mu}{.2222em}"),Ce("\\negthickspace","\\tmspace-{5mu}{.277em}"),Ce("\\enspace","\\kern.5em "),Ce("\\enskip","\\hskip.5em\\relax"),Ce("\\quad","\\hskip1em\\relax"),Ce("\\qquad","\\hskip2em\\relax"),Ce("\\tag","\\@ifstar\\tag@literal\\tag@paren"),Ce("\\tag@paren","\\tag@literal{({#1})}"),Ce("\\tag@literal",E=>{if(E.macros.get("\\df@tag"))throw new n("Multiple \\tag");return"\\gdef\\df@tag{\\text{#1}}"}),Ce("\\bmod","\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}\\mathbin{\\rm mod}\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}"),Ce("\\pod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern8mu}{\\mkern8mu}{\\mkern8mu}(#1)"),Ce("\\pmod","\\pod{{\\rm mod}\\mkern6mu#1}"),Ce("\\mod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern12mu}{\\mkern12mu}{\\mkern12mu}{\\rm mod}\\,\\,#1"),Ce("\\newline","\\\\\\relax"),Ce("\\TeX","\\textrm{\\html@mathml{T\\kern-.1667em\\raisebox{-.5ex}{E}\\kern-.125emX}{TeX}}");let PK=Ge(We["Main-Regular"][84][1]-.7*We["Main-Regular"][65][1]);Ce("\\LaTeX","\\textrm{\\html@mathml{"+("L\\kern-.36em\\raisebox{"+PK+"}{\\scriptstyle A}")+"\\kern-.15em\\TeX}{LaTeX}}"),Ce("\\KaTeX","\\textrm{\\html@mathml{"+("K\\kern-.17em\\raisebox{"+PK+"}{\\scriptstyle A}")+"\\kern-.15em\\TeX}{KaTeX}}"),Ce("\\hspace","\\@ifstar\\@hspacer\\@hspace"),Ce("\\@hspace","\\hskip #1\\relax"),Ce("\\@hspacer","\\rule{0pt}{0pt}\\hskip #1\\relax"),Ce("\\ordinarycolon",":"),Ce("\\vcentcolon","\\mathrel{\\mathop\\ordinarycolon}"),Ce("\\dblcolon",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-.9mu}\\vcentcolon}}{\\mathop{\\char"2237}}'),Ce("\\coloneqq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2254}}'),Ce("\\Coloneqq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2237\\char"3d}}'),Ce("\\coloneq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"3a\\char"2212}}'),Ce("\\Coloneq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"2237\\char"2212}}'),Ce("\\eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2255}}'),Ce("\\Eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"3d\\char"2237}}'),Ce("\\eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2239}}'),Ce("\\Eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"2212\\char"2237}}'),Ce("\\colonapprox",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"3a\\char"2248}}'),Ce("\\Colonapprox",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"2237\\char"2248}}'),Ce("\\colonsim",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"3a\\char"223c}}'),Ce("\\Colonsim",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"2237\\char"223c}}'),Ce("\u2237","\\dblcolon"),Ce("\u2239","\\eqcolon"),Ce("\u2254","\\coloneqq"),Ce("\u2255","\\eqqcolon"),Ce("\u2A74","\\Coloneqq"),Ce("\\ratio","\\vcentcolon"),Ce("\\coloncolon","\\dblcolon"),Ce("\\colonequals","\\coloneqq"),Ce("\\coloncolonequals","\\Coloneqq"),Ce("\\equalscolon","\\eqqcolon"),Ce("\\equalscoloncolon","\\Eqqcolon"),Ce("\\colonminus","\\coloneq"),Ce("\\coloncolonminus","\\Coloneq"),Ce("\\minuscolon","\\eqcolon"),Ce("\\minuscoloncolon","\\Eqcolon"),Ce("\\coloncolonapprox","\\Colonapprox"),Ce("\\coloncolonsim","\\Colonsim"),Ce("\\simcolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\vcentcolon}"),Ce("\\simcoloncolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\dblcolon}"),Ce("\\approxcolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\vcentcolon}"),Ce("\\approxcoloncolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\dblcolon}"),Ce("\\notni","\\html@mathml{\\not\\ni}{\\mathrel{\\char`\u220C}}"),Ce("\\limsup","\\DOTSB\\operatorname*{lim\\,sup}"),Ce("\\liminf","\\DOTSB\\operatorname*{lim\\,inf}"),Ce("\\injlim","\\DOTSB\\operatorname*{inj\\,lim}"),Ce("\\projlim","\\DOTSB\\operatorname*{proj\\,lim}"),Ce("\\varlimsup","\\DOTSB\\operatorname*{\\overline{lim}}"),Ce("\\varliminf","\\DOTSB\\operatorname*{\\underline{lim}}"),Ce("\\varinjlim","\\DOTSB\\operatorname*{\\underrightarrow{lim}}"),Ce("\\varprojlim","\\DOTSB\\operatorname*{\\underleftarrow{lim}}"),Ce("\\gvertneqq","\\html@mathml{\\@gvertneqq}{\u2269}"),Ce("\\lvertneqq","\\html@mathml{\\@lvertneqq}{\u2268}"),Ce("\\ngeqq","\\html@mathml{\\@ngeqq}{\u2271}"),Ce("\\ngeqslant","\\html@mathml{\\@ngeqslant}{\u2271}"),Ce("\\nleqq","\\html@mathml{\\@nleqq}{\u2270}"),Ce("\\nleqslant","\\html@mathml{\\@nleqslant}{\u2270}"),Ce("\\nshortmid","\\html@mathml{\\@nshortmid}{\u2224}"),Ce("\\nshortparallel","\\html@mathml{\\@nshortparallel}{\u2226}"),Ce("\\nsubseteqq","\\html@mathml{\\@nsubseteqq}{\u2288}"),Ce("\\nsupseteqq","\\html@mathml{\\@nsupseteqq}{\u2289}"),Ce("\\varsubsetneq","\\html@mathml{\\@varsubsetneq}{\u228A}"),Ce("\\varsubsetneqq","\\html@mathml{\\@varsubsetneqq}{\u2ACB}"),Ce("\\varsupsetneq","\\html@mathml{\\@varsupsetneq}{\u228B}"),Ce("\\varsupsetneqq","\\html@mathml{\\@varsupsetneqq}{\u2ACC}"),Ce("\\imath","\\html@mathml{\\@imath}{\u0131}"),Ce("\\jmath","\\html@mathml{\\@jmath}{\u0237}"),Ce("\\llbracket","\\html@mathml{\\mathopen{[\\mkern-3.2mu[}}{\\mathopen{\\char`\u27E6}}"),Ce("\\rrbracket","\\html@mathml{\\mathclose{]\\mkern-3.2mu]}}{\\mathclose{\\char`\u27E7}}"),Ce("\u27E6","\\llbracket"),Ce("\u27E7","\\rrbracket"),Ce("\\lBrace","\\html@mathml{\\mathopen{\\{\\mkern-3.2mu[}}{\\mathopen{\\char`\u2983}}"),Ce("\\rBrace","\\html@mathml{\\mathclose{]\\mkern-3.2mu\\}}}{\\mathclose{\\char`\u2984}}"),Ce("\u2983","\\lBrace"),Ce("\u2984","\\rBrace"),Ce("\\minuso","\\mathbin{\\html@mathml{{\\mathrlap{\\mathchoice{\\kern{0.145em}}{\\kern{0.145em}}{\\kern{0.1015em}}{\\kern{0.0725em}}\\circ}{-}}}{\\char`\u29B5}}"),Ce("\u29B5","\\minuso"),Ce("\\darr","\\downarrow"),Ce("\\dArr","\\Downarrow"),Ce("\\Darr","\\Downarrow"),Ce("\\lang","\\langle"),Ce("\\rang","\\rangle"),Ce("\\uarr","\\uparrow"),Ce("\\uArr","\\Uparrow"),Ce("\\Uarr","\\Uparrow"),Ce("\\N","\\mathbb{N}"),Ce("\\R","\\mathbb{R}"),Ce("\\Z","\\mathbb{Z}"),Ce("\\alef","\\aleph"),Ce("\\alefsym","\\aleph"),Ce("\\Alpha","\\mathrm{A}"),Ce("\\Beta","\\mathrm{B}"),Ce("\\bull","\\bullet"),Ce("\\Chi","\\mathrm{X}"),Ce("\\clubs","\\clubsuit"),Ce("\\cnums","\\mathbb{C}"),Ce("\\Complex","\\mathbb{C}"),Ce("\\Dagger","\\ddagger"),Ce("\\diamonds","\\diamondsuit"),Ce("\\empty","\\emptyset"),Ce("\\Epsilon","\\mathrm{E}"),Ce("\\Eta","\\mathrm{H}"),Ce("\\exist","\\exists"),Ce("\\harr","\\leftrightarrow"),Ce("\\hArr","\\Leftrightarrow"),Ce("\\Harr","\\Leftrightarrow"),Ce("\\hearts","\\heartsuit"),Ce("\\image","\\Im"),Ce("\\infin","\\infty"),Ce("\\Iota","\\mathrm{I}"),Ce("\\isin","\\in"),Ce("\\Kappa","\\mathrm{K}"),Ce("\\larr","\\leftarrow"),Ce("\\lArr","\\Leftarrow"),Ce("\\Larr","\\Leftarrow"),Ce("\\lrarr","\\leftrightarrow"),Ce("\\lrArr","\\Leftrightarrow"),Ce("\\Lrarr","\\Leftrightarrow"),Ce("\\Mu","\\mathrm{M}"),Ce("\\natnums","\\mathbb{N}"),Ce("\\Nu","\\mathrm{N}"),Ce("\\Omicron","\\mathrm{O}"),Ce("\\plusmn","\\pm"),Ce("\\rarr","\\rightarrow"),Ce("\\rArr","\\Rightarrow"),Ce("\\Rarr","\\Rightarrow"),Ce("\\real","\\Re"),Ce("\\reals","\\mathbb{R}"),Ce("\\Reals","\\mathbb{R}"),Ce("\\Rho","\\mathrm{P}"),Ce("\\sdot","\\cdot"),Ce("\\sect","\\S"),Ce("\\spades","\\spadesuit"),Ce("\\sub","\\subset"),Ce("\\sube","\\subseteq"),Ce("\\supe","\\supseteq"),Ce("\\Tau","\\mathrm{T}"),Ce("\\thetasym","\\vartheta"),Ce("\\weierp","\\wp"),Ce("\\Zeta","\\mathrm{Z}"),Ce("\\argmin","\\DOTSB\\operatorname*{arg\\,min}"),Ce("\\argmax","\\DOTSB\\operatorname*{arg\\,max}"),Ce("\\plim","\\DOTSB\\mathop{\\operatorname{plim}}\\limits"),Ce("\\bra","\\mathinner{\\langle{#1}|}"),Ce("\\ket","\\mathinner{|{#1}\\rangle}"),Ce("\\braket","\\mathinner{\\langle{#1}\\rangle}"),Ce("\\Bra","\\left\\langle#1\\right|"),Ce("\\Ket","\\left|#1\\right\\rangle");let BK=E=>w=>{let L=w.consumeArg().tokens,G=w.consumeArg().tokens,Y=w.consumeArg().tokens,Q=w.consumeArg().tokens,ae=w.macros.get("|"),be=w.macros.get("\\|");w.macros.beginGroup();let Ie=ct=>pt=>{E&&(pt.macros.set("|",ae),Y.length&&pt.macros.set("\\|",be));let wt=ct;return!ct&&Y.length&&pt.future().text==="|"&&(pt.popToken(),wt=!0),{tokens:wt?Y:G,numArgs:0}};w.macros.set("|",Ie(!1)),Y.length&&w.macros.set("\\|",Ie(!0));let $e=w.consumeArg().tokens,it=w.expandTokens([...Q,...$e,...L]);return w.macros.endGroup(),{tokens:it.reverse(),numArgs:0}};Ce("\\bra@ket",BK(!1)),Ce("\\bra@set",BK(!0)),Ce("\\Braket","\\bra@ket{\\left\\langle}{\\,\\middle\\vert\\,}{\\,\\middle\\vert\\,}{\\right\\rangle}"),Ce("\\Set","\\bra@set{\\left\\{\\:}{\\;\\middle\\vert\\;}{\\;\\middle\\Vert\\;}{\\:\\right\\}}"),Ce("\\set","\\bra@set{\\{\\,}{\\mid}{}{\\,\\}}"),Ce("\\angln","{\\angl n}"),Ce("\\blue","\\textcolor{##6495ed}{#1}"),Ce("\\orange","\\textcolor{##ffa500}{#1}"),Ce("\\pink","\\textcolor{##ff00af}{#1}"),Ce("\\red","\\textcolor{##df0030}{#1}"),Ce("\\green","\\textcolor{##28ae7b}{#1}"),Ce("\\gray","\\textcolor{gray}{#1}"),Ce("\\purple","\\textcolor{##9d38bd}{#1}"),Ce("\\blueA","\\textcolor{##ccfaff}{#1}"),Ce("\\blueB","\\textcolor{##80f6ff}{#1}"),Ce("\\blueC","\\textcolor{##63d9ea}{#1}"),Ce("\\blueD","\\textcolor{##11accd}{#1}"),Ce("\\blueE","\\textcolor{##0c7f99}{#1}"),Ce("\\tealA","\\textcolor{##94fff5}{#1}"),Ce("\\tealB","\\textcolor{##26edd5}{#1}"),Ce("\\tealC","\\textcolor{##01d1c1}{#1}"),Ce("\\tealD","\\textcolor{##01a995}{#1}"),Ce("\\tealE","\\textcolor{##208170}{#1}"),Ce("\\greenA","\\textcolor{##b6ffb0}{#1}"),Ce("\\greenB","\\textcolor{##8af281}{#1}"),Ce("\\greenC","\\textcolor{##74cf70}{#1}"),Ce("\\greenD","\\textcolor{##1fab54}{#1}"),Ce("\\greenE","\\textcolor{##0d923f}{#1}"),Ce("\\goldA","\\textcolor{##ffd0a9}{#1}"),Ce("\\goldB","\\textcolor{##ffbb71}{#1}"),Ce("\\goldC","\\textcolor{##ff9c39}{#1}"),Ce("\\goldD","\\textcolor{##e07d10}{#1}"),Ce("\\goldE","\\textcolor{##a75a05}{#1}"),Ce("\\redA","\\textcolor{##fca9a9}{#1}"),Ce("\\redB","\\textcolor{##ff8482}{#1}"),Ce("\\redC","\\textcolor{##f9685d}{#1}"),Ce("\\redD","\\textcolor{##e84d39}{#1}"),Ce("\\redE","\\textcolor{##bc2612}{#1}"),Ce("\\maroonA","\\textcolor{##ffbde0}{#1}"),Ce("\\maroonB","\\textcolor{##ff92c6}{#1}"),Ce("\\maroonC","\\textcolor{##ed5fa6}{#1}"),Ce("\\maroonD","\\textcolor{##ca337c}{#1}"),Ce("\\maroonE","\\textcolor{##9e034e}{#1}"),Ce("\\purpleA","\\textcolor{##ddd7ff}{#1}"),Ce("\\purpleB","\\textcolor{##c6b9fc}{#1}"),Ce("\\purpleC","\\textcolor{##aa87ff}{#1}"),Ce("\\purpleD","\\textcolor{##7854ab}{#1}"),Ce("\\purpleE","\\textcolor{##543b78}{#1}"),Ce("\\mintA","\\textcolor{##f5f9e8}{#1}"),Ce("\\mintB","\\textcolor{##edf2df}{#1}"),Ce("\\mintC","\\textcolor{##e0e5cc}{#1}"),Ce("\\grayA","\\textcolor{##f6f7f7}{#1}"),Ce("\\grayB","\\textcolor{##f0f1f2}{#1}"),Ce("\\grayC","\\textcolor{##e3e5e6}{#1}"),Ce("\\grayD","\\textcolor{##d6d8da}{#1}"),Ce("\\grayE","\\textcolor{##babec2}{#1}"),Ce("\\grayF","\\textcolor{##888d93}{#1}"),Ce("\\grayG","\\textcolor{##626569}{#1}"),Ce("\\grayH","\\textcolor{##3b3e40}{#1}"),Ce("\\grayI","\\textcolor{##21242c}{#1}"),Ce("\\kaBlue","\\textcolor{##314453}{#1}"),Ce("\\kaGreen","\\textcolor{##71B307}{#1}");let FK={"^":!0,_:!0,"\\limits":!0,"\\nolimits":!0};class gPe{constructor(w,L,G){this.settings=void 0,this.expansionCount=void 0,this.lexer=void 0,this.macros=void 0,this.stack=void 0,this.mode=void 0,this.settings=L,this.expansionCount=0,this.feed(w),this.macros=new dPe(pPe,L.macros),this.mode=G,this.stack=[]}feed(w){this.lexer=new MK(w,this.settings)}switchMode(w){this.mode=w}beginGroup(){this.macros.beginGroup()}endGroup(){this.macros.endGroup()}endGroups(){this.macros.endGroups()}future(){return this.stack.length===0&&this.pushToken(this.lexer.lex()),this.stack[this.stack.length-1]}popToken(){return this.future(),this.stack.pop()}pushToken(w){this.stack.push(w)}pushTokens(w){this.stack.push(...w)}scanArgument(w){let L,G,Y;if(w){if(this.consumeSpaces(),this.future().text!=="[")return null;L=this.popToken(),{tokens:Y,end:G}=this.consumeArg(["]"])}else({tokens:Y,start:L,end:G}=this.consumeArg());return this.pushToken(new wl("EOF",G.loc)),this.pushTokens(Y),new wl("",qo.range(L,G))}consumeSpaces(){for(;this.future().text===" ";)this.stack.pop()}consumeArg(w){let L=[],G=w&&w.length>0;G||this.consumeSpaces();let Y=this.future(),Q,ae=0,be=0;do{if(Q=this.popToken(),L.push(Q),Q.text==="{")++ae;else if(Q.text==="}"){if(--ae,ae===-1)throw new n("Extra }",Q)}else if(Q.text==="EOF")throw new n("Unexpected end of input in a macro argument, expected '"+(w&&G?w[be]:"}")+"'",Q);if(w&&G)if((ae===0||ae===1&&w[be]==="{")&&Q.text===w[be]){if(++be,be===w.length){L.splice(-be,be);break}}else be=0}while(ae!==0||G);return Y.text==="{"&&L[L.length-1].text==="}"&&(L.pop(),L.shift()),L.reverse(),{tokens:L,start:Y,end:Q}}consumeArgs(w,L){if(L){if(L.length!==w+1)throw new n("The length of delimiters doesn't match the number of args!");let Y=L[0];for(let Q=0;Qthis.settings.maxExpand)throw new n("Too many expansions: infinite loop or need to increase maxExpand setting")}expandOnce(w){let L=this.popToken(),G=L.text,Y=L.noexpand?null:this._getExpansion(G);if(Y==null||w&&Y.unexpandable){if(w&&Y==null&&G[0]==="\\"&&!this.isDefined(G))throw new n("Undefined control sequence: "+G);return this.pushToken(L),!1}this.countExpansion(1);let Q=Y.tokens,ae=this.consumeArgs(Y.numArgs,Y.delimiters);if(Y.numArgs){Q=Q.slice();for(let be=Q.length-1;be>=0;--be){let Ie=Q[be];if(Ie.text==="#"){if(be===0)throw new n("Incomplete placeholder at end of macro body",Ie);if(Ie=Q[--be],Ie.text==="#")Q.splice(be+1,1);else if(/^[1-9]$/.test(Ie.text))Q.splice(be,2,...ae[+Ie.text-1]);else throw new n("Not a valid argument number",Ie)}}}return this.pushTokens(Q),Q.length}expandAfterFuture(){return this.expandOnce(),this.future()}expandNextToken(){for(;;)if(this.expandOnce()===!1){let w=this.stack.pop();return w.treatAsRelax&&(w.text="\\relax"),w}}expandMacro(w){return this.macros.has(w)?this.expandTokens([new wl(w)]):void 0}expandTokens(w){let L=[],G=this.stack.length;for(this.pushTokens(w);this.stack.length>G;)if(this.expandOnce(!0)===!1){let Y=this.stack.pop();Y.treatAsRelax&&(Y.noexpand=!1,Y.treatAsRelax=!1),L.push(Y)}return this.countExpansion(L.length),L}expandMacroAsText(w){let L=this.expandMacro(w);return L&&L.map(G=>G.text).join("")}_getExpansion(w){let L=this.macros.get(w);if(L==null)return L;if(w.length===1){let Y=this.lexer.catcodes[w];if(Y!=null&&Y!==13)return}let G=typeof L=="function"?L(this):L;if(typeof G=="string"){let Y=0;if(G.includes("#")){let $e=G.replace(/##/g,"");for(;$e.includes("#"+(Y+1));)++Y}let Q=new MK(G,this.settings),ae=[],be=Q.lex();for(;be.text!=="EOF";)ae.push(be),be=Q.lex();return ae.reverse(),{tokens:ae,numArgs:Y}}return G}isDefined(w){return this.macros.has(w)||Mf.hasOwnProperty(w)||yt.math.hasOwnProperty(w)||yt.text.hasOwnProperty(w)||FK.hasOwnProperty(w)}isExpandable(w){let L=this.macros.get(w);return L!=null?typeof L=="string"||typeof L=="function"||!L.unexpandable:Mf.hasOwnProperty(w)&&!Mf[w].primitive}}let zK=/^[₊₋₌₍₎₀₁₂₃₄₅₆₇₈₉ₐₑₕᵢⱼₖₗₘₙₒₚᵣₛₜᵤᵥₓᵦᵧᵨᵩᵪ]/,Fw=Object.freeze({"\u208A":"+","\u208B":"-","\u208C":"=","\u208D":"(","\u208E":")","\u2080":"0","\u2081":"1","\u2082":"2","\u2083":"3","\u2084":"4","\u2085":"5","\u2086":"6","\u2087":"7","\u2088":"8","\u2089":"9","\u2090":"a","\u2091":"e","\u2095":"h","\u1D62":"i","\u2C7C":"j","\u2096":"k","\u2097":"l","\u2098":"m","\u2099":"n","\u2092":"o","\u209A":"p","\u1D63":"r","\u209B":"s","\u209C":"t","\u1D64":"u","\u1D65":"v","\u2093":"x","\u1D66":"\u03B2","\u1D67":"\u03B3","\u1D68":"\u03C1","\u1D69":"\u03D5","\u1D6A":"\u03C7","\u207A":"+","\u207B":"-","\u207C":"=","\u207D":"(","\u207E":")","\u2070":"0","\xB9":"1","\xB2":"2","\xB3":"3","\u2074":"4","\u2075":"5","\u2076":"6","\u2077":"7","\u2078":"8","\u2079":"9","\u1D2C":"A","\u1D2E":"B","\u1D30":"D","\u1D31":"E","\u1D33":"G","\u1D34":"H","\u1D35":"I","\u1D36":"J","\u1D37":"K","\u1D38":"L","\u1D39":"M","\u1D3A":"N","\u1D3C":"O","\u1D3E":"P","\u1D3F":"R","\u1D40":"T","\u1D41":"U","\u2C7D":"V","\u1D42":"W","\u1D43":"a","\u1D47":"b","\u1D9C":"c","\u1D48":"d","\u1D49":"e","\u1DA0":"f","\u1D4D":"g",\u02B0:"h","\u2071":"i",\u02B2:"j","\u1D4F":"k",\u02E1:"l","\u1D50":"m",\u207F:"n","\u1D52":"o","\u1D56":"p",\u02B3:"r",\u02E2:"s","\u1D57":"t","\u1D58":"u","\u1D5B":"v",\u02B7:"w",\u02E3:"x",\u02B8:"y","\u1DBB":"z","\u1D5D":"\u03B2","\u1D5E":"\u03B3","\u1D5F":"\u03B4","\u1D60":"\u03D5","\u1D61":"\u03C7","\u1DBF":"\u03B8"}),YD={"\u0301":{text:"\\'",math:"\\acute"},"\u0300":{text:"\\`",math:"\\grave"},"\u0308":{text:'\\"',math:"\\ddot"},"\u0303":{text:"\\~",math:"\\tilde"},"\u0304":{text:"\\=",math:"\\bar"},"\u0306":{text:"\\u",math:"\\breve"},"\u030C":{text:"\\v",math:"\\check"},"\u0302":{text:"\\^",math:"\\hat"},"\u0307":{text:"\\.",math:"\\dot"},"\u030A":{text:"\\r",math:"\\mathring"},"\u030B":{text:"\\H"},"\u0327":{text:"\\c"}},$K={\u00E1:"a\u0301",\u00E0:"a\u0300",\u00E4:"a\u0308",\u01DF:"a\u0308\u0304",\u00E3:"a\u0303",\u0101:"a\u0304",\u0103:"a\u0306",\u1EAF:"a\u0306\u0301",\u1EB1:"a\u0306\u0300",\u1EB5:"a\u0306\u0303",\u01CE:"a\u030C",\u00E2:"a\u0302",\u1EA5:"a\u0302\u0301",\u1EA7:"a\u0302\u0300",\u1EAB:"a\u0302\u0303",\u0227:"a\u0307",\u01E1:"a\u0307\u0304",\u00E5:"a\u030A",\u01FB:"a\u030A\u0301",\u1E03:"b\u0307",\u0107:"c\u0301",\u1E09:"c\u0327\u0301",\u010D:"c\u030C",\u0109:"c\u0302",\u010B:"c\u0307",\u00E7:"c\u0327",\u010F:"d\u030C",\u1E0B:"d\u0307",\u1E11:"d\u0327",\u00E9:"e\u0301",\u00E8:"e\u0300",\u00EB:"e\u0308",\u1EBD:"e\u0303",\u0113:"e\u0304",\u1E17:"e\u0304\u0301",\u1E15:"e\u0304\u0300",\u0115:"e\u0306",\u1E1D:"e\u0327\u0306",\u011B:"e\u030C",\u00EA:"e\u0302",\u1EBF:"e\u0302\u0301",\u1EC1:"e\u0302\u0300",\u1EC5:"e\u0302\u0303",\u0117:"e\u0307",\u0229:"e\u0327",\u1E1F:"f\u0307",\u01F5:"g\u0301",\u1E21:"g\u0304",\u011F:"g\u0306",\u01E7:"g\u030C",\u011D:"g\u0302",\u0121:"g\u0307",\u0123:"g\u0327",\u1E27:"h\u0308",\u021F:"h\u030C",\u0125:"h\u0302",\u1E23:"h\u0307",\u1E29:"h\u0327",\u00ED:"i\u0301",\u00EC:"i\u0300",\u00EF:"i\u0308",\u1E2F:"i\u0308\u0301",\u0129:"i\u0303",\u012B:"i\u0304",\u012D:"i\u0306",\u01D0:"i\u030C",\u00EE:"i\u0302",\u01F0:"j\u030C",\u0135:"j\u0302",\u1E31:"k\u0301",\u01E9:"k\u030C",\u0137:"k\u0327",\u013A:"l\u0301",\u013E:"l\u030C",\u013C:"l\u0327",\u1E3F:"m\u0301",\u1E41:"m\u0307",\u0144:"n\u0301",\u01F9:"n\u0300",\u00F1:"n\u0303",\u0148:"n\u030C",\u1E45:"n\u0307",\u0146:"n\u0327",\u00F3:"o\u0301",\u00F2:"o\u0300",\u00F6:"o\u0308",\u022B:"o\u0308\u0304",\u00F5:"o\u0303",\u1E4D:"o\u0303\u0301",\u1E4F:"o\u0303\u0308",\u022D:"o\u0303\u0304",\u014D:"o\u0304",\u1E53:"o\u0304\u0301",\u1E51:"o\u0304\u0300",\u014F:"o\u0306",\u01D2:"o\u030C",\u00F4:"o\u0302",\u1ED1:"o\u0302\u0301",\u1ED3:"o\u0302\u0300",\u1ED7:"o\u0302\u0303",\u022F:"o\u0307",\u0231:"o\u0307\u0304",\u0151:"o\u030B",\u1E55:"p\u0301",\u1E57:"p\u0307",\u0155:"r\u0301",\u0159:"r\u030C",\u1E59:"r\u0307",\u0157:"r\u0327",\u015B:"s\u0301",\u1E65:"s\u0301\u0307",\u0161:"s\u030C",\u1E67:"s\u030C\u0307",\u015D:"s\u0302",\u1E61:"s\u0307",\u015F:"s\u0327",\u1E97:"t\u0308",\u0165:"t\u030C",\u1E6B:"t\u0307",\u0163:"t\u0327",\u00FA:"u\u0301",\u00F9:"u\u0300",\u00FC:"u\u0308",\u01D8:"u\u0308\u0301",\u01DC:"u\u0308\u0300",\u01D6:"u\u0308\u0304",\u01DA:"u\u0308\u030C",\u0169:"u\u0303",\u1E79:"u\u0303\u0301",\u016B:"u\u0304",\u1E7B:"u\u0304\u0308",\u016D:"u\u0306",\u01D4:"u\u030C",\u00FB:"u\u0302",\u016F:"u\u030A",\u0171:"u\u030B",\u1E7D:"v\u0303",\u1E83:"w\u0301",\u1E81:"w\u0300",\u1E85:"w\u0308",\u0175:"w\u0302",\u1E87:"w\u0307",\u1E98:"w\u030A",\u1E8D:"x\u0308",\u1E8B:"x\u0307",\u00FD:"y\u0301",\u1EF3:"y\u0300",\u00FF:"y\u0308",\u1EF9:"y\u0303",\u0233:"y\u0304",\u0177:"y\u0302",\u1E8F:"y\u0307",\u1E99:"y\u030A",\u017A:"z\u0301",\u017E:"z\u030C",\u1E91:"z\u0302",\u017C:"z\u0307",\u00C1:"A\u0301",\u00C0:"A\u0300",\u00C4:"A\u0308",\u01DE:"A\u0308\u0304",\u00C3:"A\u0303",\u0100:"A\u0304",\u0102:"A\u0306",\u1EAE:"A\u0306\u0301",\u1EB0:"A\u0306\u0300",\u1EB4:"A\u0306\u0303",\u01CD:"A\u030C",\u00C2:"A\u0302",\u1EA4:"A\u0302\u0301",\u1EA6:"A\u0302\u0300",\u1EAA:"A\u0302\u0303",\u0226:"A\u0307",\u01E0:"A\u0307\u0304",\u00C5:"A\u030A",\u01FA:"A\u030A\u0301",\u1E02:"B\u0307",\u0106:"C\u0301",\u1E08:"C\u0327\u0301",\u010C:"C\u030C",\u0108:"C\u0302",\u010A:"C\u0307",\u00C7:"C\u0327",\u010E:"D\u030C",\u1E0A:"D\u0307",\u1E10:"D\u0327",\u00C9:"E\u0301",\u00C8:"E\u0300",\u00CB:"E\u0308",\u1EBC:"E\u0303",\u0112:"E\u0304",\u1E16:"E\u0304\u0301",\u1E14:"E\u0304\u0300",\u0114:"E\u0306",\u1E1C:"E\u0327\u0306",\u011A:"E\u030C",\u00CA:"E\u0302",\u1EBE:"E\u0302\u0301",\u1EC0:"E\u0302\u0300",\u1EC4:"E\u0302\u0303",\u0116:"E\u0307",\u0228:"E\u0327",\u1E1E:"F\u0307",\u01F4:"G\u0301",\u1E20:"G\u0304",\u011E:"G\u0306",\u01E6:"G\u030C",\u011C:"G\u0302",\u0120:"G\u0307",\u0122:"G\u0327",\u1E26:"H\u0308",\u021E:"H\u030C",\u0124:"H\u0302",\u1E22:"H\u0307",\u1E28:"H\u0327",\u00CD:"I\u0301",\u00CC:"I\u0300",\u00CF:"I\u0308",\u1E2E:"I\u0308\u0301",\u0128:"I\u0303",\u012A:"I\u0304",\u012C:"I\u0306",\u01CF:"I\u030C",\u00CE:"I\u0302",\u0130:"I\u0307",\u0134:"J\u0302",\u1E30:"K\u0301",\u01E8:"K\u030C",\u0136:"K\u0327",\u0139:"L\u0301",\u013D:"L\u030C",\u013B:"L\u0327",\u1E3E:"M\u0301",\u1E40:"M\u0307",\u0143:"N\u0301",\u01F8:"N\u0300",\u00D1:"N\u0303",\u0147:"N\u030C",\u1E44:"N\u0307",\u0145:"N\u0327",\u00D3:"O\u0301",\u00D2:"O\u0300",\u00D6:"O\u0308",\u022A:"O\u0308\u0304",\u00D5:"O\u0303",\u1E4C:"O\u0303\u0301",\u1E4E:"O\u0303\u0308",\u022C:"O\u0303\u0304",\u014C:"O\u0304",\u1E52:"O\u0304\u0301",\u1E50:"O\u0304\u0300",\u014E:"O\u0306",\u01D1:"O\u030C",\u00D4:"O\u0302",\u1ED0:"O\u0302\u0301",\u1ED2:"O\u0302\u0300",\u1ED6:"O\u0302\u0303",\u022E:"O\u0307",\u0230:"O\u0307\u0304",\u0150:"O\u030B",\u1E54:"P\u0301",\u1E56:"P\u0307",\u0154:"R\u0301",\u0158:"R\u030C",\u1E58:"R\u0307",\u0156:"R\u0327",\u015A:"S\u0301",\u1E64:"S\u0301\u0307",\u0160:"S\u030C",\u1E66:"S\u030C\u0307",\u015C:"S\u0302",\u1E60:"S\u0307",\u015E:"S\u0327",\u0164:"T\u030C",\u1E6A:"T\u0307",\u0162:"T\u0327",\u00DA:"U\u0301",\u00D9:"U\u0300",\u00DC:"U\u0308",\u01D7:"U\u0308\u0301",\u01DB:"U\u0308\u0300",\u01D5:"U\u0308\u0304",\u01D9:"U\u0308\u030C",\u0168:"U\u0303",\u1E78:"U\u0303\u0301",\u016A:"U\u0304",\u1E7A:"U\u0304\u0308",\u016C:"U\u0306",\u01D3:"U\u030C",\u00DB:"U\u0302",\u016E:"U\u030A",\u0170:"U\u030B",\u1E7C:"V\u0303",\u1E82:"W\u0301",\u1E80:"W\u0300",\u1E84:"W\u0308",\u0174:"W\u0302",\u1E86:"W\u0307",\u1E8C:"X\u0308",\u1E8A:"X\u0307",\u00DD:"Y\u0301",\u1EF2:"Y\u0300",\u0178:"Y\u0308",\u1EF8:"Y\u0303",\u0232:"Y\u0304",\u0176:"Y\u0302",\u1E8E:"Y\u0307",\u0179:"Z\u0301",\u017D:"Z\u030C",\u1E90:"Z\u0302",\u017B:"Z\u0307",\u03AC:"\u03B1\u0301",\u1F70:"\u03B1\u0300",\u1FB1:"\u03B1\u0304",\u1FB0:"\u03B1\u0306",\u03AD:"\u03B5\u0301",\u1F72:"\u03B5\u0300",\u03AE:"\u03B7\u0301",\u1F74:"\u03B7\u0300",\u03AF:"\u03B9\u0301",\u1F76:"\u03B9\u0300",\u03CA:"\u03B9\u0308",\u0390:"\u03B9\u0308\u0301",\u1FD2:"\u03B9\u0308\u0300",\u1FD1:"\u03B9\u0304",\u1FD0:"\u03B9\u0306",\u03CC:"\u03BF\u0301",\u1F78:"\u03BF\u0300",\u03CD:"\u03C5\u0301",\u1F7A:"\u03C5\u0300",\u03CB:"\u03C5\u0308",\u03B0:"\u03C5\u0308\u0301",\u1FE2:"\u03C5\u0308\u0300",\u1FE1:"\u03C5\u0304",\u1FE0:"\u03C5\u0306",\u03CE:"\u03C9\u0301",\u1F7C:"\u03C9\u0300",\u038E:"\u03A5\u0301",\u1FEA:"\u03A5\u0300",\u03AB:"\u03A5\u0308",\u1FE9:"\u03A5\u0304",\u1FE8:"\u03A5\u0306",\u038F:"\u03A9\u0301",\u1FFA:"\u03A9\u0300"};class zw{constructor(w,L){this.mode=void 0,this.gullet=void 0,this.settings=void 0,this.leftrightDepth=void 0,this.nextToken=void 0,this.mode="math",this.gullet=new gPe(w,L,this.mode),this.settings=L,this.leftrightDepth=0,this.nextToken=null}expect(w,L){if(L===void 0&&(L=!0),this.fetch().text!==w)throw new n("Expected '"+w+"', got '"+this.fetch().text+"'",this.fetch());L&&this.consume()}consume(){this.nextToken=null}fetch(){return this.nextToken==null&&(this.nextToken=this.gullet.expandNextToken()),this.nextToken}switchMode(w){this.mode=w,this.gullet.switchMode(w)}parse(){this.settings.globalGroup||this.gullet.beginGroup(),this.settings.colorIsTextColor&&this.gullet.macros.set("\\color","\\textcolor");try{let w=this.parseExpression(!1);return this.expect("EOF"),this.settings.globalGroup||this.gullet.endGroup(),w}finally{this.gullet.endGroups()}}subparse(w){let L=this.nextToken;this.consume(),this.gullet.pushToken(new wl("}")),this.gullet.pushTokens(w);let G=this.parseExpression(!1);return this.expect("}"),this.nextToken=L,G}parseExpression(w,L){let G=[];for(;;){this.mode==="math"&&this.consumeSpaces();let Y=this.fetch();if(zw.endOfExpression.has(Y.text)||L&&Y.text===L||w&&Mf[Y.text]&&Mf[Y.text].infix)break;let Q=this.parseAtom(L);if(Q){if(Q.type==="internal")continue}else break;G.push(Q)}return this.mode==="text"&&this.formLigatures(G),this.handleInfixNodes(G)}handleInfixNodes(w){let L=-1,G;for(let Y=0;Y=128)this.settings.strict&&(J(L.charCodeAt(0))?this.mode==="math"&&this.settings.reportNonstrict("unicodeTextInMathMode",'Unicode text character "'+L[0]+'" used in math mode',w):this.settings.reportNonstrict("unknownSymbol",'Unrecognized Unicode character "'+L[0]+'"'+(" ("+L.charCodeAt(0)+")"),w)),Y={type:"textord",mode:"text",loc:qo.range(w),text:L};else return null;if(this.consume(),G)for(let Q=0;Q{"use strict";function uee(t){return t.replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'")}function vn(t,e){let r=vn.mergeDelimiters(e&&e.delimiters),n=e&&e.outerSpace||!1,i=e&&e.katexOptions||{};i.throwOnError=i.throwOnError||!1,i.macros=i.macros||e&&e.macros,vn.katex||(e&&typeof e.engine=="object"?vn.katex=e.engine:typeof jb=="object"?vn.katex=lee():vn.katex={renderToString(){return"No math renderer found."}});for(let a of r.inline)n&&"outerSpace"in a&&(a.outerSpace=!0),t.inline.ruler.before("escape",a.name,vn.inline(a)),t.renderer.rules[a.name]=(s,o)=>a.tmpl.replace(/\$1/,vn.render(s[o].content,!!a.displayMode,i));for(let a of r.block)t.block.ruler.before("fence",a.name,vn.block(a)),t.renderer.rules[a.name]=(s,o)=>a.tmpl.replace(/\$2/,uee(s[o].info)).replace(/\$1/,vn.render(s[o].content,!0,i))}vn.mergeDelimiters=function(t){let e=Array.isArray(t)?t:typeof t=="string"?[t]:["dollars"],r={inline:[],block:[]};for(let n of e)n in vn.rules&&(r.inline.push(...vn.rules[n].inline),r.block.push(...vn.rules[n].block));return r};vn.inline=t=>function(e,r){let n=e.pos,i=e.src,s=i.startsWith(t.tag,t.rex.lastIndex=n)&&(!t.pre||t.pre(i,t.outerSpace,n))&&t.rex.exec(i),o=!!s&&nfunction(r,n,i,a){let s=r.bMarks[n]+r.tShift[n],o=r.src,u=o.startsWith(t.tag,t.rex.lastIndex=s)&&(!t.pre||t.pre(o,!1,s))&&t.rex.exec(o),h=!!u&&s=r.bMarks[d]+r.tShift[d]&&f<=r.eMarks[d]);d++);let p=r.lineMax,m=r.parentType;r.lineMax=d,r.parentType="math",m==="blockquote"&&(u[1]=u[1].replace(/(\n*?^(?:\s*>)+)/gm,""));let g=r.push(t.name,"math",0);g.block=!0,g.tag=t.tag,g.markup="",g.content=u[1],g.info=u[u.length-1],g.map=[n,d+1],r.parentType=m,r.lineMax=p,r.line=d+1}return h};vn.render=function(t,e,r){r.displayMode=e;let n;try{n=vn.katex.renderToString(t,r)}catch(i){n=uee(`${t}:${i.message}`)}return n};vn.use=function(t){return vn.katex=t,vn};vn.inlineRuleNames=["math_inline","math_inline_double"];vn.blockRuleNames=["math_block","math_block_eqno"];vn.$_pre=(t,e,r)=>{let n=r>0?t[r-1].charCodeAt(0):!1;return e?!n||n===32:!n||n!==92&&(n<48||n>57)};vn.$_post=(t,e,r)=>{let n=t[r+1]&&t[r+1].charCodeAt(0);return e?!n||n===32||n===46||n===44||n===59:!n||n<48||n>57};vn.rules={brackets:{inline:[{name:"math_inline",rex:/\\\((.+?)\\\)/gy,tmpl:"$1",tag:"\\("}],block:[{name:"math_block_eqno",rex:/\\\[(((?!\\\]|\\\[)[\s\S])+?)\\\]\s*?\(([^)$\r\n]+?)\)/gmy,tmpl:'
$1($2)
',tag:"\\["},{name:"math_block",rex:/\\\[([\s\S]+?)\\\]/gmy,tmpl:"
$1
",tag:"\\["}]},doxygen:{inline:[{name:"math_inline",rex:/\\f\$(.+?)\\f\$/gy,tmpl:"$1",tag:"\\f$"}],block:[{name:"math_block_eqno",rex:/\\f\[([^]+?)\\f\]\s*?\(([^)\s]+?)\)/gmy,tmpl:'
$1($2)
',tag:"\\f["},{name:"math_block",rex:/\\f\[([^]+?)\\f\]/gmy,tmpl:"
$1
",tag:"\\f["}]},gitlab:{inline:[{name:"math_inline",rex:/\$`(.+?)`\$/gy,tmpl:"$1",tag:"$`"}],block:[{name:"math_block_eqno",rex:/`{3}math\s*([^`]+?)\s*?`{3}\s*\(([^)\r\n]+?)\)/gm,tmpl:'
$1($2)
',tag:"```math"},{name:"math_block",rex:/`{3}math\s*([^`]*?)\s*`{3}/gm,tmpl:"
$1
",tag:"```math"}]},julia:{inline:[{name:"math_inline",rex:/`{2}([^`]+?)`{2}/gy,tmpl:"$1",tag:"``"},{name:"math_inline",rex:/\$((?:\S?)|(?:\S.*?\S))\$/gy,tmpl:"$1",tag:"$",spaceEnclosed:!1,pre:vn.$_pre,post:vn.$_post}],block:[{name:"math_block_eqno",rex:/`{3}math\s+?([^`]+?)\s+?`{3}\s*?\(([^)$\r\n]+?)\)/gmy,tmpl:'
$1($2)
',tag:"```math"},{name:"math_block",rex:/`{3}math\s+?([^`]+?)\s+?`{3}/gmy,tmpl:"
$1
",tag:"```math"}]},kramdown:{inline:[{name:"math_inline",rex:/\${2}(.+?)\${2}/gy,tmpl:"$1",tag:"$$"}],block:[{name:"math_block_eqno",rex:/\${2}([^$]+?)\${2}\s*?\(([^)\s]+?)\)/gmy,tmpl:'
$1($2)
',tag:"$$"},{name:"math_block",rex:/\${2}([^$]+?)\${2}/gmy,tmpl:"
$1
",tag:"$$"}]},beg_end:{inline:[],block:[{name:"math_block",rex:/(\\(?:begin)\{([a-z]+)\}[\s\S]+?\\(?:end)\{\2\})/gmy,tmpl:"
$1
",tag:"\\"}]},dollars:{inline:[{name:"math_inline_double",rex:/\${2}([^$]*?[^\\])\${2}/gy,tmpl:"
$1
",tag:"$$",displayMode:!0,pre:vn.$_pre,post:vn.$_post},{name:"math_inline",rex:/\$((?:[^\s\\])|(?:\S.*?[^\s\\]))\$/gy,tmpl:"$1",tag:"$",outerSpace:!1,pre:vn.$_pre,post:vn.$_post}],block:[{name:"math_block_eqno",rex:/\${2}([^$]*?[^\\])\${2}\s*?\(([^)\s]+?)\)/gmy,tmpl:'
$1($2)
',tag:"$$"},{name:"math_block",rex:/\${2}([^$]*?[^\\])\${2}/gmy,tmpl:"
$1
",tag:"$$"}]}};typeof jb=="object"&&jb.exports&&(jb.exports=vn)});var Jk=Bi((gN,yN)=>{(function(t,e){typeof gN=="object"&&typeof yN<"u"?yN.exports=e():typeof define=="function"&&define.amd?define(e):(t=typeof globalThis<"u"?globalThis:t||self).dayjs=e()})(gN,(function(){"use strict";var t=1e3,e=6e4,r=36e5,n="millisecond",i="second",a="minute",s="hour",o="day",l="week",u="month",h="quarter",f="year",d="date",p="Invalid Date",m=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,g=/\[([^\]]+)]|YYYY|YY|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,y={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(C){var N=["th","st","nd","rd"],B=C%100;return"["+C+(N[(B-20)%10]||N[B]||N[0])+"]"}},v=function(C,N,B){var F=String(C);return!F||F.length>=N?C:""+Array(N+1-F.length).join(B)+C},x={s:v,z:function(C){var N=-C.utcOffset(),B=Math.abs(N),F=Math.floor(B/60),M=B%60;return(N<=0?"+":"-")+v(F,2,"0")+":"+v(M,2,"0")},m:function C(N,B){if(N.date()1)return C(z[0])}else{var q=N.name;_[q]=N,M=q}return!F&&M&&(k=M),M||!F&&k},A=function(C,N){if(S(C))return C.clone();var B=typeof N=="object"?N:{};return B.date=C,B.args=arguments,new P(B)},I=x;I.l=R,I.i=S,I.w=function(C,N){return A(C,{locale:N.$L,utc:N.$u,x:N.$x,$offset:N.$offset})};var P=(function(){function C(B){this.$L=R(B.locale,null,!0),this.parse(B),this.$x=this.$x||B.x||{},this[T]=!0}var N=C.prototype;return N.parse=function(B){this.$d=(function(F){var M=F.date,$=F.utc;if(M===null)return new Date(NaN);if(I.u(M))return new Date;if(M instanceof Date)return new Date(M);if(typeof M=="string"&&!/Z$/i.test(M)){var z=M.match(m);if(z){var q=z[2]-1||0,V=(z[7]||"0").substring(0,3);return $?new Date(Date.UTC(z[1],q,z[3]||1,z[4]||0,z[5]||0,z[6]||0,V)):new Date(z[1],q,z[3]||1,z[4]||0,z[5]||0,z[6]||0,V)}}return new Date(M)})(B),this.init()},N.init=function(){var B=this.$d;this.$y=B.getFullYear(),this.$M=B.getMonth(),this.$D=B.getDate(),this.$W=B.getDay(),this.$H=B.getHours(),this.$m=B.getMinutes(),this.$s=B.getSeconds(),this.$ms=B.getMilliseconds()},N.$utils=function(){return I},N.isValid=function(){return this.$d.toString()!==p},N.isSame=function(B,F){var M=A(B);return this.startOf(F)<=M&&M<=this.endOf(F)},N.isAfter=function(B,F){return A(B){eT={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=>{let 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<.16666666666666666?t+(e-t)*6*r:r<.5?e:r<.6666666666666666?t+(e-t)*(.6666666666666666-r)*6:t),hsl2rgb:({h:t,s:e,l:r},n)=>{if(!e)return r*2.55;t/=360,e/=100,r/=100;let i=r<.5?r*(1+e):r+e-r*e,a=2*r-i;switch(n){case"r":return eT.hue2rgb(a,i,t+.3333333333333333)*255;case"g":return eT.hue2rgb(a,i,t)*255;case"b":return eT.hue2rgb(a,i,t-.3333333333333333)*255}},rgb2hsl:({r:t,g:e,b:r},n)=>{t/=255,e/=255,r/=255;let i=Math.max(t,e,r),a=Math.min(t,e,r),s=(i+a)/2;if(n==="l")return s*100;if(i===a)return 0;let o=i-a,l=s>.5?o/(2-i-a):o/(i+a);if(n==="s")return l*100;switch(i){case t:return((e-r)/o+(e{TGe={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},Fee=TGe});var EGe,$ee,Gee=D(()=>{EGe={dec2hex:t=>{let e=Math.round(t).toString(16);return e.length>1?e:`0${e}`}},$ee=EGe});var SGe,pr,Wc=D(()=>{Bee();zee();Gee();SGe={channel:Pee,lang:Fee,unit:$ee},pr=SGe});var wh,Ba,Kb=D(()=>{Wc();wh={};for(let t=0;t<=255;t++)wh[t]=pr.unit.dec2hex(t);Ba={ALL:0,RGB:1,HSL:2}});var vN,qee,Uee=D(()=>{Kb();vN=class{constructor(){this.type=Ba.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=Ba.ALL}is(e){return this.type===e}},qee=vN});var xN,Hee,Vee=D(()=>{Wc();Uee();Kb();xN=class{constructor(e,r){this.color=r,this.changed=!1,this.data=e,this.type=new qee}set(e,r){return this.color=r,this.changed=!1,this.data=e,this.type.type=Ba.ALL,this}_ensureHSL(){let e=this.data,{h:r,s:n,l:i}=e;r===void 0&&(e.h=pr.channel.rgb2hsl(e,"h")),n===void 0&&(e.s=pr.channel.rgb2hsl(e,"s")),i===void 0&&(e.l=pr.channel.rgb2hsl(e,"l"))}_ensureRGB(){let e=this.data,{r,g:n,b:i}=e;r===void 0&&(e.r=pr.channel.hsl2rgb(e,"r")),n===void 0&&(e.g=pr.channel.hsl2rgb(e,"g")),i===void 0&&(e.b=pr.channel.hsl2rgb(e,"b"))}get r(){let e=this.data,r=e.r;return!this.type.is(Ba.HSL)&&r!==void 0?r:(this._ensureHSL(),pr.channel.hsl2rgb(e,"r"))}get g(){let e=this.data,r=e.g;return!this.type.is(Ba.HSL)&&r!==void 0?r:(this._ensureHSL(),pr.channel.hsl2rgb(e,"g"))}get b(){let e=this.data,r=e.b;return!this.type.is(Ba.HSL)&&r!==void 0?r:(this._ensureHSL(),pr.channel.hsl2rgb(e,"b"))}get h(){let e=this.data,r=e.h;return!this.type.is(Ba.RGB)&&r!==void 0?r:(this._ensureRGB(),pr.channel.rgb2hsl(e,"h"))}get s(){let e=this.data,r=e.s;return!this.type.is(Ba.RGB)&&r!==void 0?r:(this._ensureRGB(),pr.channel.rgb2hsl(e,"s"))}get l(){let e=this.data,r=e.l;return!this.type.is(Ba.RGB)&&r!==void 0?r:(this._ensureRGB(),pr.channel.rgb2hsl(e,"l"))}get a(){return this.data.a}set r(e){this.type.set(Ba.RGB),this.changed=!0,this.data.r=e}set g(e){this.type.set(Ba.RGB),this.changed=!0,this.data.g=e}set b(e){this.type.set(Ba.RGB),this.changed=!0,this.data.b=e}set h(e){this.type.set(Ba.HSL),this.changed=!0,this.data.h=e}set s(e){this.type.set(Ba.HSL),this.changed=!0,this.data.s=e}set l(e){this.type.set(Ba.HSL),this.changed=!0,this.data.l=e}set a(e){this.changed=!0,this.data.a=e}},Hee=xN});var CGe,Vf,Zb=D(()=>{Vee();CGe=new Hee({r:0,g:0,b:0,a:0},"transparent"),Vf=CGe});var Wee,v1,bN=D(()=>{Zb();Kb();Wee={re:/^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i,parse:t=>{if(t.charCodeAt(0)!==35)return;let e=t.match(Wee.re);if(!e)return;let r=e[1],n=parseInt(r,16),i=r.length,a=i%4===0,s=i>4,o=s?1:17,l=s?8:4,u=a?0:-1,h=s?255:15;return Vf.set({r:(n>>l*(u+3)&h)*o,g:(n>>l*(u+2)&h)*o,b:(n>>l*(u+1)&h)*o,a:a?(n&h)*o/255:1},t)},stringify:t=>{let{r:e,g:r,b:n,a:i}=t;return i<1?`#${wh[Math.round(e)]}${wh[Math.round(r)]}${wh[Math.round(n)]}${wh[Math.round(i*255)]}`:`#${wh[Math.round(e)]}${wh[Math.round(r)]}${wh[Math.round(n)]}`}},v1=Wee});var tT,Qb,Yee=D(()=>{Wc();Zb();tT={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=>{let e=t.match(tT.hueRe);if(e){let[,r,n]=e;switch(n){case"grad":return pr.channel.clamp.h(parseFloat(r)*.9);case"rad":return pr.channel.clamp.h(parseFloat(r)*180/Math.PI);case"turn":return pr.channel.clamp.h(parseFloat(r)*360)}}return pr.channel.clamp.h(parseFloat(t))},parse:t=>{let e=t.charCodeAt(0);if(e!==104&&e!==72)return;let r=t.match(tT.re);if(!r)return;let[,n,i,a,s,o]=r;return Vf.set({h:tT._hue2deg(n),s:pr.channel.clamp.s(parseFloat(i)),l:pr.channel.clamp.l(parseFloat(a)),a:s?pr.channel.clamp.a(o?parseFloat(s)/100:parseFloat(s)):1},t)},stringify:t=>{let{h:e,s:r,l:n,a:i}=t;return i<1?`hsla(${pr.lang.round(e)}, ${pr.lang.round(r)}%, ${pr.lang.round(n)}%, ${i})`:`hsl(${pr.lang.round(e)}, ${pr.lang.round(r)}%, ${pr.lang.round(n)}%)`}},Qb=tT});var rT,wN,Xee=D(()=>{bN();rT={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();let e=rT.colors[t];if(e)return v1.parse(e)},stringify:t=>{let e=v1.stringify(t);for(let r in rT.colors)if(rT.colors[r]===e)return r}},wN=rT});var jee,Jb,Kee=D(()=>{Wc();Zb();jee={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=>{let e=t.charCodeAt(0);if(e!==114&&e!==82)return;let r=t.match(jee.re);if(!r)return;let[,n,i,a,s,o,l,u,h]=r;return Vf.set({r:pr.channel.clamp.r(i?parseFloat(n)*2.55:parseFloat(n)),g:pr.channel.clamp.g(s?parseFloat(a)*2.55:parseFloat(a)),b:pr.channel.clamp.b(l?parseFloat(o)*2.55:parseFloat(o)),a:u?pr.channel.clamp.a(h?parseFloat(u)/100:parseFloat(u)):1},t)},stringify:t=>{let{r:e,g:r,b:n,a:i}=t;return i<1?`rgba(${pr.lang.round(e)}, ${pr.lang.round(r)}, ${pr.lang.round(n)}, ${pr.lang.round(i)})`:`rgb(${pr.lang.round(e)}, ${pr.lang.round(r)}, ${pr.lang.round(n)})`}},Jb=jee});var _Ge,Fa,kh=D(()=>{bN();Yee();Xee();Kee();Kb();_Ge={format:{keyword:wN,hex:v1,rgb:Jb,rgba:Jb,hsl:Qb,hsla:Qb},parse:t=>{if(typeof t!="string")return t;let e=v1.parse(t)||Jb.parse(t)||Qb.parse(t)||wN.parse(t);if(e)return e;throw new Error(`Unsupported color format: "${t}"`)},stringify:t=>!t.changed&&t.color?t.color:t.type.is(Ba.HSL)||t.data.r===void 0?Qb.stringify(t):t.a<1||!Number.isInteger(t.r)||!Number.isInteger(t.g)||!Number.isInteger(t.b)?Jb.stringify(t):v1.stringify(t)},Fa=_Ge});var AGe,nT,kN=D(()=>{Wc();kh();AGe=(t,e)=>{let r=Fa.parse(t);for(let n in e)r[n]=pr.channel.clamp[n](e[n]);return Fa.stringify(r)},nT=AGe});var LGe,uo,TN=D(()=>{Wc();Zb();kh();kN();LGe=(t,e,r=0,n=1)=>{if(typeof t!="number")return nT(t,{a:e});let i=Vf.set({r:pr.channel.clamp.r(t),g:pr.channel.clamp.g(e),b:pr.channel.clamp.b(r),a:pr.channel.clamp.a(n)});return Fa.stringify(i)},uo=LGe});var RGe,x1,Zee=D(()=>{Wc();kh();RGe=(t,e)=>pr.lang.round(Fa.parse(t)[e]),x1=RGe});var DGe,Qee,Jee=D(()=>{Wc();kh();DGe=t=>{let{r:e,g:r,b:n}=Fa.parse(t),i=.2126*pr.channel.toLinear(e)+.7152*pr.channel.toLinear(r)+.0722*pr.channel.toLinear(n);return pr.lang.round(i)},Qee=DGe});var IGe,ete,tte=D(()=>{Jee();IGe=t=>Qee(t)>=.5,ete=IGe});var MGe,bs,rte=D(()=>{tte();MGe=t=>!ete(t),bs=MGe});var NGe,iT,EN=D(()=>{Wc();kh();NGe=(t,e,r)=>{let n=Fa.parse(t),i=n[e],a=pr.channel.clamp[e](i+r);return i!==a&&(n[e]=a),Fa.stringify(n)},iT=NGe});var OGe,Wt,nte=D(()=>{EN();OGe=(t,e)=>iT(t,"l",e),Wt=OGe});var PGe,tr,ite=D(()=>{EN();PGe=(t,e)=>iT(t,"l",-e),tr=PGe});var BGe,tt,ate=D(()=>{kh();kN();BGe=(t,e)=>{let r=Fa.parse(t),n={};for(let i in e)e[i]&&(n[i]=r[i]+e[i]);return nT(t,n)},tt=BGe});var FGe,ste,ote=D(()=>{kh();TN();FGe=(t,e,r=50)=>{let{r:n,g:i,b:a,a:s}=Fa.parse(t),{r:o,g:l,b:u,a:h}=Fa.parse(e),f=r/100,d=f*2-1,p=s-h,g=((d*p===-1?d:(d+p)/(1+d*p))+1)/2,y=1-g,v=n*g+o*y,x=i*g+l*y,k=a*g+u*y,_=s*f+h*(1-f);return uo(v,x,k,_)},ste=FGe});var zGe,qt,lte=D(()=>{kh();ote();zGe=(t,e=100)=>{let r=Fa.parse(t);return r.r=255-r.r,r.g=255-r.g,r.b=255-r.b,ste(r,t,e)},qt=zGe});var ute=D(()=>{TN();Zee();rte();nte();ite();ate();lte()});var Cl=D(()=>{ute()});function cte(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r1?r-1:0),i=1;i2&&arguments[2]!==void 0?arguments[2]:r3;if(hte&&hte(t,null),!Yf(e))return t;let n=e.length;for(;n--;){let i=e[n];if(typeof i=="string"){let a=r(i);a!==i&&(VGe(e)||(e[n]=a),i=a)}t[i]=!0}return t}function eqe(t){for(let e=0;e0&&arguments[0]!==void 0?arguments[0]:gqe(),e=Nt=>_te(Nt);if(e.version="3.4.12",e.removed=[],!t||!t.document||t.document.nodeType!==_l.document||!t.Element)return e.isSupported=!1,e;let r=t.document,n=r,i=n.currentScript;t.DocumentFragment;let a=t.HTMLTemplateElement,s=t.Node,o=t.Element,l=t.NodeFilter,u=t.NamedNodeMap;u===void 0&&(t.NamedNodeMap||t.MozNamedAttrMap),t.HTMLFormElement;let h=t.DOMParser,f=t.trustedTypes,d=o.prototype,p=Yc(d,"cloneNode"),m=Yc(d,"remove"),g=Yc(d,"nextSibling"),y=Yc(d,"childNodes"),v=Yc(d,"parentNode"),x=Yc(d,"shadowRoot"),k=Yc(d,"attributes"),_=s&&s.prototype?Yc(s.prototype,"nodeType"):null,T=s&&s.prototype?Yc(s.prototype,"nodeName"):null;if(typeof a=="function"){let Nt=r.createElement("template");Nt.content&&Nt.content.ownerDocument&&(r=Nt.content.ownerDocument)}let S,R="",A,I=!1,P=0,O=function(){if(P>0)throw b1('A configured TRUSTED_TYPES_POLICY callback (createHTML or createScriptURL) must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose callbacks wrap DOMPurify as TRUSTED_TYPES_POLICY; see the "DOMPurify and Trusted Types" section of the README.')},C=function(Ne){O(),P++;try{return S.createHTML(Ne)}finally{P--}},N=function(Ne){O(),P++;try{return S.createScriptURL(Ne)}finally{P--}},B=function(){return I||(A=yqe(f,i),I=!0),A},F=r,M=F.implementation,$=F.createNodeIterator,z=F.createDocumentFragment,q=F.getElementsByTagName,V=n.importNode,U=Ete();e.isSupported=typeof Ste=="function"&&typeof v=="function"&&M&&M.createHTMLDocument!==void 0;let J=aqe,se=sqe,re=oqe,me=lqe,ge=uqe,ye=cqe,_e=hqe,ue=dqe,ie=wte,le=null,oe=hn({},[...yte,..._N,...AN,...LN,...vte]),ne=null,pe=hn({},[...xte,...RN,...bte,...aT]),te=Object.seal(Jg(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}})),He=null,de=null,ce=Object.seal(Jg(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}})),st=!0,Ae=!0,Ye=!1,Ge=!0,rt=!1,Xe=!0,Ze=!1,Pe=!1,Re=null,Ve=null,ke=!1,xe=!1,H=!1,ve=!1,K=!0,we=!1,Ee="user-content-",Ke=!0,Be=!1,De={},nt=null,We=hn({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","selectedcontent","style","svg","template","thead","title","video","xmp"]),ut=null,vt=hn({},["audio","video","img","source","image","track"]),gt=null,mt=hn({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),ft="http://www.w3.org/1998/Math/MathML",Dt="http://www.w3.org/2000/svg",ht="http://www.w3.org/1999/xhtml",yt=ht,W=!1,j=null,Je=hn({},[ft,Dt,ht],CN),ee=ws(["mi","mo","mn","ms","mtext"]),Te=hn({},ee),bt=ws(["annotation-xml"]),at=hn({},bt),It=hn({},["title","style","font","a","script"]),At=null,Ut=["application/xhtml+xml","text/html"],Bt="text/html",Kt=null,vr=null,Me=r.createElement("form"),kr=function(Ne){return Ne instanceof RegExp||Ne instanceof Function},Ue=function(){let Ne=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(vr&&vr===Ne)return;(!Ne||typeof Ne!="object")&&(Ne={}),Ne=co(Ne),At=Ut.indexOf(Ne.PARSER_MEDIA_TYPE)===-1?Bt:Ne.PARSER_MEDIA_TYPE,Kt=At==="application/xhtml+xml"?CN:r3,le=Wf(Ne,"ALLOWED_TAGS",oe,{transform:Kt}),ne=Wf(Ne,"ALLOWED_ATTR",pe,{transform:Kt}),j=Wf(Ne,"ALLOWED_NAMESPACES",Je,{transform:CN}),gt=Wf(Ne,"ADD_URI_SAFE_ATTR",mt,{transform:Kt,base:mt}),ut=Wf(Ne,"ADD_DATA_URI_TAGS",vt,{transform:Kt,base:vt}),nt=Wf(Ne,"FORBID_CONTENTS",We,{transform:Kt}),He=Wf(Ne,"FORBID_TAGS",co({}),{transform:Kt}),de=Wf(Ne,"FORBID_ATTR",co({}),{transform:Kt}),De=rs(Ne,"USE_PROFILES")?Ne.USE_PROFILES&&typeof Ne.USE_PROFILES=="object"?co(Ne.USE_PROFILES):Ne.USE_PROFILES:!1,st=Ne.ALLOW_ARIA_ATTR!==!1,Ae=Ne.ALLOW_DATA_ATTR!==!1,Ye=Ne.ALLOW_UNKNOWN_PROTOCOLS||!1,Ge=Ne.ALLOW_SELF_CLOSE_IN_ATTR!==!1,rt=Ne.SAFE_FOR_TEMPLATES||!1,Xe=Ne.SAFE_FOR_XML!==!1,Ze=Ne.WHOLE_DOCUMENT||!1,xe=Ne.RETURN_DOM||!1,H=Ne.RETURN_DOM_FRAGMENT||!1,ve=Ne.RETURN_TRUSTED_TYPE||!1,ke=Ne.FORCE_BODY||!1,K=Ne.SANITIZE_DOM!==!1,we=Ne.SANITIZE_NAMED_PROPS||!1,Ke=Ne.KEEP_CONTENT!==!1,Be=Ne.IN_PLACE||!1,ie=rqe(Ne.ALLOWED_URI_REGEXP)?Ne.ALLOWED_URI_REGEXP:wte,yt=typeof Ne.NAMESPACE=="string"?Ne.NAMESPACE:ht,Te=rs(Ne,"MATHML_TEXT_INTEGRATION_POINTS")&&Ne.MATHML_TEXT_INTEGRATION_POINTS&&typeof Ne.MATHML_TEXT_INTEGRATION_POINTS=="object"?co(Ne.MATHML_TEXT_INTEGRATION_POINTS):hn({},ee),at=rs(Ne,"HTML_INTEGRATION_POINTS")&&Ne.HTML_INTEGRATION_POINTS&&typeof Ne.HTML_INTEGRATION_POINTS=="object"?co(Ne.HTML_INTEGRATION_POINTS):hn({},bt);let et=rs(Ne,"CUSTOM_ELEMENT_HANDLING")&&Ne.CUSTOM_ELEMENT_HANDLING&&typeof Ne.CUSTOM_ELEMENT_HANDLING=="object"?co(Ne.CUSTOM_ELEMENT_HANDLING):Jg(null);if(te=Jg(null),rs(et,"tagNameCheck")&&kr(et.tagNameCheck)&&(te.tagNameCheck=et.tagNameCheck),rs(et,"attributeNameCheck")&&kr(et.attributeNameCheck)&&(te.attributeNameCheck=et.attributeNameCheck),rs(et,"allowCustomizedBuiltInElements")&&typeof et.allowCustomizedBuiltInElements=="boolean"&&(te.allowCustomizedBuiltInElements=et.allowCustomizedBuiltInElements),ks(te),rt&&(Ae=!1),H&&(xe=!0),De&&(le=hn({},vte),ne=Jg(null),De.html===!0&&(hn(le,yte),hn(ne,xte)),De.svg===!0&&(hn(le,_N),hn(ne,RN),hn(ne,aT)),De.svgFilters===!0&&(hn(le,AN),hn(ne,RN),hn(ne,aT)),De.mathMl===!0&&(hn(le,LN),hn(ne,bte),hn(ne,aT))),ce.tagCheck=null,ce.attributeCheck=null,rs(Ne,"ADD_TAGS")&&(typeof Ne.ADD_TAGS=="function"?ce.tagCheck=Ne.ADD_TAGS:Yf(Ne.ADD_TAGS)&&(le===oe&&(le=co(le)),hn(le,Ne.ADD_TAGS,Kt))),rs(Ne,"ADD_ATTR")&&(typeof Ne.ADD_ATTR=="function"?ce.attributeCheck=Ne.ADD_ATTR:Yf(Ne.ADD_ATTR)&&(ne===pe&&(ne=co(ne)),hn(ne,Ne.ADD_ATTR,Kt))),rs(Ne,"ADD_URI_SAFE_ATTR")&&Yf(Ne.ADD_URI_SAFE_ATTR)&&hn(gt,Ne.ADD_URI_SAFE_ATTR,Kt),rs(Ne,"FORBID_CONTENTS")&&Yf(Ne.FORBID_CONTENTS)&&(nt===We&&(nt=co(nt)),hn(nt,Ne.FORBID_CONTENTS,Kt)),rs(Ne,"ADD_FORBID_CONTENTS")&&Yf(Ne.ADD_FORBID_CONTENTS)&&(nt===We&&(nt=co(nt)),hn(nt,Ne.ADD_FORBID_CONTENTS,Kt)),Ke&&(le["#text"]=!0),Ze&&hn(le,["html","head","body"]),le.table&&(hn(le,["tbody"]),delete He.tbody),Ne.TRUSTED_TYPES_POLICY){if(typeof Ne.TRUSTED_TYPES_POLICY.createHTML!="function")throw b1('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof Ne.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw b1('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');let Tt=S;S=Ne.TRUSTED_TYPES_POLICY;try{R=C("")}catch(Zt){throw S=Tt,Zt}}else Ne.TRUSTED_TYPES_POLICY===null?(S=void 0,R=""):(S===void 0&&(S=B()),S&&typeof R=="string"&&(R=C("")));ws&&ws(Ne),vr=Ne},Bn=hn({},[..._N,...AN,...nqe]),un=hn({},[...LN,...iqe]),da=function(Ne,et,Tt){return et.namespaceURI===ht?Ne==="svg":et.namespaceURI===ft?Ne==="svg"&&(Tt==="annotation-xml"||Te[Tt]):!!Bn[Ne]},ra=function(Ne,et,Tt){return et.namespaceURI===ht?Ne==="math":et.namespaceURI===Dt?Ne==="math"&&at[Tt]:!!un[Ne]},nr=function(Ne,et,Tt){return et.namespaceURI===Dt&&!at[Tt]||et.namespaceURI===ft&&!Te[Tt]?!1:!un[Ne]&&(It[Ne]||!Bn[Ne])},zs=function(Ne){let et=v(Ne);(!et||!et.tagName)&&(et={namespaceURI:yt,tagName:"template"});let Tt=r3(Ne.tagName),Zt=r3(et.tagName);return j[Ne.namespaceURI]?Ne.namespaceURI===Dt?da(Tt,et,Zt):Ne.namespaceURI===ft?ra(Tt,et,Zt):Ne.namespaceURI===ht?nr(Tt,et,Zt):!!(At==="application/xhtml+xml"&&j[Ne.namespaceURI]):!1},na=function(Ne){Qg(e.removed,{element:Ne});try{v(Ne).removeChild(Ne)}catch{if(m(Ne),!v(Ne))throw b1("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place")}},Oi=function(Ne){Ti(Ne);let et=y(Ne);if(et){let Zt=[];Zg(et,Ot=>{Qg(Zt,Ot)}),Zg(Zt,Ot=>{try{m(Ot)}catch{}})}let Tt=k(Ne);if(Tt)for(let Zt=Tt.length-1;Zt>=0;--Zt){let Ot=Tt[Zt],Er=Ot&&Ot.name;if(typeof Er=="string")try{Ne.removeAttribute(Er)}catch{}}},Pi=function(Ne,et){try{Qg(e.removed,{attribute:et.getAttributeNode(Ne),from:et})}catch{Qg(e.removed,{attribute:null,from:et})}if(et.removeAttribute(Ne),Ne==="is")if(xe||H)try{na(et)}catch{}else try{et.setAttribute(Ne,"")}catch{}},vl=function(Ne){let et=k(Ne);if(et)for(let Tt=et.length-1;Tt>=0;--Tt){let Zt=et[Tt],Ot=Zt&&Zt.name;if(!(typeof Ot!="string"||ne[Kt(Ot)]))try{Ne.removeAttribute(Ot)}catch{}}},Ti=function(Ne){let et=[Ne];for(;et.length>0;){let Tt=et.pop();(_?_(Tt):Tt.nodeType)===_l.element&&vl(Tt);let Ot=y(Tt);if(Ot)for(let Er=Ot.length-1;Er>=0;--Er)et.push(Ot[Er])}},cn=function(Ne){if(!Xe)return;let et=[Ne];for(;et.length>0;){let Tt=et.pop(),Zt=_?_(Tt):Tt.nodeType;if(Zt===_l.processingInstruction||Zt===_l.comment&&ts(Tte,Tt.data)){try{m(Tt)}catch{}continue}if(Zt===_l.element){let Er=Tt,kn=Kt(T?T(Tt):Tt.nodeName);try{Er.hasAttribute&&Er.hasAttribute("patchsrc")&&Er.removeAttribute("patchsrc"),Er.hasAttribute&&Er.hasAttribute("for")&&kn!=="label"&&kn!=="output"&&Er.removeAttribute("for")}catch{}}let Ot=y(Tt);if(Ot)for(let Er=Ot.length-1;Er>=0;--Er)et.push(Ot[Er])}},Ct=function(Ne){let et=null,Tt=null;if(ke)Ne=""+Ne;else{let Er=dte(Ne,/^[\r\n\t ]+/);Tt=Er&&Er[0]}At==="application/xhtml+xml"&&yt===ht&&(Ne=''+Ne+"");let Zt=S?C(Ne):Ne;if(yt===ht)try{et=new h().parseFromString(Zt,At)}catch{}if(!et||!et.documentElement){et=M.createDocument(yt,"template",null);try{et.documentElement.innerHTML=W?R:Zt}catch{}}let Ot=et.body||et.documentElement;return Ne&&Tt&&Ot.insertBefore(r.createTextNode(Tt),Ot.childNodes[0]||null),yt===ht?q.call(et,Ze?"html":"body")[0]:Ze?et.documentElement:Ot},$t=function(Ne){return $.call(Ne.ownerDocument||Ne,Ne,l.SHOW_ELEMENT|l.SHOW_COMMENT|l.SHOW_TEXT|l.SHOW_PROCESSING_INSTRUCTION|l.SHOW_CDATA_SECTION,null)},Xt=function(Ne){return Ne=e3(Ne,J," "),Ne=e3(Ne,se," "),Ne=e3(Ne,re," "),Ne},kt=function(Ne){var et;Ne.normalize();let Tt=$.call(Ne.ownerDocument||Ne,Ne,l.SHOW_TEXT|l.SHOW_COMMENT|l.SHOW_CDATA_SECTION|l.SHOW_PROCESSING_INSTRUCTION,null),Zt=Tt.nextNode();for(;Zt;)Zt.data=Xt(Zt.data),Zt=Tt.nextNode();let Ot=(et=Ne.querySelectorAll)===null||et===void 0?void 0:et.call(Ne,"template");Ot&&Zg(Ot,Er=>{Le(Er.content)&&kt(Er.content)})},jr=function(Ne){let et=T?T(Ne):null;return typeof et!="string"||Kt(et)!=="form"?!1:typeof Ne.nodeName!="string"||typeof Ne.textContent!="string"||typeof Ne.removeChild!="function"||Ne.attributes!==k(Ne)||typeof Ne.removeAttribute!="function"||typeof Ne.setAttribute!="function"||typeof Ne.namespaceURI!="string"||typeof Ne.insertBefore!="function"||typeof Ne.hasChildNodes!="function"||Ne.nodeType!==_(Ne)||Ne.childNodes!==y(Ne)},Le=function(Ne){if(!_||typeof Ne!="object"||Ne===null)return!1;try{return _(Ne)===_l.documentFragment}catch{return!1}},qn=function(Ne){if(!_||typeof Ne!="object"||Ne===null)return!1;try{return typeof _(Ne)=="number"}catch{return!1}};function Oe(Nt,Ne,et){Nt.length!==0&&Zg(Nt,Tt=>{Tt.call(e,Ne,et,vr)})}let gi=function(Ne,et){return!!(Xe&&Ne.hasChildNodes()&&!qn(Ne.firstElementChild)&&ts(kte,Ne.textContent)&&ts(kte,Ne.innerHTML)||Xe&&Ne.namespaceURI===ht&&et==="style"&&qn(Ne.firstElementChild)||Ne.nodeType===_l.processingInstruction||Xe&&Ne.nodeType===_l.comment&&ts(Tte,Ne.data))},Fu=function(Ne,et){if(!He[et]&&uh(et)&&(te.tagNameCheck instanceof RegExp&&ts(te.tagNameCheck,et)||te.tagNameCheck instanceof Function&&te.tagNameCheck(et)))return!1;if(Ke&&!nt[et]){let Tt=v(Ne),Zt=y(Ne);if(Zt&&Tt){let Ot=Zt.length;for(let Er=Ot-1;Er>=0;--Er){let kn=Be?Zt[Er]:p(Zt[Er],!0);Tt.insertBefore(kn,g(Ne))}}}return na(Ne),!0},ia=function(Ne,et){if(Oe(U.beforeSanitizeElements,Ne,null),Ne!==et&&v(Ne)===null)return!0;if(jr(Ne))return na(Ne),!0;let Tt=Kt(T?T(Ne):Ne.nodeName);if(Oe(U.uponSanitizeElement,Ne,{tagName:Tt,allowedTags:le}),Ne!==et&&v(Ne)===null)return!0;if(gi(Ne,Tt))return na(Ne),!0;if(He[Tt]||!(ce.tagCheck instanceof Function&&ce.tagCheck(Tt))&&!le[Tt]){let Ot=Fu(Ne,Tt);return Ot===!1&&Oe(U.afterSanitizeElements,Ne,null),Ot}if((_?_(Ne):Ne.nodeType)===_l.element&&!zs(Ne)||(Tt==="noscript"||Tt==="noembed"||Tt==="noframes")&&ts(pqe,Ne.innerHTML))return na(Ne),!0;if(rt&&Ne.nodeType===_l.text){let Ot=Xt(Ne.textContent);Ne.textContent!==Ot&&(Qg(e.removed,{element:Ne.cloneNode()}),Ne.textContent=Ot)}return Oe(U.afterSanitizeElements,Ne,null),!1},Rf=function(Ne,et,Tt){if(de[et]||Xe&&et==="patchsrc"||Xe&&et==="for"&&Ne!=="label"&&Ne!=="output"||K&&(et==="id"||et==="name")&&(Tt in r||Tt in Me))return!1;let Zt=ne[et]||ce.attributeCheck instanceof Function&&ce.attributeCheck(et,Ne);if(!(Ae&&ts(me,et))){if(!(st&&ts(ge,et))){if(Zt){if(!gt[et]){if(!ts(ie,e3(Tt,_e,""))){if(!((et==="src"||et==="xlink:href"||et==="href")&&Ne!=="script"&&pte(Tt,"data:")===0&&ut[Ne])){if(!(Ye&&!ts(ye,e3(Tt,_e,"")))){if(Tt)return!1}}}}}else if(!(uh(Ne)&&(te.tagNameCheck instanceof RegExp&&ts(te.tagNameCheck,Ne)||te.tagNameCheck instanceof Function&&te.tagNameCheck(Ne))&&(te.attributeNameCheck instanceof RegExp&&ts(te.attributeNameCheck,et)||te.attributeNameCheck instanceof Function&&te.attributeNameCheck(et,Ne))||et==="is"&&te.allowCustomizedBuiltInElements&&(te.tagNameCheck instanceof RegExp&&ts(te.tagNameCheck,Tt)||te.tagNameCheck instanceof Function&&te.tagNameCheck(Tt))))return!1}}return!0},Cg=hn({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),uh=function(Ne){return!Cg[r3(Ne)]&&ts(ue,Ne)},Wi=function(Ne,et,Tt,Zt){if(S&&typeof f=="object"&&typeof f.getAttributeType=="function"&&!Tt)switch(f.getAttributeType(Ne,et)){case"TrustedHTML":return C(Zt);case"TrustedScriptURL":return N(Zt)}return Zt},Xl=function(Ne,et,Tt,Zt){try{Tt?Ne.setAttributeNS(Tt,et,Zt):Ne.setAttribute(et,Zt),jr(Ne)?na(Ne):fte(e.removed)}catch{Pi(et,Ne)}},Ic=function(Ne){Oe(U.beforeSanitizeAttributes,Ne,null);let et=Ne.attributes;if(!et||jr(Ne))return;let Tt={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:ne,forceKeepAttr:void 0},Zt=et.length,Ot=Kt(Ne.nodeName);for(;Zt--;){let Er=et[Zt],kn=Er.name,jn=Er.namespaceURI,Ia=Er.value,Kn=Kt(kn),Vr=Ia,Un=kn==="value"?Vr:KGe(Vr);if(Tt.attrName=Kn,Tt.attrValue=Un,Tt.keepAttr=!0,Tt.forceKeepAttr=void 0,Oe(U.uponSanitizeAttribute,Ne,Tt),Un=Tt.attrValue,we&&(Kn==="id"||Kn==="name")&&pte(Un,Ee)!==0&&(Pi(kn,Ne),Un=Ee+Un),Xe&&ts(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,Un)){Pi(kn,Ne);continue}if(Kn==="attributename"&&dte(Un,"href")){Pi(kn,Ne);continue}if(!Tt.forceKeepAttr){if(!Tt.keepAttr){Pi(kn,Ne);continue}if(!Ge&&ts(mqe,Un)){Pi(kn,Ne);continue}if(rt&&(Un=Xt(Un)),!Rf(Ot,Kn,Un)){Pi(kn,Ne);continue}Un=Wi(Ot,Kn,jn,Un),Un!==Vr&&Xl(Ne,kn,jn,Un)}}Oe(U.afterSanitizeAttributes,Ne,null)},_t=function(Ne){let et=null,Tt=$t(Ne);for(Oe(U.beforeSanitizeShadowDOM,Ne,null);et=Tt.nextNode();)if(Oe(U.uponSanitizeShadowNode,et,null),ia(et,Ne),Ic(et),Le(et.content)&&_t(et.content),(_?_(et):et.nodeType)===_l.element){let Ot=x(et);Le(Ot)&&(Go(Ot),_t(Ot))}Oe(U.afterSanitizeShadowDOM,Ne,null)},Go=function(Ne){let et=[{node:Ne,shadow:null}];for(;et.length>0;){let Tt=et.pop();if(Tt.shadow){_t(Tt.shadow);continue}let Zt=Tt.node,Er=(_?_(Zt):Zt.nodeType)===_l.element,kn=y(Zt);if(kn)for(let jn=kn.length-1;jn>=0;--jn)et.push({node:kn[jn],shadow:null});if(Er){let jn=T?T(Zt):null;if(typeof jn=="string"&&Kt(jn)==="template"){let Ia=Zt.content;Le(Ia)&&et.push({node:Ia,shadow:null})}}if(Er){let jn=x(Zt);Le(jn)&&et.push({node:null,shadow:jn},{node:jn,shadow:null})}}};return e.sanitize=function(Nt){let Ne=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},et=null,Tt=null,Zt=null,Ot=null;if(W=!Nt,W&&(Nt=""),typeof Nt!="string"&&!qn(Nt)&&(Nt=tqe(Nt),typeof Nt!="string"))throw b1("dirty is not a string, aborting");if(!e.isSupported)return Nt;Pe?(le=Re,ne=Ve):Ue(Ne),(U.uponSanitizeElement.length>0||U.uponSanitizeAttribute.length>0)&&(le=co(le)),U.uponSanitizeAttribute.length>0&&(ne=co(ne)),e.removed=[];let Er=Be&&typeof Nt!="string"&&qn(Nt);if(Er){cn(Nt);let Kn=T?T(Nt):Nt.nodeName;if(typeof Kn=="string"){let Vr=Kt(Kn);if(!le[Vr]||He[Vr])throw Oi(Nt),b1("root node is forbidden and cannot be sanitized in-place")}if(jr(Nt))throw Oi(Nt),b1("root node is clobbered and cannot be sanitized in-place");try{Go(Nt)}catch(Vr){throw Oi(Nt),Vr}}else if(qn(Nt))et=Ct(""),Tt=et.ownerDocument.importNode(Nt,!0),Tt.nodeType===_l.element&&Tt.nodeName==="BODY"||Tt.nodeName==="HTML"?et=Tt:et.appendChild(Tt),Go(Tt);else{if(!xe&&!rt&&!Ze&&Nt.indexOf("<")===-1)return S&&ve?C(Nt):Nt;if(et=Ct(Nt),!et)return xe?null:ve?R:""}et&&ke&&na(et.firstChild);let kn=Er?Nt:et,jn=$t(kn);try{for(;Zt=jn.nextNode();)ia(Zt,kn),Ic(Zt),Le(Zt.content)&&_t(Zt.content)}catch(Kn){throw Er&&(Oi(Nt),Zg(e.removed,Vr=>{Vr.element&&Ti(Vr.element)})),Kn}if(Er)return Zg(e.removed,Kn=>{Kn.element&&Ti(Kn.element)}),rt&&kt(Nt),Nt;if(xe){if(rt&&kt(et),H)for(Ot=z.call(et.ownerDocument);et.firstChild;)Ot.appendChild(et.firstChild);else Ot=et;return(ne.shadowroot||ne.shadowrootmode)&&(Ot=V.call(n,Ot,!0)),Ot}let Ia=Ze?et.outerHTML:et.innerHTML;return Ze&&le["!doctype"]&&et.ownerDocument&&et.ownerDocument.doctype&&et.ownerDocument.doctype.name&&ts(fqe,et.ownerDocument.doctype.name)&&(Ia=" +`+Ia),rt&&(Ia=Xt(Ia)),S&&ve?C(Ia):Ia},e.setConfig=function(){let Nt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Ue(Nt),Pe=!0,Re=le,Ve=ne},e.clearConfig=function(){vr=null,Pe=!1,Re=null,Ve=null,S=A,R=""},e.isValidAttribute=function(Nt,Ne,et){vr||Ue({});let Tt=Kt(Nt),Zt=Kt(Ne);return Rf(Tt,Zt,et)},e.addHook=function(Nt,Ne){typeof Ne=="function"&&rs(U,Nt)&&Qg(U[Nt],Ne)},e.removeHook=function(Nt,Ne){if(rs(U,Nt)){if(Ne!==void 0){let et=XGe(U[Nt],Ne);return et===-1?void 0:jGe(U[Nt],et,1)[0]}return fte(U[Nt])}},e.removeHooks=function(Nt){rs(U,Nt)&&(U[Nt]=[])},e.removeAllHooks=function(){U=Ete()},e}var Ste,hte,VGe,WGe,YGe,ws,ks,Jg,Cte,DN,IN,Zg,XGe,fte,Qg,jGe,Yf,r3,CN,dte,e3,pte,KGe,ZGe,QGe,mte,gte,rs,t3,ts,b1,yte,_N,AN,nqe,LN,iqe,vte,xte,RN,bte,aT,aqe,sqe,oqe,lqe,uqe,wte,cqe,hqe,fqe,dqe,kte,Tte,pqe,mqe,_l,gqe,yqe,Ete,Wf,Xf,MN=D(()=>{Ste=Object.entries,hte=Object.setPrototypeOf,VGe=Object.isFrozen,WGe=Object.getPrototypeOf,YGe=Object.getOwnPropertyDescriptor,ws=Object.freeze,ks=Object.seal,Jg=Object.create,Cte=typeof Reflect<"u"&&Reflect,DN=Cte.apply,IN=Cte.construct;ws||(ws=function(e){return e});ks||(ks=function(e){return e});DN||(DN=function(e,r){for(var n=arguments.length,i=new Array(n>2?n-2:0),a=2;a1?r-1:0),i=1;i"u"?null:ka(BigInt.prototype.toString),gte=typeof Symbol>"u"?null:ka(Symbol.prototype.toString),rs=ka(Object.prototype.hasOwnProperty),t3=ka(Object.prototype.toString),ts=ka(RegExp.prototype.test),b1=JGe(TypeError);yte=ws(["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"]),_N=ws(["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"]),AN=ws(["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"]),nqe=ws(["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"]),LN=ws(["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"]),iqe=ws(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),vte=ws(["#text"]),xte=ws(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","command","commandfor","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns"]),RN=ws(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dominant-baseline","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-orientation","text-rendering","textlength","type","u1","u2","unicode","values","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"]),bte=ws(["accent","accentunder","align","bevelled","close","columnalign","columnlines","columnspacing","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lquote","lspace","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),aT=ws(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),aqe=ks(/{{[\w\W]*|^[\w\W]*}}/g),sqe=ks(/<%[\w\W]*|^[\w\W]*%>/g),oqe=ks(/\${[\w\W]*/g),lqe=ks(/^data-[\-\w.\u00B7-\uFFFF]+$/),uqe=ks(/^aria-[\-\w]+$/),wte=ks(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),cqe=ks(/^(?:\w+script|data):/i),hqe=ks(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),fqe=ks(/^html$/i),dqe=ks(/^[a-z][.\w]*(-[.\w]+)+$/i),kte=ks(/<[/\w!]/g),Tte=ks(/<[/\w]/g),pqe=ks(/<\/no(script|embed|frames)/i),mqe=ks(/\/>/i),_l={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,processingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},gqe=function(){return typeof window>"u"?null:window},yqe=function(e,r){if(typeof e!="object"||typeof e.createPolicy!="function")return null;let n=null,i="data-tt-policy-suffix";r&&r.hasAttribute(i)&&(n=r.getAttribute(i));let a="dompurify"+(n?"#"+n:"");try{return e.createPolicy(a,{createHTML(s){return s},createScriptURL(s){return s}})}catch{return console.warn("TrustedTypes policy "+a+" could not be created."),null}},Ete=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},Wf=function(e,r,n,i){return rs(e,r)&&Yf(e[r])?hn(i.base?co(i.base):{},e[r],i.transform):n};Xf=_te()});function Vte(){let t="data-temp-href-target";Xf.addHook("beforeSanitizeAttributes",e=>{e instanceof Element&&e.tagName==="A"&&e.hasAttribute("target")&&e.setAttribute(t,e.getAttribute("target")??"")}),Xf.addHook("afterSanitizeAttributes",e=>{e instanceof Element&&e.tagName==="A"&&e.hasAttribute(t)&&(e.setAttribute("target",e.getAttribute(t)??""),e.removeAttribute(t),e.getAttribute("target")==="_blank"&&e.setAttribute("rel","noopener"))})}var Mte,Ite,b,k1,Th,he,lT,ru,BN,l2,vqe,e2,FN,w1,a3,zN,Nte,Ote,NN,Gi,uT,cT,ho,t2,xqe,bqe,r2,wqe,kqe,n2,Tqe,T1,i2,Eqe,Sqe,a2,Cqe,_qe,Xc,Eh,Pte,Bte,Aqe,Ir,i3,Lqe,E1,Ho,Fte,o2,n3,hT,zte,$te,Gte,$N,GN,Yr,qte,Ute,s3,Rqe,Ate,Dqe,Hte,S1,Iqe,Mqe,Wte,Lte,Qr,Nqe,Oqe,Pqe,Bqe,Yte,Fqe,dn,zqe,$qe,jc,ON,Gqe,qqe,Rte,PN,za,u2,jf,St,Uqe,Hqe,ei,Uu,sT,Vqe,Wqe,Xte,fT,qN,UN,HN,VN,Jr,en,tn,rn,nn,pn,an,Dte,Yqe,Fe,o3,dT,pT,WN,Xqe,oT,l3,mT,s2,jqe,Nr=D(()=>{Mte=Na(Jk(),1);Cl();Cl();Cl();Cl();Cl();Cl();MN();Ite=Object.defineProperty,b=(t,e)=>Ite(t,"name",{value:e,configurable:!0}),k1=(t,e)=>{for(var r in e)Ite(t,r,{get:e[r],enumerable:!0})},Th={trace:0,debug:1,info:2,warn:3,error:4,fatal:5},he={trace:b((...t)=>{},"trace"),debug:b((...t)=>{},"debug"),info:b((...t)=>{},"info"),warn:b((...t)=>{},"warn"),error:b((...t)=>{},"error"),fatal:b((...t)=>{},"fatal")},lT=b(function(t="fatal"){let e=Th.fatal;typeof t=="string"?t.toLowerCase()in Th&&(e=Th[t]):typeof t=="number"&&(e=t),he.trace=()=>{},he.debug=()=>{},he.info=()=>{},he.warn=()=>{},he.error=()=>{},he.fatal=()=>{},e<=Th.fatal&&(he.fatal=console.error?console.error.bind(console,ru("FATAL"),"color: orange"):console.log.bind(console,"\x1B[35m",ru("FATAL"))),e<=Th.error&&(he.error=console.error?console.error.bind(console,ru("ERROR"),"color: orange"):console.log.bind(console,"\x1B[31m",ru("ERROR"))),e<=Th.warn&&(he.warn=console.warn?console.warn.bind(console,ru("WARN"),"color: orange"):console.log.bind(console,"\x1B[33m",ru("WARN"))),e<=Th.info&&(he.info=console.info?console.info.bind(console,ru("INFO"),"color: lightblue"):console.log.bind(console,"\x1B[34m",ru("INFO"))),e<=Th.debug&&(he.debug=console.debug?console.debug.bind(console,ru("DEBUG"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",ru("DEBUG"))),e<=Th.trace&&(he.trace=console.debug?console.debug.bind(console,ru("TRACE"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",ru("TRACE")))},"setLogLevel"),ru=b(t=>`%c${(0,Mte.default)().format("ss.SSS")} : ${t} : `,"format"),BN=/^-{3}\s*[\n\r](.*?)[\n\r]-{3}\s*[\n\r]+/s,l2=/%{2}{\s*(?:(\w+)\s*:|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,vqe=/\s*%%.*\n/gm,FN=(e2=class extends Error{constructor(e){super(e),this.name="UnknownDiagramError"}},b(e2,"UnknownDiagramError"),e2),w1={},a3=b(function(t,e){t=t.replace(BN,"").replace(l2,"").replace(vqe,` +`);for(let[r,{detector:n}]of Object.entries(w1))if(n(t,e))return r;throw new FN(`No diagram type detected matching given configuration for text: ${t}`)},"detectType"),zN=b((...t)=>{for(let{id:e,detector:r,loader:n}of t)Nte(e,r,n)},"registerLazyLoadedDiagrams"),Nte=b((t,e,r)=>{w1[t]&&he.warn(`Detector with key ${t} already exists. Overwriting.`),w1[t]={detector:e,loader:r},he.debug(`Detector with key ${t} added${r?" with loader":""}`)},"addDetector"),Ote=b(t=>w1[t].loader,"getDiagramLoader"),NN=b((t,e,{depth:r=2,clobber:n=!1}={})=>{let i={depth:r,clobber:n};return Array.isArray(e)&&!Array.isArray(t)?(e.forEach(a=>NN(t,a,i)),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]=NN(t[a],e[a],{depth:r-1,clobber:n})):(n||typeof t[a]!="object"&&typeof e[a]!="object")&&(t[a]=e[a])}),t)},"assignWithDepth"),Gi=NN,uT="#ffffff",cT="#f2f2f2",ho=b((t,e)=>e?tt(t,{s:-40,l:10}):tt(t,{s:-40,l:-10}),"mkBorder"),xqe=(t2=class{constructor(){this.background="#f4f4f4",this.primaryColor="#fff4dd",this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px"}updateColors(){if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||tt(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||tt(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||ho(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||ho(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||ho(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||ho(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||qt(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||qt(this.tertiaryColor),this.lineColor=this.lineColor||qt(this.background),this.arrowheadColor=this.arrowheadColor||qt(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?tr(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||tr(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||qt(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||Wt(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.darkMode?(this.rowOdd=this.rowOdd||tr(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||tr(this.mainBkg,10)):(this.rowOdd=this.rowOdd||Wt(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||Wt(this.mainBkg,5)),this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||this.tertiaryColor,this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||tt(this.primaryColor,{h:30}),this.cScale4=this.cScale4||tt(this.primaryColor,{h:60}),this.cScale5=this.cScale5||tt(this.primaryColor,{h:90}),this.cScale6=this.cScale6||tt(this.primaryColor,{h:120}),this.cScale7=this.cScale7||tt(this.primaryColor,{h:150}),this.cScale8=this.cScale8||tt(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||tt(this.primaryColor,{h:270}),this.cScale10=this.cScale10||tt(this.primaryColor,{h:300}),this.cScale11=this.cScale11||tt(this.primaryColor,{h:330}),this.darkMode)for(let r=0;r{this[n]=e[n]}),this.updateColors(),r.forEach(n=>{this[n]=e[n]})}},b(t2,"Theme"),t2),bqe=b(t=>{let e=new xqe;return e.calculate(t),e},"getThemeVariables"),wqe=(r2=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=Wt(this.primaryColor,16),this.tertiaryColor=tt(this.primaryColor,{h:-160}),this.primaryBorderColor=qt(this.background),this.secondaryBorderColor=ho(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=ho(this.tertiaryColor,this.darkMode),this.primaryTextColor=qt(this.primaryColor),this.secondaryTextColor=qt(this.secondaryColor),this.tertiaryTextColor=qt(this.tertiaryColor),this.lineColor=qt(this.background),this.textColor=qt(this.background),this.mainBkg="#1f2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=Wt(qt("#323D47"),10),this.lineColor="calculated",this.border1="#ccc",this.border2=uo(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=tr("#EAE8D9",30),this.altSectionBkgColor="calculated",this.sectionBkgColor2="#EAE8D9",this.excludeBkgColor=tr(this.sectionBkgColor,10),this.taskBorderColor=uo(255,255,255,70),this.taskBkgColor="calculated",this.taskTextColor="calculated",this.taskTextLightColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor=uo(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.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.rowOdd=this.rowOdd||Wt(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||tr(this.mainBkg,10),this.labelColor="calculated",this.errorBkgColor="#a44141",this.errorTextColor="#ddd"}updateColors(){this.secondBkg=Wt(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=Wt(this.labelBackground,25),this.actorBorder=this.border1,this.actorBkg=this.mainBkg,this.actorTextColor=this.mainContrastColor,this.actorLineColor=this.actorBorder,this.signalColor=this.mainContrastColor,this.signalTextColor=this.mainContrastColor,this.labelBoxBkgColor=this.actorBkg,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.mainContrastColor,this.loopTextColor=this.mainContrastColor,this.noteBorderColor=this.secondaryBorderColor,this.noteBkgColor=this.secondBkg,this.noteTextColor=this.secondaryTextColor,this.activationBorderColor=this.border1,this.activationBkgColor=this.secondBkg,this.altSectionBkgColor=this.background,this.taskBkgColor=Wt(this.mainBkg,23),this.taskTextColor=this.darkTextColor,this.taskTextLightColor=this.mainContrastColor,this.taskTextOutsideColor=this.taskTextLightColor,this.gridColor=this.mainContrastColor,this.doneTaskBkgColor=this.mainContrastColor,this.taskTextDarkColor=this.darkTextColor,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#555",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.primaryBorderColor,this.specialStateColor="#f4f4f4",this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=tt(this.primaryColor,{h:64}),this.fillType3=tt(this.secondaryColor,{h:64}),this.fillType4=tt(this.primaryColor,{h:-64}),this.fillType5=tt(this.secondaryColor,{h:-64}),this.fillType6=tt(this.primaryColor,{h:128}),this.fillType7=tt(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||tt(this.primaryColor,{h:30}),this.cScale4=this.cScale4||tt(this.primaryColor,{h:60}),this.cScale5=this.cScale5||tt(this.primaryColor,{h:90}),this.cScale6=this.cScale6||tt(this.primaryColor,{h:120}),this.cScale7=this.cScale7||tt(this.primaryColor,{h:150}),this.cScale8=this.cScale8||tt(this.primaryColor,{h:210}),this.cScale9=this.cScale9||tt(this.primaryColor,{h:270}),this.cScale10=this.cScale10||tt(this.primaryColor,{h:300}),this.cScale11=this.cScale11||tt(this.primaryColor,{h:330});for(let e=0;e{this[n]=e[n]}),this.updateColors(),r.forEach(n=>{this[n]=e[n]})}},b(r2,"Theme"),r2),kqe=b(t=>{let e=new wqe;return e.calculate(t),e},"getThemeVariables"),Tqe=(n2=class{constructor(){this.background="#f4f4f4",this.primaryColor="#ECECFF",this.secondaryColor=tt(this.primaryColor,{h:120}),this.secondaryColor="#ffffde",this.tertiaryColor=tt(this.primaryColor,{h:-160}),this.primaryBorderColor=ho(this.primaryColor,this.darkMode),this.secondaryBorderColor=ho(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=ho(this.tertiaryColor,this.darkMode),this.primaryTextColor=qt(this.primaryColor),this.secondaryTextColor=qt(this.secondaryColor),this.tertiaryTextColor=qt(this.tertiaryColor),this.lineColor=qt(this.background),this.textColor=qt(this.background),this.background="white",this.mainBkg="#ECECFF",this.secondBkg="#ffffde",this.lineColor="#333333",this.border1="#9370DB",this.border2="#aaaa33",this.arrowheadColor="#333333",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.labelBackground="rgba(232,232,232, 0.8)",this.textColor="#333",this.THEME_COLOR_LIMIT=12,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="calculated",this.edgeLabelBackground="calculated",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="black",this.actorLineColor="calculated",this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="calculated",this.altSectionBkgColor="calculated",this.sectionBkgColor2="calculated",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="calculated",this.taskTextLightColor="calculated",this.taskTextColor=this.taskTextLightColor,this.taskTextDarkColor="calculated",this.taskTextOutsideColor=this.taskTextDarkColor,this.taskTextClickableColor="calculated",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="calculated",this.critBorderColor="calculated",this.critBkgColor="calculated",this.todayLineColor="calculated",this.sectionBkgColor=uo(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.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.rowOdd="calculated",this.rowEven="calculated",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.updateColors()}updateColors(){this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||tt(this.primaryColor,{h:30}),this.cScale4=this.cScale4||tt(this.primaryColor,{h:60}),this.cScale5=this.cScale5||tt(this.primaryColor,{h:90}),this.cScale6=this.cScale6||tt(this.primaryColor,{h:120}),this.cScale7=this.cScale7||tt(this.primaryColor,{h:150}),this.cScale8=this.cScale8||tt(this.primaryColor,{h:210}),this.cScale9=this.cScale9||tt(this.primaryColor,{h:270}),this.cScale10=this.cScale10||tt(this.primaryColor,{h:300}),this.cScale11=this.cScale11||tt(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||tr(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||tr(this.tertiaryColor,40);for(let e=0;e{this[n]==="calculated"&&(this[n]=void 0)}),typeof e!="object"){this.updateColors();return}let r=Object.keys(e);r.forEach(n=>{this[n]=e[n]}),this.updateColors(),r.forEach(n=>{this[n]=e[n]})}},b(n2,"Theme"),n2),T1=b(t=>{let e=new Tqe;return e.calculate(t),e},"getThemeVariables"),Eqe=(i2=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=Wt("#cde498",10),this.primaryBorderColor=ho(this.primaryColor,this.darkMode),this.secondaryBorderColor=ho(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=ho(this.tertiaryColor,this.darkMode),this.primaryTextColor=qt(this.primaryColor),this.secondaryTextColor=qt(this.secondaryColor),this.tertiaryTextColor=qt(this.primaryColor),this.lineColor=qt(this.background),this.textColor=qt(this.background),this.THEME_COLOR_LIMIT=12,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="#333",this.edgeLabelBackground="#e8e8e8",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="black",this.actorLineColor="calculated",this.signalColor="#333",this.signalTextColor="#333",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="#326932",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="#6eaa49",this.altSectionBkgColor="white",this.sectionBkgColor2="#6eaa49",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="#487e3a",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="black",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="lightgrey",this.doneTaskBkgColor="lightgrey",this.doneTaskBorderColor="grey",this.critBorderColor="#ff8888",this.critBkgColor="red",this.todayLineColor="red",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222"}updateColors(){this.actorBorder=tr(this.mainBkg,20),this.actorBkg=this.mainBkg,this.labelBoxBkgColor=this.actorBkg,this.labelTextColor=this.actorTextColor,this.loopTextColor=this.actorTextColor,this.noteBorderColor=this.border2,this.noteTextColor=this.actorTextColor,this.actorLineColor=this.actorBorder,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||tt(this.primaryColor,{h:30}),this.cScale4=this.cScale4||tt(this.primaryColor,{h:60}),this.cScale5=this.cScale5||tt(this.primaryColor,{h:90}),this.cScale6=this.cScale6||tt(this.primaryColor,{h:120}),this.cScale7=this.cScale7||tt(this.primaryColor,{h:150}),this.cScale8=this.cScale8||tt(this.primaryColor,{h:210}),this.cScale9=this.cScale9||tt(this.primaryColor,{h:270}),this.cScale10=this.cScale10||tt(this.primaryColor,{h:300}),this.cScale11=this.cScale11||tt(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||tr(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||tr(this.tertiaryColor,40);for(let e=0;e{this[n]=e[n]}),this.updateColors(),r.forEach(n=>{this[n]=e[n]})}},b(i2,"Theme"),i2),Sqe=b(t=>{let e=new Eqe;return e.calculate(t),e},"getThemeVariables"),Cqe=(a2=class{constructor(){this.primaryColor="#eee",this.contrast="#707070",this.secondaryColor=Wt(this.contrast,55),this.background="#ffffff",this.tertiaryColor=tt(this.primaryColor,{h:-160}),this.primaryBorderColor=ho(this.primaryColor,this.darkMode),this.secondaryBorderColor=ho(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=ho(this.tertiaryColor,this.darkMode),this.primaryTextColor=qt(this.primaryColor),this.secondaryTextColor=qt(this.secondaryColor),this.tertiaryTextColor=qt(this.tertiaryColor),this.lineColor=qt(this.background),this.textColor=qt(this.background),this.mainBkg="#eee",this.secondBkg="calculated",this.lineColor="#666",this.border1="#999",this.border2="calculated",this.note="#ffa",this.text="#333",this.critical="#d42",this.done="#bbb",this.arrowheadColor="#333333",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.THEME_COLOR_LIMIT=12,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="calculated",this.edgeLabelBackground="white",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="calculated",this.actorLineColor=this.actorBorder,this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="calculated",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="calculated",this.altSectionBkgColor="white",this.sectionBkgColor2="calculated",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="calculated",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="calculated",this.critBkgColor="calculated",this.critBorderColor="calculated",this.todayLineColor="calculated",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.rowOdd=this.rowOdd||Wt(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||"#f4f4f4",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222"}updateColors(){this.secondBkg=Wt(this.contrast,55),this.border2=this.contrast,this.actorBorder=Wt(this.border1,23),this.actorBkg=this.mainBkg,this.actorTextColor=this.text,this.actorLineColor=this.actorBorder,this.signalColor=this.text,this.signalTextColor=this.text,this.labelBoxBkgColor=this.actorBkg,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.text,this.loopTextColor=this.text,this.noteBorderColor="#999",this.noteBkgColor="#666",this.noteTextColor="#fff",this.cScale0=this.cScale0||"#555",this.cScale1=this.cScale1||"#F4F4F4",this.cScale2=this.cScale2||"#555",this.cScale3=this.cScale3||"#BBB",this.cScale4=this.cScale4||"#777",this.cScale5=this.cScale5||"#999",this.cScale6=this.cScale6||"#DDD",this.cScale7=this.cScale7||"#FFF",this.cScale8=this.cScale8||"#DDD",this.cScale9=this.cScale9||"#BBB",this.cScale10=this.cScale10||"#999",this.cScale11=this.cScale11||"#777";for(let e=0;e{this[n]=e[n]}),this.updateColors(),r.forEach(n=>{this[n]=e[n]})}},b(a2,"Theme"),a2),_qe=b(t=>{let e=new Cqe;return e.calculate(t),e},"getThemeVariables"),Xc={base:{getThemeVariables:bqe},dark:{getThemeVariables:kqe},default:{getThemeVariables:T1},forest:{getThemeVariables:Sqe},neutral:{getThemeVariables:_qe}},Eh={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,hideEmptyMembersBox:!1},state:{useMaxWidth:!0,titleTopMargin:25,dividerMargin:10,sizeUnit:5,padding:8,textHeight:10,titleShift:-15,noteMargin:10,forkWidth:70,forkHeight:7,miniPadding:2,fontSizeFactor:5.02,fontSize:24,labelHeight:16,edgeLengthFactor:"20",compositTitleSize:35,radius:5,defaultRenderer:"dagre-wrapper"},er:{useMaxWidth:!0,titleTopMargin:25,diagramPadding:20,layoutDirection:"TB",minEntityWidth:100,minEntityHeight:75,entityPadding:15,nodeSpacing:140,rankSpacing:80,stroke:"gray",fill:"honeydew",fontSize:12},pie:{useMaxWidth:!0,textPosition:.75},quadrantChart:{useMaxWidth:!0,chartWidth:500,chartHeight:500,titleFontSize:20,titlePadding:10,quadrantPadding:5,xAxisLabelPadding:5,yAxisLabelPadding:5,xAxisLabelFontSize:16,yAxisLabelFontSize:16,quadrantLabelFontSize:16,quadrantTextTopPadding:5,pointTextPadding:5,pointLabelFontSize:12,pointRadius:5,xAxisPosition:"top",yAxisPosition:"left",quadrantInternalBorderStrokeWidth:1,quadrantExternalBorderStrokeWidth:2},xyChart:{useMaxWidth:!0,width:700,height:500,titleFontSize:20,titlePadding:10,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},kanban:{useMaxWidth:!0,padding:8,sectionWidth:200,ticketBaseUrl:""},timeline:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,leftMargin:150,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",bottomMarginAdj:1,rightAngles:!1,taskFontSize:14,taskFontFamily:'"Open Sans", sans-serif',taskMargin:50,activationWidth:10,textPlacement:"fo",actorColours:["#8FBC8F","#7CFC00","#00FFFF","#20B2AA","#B0E0E6","#FFFFE0"],sectionFills:["#191970","#8B008B","#4B0082","#2F4F4F","#800000","#8B4513","#00008B"],sectionColours:["#fff"],disableMulticolor:!1},gitGraph:{useMaxWidth:!0,titleTopMargin:25,diagramPadding:8,nodeLabel:{width:75,height:100,x:-25,y:0},mainBranchName:"main",mainBranchOrder:0,showCommitLabel:!0,showBranches:!0,rotateCommitLabel:!0,parallelCommits:!1,arrowMarkerAbsolute:!1},c4:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,c4ShapeMargin:50,c4ShapePadding:20,width:216,height:60,boxMargin:10,c4ShapeInRow:4,nextLinePaddingX:0,c4BoundaryInRow:2,personFontSize:14,personFontFamily:'"Open Sans", sans-serif',personFontWeight:"normal",external_personFontSize:14,external_personFontFamily:'"Open Sans", sans-serif',external_personFontWeight:"normal",systemFontSize:14,systemFontFamily:'"Open Sans", sans-serif',systemFontWeight:"normal",external_systemFontSize:14,external_systemFontFamily:'"Open Sans", sans-serif',external_systemFontWeight:"normal",system_dbFontSize:14,system_dbFontFamily:'"Open Sans", sans-serif',system_dbFontWeight:"normal",external_system_dbFontSize:14,external_system_dbFontFamily:'"Open Sans", sans-serif',external_system_dbFontWeight:"normal",system_queueFontSize:14,system_queueFontFamily:'"Open Sans", sans-serif',system_queueFontWeight:"normal",external_system_queueFontSize:14,external_system_queueFontFamily:'"Open Sans", sans-serif',external_system_queueFontWeight:"normal",boundaryFontSize:14,boundaryFontFamily:'"Open Sans", sans-serif',boundaryFontWeight:"normal",messageFontSize:12,messageFontFamily:'"Open Sans", sans-serif',messageFontWeight:"normal",containerFontSize:14,containerFontFamily:'"Open Sans", sans-serif',containerFontWeight:"normal",external_containerFontSize:14,external_containerFontFamily:'"Open Sans", sans-serif',external_containerFontWeight:"normal",container_dbFontSize:14,container_dbFontFamily:'"Open Sans", sans-serif',container_dbFontWeight:"normal",external_container_dbFontSize:14,external_container_dbFontFamily:'"Open Sans", sans-serif',external_container_dbFontWeight:"normal",container_queueFontSize:14,container_queueFontFamily:'"Open Sans", sans-serif',container_queueFontWeight:"normal",external_container_queueFontSize:14,external_container_queueFontFamily:'"Open Sans", sans-serif',external_container_queueFontWeight:"normal",componentFontSize:14,componentFontFamily:'"Open Sans", sans-serif',componentFontWeight:"normal",external_componentFontSize:14,external_componentFontFamily:'"Open Sans", sans-serif',external_componentFontWeight:"normal",component_dbFontSize:14,component_dbFontFamily:'"Open Sans", sans-serif',component_dbFontWeight:"normal",external_component_dbFontSize:14,external_component_dbFontFamily:'"Open Sans", sans-serif',external_component_dbFontWeight:"normal",component_queueFontSize:14,component_queueFontFamily:'"Open Sans", sans-serif',component_queueFontWeight:"normal",external_component_queueFontSize:14,external_component_queueFontFamily:'"Open Sans", sans-serif',external_component_queueFontWeight:"normal",wrap:!0,wrapPadding:10,person_bg_color:"#08427B",person_border_color:"#073B6F",external_person_bg_color:"#686868",external_person_border_color:"#8A8A8A",system_bg_color:"#1168BD",system_border_color:"#3C7FC0",system_db_bg_color:"#1168BD",system_db_border_color:"#3C7FC0",system_queue_bg_color:"#1168BD",system_queue_border_color:"#3C7FC0",external_system_bg_color:"#999999",external_system_border_color:"#8A8A8A",external_system_db_bg_color:"#999999",external_system_db_border_color:"#8A8A8A",external_system_queue_bg_color:"#999999",external_system_queue_border_color:"#8A8A8A",container_bg_color:"#438DD5",container_border_color:"#3C7FC0",container_db_bg_color:"#438DD5",container_db_border_color:"#3C7FC0",container_queue_bg_color:"#438DD5",container_queue_border_color:"#3C7FC0",external_container_bg_color:"#B3B3B3",external_container_border_color:"#A6A6A6",external_container_db_bg_color:"#B3B3B3",external_container_db_border_color:"#A6A6A6",external_container_queue_bg_color:"#B3B3B3",external_container_queue_border_color:"#A6A6A6",component_bg_color:"#85BBF0",component_border_color:"#78A8D8",component_db_bg_color:"#85BBF0",component_db_border_color:"#78A8D8",component_queue_bg_color:"#85BBF0",component_queue_border_color:"#78A8D8",external_component_bg_color:"#CCCCCC",external_component_border_color:"#BFBFBF",external_component_db_bg_color:"#CCCCCC",external_component_db_border_color:"#BFBFBF",external_component_queue_bg_color:"#CCCCCC",external_component_queue_border_color:"#BFBFBF"},sankey:{useMaxWidth:!0,width:600,height:400,linkColor:"gradient",nodeAlignment:"justify",showValues:!0,prefix:"",suffix:""},block:{useMaxWidth:!0,padding:8},packet:{useMaxWidth:!0,rowHeight:32,bitWidth:32,bitsPerRow:32,showBits:!0,paddingX:5,paddingY:5},architecture:{useMaxWidth:!0,padding:40,iconSize:80,fontSize:16},radar:{useMaxWidth:!0,width:600,height:600,marginTop:50,marginRight:50,marginBottom:50,marginLeft:50,axisScaleFactor:1,axisLabelFactor:1.05,curveTension:.17},theme:"default",look:"classic",handDrawnSeed:0,layout:"dagre",maxTextSize:5e4,maxEdges:500,darkMode:!1,fontFamily:'"trebuchet ms", verdana, arial, sans-serif;',logLevel:5,securityLevel:"strict",startOnLoad:!0,arrowMarkerAbsolute:!1,secure:["secure","securityLevel","startOnLoad","maxTextSize","suppressErrorRendering","maxEdges"],legacyMathML:!1,forceLegacyMathML:!1,deterministicIds:!1,fontSize:16,markdownAutoWrap:!0,suppressErrorRendering:!1},Pte={...Eh,deterministicIDSeed:void 0,elk:{mergeEdges:!1,nodePlacementStrategy:"BRANDES_KOEPF"},themeCSS:void 0,themeVariables:Xc.default.getThemeVariables(),sequence:{...Eh.sequence,messageFont:b(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont"),noteFont:b(function(){return{fontFamily:this.noteFontFamily,fontSize:this.noteFontSize,fontWeight:this.noteFontWeight}},"noteFont"),actorFont:b(function(){return{fontFamily:this.actorFontFamily,fontSize:this.actorFontSize,fontWeight:this.actorFontWeight}},"actorFont")},class:{hideEmptyMembersBox:!1},gantt:{...Eh.gantt,tickInterval:void 0,useWidth:void 0},c4:{...Eh.c4,useWidth:void 0,personFont:b(function(){return{fontFamily:this.personFontFamily,fontSize:this.personFontSize,fontWeight:this.personFontWeight}},"personFont"),external_personFont:b(function(){return{fontFamily:this.external_personFontFamily,fontSize:this.external_personFontSize,fontWeight:this.external_personFontWeight}},"external_personFont"),systemFont:b(function(){return{fontFamily:this.systemFontFamily,fontSize:this.systemFontSize,fontWeight:this.systemFontWeight}},"systemFont"),external_systemFont:b(function(){return{fontFamily:this.external_systemFontFamily,fontSize:this.external_systemFontSize,fontWeight:this.external_systemFontWeight}},"external_systemFont"),system_dbFont:b(function(){return{fontFamily:this.system_dbFontFamily,fontSize:this.system_dbFontSize,fontWeight:this.system_dbFontWeight}},"system_dbFont"),external_system_dbFont:b(function(){return{fontFamily:this.external_system_dbFontFamily,fontSize:this.external_system_dbFontSize,fontWeight:this.external_system_dbFontWeight}},"external_system_dbFont"),system_queueFont:b(function(){return{fontFamily:this.system_queueFontFamily,fontSize:this.system_queueFontSize,fontWeight:this.system_queueFontWeight}},"system_queueFont"),external_system_queueFont:b(function(){return{fontFamily:this.external_system_queueFontFamily,fontSize:this.external_system_queueFontSize,fontWeight:this.external_system_queueFontWeight}},"external_system_queueFont"),containerFont:b(function(){return{fontFamily:this.containerFontFamily,fontSize:this.containerFontSize,fontWeight:this.containerFontWeight}},"containerFont"),external_containerFont:b(function(){return{fontFamily:this.external_containerFontFamily,fontSize:this.external_containerFontSize,fontWeight:this.external_containerFontWeight}},"external_containerFont"),container_dbFont:b(function(){return{fontFamily:this.container_dbFontFamily,fontSize:this.container_dbFontSize,fontWeight:this.container_dbFontWeight}},"container_dbFont"),external_container_dbFont:b(function(){return{fontFamily:this.external_container_dbFontFamily,fontSize:this.external_container_dbFontSize,fontWeight:this.external_container_dbFontWeight}},"external_container_dbFont"),container_queueFont:b(function(){return{fontFamily:this.container_queueFontFamily,fontSize:this.container_queueFontSize,fontWeight:this.container_queueFontWeight}},"container_queueFont"),external_container_queueFont:b(function(){return{fontFamily:this.external_container_queueFontFamily,fontSize:this.external_container_queueFontSize,fontWeight:this.external_container_queueFontWeight}},"external_container_queueFont"),componentFont:b(function(){return{fontFamily:this.componentFontFamily,fontSize:this.componentFontSize,fontWeight:this.componentFontWeight}},"componentFont"),external_componentFont:b(function(){return{fontFamily:this.external_componentFontFamily,fontSize:this.external_componentFontSize,fontWeight:this.external_componentFontWeight}},"external_componentFont"),component_dbFont:b(function(){return{fontFamily:this.component_dbFontFamily,fontSize:this.component_dbFontSize,fontWeight:this.component_dbFontWeight}},"component_dbFont"),external_component_dbFont:b(function(){return{fontFamily:this.external_component_dbFontFamily,fontSize:this.external_component_dbFontSize,fontWeight:this.external_component_dbFontWeight}},"external_component_dbFont"),component_queueFont:b(function(){return{fontFamily:this.component_queueFontFamily,fontSize:this.component_queueFontSize,fontWeight:this.component_queueFontWeight}},"component_queueFont"),external_component_queueFont:b(function(){return{fontFamily:this.external_component_queueFontFamily,fontSize:this.external_component_queueFontSize,fontWeight:this.external_component_queueFontWeight}},"external_component_queueFont"),boundaryFont:b(function(){return{fontFamily:this.boundaryFontFamily,fontSize:this.boundaryFontSize,fontWeight:this.boundaryFontWeight}},"boundaryFont"),messageFont:b(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont")},pie:{...Eh.pie,useWidth:984},xyChart:{...Eh.xyChart,useWidth:void 0},requirement:{...Eh.requirement,useWidth:void 0},packet:{...Eh.packet},radar:{...Eh.radar}},Bte=b((t,e="")=>Object.keys(t).reduce((r,n)=>Array.isArray(t[n])?r:typeof t[n]=="object"&&t[n]!==null?[...r,e+n,...Bte(t[n],"")]:[...r,e+n],[]),"keyify"),Aqe=new Set(Bte(Pte,"")),Ir=Pte,i3=b(t=>{if(he.debug("sanitizeDirective called with",t),!(typeof t!="object"||t==null)){if(Array.isArray(t)){t.forEach(e=>i3(e));return}for(let e of Object.keys(t)){if(he.debug("Checking key",e),e.startsWith("__")||e.includes("proto")||e.includes("constr")||!Aqe.has(e)||t[e]==null){he.debug("sanitize deleting key: ",e),delete t[e];continue}if(typeof t[e]=="object"){he.debug("sanitizing object",e),i3(t[e]);continue}let r=["themeCSS","fontFamily","altFontFamily"];for(let n of r)e.includes(n)&&(he.debug("sanitizing css option",e),t[e]=Lqe(t[e]))}if(t.themeVariables)for(let e of Object.keys(t.themeVariables)){let r=t.themeVariables[e];r?.match&&!r.match(/^[\d "#%(),.;A-Za-z]+$/)&&(t.themeVariables[e]="")}he.debug("After sanitization",t)}},"sanitizeDirective"),Lqe=b(t=>{let e=0,r=0;for(let n of t){if(e{let r=Gi({},t),n={};for(let i of e)qte(i),n=Gi(n,i);if(r=Gi(r,n),n.theme&&n.theme in Xc){let i=Gi({},Fte),a=Gi(i.themeVariables||{},n.themeVariables);r.theme&&r.theme in Xc&&(r.themeVariables=Xc[r.theme].getThemeVariables(a))}return n3=r,Hte(n3),n3},"updateCurrentConfig"),zte=b(t=>(Ho=Gi({},E1),Ho=Gi(Ho,t),t.theme&&Xc[t.theme]&&(Ho.themeVariables=Xc[t.theme].getThemeVariables(t.themeVariables)),hT(Ho,o2),Ho),"setSiteConfig"),$te=b(t=>{Fte=Gi({},t)},"saveConfigFromInitialize"),Gte=b(t=>(Ho=Gi(Ho,t),hT(Ho,o2),Ho),"updateSiteConfig"),$N=b(()=>Gi({},Ho),"getSiteConfig"),GN=b(t=>(Hte(t),Gi(n3,t),Yr()),"setConfig"),Yr=b(()=>Gi({},n3),"getConfig"),qte=b(t=>{t&&(["secure",...Ho.secure??[]].forEach(e=>{Object.hasOwn(t,e)&&(he.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"&&qte(t[e])}))},"sanitize"),Ute=b(t=>{i3(t),t.fontFamily&&!t.themeVariables?.fontFamily&&(t.themeVariables={...t.themeVariables,fontFamily:t.fontFamily}),o2.push(t),hT(Ho,o2)},"addDirective"),s3=b((t=Ho)=>{o2=[],hT(t,o2)},"reset"),Rqe={LAZY_LOAD_DEPRECATED:"The configuration options lazyLoadedDiagrams and loadExternalDiagramsAtStartup are deprecated. Please use registerExternalDiagrams instead."},Ate={},Dqe=b(t=>{Ate[t]||(he.warn(Rqe[t]),Ate[t]=!0)},"issueWarning"),Hte=b(t=>{t&&(t.lazyLoadedDiagrams||t.loadExternalDiagramsAtStartup)&&Dqe("LAZY_LOAD_DEPRECATED")},"checkConfig"),S1=//gi,Iqe=b(t=>t?Yte(t).replace(/\\n/g,"#br#").split("#br#"):[""],"getRows"),Mqe=(()=>{let t=!1;return()=>{t||(Vte(),t=!0)}})();b(Vte,"setupDompurifyHooks");Wte=b(t=>(Mqe(),Xf.sanitize(t)),"removeScript"),Lte=b((t,e)=>{if(e.flowchart?.htmlLabels!==!1){let r=e.securityLevel;r==="antiscript"||r==="strict"?t=Wte(t):r!=="loose"&&(t=Yte(t),t=t.replace(//g,">"),t=t.replace(/=/g,"="),t=Bqe(t))}return t},"sanitizeMore"),Qr=b((t,e)=>t&&(e.dompurifyConfig?t=Xf.sanitize(Lte(t,e),e.dompurifyConfig).toString():t=Xf.sanitize(Lte(t,e),{FORBID_TAGS:["style"]}).toString(),t),"sanitizeText"),Nqe=b((t,e)=>typeof t=="string"?Qr(t,e):t.flat().map(r=>Qr(r,e)),"sanitizeTextOrArray"),Oqe=b(t=>S1.test(t),"hasBreaks"),Pqe=b(t=>t.split(S1),"splitBreaks"),Bqe=b(t=>t.replace(/#br#/g,"
"),"placeholderToBreak"),Yte=b(t=>t.replace(S1,"#br#"),"breakToPlaceholder"),Fqe=b(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},"getUrl"),dn=b(t=>!(t===!1||["false","null","0"].includes(String(t).trim().toLowerCase())),"evaluate"),zqe=b(function(...t){let e=t.filter(r=>!isNaN(r));return Math.max(...e)},"getMax"),$qe=b(function(...t){let e=t.filter(r=>!isNaN(r));return Math.min(...e)},"getMin"),jc=b(function(t){let e=t.split(/(,)/),r=[];for(let n=0;n0&&n+1Math.max(0,t.split(e).length-1),"countOccurrence"),Gqe=b((t,e)=>{let r=ON(t,"~"),n=ON(e,"~");return r===1&&n===1},"shouldCombineSets"),qqe=b(t=>{let e=ON(t,"~"),r=!1;if(e<=1)return t;e%2!==0&&t.startsWith("~")&&(t=t.substring(1),r=!0);let n=[...t],i=n.indexOf("~"),a=n.lastIndexOf("~");for(;i!==-1&&a!==-1&&i!==a;)n[i]="<",n[a]=">",i=n.indexOf("~"),a=n.lastIndexOf("~");return r&&n.unshift("~"),n.join("")},"processSet"),Rte=b(()=>window.MathMLElement!==void 0,"isMathMLSupported"),PN=/\$\$(.*)\$\$/g,za=b(t=>(t.match(PN)?.length??0)>0,"hasKatex"),u2=b(async(t,e)=>{t=await jf(t,e);let r=document.createElement("div");r.innerHTML=t,r.id="katex-temp",r.style.visibility="hidden",r.style.position="absolute",r.style.top="0",document.querySelector("body")?.insertAdjacentElement("beforeend",r);let i={width:r.clientWidth,height:r.clientHeight};return r.remove(),i},"calculateMathMLDimensions"),jf=b(async(t,e)=>{if(!za(t))return t;if(!(Rte()||e.legacyMathML||e.forceLegacyMathML))return t.replace(PN,"MathML is unsupported in this environment.");let{default:r}=await Promise.resolve().then(()=>(sN(),oee)),n=e.forceLegacyMathML||!Rte()&&e.legacyMathML?"htmlAndMathml":"mathml";return t.split(S1).map(i=>za(i)?`
${i}
`:`
${i}
`).join("").replace(PN,(i,a)=>r.renderToString(a,{throwOnError:!0,displayMode:!0,output:n}).replace(/\n/g," ").replace(//g,""))},"renderKatex"),St={getRows:Iqe,sanitizeText:Qr,sanitizeTextOrArray:Nqe,hasBreaks:Oqe,splitBreaks:Pqe,lineBreakRegex:S1,removeScript:Wte,getUrl:Fqe,evaluate:dn,getMax:zqe,getMin:$qe},Uqe=b(function(t,e){for(let r of e)t.attr(r[0],r[1])},"d3Attrs"),Hqe=b(function(t,e,r){let n=new Map;return r?(n.set("width","100%"),n.set("style",`max-width: ${e}px;`)):(n.set("height",t),n.set("width",e)),n},"calculateSvgSizeAttrs"),ei=b(function(t,e,r,n){let i=Hqe(e,r,n);Uqe(t,i)},"configureSvgSize"),Uu=b(function(t,e,r,n){let i=e.node().getBBox(),a=i.width,s=i.height;he.info(`SVG bounds: ${a}x${s}`,i);let o=0,l=0;he.info(`Graph bounds: ${o}x${l}`,t),o=a+r*2,l=s+r*2,he.info(`Calculated bounds: ${o}x${l}`),ei(e,l,o,n);let u=`${i.x-r} ${i.y-r} ${i.width+2*r} ${i.height+2*r}`;e.attr("viewBox",u)},"setupGraphViewbox"),sT={},Vqe=b((t,e,r)=>{let n="";return t in sT&&sT[t]?n=sT[t](r):he.warn(`No theme found for ${t}`),` & { font-family: ${r.fontFamily}; font-size: ${r.fontSize}; fill: ${r.textColor} @@ -335,151 +591,151 @@ l0,-`+(r+144)+`c-2,-159.3,-10,-310.7,-24,-454c-53.3,-528,-210,-949.7, ${n} ${e} -`},"getStyles"),mFe=x((t,e)=>{e!==void 0&&(ST[t]=e)},"addStylesForDiagram"),kQ=pFe,DT={};dp(DT,{clear:()=>Cr,getAccDescription:()=>Lr,getAccTitle:()=>_r,getDiagramTitle:()=>Rr,setAccDescription:()=>Ar,setAccTitle:()=>Sr,setDiagramTitle:()=>Fr});RD="",ID="",DD="",ND=x(t=>Er(t,wr()),"sanitizeText"),Cr=x(()=>{RD="",DD="",ID=""},"clear"),Sr=x(t=>{RD=ND(t).replace(/^\s+/g,"")},"setAccTitle"),_r=x(()=>RD,"getAccTitle"),Ar=x(t=>{DD=ND(t).replace(/\n\s+/g,` -`)},"setAccDescription"),Lr=x(()=>DD,"getAccDescription"),Fr=x(t=>{ID=ND(t)},"setDiagramTitle"),Rr=x(()=>ID,"getDiagramTitle"),iQ=te,gFe=AT,Te=wr,Vb=LD,NT=mp,MT=x(t=>Er(t,Te()),"sanitizeText"),MD=Vl,vFe=x(()=>DT,"getCommonDb"),_T={},Hb=x((t,e,r)=>{_T[t]&&iQ.warn(`Diagram with id ${t} already registered. Overwriting.`),_T[t]=e,r&&lQ(t,r),mFe(t,e.styles),e.injectUtils?.(iQ,gFe,Te,MT,MD,vFe(),()=>{})},"registerDiagram"),OT=x(t=>{if(t in _T)return _T[t];throw new yFe(t)},"getDiagram"),yFe=(Yg=class extends Error{constructor(e){super(`Diagram ${e} not found.`)}},x(Yg,"DiagramNotFoundError"),Yg)});function ZD(t){return typeof t>"u"||t===null}function CQ(t){return typeof t=="object"&&t!==null}function SQ(t){return Array.isArray(t)?t:ZD(t)?[]:[t]}function _Q(t,e){var r,n,a,i;if(e)for(i=Object.keys(e),r=0,n=i.length;ro&&(i=" ... ",e=n-o+i.length),r-n>o&&(s=" ...",r=n+o-s.length),{str:i+t.slice(e,r).replace(/\t/g,"\u2192")+s,pos:n-e+i.length}}function BT(t,e){return Wa.repeat(" ",e-t.length)+t}function RQ(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,n=[0],a=[],i,s=-1;i=r.exec(t.buffer);)a.push(i.index),n.push(i.index+i[0].length),t.position<=i.index&&s<0&&(s=n.length-2);s<0&&(s=n.length-1);var o="",l,u,h=Math.min(t.line+e.linesAfter,a.length).toString().length,f=e.maxLength-(e.indent+h+3);for(l=1;l<=e.linesBefore&&!(s-l<0);l++)u=PT(t.buffer,n[s-l],a[s-l],t.position-(n[s]-n[s-l]),f),o=Wa.repeat(" ",e.indent)+BT((t.line-l+1).toString(),h)+" | "+u.str+` -`+o;for(u=PT(t.buffer,n[s],a[s],t.position,f),o+=Wa.repeat(" ",e.indent)+BT((t.line+1).toString(),h)+" | "+u.str+` -`,o+=Wa.repeat("-",e.indent+h+3+u.pos)+`^ -`,l=1;l<=e.linesAfter&&!(s+l>=a.length);l++)u=PT(t.buffer,n[s+l],a[s+l],t.position-(n[s]-n[s+l]),f),o+=Wa.repeat(" ",e.indent)+BT((t.line+l+1).toString(),h)+" | "+u.str+` -`;return o.replace(/\n$/,"")}function IQ(t){var e={};return t!==null&&Object.keys(t).forEach(function(r){t[r].forEach(function(n){e[String(n)]=r})}),e}function DQ(t,e){if(e=e||{},Object.keys(e).forEach(function(r){if(SFe.indexOf(r)===-1)throw new Js('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=IQ(e.styleAliases||null),_Fe.indexOf(this.kind)===-1)throw new Js('Unknown kind "'+this.kind+'" is specified for "'+t+'" YAML type.')}function PD(t,e){var r=[];return t[e].forEach(function(n){var a=r.length;r.forEach(function(i,s){i.tag===n.tag&&i.kind===n.kind&&i.multi===n.multi&&(a=s)}),r[a]=n}),r}function NQ(){var t={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}},e,r;function n(a){a.multi?(t.multi[a.kind].push(a),t.multi.fallback.push(a)):t[a.kind][a.tag]=t.fallback[a.tag]=a}for(x(n,"collectType"),e=0,r=arguments.length;e=0&&(e=e.slice(1)),e===".inf"?r===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:e===".nan"?NaN:r*parseFloat(e,10)}function XQ(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(Wa.isNegativeZero(t))return"-0.0";return r=t.toString(10),BFe.test(r)?r.replace("e",".e"):r}function jQ(t){return Object.prototype.toString.call(t)==="[object Number]"&&(t%1!==0||Wa.isNegativeZero(t))}function JQ(t){return t===null?!1:ZQ.exec(t)!==null||QQ.exec(t)!==null}function eJ(t){var e,r,n,a,i,s,o,l=0,u=null,h,f,d;if(e=ZQ.exec(t),e===null&&(e=QQ.exec(t)),e===null)throw new Error("Date resolve error");if(r=+e[1],n=+e[2]-1,a=+e[3],!e[4])return new Date(Date.UTC(r,n,a));if(i=+e[4],s=+e[5],o=+e[6],e[7]){for(l=e[7].slice(0,3);l.length<3;)l+="0";l=+l}return e[9]&&(h=+e[10],f=+(e[11]||0),u=(h*60+f)*6e4,e[9]==="-"&&(u=-u)),d=new Date(Date.UTC(r,n,a,i,s,o,l)),u&&d.setTime(d.getTime()-u),d}function tJ(t){return t.toISOString()}function rJ(t){return t==="<<"||t===null}function nJ(t){if(t===null)return!1;var e,r,n=0,a=t.length,i=JD;for(r=0;r64)){if(e<0)return!1;n+=6}return n%8===0}function aJ(t){var e,r,n=t.replace(/[\r\n=]/g,""),a=n.length,i=JD,s=0,o=[];for(e=0;e>16&255),o.push(s>>8&255),o.push(s&255)),s=s<<6|i.indexOf(n.charAt(e));return r=a%4*6,r===0?(o.push(s>>16&255),o.push(s>>8&255),o.push(s&255)):r===18?(o.push(s>>10&255),o.push(s>>2&255)):r===12&&o.push(s>>4&255),new Uint8Array(o)}function iJ(t){var e="",r=0,n,a,i=t.length,s=JD;for(n=0;n>18&63],e+=s[r>>12&63],e+=s[r>>6&63],e+=s[r&63]),r=(r<<8)+t[n];return a=i%3,a===0?(e+=s[r>>18&63],e+=s[r>>12&63],e+=s[r>>6&63],e+=s[r&63]):a===2?(e+=s[r>>10&63],e+=s[r>>4&63],e+=s[r<<2&63],e+=s[64]):a===1&&(e+=s[r>>2&63],e+=s[r<<4&63],e+=s[64],e+=s[64]),e}function sJ(t){return Object.prototype.toString.call(t)==="[object Uint8Array]"}function oJ(t){if(t===null)return!0;var e=[],r,n,a,i,s,o=t;for(r=0,n=o.length;r>10)+55296,(t-65536&1023)+56320)}function EJ(t,e){this.input=t,this.filename=e.filename||null,this.schema=e.schema||dJ,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 eN(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=CFe(r),new Js(e,r)}function Ht(t,e){throw eN(t,e)}function Wb(t,e){t.onWarning&&t.onWarning.call(null,eN(t,e))}function bh(t,e,r,n){var a,i,s,o;if(e1&&(t.result+=Wa.repeat(` -`,e-1))}function CJ(t,e,r){var n,a,i,s,o,l,u,h,f=t.kind,d=t.result,p;if(p=t.input.charCodeAt(t.position),ks(p)||yp(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)&&(a=t.input.charCodeAt(t.position+1),ks(a)||r&&yp(a)))return!1;for(t.kind="scalar",t.result="",i=s=t.position,o=!1;p!==0;){if(p===58){if(a=t.input.charCodeAt(t.position+1),ks(a)||r&&yp(a))break}else if(p===35){if(n=t.input.charCodeAt(t.position-1),ks(n))break}else{if(t.position===t.lineStart&&Kb(t)||r&&yp(p))break;if(Hl(p))if(l=t.line,u=t.lineStart,h=t.lineIndent,ya(t,!1,-1),t.lineIndent>=e){o=!0,p=t.input.charCodeAt(t.position);continue}else{t.position=s,t.line=l,t.lineStart=u,t.lineIndent=h;break}}o&&(bh(t,i,s,!1),HT(t,t.line-l),i=s=t.position,o=!1),Uf(p)||(s=t.position+1),p=t.input.charCodeAt(++t.position)}return bh(t,i,s,!1),t.result?!0:(t.kind=f,t.result=d,!1)}function SJ(t,e){var r,n,a;if(r=t.input.charCodeAt(t.position),r!==39)return!1;for(t.kind="scalar",t.result="",t.position++,n=a=t.position;(r=t.input.charCodeAt(t.position))!==0;)if(r===39)if(bh(t,n,t.position,!0),r=t.input.charCodeAt(++t.position),r===39)n=t.position,t.position++,a=t.position;else return!0;else Hl(r)?(bh(t,n,a,!0),HT(t,ya(t,!1,e)),n=a=t.position):t.position===t.lineStart&&Kb(t)?Ht(t,"unexpected end of the document within a single quoted scalar"):(t.position++,a=t.position);Ht(t,"unexpected end of the stream within a single quoted scalar")}function _J(t,e){var r,n,a,i,s,o;if(o=t.input.charCodeAt(t.position),o!==34)return!1;for(t.kind="scalar",t.result="",t.position++,r=n=t.position;(o=t.input.charCodeAt(t.position))!==0;){if(o===34)return bh(t,r,t.position,!0),t.position++,!0;if(o===92){if(bh(t,r,t.position,!0),o=t.input.charCodeAt(++t.position),Hl(o))ya(t,!1,e);else if(o<256&&kJ[o])t.result+=TJ[o],t.position++;else if((s=xJ(o))>0){for(a=s,i=0;a>0;a--)o=t.input.charCodeAt(++t.position),(s=yJ(o))>=0?i=(i<<4)+s:Ht(t,"expected hexadecimal character");t.result+=wJ(i),t.position++}else Ht(t,"unknown escape sequence");r=n=t.position}else Hl(o)?(bh(t,r,n,!0),HT(t,ya(t,!1,e)),r=n=t.position):t.position===t.lineStart&&Kb(t)?Ht(t,"unexpected end of the document within a double quoted scalar"):(t.position++,n=t.position)}Ht(t,"unexpected end of the stream within a double quoted scalar")}function AJ(t,e){var r=!0,n,a,i,s=t.tag,o,l=t.anchor,u,h,f,d,p,m=Object.create(null),g,v,y,b;if(b=t.input.charCodeAt(t.position),b===91)h=93,p=!1,o=[];else if(b===123)h=125,p=!0,o={};else return!1;for(t.anchor!==null&&(t.anchorMap[t.anchor]=o),b=t.input.charCodeAt(++t.position);b!==0;){if(ya(t,!0,e),b=t.input.charCodeAt(t.position),b===h)return t.position++,t.tag=s,t.anchor=l,t.kind=p?"mapping":"sequence",t.result=o,!0;r?b===44&&Ht(t,"expected the node content, but found ','"):Ht(t,"missed comma between flow collection entries"),v=g=y=null,f=d=!1,b===63&&(u=t.input.charCodeAt(t.position+1),ks(u)&&(f=d=!0,t.position++,ya(t,!0,e))),n=t.line,a=t.lineStart,i=t.position,bp(t,e,zT,!1,!0),v=t.tag,g=t.result,ya(t,!0,e),b=t.input.charCodeAt(t.position),(d||t.line===n)&&b===58&&(f=!0,b=t.input.charCodeAt(++t.position),ya(t,!0,e),bp(t,e,zT,!1,!0),y=t.result),p?xp(t,o,m,v,g,y,n,a,i):f?o.push(xp(t,null,m,v,g,y,n,a,i)):o.push(g),ya(t,!0,e),b=t.input.charCodeAt(t.position),b===44?(r=!0,b=t.input.charCodeAt(++t.position)):r=!1}Ht(t,"unexpected end of the stream within a flow collection")}function LJ(t,e){var r,n,a=OD,i=!1,s=!1,o=e,l=0,u=!1,h,f;if(f=t.input.charCodeAt(t.position),f===124)n=!1;else if(f===62)n=!0;else return!1;for(t.kind="scalar",t.result="";f!==0;)if(f=t.input.charCodeAt(++t.position),f===43||f===45)OD===a?a=f===43?TQ:KFe:Ht(t,"repeat of a chomping mode identifier");else if((h=bJ(f))>=0)h===0?Ht(t,"bad explicit indentation width of a block scalar; it cannot be less than one"):s?Ht(t,"repeat of an indentation width identifier"):(o=e+h-1,s=!0);else break;if(Uf(f)){do f=t.input.charCodeAt(++t.position);while(Uf(f));if(f===35)do f=t.input.charCodeAt(++t.position);while(!Hl(f)&&f!==0)}for(;f!==0;){for(VT(t),t.lineIndent=0,f=t.input.charCodeAt(t.position);(!s||t.lineIndento&&(o=t.lineIndent),Hl(f)){l++;continue}if(t.lineIndente)&&l!==0)Ht(t,"bad indentation of a sequence entry");else if(t.lineIndente)&&(v&&(s=t.line,o=t.lineStart,l=t.position),bp(t,e,$T,!0,a)&&(v?m=t.result:g=t.result),v||(xp(t,f,d,p,m,g,s,o,l),p=m=g=null),ya(t,!0,-1),b=t.input.charCodeAt(t.position)),(t.line===i||t.lineIndent>e)&&b!==0)Ht(t,"bad indentation of a mapping entry");else if(t.lineIndente?l=1:t.lineIndent===e?l=0:t.lineIndente?l=1:t.lineIndent===e?l=0:t.lineIndent tag; it should be "scalar", not "'+t.kind+'"'),f=0,d=t.implicitTypes.length;f"),t.result!==null&&m.kind!==t.kind&&Ht(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)):Ht(t,"cannot resolve a node with !<"+t.tag+"> explicit tag")}return t.listener!==null&&t.listener("close",t),t.tag!==null||t.anchor!==null||h}function MJ(t){var e=t.position,r,n,a,i=!1,s;for(t.version=null,t.checkLineBreaks=t.legacy,t.tagMap=Object.create(null),t.anchorMap=Object.create(null);(s=t.input.charCodeAt(t.position))!==0&&(ya(t,!0,-1),s=t.input.charCodeAt(t.position),!(t.lineIndent>0||s!==37));){for(i=!0,s=t.input.charCodeAt(++t.position),r=t.position;s!==0&&!ks(s);)s=t.input.charCodeAt(++t.position);for(n=t.input.slice(r,t.position),a=[],n.length<1&&Ht(t,"directive name must not be less than one character in length");s!==0;){for(;Uf(s);)s=t.input.charCodeAt(++t.position);if(s===35){do s=t.input.charCodeAt(++t.position);while(s!==0&&!Hl(s));break}if(Hl(s))break;for(r=t.position;s!==0&&!ks(s);)s=t.input.charCodeAt(++t.position);a.push(t.input.slice(r,t.position))}s!==0&&VT(t),qf.call(EQ,n)?EQ[n](t,n,a):Wb(t,'unknown document directive "'+n+'"')}if(ya(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,ya(t,!0,-1)):i&&Ht(t,"directives end mark is expected"),bp(t,t.lineIndent-1,$T,!1,!0),ya(t,!0,-1),t.checkLineBreaks&&QFe.test(t.input.slice(e,t.position))&&Wb(t,"non-ASCII line breaks are interpreted as content"),t.documents.push(t.result),t.position===t.lineStart&&Kb(t)){t.input.charCodeAt(t.position)===46&&(t.position+=3,ya(t,!0,-1));return}if(t.position"u"&&(r=e,e=null);var n=tN(t,r);if(typeof e!="function")return n;for(var a=0,i=n.length;a=55296&&r<=56319&&e+1=56320&&n<=57343)?(r-55296)*1024+n-56320+65536:r}function nN(t){var e=/^\n* /;return e.test(t)}function eee(t,e,r,n,a,i,s,o){var l,u=0,h=null,f=!1,d=!1,p=n!==-1,m=-1,g=jJ(Qg(t,0))&&KJ(Qg(t,t.length-1));if(e||s)for(l=0;l=65536?l+=2:l++){if(u=Qg(t,l),!e1(u))return Zg;g=g&&VD(u,h,o),h=u}else{for(l=0;l=65536?l+=2:l++){if(u=Qg(t,l),u===Yb)f=!0,p&&(d=d||l-m-1>n&&t[m+1]!==" ",m=l);else if(!e1(u))return Zg;g=g&&VD(u,h,o),h=u}d=d||p&&l-m-1>n&&t[m+1]!==" "}return!f&&!d?g&&!s&&!a(t)?ZJ:i===Xb?Zg:HD:r>9&&nN(t)?Zg:s?i===Xb?Zg:HD:d?JJ:QJ}function tee(t,e,r,n,a){t.dump=(function(){if(e.length===0)return t.quotingType===Xb?'""':"''";if(!t.noCompatMode&&(yze.indexOf(e)!==-1||xze.test(e)))return t.quotingType===Xb?'"'+e+'"':"'"+e+"'";var i=t.indent*Math.max(1,r),s=t.lineWidth===-1?-1:Math.max(Math.min(t.lineWidth,40),t.lineWidth-i),o=n||t.flowLevel>-1&&r>=t.flowLevel;function l(u){return XJ(t,u)}switch(x(l,"testAmbiguity"),eee(e,o,t.indent,s,l,t.quotingType,t.forceQuotes&&!n,a)){case ZJ:return e;case HD:return"'"+e.replace(/'/g,"''")+"'";case QJ:return"|"+WD(e,t.indent)+YD(UD(e,i));case JJ:return">"+WD(e,t.indent)+YD(UD(ree(e,s),i));case Zg:return'"'+nee(e)+'"';default:throw new Js("impossible error: invalid scalar style")}})()}function WD(t,e){var r=nN(t)?String(e):"",n=t[t.length-1]===` -`,a=n&&(t[t.length-2]===` +`},"getStyles"),Wqe=b((t,e)=>{e!==void 0&&(sT[t]=e)},"addStylesForDiagram"),Xte=Vqe,fT={};k1(fT,{clear:()=>Jr,getAccDescription:()=>nn,getAccTitle:()=>tn,getDiagramTitle:()=>an,setAccDescription:()=>rn,setAccTitle:()=>en,setDiagramTitle:()=>pn});qN="",UN="",HN="",VN=b(t=>Qr(t,Yr()),"sanitizeText"),Jr=b(()=>{qN="",HN="",UN=""},"clear"),en=b(t=>{qN=VN(t).replace(/^\s+/g,"")},"setAccTitle"),tn=b(()=>qN,"getAccTitle"),rn=b(t=>{HN=VN(t).replace(/\n\s+/g,` +`)},"setAccDescription"),nn=b(()=>HN,"getAccDescription"),pn=b(t=>{UN=VN(t)},"setDiagramTitle"),an=b(()=>UN,"getDiagramTitle"),Dte=he,Yqe=lT,Fe=Yr,o3=GN,dT=E1,pT=b(t=>Qr(t,Fe()),"sanitizeText"),WN=Uu,Xqe=b(()=>fT,"getCommonDb"),oT={},l3=b((t,e,r)=>{oT[t]&&Dte.warn(`Diagram with id ${t} already registered. Overwriting.`),oT[t]=e,r&&Nte(t,r),Wqe(t,e.styles),e.injectUtils?.(Dte,Yqe,Fe,pT,WN,Xqe(),()=>{})},"registerDiagram"),mT=b(t=>{if(t in oT)return oT[t];throw new jqe(t)},"getDiagram"),jqe=(s2=class extends Error{constructor(e){super(`Diagram ${e} not found.`)}},b(s2,"DiagramNotFoundError"),s2)});function uO(t){return typeof t>"u"||t===null}function Zte(t){return typeof t=="object"&&t!==null}function Qte(t){return Array.isArray(t)?t:uO(t)?[]:[t]}function Jte(t,e){var r,n,i,a;if(e)for(a=Object.keys(e),r=0,n=a.length;ro&&(a=" ... ",e=n-o+a.length),r-n>o&&(s=" ...",r=n+o-s.length),{str:a+t.slice(e,r).replace(/\t/g,"\u2192")+s,pos:n-e+a.length}}function yT(t,e){return $a.repeat(" ",e-t.length)+t}function rre(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,n=[0],i=[],a,s=-1;a=r.exec(t.buffer);)i.push(a.index),n.push(a.index+a[0].length),t.position<=a.index&&s<0&&(s=n.length-2);s<0&&(s=n.length-1);var o="",l,u,h=Math.min(t.line+e.linesAfter,i.length).toString().length,f=e.maxLength-(e.indent+h+3);for(l=1;l<=e.linesBefore&&!(s-l<0);l++)u=gT(t.buffer,n[s-l],i[s-l],t.position-(n[s]-n[s-l]),f),o=$a.repeat(" ",e.indent)+yT((t.line-l+1).toString(),h)+" | "+u.str+` +`+o;for(u=gT(t.buffer,n[s],i[s],t.position,f),o+=$a.repeat(" ",e.indent)+yT((t.line+1).toString(),h)+" | "+u.str+` +`,o+=$a.repeat("-",e.indent+h+3+u.pos)+`^ +`,l=1;l<=e.linesAfter&&!(s+l>=i.length);l++)u=gT(t.buffer,n[s+l],i[s+l],t.position-(n[s]-n[s+l]),f),o+=$a.repeat(" ",e.indent)+yT((t.line+l+1).toString(),h)+" | "+u.str+` +`;return o.replace(/\n$/,"")}function nre(t){var e={};return t!==null&&Object.keys(t).forEach(function(r){t[r].forEach(function(n){e[String(n)]=r})}),e}function ire(t,e){if(e=e||{},Object.keys(e).forEach(function(r){if(nUe.indexOf(r)===-1)throw new Vo('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=nre(e.styleAliases||null),iUe.indexOf(this.kind)===-1)throw new Vo('Unknown kind "'+this.kind+'" is specified for "'+t+'" YAML type.')}function XN(t,e){var r=[];return t[e].forEach(function(n){var i=r.length;r.forEach(function(a,s){a.tag===n.tag&&a.kind===n.kind&&a.multi===n.multi&&(i=s)}),r[i]=n}),r}function are(){var t={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}},e,r;function n(i){i.multi?(t.multi[i.kind].push(i),t.multi.fallback.push(i)):t[i.kind][i.tag]=t.fallback[i.tag]=i}for(b(n,"collectType"),e=0,r=arguments.length;e=0&&(e=e.slice(1)),e===".inf"?r===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:e===".nan"?NaN:r*parseFloat(e,10)}function bre(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($a.isNegativeZero(t))return"-0.0";return r=t.toString(10),pUe.test(r)?r.replace("e",".e"):r}function wre(t){return Object.prototype.toString.call(t)==="[object Number]"&&(t%1!==0||$a.isNegativeZero(t))}function Sre(t){return t===null?!1:Tre.exec(t)!==null||Ere.exec(t)!==null}function Cre(t){var e,r,n,i,a,s,o,l=0,u=null,h,f,d;if(e=Tre.exec(t),e===null&&(e=Ere.exec(t)),e===null)throw new Error("Date resolve error");if(r=+e[1],n=+e[2]-1,i=+e[3],!e[4])return new Date(Date.UTC(r,n,i));if(a=+e[4],s=+e[5],o=+e[6],e[7]){for(l=e[7].slice(0,3);l.length<3;)l+="0";l=+l}return e[9]&&(h=+e[10],f=+(e[11]||0),u=(h*60+f)*6e4,e[9]==="-"&&(u=-u)),d=new Date(Date.UTC(r,n,i,a,s,o,l)),u&&d.setTime(d.getTime()-u),d}function _re(t){return t.toISOString()}function Are(t){return t==="<<"||t===null}function Lre(t){if(t===null)return!1;var e,r,n=0,i=t.length,a=hO;for(r=0;r64)){if(e<0)return!1;n+=6}return n%8===0}function Rre(t){var e,r,n=t.replace(/[\r\n=]/g,""),i=n.length,a=hO,s=0,o=[];for(e=0;e>16&255),o.push(s>>8&255),o.push(s&255)),s=s<<6|a.indexOf(n.charAt(e));return r=i%4*6,r===0?(o.push(s>>16&255),o.push(s>>8&255),o.push(s&255)):r===18?(o.push(s>>10&255),o.push(s>>2&255)):r===12&&o.push(s>>4&255),new Uint8Array(o)}function Dre(t){var e="",r=0,n,i,a=t.length,s=hO;for(n=0;n>18&63],e+=s[r>>12&63],e+=s[r>>6&63],e+=s[r&63]),r=(r<<8)+t[n];return i=a%3,i===0?(e+=s[r>>18&63],e+=s[r>>12&63],e+=s[r>>6&63],e+=s[r&63]):i===2?(e+=s[r>>10&63],e+=s[r>>4&63],e+=s[r<<2&63],e+=s[64]):i===1&&(e+=s[r>>2&63],e+=s[r<<4&63],e+=s[64],e+=s[64]),e}function Ire(t){return Object.prototype.toString.call(t)==="[object Uint8Array]"}function Mre(t){if(t===null)return!0;var e=[],r,n,i,a,s,o=t;for(r=0,n=o.length;r>10)+55296,(t-65536&1023)+56320)}function Kre(t,e){this.input=t,this.filename=e.filename||null,this.schema=e.schema||zre,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 fO(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=rUe(r),new Vo(e,r)}function mr(t,e){throw fO(t,e)}function u3(t,e){t.onWarning&&t.onWarning.call(null,fO(t,e))}function Sh(t,e,r,n){var i,a,s,o;if(e1&&(t.result+=$a.repeat(` +`,e-1))}function Zre(t,e,r){var n,i,a,s,o,l,u,h,f=t.kind,d=t.result,p;if(p=t.input.charCodeAt(t.position),fo(p)||_1(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)&&(i=t.input.charCodeAt(t.position+1),fo(i)||r&&_1(i)))return!1;for(t.kind="scalar",t.result="",a=s=t.position,o=!1;p!==0;){if(p===58){if(i=t.input.charCodeAt(t.position+1),fo(i)||r&&_1(i))break}else if(p===35){if(n=t.input.charCodeAt(t.position-1),fo(n))break}else{if(t.position===t.lineStart&&d3(t)||r&&_1(p))break;if(Hu(p))if(l=t.line,u=t.lineStart,h=t.lineIndent,sa(t,!1,-1),t.lineIndent>=e){o=!0,p=t.input.charCodeAt(t.position);continue}else{t.position=s,t.line=l,t.lineStart=u,t.lineIndent=h;break}}o&&(Sh(t,a,s,!1),ST(t,t.line-l),a=s=t.position,o=!1),Kf(p)||(s=t.position+1),p=t.input.charCodeAt(++t.position)}return Sh(t,a,s,!1),t.result?!0:(t.kind=f,t.result=d,!1)}function Qre(t,e){var r,n,i;if(r=t.input.charCodeAt(t.position),r!==39)return!1;for(t.kind="scalar",t.result="",t.position++,n=i=t.position;(r=t.input.charCodeAt(t.position))!==0;)if(r===39)if(Sh(t,n,t.position,!0),r=t.input.charCodeAt(++t.position),r===39)n=t.position,t.position++,i=t.position;else return!0;else Hu(r)?(Sh(t,n,i,!0),ST(t,sa(t,!1,e)),n=i=t.position):t.position===t.lineStart&&d3(t)?mr(t,"unexpected end of the document within a single quoted scalar"):(t.position++,i=t.position);mr(t,"unexpected end of the stream within a single quoted scalar")}function Jre(t,e){var r,n,i,a,s,o;if(o=t.input.charCodeAt(t.position),o!==34)return!1;for(t.kind="scalar",t.result="",t.position++,r=n=t.position;(o=t.input.charCodeAt(t.position))!==0;){if(o===34)return Sh(t,r,t.position,!0),t.position++,!0;if(o===92){if(Sh(t,r,t.position,!0),o=t.input.charCodeAt(++t.position),Hu(o))sa(t,!1,e);else if(o<256&&Xre[o])t.result+=jre[o],t.position++;else if((s=Vre(o))>0){for(i=s,a=0;i>0;i--)o=t.input.charCodeAt(++t.position),(s=Hre(o))>=0?a=(a<<4)+s:mr(t,"expected hexadecimal character");t.result+=Yre(a),t.position++}else mr(t,"unknown escape sequence");r=n=t.position}else Hu(o)?(Sh(t,r,n,!0),ST(t,sa(t,!1,e)),r=n=t.position):t.position===t.lineStart&&d3(t)?mr(t,"unexpected end of the document within a double quoted scalar"):(t.position++,n=t.position)}mr(t,"unexpected end of the stream within a double quoted scalar")}function ene(t,e){var r=!0,n,i,a,s=t.tag,o,l=t.anchor,u,h,f,d,p,m=Object.create(null),g,y,v,x;if(x=t.input.charCodeAt(t.position),x===91)h=93,p=!1,o=[];else if(x===123)h=125,p=!0,o={};else return!1;for(t.anchor!==null&&(t.anchorMap[t.anchor]=o),x=t.input.charCodeAt(++t.position);x!==0;){if(sa(t,!0,e),x=t.input.charCodeAt(t.position),x===h)return t.position++,t.tag=s,t.anchor=l,t.kind=p?"mapping":"sequence",t.result=o,!0;r?x===44&&mr(t,"expected the node content, but found ','"):mr(t,"missed comma between flow collection entries"),y=g=v=null,f=d=!1,x===63&&(u=t.input.charCodeAt(t.position+1),fo(u)&&(f=d=!0,t.position++,sa(t,!0,e))),n=t.line,i=t.lineStart,a=t.position,L1(t,e,xT,!1,!0),y=t.tag,g=t.result,sa(t,!0,e),x=t.input.charCodeAt(t.position),(d||t.line===n)&&x===58&&(f=!0,x=t.input.charCodeAt(++t.position),sa(t,!0,e),L1(t,e,xT,!1,!0),v=t.result),p?A1(t,o,m,y,g,v,n,i,a):f?o.push(A1(t,null,m,y,g,v,n,i,a)):o.push(g),sa(t,!0,e),x=t.input.charCodeAt(t.position),x===44?(r=!0,x=t.input.charCodeAt(++t.position)):r=!1}mr(t,"unexpected end of the stream within a flow collection")}function tne(t,e){var r,n,i=YN,a=!1,s=!1,o=e,l=0,u=!1,h,f;if(f=t.input.charCodeAt(t.position),f===124)n=!1;else if(f===62)n=!0;else return!1;for(t.kind="scalar",t.result="";f!==0;)if(f=t.input.charCodeAt(++t.position),f===43||f===45)YN===i?i=f===43?jte:_Ue:mr(t,"repeat of a chomping mode identifier");else if((h=Wre(f))>=0)h===0?mr(t,"bad explicit indentation width of a block scalar; it cannot be less than one"):s?mr(t,"repeat of an indentation width identifier"):(o=e+h-1,s=!0);else break;if(Kf(f)){do f=t.input.charCodeAt(++t.position);while(Kf(f));if(f===35)do f=t.input.charCodeAt(++t.position);while(!Hu(f)&&f!==0)}for(;f!==0;){for(ET(t),t.lineIndent=0,f=t.input.charCodeAt(t.position);(!s||t.lineIndento&&(o=t.lineIndent),Hu(f)){l++;continue}if(t.lineIndente)&&l!==0)mr(t,"bad indentation of a sequence entry");else if(t.lineIndente)&&(y&&(s=t.line,o=t.lineStart,l=t.position),L1(t,e,bT,!0,i)&&(y?m=t.result:g=t.result),y||(A1(t,f,d,p,m,g,s,o,l),p=m=g=null),sa(t,!0,-1),x=t.input.charCodeAt(t.position)),(t.line===a||t.lineIndent>e)&&x!==0)mr(t,"bad indentation of a mapping entry");else if(t.lineIndente?l=1:t.lineIndent===e?l=0:t.lineIndente?l=1:t.lineIndent===e?l=0:t.lineIndent tag; it should be "scalar", not "'+t.kind+'"'),f=0,d=t.implicitTypes.length;f"),t.result!==null&&m.kind!==t.kind&&mr(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)):mr(t,"cannot resolve a node with !<"+t.tag+"> explicit tag")}return t.listener!==null&&t.listener("close",t),t.tag!==null||t.anchor!==null||h}function sne(t){var e=t.position,r,n,i,a=!1,s;for(t.version=null,t.checkLineBreaks=t.legacy,t.tagMap=Object.create(null),t.anchorMap=Object.create(null);(s=t.input.charCodeAt(t.position))!==0&&(sa(t,!0,-1),s=t.input.charCodeAt(t.position),!(t.lineIndent>0||s!==37));){for(a=!0,s=t.input.charCodeAt(++t.position),r=t.position;s!==0&&!fo(s);)s=t.input.charCodeAt(++t.position);for(n=t.input.slice(r,t.position),i=[],n.length<1&&mr(t,"directive name must not be less than one character in length");s!==0;){for(;Kf(s);)s=t.input.charCodeAt(++t.position);if(s===35){do s=t.input.charCodeAt(++t.position);while(s!==0&&!Hu(s));break}if(Hu(s))break;for(r=t.position;s!==0&&!fo(s);)s=t.input.charCodeAt(++t.position);i.push(t.input.slice(r,t.position))}s!==0&&ET(t),Zf.call(Kte,n)?Kte[n](t,n,i):u3(t,'unknown document directive "'+n+'"')}if(sa(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,sa(t,!0,-1)):a&&mr(t,"directives end mark is expected"),L1(t,t.lineIndent-1,bT,!1,!0),sa(t,!0,-1),t.checkLineBreaks&&LUe.test(t.input.slice(e,t.position))&&u3(t,"non-ASCII line breaks are interpreted as content"),t.documents.push(t.result),t.position===t.lineStart&&d3(t)){t.input.charCodeAt(t.position)===46&&(t.position+=3,sa(t,!0,-1));return}if(t.position"u"&&(r=e,e=null);var n=dO(t,r);if(typeof e!="function")return n;for(var i=0,a=n.length;i=55296&&r<=56319&&e+1=56320&&n<=57343)?(r-55296)*1024+n-56320+65536:r}function mO(t){var e=/^\n* /;return e.test(t)}function Cne(t,e,r,n,i,a,s,o){var l,u=0,h=null,f=!1,d=!1,p=n!==-1,m=-1,g=wne(h2(t,0))&&kne(h2(t,t.length-1));if(e||s)for(l=0;l=65536?l+=2:l++){if(u=h2(t,l),!d2(u))return c2;g=g&&rO(u,h,o),h=u}else{for(l=0;l=65536?l+=2:l++){if(u=h2(t,l),u===c3)f=!0,p&&(d=d||l-m-1>n&&t[m+1]!==" ",m=l);else if(!d2(u))return c2;g=g&&rO(u,h,o),h=u}d=d||p&&l-m-1>n&&t[m+1]!==" "}return!f&&!d?g&&!s&&!i(t)?Tne:a===h3?c2:nO:r>9&&mO(t)?c2:s?a===h3?c2:nO:d?Sne:Ene}function _ne(t,e,r,n,i){t.dump=(function(){if(e.length===0)return t.quotingType===h3?'""':"''";if(!t.noCompatMode&&(jUe.indexOf(e)!==-1||KUe.test(e)))return t.quotingType===h3?'"'+e+'"':"'"+e+"'";var a=t.indent*Math.max(1,r),s=t.lineWidth===-1?-1:Math.max(Math.min(t.lineWidth,40),t.lineWidth-a),o=n||t.flowLevel>-1&&r>=t.flowLevel;function l(u){return bne(t,u)}switch(b(l,"testAmbiguity"),Cne(e,o,t.indent,s,l,t.quotingType,t.forceQuotes&&!n,i)){case Tne:return e;case nO:return"'"+e.replace(/'/g,"''")+"'";case Ene:return"|"+iO(e,t.indent)+aO(eO(e,a));case Sne:return">"+iO(e,t.indent)+aO(eO(Ane(e,s),a));case c2:return'"'+Lne(e)+'"';default:throw new Vo("impossible error: invalid scalar style")}})()}function iO(t,e){var r=mO(t)?String(e):"",n=t[t.length-1]===` +`,i=n&&(t[t.length-2]===` `||t===` -`),i=a?"+":n?"":"-";return r+i+` -`}function YD(t){return t[t.length-1]===` -`?t.slice(0,-1):t}function ree(t,e){for(var r=/(\n+)([^\n]*)/g,n=(function(){var u=t.indexOf(` -`);return u=u!==-1?u:t.length,r.lastIndex=u,XD(t.slice(0,u),e)})(),a=t[0]===` -`||t[0]===" ",i,s;s=r.exec(t);){var o=s[1],l=s[2];i=l[0]===" ",n+=o+(!a&&!i&&l!==""?` -`:"")+XD(l,e),a=i}return n}function XD(t,e){if(t===""||t[0]===" ")return t;for(var r=/ [^ ]/g,n,a=0,i,s=0,o=0,l="";n=r.exec(t);)o=n.index,o-a>e&&(i=s>a?s:o,l+=` -`+t.slice(a,i),a=i+1),s=o;return l+=` -`,t.length-a>e&&s>a?l+=t.slice(a,s)+` -`+t.slice(s+1):l+=t.slice(a),l.slice(1)}function nee(t){for(var e="",r=0,n,a=0;a=65536?a+=2:a++)r=Qg(t,a),n=ts[r],!n&&e1(r)?(e+=t[a],r>=65536&&(e+=t[a+1])):e+=n||WJ(r);return e}function aee(t,e,r){var n="",a=t.tag,i,s,o;for(i=0,s=r.length;i"u"&&Yu(t,e,null,!1,!1))&&(n!==""&&(n+=","+(t.condenseFlow?"":" ")),n+=t.dump);t.tag=a,t.dump="["+n+"]"}function jD(t,e,r,n){var a="",i=t.tag,s,o,l;for(s=0,o=r.length;s"u"&&Yu(t,e+1,null,!0,!0,!1,!0))&&((!n||a!=="")&&(a+=UT(t,e)),t.dump&&Yb===t.dump.charCodeAt(0)?a+="-":a+="- ",a+=t.dump);t.tag=i,t.dump=a||"[]"}function iee(t,e,r){var n="",a=t.tag,i=Object.keys(r),s,o,l,u,h;for(s=0,o=i.length;s1024&&(h+="? "),h+=t.dump+(t.condenseFlow?'"':"")+":"+(t.condenseFlow?"":" "),Yu(t,e,u,!1,!1)&&(h+=t.dump,n+=h));t.tag=a,t.dump="{"+n+"}"}function see(t,e,r,n){var a="",i=t.tag,s=Object.keys(r),o,l,u,h,f,d;if(t.sortKeys===!0)s.sort();else if(typeof t.sortKeys=="function")s.sort(t.sortKeys);else if(t.sortKeys)throw new Js("sortKeys must be a boolean or a function");for(o=0,l=s.length;o1024,f&&(t.dump&&Yb===t.dump.charCodeAt(0)?d+="?":d+="? "),d+=t.dump,f&&(d+=UT(t,e)),Yu(t,e+1,h,!0,f)&&(t.dump&&Yb===t.dump.charCodeAt(0)?d+=":":d+=": ",d+=t.dump,a+=d));t.tag=i,t.dump=a||"{}"}function KD(t,e,r){var n,a,i,s,o,l;for(a=r?t.explicitTypes:t.implicitTypes,i=0,s=a.length;i tag resolver accepts not "'+l+'" style');t.dump=n}return!0}return!1}function Yu(t,e,r,n,a,i,s){t.tag=null,t.dump=r,KD(t,r,!1)||KD(t,r,!0);var o=FJ.call(t.dump),l=n,u;n&&(n=t.flowLevel<0||t.flowLevel>e);var h=o==="[object Object]"||o==="[object Array]",f,d;if(h&&(f=t.duplicates.indexOf(r),d=f!==-1),(t.tag!==null&&t.tag!=="?"||d||t.indent!==2&&e>0)&&(a=!1),d&&t.usedDuplicates[f])t.dump="*ref_"+f;else{if(h&&d&&!t.usedDuplicates[f]&&(t.usedDuplicates[f]=!0),o==="[object Object]")n&&Object.keys(t.dump).length!==0?(see(t,e,t.dump,a),d&&(t.dump="&ref_"+f+t.dump)):(iee(t,e,t.dump),d&&(t.dump="&ref_"+f+" "+t.dump));else if(o==="[object Array]")n&&t.dump.length!==0?(t.noArrayIndent&&!s&&e>0?jD(t,e-1,t.dump,a):jD(t,e,t.dump,a),d&&(t.dump="&ref_"+f+t.dump)):(aee(t,e,t.dump),d&&(t.dump="&ref_"+f+" "+t.dump));else if(o==="[object String]")t.tag!=="?"&&tee(t,t.dump,e,i,l);else{if(o==="[object Undefined]")return!1;if(t.skipInvalid)return!1;throw new Js("unacceptable kind of an object to dump "+o)}t.tag!==null&&t.tag!=="?"&&(u=encodeURI(t.tag[0]==="!"?t.tag.slice(1):t.tag).replace(/!/g,"%21"),t.tag[0]==="!"?u="!"+u:u.slice(0,18)==="tag:yaml.org,2002:"?u="!!"+u.slice(18):u="!<"+u+">",t.dump=u+" "+t.dump)}return!0}function oee(t,e){var r=[],n=[],a,i;for(qT(t,r,n),a=0,i=n.length;a{ur();x(ZD,"isNothing");x(CQ,"isObject");x(SQ,"toArray");x(_Q,"extend");x(AQ,"repeat");x(LQ,"isNegativeZero");xFe=ZD,bFe=CQ,wFe=SQ,kFe=AQ,TFe=LQ,EFe=_Q,Wa={isNothing:xFe,isObject:bFe,toArray:wFe,repeat:kFe,isNegativeZero:TFe,extend:EFe};x(QD,"formatError");x(Jg,"YAMLException$1");Jg.prototype=Object.create(Error.prototype);Jg.prototype.constructor=Jg;Jg.prototype.toString=x(function(e){return this.name+": "+QD(this,e)},"toString");Js=Jg;x(PT,"getLine");x(BT,"padStart");x(RQ,"makeSnippet");CFe=RQ,SFe=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],_Fe=["scalar","sequence","mapping"];x(IQ,"compileStyleAliases");x(DQ,"Type$1");es=DQ;x(PD,"compileList");x(NQ,"compileMap");x(FT,"Schema$1");FT.prototype.extend=x(function(e){var r=[],n=[];if(e instanceof es)n.push(e);else if(Array.isArray(e))n=n.concat(e);else if(e&&(Array.isArray(e.implicit)||Array.isArray(e.explicit)))e.implicit&&(r=r.concat(e.implicit)),e.explicit&&(n=n.concat(e.explicit));else throw new Js("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");r.forEach(function(i){if(!(i instanceof es))throw new Js("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(i.loadKind&&i.loadKind!=="scalar")throw new Js("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(i.multi)throw new Js("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),n.forEach(function(i){if(!(i instanceof es))throw new Js("Specified list of YAML types (or a single Type object) contains a non-Type object.")});var a=Object.create(FT.prototype);return a.implicit=(this.implicit||[]).concat(r),a.explicit=(this.explicit||[]).concat(n),a.compiledImplicit=PD(a,"implicit"),a.compiledExplicit=PD(a,"explicit"),a.compiledTypeMap=NQ(a.compiledImplicit,a.compiledExplicit),a},"extend");AFe=FT,LFe=new es("tag:yaml.org,2002:str",{kind:"scalar",construct:x(function(t){return t!==null?t:""},"construct")}),RFe=new es("tag:yaml.org,2002:seq",{kind:"sequence",construct:x(function(t){return t!==null?t:[]},"construct")}),IFe=new es("tag:yaml.org,2002:map",{kind:"mapping",construct:x(function(t){return t!==null?t:{}},"construct")}),DFe=new AFe({explicit:[LFe,RFe,IFe]});x(MQ,"resolveYamlNull");x(OQ,"constructYamlNull");x(PQ,"isNull");NFe=new es("tag:yaml.org,2002:null",{kind:"scalar",resolve:MQ,construct:OQ,predicate:PQ,represent:{canonical:x(function(){return"~"},"canonical"),lowercase:x(function(){return"null"},"lowercase"),uppercase:x(function(){return"NULL"},"uppercase"),camelcase:x(function(){return"Null"},"camelcase"),empty:x(function(){return""},"empty")},defaultStyle:"lowercase"});x(BQ,"resolveYamlBoolean");x(FQ,"constructYamlBoolean");x(zQ,"isBoolean");MFe=new es("tag:yaml.org,2002:bool",{kind:"scalar",resolve:BQ,construct:FQ,predicate:zQ,represent:{lowercase:x(function(t){return t?"true":"false"},"lowercase"),uppercase:x(function(t){return t?"TRUE":"FALSE"},"uppercase"),camelcase:x(function(t){return t?"True":"False"},"camelcase")},defaultStyle:"lowercase"});x($Q,"isHexCode");x(GQ,"isOctCode");x(UQ,"isDecCode");x(qQ,"resolveYamlInteger");x(VQ,"constructYamlInteger");x(HQ,"isInteger");OFe=new es("tag:yaml.org,2002:int",{kind:"scalar",resolve:qQ,construct:VQ,predicate:HQ,represent:{binary:x(function(t){return t>=0?"0b"+t.toString(2):"-0b"+t.toString(2).slice(1)},"binary"),octal:x(function(t){return t>=0?"0o"+t.toString(8):"-0o"+t.toString(8).slice(1)},"octal"),decimal:x(function(t){return t.toString(10)},"decimal"),hexadecimal:x(function(t){return t>=0?"0x"+t.toString(16).toUpperCase():"-0x"+t.toString(16).toUpperCase().slice(1)},"hexadecimal")},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),PFe=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");x(WQ,"resolveYamlFloat");x(YQ,"constructYamlFloat");BFe=/^[-+]?[0-9]+e/;x(XQ,"representYamlFloat");x(jQ,"isFloat");FFe=new es("tag:yaml.org,2002:float",{kind:"scalar",resolve:WQ,construct:YQ,predicate:jQ,represent:XQ,defaultStyle:"lowercase"}),KQ=DFe.extend({implicit:[NFe,MFe,OFe,FFe]}),zFe=KQ,ZQ=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),QQ=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]))?))?$");x(JQ,"resolveYamlTimestamp");x(eJ,"constructYamlTimestamp");x(tJ,"representYamlTimestamp");$Fe=new es("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:JQ,construct:eJ,instanceOf:Date,represent:tJ});x(rJ,"resolveYamlMerge");GFe=new es("tag:yaml.org,2002:merge",{kind:"scalar",resolve:rJ}),JD=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/= -\r`;x(nJ,"resolveYamlBinary");x(aJ,"constructYamlBinary");x(iJ,"representYamlBinary");x(sJ,"isBinary");UFe=new es("tag:yaml.org,2002:binary",{kind:"scalar",resolve:nJ,construct:aJ,predicate:sJ,represent:iJ}),qFe=Object.prototype.hasOwnProperty,VFe=Object.prototype.toString;x(oJ,"resolveYamlOmap");x(lJ,"constructYamlOmap");HFe=new es("tag:yaml.org,2002:omap",{kind:"sequence",resolve:oJ,construct:lJ}),WFe=Object.prototype.toString;x(uJ,"resolveYamlPairs");x(cJ,"constructYamlPairs");YFe=new es("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:uJ,construct:cJ}),XFe=Object.prototype.hasOwnProperty;x(hJ,"resolveYamlSet");x(fJ,"constructYamlSet");jFe=new es("tag:yaml.org,2002:set",{kind:"mapping",resolve:hJ,construct:fJ}),dJ=zFe.extend({implicit:[$Fe,GFe],explicit:[UFe,HFe,YFe,jFe]}),qf=Object.prototype.hasOwnProperty,zT=1,pJ=2,mJ=3,$T=4,OD=1,KFe=2,TQ=3,ZFe=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,QFe=/[\x85\u2028\u2029]/,JFe=/[,\[\]\{\}]/,gJ=/^(?:!|!!|![a-z\-]+!)$/i,vJ=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;x(BD,"_class");x(Hl,"is_EOL");x(Uf,"is_WHITE_SPACE");x(ks,"is_WS_OR_EOL");x(yp,"is_FLOW_INDICATOR");x(yJ,"fromHexCode");x(xJ,"escapedHexLen");x(bJ,"fromDecimalCode");x(FD,"simpleEscapeSequence");x(wJ,"charFromCodepoint");kJ=new Array(256),TJ=new Array(256);for(vp=0;vp<256;vp++)kJ[vp]=FD(vp)?1:0,TJ[vp]=FD(vp);x(EJ,"State$1");x(eN,"generateError");x(Ht,"throwError");x(Wb,"throwWarning");EQ={YAML:x(function(e,r,n){var a,i,s;e.version!==null&&Ht(e,"duplication of %YAML directive"),n.length!==1&&Ht(e,"YAML directive accepts exactly one argument"),a=/^([0-9]+)\.([0-9]+)$/.exec(n[0]),a===null&&Ht(e,"ill-formed argument of the YAML directive"),i=parseInt(a[1],10),s=parseInt(a[2],10),i!==1&&Ht(e,"unacceptable YAML version of the document"),e.version=n[0],e.checkLineBreaks=s<2,s!==1&&s!==2&&Wb(e,"unsupported YAML version of the document")},"handleYamlDirective"),TAG:x(function(e,r,n){var a,i;n.length!==2&&Ht(e,"TAG directive accepts exactly two arguments"),a=n[0],i=n[1],gJ.test(a)||Ht(e,"ill-formed tag handle (first argument) of the TAG directive"),qf.call(e.tagMap,a)&&Ht(e,'there is a previously declared suffix for "'+a+'" tag handle'),vJ.test(i)||Ht(e,"ill-formed tag prefix (second argument) of the TAG directive");try{i=decodeURIComponent(i)}catch{Ht(e,"tag prefix is malformed: "+i)}e.tagMap[a]=i},"handleTagDirective")};x(bh,"captureSegment");x(zD,"mergeMappings");x(xp,"storeMappingPair");x(VT,"readLineBreak");x(ya,"skipSeparationSpace");x(Kb,"testDocumentSeparator");x(HT,"writeFoldedLines");x(CJ,"readPlainScalar");x(SJ,"readSingleQuotedScalar");x(_J,"readDoubleQuotedScalar");x(AJ,"readFlowCollection");x(LJ,"readBlockScalar");x($D,"readBlockSequence");x(RJ,"readBlockMapping");x(IJ,"readTagProperty");x(DJ,"readAnchorProperty");x(NJ,"readAlias");x(bp,"composeNode");x(MJ,"readDocument");x(tN,"loadDocuments");x(OJ,"loadAll$1");x(PJ,"load$1");eze=OJ,tze=PJ,BJ={loadAll:eze,load:tze},FJ=Object.prototype.toString,zJ=Object.prototype.hasOwnProperty,rN=65279,rze=9,Yb=10,nze=13,aze=32,ize=33,sze=34,GD=35,oze=37,lze=38,uze=39,cze=42,$J=44,hze=45,GT=58,fze=61,dze=62,pze=63,mze=64,GJ=91,UJ=93,gze=96,qJ=123,vze=124,VJ=125,ts={};ts[0]="\\0";ts[7]="\\a";ts[8]="\\b";ts[9]="\\t";ts[10]="\\n";ts[11]="\\v";ts[12]="\\f";ts[13]="\\r";ts[27]="\\e";ts[34]='\\"';ts[92]="\\\\";ts[133]="\\N";ts[160]="\\_";ts[8232]="\\L";ts[8233]="\\P";yze=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],xze=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;x(HJ,"compileStyleMap");x(WJ,"encodeHex");bze=1,Xb=2;x(YJ,"State");x(UD,"indentString");x(UT,"generateNextLine");x(XJ,"testImplicitResolving");x(jb,"isWhitespace");x(e1,"isPrintable");x(qD,"isNsCharOrWhitespace");x(VD,"isPlainSafe");x(jJ,"isPlainSafeFirst");x(KJ,"isPlainSafeLast");x(Qg,"codePointAt");x(nN,"needIndentIndicator");ZJ=1,HD=2,QJ=3,JJ=4,Zg=5;x(eee,"chooseScalarStyle");x(tee,"writeScalar");x(WD,"blockHeader");x(YD,"dropEndingNewline");x(ree,"foldString");x(XD,"foldLine");x(nee,"escapeString");x(aee,"writeFlowSequence");x(jD,"writeBlockSequence");x(iee,"writeFlowMapping");x(see,"writeBlockMapping");x(KD,"detectType");x(Yu,"writeNode");x(oee,"getDuplicateReferences");x(qT,"inspectNode");x(lee,"dump$1");wze=lee,kze={dump:wze};x(WT,"renamed");t1=KQ,r1=BJ.load,GNt=BJ.loadAll,UNt=kze.dump,qNt=WT("safeLoad","load"),VNt=WT("safeLoadAll","loadAll"),HNt=WT("safeDump","dump");});function Zb(t,e){if(t===void 0||e===void 0)return{angle:0,deltaX:0,deltaY:0};t=Un(t),e=Un(e);let[r,n]=[t.x,t.y],[a,i]=[e.x,e.y],s=a-r,o=i-n;return{angle:Math.atan(o/s),deltaX:s,deltaY:o}}var il,Un,XT,sl=A(()=>{ur();il={aggregation:18,extension:18,composition:18,dependency:6,lollipop:13.5,arrow_point:4};x(Zb,"calculateDeltaAndAngle");Un=x(t=>Array.isArray(t)?{x:t[0],y:t[1]}:t,"pointTransformer"),XT=x(t=>({x:x(function(e,r,n){let a=0,i=Un(n[0]).x=0?1:-1)}else if(r===n.length-1&&Object.hasOwn(il,t.arrowTypeEnd)){let{angle:p,deltaX:m}=Zb(n[n.length-1],n[n.length-2]);a=il[t.arrowTypeEnd]*Math.cos(p)*(m>=0?1:-1)}let s=Math.abs(Un(e).x-Un(n[n.length-1]).x),o=Math.abs(Un(e).y-Un(n[n.length-1]).y),l=Math.abs(Un(e).x-Un(n[0]).x),u=Math.abs(Un(e).y-Un(n[0]).y),h=il[t.arrowTypeStart],f=il[t.arrowTypeEnd],d=1;if(s0&&o0&&u=0?1:-1)}else if(r===n.length-1&&Object.hasOwn(il,t.arrowTypeEnd)){let{angle:p,deltaY:m}=Zb(n[n.length-1],n[n.length-2]);a=il[t.arrowTypeEnd]*Math.abs(Math.sin(p))*(m>=0?1:-1)}let s=Math.abs(Un(e).y-Un(n[n.length-1]).y),o=Math.abs(Un(e).x-Un(n[n.length-1]).x),l=Math.abs(Un(e).y-Un(n[0]).y),u=Math.abs(Un(e).x-Un(n[0]).x),h=il[t.arrowTypeStart],f=il[t.arrowTypeEnd],d=1;if(s0&&o0&&u{ur();wh=x(({flowchart:t})=>{let e=t?.subGraphTitleMargin?.top??0,r=t?.subGraphTitleMargin?.bottom??0,n=e+r;return{subGraphTitleTopMargin:e,subGraphTitleBottomMargin:r,subGraphTitleTotalMargin:n}},"getSubGraphTitleMargins")});var Tze,n1,aN,uee,jT=A(()=>{Tze=Object.freeze({left:0,top:0,width:16,height:16}),n1=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),aN=Object.freeze({...Tze,...n1}),uee=Object.freeze({...aN,body:"",hidden:!1})});var Eze,cee,hee=A(()=>{jT();Eze=Object.freeze({width:null,height:null}),cee=Object.freeze({...Eze,...n1})});var iN,KT,fee=A(()=>{iN=(t,e,r,n="")=>{let a=t.split(":");if(t.slice(0,1)==="@"){if(a.length<2||a.length>3)return null;n=a.shift().slice(1)}if(a.length>3||!a.length)return null;if(a.length>1){let o=a.pop(),l=a.pop(),u={provider:a.length>0?a[0]:n,prefix:l,name:o};return e&&!KT(u)?null:u}let i=a[0],s=i.split("-");if(s.length>1){let o={provider:n,prefix:s.shift(),name:s.join("-")};return e&&!KT(o)?null:o}if(r&&n===""){let o={provider:n,prefix:"",name:i};return e&&!KT(o,r)?null:o}return null},KT=(t,e)=>t?!!((e&&t.prefix===""||t.prefix)&&t.name):!1});function dee(t,e){let r={};!t.hFlip!=!e.hFlip&&(r.hFlip=!0),!t.vFlip!=!e.vFlip&&(r.vFlip=!0);let n=((t.rotate||0)+(e.rotate||0))%4;return n&&(r.rotate=n),r}var pee=A(()=>{});function sN(t,e){let r=dee(t,e);for(let n in uee)n in n1?n in t&&!(n in r)&&(r[n]=n1[n]):n in e?r[n]=e[n]:n in t&&(r[n]=t[n]);return r}var mee=A(()=>{jT();pee()});function gee(t,e){let r=t.icons,n=t.aliases||Object.create(null),a=Object.create(null);function i(s){if(r[s])return a[s]=[];if(!(s in a)){a[s]=null;let o=n[s]&&n[s].parent,l=o&&i(o);l&&(a[s]=[o].concat(l))}return a[s]}return(e||Object.keys(r).concat(Object.keys(n))).forEach(i),a}var vee=A(()=>{});function yee(t,e,r){let n=t.icons,a=t.aliases||Object.create(null),i={};function s(o){i=sN(n[o]||a[o],i)}return s(e),r.forEach(s),sN(t,i)}function oN(t,e){if(t.icons[e])return yee(t,e,[]);let r=gee(t,[e])[e];return r?yee(t,e,r):null}var xee=A(()=>{mee();vee()});function lN(t,e,r){if(e===1)return t;if(r=r||100,typeof t=="number")return Math.ceil(t*e*r)/r;if(typeof t!="string")return t;let n=t.split(Cze);if(n===null||!n.length)return t;let a=[],i=n.shift(),s=Sze.test(i);for(;;){if(s){let o=parseFloat(i);isNaN(o)?a.push(i):a.push(Math.ceil(o*e*r)/r)}else a.push(i);if(i=n.shift(),i===void 0)return a.join("");s=!s}}var Cze,Sze,bee=A(()=>{Cze=/(-?[0-9.]*[0-9]+[0-9.]*)/g,Sze=/^-?[0-9.]*[0-9]+[0-9.]*$/g});function _ze(t,e="defs"){let r="",n=t.indexOf("<"+e);for(;n>=0;){let a=t.indexOf(">",n),i=t.indexOf("",i);if(s===-1)break;r+=t.slice(a+1,i).trim(),t=t.slice(0,n).trim()+t.slice(s+1)}return{defs:r,content:t}}function Aze(t,e){return t?""+t+""+e:e}function wee(t,e,r){let n=_ze(t);return Aze(n.defs,e+n.content+r)}var kee=A(()=>{});function uN(t,e){let r={...aN,...t},n={...cee,...e},a={left:r.left,top:r.top,width:r.width,height:r.height},i=r.body;[r,n].forEach(g=>{let v=[],y=g.hFlip,b=g.vFlip,w=g.rotate;y?b?w+=2:(v.push("translate("+(a.width+a.left).toString()+" "+(0-a.top).toString()+")"),v.push("scale(-1 1)"),a.top=a.left=0):b&&(v.push("translate("+(0-a.left).toString()+" "+(a.height+a.top).toString()+")"),v.push("scale(1 -1)"),a.top=a.left=0);let C;switch(w<0&&(w-=Math.floor(w/4)*4),w=w%4,w){case 1:C=a.height/2+a.top,v.unshift("rotate(90 "+C.toString()+" "+C.toString()+")");break;case 2:v.unshift("rotate(180 "+(a.width/2+a.left).toString()+" "+(a.height/2+a.top).toString()+")");break;case 3:C=a.width/2+a.left,v.unshift("rotate(-90 "+C.toString()+" "+C.toString()+")");break}w%2===1&&(a.left!==a.top&&(C=a.left,a.left=a.top,a.top=C),a.width!==a.height&&(C=a.width,a.width=a.height,a.height=C)),v.length&&(i=wee(i,'',""))});let s=n.width,o=n.height,l=a.width,u=a.height,h,f;s===null?(f=o===null?"1em":o==="auto"?u:o,h=lN(f,l/u)):(h=s==="auto"?l:s,f=o===null?lN(h,u/l):o==="auto"?u:o);let d={},p=(g,v)=>{Lze(v)||(d[g]=v.toString())};p("width",h),p("height",f);let m=[a.left,a.top,l,u];return d.viewBox=m.join(" "),{attributes:d,viewBox:m,body:i}}var Lze,Tee=A(()=>{jT();hee();bee();kee();Lze=t=>t==="unset"||t==="undefined"||t==="none"});function cN(t,e=Ize){let r=[],n;for(;n=Rze.exec(t);)r.push(n[1]);if(!r.length)return t;let a="suffix"+(Math.random()*16777216|Date.now()).toString(16);return r.forEach(i=>{let s=typeof e=="function"?e(i):e+(Dze++).toString(),o=i.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");t=t.replace(new RegExp('([#;"])('+o+')([")]|\\.[a-z])',"g"),"$1"+s+a+"$3")}),t=t.replace(new RegExp(a,"g"),""),t}var Rze,Ize,Dze,Eee=A(()=>{Rze=/\sid="(\S+)"/g,Ize="IconifyId"+Date.now().toString(16)+(Math.random()*16777216|0).toString(16),Dze=0});function hN(t,e){let r=t.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(let n in e)r+=" "+n+'="'+e[n]+'"';return'"+t+""}var Cee=A(()=>{});var _ee=va((yMt,See)=>{var a1=1e3,i1=a1*60,s1=i1*60,wp=s1*24,Nze=wp*7,Mze=wp*365.25;See.exports=function(t,e){e=e||{};var r=typeof t;if(r==="string"&&t.length>0)return Oze(t);if(r==="number"&&isFinite(t))return e.long?Bze(t):Pze(t);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(t))};function Oze(t){if(t=String(t),!(t.length>100)){var e=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(t);if(e){var r=parseFloat(e[1]),n=(e[2]||"ms").toLowerCase();switch(n){case"years":case"year":case"yrs":case"yr":case"y":return r*Mze;case"weeks":case"week":case"w":return r*Nze;case"days":case"day":case"d":return r*wp;case"hours":case"hour":case"hrs":case"hr":case"h":return r*s1;case"minutes":case"minute":case"mins":case"min":case"m":return r*i1;case"seconds":case"second":case"secs":case"sec":case"s":return r*a1;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return r;default:return}}}}function Pze(t){var e=Math.abs(t);return e>=wp?Math.round(t/wp)+"d":e>=s1?Math.round(t/s1)+"h":e>=i1?Math.round(t/i1)+"m":e>=a1?Math.round(t/a1)+"s":t+"ms"}function Bze(t){var e=Math.abs(t);return e>=wp?ZT(t,e,wp,"day"):e>=s1?ZT(t,e,s1,"hour"):e>=i1?ZT(t,e,i1,"minute"):e>=a1?ZT(t,e,a1,"second"):t+" ms"}function ZT(t,e,r,n){var a=e>=r*1.5;return Math.round(t/r)+" "+n+(a?"s":"")}});var Lee=va((xMt,Aee)=>{function Fze(t){r.debug=r,r.default=r,r.coerce=l,r.disable=s,r.enable=a,r.enabled=o,r.humanize=_ee(),r.destroy=u,Object.keys(t).forEach(h=>{r[h]=t[h]}),r.names=[],r.skips=[],r.formatters={};function e(h){let f=0;for(let d=0;d{if(E==="%%")return"%";C++;let S=r.formatters[_];if(typeof S=="function"){let L=v[C];E=S.call(y,L),v.splice(C,1),C--}return E}),r.formatArgs.call(y,v),(y.log||r.log).apply(y,v)}return g.namespace=h,g.useColors=r.useColors(),g.color=r.selectColor(h),g.extend=n,g.destroy=r.destroy,Object.defineProperty(g,"enabled",{enumerable:!0,configurable:!1,get:()=>d!==null?d:(p!==r.namespaces&&(p=r.namespaces,m=r.enabled(h)),m),set:v=>{d=v}}),typeof r.init=="function"&&r.init(g),g}function n(h,f){let d=r(this.namespace+(typeof f>"u"?":":f)+h);return d.log=this.log,d}function a(h){r.save(h),r.namespaces=h,r.names=[],r.skips=[];let f=(typeof h=="string"?h:"").trim().replace(/\s+/g,",").split(",").filter(Boolean);for(let d of f)d[0]==="-"?r.skips.push(d.slice(1)):r.names.push(d)}function i(h,f){let d=0,p=0,m=-1,g=0;for(;d"-"+f)].join(",");return r.enable(""),h}function o(h){for(let f of r.skips)if(i(h,f))return!1;for(let f of r.names)if(i(h,f))return!0;return!1}function l(h){return h instanceof Error?h.stack||h.message:h}function u(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}return r.enable(r.load()),r}Aee.exports=Fze});var Ree=va((to,QT)=>{to.formatArgs=$ze;to.save=Gze;to.load=Uze;to.useColors=zze;to.storage=qze();to.destroy=(()=>{let t=!1;return()=>{t||(t=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})();to.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function zze(){if(typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs))return!0;if(typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;let t;return typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&(t=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(t[1],10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function $ze(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+QT.exports.humanize(this.diff),!this.useColors)return;let e="color: "+this.color;t.splice(1,0,e,"color: inherit");let r=0,n=0;t[0].replace(/%[a-zA-Z%]/g,a=>{a!=="%%"&&(r++,a==="%c"&&(n=r))}),t.splice(n,0,e)}to.log=console.debug||console.log||(()=>{});function Gze(t){try{t?to.storage.setItem("debug",t):to.storage.removeItem("debug")}catch{}}function Uze(){let t;try{t=to.storage.getItem("debug")||to.storage.getItem("DEBUG")}catch{}return!t&&typeof process<"u"&&"env"in process&&(t=process.env.DEBUG),t}function qze(){try{return localStorage}catch{}}QT.exports=Lee()(to);var{formatters:Vze}=QT.exports;Vze.j=function(t){try{return JSON.stringify(t)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}});var wMt,Iee=A(()=>{fee();xee();Tee();Eee();Cee();wMt=ii(Ree(),1)});var dN,fN,Dee,JT,Hze,kh,Mo=A(()=>{ur();Iee();dN={body:'?',height:80,width:80},fN=new Map,Dee=new Map,JT=x(t=>{for(let e of t){if(!e.name)throw new Error('Invalid icon loader. Must have a "name" property with non-empty string value.');if(te.debug("Registering icon pack:",e.name),"loader"in e)Dee.set(e.name,e.loader);else if("icons"in e)fN.set(e.name,e.icons);else throw te.error("Invalid icon loader:",e),new Error('Invalid icon loader. Must have either "icons" or "loader" property.')}},"registerIconPacks"),Hze=x(async(t,e)=>{let r=iN(t,!0,e!==void 0);if(!r)throw new Error(`Invalid icon name: ${t}`);let n=r.prefix||e;if(!n)throw new Error(`Icon name must contain a prefix: ${t}`);let a=fN.get(n);if(!a){let s=Dee.get(n);if(!s)throw new Error(`Icon set not found: ${r.prefix}`);try{a={...await s(),prefix:n},fN.set(n,a)}catch(o){throw te.error(o),new Error(`Failed to load icon set: ${r.prefix}`)}}let i=oN(a,r.name);if(!i)throw new Error(`Icon not found: ${t}`);return i},"getRegisteredIconData"),kh=x(async(t,e)=>{let r;try{r=await Hze(t,e?.fallbackPrefix)}catch(i){te.error(i),r=dN}let n=uN(r,e);return hN(cN(n.body),n.attributes)},"getIconSVG")});var Nee=va(ci=>{"use strict";Object.defineProperty(ci,"__esModule",{value:!0});ci.BLANK_URL=ci.relativeFirstCharacters=ci.whitespaceEscapeCharsRegex=ci.urlSchemeRegex=ci.ctrlCharactersRegex=ci.htmlCtrlEntityRegex=ci.htmlEntitiesRegex=ci.invalidProtocolRegex=void 0;ci.invalidProtocolRegex=/^([^\w]*)(javascript|data|vbscript)/im;ci.htmlEntitiesRegex=/&#(\w+)(^\w|;)?/g;ci.htmlCtrlEntityRegex=/&(newline|tab);/gi;ci.ctrlCharactersRegex=/[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim;ci.urlSchemeRegex=/^.+(:|:)/gim;ci.whitespaceEscapeCharsRegex=/(\\|%5[cC])((%(6[eE]|72|74))|[nrt])/g;ci.relativeFirstCharacters=[".","/"];ci.BLANK_URL="about:blank"});var o1=va(pN=>{"use strict";Object.defineProperty(pN,"__esModule",{value:!0});pN.sanitizeUrl=jze;var rs=Nee();function Wze(t){return rs.relativeFirstCharacters.indexOf(t[0])>-1}function Yze(t){var e=t.replace(rs.ctrlCharactersRegex,"");return e.replace(rs.htmlEntitiesRegex,function(r,n){return String.fromCharCode(n)})}function Xze(t){return URL.canParse(t)}function Mee(t){try{return decodeURIComponent(t)}catch{return t}}function jze(t){if(!t)return rs.BLANK_URL;var e,r=Mee(t.trim());do r=Yze(r).replace(rs.htmlCtrlEntityRegex,"").replace(rs.ctrlCharactersRegex,"").replace(rs.whitespaceEscapeCharsRegex,"").trim(),r=Mee(r),e=r.match(rs.ctrlCharactersRegex)||r.match(rs.htmlEntitiesRegex)||r.match(rs.htmlCtrlEntityRegex)||r.match(rs.whitespaceEscapeCharsRegex);while(e&&e.length>0);var n=r;if(!n)return rs.BLANK_URL;if(Wze(n))return n;var a=n.trimStart(),i=a.match(rs.urlSchemeRegex);if(!i)return n;var s=i[0].toLowerCase().trim();if(rs.invalidProtocolRegex.test(s))return rs.BLANK_URL;var o=a.replace(/\\/g,"/");if(s==="mailto:"||s.includes("://"))return o;if(s==="http:"||s==="https:"){if(!Xze(o))return rs.BLANK_URL;var l=new URL(o);return l.protocol=l.protocol.toLowerCase(),l.hostname=l.hostname.toLowerCase(),l.toString()}return o}});function kp(t,e){return t==null||e==null?NaN:te?1:t>=e?0:NaN}var mN=A(()=>{});function gN(t,e){return t==null||e==null?NaN:et?1:e>=t?0:NaN}var Oee=A(()=>{});function Tp(t){let e,r,n;t.length!==2?(e=kp,r=(o,l)=>kp(t(o),l),n=(o,l)=>t(o)-l):(e=t===kp||t===gN?t:Kze,r=t,n=t);function a(o,l,u=0,h=o.length){if(u>>1;r(o[f],l)<0?u=f+1:h=f}while(u>>1;r(o[f],l)<=0?u=f+1:h=f}while(uu&&n(o[f-1],l)>-n(o[f],l)?f-1:f}return{left:a,center:s,right:i}}function Kze(){return 0}var vN=A(()=>{mN();Oee()});function yN(t){return t===null?NaN:+t}var Pee=A(()=>{});var Bee,Fee,Zze,Qze,xN,zee=A(()=>{mN();vN();Pee();Bee=Tp(kp),Fee=Bee.right,Zze=Bee.left,Qze=Tp(yN).center,xN=Fee});function $ee({_intern:t,_key:e},r){let n=e(r);return t.has(n)?t.get(n):r}function Jze({_intern:t,_key:e},r){let n=e(r);return t.has(n)?t.get(n):(t.set(n,r),r)}function e$e({_intern:t,_key:e},r){let n=e(r);return t.has(n)&&(r=t.get(n),t.delete(n)),r}function t$e(t){return t!==null&&typeof t=="object"?t.valueOf():t}var l1,Gee=A(()=>{l1=class extends Map{constructor(e,r=t$e){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:r}}),e!=null)for(let[n,a]of e)this.set(n,a)}get(e){return super.get($ee(this,e))}has(e){return super.has($ee(this,e))}set(e,r){return super.set(Jze(this,e),r)}delete(e){return super.delete(e$e(this,e))}}});function eE(t,e,r){let n=(e-t)/Math.max(0,r),a=Math.floor(Math.log10(n)),i=n/Math.pow(10,a),s=i>=r$e?10:i>=n$e?5:i>=a$e?2:1,o,l,u;return a<0?(u=Math.pow(10,-a)/s,o=Math.round(t*u),l=Math.round(e*u),o/ue&&--l,u=-u):(u=Math.pow(10,a)*s,o=Math.round(t/u),l=Math.round(e/u),o*ue&&--l),l0))return[];if(t===e)return[t];let n=e=a))return[];let o=i-a+1,l=new Array(o);if(n)if(s<0)for(let u=0;u{r$e=Math.sqrt(50),n$e=Math.sqrt(10),a$e=Math.sqrt(2)});function rE(t,e){let r;if(e===void 0)for(let n of t)n!=null&&(r=n)&&(r=n);else{let n=-1;for(let a of t)(a=e(a,++n,t))!=null&&(r=a)&&(r=a)}return r}var qee=A(()=>{});function nE(t,e){let r;if(e===void 0)for(let n of t)n!=null&&(r>n||r===void 0&&n>=n)&&(r=n);else{let n=-1;for(let a of t)(a=e(a,++n,t))!=null&&(r>a||r===void 0&&a>=a)&&(r=a)}return r}var Vee=A(()=>{});function aE(t,e,r){t=+t,e=+e,r=(a=arguments.length)<2?(e=t,t=0,1):a<3?1:+r;for(var n=-1,a=Math.max(0,Math.ceil((e-t)/r))|0,i=new Array(a);++n{});var Vf=A(()=>{zee();vN();qee();Vee();Hee();Uee();Gee()});function Wee(t){return t}var Yee=A(()=>{});function i$e(t){return"translate("+t+",0)"}function s$e(t){return"translate(0,"+t+")"}function o$e(t){return e=>+t(e)}function l$e(t,e){return e=Math.max(0,t.bandwidth()-e*2)/2,t.round()&&(e=Math.round(e)),r=>+t(r)+e}function u$e(){return!this.__axis}function jee(t,e){var r=[],n=null,a=null,i=6,s=6,o=3,l=typeof window<"u"&&window.devicePixelRatio>1?0:.5,u=t===sE||t===iE?-1:1,h=t===iE||t===bN?"x":"y",f=t===sE||t===wN?i$e:s$e;function d(p){var m=n??(e.ticks?e.ticks.apply(e,r):e.domain()),g=a??(e.tickFormat?e.tickFormat.apply(e,r):Wee),v=Math.max(i,0)+o,y=e.range(),b=+y[0]+l,w=+y[y.length-1]+l,C=(e.bandwidth?l$e:o$e)(e.copy(),l),k=p.selection?p.selection():p,E=k.selectAll(".domain").data([null]),_=k.selectAll(".tick").data(m,e).order(),S=_.exit(),L=_.enter().append("g").attr("class","tick"),M=_.select("line"),D=_.select("text");E=E.merge(E.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),_=_.merge(L),M=M.merge(L.append("line").attr("stroke","currentColor").attr(h+"2",u*i)),D=D.merge(L.append("text").attr("fill","currentColor").attr(h,u*v).attr("dy",t===sE?"0em":t===wN?"0.71em":"0.32em")),p!==k&&(E=E.transition(p),_=_.transition(p),M=M.transition(p),D=D.transition(p),S=S.transition(p).attr("opacity",Xee).attr("transform",function(T){return isFinite(T=C(T))?f(T+l):this.getAttribute("transform")}),L.attr("opacity",Xee).attr("transform",function(T){var I=this.parentNode.__axis;return f((I&&isFinite(I=I(T))?I:C(T))+l)})),S.remove(),E.attr("d",t===iE||t===bN?s?"M"+u*s+","+b+"H"+l+"V"+w+"H"+u*s:"M"+l+","+b+"V"+w:s?"M"+b+","+u*s+"V"+l+"H"+w+"V"+u*s:"M"+b+","+l+"H"+w),_.attr("opacity",1).attr("transform",function(T){return f(C(T)+l)}),M.attr(h+"2",u*i),D.attr(h,u*v).text(g),k.filter(u$e).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",t===bN?"start":t===iE?"end":"middle"),k.each(function(){this.__axis=C})}return d.scale=function(p){return arguments.length?(e=p,d):e},d.ticks=function(){return r=Array.from(arguments),d},d.tickArguments=function(p){return arguments.length?(r=p==null?[]:Array.from(p),d):r.slice()},d.tickValues=function(p){return arguments.length?(n=p==null?null:Array.from(p),d):n&&n.slice()},d.tickFormat=function(p){return arguments.length?(a=p,d):a},d.tickSize=function(p){return arguments.length?(i=s=+p,d):i},d.tickSizeInner=function(p){return arguments.length?(i=+p,d):i},d.tickSizeOuter=function(p){return arguments.length?(s=+p,d):s},d.tickPadding=function(p){return arguments.length?(o=+p,d):o},d.offset=function(p){return arguments.length?(l=+p,d):l},d}function kN(t){return jee(sE,t)}function TN(t){return jee(wN,t)}var sE,bN,wN,iE,Xee,Kee=A(()=>{Yee();sE=1,bN=2,wN=3,iE=4,Xee=1e-6});var Zee=A(()=>{Kee()});function Jee(){for(var t=0,e=arguments.length,r={},n;t=0&&(n=r.slice(a+1),r=r.slice(0,a)),r&&!e.hasOwnProperty(r))throw new Error("unknown type: "+r);return{type:r,name:n}})}function f$e(t,e){for(var r=0,n=t.length,a;r{c$e={value:()=>{}};oE.prototype=Jee.prototype={constructor:oE,on:function(t,e){var r=this._,n=h$e(t+"",r),a,i=-1,s=n.length;if(arguments.length<2){for(;++i0)for(var r=new Array(a),n=0,a,i;n{ete()});var lE,SN,_N=A(()=>{lE="http://www.w3.org/1999/xhtml",SN={svg:"http://www.w3.org/2000/svg",xhtml:lE,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"}});function Th(t){var e=t+="",r=e.indexOf(":");return r>=0&&(e=t.slice(0,r))!=="xmlns"&&(t=t.slice(r+1)),SN.hasOwnProperty(e)?{space:SN[e],local:t}:t}var uE=A(()=>{_N()});function d$e(t){return function(){var e=this.ownerDocument,r=this.namespaceURI;return r===lE&&e.documentElement.namespaceURI===lE?e.createElement(t):e.createElementNS(r,t)}}function p$e(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function cE(t){var e=Th(t);return(e.local?p$e:d$e)(e)}var AN=A(()=>{uE();_N()});function m$e(){}function Ep(t){return t==null?m$e:function(){return this.querySelector(t)}}var hE=A(()=>{});function tte(t){typeof t!="function"&&(t=Ep(t));for(var e=this._groups,r=e.length,n=new Array(r),a=0;a{Wl();hE()});function LN(t){return t==null?[]:Array.isArray(t)?t:Array.from(t)}var nte=A(()=>{});function g$e(){return[]}function Jb(t){return t==null?g$e:function(){return this.querySelectorAll(t)}}var RN=A(()=>{});function v$e(t){return function(){return LN(t.apply(this,arguments))}}function ate(t){typeof t=="function"?t=v$e(t):t=Jb(t);for(var e=this._groups,r=e.length,n=[],a=[],i=0;i{Wl();nte();RN()});function e4(t){return function(){return this.matches(t)}}function fE(t){return function(e){return e.matches(t)}}var t4=A(()=>{});function x$e(t){return function(){return y$e.call(this.children,t)}}function b$e(){return this.firstElementChild}function ste(t){return this.select(t==null?b$e:x$e(typeof t=="function"?t:fE(t)))}var y$e,ote=A(()=>{t4();y$e=Array.prototype.find});function k$e(){return Array.from(this.children)}function T$e(t){return function(){return w$e.call(this.children,t)}}function lte(t){return this.selectAll(t==null?k$e:T$e(typeof t=="function"?t:fE(t)))}var w$e,ute=A(()=>{t4();w$e=Array.prototype.filter});function cte(t){typeof t!="function"&&(t=e4(t));for(var e=this._groups,r=e.length,n=new Array(r),a=0;a{Wl();t4()});function dE(t){return new Array(t.length)}var IN=A(()=>{});function fte(){return new ua(this._enter||this._groups.map(dE),this._parents)}function r4(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}var DN=A(()=>{IN();Wl();r4.prototype={constructor:r4,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 dte(t){return function(){return t}}var pte=A(()=>{});function E$e(t,e,r,n,a,i){for(var s=0,o,l=e.length,u=i.length;s=w&&(w=b+1);!(k=v[w])&&++w{Wl();DN();pte()});function vte(){return new ua(this._exit||this._groups.map(dE),this._parents)}var yte=A(()=>{IN();Wl()});function xte(t,e,r){var n=this.enter(),a=this,i=this.exit();return typeof t=="function"?(n=t(n),n&&(n=n.selection())):n=n.append(t+""),e!=null&&(a=e(a),a&&(a=a.selection())),r==null?i.remove():r(i),n&&a?n.merge(a).order():a}var bte=A(()=>{});function wte(t){for(var e=t.selection?t.selection():t,r=this._groups,n=e._groups,a=r.length,i=n.length,s=Math.min(a,i),o=new Array(a),l=0;l{Wl()});function Tte(){for(var t=this._groups,e=-1,r=t.length;++e=0;)(s=n[a])&&(i&&s.compareDocumentPosition(i)^4&&i.parentNode.insertBefore(s,i),i=s);return this}var Ete=A(()=>{});function Cte(t){t||(t=A$e);function e(f,d){return f&&d?t(f.__data__,d.__data__):!f-!d}for(var r=this._groups,n=r.length,a=new Array(n),i=0;ie?1:t>=e?0:NaN}var Ste=A(()=>{Wl()});function _te(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this}var Ate=A(()=>{});function Lte(){return Array.from(this)}var Rte=A(()=>{});function Ite(){for(var t=this._groups,e=0,r=t.length;e{});function Nte(){let t=0;for(let e of this)++t;return t}var Mte=A(()=>{});function Ote(){return!this.node()}var Pte=A(()=>{});function Bte(t){for(var e=this._groups,r=0,n=e.length;r{});function L$e(t){return function(){this.removeAttribute(t)}}function R$e(t){return function(){this.removeAttributeNS(t.space,t.local)}}function I$e(t,e){return function(){this.setAttribute(t,e)}}function D$e(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function N$e(t,e){return function(){var r=e.apply(this,arguments);r==null?this.removeAttribute(t):this.setAttribute(t,r)}}function M$e(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 zte(t,e){var r=Th(t);if(arguments.length<2){var n=this.node();return r.local?n.getAttributeNS(r.space,r.local):n.getAttribute(r)}return this.each((e==null?r.local?R$e:L$e:typeof e=="function"?r.local?M$e:N$e:r.local?D$e:I$e)(r,e))}var $te=A(()=>{uE()});function pE(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}var NN=A(()=>{});function O$e(t){return function(){this.style.removeProperty(t)}}function P$e(t,e,r){return function(){this.style.setProperty(t,e,r)}}function B$e(t,e,r){return function(){var n=e.apply(this,arguments);n==null?this.style.removeProperty(t):this.style.setProperty(t,n,r)}}function Gte(t,e,r){return arguments.length>1?this.each((e==null?O$e:typeof e=="function"?B$e:P$e)(t,e,r??"")):Hf(this.node(),t)}function Hf(t,e){return t.style.getPropertyValue(e)||pE(t).getComputedStyle(t,null).getPropertyValue(e)}var MN=A(()=>{NN()});function F$e(t){return function(){delete this[t]}}function z$e(t,e){return function(){this[t]=e}}function $$e(t,e){return function(){var r=e.apply(this,arguments);r==null?delete this[t]:this[t]=r}}function Ute(t,e){return arguments.length>1?this.each((e==null?F$e:typeof e=="function"?$$e:z$e)(t,e)):this.node()[t]}var qte=A(()=>{});function Vte(t){return t.trim().split(/^|\s+/)}function ON(t){return t.classList||new Hte(t)}function Hte(t){this._node=t,this._names=Vte(t.getAttribute("class")||"")}function Wte(t,e){for(var r=ON(t),n=-1,a=e.length;++n{Hte.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 V$e(){this.textContent=""}function H$e(t){return function(){this.textContent=t}}function W$e(t){return function(){var e=t.apply(this,arguments);this.textContent=e??""}}function Kte(t){return arguments.length?this.each(t==null?V$e:(typeof t=="function"?W$e:H$e)(t)):this.node().textContent}var Zte=A(()=>{});function Y$e(){this.innerHTML=""}function X$e(t){return function(){this.innerHTML=t}}function j$e(t){return function(){var e=t.apply(this,arguments);this.innerHTML=e??""}}function Qte(t){return arguments.length?this.each(t==null?Y$e:(typeof t=="function"?j$e:X$e)(t)):this.node().innerHTML}var Jte=A(()=>{});function K$e(){this.nextSibling&&this.parentNode.appendChild(this)}function ere(){return this.each(K$e)}var tre=A(()=>{});function Z$e(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function rre(){return this.each(Z$e)}var nre=A(()=>{});function are(t){var e=typeof t=="function"?t:cE(t);return this.select(function(){return this.appendChild(e.apply(this,arguments))})}var ire=A(()=>{AN()});function Q$e(){return null}function sre(t,e){var r=typeof t=="function"?t:cE(t),n=e==null?Q$e:typeof e=="function"?e:Ep(e);return this.select(function(){return this.insertBefore(r.apply(this,arguments),n.apply(this,arguments)||null)})}var ore=A(()=>{AN();hE()});function J$e(){var t=this.parentNode;t&&t.removeChild(this)}function lre(){return this.each(J$e)}var ure=A(()=>{});function eGe(){var t=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function tGe(){var t=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function cre(t){return this.select(t?tGe:eGe)}var hre=A(()=>{});function fre(t){return arguments.length?this.property("__data__",t):this.node().__data__}var dre=A(()=>{});function rGe(t){return function(e){t.call(this,e,this.__data__)}}function nGe(t){return t.trim().split(/^|\s+/).map(function(e){var r="",n=e.indexOf(".");return n>=0&&(r=e.slice(n+1),e=e.slice(0,n)),{type:e,name:r}})}function aGe(t){return function(){var e=this.__on;if(e){for(var r=0,n=-1,a=e.length,i;r{});function gre(t,e,r){var n=pE(t),a=n.CustomEvent;typeof a=="function"?a=new a(e,r):(a=n.document.createEvent("Event"),r?(a.initEvent(e,r.bubbles,r.cancelable),a.detail=r.detail):a.initEvent(e,!1,!1)),t.dispatchEvent(a)}function sGe(t,e){return function(){return gre(this,t,e)}}function oGe(t,e){return function(){return gre(this,t,e.apply(this,arguments))}}function vre(t,e){return this.each((typeof e=="function"?oGe:sGe)(t,e))}var yre=A(()=>{NN()});function*xre(){for(var t=this._groups,e=0,r=t.length;e{});function ua(t,e){this._groups=t,this._parents=e}function wre(){return new ua([[document.documentElement]],PN)}function lGe(){return this}var PN,Eh,Wl=A(()=>{rte();ite();ote();ute();hte();gte();DN();yte();bte();kte();Ete();Ste();Ate();Rte();Dte();Mte();Pte();Fte();$te();MN();qte();jte();Zte();Jte();tre();nre();ire();ore();ure();hre();dre();mre();yre();bre();PN=[null];ua.prototype=wre.prototype={constructor:ua,select:tte,selectAll:ate,selectChild:ste,selectChildren:lte,filter:cte,data:mte,enter:fte,exit:vte,join:xte,merge:wte,selection:lGe,order:Tte,sort:Cte,call:_te,nodes:Lte,node:Ite,size:Nte,empty:Ote,each:Bte,attr:zte,style:Gte,property:Ute,classed:Xte,text:Kte,html:Qte,raise:ere,lower:rre,append:are,insert:sre,remove:lre,clone:cre,datum:fre,on:pre,dispatch:vre,[Symbol.iterator]:xre};Eh=wre});function We(t){return typeof t=="string"?new ua([[document.querySelector(t)]],[document.documentElement]):new ua([[t]],PN)}var kre=A(()=>{Wl()});var Yl=A(()=>{t4();uE();kre();Wl();hE();RN();MN()});var Tre=A(()=>{});function Cp(t,e,r){t.prototype=e.prototype=r,r.constructor=t}function c1(t,e){var r=Object.create(t.prototype);for(var n in e)r[n]=e[n];return r}var BN=A(()=>{});function Wf(){}function Cre(){return this.rgb().formatHex()}function gGe(){return this.rgb().formatHex8()}function vGe(){return Dre(this).formatHsl()}function Sre(){return this.rgb().formatRgb()}function jl(t){var e,r;return t=(t+"").trim().toLowerCase(),(e=uGe.exec(t))?(r=e[1].length,e=parseInt(e[1],16),r===6?_re(e):r===3?new Ni(e>>8&15|e>>4&240,e>>4&15|e&240,(e&15)<<4|e&15,1):r===8?mE(e>>24&255,e>>16&255,e>>8&255,(e&255)/255):r===4?mE(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=cGe.exec(t))?new Ni(e[1],e[2],e[3],1):(e=hGe.exec(t))?new Ni(e[1]*255/100,e[2]*255/100,e[3]*255/100,1):(e=fGe.exec(t))?mE(e[1],e[2],e[3],e[4]):(e=dGe.exec(t))?mE(e[1]*255/100,e[2]*255/100,e[3]*255/100,e[4]):(e=pGe.exec(t))?Rre(e[1],e[2]/100,e[3]/100,1):(e=mGe.exec(t))?Rre(e[1],e[2]/100,e[3]/100,e[4]):Ere.hasOwnProperty(t)?_re(Ere[t]):t==="transparent"?new Ni(NaN,NaN,NaN,0):null}function _re(t){return new Ni(t>>16&255,t>>8&255,t&255,1)}function mE(t,e,r,n){return n<=0&&(t=e=r=NaN),new Ni(t,e,r,n)}function zN(t){return t instanceof Wf||(t=jl(t)),t?(t=t.rgb(),new Ni(t.r,t.g,t.b,t.opacity)):new Ni}function f1(t,e,r,n){return arguments.length===1?zN(t):new Ni(t,e,r,n??1)}function Ni(t,e,r,n){this.r=+t,this.g=+e,this.b=+r,this.opacity=+n}function Are(){return`#${Sp(this.r)}${Sp(this.g)}${Sp(this.b)}`}function yGe(){return`#${Sp(this.r)}${Sp(this.g)}${Sp(this.b)}${Sp((isNaN(this.opacity)?1:this.opacity)*255)}`}function Lre(){let t=yE(this.opacity);return`${t===1?"rgb(":"rgba("}${_p(this.r)}, ${_p(this.g)}, ${_p(this.b)}${t===1?")":`, ${t})`}`}function yE(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function _p(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function Sp(t){return t=_p(t),(t<16?"0":"")+t.toString(16)}function Rre(t,e,r,n){return n<=0?t=e=r=NaN:r<=0||r>=1?t=e=NaN:e<=0&&(t=NaN),new Xl(t,e,r,n)}function Dre(t){if(t instanceof Xl)return new Xl(t.h,t.s,t.l,t.opacity);if(t instanceof Wf||(t=jl(t)),!t)return new Xl;if(t instanceof Xl)return t;t=t.rgb();var e=t.r/255,r=t.g/255,n=t.b/255,a=Math.min(e,r,n),i=Math.max(e,r,n),s=NaN,o=i-a,l=(i+a)/2;return o?(e===i?s=(r-n)/o+(r0&&l<1?0:s,new Xl(s,o,l,t.opacity)}function Nre(t,e,r,n){return arguments.length===1?Dre(t):new Xl(t,e,r,n??1)}function Xl(t,e,r,n){this.h=+t,this.s=+e,this.l=+r,this.opacity=+n}function Ire(t){return t=(t||0)%360,t<0?t+360:t}function gE(t){return Math.max(0,Math.min(1,t||0))}function FN(t,e,r){return(t<60?e+(r-e)*t/60:t<180?r:t<240?e+(r-e)*(240-t)/60:e)*255}var n4,vE,h1,a4,Xu,uGe,cGe,hGe,fGe,dGe,pGe,mGe,Ere,$N=A(()=>{BN();n4=.7,vE=1/n4,h1="\\s*([+-]?\\d+)\\s*",a4="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Xu="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",uGe=/^#([0-9a-f]{3,8})$/,cGe=new RegExp(`^rgb\\(${h1},${h1},${h1}\\)$`),hGe=new RegExp(`^rgb\\(${Xu},${Xu},${Xu}\\)$`),fGe=new RegExp(`^rgba\\(${h1},${h1},${h1},${a4}\\)$`),dGe=new RegExp(`^rgba\\(${Xu},${Xu},${Xu},${a4}\\)$`),pGe=new RegExp(`^hsl\\(${a4},${Xu},${Xu}\\)$`),mGe=new RegExp(`^hsla\\(${a4},${Xu},${Xu},${a4}\\)$`),Ere={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};Cp(Wf,jl,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:Cre,formatHex:Cre,formatHex8:gGe,formatHsl:vGe,formatRgb:Sre,toString:Sre});Cp(Ni,f1,c1(Wf,{brighter(t){return t=t==null?vE:Math.pow(vE,t),new Ni(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=t==null?n4:Math.pow(n4,t),new Ni(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new Ni(_p(this.r),_p(this.g),_p(this.b),yE(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:Are,formatHex:Are,formatHex8:yGe,formatRgb:Lre,toString:Lre}));Cp(Xl,Nre,c1(Wf,{brighter(t){return t=t==null?vE:Math.pow(vE,t),new Xl(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=t==null?n4:Math.pow(n4,t),new Xl(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,n=r+(r<.5?r:1-r)*e,a=2*r-n;return new Ni(FN(t>=240?t-240:t+120,a,n),FN(t,a,n),FN(t<120?t+240:t-120,a,n),this.opacity)},clamp(){return new Xl(Ire(this.h),gE(this.s),gE(this.l),yE(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(){let t=yE(this.opacity);return`${t===1?"hsl(":"hsla("}${Ire(this.h)}, ${gE(this.s)*100}%, ${gE(this.l)*100}%${t===1?")":`, ${t})`}`}}))});var Mre,Ore,Pre=A(()=>{Mre=Math.PI/180,Ore=180/Math.PI});function Ure(t){if(t instanceof ju)return new ju(t.l,t.a,t.b,t.opacity);if(t instanceof Ch)return qre(t);t instanceof Ni||(t=zN(t));var e=VN(t.r),r=VN(t.g),n=VN(t.b),a=GN((.2225045*e+.7168786*r+.0606169*n)/Fre),i,s;return e===r&&r===n?i=s=a:(i=GN((.4360747*e+.3850649*r+.1430804*n)/Bre),s=GN((.0139322*e+.0971045*r+.7141733*n)/zre)),new ju(116*a-16,500*(i-a),200*(a-s),t.opacity)}function HN(t,e,r,n){return arguments.length===1?Ure(t):new ju(t,e,r,n??1)}function ju(t,e,r,n){this.l=+t,this.a=+e,this.b=+r,this.opacity=+n}function GN(t){return t>xGe?Math.pow(t,1/3):t/Gre+$re}function UN(t){return t>d1?t*t*t:Gre*(t-$re)}function qN(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function VN(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function bGe(t){if(t instanceof Ch)return new Ch(t.h,t.c,t.l,t.opacity);if(t instanceof ju||(t=Ure(t)),t.a===0&&t.b===0)return new Ch(NaN,0{BN();$N();Pre();xE=18,Bre=.96422,Fre=1,zre=.82521,$re=4/29,d1=6/29,Gre=3*d1*d1,xGe=d1*d1*d1;Cp(ju,HN,c1(Wf,{brighter(t){return new ju(this.l+xE*(t??1),this.a,this.b,this.opacity)},darker(t){return new ju(this.l-xE*(t??1),this.a,this.b,this.opacity)},rgb(){var t=(this.l+16)/116,e=isNaN(this.a)?t:t+this.a/500,r=isNaN(this.b)?t:t-this.b/200;return e=Bre*UN(e),t=Fre*UN(t),r=zre*UN(r),new Ni(qN(3.1338561*e-1.6168667*t-.4906146*r),qN(-.9787684*e+1.9161415*t+.033454*r),qN(.0719453*e-.2289914*t+1.4052427*r),this.opacity)}}));Cp(Ch,i4,c1(Wf,{brighter(t){return new Ch(this.h,this.c,this.l+xE*(t??1),this.opacity)},darker(t){return new Ch(this.h,this.c,this.l-xE*(t??1),this.opacity)},rgb(){return qre(this).rgb()}}))});var p1=A(()=>{$N();Vre()});function WN(t,e,r,n,a){var i=t*t,s=i*t;return((1-3*t+3*i-s)*e+(4-6*i+3*s)*r+(1+3*t+3*i-3*s)*n+s*a)/6}function Hre(t){var e=t.length-1;return function(r){var n=r<=0?r=0:r>=1?(r=1,e-1):Math.floor(r*e),a=t[n],i=t[n+1],s=n>0?t[n-1]:2*a-i,o=n{});function Wre(t){var e=t.length;return function(r){var n=Math.floor(((r%=1)<0?++r:r)*e),a=t[(n+e-1)%e],i=t[n%e],s=t[(n+1)%e],o=t[(n+2)%e];return WN((r-n/e)*e,a,i,s,o)}}var Yre=A(()=>{YN()});var m1,XN=A(()=>{m1=t=>()=>t});function Xre(t,e){return function(r){return t+r*e}}function wGe(t,e,r){return t=Math.pow(t,r),e=Math.pow(e,r)-t,r=1/r,function(n){return Math.pow(t+n*e,r)}}function jre(t,e){var r=e-t;return r?Xre(t,r>180||r<-180?r-360*Math.round(r/360):r):m1(isNaN(t)?e:t)}function Kre(t){return(t=+t)==1?Sh:function(e,r){return r-e?wGe(e,r,t):m1(isNaN(e)?r:e)}}function Sh(t,e){var r=e-t;return r?Xre(t,r):m1(isNaN(t)?e:t)}var jN=A(()=>{XN()});function Zre(t){return function(e){var r=e.length,n=new Array(r),a=new Array(r),i=new Array(r),s,o;for(s=0;s{p1();YN();Yre();jN();Ap=(function t(e){var r=Kre(e);function n(a,i){var s=r((a=f1(a)).r,(i=f1(i)).r),o=r(a.g,i.g),l=r(a.b,i.b),u=Sh(a.opacity,i.opacity);return function(h){return a.r=s(h),a.g=o(h),a.b=l(h),a.opacity=u(h),a+""}}return n.gamma=t,n})(1);kGe=Zre(Hre),TGe=Zre(Wre)});function Qre(t,e){e||(e=[]);var r=t?Math.min(e.length,t.length):0,n=e.slice(),a;return function(i){for(a=0;a{});function tne(t,e){var r=e?e.length:0,n=t?Math.min(r,t.length):0,a=new Array(n),i=new Array(r),s;for(s=0;s{bE()});function nne(t,e){var r=new Date;return t=+t,e=+e,function(n){return r.setTime(t*(1-n)+e*n),r}}var ane=A(()=>{});function Mi(t,e){return t=+t,e=+e,function(r){return t*(1-r)+e*r}}var s4=A(()=>{});function ine(t,e){var r={},n={},a;(t===null||typeof t!="object")&&(t={}),(e===null||typeof e!="object")&&(e={});for(a in e)a in t?r[a]=Lp(t[a],e[a]):n[a]=e[a];return function(i){for(a in r)n[a]=r[a](i);return n}}var sne=A(()=>{bE()});function EGe(t){return function(){return t}}function CGe(t){return function(e){return t(e)+""}}function o4(t,e){var r=QN.lastIndex=ZN.lastIndex=0,n,a,i,s=-1,o=[],l=[];for(t=t+"",e=e+"";(n=QN.exec(t))&&(a=ZN.exec(e));)(i=a.index)>r&&(i=e.slice(r,i),o[s]?o[s]+=i:o[++s]=i),(n=n[0])===(a=a[0])?o[s]?o[s]+=a:o[++s]=a:(o[++s]=null,l.push({i:s,x:Mi(n,a)})),r=ZN.lastIndex;return r{s4();QN=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,ZN=new RegExp(QN.source,"g")});function Lp(t,e){var r=typeof e,n;return e==null||r==="boolean"?m1(e):(r==="number"?Mi:r==="string"?(n=jl(e))?(e=n,Ap):o4:e instanceof jl?Ap:e instanceof Date?nne:Jre(e)?Qre:Array.isArray(e)?tne:typeof e.valueOf!="function"&&typeof e.toString!="function"||isNaN(e)?ine:Mi)(t,e)}var bE=A(()=>{p1();KN();rne();ane();s4();sne();JN();XN();ene()});function eM(t,e){return t=+t,e=+e,function(r){return Math.round(t*(1-r)+e*r)}}var one=A(()=>{});function tM(t,e,r,n,a,i){var s,o,l;return(s=Math.sqrt(t*t+e*e))&&(t/=s,e/=s),(l=t*r+e*n)&&(r-=t*l,n-=e*l),(o=Math.sqrt(r*r+n*n))&&(r/=o,n/=o,l/=o),t*n{lne=180/Math.PI,wE={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1}});function cne(t){let e=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(t+"");return e.isIdentity?wE:tM(e.a,e.b,e.c,e.d,e.e,e.f)}function hne(t){return t==null?wE:(kE||(kE=document.createElementNS("http://www.w3.org/2000/svg","g")),kE.setAttribute("transform",t),(t=kE.transform.baseVal.consolidate())?(t=t.matrix,tM(t.a,t.b,t.c,t.d,t.e,t.f)):wE)}var kE,fne=A(()=>{une()});function dne(t,e,r,n){function a(u){return u.length?u.pop()+" ":""}function i(u,h,f,d,p,m){if(u!==f||h!==d){var g=p.push("translate(",null,e,null,r);m.push({i:g-4,x:Mi(u,f)},{i:g-2,x:Mi(h,d)})}else(f||d)&&p.push("translate("+f+e+d+r)}function s(u,h,f,d){u!==h?(u-h>180?h+=360:h-u>180&&(u+=360),d.push({i:f.push(a(f)+"rotate(",null,n)-2,x:Mi(u,h)})):h&&f.push(a(f)+"rotate("+h+n)}function o(u,h,f,d){u!==h?d.push({i:f.push(a(f)+"skewX(",null,n)-2,x:Mi(u,h)}):h&&f.push(a(f)+"skewX("+h+n)}function l(u,h,f,d,p,m){if(u!==f||h!==d){var g=p.push(a(p)+"scale(",null,",",null,")");m.push({i:g-4,x:Mi(u,f)},{i:g-2,x:Mi(h,d)})}else(f!==1||d!==1)&&p.push(a(p)+"scale("+f+","+d+")")}return function(u,h){var f=[],d=[];return u=t(u),h=t(h),i(u.translateX,u.translateY,h.translateX,h.translateY,f,d),s(u.rotate,h.rotate,f,d),o(u.skewX,h.skewX,f,d),l(u.scaleX,u.scaleY,h.scaleX,h.scaleY,f,d),u=h=null,function(p){for(var m=-1,g=d.length,v;++m{s4();fne();rM=dne(cne,"px, ","px)","deg)"),nM=dne(hne,", ",")",")")});function mne(t){return function(e,r){var n=t((e=i4(e)).h,(r=i4(r)).h),a=Sh(e.c,r.c),i=Sh(e.l,r.l),s=Sh(e.opacity,r.opacity);return function(o){return e.h=n(o),e.c=a(o),e.l=i(o),e.opacity=s(o),e+""}}}var aM,SGe,gne=A(()=>{p1();jN();aM=mne(jre),SGe=mne(Sh)});var g1=A(()=>{bE();s4();one();JN();pne();KN();gne()});function d4(){return Rp||(xne(_Ge),Rp=h4.now()+CE)}function _Ge(){Rp=0}function f4(){this._call=this._time=this._next=null}function SE(t,e,r){var n=new f4;return n.restart(t,e,r),n}function bne(){d4(),++v1;for(var t=TE,e;t;)(e=Rp-t._time)>=0&&t._call.call(void 0,e),t=t._next;--v1}function vne(){Rp=(EE=h4.now())+CE,v1=u4=0;try{bne()}finally{v1=0,LGe(),Rp=0}}function AGe(){var t=h4.now(),e=t-EE;e>yne&&(CE-=e,EE=t)}function LGe(){for(var t,e=TE,r,n=1/0;e;)e._call?(n>e._time&&(n=e._time),t=e,e=e._next):(r=e._next,e._next=null,e=t?t._next=r:TE=r);c4=t,iM(n)}function iM(t){if(!v1){u4&&(u4=clearTimeout(u4));var e=t-Rp;e>24?(t<1/0&&(u4=setTimeout(vne,t-h4.now()-CE)),l4&&(l4=clearInterval(l4))):(l4||(EE=h4.now(),l4=setInterval(AGe,yne)),v1=1,xne(vne))}}var v1,u4,l4,yne,TE,c4,EE,Rp,CE,h4,xne,sM=A(()=>{v1=0,u4=0,l4=0,yne=1e3,EE=0,Rp=0,CE=0,h4=typeof performance=="object"&&performance.now?performance:Date,xne=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};f4.prototype=SE.prototype={constructor:f4,restart:function(t,e,r){if(typeof t!="function")throw new TypeError("callback is not a function");r=(r==null?d4():+r)+(e==null?0:+e),!this._next&&c4!==this&&(c4?c4._next=this:TE=this,c4=this),this._call=t,this._time=r,iM()},stop:function(){this._call&&(this._call=null,this._time=1/0,iM())}}});function _E(t,e,r){var n=new f4;return e=e==null?0:+e,n.restart(a=>{n.stop(),t(a+e)},e,r),n}var wne=A(()=>{sM()});var AE=A(()=>{sM();wne()});function Yf(t,e,r,n,a,i){var s=t.__transition;if(!s)t.__transition={};else if(r in s)return;DGe(t,r,{name:e,index:n,group:a,on:RGe,tween:IGe,time:i.time,delay:i.delay,duration:i.duration,ease:i.ease,timer:null,state:Ene})}function m4(t,e){var r=Ya(t,e);if(r.state>Ene)throw new Error("too late; already scheduled");return r}function Oi(t,e){var r=Ya(t,e);if(r.state>LE)throw new Error("too late; already running");return r}function Ya(t,e){var r=t.__transition;if(!r||!(r=r[e]))throw new Error("transition not found");return r}function DGe(t,e,r){var n=t.__transition,a;n[e]=r,r.timer=SE(i,0,r.time);function i(u){r.state=kne,r.timer.restart(s,r.delay,r.time),r.delay<=u&&s(u-r.delay)}function s(u){var h,f,d,p;if(r.state!==kne)return l();for(h in n)if(p=n[h],p.name===r.name){if(p.state===LE)return _E(s);p.state===Tne?(p.state=p4,p.timer.stop(),p.on.call("interrupt",t,t.__data__,p.index,p.group),delete n[h]):+h{CN();AE();RGe=EN("start","end","cancel","interrupt"),IGe=[],Ene=0,kne=1,RE=2,LE=3,Tne=4,IE=5,p4=6});function DE(t,e){var r=t.__transition,n,a,i=!0,s;if(r){e=e==null?null:e+"";for(s in r){if((n=r[s]).name!==e){i=!1;continue}a=n.state>RE&&n.state{ro()});function Sne(t){return this.each(function(){DE(this,t)})}var _ne=A(()=>{Cne()});function NGe(t,e){var r,n;return function(){var a=Oi(this,t),i=a.tween;if(i!==r){n=r=i;for(var s=0,o=n.length;s{ro()});function NE(t,e){var r;return(typeof e=="number"?Mi:e instanceof jl?Ap:(r=jl(e))?(e=r,Ap):o4)(t,e)}var oM=A(()=>{p1();g1()});function OGe(t){return function(){this.removeAttribute(t)}}function PGe(t){return function(){this.removeAttributeNS(t.space,t.local)}}function BGe(t,e,r){var n,a=r+"",i;return function(){var s=this.getAttribute(t);return s===a?null:s===n?i:i=e(n=s,r)}}function FGe(t,e,r){var n,a=r+"",i;return function(){var s=this.getAttributeNS(t.space,t.local);return s===a?null:s===n?i:i=e(n=s,r)}}function zGe(t,e,r){var n,a,i;return function(){var s,o=r(this),l;return o==null?void this.removeAttribute(t):(s=this.getAttribute(t),l=o+"",s===l?null:s===n&&l===a?i:(a=l,i=e(n=s,o)))}}function $Ge(t,e,r){var n,a,i;return function(){var s,o=r(this),l;return o==null?void this.removeAttributeNS(t.space,t.local):(s=this.getAttributeNS(t.space,t.local),l=o+"",s===l?null:s===n&&l===a?i:(a=l,i=e(n=s,o)))}}function Lne(t,e){var r=Th(t),n=r==="transform"?nM:NE;return this.attrTween(t,typeof e=="function"?(r.local?$Ge:zGe)(r,n,y1(this,"attr."+t,e)):e==null?(r.local?PGe:OGe)(r):(r.local?FGe:BGe)(r,n,e))}var Rne=A(()=>{g1();Yl();g4();oM()});function GGe(t,e){return function(r){this.setAttribute(t,e.call(this,r))}}function UGe(t,e){return function(r){this.setAttributeNS(t.space,t.local,e.call(this,r))}}function qGe(t,e){var r,n;function a(){var i=e.apply(this,arguments);return i!==n&&(r=(n=i)&&UGe(t,i)),r}return a._value=e,a}function VGe(t,e){var r,n;function a(){var i=e.apply(this,arguments);return i!==n&&(r=(n=i)&&GGe(t,i)),r}return a._value=e,a}function Ine(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 n=Th(t);return this.tween(r,(n.local?qGe:VGe)(n,e))}var Dne=A(()=>{Yl()});function HGe(t,e){return function(){m4(this,t).delay=+e.apply(this,arguments)}}function WGe(t,e){return e=+e,function(){m4(this,t).delay=e}}function Nne(t){var e=this._id;return arguments.length?this.each((typeof t=="function"?HGe:WGe)(e,t)):Ya(this.node(),e).delay}var Mne=A(()=>{ro()});function YGe(t,e){return function(){Oi(this,t).duration=+e.apply(this,arguments)}}function XGe(t,e){return e=+e,function(){Oi(this,t).duration=e}}function One(t){var e=this._id;return arguments.length?this.each((typeof t=="function"?YGe:XGe)(e,t)):Ya(this.node(),e).duration}var Pne=A(()=>{ro()});function jGe(t,e){if(typeof e!="function")throw new Error;return function(){Oi(this,t).ease=e}}function Bne(t){var e=this._id;return arguments.length?this.each(jGe(e,t)):Ya(this.node(),e).ease}var Fne=A(()=>{ro()});function KGe(t,e){return function(){var r=e.apply(this,arguments);if(typeof r!="function")throw new Error;Oi(this,t).ease=r}}function zne(t){if(typeof t!="function")throw new Error;return this.each(KGe(this._id,t))}var $ne=A(()=>{ro()});function Gne(t){typeof t!="function"&&(t=e4(t));for(var e=this._groups,r=e.length,n=new Array(r),a=0;a{Yl();Ip()});function qne(t){if(t._id!==this._id)throw new Error;for(var e=this._groups,r=t._groups,n=e.length,a=r.length,i=Math.min(n,a),s=new Array(n),o=0;o{Ip()});function ZGe(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 QGe(t,e,r){var n,a,i=ZGe(e)?m4:Oi;return function(){var s=i(this,t),o=s.on;o!==n&&(a=(n=o).copy()).on(e,r),s.on=a}}function Hne(t,e){var r=this._id;return arguments.length<2?Ya(this.node(),r).on.on(t):this.each(QGe(r,t,e))}var Wne=A(()=>{ro()});function JGe(t){return function(){var e=this.parentNode;for(var r in this.__transition)if(+r!==t)return;e&&e.removeChild(this)}}function Yne(){return this.on("end.remove",JGe(this._id))}var Xne=A(()=>{});function jne(t){var e=this._name,r=this._id;typeof t!="function"&&(t=Ep(t));for(var n=this._groups,a=n.length,i=new Array(a),s=0;s{Yl();Ip();ro()});function Zne(t){var e=this._name,r=this._id;typeof t!="function"&&(t=Jb(t));for(var n=this._groups,a=n.length,i=[],s=[],o=0;o{Yl();Ip();ro()});function Jne(){return new eUe(this._groups,this._parents)}var eUe,eae=A(()=>{Yl();eUe=Eh.prototype.constructor});function tUe(t,e){var r,n,a;return function(){var i=Hf(this,t),s=(this.style.removeProperty(t),Hf(this,t));return i===s?null:i===r&&s===n?a:a=e(r=i,n=s)}}function tae(t){return function(){this.style.removeProperty(t)}}function rUe(t,e,r){var n,a=r+"",i;return function(){var s=Hf(this,t);return s===a?null:s===n?i:i=e(n=s,r)}}function nUe(t,e,r){var n,a,i;return function(){var s=Hf(this,t),o=r(this),l=o+"";return o==null&&(l=o=(this.style.removeProperty(t),Hf(this,t))),s===l?null:s===n&&l===a?i:(a=l,i=e(n=s,o))}}function aUe(t,e){var r,n,a,i="style."+e,s="end."+i,o;return function(){var l=Oi(this,t),u=l.on,h=l.value[i]==null?o||(o=tae(e)):void 0;(u!==r||a!==h)&&(n=(r=u).copy()).on(s,a=h),l.on=n}}function rae(t,e,r){var n=(t+="")=="transform"?rM:NE;return e==null?this.styleTween(t,tUe(t,n)).on("end.style."+t,tae(t)):typeof e=="function"?this.styleTween(t,nUe(t,n,y1(this,"style."+t,e))).each(aUe(this._id,t)):this.styleTween(t,rUe(t,n,e),r).on("end.style."+t,null)}var nae=A(()=>{g1();Yl();ro();g4();oM()});function iUe(t,e,r){return function(n){this.style.setProperty(t,e.call(this,n),r)}}function sUe(t,e,r){var n,a;function i(){var s=e.apply(this,arguments);return s!==a&&(n=(a=s)&&iUe(t,s,r)),n}return i._value=e,i}function aae(t,e,r){var n="style."+(t+="");if(arguments.length<2)return(n=this.tween(n))&&n._value;if(e==null)return this.tween(n,null);if(typeof e!="function")throw new Error;return this.tween(n,sUe(t,e,r??""))}var iae=A(()=>{});function oUe(t){return function(){this.textContent=t}}function lUe(t){return function(){var e=t(this);this.textContent=e??""}}function sae(t){return this.tween("text",typeof t=="function"?lUe(y1(this,"text",t)):oUe(t==null?"":t+""))}var oae=A(()=>{g4()});function uUe(t){return function(e){this.textContent=t.call(this,e)}}function cUe(t){var e,r;function n(){var a=t.apply(this,arguments);return a!==r&&(e=(r=a)&&uUe(a)),e}return n._value=t,n}function lae(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,cUe(t))}var uae=A(()=>{});function cae(){for(var t=this._name,e=this._id,r=ME(),n=this._groups,a=n.length,i=0;i{Ip();ro()});function fae(){var t,e,r=this,n=r._id,a=r.size();return new Promise(function(i,s){var o={value:s},l={value:function(){--a===0&&i()}};r.each(function(){var u=Oi(this,n),h=u.on;h!==t&&(e=(t=h).copy(),e._.cancel.push(o),e._.interrupt.push(o),e._.end.push(l)),u.on=e}),a===0&&i()})}var dae=A(()=>{ro()});function Ts(t,e,r,n){this._groups=t,this._parents=e,this._name=r,this._id=n}function pae(t){return Eh().transition(t)}function ME(){return++hUe}var hUe,_h,Ip=A(()=>{Yl();Rne();Dne();Mne();Pne();Fne();$ne();Une();Vne();Wne();Xne();Kne();Qne();eae();nae();iae();oae();uae();hae();g4();dae();hUe=0;_h=Eh.prototype;Ts.prototype=pae.prototype={constructor:Ts,select:jne,selectAll:Zne,selectChild:_h.selectChild,selectChildren:_h.selectChildren,filter:Gne,merge:qne,selection:Jne,transition:cae,call:_h.call,nodes:_h.nodes,node:_h.node,size:_h.size,empty:_h.empty,each:_h.each,on:Hne,attr:Lne,attrTween:Ine,style:rae,styleTween:aae,text:sae,textTween:lae,remove:Yne,tween:Ane,delay:Nne,duration:One,ease:Bne,easeVarying:zne,end:fae,[Symbol.iterator]:_h[Symbol.iterator]}});function OE(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}var mae=A(()=>{});var lM=A(()=>{mae()});function dUe(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 gae(t){var e,r;t instanceof Ts?(e=t._id,t=t._name):(e=ME(),(r=fUe).time=d4(),t=t==null?null:t+"");for(var n=this._groups,a=n.length,i=0;i{Ip();ro();lM();AE();fUe={time:null,delay:0,duration:250,ease:OE}});var yae=A(()=>{Yl();_ne();vae();Eh.prototype.interrupt=Sne;Eh.prototype.transition=gae});var PE=A(()=>{yae()});var xae=A(()=>{});var bae=A(()=>{});var wae=A(()=>{});function kae(t){return[+t[0],+t[1]]}function pUe(t){return[kae(t[0]),kae(t[1])]}function uM(t){return{type:t}}var O$t,P$t,B$t,F$t,z$t,$$t,Tae=A(()=>{PE();xae();bae();wae();({abs:O$t,max:P$t,min:B$t}=Math);F$t={name:"x",handles:["w","e"].map(uM),input:function(t,e){return t==null?null:[[+t[0],e[0][1]],[+t[1],e[1][1]]]},output:function(t){return t&&[t[0][0],t[1][0]]}},z$t={name:"y",handles:["n","s"].map(uM),input:function(t,e){return t==null?null:[[e[0][0],+t[0]],[e[1][0],+t[1]]]},output:function(t){return t&&[t[0][1],t[1][1]]}},$$t={name:"xy",handles:["n","w","e","s","nw","ne","sw","se"].map(uM),input:function(t){return t==null?null:pUe(t)},output:function(t){return t}}});var Eae=A(()=>{Tae()});function Cae(t){this._+=t[0];for(let e=1,r=t.length;e=0))throw new Error(`invalid digits: ${t}`);if(e>15)return Cae;let r=10**e;return function(n){this._+=n[0];for(let a=1,i=n.length;a{cM=Math.PI,hM=2*cM,Dp=1e-6,mUe=hM-Dp;Np=class{constructor(e){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=e==null?Cae:gUe(e)}moveTo(e,r){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+r}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(e,r){this._append`L${this._x1=+e},${this._y1=+r}`}quadraticCurveTo(e,r,n,a){this._append`Q${+e},${+r},${this._x1=+n},${this._y1=+a}`}bezierCurveTo(e,r,n,a,i,s){this._append`C${+e},${+r},${+n},${+a},${this._x1=+i},${this._y1=+s}`}arcTo(e,r,n,a,i){if(e=+e,r=+r,n=+n,a=+a,i=+i,i<0)throw new Error(`negative radius: ${i}`);let s=this._x1,o=this._y1,l=n-e,u=a-r,h=s-e,f=o-r,d=h*h+f*f;if(this._x1===null)this._append`M${this._x1=e},${this._y1=r}`;else if(d>Dp)if(!(Math.abs(f*l-u*h)>Dp)||!i)this._append`L${this._x1=e},${this._y1=r}`;else{let p=n-s,m=a-o,g=l*l+u*u,v=p*p+m*m,y=Math.sqrt(g),b=Math.sqrt(d),w=i*Math.tan((cM-Math.acos((g+d-v)/(2*y*b)))/2),C=w/b,k=w/y;Math.abs(C-1)>Dp&&this._append`L${e+C*h},${r+C*f}`,this._append`A${i},${i},0,0,${+(f*p>h*m)},${this._x1=e+k*l},${this._y1=r+k*u}`}}arc(e,r,n,a,i,s){if(e=+e,r=+r,n=+n,s=!!s,n<0)throw new Error(`negative radius: ${n}`);let o=n*Math.cos(a),l=n*Math.sin(a),u=e+o,h=r+l,f=1^s,d=s?a-i:i-a;this._x1===null?this._append`M${u},${h}`:(Math.abs(this._x1-u)>Dp||Math.abs(this._y1-h)>Dp)&&this._append`L${u},${h}`,n&&(d<0&&(d=d%hM+hM),d>mUe?this._append`A${n},${n},0,1,${f},${e-o},${r-l}A${n},${n},0,1,${f},${this._x1=u},${this._y1=h}`:d>Dp&&this._append`A${n},${n},0,${+(d>=cM)},${f},${this._x1=e+n*Math.cos(i)},${this._y1=r+n*Math.sin(i)}`)}rect(e,r,n,a){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+r}h${n=+n}v${+a}h${-n}Z`}toString(){return this._}};Sae.prototype=Np.prototype});var fM=A(()=>{_ae()});var Aae=A(()=>{});var Lae=A(()=>{});var Rae=A(()=>{});var Iae=A(()=>{});var Dae=A(()=>{});var Nae=A(()=>{});var Mae=A(()=>{});function Oae(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)}function Mp(t,e){if(!isFinite(t)||t===0)return null;var r=(t=e?t.toExponential(e-1):t.toExponential()).indexOf("e"),n=t.slice(0,r);return[n.length>1?n[0]+n.slice(2):n,+t.slice(r+1)]}var v4=A(()=>{});function Ku(t){return t=Mp(Math.abs(t)),t?t[1]:NaN}var y4=A(()=>{v4()});function Pae(t,e){return function(r,n){for(var a=r.length,i=[],s=0,o=t[0],l=0;a>0&&o>0&&(l+o+1>n&&(o=Math.max(1,n-l)),i.push(r.substring(a-=o,a+o)),!((l+=o+1)>n));)o=t[s=(s+1)%t.length];return i.reverse().join(e)}}var Bae=A(()=>{});function Fae(t){return function(e){return e.replace(/[0-9]/g,function(r){return t[+r]})}}var zae=A(()=>{});function Xf(t){if(!(e=vUe.exec(t)))throw new Error("invalid format: "+t);var e;return new BE({fill:e[1],align:e[2],sign:e[3],symbol:e[4],zero:e[5],width:e[6],comma:e[7],precision:e[8]&&e[8].slice(1),trim:e[9],type:e[10]})}function BE(t){this.fill=t.fill===void 0?" ":t.fill+"",this.align=t.align===void 0?">":t.align+"",this.sign=t.sign===void 0?"-":t.sign+"",this.symbol=t.symbol===void 0?"":t.symbol+"",this.zero=!!t.zero,this.width=t.width===void 0?void 0:+t.width,this.comma=!!t.comma,this.precision=t.precision===void 0?void 0:+t.precision,this.trim=!!t.trim,this.type=t.type===void 0?"":t.type+""}var vUe,dM=A(()=>{vUe=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;Xf.prototype=BE.prototype;BE.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type}});function $ae(t){e:for(var e=t.length,r=1,n=-1,a;r0&&(n=0);break}return n>0?t.slice(0,n)+t.slice(a+1):t}var Gae=A(()=>{});function Uae(t,e){var r=Mp(t,e);if(!r)return x4=void 0,t.toPrecision(e);var n=r[0],a=r[1],i=a-(x4=Math.max(-8,Math.min(8,Math.floor(a/3)))*3)+1,s=n.length;return i===s?n:i>s?n+new Array(i-s+1).join("0"):i>0?n.slice(0,i)+"."+n.slice(i):"0."+new Array(1-i).join("0")+Mp(t,Math.max(0,e+i-1))[0]}var x4,pM=A(()=>{v4()});function mM(t,e){var r=Mp(t,e);if(!r)return t+"";var n=r[0],a=r[1];return a<0?"0."+new Array(-a).join("0")+n:n.length>a+1?n.slice(0,a+1)+"."+n.slice(a+1):n+new Array(a-n.length+2).join("0")}var qae=A(()=>{v4()});var gM,Vae=A(()=>{v4();pM();qae();gM={"%":(t,e)=>(t*100).toFixed(e),b:t=>Math.round(t).toString(2),c:t=>t+"",d:Oae,e:(t,e)=>t.toExponential(e),f:(t,e)=>t.toFixed(e),g:(t,e)=>t.toPrecision(e),o:t=>Math.round(t).toString(8),p:(t,e)=>mM(t*100,e),r:mM,s:Uae,X:t=>Math.round(t).toString(16).toUpperCase(),x:t=>Math.round(t).toString(16)}});function vM(t){return t}var Hae=A(()=>{});function Xae(t){var e=t.grouping===void 0||t.thousands===void 0?vM:Pae(Wae.call(t.grouping,Number),t.thousands+""),r=t.currency===void 0?"":t.currency[0]+"",n=t.currency===void 0?"":t.currency[1]+"",a=t.decimal===void 0?".":t.decimal+"",i=t.numerals===void 0?vM:Fae(Wae.call(t.numerals,String)),s=t.percent===void 0?"%":t.percent+"",o=t.minus===void 0?"\u2212":t.minus+"",l=t.nan===void 0?"NaN":t.nan+"";function u(f,d){f=Xf(f);var p=f.fill,m=f.align,g=f.sign,v=f.symbol,y=f.zero,b=f.width,w=f.comma,C=f.precision,k=f.trim,E=f.type;E==="n"?(w=!0,E="g"):gM[E]||(C===void 0&&(C=12),k=!0,E="g"),(y||p==="0"&&m==="=")&&(y=!0,p="0",m="=");var _=(d&&d.prefix!==void 0?d.prefix:"")+(v==="$"?r:v==="#"&&/[boxX]/.test(E)?"0"+E.toLowerCase():""),S=(v==="$"?n:/[%p]/.test(E)?s:"")+(d&&d.suffix!==void 0?d.suffix:""),L=gM[E],M=/[defgprs%]/.test(E);C=C===void 0?6:/[gprs]/.test(E)?Math.max(1,Math.min(21,C)):Math.max(0,Math.min(20,C));function D(T){var I=_,N=S,O,R,P;if(E==="c")N=L(T)+N,T="";else{T=+T;var B=T<0||1/T<0;if(T=isNaN(T)?l:L(Math.abs(T),C),k&&(T=$ae(T)),B&&+T==0&&g!=="+"&&(B=!1),I=(B?g==="("?g:o:g==="-"||g==="("?"":g)+I,N=(E==="s"&&!isNaN(T)&&x4!==void 0?Yae[8+x4/3]:"")+N+(B&&g==="("?")":""),M){for(O=-1,R=T.length;++OP||P>57){N=(P===46?a+T.slice(O+1):T.slice(O))+N,T=T.slice(0,O);break}}}w&&!y&&(T=e(T,1/0));var F=I.length+T.length+N.length,G=F>1)+I+T+N+G.slice(F);break;default:T=G+I+T+N;break}return i(T)}return D.toString=function(){return f+""},D}function h(f,d){var p=Math.max(-8,Math.min(8,Math.floor(Ku(d)/3)))*3,m=Math.pow(10,-p),g=u((f=Xf(f),f.type="f",f),{suffix:Yae[8+p/3]});return function(v){return g(m*v)}}return{format:u,formatPrefix:h}}var Wae,Yae,jae=A(()=>{y4();Bae();zae();dM();Gae();Vae();pM();Hae();Wae=Array.prototype.map,Yae=["y","z","a","f","p","n","\xB5","m","","k","M","G","T","P","E","Z","Y"]});function yM(t){return FE=Xae(t),zE=FE.format,$E=FE.formatPrefix,FE}var FE,zE,$E,Kae=A(()=>{jae();yM({thousands:",",grouping:[3],currency:["$",""]})});function xM(t){return Math.max(0,-Ku(Math.abs(t)))}var Zae=A(()=>{y4()});function bM(t,e){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(Ku(e)/3)))*3-Ku(Math.abs(t)))}var Qae=A(()=>{y4()});function wM(t,e){return t=Math.abs(t),e=Math.abs(e)-t,Math.max(0,Ku(e)-Ku(t))+1}var Jae=A(()=>{y4()});var kM=A(()=>{Kae();dM();Zae();Qae();Jae()});var eie=A(()=>{});var tie=A(()=>{});var rie=A(()=>{});var nie=A(()=>{});function jf(t,e){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(e).domain(t);break}return this}var b4=A(()=>{});function Ah(){var t=new l1,e=[],r=[],n=TM;function a(i){let s=t.get(i);if(s===void 0){if(n!==TM)return n;t.set(i,s=e.push(i)-1)}return r[s%r.length]}return a.domain=function(i){if(!arguments.length)return e.slice();e=[],t=new l1;for(let s of i)t.has(s)||t.set(s,e.push(s)-1);return a},a.range=function(i){return arguments.length?(r=Array.from(i),a):r.slice()},a.unknown=function(i){return arguments.length?(n=i,a):n},a.copy=function(){return Ah(e,r).unknown(n)},jf.apply(a,arguments),a}var TM,EM=A(()=>{Vf();b4();TM=Symbol("implicit")});function x1(){var t=Ah().unknown(void 0),e=t.domain,r=t.range,n=0,a=1,i,s,o=!1,l=0,u=0,h=.5;delete t.unknown;function f(){var d=e().length,p=a{Vf();b4();EM()});function CM(t){return function(){return t}}var iie=A(()=>{});function SM(t){return+t}var sie=A(()=>{});function b1(t){return t}function _M(t,e){return(e-=t=+t)?function(r){return(r-t)/e}:CM(isNaN(e)?NaN:.5)}function yUe(t,e){var r;return t>e&&(r=t,t=e,e=r),function(n){return Math.max(t,Math.min(e,n))}}function xUe(t,e,r){var n=t[0],a=t[1],i=e[0],s=e[1];return a2?bUe:xUe,l=u=null,f}function f(d){return d==null||isNaN(d=+d)?i:(l||(l=o(t.map(n),e,r)))(n(s(d)))}return f.invert=function(d){return s(a((u||(u=o(e,t.map(n),Mi)))(d)))},f.domain=function(d){return arguments.length?(t=Array.from(d,SM),h()):t.slice()},f.range=function(d){return arguments.length?(e=Array.from(d),h()):e.slice()},f.rangeRound=function(d){return e=Array.from(d),r=eM,h()},f.clamp=function(d){return arguments.length?(s=d?!0:b1,h()):s!==b1},f.interpolate=function(d){return arguments.length?(r=d,h()):r},f.unknown=function(d){return arguments.length?(i=d,f):i},function(d,p){return n=d,a=p,h()}}function w4(){return wUe()(b1,b1)}var oie,AM=A(()=>{Vf();g1();iie();sie();oie=[0,1]});function LM(t,e,r,n){var a=u1(t,e,r),i;switch(n=Xf(n??",f"),n.type){case"s":{var s=Math.max(Math.abs(t),Math.abs(e));return n.precision==null&&!isNaN(i=bM(a,s))&&(n.precision=i),$E(n,s)}case"":case"e":case"g":case"p":case"r":{n.precision==null&&!isNaN(i=wM(a,Math.max(Math.abs(t),Math.abs(e))))&&(n.precision=i-(n.type==="e"));break}case"f":case"%":{n.precision==null&&!isNaN(i=xM(a))&&(n.precision=i-(n.type==="%")*2);break}}return zE(n)}var lie=A(()=>{Vf();kM()});function kUe(t){var e=t.domain;return t.ticks=function(r){var n=e();return tE(n[0],n[n.length-1],r??10)},t.tickFormat=function(r,n){var a=e();return LM(a[0],a[a.length-1],r??10,n)},t.nice=function(r){r==null&&(r=10);var n=e(),a=0,i=n.length-1,s=n[a],o=n[i],l,u,h=10;for(o0;){if(u=Qb(s,o,r),u===l)return n[a]=s,n[i]=o,e(n);if(u>0)s=Math.floor(s/u)*u,o=Math.ceil(o/u)*u;else if(u<0)s=Math.ceil(s*u)/u,o=Math.floor(o*u)/u;else break;l=u}return t},t}function Kl(){var t=w4();return t.copy=function(){return GE(t,Kl())},jf.apply(t,arguments),kUe(t)}var uie=A(()=>{Vf();AM();b4();lie()});function RM(t,e){t=t.slice();var r=0,n=t.length-1,a=t[r],i=t[n],s;return i{});function vn(t,e,r,n){function a(i){return t(i=arguments.length===0?new Date:new Date(+i)),i}return a.floor=i=>(t(i=new Date(+i)),i),a.ceil=i=>(t(i=new Date(i-1)),e(i,1),t(i),i),a.round=i=>{let s=a(i),o=a.ceil(i);return i-s(e(i=new Date(+i),s==null?1:Math.floor(s)),i),a.range=(i,s,o)=>{let l=[];if(i=a.ceil(i),o=o==null?1:Math.floor(o),!(i0))return l;let u;do l.push(u=new Date(+i)),e(i,o),t(i);while(uvn(s=>{if(s>=s)for(;t(s),!i(s);)s.setTime(s-1)},(s,o)=>{if(s>=s)if(o<0)for(;++o<=0;)for(;e(s,-1),!i(s););else for(;--o>=0;)for(;e(s,1),!i(s););}),r&&(a.count=(i,s)=>(IM.setTime(+i),DM.setTime(+s),t(IM),t(DM),Math.floor(r(IM,DM))),a.every=i=>(i=Math.floor(i),!isFinite(i)||!(i>0)?null:i>1?a.filter(n?s=>n(s)%i===0:s=>a.count(0,s)%i===0):a)),a}var IM,DM,Lh=A(()=>{IM=new Date,DM=new Date});var Zu,hie,NM=A(()=>{Lh();Zu=vn(()=>{},(t,e)=>{t.setTime(+t+e)},(t,e)=>e-t);Zu.every=t=>(t=Math.floor(t),!isFinite(t)||!(t>0)?null:t>1?vn(e=>{e.setTime(Math.floor(e/t)*t)},(e,r)=>{e.setTime(+e+r*t)},(e,r)=>(r-e)/t):Zu);hie=Zu.range});var Oo,fie,MM=A(()=>{Lh();Oo=vn(t=>{t.setTime(t-t.getMilliseconds())},(t,e)=>{t.setTime(+t+e*1e3)},(t,e)=>(e-t)/1e3,t=>t.getUTCSeconds()),fie=Oo.range});var Rh,TUe,UE,EUe,OM=A(()=>{Lh();Rh=vn(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*1e3)},(t,e)=>{t.setTime(+t+e*6e4)},(t,e)=>(e-t)/6e4,t=>t.getMinutes()),TUe=Rh.range,UE=vn(t=>{t.setUTCSeconds(0,0)},(t,e)=>{t.setTime(+t+e*6e4)},(t,e)=>(e-t)/6e4,t=>t.getUTCMinutes()),EUe=UE.range});var Ih,CUe,qE,SUe,PM=A(()=>{Lh();Ih=vn(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*1e3-t.getMinutes()*6e4)},(t,e)=>{t.setTime(+t+e*36e5)},(t,e)=>(e-t)/36e5,t=>t.getHours()),CUe=Ih.range,qE=vn(t=>{t.setUTCMinutes(0,0,0)},(t,e)=>{t.setTime(+t+e*36e5)},(t,e)=>(e-t)/36e5,t=>t.getUTCHours()),SUe=qE.range});var ol,_Ue,T4,AUe,VE,LUe,BM=A(()=>{Lh();ol=vn(t=>t.setHours(0,0,0,0),(t,e)=>t.setDate(t.getDate()+e),(t,e)=>(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*6e4)/864e5,t=>t.getDate()-1),_Ue=ol.range,T4=vn(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/864e5,t=>t.getUTCDate()-1),AUe=T4.range,VE=vn(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/864e5,t=>Math.floor(t/864e5)),LUe=VE.range});function Bp(t){return vn(e=>{e.setDate(e.getDate()-(e.getDay()+7-t)%7),e.setHours(0,0,0,0)},(e,r)=>{e.setDate(e.getDate()+r*7)},(e,r)=>(r-e-(r.getTimezoneOffset()-e.getTimezoneOffset())*6e4)/6048e5)}function Fp(t){return vn(e=>{e.setUTCDate(e.getUTCDate()-(e.getUTCDay()+7-t)%7),e.setUTCHours(0,0,0,0)},(e,r)=>{e.setUTCDate(e.getUTCDate()+r*7)},(e,r)=>(r-e)/6048e5)}var Zl,Kf,HE,WE,Ju,YE,XE,pie,RUe,IUe,DUe,NUe,MUe,OUe,zp,w1,mie,gie,Zf,vie,yie,xie,PUe,BUe,FUe,zUe,$Ue,GUe,FM=A(()=>{Lh();Zl=Bp(0),Kf=Bp(1),HE=Bp(2),WE=Bp(3),Ju=Bp(4),YE=Bp(5),XE=Bp(6),pie=Zl.range,RUe=Kf.range,IUe=HE.range,DUe=WE.range,NUe=Ju.range,MUe=YE.range,OUe=XE.range;zp=Fp(0),w1=Fp(1),mie=Fp(2),gie=Fp(3),Zf=Fp(4),vie=Fp(5),yie=Fp(6),xie=zp.range,PUe=w1.range,BUe=mie.range,FUe=gie.range,zUe=Zf.range,$Ue=vie.range,GUe=yie.range});var Dh,UUe,jE,qUe,zM=A(()=>{Lh();Dh=vn(t=>{t.setDate(1),t.setHours(0,0,0,0)},(t,e)=>{t.setMonth(t.getMonth()+e)},(t,e)=>e.getMonth()-t.getMonth()+(e.getFullYear()-t.getFullYear())*12,t=>t.getMonth()),UUe=Dh.range,jE=vn(t=>{t.setUTCDate(1),t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCMonth(t.getUTCMonth()+e)},(t,e)=>e.getUTCMonth()-t.getUTCMonth()+(e.getUTCFullYear()-t.getUTCFullYear())*12,t=>t.getUTCMonth()),qUe=jE.range});var Po,VUe,Ql,HUe,$M=A(()=>{Lh();Po=vn(t=>{t.setMonth(0,1),t.setHours(0,0,0,0)},(t,e)=>{t.setFullYear(t.getFullYear()+e)},(t,e)=>e.getFullYear()-t.getFullYear(),t=>t.getFullYear());Po.every=t=>!isFinite(t=Math.floor(t))||!(t>0)?null:vn(e=>{e.setFullYear(Math.floor(e.getFullYear()/t)*t),e.setMonth(0,1),e.setHours(0,0,0,0)},(e,r)=>{e.setFullYear(e.getFullYear()+r*t)});VUe=Po.range,Ql=vn(t=>{t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCFullYear(t.getUTCFullYear()+e)},(t,e)=>e.getUTCFullYear()-t.getUTCFullYear(),t=>t.getUTCFullYear());Ql.every=t=>!isFinite(t=Math.floor(t))||!(t>0)?null:vn(e=>{e.setUTCFullYear(Math.floor(e.getUTCFullYear()/t)*t),e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,r)=>{e.setUTCFullYear(e.getUTCFullYear()+r*t)});HUe=Ql.range});function wie(t,e,r,n,a,i){let s=[[Oo,1,1e3],[Oo,5,5*1e3],[Oo,15,15*1e3],[Oo,30,30*1e3],[i,1,6e4],[i,5,5*6e4],[i,15,15*6e4],[i,30,30*6e4],[a,1,36e5],[a,3,3*36e5],[a,6,6*36e5],[a,12,12*36e5],[n,1,864e5],[n,2,2*864e5],[r,1,6048e5],[e,1,2592e6],[e,3,3*2592e6],[t,1,31536e6]];function o(u,h,f){let d=hv).right(s,d);if(p===s.length)return t.every(u1(u/31536e6,h/31536e6,f));if(p===0)return Zu.every(Math.max(u1(u,h,f),1));let[m,g]=s[d/s[p-1][2]{Vf();NM();MM();OM();PM();BM();FM();zM();$M();[YUe,XUe]=wie(Ql,jE,zp,VE,qE,UE),[GM,UM]=wie(Po,Dh,Zl,ol,Ih,Rh)});var KE=A(()=>{NM();MM();OM();PM();BM();FM();zM();$M();kie()});function qM(t){if(0<=t.y&&t.y<100){var e=new Date(-1,t.m,t.d,t.H,t.M,t.S,t.L);return e.setFullYear(t.y),e}return new Date(t.y,t.m,t.d,t.H,t.M,t.S,t.L)}function VM(t){if(0<=t.y&&t.y<100){var e=new Date(Date.UTC(-1,t.m,t.d,t.H,t.M,t.S,t.L));return e.setUTCFullYear(t.y),e}return new Date(Date.UTC(t.y,t.m,t.d,t.H,t.M,t.S,t.L))}function E4(t,e,r){return{y:t,m:e,d:r,H:0,M:0,S:0,L:0}}function HM(t){var e=t.dateTime,r=t.date,n=t.time,a=t.periods,i=t.days,s=t.shortDays,o=t.months,l=t.shortMonths,u=C4(a),h=S4(a),f=C4(i),d=S4(i),p=C4(s),m=S4(s),g=C4(o),v=S4(o),y=C4(l),b=S4(l),w={a:P,A:B,b:F,B:G,c:null,d:Aie,e:Aie,f:vqe,g:_qe,G:Lqe,H:pqe,I:mqe,j:gqe,L:Nie,m:yqe,M:xqe,p:z,q:H,Q:Iie,s:Die,S:bqe,u:wqe,U:kqe,V:Tqe,w:Eqe,W:Cqe,x:null,X:null,y:Sqe,Y:Aqe,Z:Rqe,"%":Rie},C={a:Q,A:Y,b:ie,B:se,c:null,d:Lie,e:Lie,f:Mqe,g:Vqe,G:Wqe,H:Iqe,I:Dqe,j:Nqe,L:Oie,m:Oqe,M:Pqe,p:oe,q:pe,Q:Iie,s:Die,S:Bqe,u:Fqe,U:zqe,V:$qe,w:Gqe,W:Uqe,x:null,X:null,y:qqe,Y:Hqe,Z:Yqe,"%":Rie},k={a:M,A:D,b:T,B:I,c:N,d:Sie,e:Sie,f:cqe,g:Cie,G:Eie,H:_ie,I:_ie,j:sqe,L:uqe,m:iqe,M:oqe,p:L,q:aqe,Q:fqe,s:dqe,S:lqe,u:JUe,U:eqe,V:tqe,w:QUe,W:rqe,x:O,X:R,y:Cie,Y:Eie,Z:nqe,"%":hqe};w.x=E(r,w),w.X=E(n,w),w.c=E(e,w),C.x=E(r,C),C.X=E(n,C),C.c=E(e,C);function E(J,j){return function(Z){var K=[],X=-1,ae=0,W=J.length,Se,ne,ee;for(Z instanceof Date||(Z=new Date(+Z));++X53)return null;"w"in K||(K.w=1),"Z"in K?(ae=VM(E4(K.y,0,1)),W=ae.getUTCDay(),ae=W>4||W===0?w1.ceil(ae):w1(ae),ae=T4.offset(ae,(K.V-1)*7),K.y=ae.getUTCFullYear(),K.m=ae.getUTCMonth(),K.d=ae.getUTCDate()+(K.w+6)%7):(ae=qM(E4(K.y,0,1)),W=ae.getDay(),ae=W>4||W===0?Kf.ceil(ae):Kf(ae),ae=ol.offset(ae,(K.V-1)*7),K.y=ae.getFullYear(),K.m=ae.getMonth(),K.d=ae.getDate()+(K.w+6)%7)}else("W"in K||"U"in K)&&("w"in K||(K.w="u"in K?K.u%7:"W"in K?1:0),W="Z"in K?VM(E4(K.y,0,1)).getUTCDay():qM(E4(K.y,0,1)).getDay(),K.m=0,K.d="W"in K?(K.w+6)%7+K.W*7-(W+5)%7:K.w+K.U*7-(W+6)%7);return"Z"in K?(K.H+=K.Z/100|0,K.M+=K.Z%100,VM(K)):qM(K)}}function S(J,j,Z,K){for(var X=0,ae=j.length,W=Z.length,Se,ne;X=W)return-1;if(Se=j.charCodeAt(X++),Se===37){if(Se=j.charAt(X++),ne=k[Se in Tie?j.charAt(X++):Se],!ne||(K=ne(J,Z,K))<0)return-1}else if(Se!=Z.charCodeAt(K++))return-1}return K}function L(J,j,Z){var K=u.exec(j.slice(Z));return K?(J.p=h.get(K[0].toLowerCase()),Z+K[0].length):-1}function M(J,j,Z){var K=p.exec(j.slice(Z));return K?(J.w=m.get(K[0].toLowerCase()),Z+K[0].length):-1}function D(J,j,Z){var K=f.exec(j.slice(Z));return K?(J.w=d.get(K[0].toLowerCase()),Z+K[0].length):-1}function T(J,j,Z){var K=y.exec(j.slice(Z));return K?(J.m=b.get(K[0].toLowerCase()),Z+K[0].length):-1}function I(J,j,Z){var K=g.exec(j.slice(Z));return K?(J.m=v.get(K[0].toLowerCase()),Z+K[0].length):-1}function N(J,j,Z){return S(J,e,j,Z)}function O(J,j,Z){return S(J,r,j,Z)}function R(J,j,Z){return S(J,n,j,Z)}function P(J){return s[J.getDay()]}function B(J){return i[J.getDay()]}function F(J){return l[J.getMonth()]}function G(J){return o[J.getMonth()]}function z(J){return a[+(J.getHours()>=12)]}function H(J){return 1+~~(J.getMonth()/3)}function Q(J){return s[J.getUTCDay()]}function Y(J){return i[J.getUTCDay()]}function ie(J){return l[J.getUTCMonth()]}function se(J){return o[J.getUTCMonth()]}function oe(J){return a[+(J.getUTCHours()>=12)]}function pe(J){return 1+~~(J.getUTCMonth()/3)}return{format:function(J){var j=E(J+="",w);return j.toString=function(){return J},j},parse:function(J){var j=_(J+="",!1);return j.toString=function(){return J},j},utcFormat:function(J){var j=E(J+="",C);return j.toString=function(){return J},j},utcParse:function(J){var j=_(J+="",!0);return j.toString=function(){return J},j}}}function Ur(t,e,r){var n=t<0?"-":"",a=(n?-t:t)+"",i=a.length;return n+(i[e.toLowerCase(),r]))}function QUe(t,e,r){var n=hi.exec(e.slice(r,r+1));return n?(t.w=+n[0],r+n[0].length):-1}function JUe(t,e,r){var n=hi.exec(e.slice(r,r+1));return n?(t.u=+n[0],r+n[0].length):-1}function eqe(t,e,r){var n=hi.exec(e.slice(r,r+2));return n?(t.U=+n[0],r+n[0].length):-1}function tqe(t,e,r){var n=hi.exec(e.slice(r,r+2));return n?(t.V=+n[0],r+n[0].length):-1}function rqe(t,e,r){var n=hi.exec(e.slice(r,r+2));return n?(t.W=+n[0],r+n[0].length):-1}function Eie(t,e,r){var n=hi.exec(e.slice(r,r+4));return n?(t.y=+n[0],r+n[0].length):-1}function Cie(t,e,r){var n=hi.exec(e.slice(r,r+2));return n?(t.y=+n[0]+(+n[0]>68?1900:2e3),r+n[0].length):-1}function nqe(t,e,r){var n=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(e.slice(r,r+6));return n?(t.Z=n[1]?0:-(n[2]+(n[3]||"00")),r+n[0].length):-1}function aqe(t,e,r){var n=hi.exec(e.slice(r,r+1));return n?(t.q=n[0]*3-3,r+n[0].length):-1}function iqe(t,e,r){var n=hi.exec(e.slice(r,r+2));return n?(t.m=n[0]-1,r+n[0].length):-1}function Sie(t,e,r){var n=hi.exec(e.slice(r,r+2));return n?(t.d=+n[0],r+n[0].length):-1}function sqe(t,e,r){var n=hi.exec(e.slice(r,r+3));return n?(t.m=0,t.d=+n[0],r+n[0].length):-1}function _ie(t,e,r){var n=hi.exec(e.slice(r,r+2));return n?(t.H=+n[0],r+n[0].length):-1}function oqe(t,e,r){var n=hi.exec(e.slice(r,r+2));return n?(t.M=+n[0],r+n[0].length):-1}function lqe(t,e,r){var n=hi.exec(e.slice(r,r+2));return n?(t.S=+n[0],r+n[0].length):-1}function uqe(t,e,r){var n=hi.exec(e.slice(r,r+3));return n?(t.L=+n[0],r+n[0].length):-1}function cqe(t,e,r){var n=hi.exec(e.slice(r,r+6));return n?(t.L=Math.floor(n[0]/1e3),r+n[0].length):-1}function hqe(t,e,r){var n=jUe.exec(e.slice(r,r+1));return n?r+n[0].length:-1}function fqe(t,e,r){var n=hi.exec(e.slice(r));return n?(t.Q=+n[0],r+n[0].length):-1}function dqe(t,e,r){var n=hi.exec(e.slice(r));return n?(t.s=+n[0],r+n[0].length):-1}function Aie(t,e){return Ur(t.getDate(),e,2)}function pqe(t,e){return Ur(t.getHours(),e,2)}function mqe(t,e){return Ur(t.getHours()%12||12,e,2)}function gqe(t,e){return Ur(1+ol.count(Po(t),t),e,3)}function Nie(t,e){return Ur(t.getMilliseconds(),e,3)}function vqe(t,e){return Nie(t,e)+"000"}function yqe(t,e){return Ur(t.getMonth()+1,e,2)}function xqe(t,e){return Ur(t.getMinutes(),e,2)}function bqe(t,e){return Ur(t.getSeconds(),e,2)}function wqe(t){var e=t.getDay();return e===0?7:e}function kqe(t,e){return Ur(Zl.count(Po(t)-1,t),e,2)}function Mie(t){var e=t.getDay();return e>=4||e===0?Ju(t):Ju.ceil(t)}function Tqe(t,e){return t=Mie(t),Ur(Ju.count(Po(t),t)+(Po(t).getDay()===4),e,2)}function Eqe(t){return t.getDay()}function Cqe(t,e){return Ur(Kf.count(Po(t)-1,t),e,2)}function Sqe(t,e){return Ur(t.getFullYear()%100,e,2)}function _qe(t,e){return t=Mie(t),Ur(t.getFullYear()%100,e,2)}function Aqe(t,e){return Ur(t.getFullYear()%1e4,e,4)}function Lqe(t,e){var r=t.getDay();return t=r>=4||r===0?Ju(t):Ju.ceil(t),Ur(t.getFullYear()%1e4,e,4)}function Rqe(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+Ur(e/60|0,"0",2)+Ur(e%60,"0",2)}function Lie(t,e){return Ur(t.getUTCDate(),e,2)}function Iqe(t,e){return Ur(t.getUTCHours(),e,2)}function Dqe(t,e){return Ur(t.getUTCHours()%12||12,e,2)}function Nqe(t,e){return Ur(1+T4.count(Ql(t),t),e,3)}function Oie(t,e){return Ur(t.getUTCMilliseconds(),e,3)}function Mqe(t,e){return Oie(t,e)+"000"}function Oqe(t,e){return Ur(t.getUTCMonth()+1,e,2)}function Pqe(t,e){return Ur(t.getUTCMinutes(),e,2)}function Bqe(t,e){return Ur(t.getUTCSeconds(),e,2)}function Fqe(t){var e=t.getUTCDay();return e===0?7:e}function zqe(t,e){return Ur(zp.count(Ql(t)-1,t),e,2)}function Pie(t){var e=t.getUTCDay();return e>=4||e===0?Zf(t):Zf.ceil(t)}function $qe(t,e){return t=Pie(t),Ur(Zf.count(Ql(t),t)+(Ql(t).getUTCDay()===4),e,2)}function Gqe(t){return t.getUTCDay()}function Uqe(t,e){return Ur(w1.count(Ql(t)-1,t),e,2)}function qqe(t,e){return Ur(t.getUTCFullYear()%100,e,2)}function Vqe(t,e){return t=Pie(t),Ur(t.getUTCFullYear()%100,e,2)}function Hqe(t,e){return Ur(t.getUTCFullYear()%1e4,e,4)}function Wqe(t,e){var r=t.getUTCDay();return t=r>=4||r===0?Zf(t):Zf.ceil(t),Ur(t.getUTCFullYear()%1e4,e,4)}function Yqe(){return"+0000"}function Rie(){return"%"}function Iie(t){return+t}function Die(t){return Math.floor(+t/1e3)}var Tie,hi,jUe,KUe,Bie=A(()=>{KE();Tie={"-":"",_:" ",0:"0"},hi=/^\s*\d+/,jUe=/^%/,KUe=/[\\^$*+?|[\]().{}]/g});function WM(t){return k1=HM(t),$p=k1.format,Fie=k1.parse,zie=k1.utcFormat,$ie=k1.utcParse,k1}var k1,$p,Fie,zie,$ie,Gie=A(()=>{Bie();WM({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]})});var YM=A(()=>{Gie()});function Xqe(t){return new Date(t)}function jqe(t){return t instanceof Date?+t:+new Date(+t)}function Uie(t,e,r,n,a,i,s,o,l,u){var h=w4(),f=h.invert,d=h.domain,p=u(".%L"),m=u(":%S"),g=u("%I:%M"),v=u("%I %p"),y=u("%a %d"),b=u("%b %d"),w=u("%B"),C=u("%Y");function k(E){return(l(E){KE();YM();AM();b4();cie()});var Vie=A(()=>{aie();uie();EM();qie()});function Hie(t){for(var e=t.length/6|0,r=new Array(e),n=0;n{});var XM,Yie=A(()=>{Wie();XM=Hie("4e79a7f28e2ce1575976b7b259a14fedc949af7aa1ff9da79c755fbab0ab")});var Xie=A(()=>{Yie()});function qn(t){return function(){return t}}var QE=A(()=>{});function Kie(t){return t>1?0:t<-1?T1:Math.acos(t)}function KM(t){return t>=1?_4:t<=-1?-_4:Math.asin(t)}var jM,Pi,Qf,jie,JE,Jl,Gp,fi,T1,_4,E1,eC=A(()=>{jM=Math.abs,Pi=Math.atan2,Qf=Math.cos,jie=Math.max,JE=Math.min,Jl=Math.sin,Gp=Math.sqrt,fi=1e-12,T1=Math.PI,_4=T1/2,E1=2*T1});function tC(t){let e=3;return t.digits=function(r){if(!arguments.length)return e;if(r==null)e=null;else{let n=Math.floor(r);if(!(n>=0))throw new RangeError(`invalid digits: ${r}`);e=n}return t},()=>new Np(e)}var ZM=A(()=>{fM()});function Kqe(t){return t.innerRadius}function Zqe(t){return t.outerRadius}function Qqe(t){return t.startAngle}function Jqe(t){return t.endAngle}function eVe(t){return t&&t.padAngle}function tVe(t,e,r,n,a,i,s,o){var l=r-t,u=n-e,h=s-a,f=o-i,d=f*l-h*u;if(!(d*dN*N+O*O&&(S=M,L=D),{cx:S,cy:L,x01:-h,y01:-f,x11:S*(a/k-1),y11:L*(a/k-1)}}function ec(){var t=Kqe,e=Zqe,r=qn(0),n=null,a=Qqe,i=Jqe,s=eVe,o=null,l=tC(u);function u(){var h,f,d=+t.apply(this,arguments),p=+e.apply(this,arguments),m=a.apply(this,arguments)-_4,g=i.apply(this,arguments)-_4,v=jM(g-m),y=g>m;if(o||(o=h=l()),pfi))o.moveTo(0,0);else if(v>E1-fi)o.moveTo(p*Qf(m),p*Jl(m)),o.arc(0,0,p,m,g,!y),d>fi&&(o.moveTo(d*Qf(g),d*Jl(g)),o.arc(0,0,d,g,m,y));else{var b=m,w=g,C=m,k=g,E=v,_=v,S=s.apply(this,arguments)/2,L=S>fi&&(n?+n.apply(this,arguments):Gp(d*d+p*p)),M=JE(jM(p-d)/2,+r.apply(this,arguments)),D=M,T=M,I,N;if(L>fi){var O=KM(L/d*Jl(S)),R=KM(L/p*Jl(S));(E-=O*2)>fi?(O*=y?1:-1,C+=O,k-=O):(E=0,C=k=(m+g)/2),(_-=R*2)>fi?(R*=y?1:-1,b+=R,w-=R):(_=0,b=w=(m+g)/2)}var P=p*Qf(b),B=p*Jl(b),F=d*Qf(k),G=d*Jl(k);if(M>fi){var z=p*Qf(w),H=p*Jl(w),Q=d*Qf(C),Y=d*Jl(C),ie;if(vfi?T>fi?(I=rC(Q,Y,P,B,p,T,y),N=rC(z,H,F,G,p,T,y),o.moveTo(I.cx+I.x01,I.cy+I.y01),Tfi)||!(E>fi)?o.lineTo(F,G):D>fi?(I=rC(F,G,z,H,d,-D,y),N=rC(P,B,Q,Y,d,-D,y),o.lineTo(I.cx+I.x01,I.cy+I.y01),D{QE();eC();ZM()});function nC(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}var Dqt,QM=A(()=>{Dqt=Array.prototype.slice});function Qie(t){this._context=t}function Jf(t){return new Qie(t)}var JM=A(()=>{Qie.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 Jie(t){return t[0]}function ese(t){return t[1]}var tse=A(()=>{});function tc(t,e){var r=qn(!0),n=null,a=Jf,i=null,s=tC(o);t=typeof t=="function"?t:t===void 0?Jie:qn(t),e=typeof e=="function"?e:e===void 0?ese:qn(e);function o(l){var u,h=(l=nC(l)).length,f,d=!1,p;for(n==null&&(i=a(p=s())),u=0;u<=h;++u)!(u{QM();QE();JM();ZM();tse()});function nse(t,e){return et?1:e>=t?0:NaN}var ase=A(()=>{});function ise(t){return t}var sse=A(()=>{});function eO(){var t=ise,e=nse,r=null,n=qn(0),a=qn(E1),i=qn(0);function s(o){var l,u=(o=nC(o)).length,h,f,d=0,p=new Array(u),m=new Array(u),g=+n.apply(this,arguments),v=Math.min(E1,Math.max(-E1,a.apply(this,arguments)-g)),y,b=Math.min(Math.abs(v)/u,i.apply(this,arguments)),w=b*(v<0?-1:1),C;for(l=0;l0&&(d+=C);for(e!=null?p.sort(function(k,E){return e(m[k],m[E])}):r!=null&&p.sort(function(k,E){return r(o[k],o[E])}),l=0,f=d?(v-u*w)/d:0;l0?C*f:0)+w,m[h]={data:o[h],index:l,value:C,startAngle:g,endAngle:y,padAngle:b};return m}return s.value=function(o){return arguments.length?(t=typeof o=="function"?o:qn(+o),s):t},s.sortValues=function(o){return arguments.length?(e=o,r=null,s):e},s.sort=function(o){return arguments.length?(r=o,e=null,s):r},s.startAngle=function(o){return arguments.length?(n=typeof o=="function"?o:qn(+o),s):n},s.endAngle=function(o){return arguments.length?(a=typeof o=="function"?o:qn(+o),s):a},s.padAngle=function(o){return arguments.length?(i=typeof o=="function"?o:qn(+o),s):i},s}var ose=A(()=>{QM();QE();ase();sse();eC()});function A4(t){return new aC(t,!0)}function L4(t){return new aC(t,!1)}var aC,lse=A(()=>{aC=class{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 ll(){}var R4=A(()=>{});function C1(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 I4(t){this._context=t}function eu(t){return new I4(t)}var D4=A(()=>{I4.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:C1(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:C1(this,t,e);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}}});function use(t){this._context=t}function tO(t){return new use(t)}var cse=A(()=>{R4();D4();use.prototype={areaStart:ll,areaEnd:ll,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:C1(this,t,e);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}}});function hse(t){this._context=t}function rO(t){return new hse(t)}var fse=A(()=>{D4();hse.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,n=(this._y0+4*this._y1+e)/6;this._line?this._context.lineTo(r,n):this._context.moveTo(r,n);break;case 3:this._point=4;default:C1(this,t,e);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}}});function dse(t,e){this._basis=new I4(t),this._beta=e}var nO,pse=A(()=>{D4();dse.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 n=t[0],a=e[0],i=t[r]-n,s=e[r]-a,o=-1,l;++o<=r;)l=o/r,this._basis.point(this._beta*t[o]+(1-this._beta)*(n+l*i),this._beta*e[o]+(1-this._beta)*(a+l*s));this._x=this._y=null,this._basis.lineEnd()},point:function(t,e){this._x.push(+t),this._y.push(+e)}};nO=(function t(e){function r(n){return e===1?new I4(n):new dse(n,e)}return r.beta=function(n){return t(+n)},r})(.85)});function S1(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 iC(t,e){this._context=t,this._k=(1-e)/6}var N4,M4=A(()=>{iC.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:S1(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:S1(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}};N4=(function t(e){function r(n){return new iC(n,e)}return r.tension=function(n){return t(+n)},r})(0)});function sC(t,e){this._context=t,this._k=(1-e)/6}var aO,iO=A(()=>{R4();M4();sC.prototype={areaStart:ll,areaEnd:ll,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:S1(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}};aO=(function t(e){function r(n){return new sC(n,e)}return r.tension=function(n){return t(+n)},r})(0)});function oC(t,e){this._context=t,this._k=(1-e)/6}var sO,oO=A(()=>{M4();oC.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:S1(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}};sO=(function t(e){function r(n){return new oC(n,e)}return r.tension=function(n){return t(+n)},r})(0)});function O4(t,e,r){var n=t._x1,a=t._y1,i=t._x2,s=t._y2;if(t._l01_a>fi){var o=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);n=(n*o-t._x0*t._l12_2a+t._x2*t._l01_2a)/l,a=(a*o-t._y0*t._l12_2a+t._y2*t._l01_2a)/l}if(t._l23_a>fi){var u=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a,h=3*t._l23_a*(t._l23_a+t._l12_a);i=(i*u+t._x1*t._l23_2a-e*t._l12_2a)/h,s=(s*u+t._y1*t._l23_2a-r*t._l12_2a)/h}t._context.bezierCurveTo(n,a,i,s,t._x2,t._y2)}function mse(t,e){this._context=t,this._alpha=e}var P4,lC=A(()=>{eC();M4();mse.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,n=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+n*n,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:O4(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}};P4=(function t(e){function r(n){return e?new mse(n,e):new iC(n,0)}return r.alpha=function(n){return t(+n)},r})(.5)});function gse(t,e){this._context=t,this._alpha=e}var lO,vse=A(()=>{iO();R4();lC();gse.prototype={areaStart:ll,areaEnd:ll,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,n=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+n*n,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:O4(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}};lO=(function t(e){function r(n){return e?new gse(n,e):new sC(n,0)}return r.alpha=function(n){return t(+n)},r})(.5)});function yse(t,e){this._context=t,this._alpha=e}var uO,xse=A(()=>{oO();lC();yse.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,n=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+n*n,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:O4(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}};uO=(function t(e){function r(n){return e?new yse(n,e):new oC(n,0)}return r.alpha=function(n){return t(+n)},r})(.5)});function bse(t){this._context=t}function cO(t){return new bse(t)}var wse=A(()=>{R4();bse.prototype={areaStart:ll,areaEnd:ll,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 kse(t){return t<0?-1:1}function Tse(t,e,r){var n=t._x1-t._x0,a=e-t._x1,i=(t._y1-t._y0)/(n||a<0&&-0),s=(r-t._y1)/(a||n<0&&-0),o=(i*a+s*n)/(n+a);return(kse(i)+kse(s))*Math.min(Math.abs(i),Math.abs(s),.5*Math.abs(o))||0}function Ese(t,e){var r=t._x1-t._x0;return r?(3*(t._y1-t._y0)/r-e)/2:e}function hO(t,e,r){var n=t._x0,a=t._y0,i=t._x1,s=t._y1,o=(i-n)/3;t._context.bezierCurveTo(n+o,a+o*e,i-o,s-o*r,i,s)}function uC(t){this._context=t}function Cse(t){this._context=new Sse(t)}function Sse(t){this._context=t}function B4(t){return new uC(t)}function F4(t){return new Cse(t)}var _se=A(()=>{uC.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:hO(this,this._t0,Ese(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,hO(this,Ese(this,r=Tse(this,t,e)),r);break;default:hO(this,this._t0,r=Tse(this,t,e));break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e,this._t0=r}}};(Cse.prototype=Object.create(uC.prototype)).point=function(t,e){uC.prototype.point.call(this,e,t)};Sse.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,n,a,i){this._context.bezierCurveTo(e,t,n,r,i,a)}}});function Lse(t){this._context=t}function Ase(t){var e,r=t.length-1,n,a=new Array(r),i=new Array(r),s=new Array(r);for(a[0]=0,i[0]=2,s[0]=t[0]+2*t[1],e=1;e=0;--e)a[e]=(s[e]-a[e+1])/i[e];for(i[r-1]=(t[r]+a[r-1])/2,e=0;e{Lse.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 n=Ase(t),a=Ase(e),i=0,s=1;s{cC.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0=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}}});var Dse=A(()=>{Zie();rse();ose();cse();fse();D4();lse();pse();iO();oO();M4();vse();xse();lC();wse();JM();_se();Rse();Ise()});var Nse=A(()=>{});var Mse=A(()=>{});function ed(t,e,r){this.k=t,this.x=e,this.y=r}function dO(t){for(;!t.__zoom;)if(!(t=t.parentNode))return fO;return t.__zoom}var fO,pO=A(()=>{ed.prototype={constructor:ed,scale:function(t){return t===1?this:new ed(this.k*t,this.x,this.y)},translate:function(t,e){return t===0&e===0?this:new ed(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+")"}};fO=new ed(1,0,0);dO.prototype=ed.prototype});var Ose=A(()=>{});var Pse=A(()=>{PE();Nse();Mse();pO();Ose()});var Bse=A(()=>{Pse();pO()});var cr=A(()=>{Vf();Zee();Eae();Aae();p1();Lae();Rae();CN();Tre();Iae();lM();Dae();Mae();kM();eie();tie();g1();fM();rie();Nae();nie();Vie();Xie();Yl();Dse();KE();YM();AE();PE();Bse()});var rVe,hC,mO=A(()=>{rVe=typeof global=="object"&&global&&global.Object===Object&&global,hC=rVe});var nVe,aVe,ca,ul=A(()=>{mO();nVe=typeof self=="object"&&self&&self.Object===Object&&self,aVe=hC||nVe||Function("return this")(),ca=aVe});var iVe,di,Up=A(()=>{ul();iVe=ca.Symbol,di=iVe});function lVe(t){var e=sVe.call(t,q4),r=t[q4];try{t[q4]=void 0;var n=!0}catch{}var a=oVe.call(t);return n&&(e?t[q4]=r:delete t[q4]),a}var Fse,sVe,oVe,q4,zse,$se=A(()=>{Up();Fse=Object.prototype,sVe=Fse.hasOwnProperty,oVe=Fse.toString,q4=di?di.toStringTag:void 0;zse=lVe});function hVe(t){return cVe.call(t)}var uVe,cVe,Gse,Use=A(()=>{uVe=Object.prototype,cVe=uVe.toString;Gse=hVe});function pVe(t){return t==null?t===void 0?dVe:fVe:qse&&qse in Object(t)?zse(t):Gse(t)}var fVe,dVe,qse,Es,td=A(()=>{Up();$se();Use();fVe="[object Null]",dVe="[object Undefined]",qse=di?di.toStringTag:void 0;Es=pVe});function mVe(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}var Vn,cl=A(()=>{Vn=mVe});function bVe(t){if(!Vn(t))return!1;var e=Es(t);return e==vVe||e==yVe||e==gVe||e==xVe}var gVe,vVe,yVe,xVe,rc,V4=A(()=>{td();cl();gVe="[object AsyncFunction]",vVe="[object Function]",yVe="[object GeneratorFunction]",xVe="[object Proxy]";rc=bVe});var wVe,fC,Vse=A(()=>{ul();wVe=ca["__core-js_shared__"],fC=wVe});function kVe(t){return!!Hse&&Hse in t}var Hse,Wse,Yse=A(()=>{Vse();Hse=(function(){var t=/[^.]+$/.exec(fC&&fC.keys&&fC.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""})();Wse=kVe});function CVe(t){if(t!=null){try{return EVe.call(t)}catch{}try{return t+""}catch{}}return""}var TVe,EVe,Nh,gO=A(()=>{TVe=Function.prototype,EVe=TVe.toString;Nh=CVe});function NVe(t){if(!Vn(t)||Wse(t))return!1;var e=rc(t)?DVe:_Ve;return e.test(Nh(t))}var SVe,_Ve,AVe,LVe,RVe,IVe,DVe,Xse,jse=A(()=>{V4();Yse();cl();gO();SVe=/[\\^$.*+?()[\]{}|]/g,_Ve=/^\[object .+?Constructor\]$/,AVe=Function.prototype,LVe=Object.prototype,RVe=AVe.toString,IVe=LVe.hasOwnProperty,DVe=RegExp("^"+RVe.call(IVe).replace(SVe,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");Xse=NVe});function MVe(t,e){return t?.[e]}var Kse,Zse=A(()=>{Kse=MVe});function OVe(t,e){var r=Kse(t,e);return Xse(r)?r:void 0}var no,rd=A(()=>{jse();Zse();no=OVe});var PVe,Mh,H4=A(()=>{rd();PVe=no(Object,"create"),Mh=PVe});function BVe(){this.__data__=Mh?Mh(null):{},this.size=0}var Qse,Jse=A(()=>{H4();Qse=BVe});function FVe(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}var eoe,toe=A(()=>{eoe=FVe});function UVe(t){var e=this.__data__;if(Mh){var r=e[t];return r===zVe?void 0:r}return GVe.call(e,t)?e[t]:void 0}var zVe,$Ve,GVe,roe,noe=A(()=>{H4();zVe="__lodash_hash_undefined__",$Ve=Object.prototype,GVe=$Ve.hasOwnProperty;roe=UVe});function HVe(t){var e=this.__data__;return Mh?e[t]!==void 0:VVe.call(e,t)}var qVe,VVe,aoe,ioe=A(()=>{H4();qVe=Object.prototype,VVe=qVe.hasOwnProperty;aoe=HVe});function YVe(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=Mh&&e===void 0?WVe:e,this}var WVe,soe,ooe=A(()=>{H4();WVe="__lodash_hash_undefined__";soe=YVe});function _1(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e{Jse();toe();noe();ioe();ooe();_1.prototype.clear=Qse;_1.prototype.delete=eoe;_1.prototype.get=roe;_1.prototype.has=aoe;_1.prototype.set=soe;vO=_1});function XVe(){this.__data__=[],this.size=0}var uoe,coe=A(()=>{uoe=XVe});function jVe(t,e){return t===e||t!==t&&e!==e}var hl,qp=A(()=>{hl=jVe});function KVe(t,e){for(var r=t.length;r--;)if(hl(t[r][0],e))return r;return-1}var nd,W4=A(()=>{qp();nd=KVe});function JVe(t){var e=this.__data__,r=nd(e,t);if(r<0)return!1;var n=e.length-1;return r==n?e.pop():QVe.call(e,r,1),--this.size,!0}var ZVe,QVe,hoe,foe=A(()=>{W4();ZVe=Array.prototype,QVe=ZVe.splice;hoe=JVe});function eHe(t){var e=this.__data__,r=nd(e,t);return r<0?void 0:e[r][1]}var doe,poe=A(()=>{W4();doe=eHe});function tHe(t){return nd(this.__data__,t)>-1}var moe,goe=A(()=>{W4();moe=tHe});function rHe(t,e){var r=this.__data__,n=nd(r,t);return n<0?(++this.size,r.push([t,e])):r[n][1]=e,this}var voe,yoe=A(()=>{W4();voe=rHe});function A1(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e{coe();foe();poe();goe();yoe();A1.prototype.clear=uoe;A1.prototype.delete=hoe;A1.prototype.get=doe;A1.prototype.has=moe;A1.prototype.set=voe;ad=A1});var nHe,id,dC=A(()=>{rd();ul();nHe=no(ca,"Map"),id=nHe});function aHe(){this.size=0,this.__data__={hash:new vO,map:new(id||ad),string:new vO}}var xoe,boe=A(()=>{loe();Y4();dC();xoe=aHe});function iHe(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}var woe,koe=A(()=>{woe=iHe});function sHe(t,e){var r=t.__data__;return woe(e)?r[typeof e=="string"?"string":"hash"]:r.map}var sd,X4=A(()=>{koe();sd=sHe});function oHe(t){var e=sd(this,t).delete(t);return this.size-=e?1:0,e}var Toe,Eoe=A(()=>{X4();Toe=oHe});function lHe(t){return sd(this,t).get(t)}var Coe,Soe=A(()=>{X4();Coe=lHe});function uHe(t){return sd(this,t).has(t)}var _oe,Aoe=A(()=>{X4();_oe=uHe});function cHe(t,e){var r=sd(this,t),n=r.size;return r.set(t,e),this.size+=r.size==n?0:1,this}var Loe,Roe=A(()=>{X4();Loe=cHe});function L1(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e{boe();Eoe();Soe();Aoe();Roe();L1.prototype.clear=xoe;L1.prototype.delete=Toe;L1.prototype.get=Coe;L1.prototype.has=_oe;L1.prototype.set=Loe;Vp=L1});function yO(t,e){if(typeof t!="function"||e!=null&&typeof e!="function")throw new TypeError(hHe);var r=function(){var n=arguments,a=e?e.apply(this,n):n[0],i=r.cache;if(i.has(a))return i.get(a);var s=t.apply(this,n);return r.cache=i.set(a,s)||i,s};return r.cache=new(yO.Cache||Vp),r}var hHe,R1,xO=A(()=>{pC();hHe="Expected a function";yO.Cache=Vp;R1=yO});function fHe(){this.__data__=new ad,this.size=0}var Ioe,Doe=A(()=>{Y4();Ioe=fHe});function dHe(t){var e=this.__data__,r=e.delete(t);return this.size=e.size,r}var Noe,Moe=A(()=>{Noe=dHe});function pHe(t){return this.__data__.get(t)}var Ooe,Poe=A(()=>{Ooe=pHe});function mHe(t){return this.__data__.has(t)}var Boe,Foe=A(()=>{Boe=mHe});function vHe(t,e){var r=this.__data__;if(r instanceof ad){var n=r.__data__;if(!id||n.length{Y4();dC();pC();gHe=200;zoe=vHe});function I1(t){var e=this.__data__=new ad(t);this.size=e.size}var nc,j4=A(()=>{Y4();Doe();Moe();Poe();Foe();$oe();I1.prototype.clear=Ioe;I1.prototype.delete=Noe;I1.prototype.get=Ooe;I1.prototype.has=Boe;I1.prototype.set=zoe;nc=I1});var yHe,D1,bO=A(()=>{rd();yHe=(function(){try{var t=no(Object,"defineProperty");return t({},"",{}),t}catch{}})(),D1=yHe});function xHe(t,e,r){e=="__proto__"&&D1?D1(t,e,{configurable:!0,enumerable:!0,value:r,writable:!0}):t[e]=r}var od,K4=A(()=>{bO();od=xHe});function bHe(t,e,r){(r!==void 0&&!hl(t[e],r)||r===void 0&&!(e in t))&&od(t,e,r)}var Z4,wO=A(()=>{K4();qp();Z4=bHe});function wHe(t){return function(e,r,n){for(var a=-1,i=Object(e),s=n(e),o=s.length;o--;){var l=s[t?o:++a];if(r(i[l],l,i)===!1)break}return e}}var Goe,Uoe=A(()=>{Goe=wHe});var kHe,N1,mC=A(()=>{Uoe();kHe=Goe(),N1=kHe});function EHe(t,e){if(e)return t.slice();var r=t.length,n=Hoe?Hoe(r):new t.constructor(r);return t.copy(n),n}var Woe,qoe,THe,Voe,Hoe,gC,kO=A(()=>{ul();Woe=typeof exports=="object"&&exports&&!exports.nodeType&&exports,qoe=Woe&&typeof module=="object"&&module&&!module.nodeType&&module,THe=qoe&&qoe.exports===Woe,Voe=THe?ca.Buffer:void 0,Hoe=Voe?Voe.allocUnsafe:void 0;gC=EHe});var CHe,M1,TO=A(()=>{ul();CHe=ca.Uint8Array,M1=CHe});function SHe(t){var e=new t.constructor(t.byteLength);return new M1(e).set(new M1(t)),e}var O1,vC=A(()=>{TO();O1=SHe});function _He(t,e){var r=e?O1(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.length)}var yC,EO=A(()=>{vC();yC=_He});function AHe(t,e){var r=-1,n=t.length;for(e||(e=Array(n));++r{xC=AHe});var Yoe,LHe,Xoe,joe=A(()=>{cl();Yoe=Object.create,LHe=(function(){function t(){}return function(e){if(!Vn(e))return{};if(Yoe)return Yoe(e);t.prototype=e;var r=new t;return t.prototype=void 0,r}})(),Xoe=LHe});function RHe(t,e){return function(r){return t(e(r))}}var bC,SO=A(()=>{bC=RHe});var IHe,P1,wC=A(()=>{SO();IHe=bC(Object.getPrototypeOf,Object),P1=IHe});function NHe(t){var e=t&&t.constructor,r=typeof e=="function"&&e.prototype||DHe;return t===r}var DHe,ld,Q4=A(()=>{DHe=Object.prototype;ld=NHe});function MHe(t){return typeof t.constructor=="function"&&!ld(t)?Xoe(P1(t)):{}}var kC,_O=A(()=>{joe();wC();Q4();kC=MHe});function OHe(t){return t!=null&&typeof t=="object"}var xa,tu=A(()=>{xa=OHe});function BHe(t){return xa(t)&&Es(t)==PHe}var PHe,AO,Koe=A(()=>{td();tu();PHe="[object Arguments]";AO=BHe});var Zoe,FHe,zHe,$He,ru,B1=A(()=>{Koe();tu();Zoe=Object.prototype,FHe=Zoe.hasOwnProperty,zHe=Zoe.propertyIsEnumerable,$He=AO((function(){return arguments})())?AO:function(t){return xa(t)&&FHe.call(t,"callee")&&!zHe.call(t,"callee")},ru=$He});var GHe,pr,Da=A(()=>{GHe=Array.isArray,pr=GHe});function qHe(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=UHe}var UHe,F1,TC=A(()=>{UHe=9007199254740991;F1=qHe});function VHe(t){return t!=null&&F1(t.length)&&!rc(t)}var pi,ac=A(()=>{V4();TC();pi=VHe});function HHe(t){return xa(t)&&pi(t)}var EC,LO=A(()=>{ac();tu();EC=HHe});function WHe(){return!1}var Qoe,Joe=A(()=>{Qoe=WHe});var rle,ele,YHe,tle,XHe,jHe,nu,z1=A(()=>{ul();Joe();rle=typeof exports=="object"&&exports&&!exports.nodeType&&exports,ele=rle&&typeof module=="object"&&module&&!module.nodeType&&module,YHe=ele&&ele.exports===rle,tle=YHe?ca.Buffer:void 0,XHe=tle?tle.isBuffer:void 0,jHe=XHe||Qoe,nu=jHe});function tWe(t){if(!xa(t)||Es(t)!=KHe)return!1;var e=P1(t);if(e===null)return!0;var r=JHe.call(e,"constructor")&&e.constructor;return typeof r=="function"&&r instanceof r&&nle.call(r)==eWe}var KHe,ZHe,QHe,nle,JHe,eWe,ale,ile=A(()=>{td();wC();tu();KHe="[object Object]",ZHe=Function.prototype,QHe=Object.prototype,nle=ZHe.toString,JHe=QHe.hasOwnProperty,eWe=nle.call(Object);ale=tWe});function SWe(t){return xa(t)&&F1(t.length)&&!!On[Es(t)]}var rWe,nWe,aWe,iWe,sWe,oWe,lWe,uWe,cWe,hWe,fWe,dWe,pWe,mWe,gWe,vWe,yWe,xWe,bWe,wWe,kWe,TWe,EWe,CWe,On,sle,ole=A(()=>{td();TC();tu();rWe="[object Arguments]",nWe="[object Array]",aWe="[object Boolean]",iWe="[object Date]",sWe="[object Error]",oWe="[object Function]",lWe="[object Map]",uWe="[object Number]",cWe="[object Object]",hWe="[object RegExp]",fWe="[object Set]",dWe="[object String]",pWe="[object WeakMap]",mWe="[object ArrayBuffer]",gWe="[object DataView]",vWe="[object Float32Array]",yWe="[object Float64Array]",xWe="[object Int8Array]",bWe="[object Int16Array]",wWe="[object Int32Array]",kWe="[object Uint8Array]",TWe="[object Uint8ClampedArray]",EWe="[object Uint16Array]",CWe="[object Uint32Array]",On={};On[vWe]=On[yWe]=On[xWe]=On[bWe]=On[wWe]=On[kWe]=On[TWe]=On[EWe]=On[CWe]=!0;On[rWe]=On[nWe]=On[mWe]=On[aWe]=On[gWe]=On[iWe]=On[sWe]=On[oWe]=On[lWe]=On[uWe]=On[cWe]=On[hWe]=On[fWe]=On[dWe]=On[pWe]=!1;sle=SWe});function _We(t){return function(e){return t(e)}}var ud,J4=A(()=>{ud=_We});var lle,e3,AWe,RO,LWe,Oh,CC=A(()=>{mO();lle=typeof exports=="object"&&exports&&!exports.nodeType&&exports,e3=lle&&typeof module=="object"&&module&&!module.nodeType&&module,AWe=e3&&e3.exports===lle,RO=AWe&&hC.process,LWe=(function(){try{var t=e3&&e3.require&&e3.require("util").types;return t||RO&&RO.binding&&RO.binding("util")}catch{}})(),Oh=LWe});var ule,RWe,cd,t3=A(()=>{ole();J4();CC();ule=Oh&&Oh.isTypedArray,RWe=ule?ud(ule):sle,cd=RWe});function IWe(t,e){if(!(e==="constructor"&&typeof t[e]=="function")&&e!="__proto__")return t[e]}var r3,IO=A(()=>{r3=IWe});function MWe(t,e,r){var n=t[e];(!(NWe.call(t,e)&&hl(n,r))||r===void 0&&!(e in t))&&od(t,e,r)}var DWe,NWe,hd,n3=A(()=>{K4();qp();DWe=Object.prototype,NWe=DWe.hasOwnProperty;hd=MWe});function OWe(t,e,r,n){var a=!r;r||(r={});for(var i=-1,s=e.length;++i{n3();K4();ic=OWe});function PWe(t,e){for(var r=-1,n=Array(t);++r{cle=PWe});function zWe(t,e){var r=typeof t;return e=e??BWe,!!e&&(r=="number"||r!="symbol"&&FWe.test(t))&&t>-1&&t%1==0&&t{BWe=9007199254740991,FWe=/^(?:0|[1-9]\d*)$/;fd=zWe});function UWe(t,e){var r=pr(t),n=!r&&ru(t),a=!r&&!n&&nu(t),i=!r&&!n&&!a&&cd(t),s=r||n||a||i,o=s?cle(t.length,String):[],l=o.length;for(var u in t)(e||GWe.call(t,u))&&!(s&&(u=="length"||a&&(u=="offset"||u=="parent")||i&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||fd(u,l)))&&o.push(u);return o}var $We,GWe,SC,DO=A(()=>{hle();B1();Da();z1();a3();t3();$We=Object.prototype,GWe=$We.hasOwnProperty;SC=UWe});function qWe(t){var e=[];if(t!=null)for(var r in Object(t))e.push(r);return e}var fle,dle=A(()=>{fle=qWe});function WWe(t){if(!Vn(t))return fle(t);var e=ld(t),r=[];for(var n in t)n=="constructor"&&(e||!HWe.call(t,n))||r.push(n);return r}var VWe,HWe,ple,mle=A(()=>{cl();Q4();dle();VWe=Object.prototype,HWe=VWe.hasOwnProperty;ple=WWe});function YWe(t){return pi(t)?SC(t,!0):ple(t)}var ao,dd=A(()=>{DO();mle();ac();ao=YWe});function XWe(t){return ic(t,ao(t))}var gle,vle=A(()=>{$1();dd();gle=XWe});function jWe(t,e,r,n,a,i,s){var o=r3(t,r),l=r3(e,r),u=s.get(l);if(u){Z4(t,r,u);return}var h=i?i(o,l,r+"",t,e,s):void 0,f=h===void 0;if(f){var d=pr(l),p=!d&&nu(l),m=!d&&!p&&cd(l);h=l,d||p||m?pr(o)?h=o:EC(o)?h=xC(o):p?(f=!1,h=gC(l,!0)):m?(f=!1,h=yC(l,!0)):h=[]:ale(l)||ru(l)?(h=o,ru(o)?h=gle(o):(!Vn(o)||rc(o))&&(h=kC(l))):f=!1}f&&(s.set(l,h),a(h,l,n,i,s),s.delete(l)),Z4(t,r,h)}var yle,xle=A(()=>{wO();kO();EO();CO();_O();B1();Da();LO();z1();V4();cl();ile();t3();IO();vle();yle=jWe});function ble(t,e,r,n,a){t!==e&&N1(e,function(i,s){if(a||(a=new nc),Vn(i))yle(t,e,s,r,ble,n,a);else{var o=n?n(r3(t,s),i,s+"",t,e,a):void 0;o===void 0&&(o=i),Z4(t,s,o)}},ao)}var wle,kle=A(()=>{j4();wO();mC();xle();cl();dd();IO();wle=ble});function KWe(t){return t}var io,pd=A(()=>{io=KWe});function ZWe(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 Tle,Ele=A(()=>{Tle=ZWe});function QWe(t,e,r){return e=Cle(e===void 0?t.length-1:e,0),function(){for(var n=arguments,a=-1,i=Cle(n.length-e,0),s=Array(i);++a{Ele();Cle=Math.max;_C=QWe});function JWe(t){return function(){return t}}var so,MO=A(()=>{so=JWe});var eYe,Sle,_le=A(()=>{MO();bO();pd();eYe=D1?function(t,e){return D1(t,"toString",{configurable:!0,enumerable:!1,value:so(e),writable:!0})}:io,Sle=eYe});function aYe(t){var e=0,r=0;return function(){var n=nYe(),a=rYe-(n-r);if(r=n,a>0){if(++e>=tYe)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}var tYe,rYe,nYe,Ale,Lle=A(()=>{tYe=800,rYe=16,nYe=Date.now;Ale=aYe});var iYe,AC,OO=A(()=>{_le();Lle();iYe=Ale(Sle),AC=iYe});function sYe(t,e){return AC(_C(t,e,io),t+"")}var md,i3=A(()=>{pd();NO();OO();md=sYe});function oYe(t,e,r){if(!Vn(r))return!1;var n=typeof e;return(n=="number"?pi(r)&&fd(e,r.length):n=="string"&&e in r)?hl(r[e],t):!1}var Ph,s3=A(()=>{qp();ac();a3();cl();Ph=oYe});function lYe(t){return md(function(e,r){var n=-1,a=r.length,i=a>1?r[a-1]:void 0,s=a>2?r[2]:void 0;for(i=t.length>3&&typeof i=="function"?(a--,i):void 0,s&&Ph(r[0],r[1],s)&&(i=a<3?void 0:i,a=1),e=Object(e);++n{i3();s3();Rle=lYe});var uYe,gd,PO=A(()=>{kle();Ile();uYe=Rle(function(t,e,r){wle(t,e,r)}),gd=uYe});function RC(t,e){if(!t)return e;let r=`curve${t.charAt(0).toUpperCase()+t.slice(1)}`;return cYe[r]??e}function Ble(t,e){let r=t.trim();if(r)return e.securityLevel!=="loose"?(0,Mle.sanitizeUrl)(r):r}function FO(t,e){return!t||!e?0:Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function Fle(t){let e,r=0;t.forEach(a=>{r+=FO(a,e),e=a});let n=r/2;return zO(t,n)}function zle(t){return t.length===1?t[0]:Fle(t)}function $le(t,e,r){let n=structuredClone(r);te.info("our points",n),e!=="start_left"&&e!=="start_right"&&n.reverse();let a=25+t,i=zO(n,a),s=10+t*.5,o=Math.atan2(n[0].y-i.y,n[0].x-i.x),l={x:0,y:0};return e==="start_left"?(l.x=Math.sin(o+Math.PI)*s+(n[0].x+i.x)/2,l.y=-Math.cos(o+Math.PI)*s+(n[0].y+i.y)/2):e==="end_right"?(l.x=Math.sin(o-Math.PI)*s+(n[0].x+i.x)/2-5,l.y=-Math.cos(o-Math.PI)*s+(n[0].y+i.y)/2-5):e==="end_left"?(l.x=Math.sin(o)*s+(n[0].x+i.x)/2-5,l.y=-Math.cos(o)*s+(n[0].y+i.y)/2-5):(l.x=Math.sin(o)*s+(n[0].x+i.x)/2,l.y=-Math.cos(o)*s+(n[0].y+i.y)/2),l}function IC(t){let e="",r="";for(let n of t)n!==void 0&&(n.startsWith("color:")||n.startsWith("text-align:")?r=r+n+";":e=e+n+";");return{style:e,labelStyle:r}}function Gle(t){let e="",r="0123456789abcdef",n=r.length;for(let a=0;a{ur();Mle=ii(o1(),1);cr();xO();PO();BO="\u200B",cYe={curveBasis:eu,curveBasisClosed:tO,curveBasisOpen:rO,curveBumpX:A4,curveBumpY:L4,curveBundle:nO,curveCardinalClosed:aO,curveCardinalOpen:sO,curveCardinal:N4,curveCatmullRomClosed:lO,curveCatmullRomOpen:uO,curveCatmullRom:P4,curveLinear:Jf,curveLinearClosed:cO,curveMonotoneX:B4,curveMonotoneY:F4,curveNatural:z4,curveStep:$4,curveStepAfter:U4,curveStepBefore:G4},hYe=/\s*(?:(\w+)(?=:):|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,fYe=x(function(t,e){let r=Ole(t,/(?:init\b)|(?:initialize\b)/),n={};if(Array.isArray(r)){let s=r.map(o=>o.args);Gb(s),n=ra(n,[...s])}else n=r.args;if(!n)return;let a=Ub(t,e),i="config";return n[i]!==void 0&&(a==="flowchart-v2"&&(a="flowchart"),n[a]=n[i],delete n[i]),n},"detectInit"),Ole=x(function(t,e=null){try{let r=new RegExp(`[%]{2}(?![{]${hYe.source})(?=[}][%]{2}).* -`,"ig");t=t.trim().replace(r,"").replace(/'/gm,'"'),te.debug(`Detecting diagram directive${e!==null?" type:"+e:""} based on the text:${t}`);let n,a=[];for(;(n=jg.exec(t))!==null;)if(n.index===jg.lastIndex&&jg.lastIndex++,n&&!e||e&&n[1]?.match(e)||e&&n[2]?.match(e)){let i=n[1]?n[1]:n[2],s=n[3]?n[3].trim():n[4]?JSON.parse(n[4].trim()):null;a.push({type:i,args:s})}return a.length===0?{type:t,args:null}:a.length===1?a[0]:a}catch(r){return te.error(`ERROR: ${r.message} - Unable to parse directive type: '${e}' based on the text: '${t}'`),{type:void 0,args:null}}},"detectDirective"),Ple=x(function(t){return t.replace(jg,"")},"removeDirectives"),dYe=x(function(t,e){for(let[r,n]of e.entries())if(n.match(t))return r;return-1},"isSubstringInArray");x(RC,"interpolateToCurve");x(Ble,"formatUrl");pYe=x((t,...e)=>{let r=t.split("."),n=r.length-1,a=r[n],i=window;for(let s=0;s{let r=Math.pow(10,e);return Math.round(t*r)/r},"roundNumber"),zO=x((t,e)=>{let r,n=e;for(let a of t){if(r){let i=FO(a,r);if(i===0)return r;if(i=1)return{x:a.x,y:a.y};if(s>0&&s<1)return{x:Dle((1-s)*r.x+s*a.x,5),y:Dle((1-s)*r.y+s*a.y,5)}}}r=a}throw new Error("Could not find a suitable point for the given distance")},"calculatePoint"),mYe=x((t,e,r)=>{te.info(`our points ${JSON.stringify(e)}`),e[0]!==r&&(e=e.reverse());let a=zO(e,25),i=t?10:5,s=Math.atan2(e[0].y-a.y,e[0].x-a.x),o={x:0,y:0};return o.x=Math.sin(s)*i+(e[0].x+a.x)/2,o.y=-Math.cos(s)*i+(e[0].y+a.y)/2,o},"calcCardinalityPosition");x($le,"calcTerminalLabelPosition");x(IC,"getStylesFromArray");Nle=0,$O=x(()=>(Nle++,"id-"+Math.random().toString(36).substr(2,12)+"-"+Nle),"generateId");x(Gle,"makeRandomHex");GO=x(t=>Gle(t.length),"random"),gYe=x(function(){return{x:0,y:0,fill:void 0,anchor:"start",style:"#666",width:100,height:100,textMargin:0,rx:0,ry:0,valign:void 0,text:""}},"getTextObj"),vYe=x(function(t,e){let r=e.text.replace(Ze.lineBreakRegex," "),[,n]=fl(e.fontSize),a=t.append("text");a.attr("x",e.x),a.attr("y",e.y),a.style("text-anchor",e.anchor),a.style("font-family",e.fontFamily),a.style("font-size",n),a.style("font-weight",e.fontWeight),a.attr("fill",e.fill),e.class!==void 0&&a.attr("class",e.class);let i=a.append("tspan");return i.attr("x",e.x+e.textMargin*2),i.attr("fill",e.fill),i.text(r),a},"drawSimpleText"),UO=R1((t,e,r)=>{if(!t||(r=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",joinWith:"
"},r),Ze.lineBreakRegex.test(t)))return t;let n=t.split(" ").filter(Boolean),a=[],i="";return n.forEach((s,o)=>{let l=Bi(`${s} `,r),u=Bi(i,r);if(l>e){let{hyphenatedStrings:d,remainingWord:p}=yYe(s,e,"-",r);a.push(i,...d),i=p}else u+l>=e?(a.push(i),i=s):i=[i,s].filter(Boolean).join(" ");o+1===n.length&&a.push(i)}),a.filter(s=>s!=="").join(r.joinWith)},(t,e,r)=>`${t}${e}${r.fontSize}${r.fontWeight}${r.fontFamily}${r.joinWith}`),yYe=R1((t,e,r="-",n)=>{n=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",margin:0},n);let a=[...t],i=[],s="";return a.forEach((o,l)=>{let u=`${s}${o}`;if(Bi(u,n)>=e){let f=l+1,d=a.length===f,p=`${u}${r}`;i.push(d?u:p),s=""}else s=u}),{hyphenatedStrings:i,remainingWord:s}},(t,e,r="-",n)=>`${t}${e}${r}${n.fontSize}${n.fontWeight}${n.fontFamily}`);x(o3,"calculateTextHeight");x(Bi,"calculateTextWidth");qO=R1((t,e)=>{let{fontSize:r=12,fontFamily:n="Arial",fontWeight:a=400}=e;if(!t)return{width:0,height:0};let[,i]=fl(r),s=["sans-serif",n],o=t.split(Ze.lineBreakRegex),l=[],u=We("body");if(!u.remove)return{width:0,height:0,lineHeight:0};let h=u.append("svg");for(let d of s){let p=0,m={width:0,height:0,lineHeight:0};for(let g of o){let v=gYe();v.text=g||BO;let y=vYe(h,v).style("font-size",i).style("font-weight",a).style("font-family",d),b=(y._groups||y)[0][0].getBBox();if(b.width===0&&b.height===0)throw new Error("svg element not in render tree");m.width=Math.round(Math.max(m.width,b.width)),p=Math.round(b.height),m.height+=p,m.lineHeight=Math.round(Math.max(m.lineHeight,p))}l.push(m)}h.remove();let f=isNaN(l[1].height)||isNaN(l[1].width)||isNaN(l[1].lineHeight)||l[0].height>l[1].height&&l[0].width>l[1].width&&l[0].lineHeight>l[1].lineHeight?0:1;return l[f]},(t,e)=>`${t}${e.fontSize}${e.fontWeight}${e.fontFamily}`),xYe=(G1=class{constructor(e=!1,r){this.count=0,this.count=r?r.length:0,this.next=e?()=>this.count++:()=>Date.now()}},x(G1,"InitIDGenerator"),G1),bYe=x(function(t){return LC=LC||document.createElement("div"),t=escape(t).replace(/%26/g,"&").replace(/%23/g,"#").replace(/%3B/g,";"),LC.innerHTML=t,unescape(LC.textContent)},"entityDecode");x(DC,"isDetailedError");wYe=x((t,e,r,n)=>{if(!n)return;let a=t.node()?.getBBox();a&&t.append("text").text(n).attr("text-anchor","middle").attr("x",a.x+a.width/2).attr("y",-r).attr("class",e)},"insertTitle"),fl=x(t=>{if(typeof t=="number")return[t,t+"px"];let e=parseInt(t??"",10);return Number.isNaN(e)?[void 0,void 0]:t===String(e)?[e,t+"px"]:[e,t]},"parseFontSize");x(mi,"cleanAndMerge");Wt={assignWithDepth:ra,wrapLabel:UO,calculateTextHeight:o3,calculateTextWidth:Bi,calculateTextDimensions:qO,cleanAndMerge:mi,detectInit:fYe,detectDirective:Ole,isSubstringInArray:dYe,interpolateToCurve:RC,calcLabelPosition:zle,calcCardinalityPosition:mYe,calcTerminalLabelPosition:$le,formatUrl:Ble,getStylesFromArray:IC,generateId:$O,random:GO,runFunc:pYe,entityDecode:bYe,insertTitle:wYe,parseFontSize:fl,InitIDGenerator:xYe},Ule=x(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){let n=r.substring(1,r.length-1);return/^\+?\d+$/.test(n)?"\uFB02\xB0\xB0"+n+"\xB6\xDF":"\uFB02\xB0"+n+"\xB6\xDF"}),e},"encodeEntities"),oo=x(function(t){return t.replace(/fl°°/g,"&#").replace(/fl°/g,"&").replace(/¶ß/g,";")},"decodeEntities"),vd=x((t,e,{counter:r=0,prefix:n,suffix:a},i)=>i||`${n?`${n}_`:""}${t}_${e}_${r}${a?`_${a}`:""}`,"getEdgeId");x(ns,"handleUndefinedAttr")});function XO(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}function Xle(t){Wp=t}function Zr(t,e=""){let r=typeof t=="string"?t:t.source,n={replace:(a,i)=>{let s=typeof i=="string"?i:i.source;return s=s.replace(Cs.caret,"$1"),r=r.replace(a,s),n},getRegex:()=>new RegExp(r,e)};return n}function sc(t,e){if(e){if(Cs.escapeTest.test(t))return t.replace(Cs.escapeReplace,Vle)}else if(Cs.escapeTestNoEncode.test(t))return t.replace(Cs.escapeReplaceNoEncode,Vle);return t}function Hle(t){try{t=encodeURI(t).replace(Cs.percentDecode,"%")}catch{return null}return t}function Wle(t,e){let r=t.replace(Cs.findPipe,(i,s,o)=>{let l=!1,u=s;for(;--u>=0&&o[u]==="\\";)l=!l;return l?"|":" |"}),n=r.split(Cs.splitPipe),a=0;if(n[0].trim()||n.shift(),n.length>0&&!n.at(-1)?.trim()&&n.pop(),e)if(n.length>e)n.splice(e);else for(;n.length0?-2:-1}function Yle(t,e,r,n,a){let i=e.href,s=e.title||null,o=t[1].replace(a.other.outputLinkReplace,"$1");n.state.inLink=!0;let l={type:t[0].charAt(0)==="!"?"image":"link",raw:r,href:i,title:s,text:o,tokens:n.inlineTokens(o)};return n.state.inLink=!1,l}function rXe(t,e,r){let n=t.match(r.other.indentCodeCompensation);if(n===null)return e;let a=n[1];return e.split(` -`).map(i=>{let s=i.match(r.other.beginningSpace);if(s===null)return i;let[o]=s;return o.length>=a.length?i.slice(a.length):i}).join(` -`)}function jr(t,e){return Hp.parse(t,e)}var Wp,c3,Cs,kYe,TYe,EYe,h3,CYe,jO,jle,Kle,SYe,KO,_Ye,ZO,AYe,LYe,FC,QO,RYe,Zle,IYe,JO,qle,DYe,NYe,MYe,OYe,Qle,PYe,zC,eP,Jle,BYe,eue,FYe,zYe,$Ye,tue,GYe,UYe,rue,qYe,VYe,HYe,WYe,YYe,XYe,jYe,OC,KYe,nue,aue,ZYe,tP,QYe,HO,JYe,NC,l3,eXe,Vle,PC,Bh,BC,rP,Fh,VO,MC,nXe,Hp,_Kt,AKt,LKt,RKt,IKt,DKt,NKt,iue=A(()=>{Wp=XO();c3={exec:()=>null};Cs={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:t=>new RegExp(`^( {0,3}${t})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}#`),htmlBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}<(?:[a-z].*>|!--)`,"i")},kYe=/^(?:[ \t]*(?:\n|$))+/,TYe=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,EYe=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,h3=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,CYe=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,jO=/(?:[*+-]|\d{1,9}[.)])/,jle=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,Kle=Zr(jle).replace(/bull/g,jO).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),SYe=Zr(jle).replace(/bull/g,jO).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),KO=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,_Ye=/^[^\n]+/,ZO=/(?!\s*\])(?:\\.|[^\[\]\\])+/,AYe=Zr(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",ZO).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),LYe=Zr(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,jO).getRegex(),FC="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",QO=/|$))/,RYe=Zr("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|\\n*|$)|\\n*|$)|)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",QO).replace("tag",FC).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Zle=Zr(KO).replace("hr",h3).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",FC).getRegex(),IYe=Zr(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",Zle).getRegex(),JO={blockquote:IYe,code:TYe,def:AYe,fences:EYe,heading:CYe,hr:h3,html:RYe,lheading:Kle,list:LYe,newline:kYe,paragraph:Zle,table:c3,text:_Ye},qle=Zr("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",h3).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",FC).getRegex(),DYe={...JO,lheading:SYe,table:qle,paragraph:Zr(KO).replace("hr",h3).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",qle).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",FC).getRegex()},NYe={...JO,html:Zr(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",QO).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:c3,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:Zr(KO).replace("hr",h3).replace("heading",` *#{1,6} *[^ -]`).replace("lheading",Kle).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},MYe=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,OYe=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,Qle=/^( {2,}|\\)\n(?!\s*$)/,PYe=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\]*?>/g,tue=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,GYe=Zr(tue,"u").replace(/punct/g,zC).getRegex(),UYe=Zr(tue,"u").replace(/punct/g,eue).getRegex(),rue="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",qYe=Zr(rue,"gu").replace(/notPunctSpace/g,Jle).replace(/punctSpace/g,eP).replace(/punct/g,zC).getRegex(),VYe=Zr(rue,"gu").replace(/notPunctSpace/g,zYe).replace(/punctSpace/g,FYe).replace(/punct/g,eue).getRegex(),HYe=Zr("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,Jle).replace(/punctSpace/g,eP).replace(/punct/g,zC).getRegex(),WYe=Zr(/\\(punct)/,"gu").replace(/punct/g,zC).getRegex(),YYe=Zr(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),XYe=Zr(QO).replace("(?:-->|$)","-->").getRegex(),jYe=Zr("^comment|^|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^").replace("comment",XYe).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),OC=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,KYe=Zr(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",OC).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),nue=Zr(/^!?\[(label)\]\[(ref)\]/).replace("label",OC).replace("ref",ZO).getRegex(),aue=Zr(/^!?\[(ref)\](?:\[\])?/).replace("ref",ZO).getRegex(),ZYe=Zr("reflink|nolink(?!\\()","g").replace("reflink",nue).replace("nolink",aue).getRegex(),tP={_backpedal:c3,anyPunctuation:WYe,autolink:YYe,blockSkip:$Ye,br:Qle,code:OYe,del:c3,emStrongLDelim:GYe,emStrongRDelimAst:qYe,emStrongRDelimUnd:HYe,escape:MYe,link:KYe,nolink:aue,punctuation:BYe,reflink:nue,reflinkSearch:ZYe,tag:jYe,text:PYe,url:c3},QYe={...tP,link:Zr(/^!?\[(label)\]\((.*?)\)/).replace("label",OC).getRegex(),reflink:Zr(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",OC).getRegex()},HO={...tP,emStrongRDelimAst:VYe,emStrongLDelim:UYe,url:Zr(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,"i").replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\.|[^\\])*?(?:\\.|[^\s~\\]))\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\":">",'"':""","'":"'"},Vle=t=>eXe[t];PC=class{options;rules;lexer;constructor(t){this.options=t||Wp}space(t){let e=this.rules.block.newline.exec(t);if(e&&e[0].length>0)return{type:"space",raw:e[0]}}code(t){let e=this.rules.block.code.exec(t);if(e){let r=e[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:e[0],codeBlockStyle:"indented",text:this.options.pedantic?r:u3(r,` -`)}}}fences(t){let e=this.rules.block.fences.exec(t);if(e){let r=e[0],n=rXe(r,e[3]||"",this.rules);return{type:"code",raw:r,lang:e[2]?e[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):e[2],text:n}}}heading(t){let e=this.rules.block.heading.exec(t);if(e){let r=e[2].trim();if(this.rules.other.endingHash.test(r)){let n=u3(r,"#");(this.options.pedantic||!n||this.rules.other.endingSpaceChar.test(n))&&(r=n.trim())}return{type:"heading",raw:e[0],depth:e[1].length,text:r,tokens:this.lexer.inline(r)}}}hr(t){let e=this.rules.block.hr.exec(t);if(e)return{type:"hr",raw:u3(e[0],` -`)}}blockquote(t){let e=this.rules.block.blockquote.exec(t);if(e){let r=u3(e[0],` +`),a=i?"+":n?"":"-";return r+a+` +`}function aO(t){return t[t.length-1]===` +`?t.slice(0,-1):t}function Ane(t,e){for(var r=/(\n+)([^\n]*)/g,n=(function(){var u=t.indexOf(` +`);return u=u!==-1?u:t.length,r.lastIndex=u,sO(t.slice(0,u),e)})(),i=t[0]===` +`||t[0]===" ",a,s;s=r.exec(t);){var o=s[1],l=s[2];a=l[0]===" ",n+=o+(!i&&!a&&l!==""?` +`:"")+sO(l,e),i=a}return n}function sO(t,e){if(t===""||t[0]===" ")return t;for(var r=/ [^ ]/g,n,i=0,a,s=0,o=0,l="";n=r.exec(t);)o=n.index,o-i>e&&(a=s>i?s:o,l+=` +`+t.slice(i,a),i=a+1),s=o;return l+=` +`,t.length-i>e&&s>i?l+=t.slice(i,s)+` +`+t.slice(s+1):l+=t.slice(i),l.slice(1)}function Lne(t){for(var e="",r=0,n,i=0;i=65536?i+=2:i++)r=h2(t,i),n=Us[r],!n&&d2(r)?(e+=t[i],r>=65536&&(e+=t[i+1])):e+=n||vne(r);return e}function Rne(t,e,r){var n="",i=t.tag,a,s,o;for(a=0,s=r.length;a"u"&&Kc(t,e,null,!1,!1))&&(n!==""&&(n+=","+(t.condenseFlow?"":" ")),n+=t.dump);t.tag=i,t.dump="["+n+"]"}function oO(t,e,r,n){var i="",a=t.tag,s,o,l;for(s=0,o=r.length;s"u"&&Kc(t,e+1,null,!0,!0,!1,!0))&&((!n||i!=="")&&(i+=kT(t,e)),t.dump&&c3===t.dump.charCodeAt(0)?i+="-":i+="- ",i+=t.dump);t.tag=a,t.dump=i||"[]"}function Dne(t,e,r){var n="",i=t.tag,a=Object.keys(r),s,o,l,u,h;for(s=0,o=a.length;s1024&&(h+="? "),h+=t.dump+(t.condenseFlow?'"':"")+":"+(t.condenseFlow?"":" "),Kc(t,e,u,!1,!1)&&(h+=t.dump,n+=h));t.tag=i,t.dump="{"+n+"}"}function Ine(t,e,r,n){var i="",a=t.tag,s=Object.keys(r),o,l,u,h,f,d;if(t.sortKeys===!0)s.sort();else if(typeof t.sortKeys=="function")s.sort(t.sortKeys);else if(t.sortKeys)throw new Vo("sortKeys must be a boolean or a function");for(o=0,l=s.length;o1024,f&&(t.dump&&c3===t.dump.charCodeAt(0)?d+="?":d+="? "),d+=t.dump,f&&(d+=kT(t,e)),Kc(t,e+1,h,!0,f)&&(t.dump&&c3===t.dump.charCodeAt(0)?d+=":":d+=": ",d+=t.dump,i+=d));t.tag=a,t.dump=i||"{}"}function lO(t,e,r){var n,i,a,s,o,l;for(i=r?t.explicitTypes:t.implicitTypes,a=0,s=i.length;a tag resolver accepts not "'+l+'" style');t.dump=n}return!0}return!1}function Kc(t,e,r,n,i,a,s){t.tag=null,t.dump=r,lO(t,r,!1)||lO(t,r,!0);var o=cne.call(t.dump),l=n,u;n&&(n=t.flowLevel<0||t.flowLevel>e);var h=o==="[object Object]"||o==="[object Array]",f,d;if(h&&(f=t.duplicates.indexOf(r),d=f!==-1),(t.tag!==null&&t.tag!=="?"||d||t.indent!==2&&e>0)&&(i=!1),d&&t.usedDuplicates[f])t.dump="*ref_"+f;else{if(h&&d&&!t.usedDuplicates[f]&&(t.usedDuplicates[f]=!0),o==="[object Object]")n&&Object.keys(t.dump).length!==0?(Ine(t,e,t.dump,i),d&&(t.dump="&ref_"+f+t.dump)):(Dne(t,e,t.dump),d&&(t.dump="&ref_"+f+" "+t.dump));else if(o==="[object Array]")n&&t.dump.length!==0?(t.noArrayIndent&&!s&&e>0?oO(t,e-1,t.dump,i):oO(t,e,t.dump,i),d&&(t.dump="&ref_"+f+t.dump)):(Rne(t,e,t.dump),d&&(t.dump="&ref_"+f+" "+t.dump));else if(o==="[object String]")t.tag!=="?"&&_ne(t,t.dump,e,a,l);else{if(o==="[object Undefined]")return!1;if(t.skipInvalid)return!1;throw new Vo("unacceptable kind of an object to dump "+o)}t.tag!==null&&t.tag!=="?"&&(u=encodeURI(t.tag[0]==="!"?t.tag.slice(1):t.tag).replace(/!/g,"%21"),t.tag[0]==="!"?u="!"+u:u.slice(0,18)==="tag:yaml.org,2002:"?u="!!"+u.slice(18):u="!<"+u+">",t.dump=u+" "+t.dump)}return!0}function Mne(t,e){var r=[],n=[],i,a;for(TT(t,r,n),i=0,a=n.length;i{Nr();b(uO,"isNothing");b(Zte,"isObject");b(Qte,"toArray");b(Jte,"extend");b(ere,"repeat");b(tre,"isNegativeZero");Kqe=uO,Zqe=Zte,Qqe=Qte,Jqe=ere,eUe=tre,tUe=Jte,$a={isNothing:Kqe,isObject:Zqe,toArray:Qqe,repeat:Jqe,isNegativeZero:eUe,extend:tUe};b(cO,"formatError");b(f2,"YAMLException$1");f2.prototype=Object.create(Error.prototype);f2.prototype.constructor=f2;f2.prototype.toString=b(function(e){return this.name+": "+cO(this,e)},"toString");Vo=f2;b(gT,"getLine");b(yT,"padStart");b(rre,"makeSnippet");rUe=rre,nUe=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],iUe=["scalar","sequence","mapping"];b(nre,"compileStyleAliases");b(ire,"Type$1");qs=ire;b(XN,"compileList");b(are,"compileMap");b(vT,"Schema$1");vT.prototype.extend=b(function(e){var r=[],n=[];if(e instanceof qs)n.push(e);else if(Array.isArray(e))n=n.concat(e);else if(e&&(Array.isArray(e.implicit)||Array.isArray(e.explicit)))e.implicit&&(r=r.concat(e.implicit)),e.explicit&&(n=n.concat(e.explicit));else throw new Vo("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");r.forEach(function(a){if(!(a instanceof qs))throw new Vo("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(a.loadKind&&a.loadKind!=="scalar")throw new Vo("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(a.multi)throw new Vo("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),n.forEach(function(a){if(!(a instanceof qs))throw new Vo("Specified list of YAML types (or a single Type object) contains a non-Type object.")});var i=Object.create(vT.prototype);return i.implicit=(this.implicit||[]).concat(r),i.explicit=(this.explicit||[]).concat(n),i.compiledImplicit=XN(i,"implicit"),i.compiledExplicit=XN(i,"explicit"),i.compiledTypeMap=are(i.compiledImplicit,i.compiledExplicit),i},"extend");aUe=vT,sUe=new qs("tag:yaml.org,2002:str",{kind:"scalar",construct:b(function(t){return t!==null?t:""},"construct")}),oUe=new qs("tag:yaml.org,2002:seq",{kind:"sequence",construct:b(function(t){return t!==null?t:[]},"construct")}),lUe=new qs("tag:yaml.org,2002:map",{kind:"mapping",construct:b(function(t){return t!==null?t:{}},"construct")}),uUe=new aUe({explicit:[sUe,oUe,lUe]});b(sre,"resolveYamlNull");b(ore,"constructYamlNull");b(lre,"isNull");cUe=new qs("tag:yaml.org,2002:null",{kind:"scalar",resolve:sre,construct:ore,predicate:lre,represent:{canonical:b(function(){return"~"},"canonical"),lowercase:b(function(){return"null"},"lowercase"),uppercase:b(function(){return"NULL"},"uppercase"),camelcase:b(function(){return"Null"},"camelcase"),empty:b(function(){return""},"empty")},defaultStyle:"lowercase"});b(ure,"resolveYamlBoolean");b(cre,"constructYamlBoolean");b(hre,"isBoolean");hUe=new qs("tag:yaml.org,2002:bool",{kind:"scalar",resolve:ure,construct:cre,predicate:hre,represent:{lowercase:b(function(t){return t?"true":"false"},"lowercase"),uppercase:b(function(t){return t?"TRUE":"FALSE"},"uppercase"),camelcase:b(function(t){return t?"True":"False"},"camelcase")},defaultStyle:"lowercase"});b(fre,"isHexCode");b(dre,"isOctCode");b(pre,"isDecCode");b(mre,"resolveYamlInteger");b(gre,"constructYamlInteger");b(yre,"isInteger");fUe=new qs("tag:yaml.org,2002:int",{kind:"scalar",resolve:mre,construct:gre,predicate:yre,represent:{binary:b(function(t){return t>=0?"0b"+t.toString(2):"-0b"+t.toString(2).slice(1)},"binary"),octal:b(function(t){return t>=0?"0o"+t.toString(8):"-0o"+t.toString(8).slice(1)},"octal"),decimal:b(function(t){return t.toString(10)},"decimal"),hexadecimal:b(function(t){return t>=0?"0x"+t.toString(16).toUpperCase():"-0x"+t.toString(16).toUpperCase().slice(1)},"hexadecimal")},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),dUe=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");b(vre,"resolveYamlFloat");b(xre,"constructYamlFloat");pUe=/^[-+]?[0-9]+e/;b(bre,"representYamlFloat");b(wre,"isFloat");mUe=new qs("tag:yaml.org,2002:float",{kind:"scalar",resolve:vre,construct:xre,predicate:wre,represent:bre,defaultStyle:"lowercase"}),kre=uUe.extend({implicit:[cUe,hUe,fUe,mUe]}),gUe=kre,Tre=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),Ere=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]))?))?$");b(Sre,"resolveYamlTimestamp");b(Cre,"constructYamlTimestamp");b(_re,"representYamlTimestamp");yUe=new qs("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:Sre,construct:Cre,instanceOf:Date,represent:_re});b(Are,"resolveYamlMerge");vUe=new qs("tag:yaml.org,2002:merge",{kind:"scalar",resolve:Are}),hO=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/= +\r`;b(Lre,"resolveYamlBinary");b(Rre,"constructYamlBinary");b(Dre,"representYamlBinary");b(Ire,"isBinary");xUe=new qs("tag:yaml.org,2002:binary",{kind:"scalar",resolve:Lre,construct:Rre,predicate:Ire,represent:Dre}),bUe=Object.prototype.hasOwnProperty,wUe=Object.prototype.toString;b(Mre,"resolveYamlOmap");b(Nre,"constructYamlOmap");kUe=new qs("tag:yaml.org,2002:omap",{kind:"sequence",resolve:Mre,construct:Nre}),TUe=Object.prototype.toString;b(Ore,"resolveYamlPairs");b(Pre,"constructYamlPairs");EUe=new qs("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:Ore,construct:Pre}),SUe=Object.prototype.hasOwnProperty;b(Bre,"resolveYamlSet");b(Fre,"constructYamlSet");CUe=new qs("tag:yaml.org,2002:set",{kind:"mapping",resolve:Bre,construct:Fre}),zre=gUe.extend({implicit:[yUe,vUe],explicit:[xUe,kUe,EUe,CUe]}),Zf=Object.prototype.hasOwnProperty,xT=1,$re=2,Gre=3,bT=4,YN=1,_Ue=2,jte=3,AUe=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,LUe=/[\x85\u2028\u2029]/,RUe=/[,\[\]\{\}]/,qre=/^(?:!|!!|![a-z\-]+!)$/i,Ure=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;b(jN,"_class");b(Hu,"is_EOL");b(Kf,"is_WHITE_SPACE");b(fo,"is_WS_OR_EOL");b(_1,"is_FLOW_INDICATOR");b(Hre,"fromHexCode");b(Vre,"escapedHexLen");b(Wre,"fromDecimalCode");b(KN,"simpleEscapeSequence");b(Yre,"charFromCodepoint");Xre=new Array(256),jre=new Array(256);for(C1=0;C1<256;C1++)Xre[C1]=KN(C1)?1:0,jre[C1]=KN(C1);b(Kre,"State$1");b(fO,"generateError");b(mr,"throwError");b(u3,"throwWarning");Kte={YAML:b(function(e,r,n){var i,a,s;e.version!==null&&mr(e,"duplication of %YAML directive"),n.length!==1&&mr(e,"YAML directive accepts exactly one argument"),i=/^([0-9]+)\.([0-9]+)$/.exec(n[0]),i===null&&mr(e,"ill-formed argument of the YAML directive"),a=parseInt(i[1],10),s=parseInt(i[2],10),a!==1&&mr(e,"unacceptable YAML version of the document"),e.version=n[0],e.checkLineBreaks=s<2,s!==1&&s!==2&&u3(e,"unsupported YAML version of the document")},"handleYamlDirective"),TAG:b(function(e,r,n){var i,a;n.length!==2&&mr(e,"TAG directive accepts exactly two arguments"),i=n[0],a=n[1],qre.test(i)||mr(e,"ill-formed tag handle (first argument) of the TAG directive"),Zf.call(e.tagMap,i)&&mr(e,'there is a previously declared suffix for "'+i+'" tag handle'),Ure.test(a)||mr(e,"ill-formed tag prefix (second argument) of the TAG directive");try{a=decodeURIComponent(a)}catch{mr(e,"tag prefix is malformed: "+a)}e.tagMap[i]=a},"handleTagDirective")};b(Sh,"captureSegment");b(ZN,"mergeMappings");b(A1,"storeMappingPair");b(ET,"readLineBreak");b(sa,"skipSeparationSpace");b(d3,"testDocumentSeparator");b(ST,"writeFoldedLines");b(Zre,"readPlainScalar");b(Qre,"readSingleQuotedScalar");b(Jre,"readDoubleQuotedScalar");b(ene,"readFlowCollection");b(tne,"readBlockScalar");b(QN,"readBlockSequence");b(rne,"readBlockMapping");b(nne,"readTagProperty");b(ine,"readAnchorProperty");b(ane,"readAlias");b(L1,"composeNode");b(sne,"readDocument");b(dO,"loadDocuments");b(one,"loadAll$1");b(lne,"load$1");DUe=one,IUe=lne,une={loadAll:DUe,load:IUe},cne=Object.prototype.toString,hne=Object.prototype.hasOwnProperty,pO=65279,MUe=9,c3=10,NUe=13,OUe=32,PUe=33,BUe=34,JN=35,FUe=37,zUe=38,$Ue=39,GUe=42,fne=44,qUe=45,wT=58,UUe=61,HUe=62,VUe=63,WUe=64,dne=91,pne=93,YUe=96,mne=123,XUe=124,gne=125,Us={};Us[0]="\\0";Us[7]="\\a";Us[8]="\\b";Us[9]="\\t";Us[10]="\\n";Us[11]="\\v";Us[12]="\\f";Us[13]="\\r";Us[27]="\\e";Us[34]='\\"';Us[92]="\\\\";Us[133]="\\N";Us[160]="\\_";Us[8232]="\\L";Us[8233]="\\P";jUe=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],KUe=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;b(yne,"compileStyleMap");b(vne,"encodeHex");ZUe=1,h3=2;b(xne,"State");b(eO,"indentString");b(kT,"generateNextLine");b(bne,"testImplicitResolving");b(f3,"isWhitespace");b(d2,"isPrintable");b(tO,"isNsCharOrWhitespace");b(rO,"isPlainSafe");b(wne,"isPlainSafeFirst");b(kne,"isPlainSafeLast");b(h2,"codePointAt");b(mO,"needIndentIndicator");Tne=1,nO=2,Ene=3,Sne=4,c2=5;b(Cne,"chooseScalarStyle");b(_ne,"writeScalar");b(iO,"blockHeader");b(aO,"dropEndingNewline");b(Ane,"foldString");b(sO,"foldLine");b(Lne,"escapeString");b(Rne,"writeFlowSequence");b(oO,"writeBlockSequence");b(Dne,"writeFlowMapping");b(Ine,"writeBlockMapping");b(lO,"detectType");b(Kc,"writeNode");b(Mne,"getDuplicateReferences");b(TT,"inspectNode");b(Nne,"dump$1");QUe=Nne,JUe={dump:QUe};b(CT,"renamed");p2=kre,m2=une.load,MFt=une.loadAll,NFt=JUe.dump,OFt=CT("safeLoad","load"),PFt=CT("safeLoadAll","loadAll"),BFt=CT("safeDump","dump");});function p3(t,e){if(t===void 0||e===void 0)return{angle:0,deltaX:0,deltaY:0};t=Ci(t),e=Ci(e);let[r,n]=[t.x,t.y],[i,a]=[e.x,e.y],s=i-r,o=a-n;return{angle:Math.atan(o/s),deltaX:s,deltaY:o}}var nu,Ci,AT,iu=D(()=>{Nr();nu={aggregation:18,extension:18,composition:18,dependency:6,lollipop:13.5,arrow_point:4};b(p3,"calculateDeltaAndAngle");Ci=b(t=>Array.isArray(t)?{x:t[0],y:t[1]}:t,"pointTransformer"),AT=b(t=>({x:b(function(e,r,n){let i=0,a=Ci(n[0]).x=0?1:-1)}else if(r===n.length-1&&Object.hasOwn(nu,t.arrowTypeEnd)){let{angle:p,deltaX:m}=p3(n[n.length-1],n[n.length-2]);i=nu[t.arrowTypeEnd]*Math.cos(p)*(m>=0?1:-1)}let s=Math.abs(Ci(e).x-Ci(n[n.length-1]).x),o=Math.abs(Ci(e).y-Ci(n[n.length-1]).y),l=Math.abs(Ci(e).x-Ci(n[0]).x),u=Math.abs(Ci(e).y-Ci(n[0]).y),h=nu[t.arrowTypeStart],f=nu[t.arrowTypeEnd],d=1;if(s0&&o0&&u=0?1:-1)}else if(r===n.length-1&&Object.hasOwn(nu,t.arrowTypeEnd)){let{angle:p,deltaY:m}=p3(n[n.length-1],n[n.length-2]);i=nu[t.arrowTypeEnd]*Math.abs(Math.sin(p))*(m>=0?1:-1)}let s=Math.abs(Ci(e).y-Ci(n[n.length-1]).y),o=Math.abs(Ci(e).x-Ci(n[n.length-1]).x),l=Math.abs(Ci(e).y-Ci(n[0]).y),u=Math.abs(Ci(e).x-Ci(n[0]).x),h=nu[t.arrowTypeStart],f=nu[t.arrowTypeEnd],d=1;if(s0&&o0&&u{Nr();Ch=b(({flowchart:t})=>{let e=t?.subGraphTitleMargin?.top??0,r=t?.subGraphTitleMargin?.bottom??0,n=e+r;return{subGraphTitleTopMargin:e,subGraphTitleBottomMargin:r,subGraphTitleTotalMargin:n}},"getSubGraphTitleMargins")});var eHe,g2,gO,One,LT=D(()=>{eHe=Object.freeze({left:0,top:0,width:16,height:16}),g2=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),gO=Object.freeze({...eHe,...g2}),One=Object.freeze({...gO,body:"",hidden:!1})});var tHe,Pne,Bne=D(()=>{LT();tHe=Object.freeze({width:null,height:null}),Pne=Object.freeze({...tHe,...g2})});var yO,RT,Fne=D(()=>{yO=(t,e,r,n="")=>{let i=t.split(":");if(t.slice(0,1)==="@"){if(i.length<2||i.length>3)return null;n=i.shift().slice(1)}if(i.length>3||!i.length)return null;if(i.length>1){let o=i.pop(),l=i.pop(),u={provider:i.length>0?i[0]:n,prefix:l,name:o};return e&&!RT(u)?null:u}let a=i[0],s=a.split("-");if(s.length>1){let o={provider:n,prefix:s.shift(),name:s.join("-")};return e&&!RT(o)?null:o}if(r&&n===""){let o={provider:n,prefix:"",name:a};return e&&!RT(o,r)?null:o}return null},RT=(t,e)=>t?!!((e&&t.prefix===""||t.prefix)&&t.name):!1});function zne(t,e){let r={};!t.hFlip!=!e.hFlip&&(r.hFlip=!0),!t.vFlip!=!e.vFlip&&(r.vFlip=!0);let n=((t.rotate||0)+(e.rotate||0))%4;return n&&(r.rotate=n),r}var $ne=D(()=>{});function vO(t,e){let r=zne(t,e);for(let n in One)n in g2?n in t&&!(n in r)&&(r[n]=g2[n]):n in e?r[n]=e[n]:n in t&&(r[n]=t[n]);return r}var Gne=D(()=>{LT();$ne()});function qne(t,e){let r=t.icons,n=t.aliases||Object.create(null),i=Object.create(null);function a(s){if(r[s])return i[s]=[];if(!(s in i)){i[s]=null;let o=n[s]&&n[s].parent,l=o&&a(o);l&&(i[s]=[o].concat(l))}return i[s]}return(e||Object.keys(r).concat(Object.keys(n))).forEach(a),i}var Une=D(()=>{});function Hne(t,e,r){let n=t.icons,i=t.aliases||Object.create(null),a={};function s(o){a=vO(n[o]||i[o],a)}return s(e),r.forEach(s),vO(t,a)}function xO(t,e){if(t.icons[e])return Hne(t,e,[]);let r=qne(t,[e])[e];return r?Hne(t,e,r):null}var Vne=D(()=>{Gne();Une()});function bO(t,e,r){if(e===1)return t;if(r=r||100,typeof t=="number")return Math.ceil(t*e*r)/r;if(typeof t!="string")return t;let n=t.split(rHe);if(n===null||!n.length)return t;let i=[],a=n.shift(),s=nHe.test(a);for(;;){if(s){let o=parseFloat(a);isNaN(o)?i.push(a):i.push(Math.ceil(o*e*r)/r)}else i.push(a);if(a=n.shift(),a===void 0)return i.join("");s=!s}}var rHe,nHe,Wne=D(()=>{rHe=/(-?[0-9.]*[0-9]+[0-9.]*)/g,nHe=/^-?[0-9.]*[0-9]+[0-9.]*$/g});function iHe(t,e="defs"){let r="",n=t.indexOf("<"+e);for(;n>=0;){let i=t.indexOf(">",n),a=t.indexOf("",a);if(s===-1)break;r+=t.slice(i+1,a).trim(),t=t.slice(0,n).trim()+t.slice(s+1)}return{defs:r,content:t}}function aHe(t,e){return t?""+t+""+e:e}function Yne(t,e,r){let n=iHe(t);return aHe(n.defs,e+n.content+r)}var Xne=D(()=>{});function wO(t,e){let r={...gO,...t},n={...Pne,...e},i={left:r.left,top:r.top,width:r.width,height:r.height},a=r.body;[r,n].forEach(g=>{let y=[],v=g.hFlip,x=g.vFlip,k=g.rotate;v?x?k+=2:(y.push("translate("+(i.width+i.left).toString()+" "+(0-i.top).toString()+")"),y.push("scale(-1 1)"),i.top=i.left=0):x&&(y.push("translate("+(0-i.left).toString()+" "+(i.height+i.top).toString()+")"),y.push("scale(1 -1)"),i.top=i.left=0);let _;switch(k<0&&(k-=Math.floor(k/4)*4),k=k%4,k){case 1:_=i.height/2+i.top,y.unshift("rotate(90 "+_.toString()+" "+_.toString()+")");break;case 2:y.unshift("rotate(180 "+(i.width/2+i.left).toString()+" "+(i.height/2+i.top).toString()+")");break;case 3:_=i.width/2+i.left,y.unshift("rotate(-90 "+_.toString()+" "+_.toString()+")");break}k%2===1&&(i.left!==i.top&&(_=i.left,i.left=i.top,i.top=_),i.width!==i.height&&(_=i.width,i.width=i.height,i.height=_)),y.length&&(a=Yne(a,'',""))});let s=n.width,o=n.height,l=i.width,u=i.height,h,f;s===null?(f=o===null?"1em":o==="auto"?u:o,h=bO(f,l/u)):(h=s==="auto"?l:s,f=o===null?bO(h,u/l):o==="auto"?u:o);let d={},p=(g,y)=>{sHe(y)||(d[g]=y.toString())};p("width",h),p("height",f);let m=[i.left,i.top,l,u];return d.viewBox=m.join(" "),{attributes:d,viewBox:m,body:a}}var sHe,jne=D(()=>{LT();Bne();Wne();Xne();sHe=t=>t==="unset"||t==="undefined"||t==="none"});function kO(t,e=lHe){let r=[],n;for(;n=oHe.exec(t);)r.push(n[1]);if(!r.length)return t;let i="suffix"+(Math.random()*16777216|Date.now()).toString(16);return r.forEach(a=>{let s=typeof e=="function"?e(a):e+(uHe++).toString(),o=a.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");t=t.replace(new RegExp('([#;"])('+o+')([")]|\\.[a-z])',"g"),"$1"+s+i+"$3")}),t=t.replace(new RegExp(i,"g"),""),t}var oHe,lHe,uHe,Kne=D(()=>{oHe=/\sid="(\S+)"/g,lHe="IconifyId"+Date.now().toString(16)+(Math.random()*16777216|0).toString(16),uHe=0});function TO(t,e){let r=t.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(let n in e)r+=" "+n+'="'+e[n]+'"';return'"+t+""}var Zne=D(()=>{});var Jne=Bi((czt,Qne)=>{var y2=1e3,v2=y2*60,x2=v2*60,R1=x2*24,cHe=R1*7,hHe=R1*365.25;Qne.exports=function(t,e){e=e||{};var r=typeof t;if(r==="string"&&t.length>0)return fHe(t);if(r==="number"&&isFinite(t))return e.long?pHe(t):dHe(t);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(t))};function fHe(t){if(t=String(t),!(t.length>100)){var e=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(t);if(e){var r=parseFloat(e[1]),n=(e[2]||"ms").toLowerCase();switch(n){case"years":case"year":case"yrs":case"yr":case"y":return r*hHe;case"weeks":case"week":case"w":return r*cHe;case"days":case"day":case"d":return r*R1;case"hours":case"hour":case"hrs":case"hr":case"h":return r*x2;case"minutes":case"minute":case"mins":case"min":case"m":return r*v2;case"seconds":case"second":case"secs":case"sec":case"s":return r*y2;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return r;default:return}}}}function dHe(t){var e=Math.abs(t);return e>=R1?Math.round(t/R1)+"d":e>=x2?Math.round(t/x2)+"h":e>=v2?Math.round(t/v2)+"m":e>=y2?Math.round(t/y2)+"s":t+"ms"}function pHe(t){var e=Math.abs(t);return e>=R1?DT(t,e,R1,"day"):e>=x2?DT(t,e,x2,"hour"):e>=v2?DT(t,e,v2,"minute"):e>=y2?DT(t,e,y2,"second"):t+" ms"}function DT(t,e,r,n){var i=e>=r*1.5;return Math.round(t/r)+" "+n+(i?"s":"")}});var tie=Bi((hzt,eie)=>{function mHe(t){r.debug=r,r.default=r,r.coerce=l,r.disable=s,r.enable=i,r.enabled=o,r.humanize=Jne(),r.destroy=u,Object.keys(t).forEach(h=>{r[h]=t[h]}),r.names=[],r.skips=[],r.formatters={};function e(h){let f=0;for(let d=0;d{if(S==="%%")return"%";_++;let A=r.formatters[R];if(typeof A=="function"){let I=y[_];S=A.call(v,I),y.splice(_,1),_--}return S}),r.formatArgs.call(v,y),(v.log||r.log).apply(v,y)}return g.namespace=h,g.useColors=r.useColors(),g.color=r.selectColor(h),g.extend=n,g.destroy=r.destroy,Object.defineProperty(g,"enabled",{enumerable:!0,configurable:!1,get:()=>d!==null?d:(p!==r.namespaces&&(p=r.namespaces,m=r.enabled(h)),m),set:y=>{d=y}}),typeof r.init=="function"&&r.init(g),g}function n(h,f){let d=r(this.namespace+(typeof f>"u"?":":f)+h);return d.log=this.log,d}function i(h){r.save(h),r.namespaces=h,r.names=[],r.skips=[];let f=(typeof h=="string"?h:"").trim().replace(/\s+/g,",").split(",").filter(Boolean);for(let d of f)d[0]==="-"?r.skips.push(d.slice(1)):r.names.push(d)}function a(h,f){let d=0,p=0,m=-1,g=0;for(;d"-"+f)].join(",");return r.enable(""),h}function o(h){for(let f of r.skips)if(a(h,f))return!1;for(let f of r.names)if(a(h,f))return!0;return!1}function l(h){return h instanceof Error?h.stack||h.message:h}function u(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}return r.enable(r.load()),r}eie.exports=mHe});var rie=Bi((Yo,IT)=>{Yo.formatArgs=yHe;Yo.save=vHe;Yo.load=xHe;Yo.useColors=gHe;Yo.storage=bHe();Yo.destroy=(()=>{let t=!1;return()=>{t||(t=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})();Yo.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function gHe(){if(typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs))return!0;if(typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;let t;return typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&(t=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(t[1],10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function yHe(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+IT.exports.humanize(this.diff),!this.useColors)return;let e="color: "+this.color;t.splice(1,0,e,"color: inherit");let r=0,n=0;t[0].replace(/%[a-zA-Z%]/g,i=>{i!=="%%"&&(r++,i==="%c"&&(n=r))}),t.splice(n,0,e)}Yo.log=console.debug||console.log||(()=>{});function vHe(t){try{t?Yo.storage.setItem("debug",t):Yo.storage.removeItem("debug")}catch{}}function xHe(){let t;try{t=Yo.storage.getItem("debug")||Yo.storage.getItem("DEBUG")}catch{}return!t&&typeof process<"u"&&"env"in process&&(t=process.env.DEBUG),t}function bHe(){try{return localStorage}catch{}}IT.exports=tie()(Yo);var{formatters:wHe}=IT.exports;wHe.j=function(t){try{return JSON.stringify(t)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}});var dzt,nie=D(()=>{Fne();Vne();jne();Kne();Zne();dzt=Na(rie(),1)});var SO,EO,iie,MT,kHe,_h,Al=D(()=>{Nr();nie();SO={body:'?',height:80,width:80},EO=new Map,iie=new Map,MT=b(t=>{for(let e of t){if(!e.name)throw new Error('Invalid icon loader. Must have a "name" property with non-empty string value.');if(he.debug("Registering icon pack:",e.name),"loader"in e)iie.set(e.name,e.loader);else if("icons"in e)EO.set(e.name,e.icons);else throw he.error("Invalid icon loader:",e),new Error('Invalid icon loader. Must have either "icons" or "loader" property.')}},"registerIconPacks"),kHe=b(async(t,e)=>{let r=yO(t,!0,e!==void 0);if(!r)throw new Error(`Invalid icon name: ${t}`);let n=r.prefix||e;if(!n)throw new Error(`Icon name must contain a prefix: ${t}`);let i=EO.get(n);if(!i){let s=iie.get(n);if(!s)throw new Error(`Icon set not found: ${r.prefix}`);try{i={...await s(),prefix:n},EO.set(n,i)}catch(o){throw he.error(o),new Error(`Failed to load icon set: ${r.prefix}`)}}let a=xO(i,r.name);if(!a)throw new Error(`Icon not found: ${t}`);return a},"getRegisteredIconData"),_h=b(async(t,e)=>{let r;try{r=await kHe(t,e?.fallbackPrefix)}catch(a){he.error(a),r=SO}let n=wO(r,e);return TO(kO(n.body),n.attributes)},"getIconSVG")});var aie=Bi(ns=>{"use strict";Object.defineProperty(ns,"__esModule",{value:!0});ns.BLANK_URL=ns.relativeFirstCharacters=ns.whitespaceEscapeCharsRegex=ns.urlSchemeRegex=ns.ctrlCharactersRegex=ns.htmlCtrlEntityRegex=ns.htmlEntitiesRegex=ns.invalidProtocolRegex=void 0;ns.invalidProtocolRegex=/^([^\w]*)(javascript|data|vbscript)/im;ns.htmlEntitiesRegex=/&#(\w+)(^\w|;)?/g;ns.htmlCtrlEntityRegex=/&(newline|tab);/gi;ns.ctrlCharactersRegex=/[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim;ns.urlSchemeRegex=/^.+(:|:)/gim;ns.whitespaceEscapeCharsRegex=/(\\|%5[cC])((%(6[eE]|72|74))|[nrt])/g;ns.relativeFirstCharacters=[".","/"];ns.BLANK_URL="about:blank"});var b2=Bi(CO=>{"use strict";Object.defineProperty(CO,"__esModule",{value:!0});CO.sanitizeUrl=CHe;var Hs=aie();function THe(t){return Hs.relativeFirstCharacters.indexOf(t[0])>-1}function EHe(t){var e=t.replace(Hs.ctrlCharactersRegex,"");return e.replace(Hs.htmlEntitiesRegex,function(r,n){return String.fromCharCode(n)})}function SHe(t){return URL.canParse(t)}function sie(t){try{return decodeURIComponent(t)}catch{return t}}function CHe(t){if(!t)return Hs.BLANK_URL;var e,r=sie(t.trim());do r=EHe(r).replace(Hs.htmlCtrlEntityRegex,"").replace(Hs.ctrlCharactersRegex,"").replace(Hs.whitespaceEscapeCharsRegex,"").trim(),r=sie(r),e=r.match(Hs.ctrlCharactersRegex)||r.match(Hs.htmlEntitiesRegex)||r.match(Hs.htmlCtrlEntityRegex)||r.match(Hs.whitespaceEscapeCharsRegex);while(e&&e.length>0);var n=r;if(!n)return Hs.BLANK_URL;if(THe(n))return n;var i=n.trimStart(),a=i.match(Hs.urlSchemeRegex);if(!a)return n;var s=a[0].toLowerCase().trim();if(Hs.invalidProtocolRegex.test(s))return Hs.BLANK_URL;var o=i.replace(/\\/g,"/");if(s==="mailto:"||s.includes("://"))return o;if(s==="http:"||s==="https:"){if(!SHe(o))return Hs.BLANK_URL;var l=new URL(o);return l.protocol=l.protocol.toLowerCase(),l.hostname=l.hostname.toLowerCase(),l.toString()}return o}});function D1(t,e){return t==null||e==null?NaN:te?1:t>=e?0:NaN}var _O=D(()=>{});function AO(t,e){return t==null||e==null?NaN:et?1:e>=t?0:NaN}var oie=D(()=>{});function I1(t){let e,r,n;t.length!==2?(e=D1,r=(o,l)=>D1(t(o),l),n=(o,l)=>t(o)-l):(e=t===D1||t===AO?t:_He,r=t,n=t);function i(o,l,u=0,h=o.length){if(u>>1;r(o[f],l)<0?u=f+1:h=f}while(u>>1;r(o[f],l)<=0?u=f+1:h=f}while(uu&&n(o[f-1],l)>-n(o[f],l)?f-1:f}return{left:i,center:s,right:a}}function _He(){return 0}var LO=D(()=>{_O();oie()});function RO(t){return t===null?NaN:+t}var lie=D(()=>{});var uie,cie,AHe,LHe,DO,hie=D(()=>{_O();LO();lie();uie=I1(D1),cie=uie.right,AHe=uie.left,LHe=I1(RO).center,DO=cie});function fie({_intern:t,_key:e},r){let n=e(r);return t.has(n)?t.get(n):r}function RHe({_intern:t,_key:e},r){let n=e(r);return t.has(n)?t.get(n):(t.set(n,r),r)}function DHe({_intern:t,_key:e},r){let n=e(r);return t.has(n)&&(r=t.get(n),t.delete(n)),r}function IHe(t){return t!==null&&typeof t=="object"?t.valueOf():t}var w2,die=D(()=>{w2=class extends Map{constructor(e,r=IHe){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:r}}),e!=null)for(let[n,i]of e)this.set(n,i)}get(e){return super.get(fie(this,e))}has(e){return super.has(fie(this,e))}set(e,r){return super.set(RHe(this,e),r)}delete(e){return super.delete(DHe(this,e))}}});function NT(t,e,r){let n=(e-t)/Math.max(0,r),i=Math.floor(Math.log10(n)),a=n/Math.pow(10,i),s=a>=MHe?10:a>=NHe?5:a>=OHe?2:1,o,l,u;return i<0?(u=Math.pow(10,-i)/s,o=Math.round(t*u),l=Math.round(e*u),o/ue&&--l,u=-u):(u=Math.pow(10,i)*s,o=Math.round(t/u),l=Math.round(e/u),o*ue&&--l),l0))return[];if(t===e)return[t];let n=e=i))return[];let o=a-i+1,l=new Array(o);if(n)if(s<0)for(let u=0;u{MHe=Math.sqrt(50),NHe=Math.sqrt(10),OHe=Math.sqrt(2)});function PT(t,e){let r;if(e===void 0)for(let n of t)n!=null&&(r=n)&&(r=n);else{let n=-1;for(let i of t)(i=e(i,++n,t))!=null&&(r=i)&&(r=i)}return r}var mie=D(()=>{});function BT(t,e){let r;if(e===void 0)for(let n of t)n!=null&&(r>n||r===void 0&&n>=n)&&(r=n);else{let n=-1;for(let i of t)(i=e(i,++n,t))!=null&&(r>i||r===void 0&&i>=i)&&(r=i)}return r}var gie=D(()=>{});function FT(t,e,r){t=+t,e=+e,r=(i=arguments.length)<2?(e=t,t=0,1):i<3?1:+r;for(var n=-1,i=Math.max(0,Math.ceil((e-t)/r))|0,a=new Array(i);++n{});var Qf=D(()=>{hie();LO();mie();gie();yie();pie();die()});function vie(t){return t}var xie=D(()=>{});function PHe(t){return"translate("+t+",0)"}function BHe(t){return"translate(0,"+t+")"}function FHe(t){return e=>+t(e)}function zHe(t,e){return e=Math.max(0,t.bandwidth()-e*2)/2,t.round()&&(e=Math.round(e)),r=>+t(r)+e}function $He(){return!this.__axis}function wie(t,e){var r=[],n=null,i=null,a=6,s=6,o=3,l=typeof window<"u"&&window.devicePixelRatio>1?0:.5,u=t===$T||t===zT?-1:1,h=t===zT||t===IO?"x":"y",f=t===$T||t===MO?PHe:BHe;function d(p){var m=n??(e.ticks?e.ticks.apply(e,r):e.domain()),g=i??(e.tickFormat?e.tickFormat.apply(e,r):vie),y=Math.max(a,0)+o,v=e.range(),x=+v[0]+l,k=+v[v.length-1]+l,_=(e.bandwidth?zHe:FHe)(e.copy(),l),T=p.selection?p.selection():p,S=T.selectAll(".domain").data([null]),R=T.selectAll(".tick").data(m,e).order(),A=R.exit(),I=R.enter().append("g").attr("class","tick"),P=R.select("line"),O=R.select("text");S=S.merge(S.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),R=R.merge(I),P=P.merge(I.append("line").attr("stroke","currentColor").attr(h+"2",u*a)),O=O.merge(I.append("text").attr("fill","currentColor").attr(h,u*y).attr("dy",t===$T?"0em":t===MO?"0.71em":"0.32em")),p!==T&&(S=S.transition(p),R=R.transition(p),P=P.transition(p),O=O.transition(p),A=A.transition(p).attr("opacity",bie).attr("transform",function(C){return isFinite(C=_(C))?f(C+l):this.getAttribute("transform")}),I.attr("opacity",bie).attr("transform",function(C){var N=this.parentNode.__axis;return f((N&&isFinite(N=N(C))?N:_(C))+l)})),A.remove(),S.attr("d",t===zT||t===IO?s?"M"+u*s+","+x+"H"+l+"V"+k+"H"+u*s:"M"+l+","+x+"V"+k:s?"M"+x+","+u*s+"V"+l+"H"+k+"V"+u*s:"M"+x+","+l+"H"+k),R.attr("opacity",1).attr("transform",function(C){return f(_(C)+l)}),P.attr(h+"2",u*a),O.attr(h,u*y).text(g),T.filter($He).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",t===IO?"start":t===zT?"end":"middle"),T.each(function(){this.__axis=_})}return d.scale=function(p){return arguments.length?(e=p,d):e},d.ticks=function(){return r=Array.from(arguments),d},d.tickArguments=function(p){return arguments.length?(r=p==null?[]:Array.from(p),d):r.slice()},d.tickValues=function(p){return arguments.length?(n=p==null?null:Array.from(p),d):n&&n.slice()},d.tickFormat=function(p){return arguments.length?(i=p,d):i},d.tickSize=function(p){return arguments.length?(a=s=+p,d):a},d.tickSizeInner=function(p){return arguments.length?(a=+p,d):a},d.tickSizeOuter=function(p){return arguments.length?(s=+p,d):s},d.tickPadding=function(p){return arguments.length?(o=+p,d):o},d.offset=function(p){return arguments.length?(l=+p,d):l},d}function NO(t){return wie($T,t)}function OO(t){return wie(MO,t)}var $T,IO,MO,zT,bie,kie=D(()=>{xie();$T=1,IO=2,MO=3,zT=4,bie=1e-6});var Tie=D(()=>{kie()});function Sie(){for(var t=0,e=arguments.length,r={},n;t=0&&(n=r.slice(i+1),r=r.slice(0,i)),r&&!e.hasOwnProperty(r))throw new Error("unknown type: "+r);return{type:r,name:n}})}function UHe(t,e){for(var r=0,n=t.length,i;r{GHe={value:()=>{}};GT.prototype=Sie.prototype={constructor:GT,on:function(t,e){var r=this._,n=qHe(t+"",r),i,a=-1,s=n.length;if(arguments.length<2){for(;++a0)for(var r=new Array(i),n=0,i,a;n{Cie()});var qT,FO,zO=D(()=>{qT="http://www.w3.org/1999/xhtml",FO={svg:"http://www.w3.org/2000/svg",xhtml:qT,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"}});function Ah(t){var e=t+="",r=e.indexOf(":");return r>=0&&(e=t.slice(0,r))!=="xmlns"&&(t=t.slice(r+1)),FO.hasOwnProperty(e)?{space:FO[e],local:t}:t}var UT=D(()=>{zO()});function HHe(t){return function(){var e=this.ownerDocument,r=this.namespaceURI;return r===qT&&e.documentElement.namespaceURI===qT?e.createElement(t):e.createElementNS(r,t)}}function VHe(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function HT(t){var e=Ah(t);return(e.local?VHe:HHe)(e)}var $O=D(()=>{UT();zO()});function WHe(){}function M1(t){return t==null?WHe:function(){return this.querySelector(t)}}var VT=D(()=>{});function _ie(t){typeof t!="function"&&(t=M1(t));for(var e=this._groups,r=e.length,n=new Array(r),i=0;i{Vu();VT()});function GO(t){return t==null?[]:Array.isArray(t)?t:Array.from(t)}var Lie=D(()=>{});function YHe(){return[]}function g3(t){return t==null?YHe:function(){return this.querySelectorAll(t)}}var qO=D(()=>{});function XHe(t){return function(){return GO(t.apply(this,arguments))}}function Rie(t){typeof t=="function"?t=XHe(t):t=g3(t);for(var e=this._groups,r=e.length,n=[],i=[],a=0;a{Vu();Lie();qO()});function y3(t){return function(){return this.matches(t)}}function WT(t){return function(e){return e.matches(t)}}var v3=D(()=>{});function KHe(t){return function(){return jHe.call(this.children,t)}}function ZHe(){return this.firstElementChild}function Iie(t){return this.select(t==null?ZHe:KHe(typeof t=="function"?t:WT(t)))}var jHe,Mie=D(()=>{v3();jHe=Array.prototype.find});function JHe(){return Array.from(this.children)}function eVe(t){return function(){return QHe.call(this.children,t)}}function Nie(t){return this.selectAll(t==null?JHe:eVe(typeof t=="function"?t:WT(t)))}var QHe,Oie=D(()=>{v3();QHe=Array.prototype.filter});function Pie(t){typeof t!="function"&&(t=y3(t));for(var e=this._groups,r=e.length,n=new Array(r),i=0;i{Vu();v3()});function YT(t){return new Array(t.length)}var UO=D(()=>{});function Fie(){return new Xi(this._enter||this._groups.map(YT),this._parents)}function x3(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}var HO=D(()=>{UO();Vu();x3.prototype={constructor:x3,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 zie(t){return function(){return t}}var $ie=D(()=>{});function tVe(t,e,r,n,i,a){for(var s=0,o,l=e.length,u=a.length;s=k&&(k=x+1);!(T=y[k])&&++k{Vu();HO();$ie()});function Uie(){return new Xi(this._exit||this._groups.map(YT),this._parents)}var Hie=D(()=>{UO();Vu()});function Vie(t,e,r){var n=this.enter(),i=this,a=this.exit();return typeof t=="function"?(n=t(n),n&&(n=n.selection())):n=n.append(t+""),e!=null&&(i=e(i),i&&(i=i.selection())),r==null?a.remove():r(a),n&&i?n.merge(i).order():i}var Wie=D(()=>{});function Yie(t){for(var e=t.selection?t.selection():t,r=this._groups,n=e._groups,i=r.length,a=n.length,s=Math.min(i,a),o=new Array(i),l=0;l{Vu()});function jie(){for(var t=this._groups,e=-1,r=t.length;++e=0;)(s=n[i])&&(a&&s.compareDocumentPosition(a)^4&&a.parentNode.insertBefore(s,a),a=s);return this}var Kie=D(()=>{});function Zie(t){t||(t=aVe);function e(f,d){return f&&d?t(f.__data__,d.__data__):!f-!d}for(var r=this._groups,n=r.length,i=new Array(n),a=0;ae?1:t>=e?0:NaN}var Qie=D(()=>{Vu()});function Jie(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this}var eae=D(()=>{});function tae(){return Array.from(this)}var rae=D(()=>{});function nae(){for(var t=this._groups,e=0,r=t.length;e{});function aae(){let t=0;for(let e of this)++t;return t}var sae=D(()=>{});function oae(){return!this.node()}var lae=D(()=>{});function uae(t){for(var e=this._groups,r=0,n=e.length;r{});function sVe(t){return function(){this.removeAttribute(t)}}function oVe(t){return function(){this.removeAttributeNS(t.space,t.local)}}function lVe(t,e){return function(){this.setAttribute(t,e)}}function uVe(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function cVe(t,e){return function(){var r=e.apply(this,arguments);r==null?this.removeAttribute(t):this.setAttribute(t,r)}}function hVe(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 hae(t,e){var r=Ah(t);if(arguments.length<2){var n=this.node();return r.local?n.getAttributeNS(r.space,r.local):n.getAttribute(r)}return this.each((e==null?r.local?oVe:sVe:typeof e=="function"?r.local?hVe:cVe:r.local?uVe:lVe)(r,e))}var fae=D(()=>{UT()});function XT(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}var VO=D(()=>{});function fVe(t){return function(){this.style.removeProperty(t)}}function dVe(t,e,r){return function(){this.style.setProperty(t,e,r)}}function pVe(t,e,r){return function(){var n=e.apply(this,arguments);n==null?this.style.removeProperty(t):this.style.setProperty(t,n,r)}}function dae(t,e,r){return arguments.length>1?this.each((e==null?fVe:typeof e=="function"?pVe:dVe)(t,e,r??"")):Jf(this.node(),t)}function Jf(t,e){return t.style.getPropertyValue(e)||XT(t).getComputedStyle(t,null).getPropertyValue(e)}var WO=D(()=>{VO()});function mVe(t){return function(){delete this[t]}}function gVe(t,e){return function(){this[t]=e}}function yVe(t,e){return function(){var r=e.apply(this,arguments);r==null?delete this[t]:this[t]=r}}function pae(t,e){return arguments.length>1?this.each((e==null?mVe:typeof e=="function"?yVe:gVe)(t,e)):this.node()[t]}var mae=D(()=>{});function gae(t){return t.trim().split(/^|\s+/)}function YO(t){return t.classList||new yae(t)}function yae(t){this._node=t,this._names=gae(t.getAttribute("class")||"")}function vae(t,e){for(var r=YO(t),n=-1,i=e.length;++n{yae.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 wVe(){this.textContent=""}function kVe(t){return function(){this.textContent=t}}function TVe(t){return function(){var e=t.apply(this,arguments);this.textContent=e??""}}function kae(t){return arguments.length?this.each(t==null?wVe:(typeof t=="function"?TVe:kVe)(t)):this.node().textContent}var Tae=D(()=>{});function EVe(){this.innerHTML=""}function SVe(t){return function(){this.innerHTML=t}}function CVe(t){return function(){var e=t.apply(this,arguments);this.innerHTML=e??""}}function Eae(t){return arguments.length?this.each(t==null?EVe:(typeof t=="function"?CVe:SVe)(t)):this.node().innerHTML}var Sae=D(()=>{});function _Ve(){this.nextSibling&&this.parentNode.appendChild(this)}function Cae(){return this.each(_Ve)}var _ae=D(()=>{});function AVe(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function Aae(){return this.each(AVe)}var Lae=D(()=>{});function Rae(t){var e=typeof t=="function"?t:HT(t);return this.select(function(){return this.appendChild(e.apply(this,arguments))})}var Dae=D(()=>{$O()});function LVe(){return null}function Iae(t,e){var r=typeof t=="function"?t:HT(t),n=e==null?LVe:typeof e=="function"?e:M1(e);return this.select(function(){return this.insertBefore(r.apply(this,arguments),n.apply(this,arguments)||null)})}var Mae=D(()=>{$O();VT()});function RVe(){var t=this.parentNode;t&&t.removeChild(this)}function Nae(){return this.each(RVe)}var Oae=D(()=>{});function DVe(){var t=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function IVe(){var t=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function Pae(t){return this.select(t?IVe:DVe)}var Bae=D(()=>{});function Fae(t){return arguments.length?this.property("__data__",t):this.node().__data__}var zae=D(()=>{});function MVe(t){return function(e){t.call(this,e,this.__data__)}}function NVe(t){return t.trim().split(/^|\s+/).map(function(e){var r="",n=e.indexOf(".");return n>=0&&(r=e.slice(n+1),e=e.slice(0,n)),{type:e,name:r}})}function OVe(t){return function(){var e=this.__on;if(e){for(var r=0,n=-1,i=e.length,a;r{});function qae(t,e,r){var n=XT(t),i=n.CustomEvent;typeof i=="function"?i=new i(e,r):(i=n.document.createEvent("Event"),r?(i.initEvent(e,r.bubbles,r.cancelable),i.detail=r.detail):i.initEvent(e,!1,!1)),t.dispatchEvent(i)}function BVe(t,e){return function(){return qae(this,t,e)}}function FVe(t,e){return function(){return qae(this,t,e.apply(this,arguments))}}function Uae(t,e){return this.each((typeof e=="function"?FVe:BVe)(t,e))}var Hae=D(()=>{VO()});function*Vae(){for(var t=this._groups,e=0,r=t.length;e{});function Xi(t,e){this._groups=t,this._parents=e}function Yae(){return new Xi([[document.documentElement]],XO)}function zVe(){return this}var XO,Lh,Vu=D(()=>{Aie();Die();Mie();Oie();Bie();qie();HO();Hie();Wie();Xie();Kie();Qie();eae();rae();iae();sae();lae();cae();fae();WO();mae();wae();Tae();Sae();_ae();Lae();Dae();Mae();Oae();Bae();zae();Gae();Hae();Wae();XO=[null];Xi.prototype=Yae.prototype={constructor:Xi,select:_ie,selectAll:Rie,selectChild:Iie,selectChildren:Nie,filter:Pie,data:Gie,enter:Fie,exit:Uie,join:Vie,merge:Yie,selection:zVe,order:jie,sort:Zie,call:Jie,nodes:tae,node:nae,size:aae,empty:oae,each:uae,attr:hae,style:dae,property:pae,classed:bae,text:kae,html:Eae,raise:Cae,lower:Aae,append:Rae,insert:Iae,remove:Nae,clone:Pae,datum:Fae,on:$ae,dispatch:Uae,[Symbol.iterator]:Vae};Lh=Yae});function dt(t){return typeof t=="string"?new Xi([[document.querySelector(t)]],[document.documentElement]):new Xi([[t]],XO)}var Xae=D(()=>{Vu()});var Wu=D(()=>{v3();UT();Xae();Vu();VT();qO();WO()});var jae=D(()=>{});function N1(t,e,r){t.prototype=e.prototype=r,r.constructor=t}function T2(t,e){var r=Object.create(t.prototype);for(var n in e)r[n]=e[n];return r}var jO=D(()=>{});function ed(){}function Zae(){return this.rgb().formatHex()}function YVe(){return this.rgb().formatHex8()}function XVe(){return ise(this).formatHsl()}function Qae(){return this.rgb().formatRgb()}function Xu(t){var e,r;return t=(t+"").trim().toLowerCase(),(e=$Ve.exec(t))?(r=e[1].length,e=parseInt(e[1],16),r===6?Jae(e):r===3?new Ts(e>>8&15|e>>4&240,e>>4&15|e&240,(e&15)<<4|e&15,1):r===8?jT(e>>24&255,e>>16&255,e>>8&255,(e&255)/255):r===4?jT(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=GVe.exec(t))?new Ts(e[1],e[2],e[3],1):(e=qVe.exec(t))?new Ts(e[1]*255/100,e[2]*255/100,e[3]*255/100,1):(e=UVe.exec(t))?jT(e[1],e[2],e[3],e[4]):(e=HVe.exec(t))?jT(e[1]*255/100,e[2]*255/100,e[3]*255/100,e[4]):(e=VVe.exec(t))?rse(e[1],e[2]/100,e[3]/100,1):(e=WVe.exec(t))?rse(e[1],e[2]/100,e[3]/100,e[4]):Kae.hasOwnProperty(t)?Jae(Kae[t]):t==="transparent"?new Ts(NaN,NaN,NaN,0):null}function Jae(t){return new Ts(t>>16&255,t>>8&255,t&255,1)}function jT(t,e,r,n){return n<=0&&(t=e=r=NaN),new Ts(t,e,r,n)}function ZO(t){return t instanceof ed||(t=Xu(t)),t?(t=t.rgb(),new Ts(t.r,t.g,t.b,t.opacity)):new Ts}function S2(t,e,r,n){return arguments.length===1?ZO(t):new Ts(t,e,r,n??1)}function Ts(t,e,r,n){this.r=+t,this.g=+e,this.b=+r,this.opacity=+n}function ese(){return`#${O1(this.r)}${O1(this.g)}${O1(this.b)}`}function jVe(){return`#${O1(this.r)}${O1(this.g)}${O1(this.b)}${O1((isNaN(this.opacity)?1:this.opacity)*255)}`}function tse(){let t=QT(this.opacity);return`${t===1?"rgb(":"rgba("}${P1(this.r)}, ${P1(this.g)}, ${P1(this.b)}${t===1?")":`, ${t})`}`}function QT(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function P1(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function O1(t){return t=P1(t),(t<16?"0":"")+t.toString(16)}function rse(t,e,r,n){return n<=0?t=e=r=NaN:r<=0||r>=1?t=e=NaN:e<=0&&(t=NaN),new Yu(t,e,r,n)}function ise(t){if(t instanceof Yu)return new Yu(t.h,t.s,t.l,t.opacity);if(t instanceof ed||(t=Xu(t)),!t)return new Yu;if(t instanceof Yu)return t;t=t.rgb();var e=t.r/255,r=t.g/255,n=t.b/255,i=Math.min(e,r,n),a=Math.max(e,r,n),s=NaN,o=a-i,l=(a+i)/2;return o?(e===a?s=(r-n)/o+(r0&&l<1?0:s,new Yu(s,o,l,t.opacity)}function ase(t,e,r,n){return arguments.length===1?ise(t):new Yu(t,e,r,n??1)}function Yu(t,e,r,n){this.h=+t,this.s=+e,this.l=+r,this.opacity=+n}function nse(t){return t=(t||0)%360,t<0?t+360:t}function KT(t){return Math.max(0,Math.min(1,t||0))}function KO(t,e,r){return(t<60?e+(r-e)*t/60:t<180?r:t<240?e+(r-e)*(240-t)/60:e)*255}var b3,ZT,E2,w3,Zc,$Ve,GVe,qVe,UVe,HVe,VVe,WVe,Kae,QO=D(()=>{jO();b3=.7,ZT=1/b3,E2="\\s*([+-]?\\d+)\\s*",w3="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Zc="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",$Ve=/^#([0-9a-f]{3,8})$/,GVe=new RegExp(`^rgb\\(${E2},${E2},${E2}\\)$`),qVe=new RegExp(`^rgb\\(${Zc},${Zc},${Zc}\\)$`),UVe=new RegExp(`^rgba\\(${E2},${E2},${E2},${w3}\\)$`),HVe=new RegExp(`^rgba\\(${Zc},${Zc},${Zc},${w3}\\)$`),VVe=new RegExp(`^hsl\\(${w3},${Zc},${Zc}\\)$`),WVe=new RegExp(`^hsla\\(${w3},${Zc},${Zc},${w3}\\)$`),Kae={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};N1(ed,Xu,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:Zae,formatHex:Zae,formatHex8:YVe,formatHsl:XVe,formatRgb:Qae,toString:Qae});N1(Ts,S2,T2(ed,{brighter(t){return t=t==null?ZT:Math.pow(ZT,t),new Ts(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=t==null?b3:Math.pow(b3,t),new Ts(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new Ts(P1(this.r),P1(this.g),P1(this.b),QT(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:ese,formatHex:ese,formatHex8:jVe,formatRgb:tse,toString:tse}));N1(Yu,ase,T2(ed,{brighter(t){return t=t==null?ZT:Math.pow(ZT,t),new Yu(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=t==null?b3:Math.pow(b3,t),new Yu(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,n=r+(r<.5?r:1-r)*e,i=2*r-n;return new Ts(KO(t>=240?t-240:t+120,i,n),KO(t,i,n),KO(t<120?t+240:t-120,i,n),this.opacity)},clamp(){return new Yu(nse(this.h),KT(this.s),KT(this.l),QT(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(){let t=QT(this.opacity);return`${t===1?"hsl(":"hsla("}${nse(this.h)}, ${KT(this.s)*100}%, ${KT(this.l)*100}%${t===1?")":`, ${t})`}`}}))});var sse,ose,lse=D(()=>{sse=Math.PI/180,ose=180/Math.PI});function pse(t){if(t instanceof Qc)return new Qc(t.l,t.a,t.b,t.opacity);if(t instanceof Rh)return mse(t);t instanceof Ts||(t=ZO(t));var e=rP(t.r),r=rP(t.g),n=rP(t.b),i=JO((.2225045*e+.7168786*r+.0606169*n)/cse),a,s;return e===r&&r===n?a=s=i:(a=JO((.4360747*e+.3850649*r+.1430804*n)/use),s=JO((.0139322*e+.0971045*r+.7141733*n)/hse)),new Qc(116*i-16,500*(a-i),200*(i-s),t.opacity)}function nP(t,e,r,n){return arguments.length===1?pse(t):new Qc(t,e,r,n??1)}function Qc(t,e,r,n){this.l=+t,this.a=+e,this.b=+r,this.opacity=+n}function JO(t){return t>KVe?Math.pow(t,1/3):t/dse+fse}function eP(t){return t>C2?t*t*t:dse*(t-fse)}function tP(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function rP(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function ZVe(t){if(t instanceof Rh)return new Rh(t.h,t.c,t.l,t.opacity);if(t instanceof Qc||(t=pse(t)),t.a===0&&t.b===0)return new Rh(NaN,0{jO();QO();lse();JT=18,use=.96422,cse=1,hse=.82521,fse=4/29,C2=6/29,dse=3*C2*C2,KVe=C2*C2*C2;N1(Qc,nP,T2(ed,{brighter(t){return new Qc(this.l+JT*(t??1),this.a,this.b,this.opacity)},darker(t){return new Qc(this.l-JT*(t??1),this.a,this.b,this.opacity)},rgb(){var t=(this.l+16)/116,e=isNaN(this.a)?t:t+this.a/500,r=isNaN(this.b)?t:t-this.b/200;return e=use*eP(e),t=cse*eP(t),r=hse*eP(r),new Ts(tP(3.1338561*e-1.6168667*t-.4906146*r),tP(-.9787684*e+1.9161415*t+.033454*r),tP(.0719453*e-.2289914*t+1.4052427*r),this.opacity)}}));N1(Rh,k3,T2(ed,{brighter(t){return new Rh(this.h,this.c,this.l+JT*(t??1),this.opacity)},darker(t){return new Rh(this.h,this.c,this.l-JT*(t??1),this.opacity)},rgb(){return mse(this).rgb()}}))});var _2=D(()=>{QO();gse()});function iP(t,e,r,n,i){var a=t*t,s=a*t;return((1-3*t+3*a-s)*e+(4-6*a+3*s)*r+(1+3*t+3*a-3*s)*n+s*i)/6}function yse(t){var e=t.length-1;return function(r){var n=r<=0?r=0:r>=1?(r=1,e-1):Math.floor(r*e),i=t[n],a=t[n+1],s=n>0?t[n-1]:2*i-a,o=n{});function vse(t){var e=t.length;return function(r){var n=Math.floor(((r%=1)<0?++r:r)*e),i=t[(n+e-1)%e],a=t[n%e],s=t[(n+1)%e],o=t[(n+2)%e];return iP((r-n/e)*e,i,a,s,o)}}var xse=D(()=>{aP()});var A2,sP=D(()=>{A2=t=>()=>t});function bse(t,e){return function(r){return t+r*e}}function QVe(t,e,r){return t=Math.pow(t,r),e=Math.pow(e,r)-t,r=1/r,function(n){return Math.pow(t+n*e,r)}}function wse(t,e){var r=e-t;return r?bse(t,r>180||r<-180?r-360*Math.round(r/360):r):A2(isNaN(t)?e:t)}function kse(t){return(t=+t)==1?Dh:function(e,r){return r-e?QVe(e,r,t):A2(isNaN(e)?r:e)}}function Dh(t,e){var r=e-t;return r?bse(t,r):A2(isNaN(t)?e:t)}var oP=D(()=>{sP()});function Tse(t){return function(e){var r=e.length,n=new Array(r),i=new Array(r),a=new Array(r),s,o;for(s=0;s{_2();aP();xse();oP();B1=(function t(e){var r=kse(e);function n(i,a){var s=r((i=S2(i)).r,(a=S2(a)).r),o=r(i.g,a.g),l=r(i.b,a.b),u=Dh(i.opacity,a.opacity);return function(h){return i.r=s(h),i.g=o(h),i.b=l(h),i.opacity=u(h),i+""}}return n.gamma=t,n})(1);JVe=Tse(yse),eWe=Tse(vse)});function Ese(t,e){e||(e=[]);var r=t?Math.min(e.length,t.length):0,n=e.slice(),i;return function(a){for(i=0;i{});function _se(t,e){var r=e?e.length:0,n=t?Math.min(r,t.length):0,i=new Array(n),a=new Array(r),s;for(s=0;s{e9()});function Lse(t,e){var r=new Date;return t=+t,e=+e,function(n){return r.setTime(t*(1-n)+e*n),r}}var Rse=D(()=>{});function Es(t,e){return t=+t,e=+e,function(r){return t*(1-r)+e*r}}var T3=D(()=>{});function Dse(t,e){var r={},n={},i;(t===null||typeof t!="object")&&(t={}),(e===null||typeof e!="object")&&(e={});for(i in e)i in t?r[i]=F1(t[i],e[i]):n[i]=e[i];return function(a){for(i in r)n[i]=r[i](a);return n}}var Ise=D(()=>{e9()});function tWe(t){return function(){return t}}function rWe(t){return function(e){return t(e)+""}}function E3(t,e){var r=cP.lastIndex=uP.lastIndex=0,n,i,a,s=-1,o=[],l=[];for(t=t+"",e=e+"";(n=cP.exec(t))&&(i=uP.exec(e));)(a=i.index)>r&&(a=e.slice(r,a),o[s]?o[s]+=a:o[++s]=a),(n=n[0])===(i=i[0])?o[s]?o[s]+=i:o[++s]=i:(o[++s]=null,l.push({i:s,x:Es(n,i)})),r=uP.lastIndex;return r{T3();cP=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,uP=new RegExp(cP.source,"g")});function F1(t,e){var r=typeof e,n;return e==null||r==="boolean"?A2(e):(r==="number"?Es:r==="string"?(n=Xu(e))?(e=n,B1):E3:e instanceof Xu?B1:e instanceof Date?Lse:Sse(e)?Ese:Array.isArray(e)?_se:typeof e.valueOf!="function"&&typeof e.toString!="function"||isNaN(e)?Dse:Es)(t,e)}var e9=D(()=>{_2();lP();Ase();Rse();T3();Ise();hP();sP();Cse()});function fP(t,e){return t=+t,e=+e,function(r){return Math.round(t*(1-r)+e*r)}}var Mse=D(()=>{});function dP(t,e,r,n,i,a){var s,o,l;return(s=Math.sqrt(t*t+e*e))&&(t/=s,e/=s),(l=t*r+e*n)&&(r-=t*l,n-=e*l),(o=Math.sqrt(r*r+n*n))&&(r/=o,n/=o,l/=o),t*n{Nse=180/Math.PI,t9={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1}});function Pse(t){let e=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(t+"");return e.isIdentity?t9:dP(e.a,e.b,e.c,e.d,e.e,e.f)}function Bse(t){return t==null?t9:(r9||(r9=document.createElementNS("http://www.w3.org/2000/svg","g")),r9.setAttribute("transform",t),(t=r9.transform.baseVal.consolidate())?(t=t.matrix,dP(t.a,t.b,t.c,t.d,t.e,t.f)):t9)}var r9,Fse=D(()=>{Ose()});function zse(t,e,r,n){function i(u){return u.length?u.pop()+" ":""}function a(u,h,f,d,p,m){if(u!==f||h!==d){var g=p.push("translate(",null,e,null,r);m.push({i:g-4,x:Es(u,f)},{i:g-2,x:Es(h,d)})}else(f||d)&&p.push("translate("+f+e+d+r)}function s(u,h,f,d){u!==h?(u-h>180?h+=360:h-u>180&&(u+=360),d.push({i:f.push(i(f)+"rotate(",null,n)-2,x:Es(u,h)})):h&&f.push(i(f)+"rotate("+h+n)}function o(u,h,f,d){u!==h?d.push({i:f.push(i(f)+"skewX(",null,n)-2,x:Es(u,h)}):h&&f.push(i(f)+"skewX("+h+n)}function l(u,h,f,d,p,m){if(u!==f||h!==d){var g=p.push(i(p)+"scale(",null,",",null,")");m.push({i:g-4,x:Es(u,f)},{i:g-2,x:Es(h,d)})}else(f!==1||d!==1)&&p.push(i(p)+"scale("+f+","+d+")")}return function(u,h){var f=[],d=[];return u=t(u),h=t(h),a(u.translateX,u.translateY,h.translateX,h.translateY,f,d),s(u.rotate,h.rotate,f,d),o(u.skewX,h.skewX,f,d),l(u.scaleX,u.scaleY,h.scaleX,h.scaleY,f,d),u=h=null,function(p){for(var m=-1,g=d.length,y;++m{T3();Fse();pP=zse(Pse,"px, ","px)","deg)"),mP=zse(Bse,", ",")",")")});function Gse(t){return function(e,r){var n=t((e=k3(e)).h,(r=k3(r)).h),i=Dh(e.c,r.c),a=Dh(e.l,r.l),s=Dh(e.opacity,r.opacity);return function(o){return e.h=n(o),e.c=i(o),e.l=a(o),e.opacity=s(o),e+""}}}var gP,nWe,qse=D(()=>{_2();oP();gP=Gse(wse),nWe=Gse(Dh)});var L2=D(()=>{e9();T3();Mse();hP();$se();lP();qse()});function R3(){return z1||(Vse(iWe),z1=A3.now()+a9)}function iWe(){z1=0}function L3(){this._call=this._time=this._next=null}function s9(t,e,r){var n=new L3;return n.restart(t,e,r),n}function Wse(){R3(),++R2;for(var t=n9,e;t;)(e=z1-t._time)>=0&&t._call.call(void 0,e),t=t._next;--R2}function Use(){z1=(i9=A3.now())+a9,R2=C3=0;try{Wse()}finally{R2=0,sWe(),z1=0}}function aWe(){var t=A3.now(),e=t-i9;e>Hse&&(a9-=e,i9=t)}function sWe(){for(var t,e=n9,r,n=1/0;e;)e._call?(n>e._time&&(n=e._time),t=e,e=e._next):(r=e._next,e._next=null,e=t?t._next=r:n9=r);_3=t,yP(n)}function yP(t){if(!R2){C3&&(C3=clearTimeout(C3));var e=t-z1;e>24?(t<1/0&&(C3=setTimeout(Use,t-A3.now()-a9)),S3&&(S3=clearInterval(S3))):(S3||(i9=A3.now(),S3=setInterval(aWe,Hse)),R2=1,Vse(Use))}}var R2,C3,S3,Hse,n9,_3,i9,z1,a9,A3,Vse,vP=D(()=>{R2=0,C3=0,S3=0,Hse=1e3,i9=0,z1=0,a9=0,A3=typeof performance=="object"&&performance.now?performance:Date,Vse=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};L3.prototype=s9.prototype={constructor:L3,restart:function(t,e,r){if(typeof t!="function")throw new TypeError("callback is not a function");r=(r==null?R3():+r)+(e==null?0:+e),!this._next&&_3!==this&&(_3?_3._next=this:n9=this,_3=this),this._call=t,this._time=r,yP()},stop:function(){this._call&&(this._call=null,this._time=1/0,yP())}}});function o9(t,e,r){var n=new L3;return e=e==null?0:+e,n.restart(i=>{n.stop(),t(i+e)},e,r),n}var Yse=D(()=>{vP()});var l9=D(()=>{vP();Yse()});function td(t,e,r,n,i,a){var s=t.__transition;if(!s)t.__transition={};else if(r in s)return;uWe(t,r,{name:e,index:n,group:i,on:oWe,tween:lWe,time:a.time,delay:a.delay,duration:a.duration,ease:a.ease,timer:null,state:Kse})}function I3(t,e){var r=Ga(t,e);if(r.state>Kse)throw new Error("too late; already scheduled");return r}function Ss(t,e){var r=Ga(t,e);if(r.state>u9)throw new Error("too late; already running");return r}function Ga(t,e){var r=t.__transition;if(!r||!(r=r[e]))throw new Error("transition not found");return r}function uWe(t,e,r){var n=t.__transition,i;n[e]=r,r.timer=s9(a,0,r.time);function a(u){r.state=Xse,r.timer.restart(s,r.delay,r.time),r.delay<=u&&s(u-r.delay)}function s(u){var h,f,d,p;if(r.state!==Xse)return l();for(h in n)if(p=n[h],p.name===r.name){if(p.state===u9)return o9(s);p.state===jse?(p.state=D3,p.timer.stop(),p.on.call("interrupt",t,t.__data__,p.index,p.group),delete n[h]):+h{BO();l9();oWe=PO("start","end","cancel","interrupt"),lWe=[],Kse=0,Xse=1,c9=2,u9=3,jse=4,h9=5,D3=6});function f9(t,e){var r=t.__transition,n,i,a=!0,s;if(r){e=e==null?null:e+"";for(s in r){if((n=r[s]).name!==e){a=!1;continue}i=n.state>c9&&n.state{Xo()});function Qse(t){return this.each(function(){f9(this,t)})}var Jse=D(()=>{Zse()});function cWe(t,e){var r,n;return function(){var i=Ss(this,t),a=i.tween;if(a!==r){n=r=a;for(var s=0,o=n.length;s{Xo()});function d9(t,e){var r;return(typeof e=="number"?Es:e instanceof Xu?B1:(r=Xu(e))?(e=r,B1):E3)(t,e)}var xP=D(()=>{_2();L2()});function fWe(t){return function(){this.removeAttribute(t)}}function dWe(t){return function(){this.removeAttributeNS(t.space,t.local)}}function pWe(t,e,r){var n,i=r+"",a;return function(){var s=this.getAttribute(t);return s===i?null:s===n?a:a=e(n=s,r)}}function mWe(t,e,r){var n,i=r+"",a;return function(){var s=this.getAttributeNS(t.space,t.local);return s===i?null:s===n?a:a=e(n=s,r)}}function gWe(t,e,r){var n,i,a;return function(){var s,o=r(this),l;return o==null?void this.removeAttribute(t):(s=this.getAttribute(t),l=o+"",s===l?null:s===n&&l===i?a:(i=l,a=e(n=s,o)))}}function yWe(t,e,r){var n,i,a;return function(){var s,o=r(this),l;return o==null?void this.removeAttributeNS(t.space,t.local):(s=this.getAttributeNS(t.space,t.local),l=o+"",s===l?null:s===n&&l===i?a:(i=l,a=e(n=s,o)))}}function toe(t,e){var r=Ah(t),n=r==="transform"?mP:d9;return this.attrTween(t,typeof e=="function"?(r.local?yWe:gWe)(r,n,D2(this,"attr."+t,e)):e==null?(r.local?dWe:fWe)(r):(r.local?mWe:pWe)(r,n,e))}var roe=D(()=>{L2();Wu();M3();xP()});function vWe(t,e){return function(r){this.setAttribute(t,e.call(this,r))}}function xWe(t,e){return function(r){this.setAttributeNS(t.space,t.local,e.call(this,r))}}function bWe(t,e){var r,n;function i(){var a=e.apply(this,arguments);return a!==n&&(r=(n=a)&&xWe(t,a)),r}return i._value=e,i}function wWe(t,e){var r,n;function i(){var a=e.apply(this,arguments);return a!==n&&(r=(n=a)&&vWe(t,a)),r}return i._value=e,i}function noe(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 n=Ah(t);return this.tween(r,(n.local?bWe:wWe)(n,e))}var ioe=D(()=>{Wu()});function kWe(t,e){return function(){I3(this,t).delay=+e.apply(this,arguments)}}function TWe(t,e){return e=+e,function(){I3(this,t).delay=e}}function aoe(t){var e=this._id;return arguments.length?this.each((typeof t=="function"?kWe:TWe)(e,t)):Ga(this.node(),e).delay}var soe=D(()=>{Xo()});function EWe(t,e){return function(){Ss(this,t).duration=+e.apply(this,arguments)}}function SWe(t,e){return e=+e,function(){Ss(this,t).duration=e}}function ooe(t){var e=this._id;return arguments.length?this.each((typeof t=="function"?EWe:SWe)(e,t)):Ga(this.node(),e).duration}var loe=D(()=>{Xo()});function CWe(t,e){if(typeof e!="function")throw new Error;return function(){Ss(this,t).ease=e}}function uoe(t){var e=this._id;return arguments.length?this.each(CWe(e,t)):Ga(this.node(),e).ease}var coe=D(()=>{Xo()});function _We(t,e){return function(){var r=e.apply(this,arguments);if(typeof r!="function")throw new Error;Ss(this,t).ease=r}}function hoe(t){if(typeof t!="function")throw new Error;return this.each(_We(this._id,t))}var foe=D(()=>{Xo()});function doe(t){typeof t!="function"&&(t=y3(t));for(var e=this._groups,r=e.length,n=new Array(r),i=0;i{Wu();$1()});function moe(t){if(t._id!==this._id)throw new Error;for(var e=this._groups,r=t._groups,n=e.length,i=r.length,a=Math.min(n,i),s=new Array(n),o=0;o{$1()});function AWe(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 LWe(t,e,r){var n,i,a=AWe(e)?I3:Ss;return function(){var s=a(this,t),o=s.on;o!==n&&(i=(n=o).copy()).on(e,r),s.on=i}}function yoe(t,e){var r=this._id;return arguments.length<2?Ga(this.node(),r).on.on(t):this.each(LWe(r,t,e))}var voe=D(()=>{Xo()});function RWe(t){return function(){var e=this.parentNode;for(var r in this.__transition)if(+r!==t)return;e&&e.removeChild(this)}}function xoe(){return this.on("end.remove",RWe(this._id))}var boe=D(()=>{});function woe(t){var e=this._name,r=this._id;typeof t!="function"&&(t=M1(t));for(var n=this._groups,i=n.length,a=new Array(i),s=0;s{Wu();$1();Xo()});function Toe(t){var e=this._name,r=this._id;typeof t!="function"&&(t=g3(t));for(var n=this._groups,i=n.length,a=[],s=[],o=0;o{Wu();$1();Xo()});function Soe(){return new DWe(this._groups,this._parents)}var DWe,Coe=D(()=>{Wu();DWe=Lh.prototype.constructor});function IWe(t,e){var r,n,i;return function(){var a=Jf(this,t),s=(this.style.removeProperty(t),Jf(this,t));return a===s?null:a===r&&s===n?i:i=e(r=a,n=s)}}function _oe(t){return function(){this.style.removeProperty(t)}}function MWe(t,e,r){var n,i=r+"",a;return function(){var s=Jf(this,t);return s===i?null:s===n?a:a=e(n=s,r)}}function NWe(t,e,r){var n,i,a;return function(){var s=Jf(this,t),o=r(this),l=o+"";return o==null&&(l=o=(this.style.removeProperty(t),Jf(this,t))),s===l?null:s===n&&l===i?a:(i=l,a=e(n=s,o))}}function OWe(t,e){var r,n,i,a="style."+e,s="end."+a,o;return function(){var l=Ss(this,t),u=l.on,h=l.value[a]==null?o||(o=_oe(e)):void 0;(u!==r||i!==h)&&(n=(r=u).copy()).on(s,i=h),l.on=n}}function Aoe(t,e,r){var n=(t+="")=="transform"?pP:d9;return e==null?this.styleTween(t,IWe(t,n)).on("end.style."+t,_oe(t)):typeof e=="function"?this.styleTween(t,NWe(t,n,D2(this,"style."+t,e))).each(OWe(this._id,t)):this.styleTween(t,MWe(t,n,e),r).on("end.style."+t,null)}var Loe=D(()=>{L2();Wu();Xo();M3();xP()});function PWe(t,e,r){return function(n){this.style.setProperty(t,e.call(this,n),r)}}function BWe(t,e,r){var n,i;function a(){var s=e.apply(this,arguments);return s!==i&&(n=(i=s)&&PWe(t,s,r)),n}return a._value=e,a}function Roe(t,e,r){var n="style."+(t+="");if(arguments.length<2)return(n=this.tween(n))&&n._value;if(e==null)return this.tween(n,null);if(typeof e!="function")throw new Error;return this.tween(n,BWe(t,e,r??""))}var Doe=D(()=>{});function FWe(t){return function(){this.textContent=t}}function zWe(t){return function(){var e=t(this);this.textContent=e??""}}function Ioe(t){return this.tween("text",typeof t=="function"?zWe(D2(this,"text",t)):FWe(t==null?"":t+""))}var Moe=D(()=>{M3()});function $We(t){return function(e){this.textContent=t.call(this,e)}}function GWe(t){var e,r;function n(){var i=t.apply(this,arguments);return i!==r&&(e=(r=i)&&$We(i)),e}return n._value=t,n}function Noe(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,GWe(t))}var Ooe=D(()=>{});function Poe(){for(var t=this._name,e=this._id,r=p9(),n=this._groups,i=n.length,a=0;a{$1();Xo()});function Foe(){var t,e,r=this,n=r._id,i=r.size();return new Promise(function(a,s){var o={value:s},l={value:function(){--i===0&&a()}};r.each(function(){var u=Ss(this,n),h=u.on;h!==t&&(e=(t=h).copy(),e._.cancel.push(o),e._.interrupt.push(o),e._.end.push(l)),u.on=e}),i===0&&a()})}var zoe=D(()=>{Xo()});function po(t,e,r,n){this._groups=t,this._parents=e,this._name=r,this._id=n}function $oe(t){return Lh().transition(t)}function p9(){return++qWe}var qWe,Ih,$1=D(()=>{Wu();roe();ioe();soe();loe();coe();foe();poe();goe();voe();boe();koe();Eoe();Coe();Loe();Doe();Moe();Ooe();Boe();M3();zoe();qWe=0;Ih=Lh.prototype;po.prototype=$oe.prototype={constructor:po,select:woe,selectAll:Toe,selectChild:Ih.selectChild,selectChildren:Ih.selectChildren,filter:doe,merge:moe,selection:Soe,transition:Poe,call:Ih.call,nodes:Ih.nodes,node:Ih.node,size:Ih.size,empty:Ih.empty,each:Ih.each,on:yoe,attr:toe,attrTween:noe,style:Aoe,styleTween:Roe,text:Ioe,textTween:Noe,remove:xoe,tween:eoe,delay:aoe,duration:ooe,ease:uoe,easeVarying:hoe,end:Foe,[Symbol.iterator]:Ih[Symbol.iterator]}});function m9(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}var Goe=D(()=>{});var bP=D(()=>{Goe()});function HWe(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 qoe(t){var e,r;t instanceof po?(e=t._id,t=t._name):(e=p9(),(r=UWe).time=R3(),t=t==null?null:t+"");for(var n=this._groups,i=n.length,a=0;a{$1();Xo();bP();l9();UWe={time:null,delay:0,duration:250,ease:m9}});var Hoe=D(()=>{Wu();Jse();Uoe();Lh.prototype.interrupt=Qse;Lh.prototype.transition=qoe});var g9=D(()=>{Hoe()});var Voe=D(()=>{});var Woe=D(()=>{});var Yoe=D(()=>{});function Xoe(t){return[+t[0],+t[1]]}function VWe(t){return[Xoe(t[0]),Xoe(t[1])]}function wP(t){return{type:t}}var _Vt,AVt,LVt,RVt,DVt,IVt,joe=D(()=>{g9();Voe();Woe();Yoe();({abs:_Vt,max:AVt,min:LVt}=Math);RVt={name:"x",handles:["w","e"].map(wP),input:function(t,e){return t==null?null:[[+t[0],e[0][1]],[+t[1],e[1][1]]]},output:function(t){return t&&[t[0][0],t[1][0]]}},DVt={name:"y",handles:["n","s"].map(wP),input:function(t,e){return t==null?null:[[e[0][0],+t[0]],[e[1][0],+t[1]]]},output:function(t){return t&&[t[0][1],t[1][1]]}},IVt={name:"xy",handles:["n","w","e","s","nw","ne","sw","se"].map(wP),input:function(t){return t==null?null:VWe(t)},output:function(t){return t}}});var Koe=D(()=>{joe()});function Zoe(t){this._+=t[0];for(let e=1,r=t.length;e=0))throw new Error(`invalid digits: ${t}`);if(e>15)return Zoe;let r=10**e;return function(n){this._+=n[0];for(let i=1,a=n.length;i{kP=Math.PI,TP=2*kP,G1=1e-6,WWe=TP-G1;q1=class{constructor(e){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=e==null?Zoe:YWe(e)}moveTo(e,r){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+r}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(e,r){this._append`L${this._x1=+e},${this._y1=+r}`}quadraticCurveTo(e,r,n,i){this._append`Q${+e},${+r},${this._x1=+n},${this._y1=+i}`}bezierCurveTo(e,r,n,i,a,s){this._append`C${+e},${+r},${+n},${+i},${this._x1=+a},${this._y1=+s}`}arcTo(e,r,n,i,a){if(e=+e,r=+r,n=+n,i=+i,a=+a,a<0)throw new Error(`negative radius: ${a}`);let s=this._x1,o=this._y1,l=n-e,u=i-r,h=s-e,f=o-r,d=h*h+f*f;if(this._x1===null)this._append`M${this._x1=e},${this._y1=r}`;else if(d>G1)if(!(Math.abs(f*l-u*h)>G1)||!a)this._append`L${this._x1=e},${this._y1=r}`;else{let p=n-s,m=i-o,g=l*l+u*u,y=p*p+m*m,v=Math.sqrt(g),x=Math.sqrt(d),k=a*Math.tan((kP-Math.acos((g+d-y)/(2*v*x)))/2),_=k/x,T=k/v;Math.abs(_-1)>G1&&this._append`L${e+_*h},${r+_*f}`,this._append`A${a},${a},0,0,${+(f*p>h*m)},${this._x1=e+T*l},${this._y1=r+T*u}`}}arc(e,r,n,i,a,s){if(e=+e,r=+r,n=+n,s=!!s,n<0)throw new Error(`negative radius: ${n}`);let o=n*Math.cos(i),l=n*Math.sin(i),u=e+o,h=r+l,f=1^s,d=s?i-a:a-i;this._x1===null?this._append`M${u},${h}`:(Math.abs(this._x1-u)>G1||Math.abs(this._y1-h)>G1)&&this._append`L${u},${h}`,n&&(d<0&&(d=d%TP+TP),d>WWe?this._append`A${n},${n},0,1,${f},${e-o},${r-l}A${n},${n},0,1,${f},${this._x1=u},${this._y1=h}`:d>G1&&this._append`A${n},${n},0,${+(d>=kP)},${f},${this._x1=e+n*Math.cos(a)},${this._y1=r+n*Math.sin(a)}`)}rect(e,r,n,i){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+r}h${n=+n}v${+i}h${-n}Z`}toString(){return this._}};Qoe.prototype=q1.prototype});var EP=D(()=>{Joe()});var ele=D(()=>{});var tle=D(()=>{});var rle=D(()=>{});var nle=D(()=>{});var ile=D(()=>{});var ale=D(()=>{});var sle=D(()=>{});function ole(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)}function U1(t,e){if(!isFinite(t)||t===0)return null;var r=(t=e?t.toExponential(e-1):t.toExponential()).indexOf("e"),n=t.slice(0,r);return[n.length>1?n[0]+n.slice(2):n,+t.slice(r+1)]}var N3=D(()=>{});function Jc(t){return t=U1(Math.abs(t)),t?t[1]:NaN}var O3=D(()=>{N3()});function lle(t,e){return function(r,n){for(var i=r.length,a=[],s=0,o=t[0],l=0;i>0&&o>0&&(l+o+1>n&&(o=Math.max(1,n-l)),a.push(r.substring(i-=o,i+o)),!((l+=o+1)>n));)o=t[s=(s+1)%t.length];return a.reverse().join(e)}}var ule=D(()=>{});function cle(t){return function(e){return e.replace(/[0-9]/g,function(r){return t[+r]})}}var hle=D(()=>{});function rd(t){if(!(e=XWe.exec(t)))throw new Error("invalid format: "+t);var e;return new y9({fill:e[1],align:e[2],sign:e[3],symbol:e[4],zero:e[5],width:e[6],comma:e[7],precision:e[8]&&e[8].slice(1),trim:e[9],type:e[10]})}function y9(t){this.fill=t.fill===void 0?" ":t.fill+"",this.align=t.align===void 0?">":t.align+"",this.sign=t.sign===void 0?"-":t.sign+"",this.symbol=t.symbol===void 0?"":t.symbol+"",this.zero=!!t.zero,this.width=t.width===void 0?void 0:+t.width,this.comma=!!t.comma,this.precision=t.precision===void 0?void 0:+t.precision,this.trim=!!t.trim,this.type=t.type===void 0?"":t.type+""}var XWe,SP=D(()=>{XWe=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;rd.prototype=y9.prototype;y9.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type}});function fle(t){e:for(var e=t.length,r=1,n=-1,i;r0&&(n=0);break}return n>0?t.slice(0,n)+t.slice(i+1):t}var dle=D(()=>{});function ple(t,e){var r=U1(t,e);if(!r)return P3=void 0,t.toPrecision(e);var n=r[0],i=r[1],a=i-(P3=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,s=n.length;return a===s?n:a>s?n+new Array(a-s+1).join("0"):a>0?n.slice(0,a)+"."+n.slice(a):"0."+new Array(1-a).join("0")+U1(t,Math.max(0,e+a-1))[0]}var P3,CP=D(()=>{N3()});function _P(t,e){var r=U1(t,e);if(!r)return t+"";var n=r[0],i=r[1];return i<0?"0."+new Array(-i).join("0")+n:n.length>i+1?n.slice(0,i+1)+"."+n.slice(i+1):n+new Array(i-n.length+2).join("0")}var mle=D(()=>{N3()});var AP,gle=D(()=>{N3();CP();mle();AP={"%":(t,e)=>(t*100).toFixed(e),b:t=>Math.round(t).toString(2),c:t=>t+"",d:ole,e:(t,e)=>t.toExponential(e),f:(t,e)=>t.toFixed(e),g:(t,e)=>t.toPrecision(e),o:t=>Math.round(t).toString(8),p:(t,e)=>_P(t*100,e),r:_P,s:ple,X:t=>Math.round(t).toString(16).toUpperCase(),x:t=>Math.round(t).toString(16)}});function LP(t){return t}var yle=D(()=>{});function ble(t){var e=t.grouping===void 0||t.thousands===void 0?LP:lle(vle.call(t.grouping,Number),t.thousands+""),r=t.currency===void 0?"":t.currency[0]+"",n=t.currency===void 0?"":t.currency[1]+"",i=t.decimal===void 0?".":t.decimal+"",a=t.numerals===void 0?LP:cle(vle.call(t.numerals,String)),s=t.percent===void 0?"%":t.percent+"",o=t.minus===void 0?"\u2212":t.minus+"",l=t.nan===void 0?"NaN":t.nan+"";function u(f,d){f=rd(f);var p=f.fill,m=f.align,g=f.sign,y=f.symbol,v=f.zero,x=f.width,k=f.comma,_=f.precision,T=f.trim,S=f.type;S==="n"?(k=!0,S="g"):AP[S]||(_===void 0&&(_=12),T=!0,S="g"),(v||p==="0"&&m==="=")&&(v=!0,p="0",m="=");var R=(d&&d.prefix!==void 0?d.prefix:"")+(y==="$"?r:y==="#"&&/[boxX]/.test(S)?"0"+S.toLowerCase():""),A=(y==="$"?n:/[%p]/.test(S)?s:"")+(d&&d.suffix!==void 0?d.suffix:""),I=AP[S],P=/[defgprs%]/.test(S);_=_===void 0?6:/[gprs]/.test(S)?Math.max(1,Math.min(21,_)):Math.max(0,Math.min(20,_));function O(C){var N=R,B=A,F,M,$;if(S==="c")B=I(C)+B,C="";else{C=+C;var z=C<0||1/C<0;if(C=isNaN(C)?l:I(Math.abs(C),_),T&&(C=fle(C)),z&&+C==0&&g!=="+"&&(z=!1),N=(z?g==="("?g:o:g==="-"||g==="("?"":g)+N,B=(S==="s"&&!isNaN(C)&&P3!==void 0?xle[8+P3/3]:"")+B+(z&&g==="("?")":""),P){for(F=-1,M=C.length;++F$||$>57){B=($===46?i+C.slice(F+1):C.slice(F))+B,C=C.slice(0,F);break}}}k&&!v&&(C=e(C,1/0));var q=N.length+C.length+B.length,V=q>1)+N+C+B+V.slice(q);break;default:C=V+N+C+B;break}return a(C)}return O.toString=function(){return f+""},O}function h(f,d){var p=Math.max(-8,Math.min(8,Math.floor(Jc(d)/3)))*3,m=Math.pow(10,-p),g=u((f=rd(f),f.type="f",f),{suffix:xle[8+p/3]});return function(y){return g(m*y)}}return{format:u,formatPrefix:h}}var vle,xle,wle=D(()=>{O3();ule();hle();SP();dle();gle();CP();yle();vle=Array.prototype.map,xle=["y","z","a","f","p","n","\xB5","m","","k","M","G","T","P","E","Z","Y"]});function RP(t){return v9=ble(t),x9=v9.format,b9=v9.formatPrefix,v9}var v9,x9,b9,kle=D(()=>{wle();RP({thousands:",",grouping:[3],currency:["$",""]})});function DP(t){return Math.max(0,-Jc(Math.abs(t)))}var Tle=D(()=>{O3()});function IP(t,e){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(Jc(e)/3)))*3-Jc(Math.abs(t)))}var Ele=D(()=>{O3()});function MP(t,e){return t=Math.abs(t),e=Math.abs(e)-t,Math.max(0,Jc(e)-Jc(t))+1}var Sle=D(()=>{O3()});var NP=D(()=>{kle();SP();Tle();Ele();Sle()});var Cle=D(()=>{});var _le=D(()=>{});var Ale=D(()=>{});var Lle=D(()=>{});function nd(t,e){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(e).domain(t);break}return this}var B3=D(()=>{});function Mh(){var t=new w2,e=[],r=[],n=OP;function i(a){let s=t.get(a);if(s===void 0){if(n!==OP)return n;t.set(a,s=e.push(a)-1)}return r[s%r.length]}return i.domain=function(a){if(!arguments.length)return e.slice();e=[],t=new w2;for(let s of a)t.has(s)||t.set(s,e.push(s)-1);return i},i.range=function(a){return arguments.length?(r=Array.from(a),i):r.slice()},i.unknown=function(a){return arguments.length?(n=a,i):n},i.copy=function(){return Mh(e,r).unknown(n)},nd.apply(i,arguments),i}var OP,PP=D(()=>{Qf();B3();OP=Symbol("implicit")});function I2(){var t=Mh().unknown(void 0),e=t.domain,r=t.range,n=0,i=1,a,s,o=!1,l=0,u=0,h=.5;delete t.unknown;function f(){var d=e().length,p=i{Qf();B3();PP()});function BP(t){return function(){return t}}var Dle=D(()=>{});function FP(t){return+t}var Ile=D(()=>{});function M2(t){return t}function zP(t,e){return(e-=t=+t)?function(r){return(r-t)/e}:BP(isNaN(e)?NaN:.5)}function jWe(t,e){var r;return t>e&&(r=t,t=e,e=r),function(n){return Math.max(t,Math.min(e,n))}}function KWe(t,e,r){var n=t[0],i=t[1],a=e[0],s=e[1];return i2?ZWe:KWe,l=u=null,f}function f(d){return d==null||isNaN(d=+d)?a:(l||(l=o(t.map(n),e,r)))(n(s(d)))}return f.invert=function(d){return s(i((u||(u=o(e,t.map(n),Es)))(d)))},f.domain=function(d){return arguments.length?(t=Array.from(d,FP),h()):t.slice()},f.range=function(d){return arguments.length?(e=Array.from(d),h()):e.slice()},f.rangeRound=function(d){return e=Array.from(d),r=fP,h()},f.clamp=function(d){return arguments.length?(s=d?!0:M2,h()):s!==M2},f.interpolate=function(d){return arguments.length?(r=d,h()):r},f.unknown=function(d){return arguments.length?(a=d,f):a},function(d,p){return n=d,i=p,h()}}function F3(){return QWe()(M2,M2)}var Mle,$P=D(()=>{Qf();L2();Dle();Ile();Mle=[0,1]});function GP(t,e,r,n){var i=k2(t,e,r),a;switch(n=rd(n??",f"),n.type){case"s":{var s=Math.max(Math.abs(t),Math.abs(e));return n.precision==null&&!isNaN(a=IP(i,s))&&(n.precision=a),b9(n,s)}case"":case"e":case"g":case"p":case"r":{n.precision==null&&!isNaN(a=MP(i,Math.max(Math.abs(t),Math.abs(e))))&&(n.precision=a-(n.type==="e"));break}case"f":case"%":{n.precision==null&&!isNaN(a=DP(i))&&(n.precision=a-(n.type==="%")*2);break}}return x9(n)}var Nle=D(()=>{Qf();NP()});function JWe(t){var e=t.domain;return t.ticks=function(r){var n=e();return OT(n[0],n[n.length-1],r??10)},t.tickFormat=function(r,n){var i=e();return GP(i[0],i[i.length-1],r??10,n)},t.nice=function(r){r==null&&(r=10);var n=e(),i=0,a=n.length-1,s=n[i],o=n[a],l,u,h=10;for(o0;){if(u=m3(s,o,r),u===l)return n[i]=s,n[a]=o,e(n);if(u>0)s=Math.floor(s/u)*u,o=Math.ceil(o/u)*u;else if(u<0)s=Math.ceil(s*u)/u,o=Math.floor(o*u)/u;else break;l=u}return t},t}function ju(){var t=F3();return t.copy=function(){return w9(t,ju())},nd.apply(t,arguments),JWe(t)}var Ole=D(()=>{Qf();$P();B3();Nle()});function qP(t,e){t=t.slice();var r=0,n=t.length-1,i=t[r],a=t[n],s;return a{});function ti(t,e,r,n){function i(a){return t(a=arguments.length===0?new Date:new Date(+a)),a}return i.floor=a=>(t(a=new Date(+a)),a),i.ceil=a=>(t(a=new Date(a-1)),e(a,1),t(a),a),i.round=a=>{let s=i(a),o=i.ceil(a);return a-s(e(a=new Date(+a),s==null?1:Math.floor(s)),a),i.range=(a,s,o)=>{let l=[];if(a=i.ceil(a),o=o==null?1:Math.floor(o),!(a0))return l;let u;do l.push(u=new Date(+a)),e(a,o),t(a);while(uti(s=>{if(s>=s)for(;t(s),!a(s);)s.setTime(s-1)},(s,o)=>{if(s>=s)if(o<0)for(;++o<=0;)for(;e(s,-1),!a(s););else for(;--o>=0;)for(;e(s,1),!a(s););}),r&&(i.count=(a,s)=>(UP.setTime(+a),HP.setTime(+s),t(UP),t(HP),Math.floor(r(UP,HP))),i.every=a=>(a=Math.floor(a),!isFinite(a)||!(a>0)?null:a>1?i.filter(n?s=>n(s)%a===0:s=>i.count(0,s)%a===0):i)),i}var UP,HP,Nh=D(()=>{UP=new Date,HP=new Date});var e0,Ble,VP=D(()=>{Nh();e0=ti(()=>{},(t,e)=>{t.setTime(+t+e)},(t,e)=>e-t);e0.every=t=>(t=Math.floor(t),!isFinite(t)||!(t>0)?null:t>1?ti(e=>{e.setTime(Math.floor(e/t)*t)},(e,r)=>{e.setTime(+e+r*t)},(e,r)=>(r-e)/t):e0);Ble=e0.range});var Ll,Fle,WP=D(()=>{Nh();Ll=ti(t=>{t.setTime(t-t.getMilliseconds())},(t,e)=>{t.setTime(+t+e*1e3)},(t,e)=>(e-t)/1e3,t=>t.getUTCSeconds()),Fle=Ll.range});var Oh,eYe,k9,tYe,YP=D(()=>{Nh();Oh=ti(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*1e3)},(t,e)=>{t.setTime(+t+e*6e4)},(t,e)=>(e-t)/6e4,t=>t.getMinutes()),eYe=Oh.range,k9=ti(t=>{t.setUTCSeconds(0,0)},(t,e)=>{t.setTime(+t+e*6e4)},(t,e)=>(e-t)/6e4,t=>t.getUTCMinutes()),tYe=k9.range});var Ph,rYe,T9,nYe,XP=D(()=>{Nh();Ph=ti(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*1e3-t.getMinutes()*6e4)},(t,e)=>{t.setTime(+t+e*36e5)},(t,e)=>(e-t)/36e5,t=>t.getHours()),rYe=Ph.range,T9=ti(t=>{t.setUTCMinutes(0,0,0)},(t,e)=>{t.setTime(+t+e*36e5)},(t,e)=>(e-t)/36e5,t=>t.getUTCHours()),nYe=T9.range});var au,iYe,$3,aYe,E9,sYe,jP=D(()=>{Nh();au=ti(t=>t.setHours(0,0,0,0),(t,e)=>t.setDate(t.getDate()+e),(t,e)=>(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*6e4)/864e5,t=>t.getDate()-1),iYe=au.range,$3=ti(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/864e5,t=>t.getUTCDate()-1),aYe=$3.range,E9=ti(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/864e5,t=>Math.floor(t/864e5)),sYe=E9.range});function W1(t){return ti(e=>{e.setDate(e.getDate()-(e.getDay()+7-t)%7),e.setHours(0,0,0,0)},(e,r)=>{e.setDate(e.getDate()+r*7)},(e,r)=>(r-e-(r.getTimezoneOffset()-e.getTimezoneOffset())*6e4)/6048e5)}function Y1(t){return ti(e=>{e.setUTCDate(e.getUTCDate()-(e.getUTCDay()+7-t)%7),e.setUTCHours(0,0,0,0)},(e,r)=>{e.setUTCDate(e.getUTCDate()+r*7)},(e,r)=>(r-e)/6048e5)}var Ku,id,S9,C9,r0,_9,A9,$le,oYe,lYe,uYe,cYe,hYe,fYe,X1,N2,Gle,qle,ad,Ule,Hle,Vle,dYe,pYe,mYe,gYe,yYe,vYe,KP=D(()=>{Nh();Ku=W1(0),id=W1(1),S9=W1(2),C9=W1(3),r0=W1(4),_9=W1(5),A9=W1(6),$le=Ku.range,oYe=id.range,lYe=S9.range,uYe=C9.range,cYe=r0.range,hYe=_9.range,fYe=A9.range;X1=Y1(0),N2=Y1(1),Gle=Y1(2),qle=Y1(3),ad=Y1(4),Ule=Y1(5),Hle=Y1(6),Vle=X1.range,dYe=N2.range,pYe=Gle.range,mYe=qle.range,gYe=ad.range,yYe=Ule.range,vYe=Hle.range});var Bh,xYe,L9,bYe,ZP=D(()=>{Nh();Bh=ti(t=>{t.setDate(1),t.setHours(0,0,0,0)},(t,e)=>{t.setMonth(t.getMonth()+e)},(t,e)=>e.getMonth()-t.getMonth()+(e.getFullYear()-t.getFullYear())*12,t=>t.getMonth()),xYe=Bh.range,L9=ti(t=>{t.setUTCDate(1),t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCMonth(t.getUTCMonth()+e)},(t,e)=>e.getUTCMonth()-t.getUTCMonth()+(e.getUTCFullYear()-t.getUTCFullYear())*12,t=>t.getUTCMonth()),bYe=L9.range});var Rl,wYe,Zu,kYe,QP=D(()=>{Nh();Rl=ti(t=>{t.setMonth(0,1),t.setHours(0,0,0,0)},(t,e)=>{t.setFullYear(t.getFullYear()+e)},(t,e)=>e.getFullYear()-t.getFullYear(),t=>t.getFullYear());Rl.every=t=>!isFinite(t=Math.floor(t))||!(t>0)?null:ti(e=>{e.setFullYear(Math.floor(e.getFullYear()/t)*t),e.setMonth(0,1),e.setHours(0,0,0,0)},(e,r)=>{e.setFullYear(e.getFullYear()+r*t)});wYe=Rl.range,Zu=ti(t=>{t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCFullYear(t.getUTCFullYear()+e)},(t,e)=>e.getUTCFullYear()-t.getUTCFullYear(),t=>t.getUTCFullYear());Zu.every=t=>!isFinite(t=Math.floor(t))||!(t>0)?null:ti(e=>{e.setUTCFullYear(Math.floor(e.getUTCFullYear()/t)*t),e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,r)=>{e.setUTCFullYear(e.getUTCFullYear()+r*t)});kYe=Zu.range});function Yle(t,e,r,n,i,a){let s=[[Ll,1,1e3],[Ll,5,5*1e3],[Ll,15,15*1e3],[Ll,30,30*1e3],[a,1,6e4],[a,5,5*6e4],[a,15,15*6e4],[a,30,30*6e4],[i,1,36e5],[i,3,3*36e5],[i,6,6*36e5],[i,12,12*36e5],[n,1,864e5],[n,2,2*864e5],[r,1,6048e5],[e,1,2592e6],[e,3,3*2592e6],[t,1,31536e6]];function o(u,h,f){let d=hy).right(s,d);if(p===s.length)return t.every(k2(u/31536e6,h/31536e6,f));if(p===0)return e0.every(Math.max(k2(u,h,f),1));let[m,g]=s[d/s[p-1][2]{Qf();VP();WP();YP();XP();jP();KP();ZP();QP();[EYe,SYe]=Yle(Zu,L9,X1,E9,T9,k9),[JP,eB]=Yle(Rl,Bh,Ku,au,Ph,Oh)});var R9=D(()=>{VP();WP();YP();XP();jP();KP();ZP();QP();Xle()});function tB(t){if(0<=t.y&&t.y<100){var e=new Date(-1,t.m,t.d,t.H,t.M,t.S,t.L);return e.setFullYear(t.y),e}return new Date(t.y,t.m,t.d,t.H,t.M,t.S,t.L)}function rB(t){if(0<=t.y&&t.y<100){var e=new Date(Date.UTC(-1,t.m,t.d,t.H,t.M,t.S,t.L));return e.setUTCFullYear(t.y),e}return new Date(Date.UTC(t.y,t.m,t.d,t.H,t.M,t.S,t.L))}function G3(t,e,r){return{y:t,m:e,d:r,H:0,M:0,S:0,L:0}}function nB(t){var e=t.dateTime,r=t.date,n=t.time,i=t.periods,a=t.days,s=t.shortDays,o=t.months,l=t.shortMonths,u=q3(i),h=U3(i),f=q3(a),d=U3(a),p=q3(s),m=U3(s),g=q3(o),y=U3(o),v=q3(l),x=U3(l),k={a:$,A:z,b:q,B:V,c:null,d:eue,e:eue,f:XYe,g:iXe,G:sXe,H:VYe,I:WYe,j:YYe,L:aue,m:jYe,M:KYe,p:U,q:J,Q:nue,s:iue,S:ZYe,u:QYe,U:JYe,V:eXe,w:tXe,W:rXe,x:null,X:null,y:nXe,Y:aXe,Z:oXe,"%":rue},_={a:se,A:re,b:me,B:ge,c:null,d:tue,e:tue,f:hXe,g:wXe,G:TXe,H:lXe,I:uXe,j:cXe,L:oue,m:fXe,M:dXe,p:ye,q:_e,Q:nue,s:iue,S:pXe,u:mXe,U:gXe,V:yXe,w:vXe,W:xXe,x:null,X:null,y:bXe,Y:kXe,Z:EXe,"%":rue},T={a:P,A:O,b:C,B:N,c:B,d:Qle,e:Qle,f:GYe,g:Zle,G:Kle,H:Jle,I:Jle,j:BYe,L:$Ye,m:PYe,M:FYe,p:I,q:OYe,Q:UYe,s:HYe,S:zYe,u:RYe,U:DYe,V:IYe,w:LYe,W:MYe,x:F,X:M,y:Zle,Y:Kle,Z:NYe,"%":qYe};k.x=S(r,k),k.X=S(n,k),k.c=S(e,k),_.x=S(r,_),_.X=S(n,_),_.c=S(e,_);function S(ue,ie){return function(le){var oe=[],ne=-1,pe=0,te=ue.length,He,de,ce;for(le instanceof Date||(le=new Date(+le));++ne53)return null;"w"in oe||(oe.w=1),"Z"in oe?(pe=rB(G3(oe.y,0,1)),te=pe.getUTCDay(),pe=te>4||te===0?N2.ceil(pe):N2(pe),pe=$3.offset(pe,(oe.V-1)*7),oe.y=pe.getUTCFullYear(),oe.m=pe.getUTCMonth(),oe.d=pe.getUTCDate()+(oe.w+6)%7):(pe=tB(G3(oe.y,0,1)),te=pe.getDay(),pe=te>4||te===0?id.ceil(pe):id(pe),pe=au.offset(pe,(oe.V-1)*7),oe.y=pe.getFullYear(),oe.m=pe.getMonth(),oe.d=pe.getDate()+(oe.w+6)%7)}else("W"in oe||"U"in oe)&&("w"in oe||(oe.w="u"in oe?oe.u%7:"W"in oe?1:0),te="Z"in oe?rB(G3(oe.y,0,1)).getUTCDay():tB(G3(oe.y,0,1)).getDay(),oe.m=0,oe.d="W"in oe?(oe.w+6)%7+oe.W*7-(te+5)%7:oe.w+oe.U*7-(te+6)%7);return"Z"in oe?(oe.H+=oe.Z/100|0,oe.M+=oe.Z%100,rB(oe)):tB(oe)}}function A(ue,ie,le,oe){for(var ne=0,pe=ie.length,te=le.length,He,de;ne=te)return-1;if(He=ie.charCodeAt(ne++),He===37){if(He=ie.charAt(ne++),de=T[He in jle?ie.charAt(ne++):He],!de||(oe=de(ue,le,oe))<0)return-1}else if(He!=le.charCodeAt(oe++))return-1}return oe}function I(ue,ie,le){var oe=u.exec(ie.slice(le));return oe?(ue.p=h.get(oe[0].toLowerCase()),le+oe[0].length):-1}function P(ue,ie,le){var oe=p.exec(ie.slice(le));return oe?(ue.w=m.get(oe[0].toLowerCase()),le+oe[0].length):-1}function O(ue,ie,le){var oe=f.exec(ie.slice(le));return oe?(ue.w=d.get(oe[0].toLowerCase()),le+oe[0].length):-1}function C(ue,ie,le){var oe=v.exec(ie.slice(le));return oe?(ue.m=x.get(oe[0].toLowerCase()),le+oe[0].length):-1}function N(ue,ie,le){var oe=g.exec(ie.slice(le));return oe?(ue.m=y.get(oe[0].toLowerCase()),le+oe[0].length):-1}function B(ue,ie,le){return A(ue,e,ie,le)}function F(ue,ie,le){return A(ue,r,ie,le)}function M(ue,ie,le){return A(ue,n,ie,le)}function $(ue){return s[ue.getDay()]}function z(ue){return a[ue.getDay()]}function q(ue){return l[ue.getMonth()]}function V(ue){return o[ue.getMonth()]}function U(ue){return i[+(ue.getHours()>=12)]}function J(ue){return 1+~~(ue.getMonth()/3)}function se(ue){return s[ue.getUTCDay()]}function re(ue){return a[ue.getUTCDay()]}function me(ue){return l[ue.getUTCMonth()]}function ge(ue){return o[ue.getUTCMonth()]}function ye(ue){return i[+(ue.getUTCHours()>=12)]}function _e(ue){return 1+~~(ue.getUTCMonth()/3)}return{format:function(ue){var ie=S(ue+="",k);return ie.toString=function(){return ue},ie},parse:function(ue){var ie=R(ue+="",!1);return ie.toString=function(){return ue},ie},utcFormat:function(ue){var ie=S(ue+="",_);return ie.toString=function(){return ue},ie},utcParse:function(ue){var ie=R(ue+="",!0);return ie.toString=function(){return ue},ie}}}function xn(t,e,r){var n=t<0?"-":"",i=(n?-t:t)+"",a=i.length;return n+(a[e.toLowerCase(),r]))}function LYe(t,e,r){var n=is.exec(e.slice(r,r+1));return n?(t.w=+n[0],r+n[0].length):-1}function RYe(t,e,r){var n=is.exec(e.slice(r,r+1));return n?(t.u=+n[0],r+n[0].length):-1}function DYe(t,e,r){var n=is.exec(e.slice(r,r+2));return n?(t.U=+n[0],r+n[0].length):-1}function IYe(t,e,r){var n=is.exec(e.slice(r,r+2));return n?(t.V=+n[0],r+n[0].length):-1}function MYe(t,e,r){var n=is.exec(e.slice(r,r+2));return n?(t.W=+n[0],r+n[0].length):-1}function Kle(t,e,r){var n=is.exec(e.slice(r,r+4));return n?(t.y=+n[0],r+n[0].length):-1}function Zle(t,e,r){var n=is.exec(e.slice(r,r+2));return n?(t.y=+n[0]+(+n[0]>68?1900:2e3),r+n[0].length):-1}function NYe(t,e,r){var n=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(e.slice(r,r+6));return n?(t.Z=n[1]?0:-(n[2]+(n[3]||"00")),r+n[0].length):-1}function OYe(t,e,r){var n=is.exec(e.slice(r,r+1));return n?(t.q=n[0]*3-3,r+n[0].length):-1}function PYe(t,e,r){var n=is.exec(e.slice(r,r+2));return n?(t.m=n[0]-1,r+n[0].length):-1}function Qle(t,e,r){var n=is.exec(e.slice(r,r+2));return n?(t.d=+n[0],r+n[0].length):-1}function BYe(t,e,r){var n=is.exec(e.slice(r,r+3));return n?(t.m=0,t.d=+n[0],r+n[0].length):-1}function Jle(t,e,r){var n=is.exec(e.slice(r,r+2));return n?(t.H=+n[0],r+n[0].length):-1}function FYe(t,e,r){var n=is.exec(e.slice(r,r+2));return n?(t.M=+n[0],r+n[0].length):-1}function zYe(t,e,r){var n=is.exec(e.slice(r,r+2));return n?(t.S=+n[0],r+n[0].length):-1}function $Ye(t,e,r){var n=is.exec(e.slice(r,r+3));return n?(t.L=+n[0],r+n[0].length):-1}function GYe(t,e,r){var n=is.exec(e.slice(r,r+6));return n?(t.L=Math.floor(n[0]/1e3),r+n[0].length):-1}function qYe(t,e,r){var n=CYe.exec(e.slice(r,r+1));return n?r+n[0].length:-1}function UYe(t,e,r){var n=is.exec(e.slice(r));return n?(t.Q=+n[0],r+n[0].length):-1}function HYe(t,e,r){var n=is.exec(e.slice(r));return n?(t.s=+n[0],r+n[0].length):-1}function eue(t,e){return xn(t.getDate(),e,2)}function VYe(t,e){return xn(t.getHours(),e,2)}function WYe(t,e){return xn(t.getHours()%12||12,e,2)}function YYe(t,e){return xn(1+au.count(Rl(t),t),e,3)}function aue(t,e){return xn(t.getMilliseconds(),e,3)}function XYe(t,e){return aue(t,e)+"000"}function jYe(t,e){return xn(t.getMonth()+1,e,2)}function KYe(t,e){return xn(t.getMinutes(),e,2)}function ZYe(t,e){return xn(t.getSeconds(),e,2)}function QYe(t){var e=t.getDay();return e===0?7:e}function JYe(t,e){return xn(Ku.count(Rl(t)-1,t),e,2)}function sue(t){var e=t.getDay();return e>=4||e===0?r0(t):r0.ceil(t)}function eXe(t,e){return t=sue(t),xn(r0.count(Rl(t),t)+(Rl(t).getDay()===4),e,2)}function tXe(t){return t.getDay()}function rXe(t,e){return xn(id.count(Rl(t)-1,t),e,2)}function nXe(t,e){return xn(t.getFullYear()%100,e,2)}function iXe(t,e){return t=sue(t),xn(t.getFullYear()%100,e,2)}function aXe(t,e){return xn(t.getFullYear()%1e4,e,4)}function sXe(t,e){var r=t.getDay();return t=r>=4||r===0?r0(t):r0.ceil(t),xn(t.getFullYear()%1e4,e,4)}function oXe(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+xn(e/60|0,"0",2)+xn(e%60,"0",2)}function tue(t,e){return xn(t.getUTCDate(),e,2)}function lXe(t,e){return xn(t.getUTCHours(),e,2)}function uXe(t,e){return xn(t.getUTCHours()%12||12,e,2)}function cXe(t,e){return xn(1+$3.count(Zu(t),t),e,3)}function oue(t,e){return xn(t.getUTCMilliseconds(),e,3)}function hXe(t,e){return oue(t,e)+"000"}function fXe(t,e){return xn(t.getUTCMonth()+1,e,2)}function dXe(t,e){return xn(t.getUTCMinutes(),e,2)}function pXe(t,e){return xn(t.getUTCSeconds(),e,2)}function mXe(t){var e=t.getUTCDay();return e===0?7:e}function gXe(t,e){return xn(X1.count(Zu(t)-1,t),e,2)}function lue(t){var e=t.getUTCDay();return e>=4||e===0?ad(t):ad.ceil(t)}function yXe(t,e){return t=lue(t),xn(ad.count(Zu(t),t)+(Zu(t).getUTCDay()===4),e,2)}function vXe(t){return t.getUTCDay()}function xXe(t,e){return xn(N2.count(Zu(t)-1,t),e,2)}function bXe(t,e){return xn(t.getUTCFullYear()%100,e,2)}function wXe(t,e){return t=lue(t),xn(t.getUTCFullYear()%100,e,2)}function kXe(t,e){return xn(t.getUTCFullYear()%1e4,e,4)}function TXe(t,e){var r=t.getUTCDay();return t=r>=4||r===0?ad(t):ad.ceil(t),xn(t.getUTCFullYear()%1e4,e,4)}function EXe(){return"+0000"}function rue(){return"%"}function nue(t){return+t}function iue(t){return Math.floor(+t/1e3)}var jle,is,CYe,_Ye,uue=D(()=>{R9();jle={"-":"",_:" ",0:"0"},is=/^\s*\d+/,CYe=/^%/,_Ye=/[\\^$*+?|[\]().{}]/g});function iB(t){return O2=nB(t),j1=O2.format,cue=O2.parse,hue=O2.utcFormat,fue=O2.utcParse,O2}var O2,j1,cue,hue,fue,due=D(()=>{uue();iB({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]})});var aB=D(()=>{due()});function SXe(t){return new Date(t)}function CXe(t){return t instanceof Date?+t:+new Date(+t)}function pue(t,e,r,n,i,a,s,o,l,u){var h=F3(),f=h.invert,d=h.domain,p=u(".%L"),m=u(":%S"),g=u("%I:%M"),y=u("%I %p"),v=u("%a %d"),x=u("%b %d"),k=u("%B"),_=u("%Y");function T(S){return(l(S){R9();aB();$P();B3();Ple()});var gue=D(()=>{Rle();Ole();PP();mue()});function yue(t){for(var e=t.length/6|0,r=new Array(e),n=0;n{});var sB,xue=D(()=>{vue();sB=yue("4e79a7f28e2ce1575976b7b259a14fedc949af7aa1ff9da79c755fbab0ab")});var bue=D(()=>{xue()});function _i(t){return function(){return t}}var I9=D(()=>{});function kue(t){return t>1?0:t<-1?P2:Math.acos(t)}function lB(t){return t>=1?H3:t<=-1?-H3:Math.asin(t)}var oB,Cs,sd,wue,M9,Qu,K1,as,P2,H3,B2,N9=D(()=>{oB=Math.abs,Cs=Math.atan2,sd=Math.cos,wue=Math.max,M9=Math.min,Qu=Math.sin,K1=Math.sqrt,as=1e-12,P2=Math.PI,H3=P2/2,B2=2*P2});function O9(t){let e=3;return t.digits=function(r){if(!arguments.length)return e;if(r==null)e=null;else{let n=Math.floor(r);if(!(n>=0))throw new RangeError(`invalid digits: ${r}`);e=n}return t},()=>new q1(e)}var uB=D(()=>{EP()});function _Xe(t){return t.innerRadius}function AXe(t){return t.outerRadius}function LXe(t){return t.startAngle}function RXe(t){return t.endAngle}function DXe(t){return t&&t.padAngle}function IXe(t,e,r,n,i,a,s,o){var l=r-t,u=n-e,h=s-i,f=o-a,d=f*l-h*u;if(!(d*dB*B+F*F&&(A=P,I=O),{cx:A,cy:I,x01:-h,y01:-f,x11:A*(i/T-1),y11:I*(i/T-1)}}function n0(){var t=_Xe,e=AXe,r=_i(0),n=null,i=LXe,a=RXe,s=DXe,o=null,l=O9(u);function u(){var h,f,d=+t.apply(this,arguments),p=+e.apply(this,arguments),m=i.apply(this,arguments)-H3,g=a.apply(this,arguments)-H3,y=oB(g-m),v=g>m;if(o||(o=h=l()),pas))o.moveTo(0,0);else if(y>B2-as)o.moveTo(p*sd(m),p*Qu(m)),o.arc(0,0,p,m,g,!v),d>as&&(o.moveTo(d*sd(g),d*Qu(g)),o.arc(0,0,d,g,m,v));else{var x=m,k=g,_=m,T=g,S=y,R=y,A=s.apply(this,arguments)/2,I=A>as&&(n?+n.apply(this,arguments):K1(d*d+p*p)),P=M9(oB(p-d)/2,+r.apply(this,arguments)),O=P,C=P,N,B;if(I>as){var F=lB(I/d*Qu(A)),M=lB(I/p*Qu(A));(S-=F*2)>as?(F*=v?1:-1,_+=F,T-=F):(S=0,_=T=(m+g)/2),(R-=M*2)>as?(M*=v?1:-1,x+=M,k-=M):(R=0,x=k=(m+g)/2)}var $=p*sd(x),z=p*Qu(x),q=d*sd(T),V=d*Qu(T);if(P>as){var U=p*sd(k),J=p*Qu(k),se=d*sd(_),re=d*Qu(_),me;if(yas?C>as?(N=P9(se,re,$,z,p,C,v),B=P9(U,J,q,V,p,C,v),o.moveTo(N.cx+N.x01,N.cy+N.y01),Cas)||!(S>as)?o.lineTo(q,V):O>as?(N=P9(q,V,U,J,d,-O,v),B=P9($,z,se,re,d,-O,v),o.lineTo(N.cx+N.x01,N.cy+N.y01),O{I9();N9();uB()});function B9(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}var EXt,cB=D(()=>{EXt=Array.prototype.slice});function Eue(t){this._context=t}function od(t){return new Eue(t)}var hB=D(()=>{Eue.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 Sue(t){return t[0]}function Cue(t){return t[1]}var _ue=D(()=>{});function i0(t,e){var r=_i(!0),n=null,i=od,a=null,s=O9(o);t=typeof t=="function"?t:t===void 0?Sue:_i(t),e=typeof e=="function"?e:e===void 0?Cue:_i(e);function o(l){var u,h=(l=B9(l)).length,f,d=!1,p;for(n==null&&(a=i(p=s())),u=0;u<=h;++u)!(u{cB();I9();hB();uB();_ue()});function Lue(t,e){return et?1:e>=t?0:NaN}var Rue=D(()=>{});function Due(t){return t}var Iue=D(()=>{});function fB(){var t=Due,e=Lue,r=null,n=_i(0),i=_i(B2),a=_i(0);function s(o){var l,u=(o=B9(o)).length,h,f,d=0,p=new Array(u),m=new Array(u),g=+n.apply(this,arguments),y=Math.min(B2,Math.max(-B2,i.apply(this,arguments)-g)),v,x=Math.min(Math.abs(y)/u,a.apply(this,arguments)),k=x*(y<0?-1:1),_;for(l=0;l0&&(d+=_);for(e!=null?p.sort(function(T,S){return e(m[T],m[S])}):r!=null&&p.sort(function(T,S){return r(o[T],o[S])}),l=0,f=d?(y-u*k)/d:0;l0?_*f:0)+k,m[h]={data:o[h],index:l,value:_,startAngle:g,endAngle:v,padAngle:x};return m}return s.value=function(o){return arguments.length?(t=typeof o=="function"?o:_i(+o),s):t},s.sortValues=function(o){return arguments.length?(e=o,r=null,s):e},s.sort=function(o){return arguments.length?(r=o,e=null,s):r},s.startAngle=function(o){return arguments.length?(n=typeof o=="function"?o:_i(+o),s):n},s.endAngle=function(o){return arguments.length?(i=typeof o=="function"?o:_i(+o),s):i},s.padAngle=function(o){return arguments.length?(a=typeof o=="function"?o:_i(+o),s):a},s}var Mue=D(()=>{cB();I9();Rue();Iue();N9()});function V3(t){return new F9(t,!0)}function W3(t){return new F9(t,!1)}var F9,Nue=D(()=>{F9=class{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 su(){}var Y3=D(()=>{});function F2(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 X3(t){this._context=t}function Ju(t){return new X3(t)}var j3=D(()=>{X3.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:F2(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:F2(this,t,e);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}}});function Oue(t){this._context=t}function dB(t){return new Oue(t)}var Pue=D(()=>{Y3();j3();Oue.prototype={areaStart:su,areaEnd:su,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:F2(this,t,e);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}}});function Bue(t){this._context=t}function pB(t){return new Bue(t)}var Fue=D(()=>{j3();Bue.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,n=(this._y0+4*this._y1+e)/6;this._line?this._context.lineTo(r,n):this._context.moveTo(r,n);break;case 3:this._point=4;default:F2(this,t,e);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}}});function zue(t,e){this._basis=new X3(t),this._beta=e}var mB,$ue=D(()=>{j3();zue.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 n=t[0],i=e[0],a=t[r]-n,s=e[r]-i,o=-1,l;++o<=r;)l=o/r,this._basis.point(this._beta*t[o]+(1-this._beta)*(n+l*a),this._beta*e[o]+(1-this._beta)*(i+l*s));this._x=this._y=null,this._basis.lineEnd()},point:function(t,e){this._x.push(+t),this._y.push(+e)}};mB=(function t(e){function r(n){return e===1?new X3(n):new zue(n,e)}return r.beta=function(n){return t(+n)},r})(.85)});function z2(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 z9(t,e){this._context=t,this._k=(1-e)/6}var K3,Z3=D(()=>{z9.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:z2(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:z2(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}};K3=(function t(e){function r(n){return new z9(n,e)}return r.tension=function(n){return t(+n)},r})(0)});function $9(t,e){this._context=t,this._k=(1-e)/6}var gB,yB=D(()=>{Y3();Z3();$9.prototype={areaStart:su,areaEnd:su,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:z2(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}};gB=(function t(e){function r(n){return new $9(n,e)}return r.tension=function(n){return t(+n)},r})(0)});function G9(t,e){this._context=t,this._k=(1-e)/6}var vB,xB=D(()=>{Z3();G9.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:z2(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}};vB=(function t(e){function r(n){return new G9(n,e)}return r.tension=function(n){return t(+n)},r})(0)});function Q3(t,e,r){var n=t._x1,i=t._y1,a=t._x2,s=t._y2;if(t._l01_a>as){var o=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);n=(n*o-t._x0*t._l12_2a+t._x2*t._l01_2a)/l,i=(i*o-t._y0*t._l12_2a+t._y2*t._l01_2a)/l}if(t._l23_a>as){var u=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a,h=3*t._l23_a*(t._l23_a+t._l12_a);a=(a*u+t._x1*t._l23_2a-e*t._l12_2a)/h,s=(s*u+t._y1*t._l23_2a-r*t._l12_2a)/h}t._context.bezierCurveTo(n,i,a,s,t._x2,t._y2)}function Gue(t,e){this._context=t,this._alpha=e}var J3,q9=D(()=>{N9();Z3();Gue.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,n=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+n*n,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:Q3(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}};J3=(function t(e){function r(n){return e?new Gue(n,e):new z9(n,0)}return r.alpha=function(n){return t(+n)},r})(.5)});function que(t,e){this._context=t,this._alpha=e}var bB,Uue=D(()=>{yB();Y3();q9();que.prototype={areaStart:su,areaEnd:su,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,n=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+n*n,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:Q3(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}};bB=(function t(e){function r(n){return e?new que(n,e):new $9(n,0)}return r.alpha=function(n){return t(+n)},r})(.5)});function Hue(t,e){this._context=t,this._alpha=e}var wB,Vue=D(()=>{xB();q9();Hue.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,n=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+n*n,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:Q3(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}};wB=(function t(e){function r(n){return e?new Hue(n,e):new G9(n,0)}return r.alpha=function(n){return t(+n)},r})(.5)});function Wue(t){this._context=t}function kB(t){return new Wue(t)}var Yue=D(()=>{Y3();Wue.prototype={areaStart:su,areaEnd:su,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 Xue(t){return t<0?-1:1}function jue(t,e,r){var n=t._x1-t._x0,i=e-t._x1,a=(t._y1-t._y0)/(n||i<0&&-0),s=(r-t._y1)/(i||n<0&&-0),o=(a*i+s*n)/(n+i);return(Xue(a)+Xue(s))*Math.min(Math.abs(a),Math.abs(s),.5*Math.abs(o))||0}function Kue(t,e){var r=t._x1-t._x0;return r?(3*(t._y1-t._y0)/r-e)/2:e}function TB(t,e,r){var n=t._x0,i=t._y0,a=t._x1,s=t._y1,o=(a-n)/3;t._context.bezierCurveTo(n+o,i+o*e,a-o,s-o*r,a,s)}function U9(t){this._context=t}function Zue(t){this._context=new Que(t)}function Que(t){this._context=t}function e5(t){return new U9(t)}function t5(t){return new Zue(t)}var Jue=D(()=>{U9.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:TB(this,this._t0,Kue(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,TB(this,Kue(this,r=jue(this,t,e)),r);break;default:TB(this,this._t0,r=jue(this,t,e));break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e,this._t0=r}}};(Zue.prototype=Object.create(U9.prototype)).point=function(t,e){U9.prototype.point.call(this,e,t)};Que.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,n,i,a){this._context.bezierCurveTo(e,t,n,r,a,i)}}});function tce(t){this._context=t}function ece(t){var e,r=t.length-1,n,i=new Array(r),a=new Array(r),s=new Array(r);for(i[0]=0,a[0]=2,s[0]=t[0]+2*t[1],e=1;e=0;--e)i[e]=(s[e]-i[e+1])/a[e];for(a[r-1]=(t[r]+i[r-1])/2,e=0;e{tce.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 n=ece(t),i=ece(e),a=0,s=1;s{H9.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0=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}}});var ice=D(()=>{Tue();Aue();Mue();Pue();Fue();j3();Nue();$ue();yB();xB();Z3();Uue();Vue();q9();Yue();hB();Jue();rce();nce()});var ace=D(()=>{});var sce=D(()=>{});function ld(t,e,r){this.k=t,this.x=e,this.y=r}function SB(t){for(;!t.__zoom;)if(!(t=t.parentNode))return EB;return t.__zoom}var EB,CB=D(()=>{ld.prototype={constructor:ld,scale:function(t){return t===1?this:new ld(this.k*t,this.x,this.y)},translate:function(t,e){return t===0&e===0?this:new ld(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+")"}};EB=new ld(1,0,0);SB.prototype=ld.prototype});var oce=D(()=>{});var lce=D(()=>{g9();ace();sce();CB();oce()});var uce=D(()=>{lce();CB()});var Or=D(()=>{Qf();Tie();Koe();ele();_2();tle();rle();BO();jae();nle();bP();ile();sle();NP();Cle();_le();L2();EP();Ale();ale();Lle();gue();bue();Wu();ice();R9();aB();l9();g9();uce()});var MXe,V9,_B=D(()=>{MXe=typeof global=="object"&&global&&global.Object===Object&&global,V9=MXe});var NXe,OXe,ji,ou=D(()=>{_B();NXe=typeof self=="object"&&self&&self.Object===Object&&self,OXe=V9||NXe||Function("return this")(),ji=OXe});var PXe,ss,Z1=D(()=>{ou();PXe=ji.Symbol,ss=PXe});function zXe(t){var e=BXe.call(t,s5),r=t[s5];try{t[s5]=void 0;var n=!0}catch{}var i=FXe.call(t);return n&&(e?t[s5]=r:delete t[s5]),i}var cce,BXe,FXe,s5,hce,fce=D(()=>{Z1();cce=Object.prototype,BXe=cce.hasOwnProperty,FXe=cce.toString,s5=ss?ss.toStringTag:void 0;hce=zXe});function qXe(t){return GXe.call(t)}var $Xe,GXe,dce,pce=D(()=>{$Xe=Object.prototype,GXe=$Xe.toString;dce=qXe});function VXe(t){return t==null?t===void 0?HXe:UXe:mce&&mce in Object(t)?hce(t):dce(t)}var UXe,HXe,mce,mo,ud=D(()=>{Z1();fce();pce();UXe="[object Null]",HXe="[object Undefined]",mce=ss?ss.toStringTag:void 0;mo=VXe});function WXe(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}var Ai,lu=D(()=>{Ai=WXe});function ZXe(t){if(!Ai(t))return!1;var e=mo(t);return e==XXe||e==jXe||e==YXe||e==KXe}var YXe,XXe,jXe,KXe,a0,o5=D(()=>{ud();lu();YXe="[object AsyncFunction]",XXe="[object Function]",jXe="[object GeneratorFunction]",KXe="[object Proxy]";a0=ZXe});var QXe,W9,gce=D(()=>{ou();QXe=ji["__core-js_shared__"],W9=QXe});function JXe(t){return!!yce&&yce in t}var yce,vce,xce=D(()=>{gce();yce=(function(){var t=/[^.]+$/.exec(W9&&W9.keys&&W9.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""})();vce=JXe});function rje(t){if(t!=null){try{return tje.call(t)}catch{}try{return t+""}catch{}}return""}var eje,tje,Fh,AB=D(()=>{eje=Function.prototype,tje=eje.toString;Fh=rje});function cje(t){if(!Ai(t)||vce(t))return!1;var e=a0(t)?uje:ije;return e.test(Fh(t))}var nje,ije,aje,sje,oje,lje,uje,bce,wce=D(()=>{o5();xce();lu();AB();nje=/[\\^$.*+?()[\]{}|]/g,ije=/^\[object .+?Constructor\]$/,aje=Function.prototype,sje=Object.prototype,oje=aje.toString,lje=sje.hasOwnProperty,uje=RegExp("^"+oje.call(lje).replace(nje,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");bce=cje});function hje(t,e){return t?.[e]}var kce,Tce=D(()=>{kce=hje});function fje(t,e){var r=kce(t,e);return bce(r)?r:void 0}var jo,cd=D(()=>{wce();Tce();jo=fje});var dje,zh,l5=D(()=>{cd();dje=jo(Object,"create"),zh=dje});function pje(){this.__data__=zh?zh(null):{},this.size=0}var Ece,Sce=D(()=>{l5();Ece=pje});function mje(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}var Cce,_ce=D(()=>{Cce=mje});function xje(t){var e=this.__data__;if(zh){var r=e[t];return r===gje?void 0:r}return vje.call(e,t)?e[t]:void 0}var gje,yje,vje,Ace,Lce=D(()=>{l5();gje="__lodash_hash_undefined__",yje=Object.prototype,vje=yje.hasOwnProperty;Ace=xje});function kje(t){var e=this.__data__;return zh?e[t]!==void 0:wje.call(e,t)}var bje,wje,Rce,Dce=D(()=>{l5();bje=Object.prototype,wje=bje.hasOwnProperty;Rce=kje});function Eje(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=zh&&e===void 0?Tje:e,this}var Tje,Ice,Mce=D(()=>{l5();Tje="__lodash_hash_undefined__";Ice=Eje});function $2(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e{Sce();_ce();Lce();Dce();Mce();$2.prototype.clear=Ece;$2.prototype.delete=Cce;$2.prototype.get=Ace;$2.prototype.has=Rce;$2.prototype.set=Ice;LB=$2});function Sje(){this.__data__=[],this.size=0}var Oce,Pce=D(()=>{Oce=Sje});function Cje(t,e){return t===e||t!==t&&e!==e}var uu,Q1=D(()=>{uu=Cje});function _je(t,e){for(var r=t.length;r--;)if(uu(t[r][0],e))return r;return-1}var hd,u5=D(()=>{Q1();hd=_je});function Rje(t){var e=this.__data__,r=hd(e,t);if(r<0)return!1;var n=e.length-1;return r==n?e.pop():Lje.call(e,r,1),--this.size,!0}var Aje,Lje,Bce,Fce=D(()=>{u5();Aje=Array.prototype,Lje=Aje.splice;Bce=Rje});function Dje(t){var e=this.__data__,r=hd(e,t);return r<0?void 0:e[r][1]}var zce,$ce=D(()=>{u5();zce=Dje});function Ije(t){return hd(this.__data__,t)>-1}var Gce,qce=D(()=>{u5();Gce=Ije});function Mje(t,e){var r=this.__data__,n=hd(r,t);return n<0?(++this.size,r.push([t,e])):r[n][1]=e,this}var Uce,Hce=D(()=>{u5();Uce=Mje});function G2(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e{Pce();Fce();$ce();qce();Hce();G2.prototype.clear=Oce;G2.prototype.delete=Bce;G2.prototype.get=zce;G2.prototype.has=Gce;G2.prototype.set=Uce;fd=G2});var Nje,dd,Y9=D(()=>{cd();ou();Nje=jo(ji,"Map"),dd=Nje});function Oje(){this.size=0,this.__data__={hash:new LB,map:new(dd||fd),string:new LB}}var Vce,Wce=D(()=>{Nce();c5();Y9();Vce=Oje});function Pje(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}var Yce,Xce=D(()=>{Yce=Pje});function Bje(t,e){var r=t.__data__;return Yce(e)?r[typeof e=="string"?"string":"hash"]:r.map}var pd,h5=D(()=>{Xce();pd=Bje});function Fje(t){var e=pd(this,t).delete(t);return this.size-=e?1:0,e}var jce,Kce=D(()=>{h5();jce=Fje});function zje(t){return pd(this,t).get(t)}var Zce,Qce=D(()=>{h5();Zce=zje});function $je(t){return pd(this,t).has(t)}var Jce,e0e=D(()=>{h5();Jce=$je});function Gje(t,e){var r=pd(this,t),n=r.size;return r.set(t,e),this.size+=r.size==n?0:1,this}var t0e,r0e=D(()=>{h5();t0e=Gje});function q2(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e{Wce();Kce();Qce();e0e();r0e();q2.prototype.clear=Vce;q2.prototype.delete=jce;q2.prototype.get=Zce;q2.prototype.has=Jce;q2.prototype.set=t0e;J1=q2});function RB(t,e){if(typeof t!="function"||e!=null&&typeof e!="function")throw new TypeError(qje);var r=function(){var n=arguments,i=e?e.apply(this,n):n[0],a=r.cache;if(a.has(i))return a.get(i);var s=t.apply(this,n);return r.cache=a.set(i,s)||a,s};return r.cache=new(RB.Cache||J1),r}var qje,U2,DB=D(()=>{X9();qje="Expected a function";RB.Cache=J1;U2=RB});function Uje(){this.__data__=new fd,this.size=0}var n0e,i0e=D(()=>{c5();n0e=Uje});function Hje(t){var e=this.__data__,r=e.delete(t);return this.size=e.size,r}var a0e,s0e=D(()=>{a0e=Hje});function Vje(t){return this.__data__.get(t)}var o0e,l0e=D(()=>{o0e=Vje});function Wje(t){return this.__data__.has(t)}var u0e,c0e=D(()=>{u0e=Wje});function Xje(t,e){var r=this.__data__;if(r instanceof fd){var n=r.__data__;if(!dd||n.length{c5();Y9();X9();Yje=200;h0e=Xje});function H2(t){var e=this.__data__=new fd(t);this.size=e.size}var s0,f5=D(()=>{c5();i0e();s0e();l0e();c0e();f0e();H2.prototype.clear=n0e;H2.prototype.delete=a0e;H2.prototype.get=o0e;H2.prototype.has=u0e;H2.prototype.set=h0e;s0=H2});var jje,V2,IB=D(()=>{cd();jje=(function(){try{var t=jo(Object,"defineProperty");return t({},"",{}),t}catch{}})(),V2=jje});function Kje(t,e,r){e=="__proto__"&&V2?V2(t,e,{configurable:!0,enumerable:!0,value:r,writable:!0}):t[e]=r}var md,d5=D(()=>{IB();md=Kje});function Zje(t,e,r){(r!==void 0&&!uu(t[e],r)||r===void 0&&!(e in t))&&md(t,e,r)}var p5,MB=D(()=>{d5();Q1();p5=Zje});function Qje(t){return function(e,r,n){for(var i=-1,a=Object(e),s=n(e),o=s.length;o--;){var l=s[t?o:++i];if(r(a[l],l,a)===!1)break}return e}}var d0e,p0e=D(()=>{d0e=Qje});var Jje,W2,j9=D(()=>{p0e();Jje=d0e(),W2=Jje});function tKe(t,e){if(e)return t.slice();var r=t.length,n=y0e?y0e(r):new t.constructor(r);return t.copy(n),n}var v0e,m0e,eKe,g0e,y0e,K9,NB=D(()=>{ou();v0e=typeof exports=="object"&&exports&&!exports.nodeType&&exports,m0e=v0e&&typeof module=="object"&&module&&!module.nodeType&&module,eKe=m0e&&m0e.exports===v0e,g0e=eKe?ji.Buffer:void 0,y0e=g0e?g0e.allocUnsafe:void 0;K9=tKe});var rKe,Y2,OB=D(()=>{ou();rKe=ji.Uint8Array,Y2=rKe});function nKe(t){var e=new t.constructor(t.byteLength);return new Y2(e).set(new Y2(t)),e}var X2,Z9=D(()=>{OB();X2=nKe});function iKe(t,e){var r=e?X2(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.length)}var Q9,PB=D(()=>{Z9();Q9=iKe});function aKe(t,e){var r=-1,n=t.length;for(e||(e=Array(n));++r{J9=aKe});var x0e,sKe,b0e,w0e=D(()=>{lu();x0e=Object.create,sKe=(function(){function t(){}return function(e){if(!Ai(e))return{};if(x0e)return x0e(e);t.prototype=e;var r=new t;return t.prototype=void 0,r}})(),b0e=sKe});function oKe(t,e){return function(r){return t(e(r))}}var eE,FB=D(()=>{eE=oKe});var lKe,j2,tE=D(()=>{FB();lKe=eE(Object.getPrototypeOf,Object),j2=lKe});function cKe(t){var e=t&&t.constructor,r=typeof e=="function"&&e.prototype||uKe;return t===r}var uKe,gd,m5=D(()=>{uKe=Object.prototype;gd=cKe});function hKe(t){return typeof t.constructor=="function"&&!gd(t)?b0e(j2(t)):{}}var rE,zB=D(()=>{w0e();tE();m5();rE=hKe});function fKe(t){return t!=null&&typeof t=="object"}var oa,ec=D(()=>{oa=fKe});function pKe(t){return oa(t)&&mo(t)==dKe}var dKe,$B,k0e=D(()=>{ud();ec();dKe="[object Arguments]";$B=pKe});var T0e,mKe,gKe,yKe,tc,K2=D(()=>{k0e();ec();T0e=Object.prototype,mKe=T0e.hasOwnProperty,gKe=T0e.propertyIsEnumerable,yKe=$B((function(){return arguments})())?$B:function(t){return oa(t)&&mKe.call(t,"callee")&&!gKe.call(t,"callee")},tc=yKe});var vKe,Gr,Ta=D(()=>{vKe=Array.isArray,Gr=vKe});function bKe(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=xKe}var xKe,Z2,nE=D(()=>{xKe=9007199254740991;Z2=bKe});function wKe(t){return t!=null&&Z2(t.length)&&!a0(t)}var os,o0=D(()=>{o5();nE();os=wKe});function kKe(t){return oa(t)&&os(t)}var iE,GB=D(()=>{o0();ec();iE=kKe});function TKe(){return!1}var E0e,S0e=D(()=>{E0e=TKe});var A0e,C0e,EKe,_0e,SKe,CKe,rc,Q2=D(()=>{ou();S0e();A0e=typeof exports=="object"&&exports&&!exports.nodeType&&exports,C0e=A0e&&typeof module=="object"&&module&&!module.nodeType&&module,EKe=C0e&&C0e.exports===A0e,_0e=EKe?ji.Buffer:void 0,SKe=_0e?_0e.isBuffer:void 0,CKe=SKe||E0e,rc=CKe});function IKe(t){if(!oa(t)||mo(t)!=_Ke)return!1;var e=j2(t);if(e===null)return!0;var r=RKe.call(e,"constructor")&&e.constructor;return typeof r=="function"&&r instanceof r&&L0e.call(r)==DKe}var _Ke,AKe,LKe,L0e,RKe,DKe,R0e,D0e=D(()=>{ud();tE();ec();_Ke="[object Object]",AKe=Function.prototype,LKe=Object.prototype,L0e=AKe.toString,RKe=LKe.hasOwnProperty,DKe=L0e.call(Object);R0e=IKe});function nZe(t){return oa(t)&&Z2(t.length)&&!!xi[mo(t)]}var MKe,NKe,OKe,PKe,BKe,FKe,zKe,$Ke,GKe,qKe,UKe,HKe,VKe,WKe,YKe,XKe,jKe,KKe,ZKe,QKe,JKe,eZe,tZe,rZe,xi,I0e,M0e=D(()=>{ud();nE();ec();MKe="[object Arguments]",NKe="[object Array]",OKe="[object Boolean]",PKe="[object Date]",BKe="[object Error]",FKe="[object Function]",zKe="[object Map]",$Ke="[object Number]",GKe="[object Object]",qKe="[object RegExp]",UKe="[object Set]",HKe="[object String]",VKe="[object WeakMap]",WKe="[object ArrayBuffer]",YKe="[object DataView]",XKe="[object Float32Array]",jKe="[object Float64Array]",KKe="[object Int8Array]",ZKe="[object Int16Array]",QKe="[object Int32Array]",JKe="[object Uint8Array]",eZe="[object Uint8ClampedArray]",tZe="[object Uint16Array]",rZe="[object Uint32Array]",xi={};xi[XKe]=xi[jKe]=xi[KKe]=xi[ZKe]=xi[QKe]=xi[JKe]=xi[eZe]=xi[tZe]=xi[rZe]=!0;xi[MKe]=xi[NKe]=xi[WKe]=xi[OKe]=xi[YKe]=xi[PKe]=xi[BKe]=xi[FKe]=xi[zKe]=xi[$Ke]=xi[GKe]=xi[qKe]=xi[UKe]=xi[HKe]=xi[VKe]=!1;I0e=nZe});function iZe(t){return function(e){return t(e)}}var yd,g5=D(()=>{yd=iZe});var N0e,y5,aZe,qB,sZe,$h,aE=D(()=>{_B();N0e=typeof exports=="object"&&exports&&!exports.nodeType&&exports,y5=N0e&&typeof module=="object"&&module&&!module.nodeType&&module,aZe=y5&&y5.exports===N0e,qB=aZe&&V9.process,sZe=(function(){try{var t=y5&&y5.require&&y5.require("util").types;return t||qB&&qB.binding&&qB.binding("util")}catch{}})(),$h=sZe});var O0e,oZe,vd,v5=D(()=>{M0e();g5();aE();O0e=$h&&$h.isTypedArray,oZe=O0e?yd(O0e):I0e,vd=oZe});function lZe(t,e){if(!(e==="constructor"&&typeof t[e]=="function")&&e!="__proto__")return t[e]}var x5,UB=D(()=>{x5=lZe});function hZe(t,e,r){var n=t[e];(!(cZe.call(t,e)&&uu(n,r))||r===void 0&&!(e in t))&&md(t,e,r)}var uZe,cZe,xd,b5=D(()=>{d5();Q1();uZe=Object.prototype,cZe=uZe.hasOwnProperty;xd=hZe});function fZe(t,e,r,n){var i=!r;r||(r={});for(var a=-1,s=e.length;++a{b5();d5();l0=fZe});function dZe(t,e){for(var r=-1,n=Array(t);++r{P0e=dZe});function gZe(t,e){var r=typeof t;return e=e??pZe,!!e&&(r=="number"||r!="symbol"&&mZe.test(t))&&t>-1&&t%1==0&&t{pZe=9007199254740991,mZe=/^(?:0|[1-9]\d*)$/;bd=gZe});function xZe(t,e){var r=Gr(t),n=!r&&tc(t),i=!r&&!n&&rc(t),a=!r&&!n&&!i&&vd(t),s=r||n||i||a,o=s?P0e(t.length,String):[],l=o.length;for(var u in t)(e||vZe.call(t,u))&&!(s&&(u=="length"||i&&(u=="offset"||u=="parent")||a&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||bd(u,l)))&&o.push(u);return o}var yZe,vZe,sE,HB=D(()=>{B0e();K2();Ta();Q2();w5();v5();yZe=Object.prototype,vZe=yZe.hasOwnProperty;sE=xZe});function bZe(t){var e=[];if(t!=null)for(var r in Object(t))e.push(r);return e}var F0e,z0e=D(()=>{F0e=bZe});function TZe(t){if(!Ai(t))return F0e(t);var e=gd(t),r=[];for(var n in t)n=="constructor"&&(e||!kZe.call(t,n))||r.push(n);return r}var wZe,kZe,$0e,G0e=D(()=>{lu();m5();z0e();wZe=Object.prototype,kZe=wZe.hasOwnProperty;$0e=TZe});function EZe(t){return os(t)?sE(t,!0):$0e(t)}var Ko,wd=D(()=>{HB();G0e();o0();Ko=EZe});function SZe(t){return l0(t,Ko(t))}var q0e,U0e=D(()=>{J2();wd();q0e=SZe});function CZe(t,e,r,n,i,a,s){var o=x5(t,r),l=x5(e,r),u=s.get(l);if(u){p5(t,r,u);return}var h=a?a(o,l,r+"",t,e,s):void 0,f=h===void 0;if(f){var d=Gr(l),p=!d&&rc(l),m=!d&&!p&&vd(l);h=l,d||p||m?Gr(o)?h=o:iE(o)?h=J9(o):p?(f=!1,h=K9(l,!0)):m?(f=!1,h=Q9(l,!0)):h=[]:R0e(l)||tc(l)?(h=o,tc(o)?h=q0e(o):(!Ai(o)||a0(o))&&(h=rE(l))):f=!1}f&&(s.set(l,h),i(h,l,n,a,s),s.delete(l)),p5(t,r,h)}var H0e,V0e=D(()=>{MB();NB();PB();BB();zB();K2();Ta();GB();Q2();o5();lu();D0e();v5();UB();U0e();H0e=CZe});function W0e(t,e,r,n,i){t!==e&&W2(e,function(a,s){if(i||(i=new s0),Ai(a))H0e(t,e,s,r,W0e,n,i);else{var o=n?n(x5(t,s),a,s+"",t,e,i):void 0;o===void 0&&(o=a),p5(t,s,o)}},Ko)}var Y0e,X0e=D(()=>{f5();MB();j9();V0e();lu();wd();UB();Y0e=W0e});function _Ze(t){return t}var Zo,kd=D(()=>{Zo=_Ze});function AZe(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 j0e,K0e=D(()=>{j0e=AZe});function LZe(t,e,r){return e=Z0e(e===void 0?t.length-1:e,0),function(){for(var n=arguments,i=-1,a=Z0e(n.length-e,0),s=Array(a);++i{K0e();Z0e=Math.max;oE=LZe});function RZe(t){return function(){return t}}var Qo,WB=D(()=>{Qo=RZe});var DZe,Q0e,J0e=D(()=>{WB();IB();kd();DZe=V2?function(t,e){return V2(t,"toString",{configurable:!0,enumerable:!1,value:Qo(e),writable:!0})}:Zo,Q0e=DZe});function OZe(t){var e=0,r=0;return function(){var n=NZe(),i=MZe-(n-r);if(r=n,i>0){if(++e>=IZe)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}var IZe,MZe,NZe,ehe,the=D(()=>{IZe=800,MZe=16,NZe=Date.now;ehe=OZe});var PZe,lE,YB=D(()=>{J0e();the();PZe=ehe(Q0e),lE=PZe});function BZe(t,e){return lE(oE(t,e,Zo),t+"")}var Td,k5=D(()=>{kd();VB();YB();Td=BZe});function FZe(t,e,r){if(!Ai(r))return!1;var n=typeof e;return(n=="number"?os(r)&&bd(e,r.length):n=="string"&&e in r)?uu(r[e],t):!1}var Gh,T5=D(()=>{Q1();o0();w5();lu();Gh=FZe});function zZe(t){return Td(function(e,r){var n=-1,i=r.length,a=i>1?r[i-1]:void 0,s=i>2?r[2]:void 0;for(a=t.length>3&&typeof a=="function"?(i--,a):void 0,s&&Gh(r[0],r[1],s)&&(a=i<3?void 0:a,i=1),e=Object(e);++n{k5();T5();rhe=zZe});var $Ze,Ed,XB=D(()=>{X0e();nhe();$Ze=rhe(function(t,e,r){Y0e(t,e,r)}),Ed=$Ze});function cE(t,e){if(!t)return e;let r=`curve${t.charAt(0).toUpperCase()+t.slice(1)}`;return GZe[r]??e}function uhe(t,e){let r=t.trim();if(r)return e.securityLevel!=="loose"?(0,she.sanitizeUrl)(r):r}function KB(t,e){return!t||!e?0:Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function che(t){let e,r=0;t.forEach(i=>{r+=KB(i,e),e=i});let n=r/2;return ZB(t,n)}function hhe(t){return t.length===1?t[0]:che(t)}function fhe(t,e,r){let n=structuredClone(r);he.info("our points",n),e!=="start_left"&&e!=="start_right"&&n.reverse();let i=25+t,a=ZB(n,i),s=10+t*.5,o=Math.atan2(n[0].y-a.y,n[0].x-a.x),l={x:0,y:0};return e==="start_left"?(l.x=Math.sin(o+Math.PI)*s+(n[0].x+a.x)/2,l.y=-Math.cos(o+Math.PI)*s+(n[0].y+a.y)/2):e==="end_right"?(l.x=Math.sin(o-Math.PI)*s+(n[0].x+a.x)/2-5,l.y=-Math.cos(o-Math.PI)*s+(n[0].y+a.y)/2-5):e==="end_left"?(l.x=Math.sin(o)*s+(n[0].x+a.x)/2-5,l.y=-Math.cos(o)*s+(n[0].y+a.y)/2-5):(l.x=Math.sin(o)*s+(n[0].x+a.x)/2,l.y=-Math.cos(o)*s+(n[0].y+a.y)/2),l}function hE(t){let e="",r="";for(let n of t)n!==void 0&&(n.startsWith("color:")||n.startsWith("text-align:")?r=r+n+";":e=e+n+";");return{style:e,labelStyle:r}}function dhe(t){let e="",r="0123456789abcdef",n=r.length;for(let i=0;i{Nr();she=Na(b2(),1);Or();DB();XB();jB="\u200B",GZe={curveBasis:Ju,curveBasisClosed:dB,curveBasisOpen:pB,curveBumpX:V3,curveBumpY:W3,curveBundle:mB,curveCardinalClosed:gB,curveCardinalOpen:vB,curveCardinal:K3,curveCatmullRomClosed:bB,curveCatmullRomOpen:wB,curveCatmullRom:J3,curveLinear:od,curveLinearClosed:kB,curveMonotoneX:e5,curveMonotoneY:t5,curveNatural:r5,curveStep:n5,curveStepAfter:a5,curveStepBefore:i5},qZe=/\s*(?:(\w+)(?=:):|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,UZe=b(function(t,e){let r=ohe(t,/(?:init\b)|(?:initialize\b)/),n={};if(Array.isArray(r)){let s=r.map(o=>o.args);i3(s),n=Gi(n,[...s])}else n=r.args;if(!n)return;let i=a3(t,e),a="config";return n[a]!==void 0&&(i==="flowchart-v2"&&(i="flowchart"),n[i]=n[a],delete n[a]),n},"detectInit"),ohe=b(function(t,e=null){try{let r=new RegExp(`[%]{2}(?![{]${qZe.source})(?=[}][%]{2}).* +`,"ig");t=t.trim().replace(r,"").replace(/'/gm,'"'),he.debug(`Detecting diagram directive${e!==null?" type:"+e:""} based on the text:${t}`);let n,i=[];for(;(n=l2.exec(t))!==null;)if(n.index===l2.lastIndex&&l2.lastIndex++,n&&!e||e&&n[1]?.match(e)||e&&n[2]?.match(e)){let a=n[1]?n[1]:n[2],s=n[3]?n[3].trim():n[4]?JSON.parse(n[4].trim()):null;i.push({type:a,args:s})}return i.length===0?{type:t,args:null}:i.length===1?i[0]:i}catch(r){return he.error(`ERROR: ${r.message} - Unable to parse directive type: '${e}' based on the text: '${t}'`),{type:void 0,args:null}}},"detectDirective"),lhe=b(function(t){return t.replace(l2,"")},"removeDirectives"),HZe=b(function(t,e){for(let[r,n]of e.entries())if(n.match(t))return r;return-1},"isSubstringInArray");b(cE,"interpolateToCurve");b(uhe,"formatUrl");VZe=b((t,...e)=>{let r=t.split("."),n=r.length-1,i=r[n],a=window;for(let s=0;s{let r=Math.pow(10,e);return Math.round(t*r)/r},"roundNumber"),ZB=b((t,e)=>{let r,n=e;for(let i of t){if(r){let a=KB(i,r);if(a===0)return r;if(a=1)return{x:i.x,y:i.y};if(s>0&&s<1)return{x:ihe((1-s)*r.x+s*i.x,5),y:ihe((1-s)*r.y+s*i.y,5)}}}r=i}throw new Error("Could not find a suitable point for the given distance")},"calculatePoint"),WZe=b((t,e,r)=>{he.info(`our points ${JSON.stringify(e)}`),e[0]!==r&&(e=e.reverse());let i=ZB(e,25),a=t?10:5,s=Math.atan2(e[0].y-i.y,e[0].x-i.x),o={x:0,y:0};return o.x=Math.sin(s)*a+(e[0].x+i.x)/2,o.y=-Math.cos(s)*a+(e[0].y+i.y)/2,o},"calcCardinalityPosition");b(fhe,"calcTerminalLabelPosition");b(hE,"getStylesFromArray");ahe=0,QB=b(()=>(ahe++,"id-"+Math.random().toString(36).substr(2,12)+"-"+ahe),"generateId");b(dhe,"makeRandomHex");JB=b(t=>dhe(t.length),"random"),YZe=b(function(){return{x:0,y:0,fill:void 0,anchor:"start",style:"#666",width:100,height:100,textMargin:0,rx:0,ry:0,valign:void 0,text:""}},"getTextObj"),XZe=b(function(t,e){let r=e.text.replace(St.lineBreakRegex," "),[,n]=cu(e.fontSize),i=t.append("text");i.attr("x",e.x),i.attr("y",e.y),i.style("text-anchor",e.anchor),i.style("font-family",e.fontFamily),i.style("font-size",n),i.style("font-weight",e.fontWeight),i.attr("fill",e.fill),e.class!==void 0&&i.attr("class",e.class);let a=i.append("tspan");return a.attr("x",e.x+e.textMargin*2),a.attr("fill",e.fill),a.text(r),i},"drawSimpleText"),eF=U2((t,e,r)=>{if(!t||(r=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",joinWith:"
"},r),St.lineBreakRegex.test(t)))return t;let n=t.split(" ").filter(Boolean),i=[],a="";return n.forEach((s,o)=>{let l=_s(`${s} `,r),u=_s(a,r);if(l>e){let{hyphenatedStrings:d,remainingWord:p}=jZe(s,e,"-",r);i.push(a,...d),a=p}else u+l>=e?(i.push(a),a=s):a=[a,s].filter(Boolean).join(" ");o+1===n.length&&i.push(a)}),i.filter(s=>s!=="").join(r.joinWith)},(t,e,r)=>`${t}${e}${r.fontSize}${r.fontWeight}${r.fontFamily}${r.joinWith}`),jZe=U2((t,e,r="-",n)=>{n=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",margin:0},n);let i=[...t],a=[],s="";return i.forEach((o,l)=>{let u=`${s}${o}`;if(_s(u,n)>=e){let f=l+1,d=i.length===f,p=`${u}${r}`;a.push(d?u:p),s=""}else s=u}),{hyphenatedStrings:a,remainingWord:s}},(t,e,r="-",n)=>`${t}${e}${r}${n.fontSize}${n.fontWeight}${n.fontFamily}`);b(E5,"calculateTextHeight");b(_s,"calculateTextWidth");tF=U2((t,e)=>{let{fontSize:r=12,fontFamily:n="Arial",fontWeight:i=400}=e;if(!t)return{width:0,height:0};let[,a]=cu(r),s=["sans-serif",n],o=t.split(St.lineBreakRegex),l=[],u=dt("body");if(!u.remove)return{width:0,height:0,lineHeight:0};let h=u.append("svg");for(let d of s){let p=0,m={width:0,height:0,lineHeight:0};for(let g of o){let y=YZe();y.text=g||jB;let v=XZe(h,y).style("font-size",a).style("font-weight",i).style("font-family",d),x=(v._groups||v)[0][0].getBBox();if(x.width===0&&x.height===0)throw new Error("svg element not in render tree");m.width=Math.round(Math.max(m.width,x.width)),p=Math.round(x.height),m.height+=p,m.lineHeight=Math.round(Math.max(m.lineHeight,p))}l.push(m)}h.remove();let f=isNaN(l[1].height)||isNaN(l[1].width)||isNaN(l[1].lineHeight)||l[0].height>l[1].height&&l[0].width>l[1].width&&l[0].lineHeight>l[1].lineHeight?0:1;return l[f]},(t,e)=>`${t}${e.fontSize}${e.fontWeight}${e.fontFamily}`),KZe=(ey=class{constructor(e=!1,r){this.count=0,this.count=r?r.length:0,this.next=e?()=>this.count++:()=>Date.now()}},b(ey,"InitIDGenerator"),ey),ZZe=b(function(t){return uE=uE||document.createElement("div"),t=escape(t).replace(/%26/g,"&").replace(/%23/g,"#").replace(/%3B/g,";"),uE.innerHTML=t,unescape(uE.textContent)},"entityDecode");b(fE,"isDetailedError");QZe=b((t,e,r,n)=>{if(!n)return;let i=t.node()?.getBBox();i&&t.append("text").text(n).attr("text-anchor","middle").attr("x",i.x+i.width/2).attr("y",-r).attr("class",e)},"insertTitle"),cu=b(t=>{if(typeof t=="number")return[t,t+"px"];let e=parseInt(t??"",10);return Number.isNaN(e)?[void 0,void 0]:t===String(e)?[e,t+"px"]:[e,t]},"parseFontSize");b(ls,"cleanAndMerge");gr={assignWithDepth:Gi,wrapLabel:eF,calculateTextHeight:E5,calculateTextWidth:_s,calculateTextDimensions:tF,cleanAndMerge:ls,detectInit:UZe,detectDirective:ohe,isSubstringInArray:HZe,interpolateToCurve:cE,calcLabelPosition:hhe,calcCardinalityPosition:WZe,calcTerminalLabelPosition:fhe,formatUrl:uhe,getStylesFromArray:hE,generateId:QB,random:JB,runFunc:VZe,entityDecode:ZZe,insertTitle:QZe,parseFontSize:cu,InitIDGenerator:KZe},phe=b(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){let n=r.substring(1,r.length-1);return/^\+?\d+$/.test(n)?"\uFB02\xB0\xB0"+n+"\xB6\xDF":"\uFB02\xB0"+n+"\xB6\xDF"}),e},"encodeEntities"),Jo=b(function(t){return t.replace(/fl°°/g,"&#").replace(/fl°/g,"&").replace(/¶ß/g,";")},"decodeEntities"),Sd=b((t,e,{counter:r=0,prefix:n,suffix:i},a)=>a||`${n?`${n}_`:""}${t}_${e}_${r}${i?`_${i}`:""}`,"getEdgeId");b(Vs,"handleUndefinedAttr")});function sF(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}function bhe(t){tm=t}function Rn(t,e=""){let r=typeof t=="string"?t:t.source,n={replace:(i,a)=>{let s=typeof a=="string"?a:a.source;return s=s.replace(go.caret,"$1"),r=r.replace(i,s),n},getRegex:()=>new RegExp(r,e)};return n}function u0(t,e){if(e){if(go.escapeTest.test(t))return t.replace(go.escapeReplace,ghe)}else if(go.escapeTestNoEncode.test(t))return t.replace(go.escapeReplaceNoEncode,ghe);return t}function yhe(t){try{t=encodeURI(t).replace(go.percentDecode,"%")}catch{return null}return t}function vhe(t,e){let r=t.replace(go.findPipe,(a,s,o)=>{let l=!1,u=s;for(;--u>=0&&o[u]==="\\";)l=!l;return l?"|":" |"}),n=r.split(go.splitPipe),i=0;if(n[0].trim()||n.shift(),n.length>0&&!n.at(-1)?.trim()&&n.pop(),e)if(n.length>e)n.splice(e);else for(;n.length0?-2:-1}function xhe(t,e,r,n,i){let a=e.href,s=e.title||null,o=t[1].replace(i.other.outputLinkReplace,"$1");n.state.inLink=!0;let l={type:t[0].charAt(0)==="!"?"image":"link",raw:r,href:a,title:s,text:o,tokens:n.inlineTokens(o)};return n.state.inLink=!1,l}function MQe(t,e,r){let n=t.match(r.other.indentCodeCompensation);if(n===null)return e;let i=n[1];return e.split(` +`).map(a=>{let s=a.match(r.other.beginningSpace);if(s===null)return a;let[o]=s;return o.length>=i.length?a.slice(i.length):a}).join(` +`)}function _n(t,e){return em.parse(t,e)}var tm,_5,go,JZe,eQe,tQe,A5,rQe,oF,whe,khe,nQe,lF,iQe,uF,aQe,sQe,vE,cF,oQe,The,lQe,hF,mhe,uQe,cQe,hQe,fQe,Ehe,dQe,xE,fF,She,pQe,Che,mQe,gQe,yQe,_he,vQe,xQe,Ahe,bQe,wQe,kQe,TQe,EQe,SQe,CQe,mE,_Qe,Lhe,Rhe,AQe,dF,LQe,nF,RQe,dE,S5,DQe,ghe,gE,qh,yE,pF,Uh,rF,pE,NQe,em,xtr,btr,wtr,ktr,Ttr,Etr,Str,Dhe=D(()=>{tm=sF();_5={exec:()=>null};go={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^
/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:t=>new RegExp(`^( {0,3}${t})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}#`),htmlBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}<(?:[a-z].*>|!--)`,"i")},JZe=/^(?:[ \t]*(?:\n|$))+/,eQe=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,tQe=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,A5=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,rQe=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,oF=/(?:[*+-]|\d{1,9}[.)])/,whe=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,khe=Rn(whe).replace(/bull/g,oF).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),nQe=Rn(whe).replace(/bull/g,oF).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),lF=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,iQe=/^[^\n]+/,uF=/(?!\s*\])(?:\\.|[^\[\]\\])+/,aQe=Rn(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",uF).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),sQe=Rn(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,oF).getRegex(),vE="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",cF=/|$))/,oQe=Rn("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|\\n*|$)|\\n*|$)|)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",cF).replace("tag",vE).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),The=Rn(lF).replace("hr",A5).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",vE).getRegex(),lQe=Rn(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",The).getRegex(),hF={blockquote:lQe,code:eQe,def:aQe,fences:tQe,heading:rQe,hr:A5,html:oQe,lheading:khe,list:sQe,newline:JZe,paragraph:The,table:_5,text:iQe},mhe=Rn("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",A5).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",vE).getRegex(),uQe={...hF,lheading:nQe,table:mhe,paragraph:Rn(lF).replace("hr",A5).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",mhe).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",vE).getRegex()},cQe={...hF,html:Rn(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",cF).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:_5,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:Rn(lF).replace("hr",A5).replace("heading",` *#{1,6} *[^ +]`).replace("lheading",khe).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},hQe=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,fQe=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,Ehe=/^( {2,}|\\)\n(?!\s*$)/,dQe=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\]*?>/g,_he=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,vQe=Rn(_he,"u").replace(/punct/g,xE).getRegex(),xQe=Rn(_he,"u").replace(/punct/g,Che).getRegex(),Ahe="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",bQe=Rn(Ahe,"gu").replace(/notPunctSpace/g,She).replace(/punctSpace/g,fF).replace(/punct/g,xE).getRegex(),wQe=Rn(Ahe,"gu").replace(/notPunctSpace/g,gQe).replace(/punctSpace/g,mQe).replace(/punct/g,Che).getRegex(),kQe=Rn("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,She).replace(/punctSpace/g,fF).replace(/punct/g,xE).getRegex(),TQe=Rn(/\\(punct)/,"gu").replace(/punct/g,xE).getRegex(),EQe=Rn(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),SQe=Rn(cF).replace("(?:-->|$)","-->").getRegex(),CQe=Rn("^comment|^|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^").replace("comment",SQe).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),mE=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,_Qe=Rn(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",mE).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),Lhe=Rn(/^!?\[(label)\]\[(ref)\]/).replace("label",mE).replace("ref",uF).getRegex(),Rhe=Rn(/^!?\[(ref)\](?:\[\])?/).replace("ref",uF).getRegex(),AQe=Rn("reflink|nolink(?!\\()","g").replace("reflink",Lhe).replace("nolink",Rhe).getRegex(),dF={_backpedal:_5,anyPunctuation:TQe,autolink:EQe,blockSkip:yQe,br:Ehe,code:fQe,del:_5,emStrongLDelim:vQe,emStrongRDelimAst:bQe,emStrongRDelimUnd:kQe,escape:hQe,link:_Qe,nolink:Rhe,punctuation:pQe,reflink:Lhe,reflinkSearch:AQe,tag:CQe,text:dQe,url:_5},LQe={...dF,link:Rn(/^!?\[(label)\]\((.*?)\)/).replace("label",mE).getRegex(),reflink:Rn(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",mE).getRegex()},nF={...dF,emStrongRDelimAst:wQe,emStrongLDelim:xQe,url:Rn(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,"i").replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\.|[^\\])*?(?:\\.|[^\s~\\]))\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\":">",'"':""","'":"'"},ghe=t=>DQe[t];gE=class{options;rules;lexer;constructor(t){this.options=t||tm}space(t){let e=this.rules.block.newline.exec(t);if(e&&e[0].length>0)return{type:"space",raw:e[0]}}code(t){let e=this.rules.block.code.exec(t);if(e){let r=e[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:e[0],codeBlockStyle:"indented",text:this.options.pedantic?r:C5(r,` +`)}}}fences(t){let e=this.rules.block.fences.exec(t);if(e){let r=e[0],n=MQe(r,e[3]||"",this.rules);return{type:"code",raw:r,lang:e[2]?e[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):e[2],text:n}}}heading(t){let e=this.rules.block.heading.exec(t);if(e){let r=e[2].trim();if(this.rules.other.endingHash.test(r)){let n=C5(r,"#");(this.options.pedantic||!n||this.rules.other.endingSpaceChar.test(n))&&(r=n.trim())}return{type:"heading",raw:e[0],depth:e[1].length,text:r,tokens:this.lexer.inline(r)}}}hr(t){let e=this.rules.block.hr.exec(t);if(e)return{type:"hr",raw:C5(e[0],` +`)}}blockquote(t){let e=this.rules.block.blockquote.exec(t);if(e){let r=C5(e[0],` `).split(` -`),n="",a="",i=[];for(;r.length>0;){let s=!1,o=[],l;for(l=0;l0;){let s=!1,o=[],l;for(l=0;l1,a={type:"list",raw:"",ordered:n,start:n?+r.slice(0,-1):"",loose:!1,items:[]};r=n?`\\d{1,9}\\${r.slice(-1)}`:`\\${r}`,this.options.pedantic&&(r=n?r:"[*+-]");let i=this.rules.other.listItemRegex(r),s=!1;for(;t;){let l=!1,u="",h="";if(!(e=i.exec(t))||this.rules.block.hr.test(t))break;u=e[0],t=t.substring(u.length);let f=e[2].split(` -`,1)[0].replace(this.rules.other.listReplaceTabs,y=>" ".repeat(3*y.length)),d=t.split(` +`),g=this.list(m);a[a.length-1]=g,n=n.substring(0,n.length-d.raw.length)+g.raw,i=i.substring(0,i.length-p.raw.length)+g.raw,r=m.substring(a.at(-1).raw.length).split(` +`);continue}}return{type:"blockquote",raw:n,tokens:a,text:i}}}list(t){let e=this.rules.block.list.exec(t);if(e){let r=e[1].trim(),n=r.length>1,i={type:"list",raw:"",ordered:n,start:n?+r.slice(0,-1):"",loose:!1,items:[]};r=n?`\\d{1,9}\\${r.slice(-1)}`:`\\${r}`,this.options.pedantic&&(r=n?r:"[*+-]");let a=this.rules.other.listItemRegex(r),s=!1;for(;t;){let l=!1,u="",h="";if(!(e=a.exec(t))||this.rules.block.hr.test(t))break;u=e[0],t=t.substring(u.length);let f=e[2].split(` +`,1)[0].replace(this.rules.other.listReplaceTabs,v=>" ".repeat(3*v.length)),d=t.split(` `,1)[0],p=!f.trim(),m=0;if(this.options.pedantic?(m=2,h=f.trimStart()):p?m=e[1].length+1:(m=e[2].search(this.rules.other.nonSpaceChar),m=m>4?1:m,h=f.slice(m),m+=e[1].length),p&&this.rules.other.blankLine.test(d)&&(u+=d+` -`,t=t.substring(d.length+1),l=!0),!l){let y=this.rules.other.nextBulletRegex(m),b=this.rules.other.hrRegex(m),w=this.rules.other.fencesBeginRegex(m),C=this.rules.other.headingBeginRegex(m),k=this.rules.other.htmlBeginRegex(m);for(;t;){let E=t.split(` -`,1)[0],_;if(d=E,this.options.pedantic?(d=d.replace(this.rules.other.listReplaceNesting," "),_=d):_=d.replace(this.rules.other.tabCharGlobal," "),w.test(d)||C.test(d)||k.test(d)||y.test(d)||b.test(d))break;if(_.search(this.rules.other.nonSpaceChar)>=m||!d.trim())h+=` -`+_.slice(m);else{if(p||f.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||w.test(f)||C.test(f)||b.test(f))break;h+=` -`+d}!p&&!d.trim()&&(p=!0),u+=E+` -`,t=t.substring(E.length+1),f=_.slice(m)}}a.loose||(s?a.loose=!0:this.rules.other.doubleBlankLine.test(u)&&(s=!0));let g=null,v;this.options.gfm&&(g=this.rules.other.listIsTask.exec(h),g&&(v=g[0]!=="[ ] ",h=h.replace(this.rules.other.listReplaceTask,""))),a.items.push({type:"list_item",raw:u,task:!!g,checked:v,loose:!1,text:h,tokens:[]}),a.raw+=u}let o=a.items.at(-1);if(o)o.raw=o.raw.trimEnd(),o.text=o.text.trimEnd();else return;a.raw=a.raw.trimEnd();for(let l=0;lf.type==="space"),h=u.length>0&&u.some(f=>this.rules.other.anyLine.test(f.raw));a.loose=h}if(a.loose)for(let l=0;l({text:o,tokens:this.lexer.inline(o),header:!1,align:i.align[l]})));return i}}lheading(t){let e=this.rules.block.lheading.exec(t);if(e)return{type:"heading",raw:e[0],depth:e[2].charAt(0)==="="?1:2,text:e[1],tokens:this.lexer.inline(e[1])}}paragraph(t){let e=this.rules.block.paragraph.exec(t);if(e){let r=e[1].charAt(e[1].length-1)===` -`?e[1].slice(0,-1):e[1];return{type:"paragraph",raw:e[0],text:r,tokens:this.lexer.inline(r)}}}text(t){let e=this.rules.block.text.exec(t);if(e)return{type:"text",raw:e[0],text:e[0],tokens:this.lexer.inline(e[0])}}escape(t){let e=this.rules.inline.escape.exec(t);if(e)return{type:"escape",raw:e[0],text:e[1]}}tag(t){let e=this.rules.inline.tag.exec(t);if(e)return!this.lexer.state.inLink&&this.rules.other.startATag.test(e[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(e[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(e[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(e[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:e[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:e[0]}}link(t){let e=this.rules.inline.link.exec(t);if(e){let r=e[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(r)){if(!this.rules.other.endAngleBracket.test(r))return;let i=u3(r.slice(0,-1),"\\");if((r.length-i.length)%2===0)return}else{let i=tXe(e[2],"()");if(i===-2)return;if(i>-1){let o=(e[0].indexOf("!")===0?5:4)+e[1].length+i;e[2]=e[2].substring(0,i),e[0]=e[0].substring(0,o).trim(),e[3]=""}}let n=e[2],a="";if(this.options.pedantic){let i=this.rules.other.pedanticHrefTitle.exec(n);i&&(n=i[1],a=i[3])}else a=e[3]?e[3].slice(1,-1):"";return n=n.trim(),this.rules.other.startAngleBracket.test(n)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(r)?n=n.slice(1):n=n.slice(1,-1)),Yle(e,{href:n&&n.replace(this.rules.inline.anyPunctuation,"$1"),title:a&&a.replace(this.rules.inline.anyPunctuation,"$1")},e[0],this.lexer,this.rules)}}reflink(t,e){let r;if((r=this.rules.inline.reflink.exec(t))||(r=this.rules.inline.nolink.exec(t))){let n=(r[2]||r[1]).replace(this.rules.other.multipleSpaceGlobal," "),a=e[n.toLowerCase()];if(!a){let i=r[0].charAt(0);return{type:"text",raw:i,text:i}}return Yle(r,a,r[0],this.lexer,this.rules)}}emStrong(t,e,r=""){let n=this.rules.inline.emStrongLDelim.exec(t);if(!n||n[3]&&r.match(this.rules.other.unicodeAlphaNumeric))return;if(!(n[1]||n[2]||"")||!r||this.rules.inline.punctuation.exec(r)){let i=[...n[0]].length-1,s,o,l=i,u=0,h=n[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(h.lastIndex=0,e=e.slice(-1*t.length+i);(n=h.exec(e))!=null;){if(s=n[1]||n[2]||n[3]||n[4]||n[5]||n[6],!s)continue;if(o=[...s].length,n[3]||n[4]){l+=o;continue}else if((n[5]||n[6])&&i%3&&!((i+o)%3)){u+=o;continue}if(l-=o,l>0)continue;o=Math.min(o,o+l+u);let f=[...n[0]][0].length,d=t.slice(0,i+n.index+f+o);if(Math.min(i,o)%2){let m=d.slice(1,-1);return{type:"em",raw:d,text:m,tokens:this.lexer.inlineTokens(m)}}let p=d.slice(2,-2);return{type:"strong",raw:d,text:p,tokens:this.lexer.inlineTokens(p)}}}}codespan(t){let e=this.rules.inline.code.exec(t);if(e){let r=e[2].replace(this.rules.other.newLineCharGlobal," "),n=this.rules.other.nonSpaceChar.test(r),a=this.rules.other.startingSpaceChar.test(r)&&this.rules.other.endingSpaceChar.test(r);return n&&a&&(r=r.substring(1,r.length-1)),{type:"codespan",raw:e[0],text:r}}}br(t){let e=this.rules.inline.br.exec(t);if(e)return{type:"br",raw:e[0]}}del(t){let e=this.rules.inline.del.exec(t);if(e)return{type:"del",raw:e[0],text:e[2],tokens:this.lexer.inlineTokens(e[2])}}autolink(t){let e=this.rules.inline.autolink.exec(t);if(e){let r,n;return e[2]==="@"?(r=e[1],n="mailto:"+r):(r=e[1],n=r),{type:"link",raw:e[0],text:r,href:n,tokens:[{type:"text",raw:r,text:r}]}}}url(t){let e;if(e=this.rules.inline.url.exec(t)){let r,n;if(e[2]==="@")r=e[0],n="mailto:"+r;else{let a;do a=e[0],e[0]=this.rules.inline._backpedal.exec(e[0])?.[0]??"";while(a!==e[0]);r=e[0],e[1]==="www."?n="http://"+e[0]:n=e[0]}return{type:"link",raw:e[0],text:r,href:n,tokens:[{type:"text",raw:r,text:r}]}}}inlineText(t){let e=this.rules.inline.text.exec(t);if(e){let r=this.lexer.state.inRawBlock;return{type:"text",raw:e[0],text:e[0],escaped:r}}}},Bh=class WO{tokens;options;state;tokenizer;inlineQueue;constructor(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||Wp,this.options.tokenizer=this.options.tokenizer||new PC,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};let r={other:Cs,block:NC.normal,inline:l3.normal};this.options.pedantic?(r.block=NC.pedantic,r.inline=l3.pedantic):this.options.gfm&&(r.block=NC.gfm,this.options.breaks?r.inline=l3.breaks:r.inline=l3.gfm),this.tokenizer.rules=r}static get rules(){return{block:NC,inline:l3}}static lex(e,r){return new WO(r).lex(e)}static lexInline(e,r){return new WO(r).inlineTokens(e)}lex(e){e=e.replace(Cs.carriageReturn,` -`),this.blockTokens(e,this.tokens);for(let r=0;r(a=s.call({lexer:this},e,r))?(e=e.substring(a.raw.length),r.push(a),!0):!1))continue;if(a=this.tokenizer.space(e)){e=e.substring(a.raw.length);let s=r.at(-1);a.raw.length===1&&s!==void 0?s.raw+=` -`:r.push(a);continue}if(a=this.tokenizer.code(e)){e=e.substring(a.raw.length);let s=r.at(-1);s?.type==="paragraph"||s?.type==="text"?(s.raw+=` -`+a.raw,s.text+=` -`+a.text,this.inlineQueue.at(-1).src=s.text):r.push(a);continue}if(a=this.tokenizer.fences(e)){e=e.substring(a.raw.length),r.push(a);continue}if(a=this.tokenizer.heading(e)){e=e.substring(a.raw.length),r.push(a);continue}if(a=this.tokenizer.hr(e)){e=e.substring(a.raw.length),r.push(a);continue}if(a=this.tokenizer.blockquote(e)){e=e.substring(a.raw.length),r.push(a);continue}if(a=this.tokenizer.list(e)){e=e.substring(a.raw.length),r.push(a);continue}if(a=this.tokenizer.html(e)){e=e.substring(a.raw.length),r.push(a);continue}if(a=this.tokenizer.def(e)){e=e.substring(a.raw.length);let s=r.at(-1);s?.type==="paragraph"||s?.type==="text"?(s.raw+=` -`+a.raw,s.text+=` -`+a.raw,this.inlineQueue.at(-1).src=s.text):this.tokens.links[a.tag]||(this.tokens.links[a.tag]={href:a.href,title:a.title});continue}if(a=this.tokenizer.table(e)){e=e.substring(a.raw.length),r.push(a);continue}if(a=this.tokenizer.lheading(e)){e=e.substring(a.raw.length),r.push(a);continue}let i=e;if(this.options.extensions?.startBlock){let s=1/0,o=e.slice(1),l;this.options.extensions.startBlock.forEach(u=>{l=u.call({lexer:this},o),typeof l=="number"&&l>=0&&(s=Math.min(s,l))}),s<1/0&&s>=0&&(i=e.substring(0,s+1))}if(this.state.top&&(a=this.tokenizer.paragraph(i))){let s=r.at(-1);n&&s?.type==="paragraph"?(s.raw+=` -`+a.raw,s.text+=` -`+a.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=s.text):r.push(a),n=i.length!==e.length,e=e.substring(a.raw.length);continue}if(a=this.tokenizer.text(e)){e=e.substring(a.raw.length);let s=r.at(-1);s?.type==="text"?(s.raw+=` -`+a.raw,s.text+=` -`+a.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=s.text):r.push(a);continue}if(e){let s="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(s);break}else throw new Error(s)}}return this.state.top=!0,r}inline(e,r=[]){return this.inlineQueue.push({src:e,tokens:r}),r}inlineTokens(e,r=[]){let n=e,a=null;if(this.tokens.links){let o=Object.keys(this.tokens.links);if(o.length>0)for(;(a=this.tokenizer.rules.inline.reflinkSearch.exec(n))!=null;)o.includes(a[0].slice(a[0].lastIndexOf("[")+1,-1))&&(n=n.slice(0,a.index)+"["+"a".repeat(a[0].length-2)+"]"+n.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(a=this.tokenizer.rules.inline.anyPunctuation.exec(n))!=null;)n=n.slice(0,a.index)+"++"+n.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;(a=this.tokenizer.rules.inline.blockSkip.exec(n))!=null;)n=n.slice(0,a.index)+"["+"a".repeat(a[0].length-2)+"]"+n.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);let i=!1,s="";for(;e;){i||(s=""),i=!1;let o;if(this.options.extensions?.inline?.some(u=>(o=u.call({lexer:this},e,r))?(e=e.substring(o.raw.length),r.push(o),!0):!1))continue;if(o=this.tokenizer.escape(e)){e=e.substring(o.raw.length),r.push(o);continue}if(o=this.tokenizer.tag(e)){e=e.substring(o.raw.length),r.push(o);continue}if(o=this.tokenizer.link(e)){e=e.substring(o.raw.length),r.push(o);continue}if(o=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(o.raw.length);let u=r.at(-1);o.type==="text"&&u?.type==="text"?(u.raw+=o.raw,u.text+=o.text):r.push(o);continue}if(o=this.tokenizer.emStrong(e,n,s)){e=e.substring(o.raw.length),r.push(o);continue}if(o=this.tokenizer.codespan(e)){e=e.substring(o.raw.length),r.push(o);continue}if(o=this.tokenizer.br(e)){e=e.substring(o.raw.length),r.push(o);continue}if(o=this.tokenizer.del(e)){e=e.substring(o.raw.length),r.push(o);continue}if(o=this.tokenizer.autolink(e)){e=e.substring(o.raw.length),r.push(o);continue}if(!this.state.inLink&&(o=this.tokenizer.url(e))){e=e.substring(o.raw.length),r.push(o);continue}let l=e;if(this.options.extensions?.startInline){let u=1/0,h=e.slice(1),f;this.options.extensions.startInline.forEach(d=>{f=d.call({lexer:this},h),typeof f=="number"&&f>=0&&(u=Math.min(u,f))}),u<1/0&&u>=0&&(l=e.substring(0,u+1))}if(o=this.tokenizer.inlineText(l)){e=e.substring(o.raw.length),o.raw.slice(-1)!=="_"&&(s=o.raw.slice(-1)),i=!0;let u=r.at(-1);u?.type==="text"?(u.raw+=o.raw,u.text+=o.text):r.push(o);continue}if(e){let u="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(u);break}else throw new Error(u)}}return r}},BC=class{options;parser;constructor(t){this.options=t||Wp}space(t){return""}code({text:t,lang:e,escaped:r}){let n=(e||"").match(Cs.notSpaceStart)?.[0],a=t.replace(Cs.endingNewline,"")+` -`;return n?'
'+(r?a:sc(a,!0))+`
-`:"
"+(r?a:sc(a,!0))+`
+`,t=t.substring(d.length+1),l=!0),!l){let v=this.rules.other.nextBulletRegex(m),x=this.rules.other.hrRegex(m),k=this.rules.other.fencesBeginRegex(m),_=this.rules.other.headingBeginRegex(m),T=this.rules.other.htmlBeginRegex(m);for(;t;){let S=t.split(` +`,1)[0],R;if(d=S,this.options.pedantic?(d=d.replace(this.rules.other.listReplaceNesting," "),R=d):R=d.replace(this.rules.other.tabCharGlobal," "),k.test(d)||_.test(d)||T.test(d)||v.test(d)||x.test(d))break;if(R.search(this.rules.other.nonSpaceChar)>=m||!d.trim())h+=` +`+R.slice(m);else{if(p||f.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||k.test(f)||_.test(f)||x.test(f))break;h+=` +`+d}!p&&!d.trim()&&(p=!0),u+=S+` +`,t=t.substring(S.length+1),f=R.slice(m)}}i.loose||(s?i.loose=!0:this.rules.other.doubleBlankLine.test(u)&&(s=!0));let g=null,y;this.options.gfm&&(g=this.rules.other.listIsTask.exec(h),g&&(y=g[0]!=="[ ] ",h=h.replace(this.rules.other.listReplaceTask,""))),i.items.push({type:"list_item",raw:u,task:!!g,checked:y,loose:!1,text:h,tokens:[]}),i.raw+=u}let o=i.items.at(-1);if(o)o.raw=o.raw.trimEnd(),o.text=o.text.trimEnd();else return;i.raw=i.raw.trimEnd();for(let l=0;lf.type==="space"),h=u.length>0&&u.some(f=>this.rules.other.anyLine.test(f.raw));i.loose=h}if(i.loose)for(let l=0;l({text:o,tokens:this.lexer.inline(o),header:!1,align:a.align[l]})));return a}}lheading(t){let e=this.rules.block.lheading.exec(t);if(e)return{type:"heading",raw:e[0],depth:e[2].charAt(0)==="="?1:2,text:e[1],tokens:this.lexer.inline(e[1])}}paragraph(t){let e=this.rules.block.paragraph.exec(t);if(e){let r=e[1].charAt(e[1].length-1)===` +`?e[1].slice(0,-1):e[1];return{type:"paragraph",raw:e[0],text:r,tokens:this.lexer.inline(r)}}}text(t){let e=this.rules.block.text.exec(t);if(e)return{type:"text",raw:e[0],text:e[0],tokens:this.lexer.inline(e[0])}}escape(t){let e=this.rules.inline.escape.exec(t);if(e)return{type:"escape",raw:e[0],text:e[1]}}tag(t){let e=this.rules.inline.tag.exec(t);if(e)return!this.lexer.state.inLink&&this.rules.other.startATag.test(e[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(e[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(e[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(e[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:e[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:e[0]}}link(t){let e=this.rules.inline.link.exec(t);if(e){let r=e[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(r)){if(!this.rules.other.endAngleBracket.test(r))return;let a=C5(r.slice(0,-1),"\\");if((r.length-a.length)%2===0)return}else{let a=IQe(e[2],"()");if(a===-2)return;if(a>-1){let o=(e[0].indexOf("!")===0?5:4)+e[1].length+a;e[2]=e[2].substring(0,a),e[0]=e[0].substring(0,o).trim(),e[3]=""}}let n=e[2],i="";if(this.options.pedantic){let a=this.rules.other.pedanticHrefTitle.exec(n);a&&(n=a[1],i=a[3])}else i=e[3]?e[3].slice(1,-1):"";return n=n.trim(),this.rules.other.startAngleBracket.test(n)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(r)?n=n.slice(1):n=n.slice(1,-1)),xhe(e,{href:n&&n.replace(this.rules.inline.anyPunctuation,"$1"),title:i&&i.replace(this.rules.inline.anyPunctuation,"$1")},e[0],this.lexer,this.rules)}}reflink(t,e){let r;if((r=this.rules.inline.reflink.exec(t))||(r=this.rules.inline.nolink.exec(t))){let n=(r[2]||r[1]).replace(this.rules.other.multipleSpaceGlobal," "),i=e[n.toLowerCase()];if(!i){let a=r[0].charAt(0);return{type:"text",raw:a,text:a}}return xhe(r,i,r[0],this.lexer,this.rules)}}emStrong(t,e,r=""){let n=this.rules.inline.emStrongLDelim.exec(t);if(!n||n[3]&&r.match(this.rules.other.unicodeAlphaNumeric))return;if(!(n[1]||n[2]||"")||!r||this.rules.inline.punctuation.exec(r)){let a=[...n[0]].length-1,s,o,l=a,u=0,h=n[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(h.lastIndex=0,e=e.slice(-1*t.length+a);(n=h.exec(e))!=null;){if(s=n[1]||n[2]||n[3]||n[4]||n[5]||n[6],!s)continue;if(o=[...s].length,n[3]||n[4]){l+=o;continue}else if((n[5]||n[6])&&a%3&&!((a+o)%3)){u+=o;continue}if(l-=o,l>0)continue;o=Math.min(o,o+l+u);let f=[...n[0]][0].length,d=t.slice(0,a+n.index+f+o);if(Math.min(a,o)%2){let m=d.slice(1,-1);return{type:"em",raw:d,text:m,tokens:this.lexer.inlineTokens(m)}}let p=d.slice(2,-2);return{type:"strong",raw:d,text:p,tokens:this.lexer.inlineTokens(p)}}}}codespan(t){let e=this.rules.inline.code.exec(t);if(e){let r=e[2].replace(this.rules.other.newLineCharGlobal," "),n=this.rules.other.nonSpaceChar.test(r),i=this.rules.other.startingSpaceChar.test(r)&&this.rules.other.endingSpaceChar.test(r);return n&&i&&(r=r.substring(1,r.length-1)),{type:"codespan",raw:e[0],text:r}}}br(t){let e=this.rules.inline.br.exec(t);if(e)return{type:"br",raw:e[0]}}del(t){let e=this.rules.inline.del.exec(t);if(e)return{type:"del",raw:e[0],text:e[2],tokens:this.lexer.inlineTokens(e[2])}}autolink(t){let e=this.rules.inline.autolink.exec(t);if(e){let r,n;return e[2]==="@"?(r=e[1],n="mailto:"+r):(r=e[1],n=r),{type:"link",raw:e[0],text:r,href:n,tokens:[{type:"text",raw:r,text:r}]}}}url(t){let e;if(e=this.rules.inline.url.exec(t)){let r,n;if(e[2]==="@")r=e[0],n="mailto:"+r;else{let i;do i=e[0],e[0]=this.rules.inline._backpedal.exec(e[0])?.[0]??"";while(i!==e[0]);r=e[0],e[1]==="www."?n="http://"+e[0]:n=e[0]}return{type:"link",raw:e[0],text:r,href:n,tokens:[{type:"text",raw:r,text:r}]}}}inlineText(t){let e=this.rules.inline.text.exec(t);if(e){let r=this.lexer.state.inRawBlock;return{type:"text",raw:e[0],text:e[0],escaped:r}}}},qh=class iF{tokens;options;state;tokenizer;inlineQueue;constructor(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||tm,this.options.tokenizer=this.options.tokenizer||new gE,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};let r={other:go,block:dE.normal,inline:S5.normal};this.options.pedantic?(r.block=dE.pedantic,r.inline=S5.pedantic):this.options.gfm&&(r.block=dE.gfm,this.options.breaks?r.inline=S5.breaks:r.inline=S5.gfm),this.tokenizer.rules=r}static get rules(){return{block:dE,inline:S5}}static lex(e,r){return new iF(r).lex(e)}static lexInline(e,r){return new iF(r).inlineTokens(e)}lex(e){e=e.replace(go.carriageReturn,` +`),this.blockTokens(e,this.tokens);for(let r=0;r(i=s.call({lexer:this},e,r))?(e=e.substring(i.raw.length),r.push(i),!0):!1))continue;if(i=this.tokenizer.space(e)){e=e.substring(i.raw.length);let s=r.at(-1);i.raw.length===1&&s!==void 0?s.raw+=` +`:r.push(i);continue}if(i=this.tokenizer.code(e)){e=e.substring(i.raw.length);let s=r.at(-1);s?.type==="paragraph"||s?.type==="text"?(s.raw+=` +`+i.raw,s.text+=` +`+i.text,this.inlineQueue.at(-1).src=s.text):r.push(i);continue}if(i=this.tokenizer.fences(e)){e=e.substring(i.raw.length),r.push(i);continue}if(i=this.tokenizer.heading(e)){e=e.substring(i.raw.length),r.push(i);continue}if(i=this.tokenizer.hr(e)){e=e.substring(i.raw.length),r.push(i);continue}if(i=this.tokenizer.blockquote(e)){e=e.substring(i.raw.length),r.push(i);continue}if(i=this.tokenizer.list(e)){e=e.substring(i.raw.length),r.push(i);continue}if(i=this.tokenizer.html(e)){e=e.substring(i.raw.length),r.push(i);continue}if(i=this.tokenizer.def(e)){e=e.substring(i.raw.length);let s=r.at(-1);s?.type==="paragraph"||s?.type==="text"?(s.raw+=` +`+i.raw,s.text+=` +`+i.raw,this.inlineQueue.at(-1).src=s.text):this.tokens.links[i.tag]||(this.tokens.links[i.tag]={href:i.href,title:i.title});continue}if(i=this.tokenizer.table(e)){e=e.substring(i.raw.length),r.push(i);continue}if(i=this.tokenizer.lheading(e)){e=e.substring(i.raw.length),r.push(i);continue}let a=e;if(this.options.extensions?.startBlock){let s=1/0,o=e.slice(1),l;this.options.extensions.startBlock.forEach(u=>{l=u.call({lexer:this},o),typeof l=="number"&&l>=0&&(s=Math.min(s,l))}),s<1/0&&s>=0&&(a=e.substring(0,s+1))}if(this.state.top&&(i=this.tokenizer.paragraph(a))){let s=r.at(-1);n&&s?.type==="paragraph"?(s.raw+=` +`+i.raw,s.text+=` +`+i.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=s.text):r.push(i),n=a.length!==e.length,e=e.substring(i.raw.length);continue}if(i=this.tokenizer.text(e)){e=e.substring(i.raw.length);let s=r.at(-1);s?.type==="text"?(s.raw+=` +`+i.raw,s.text+=` +`+i.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=s.text):r.push(i);continue}if(e){let s="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(s);break}else throw new Error(s)}}return this.state.top=!0,r}inline(e,r=[]){return this.inlineQueue.push({src:e,tokens:r}),r}inlineTokens(e,r=[]){let n=e,i=null;if(this.tokens.links){let o=Object.keys(this.tokens.links);if(o.length>0)for(;(i=this.tokenizer.rules.inline.reflinkSearch.exec(n))!=null;)o.includes(i[0].slice(i[0].lastIndexOf("[")+1,-1))&&(n=n.slice(0,i.index)+"["+"a".repeat(i[0].length-2)+"]"+n.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(i=this.tokenizer.rules.inline.anyPunctuation.exec(n))!=null;)n=n.slice(0,i.index)+"++"+n.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;(i=this.tokenizer.rules.inline.blockSkip.exec(n))!=null;)n=n.slice(0,i.index)+"["+"a".repeat(i[0].length-2)+"]"+n.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);let a=!1,s="";for(;e;){a||(s=""),a=!1;let o;if(this.options.extensions?.inline?.some(u=>(o=u.call({lexer:this},e,r))?(e=e.substring(o.raw.length),r.push(o),!0):!1))continue;if(o=this.tokenizer.escape(e)){e=e.substring(o.raw.length),r.push(o);continue}if(o=this.tokenizer.tag(e)){e=e.substring(o.raw.length),r.push(o);continue}if(o=this.tokenizer.link(e)){e=e.substring(o.raw.length),r.push(o);continue}if(o=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(o.raw.length);let u=r.at(-1);o.type==="text"&&u?.type==="text"?(u.raw+=o.raw,u.text+=o.text):r.push(o);continue}if(o=this.tokenizer.emStrong(e,n,s)){e=e.substring(o.raw.length),r.push(o);continue}if(o=this.tokenizer.codespan(e)){e=e.substring(o.raw.length),r.push(o);continue}if(o=this.tokenizer.br(e)){e=e.substring(o.raw.length),r.push(o);continue}if(o=this.tokenizer.del(e)){e=e.substring(o.raw.length),r.push(o);continue}if(o=this.tokenizer.autolink(e)){e=e.substring(o.raw.length),r.push(o);continue}if(!this.state.inLink&&(o=this.tokenizer.url(e))){e=e.substring(o.raw.length),r.push(o);continue}let l=e;if(this.options.extensions?.startInline){let u=1/0,h=e.slice(1),f;this.options.extensions.startInline.forEach(d=>{f=d.call({lexer:this},h),typeof f=="number"&&f>=0&&(u=Math.min(u,f))}),u<1/0&&u>=0&&(l=e.substring(0,u+1))}if(o=this.tokenizer.inlineText(l)){e=e.substring(o.raw.length),o.raw.slice(-1)!=="_"&&(s=o.raw.slice(-1)),a=!0;let u=r.at(-1);u?.type==="text"?(u.raw+=o.raw,u.text+=o.text):r.push(o);continue}if(e){let u="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(u);break}else throw new Error(u)}}return r}},yE=class{options;parser;constructor(t){this.options=t||tm}space(t){return""}code({text:t,lang:e,escaped:r}){let n=(e||"").match(go.notSpaceStart)?.[0],i=t.replace(go.endingNewline,"")+` +`;return n?'
'+(r?i:u0(i,!0))+`
+`:"
"+(r?i:u0(i,!0))+`
`}blockquote({tokens:t}){return`
${this.parser.parse(t)}
`}html({text:t}){return t}heading({tokens:t,depth:e}){return`${this.parser.parseInline(t)} `}hr(t){return`
-`}list(t){let e=t.ordered,r=t.start,n="";for(let s=0;s -`+n+" -`}listitem(t){let e="";if(t.task){let r=this.checkbox({checked:!!t.checked});t.loose?t.tokens[0]?.type==="paragraph"?(t.tokens[0].text=r+" "+t.tokens[0].text,t.tokens[0].tokens&&t.tokens[0].tokens.length>0&&t.tokens[0].tokens[0].type==="text"&&(t.tokens[0].tokens[0].text=r+" "+sc(t.tokens[0].tokens[0].text),t.tokens[0].tokens[0].escaped=!0)):t.tokens.unshift({type:"text",raw:r+" ",text:r+" ",escaped:!0}):e+=r+" "}return e+=this.parser.parse(t.tokens,!!t.loose),`
  • ${e}
  • +`}list(t){let e=t.ordered,r=t.start,n="";for(let s=0;s +`+n+" +`}listitem(t){let e="";if(t.task){let r=this.checkbox({checked:!!t.checked});t.loose?t.tokens[0]?.type==="paragraph"?(t.tokens[0].text=r+" "+t.tokens[0].text,t.tokens[0].tokens&&t.tokens[0].tokens.length>0&&t.tokens[0].tokens[0].type==="text"&&(t.tokens[0].tokens[0].text=r+" "+u0(t.tokens[0].tokens[0].text),t.tokens[0].tokens[0].escaped=!0)):t.tokens.unshift({type:"text",raw:r+" ",text:r+" ",escaped:!0}):e+=r+" "}return e+=this.parser.parse(t.tokens,!!t.loose),`
  • ${e}
  • `}checkbox({checked:t}){return"'}paragraph({tokens:t}){return`

    ${this.parser.parseInline(t)}

    -`}table(t){let e="",r="";for(let a=0;a${n}`),` +`}table(t){let e="",r="";for(let i=0;i${n}`),`
    `+e+` `+n+`
    `}tablerow({text:t}){return` ${t} `}tablecell(t){let e=this.parser.parseInline(t.tokens),r=t.header?"th":"td";return(t.align?`<${r} align="${t.align}">`:`<${r}>`)+e+` -`}strong({tokens:t}){return`${this.parser.parseInline(t)}`}em({tokens:t}){return`${this.parser.parseInline(t)}`}codespan({text:t}){return`${sc(t,!0)}`}br(t){return"
    "}del({tokens:t}){return`${this.parser.parseInline(t)}`}link({href:t,title:e,tokens:r}){let n=this.parser.parseInline(r),a=Hle(t);if(a===null)return n;t=a;let i='
    ",i}image({href:t,title:e,text:r,tokens:n}){n&&(r=this.parser.parseInline(n,this.parser.textRenderer));let a=Hle(t);if(a===null)return sc(r);t=a;let i=`${r}{let s=a[i].flat(1/0);r=r.concat(this.walkTokens(s,e))}):a.tokens&&(r=r.concat(this.walkTokens(a.tokens,e)))}}return r}use(...t){let e=this.defaults.extensions||{renderers:{},childTokens:{}};return t.forEach(r=>{let n={...r};if(n.async=this.defaults.async||n.async||!1,r.extensions&&(r.extensions.forEach(a=>{if(!a.name)throw new Error("extension name required");if("renderer"in a){let i=e.renderers[a.name];i?e.renderers[a.name]=function(...s){let o=a.renderer.apply(this,s);return o===!1&&(o=i.apply(this,s)),o}:e.renderers[a.name]=a.renderer}if("tokenizer"in a){if(!a.level||a.level!=="block"&&a.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let i=e[a.level];i?i.unshift(a.tokenizer):e[a.level]=[a.tokenizer],a.start&&(a.level==="block"?e.startBlock?e.startBlock.push(a.start):e.startBlock=[a.start]:a.level==="inline"&&(e.startInline?e.startInline.push(a.start):e.startInline=[a.start]))}"childTokens"in a&&a.childTokens&&(e.childTokens[a.name]=a.childTokens)}),n.extensions=e),r.renderer){let a=this.defaults.renderer||new BC(this.defaults);for(let i in r.renderer){if(!(i in a))throw new Error(`renderer '${i}' does not exist`);if(["options","parser"].includes(i))continue;let s=i,o=r.renderer[s],l=a[s];a[s]=(...u)=>{let h=o.apply(a,u);return h===!1&&(h=l.apply(a,u)),h||""}}n.renderer=a}if(r.tokenizer){let a=this.defaults.tokenizer||new PC(this.defaults);for(let i in r.tokenizer){if(!(i in a))throw new Error(`tokenizer '${i}' does not exist`);if(["options","rules","lexer"].includes(i))continue;let s=i,o=r.tokenizer[s],l=a[s];a[s]=(...u)=>{let h=o.apply(a,u);return h===!1&&(h=l.apply(a,u)),h}}n.tokenizer=a}if(r.hooks){let a=this.defaults.hooks||new MC;for(let i in r.hooks){if(!(i in a))throw new Error(`hook '${i}' does not exist`);if(["options","block"].includes(i))continue;let s=i,o=r.hooks[s],l=a[s];MC.passThroughHooks.has(i)?a[s]=u=>{if(this.defaults.async)return Promise.resolve(o.call(a,u)).then(f=>l.call(a,f));let h=o.call(a,u);return l.call(a,h)}:a[s]=(...u)=>{let h=o.apply(a,u);return h===!1&&(h=l.apply(a,u)),h}}n.hooks=a}if(r.walkTokens){let a=this.defaults.walkTokens,i=r.walkTokens;n.walkTokens=function(s){let o=[];return o.push(i.call(this,s)),a&&(o=o.concat(a.call(this,s))),o}}this.defaults={...this.defaults,...n}}),this}setOptions(t){return this.defaults={...this.defaults,...t},this}lexer(t,e){return Bh.lex(t,e??this.defaults)}parser(t,e){return Fh.parse(t,e??this.defaults)}parseMarkdown(t){return(r,n)=>{let a={...n},i={...this.defaults,...a},s=this.onError(!!i.silent,!!i.async);if(this.defaults.async===!0&&a.async===!1)return s(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof r>"u"||r===null)return s(new Error("marked(): input parameter is undefined or null"));if(typeof r!="string")return s(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(r)+", string expected"));i.hooks&&(i.hooks.options=i,i.hooks.block=t);let o=i.hooks?i.hooks.provideLexer():t?Bh.lex:Bh.lexInline,l=i.hooks?i.hooks.provideParser():t?Fh.parse:Fh.parseInline;if(i.async)return Promise.resolve(i.hooks?i.hooks.preprocess(r):r).then(u=>o(u,i)).then(u=>i.hooks?i.hooks.processAllTokens(u):u).then(u=>i.walkTokens?Promise.all(this.walkTokens(u,i.walkTokens)).then(()=>u):u).then(u=>l(u,i)).then(u=>i.hooks?i.hooks.postprocess(u):u).catch(s);try{i.hooks&&(r=i.hooks.preprocess(r));let u=o(r,i);i.hooks&&(u=i.hooks.processAllTokens(u)),i.walkTokens&&this.walkTokens(u,i.walkTokens);let h=l(u,i);return i.hooks&&(h=i.hooks.postprocess(h)),h}catch(u){return s(u)}}}onError(t,e){return r=>{if(r.message+=` -Please report this to https://github.com/markedjs/marked.`,t){let n="

    An error occurred:

    "+sc(r.message+"",!0)+"
    ";return e?Promise.resolve(n):n}if(e)return Promise.reject(r);throw r}}},Hp=new nXe;jr.options=jr.setOptions=function(t){return Hp.setOptions(t),jr.defaults=Hp.defaults,Xle(jr.defaults),jr};jr.getDefaults=XO;jr.defaults=Wp;jr.use=function(...t){return Hp.use(...t),jr.defaults=Hp.defaults,Xle(jr.defaults),jr};jr.walkTokens=function(t,e){return Hp.walkTokens(t,e)};jr.parseInline=Hp.parseInline;jr.Parser=Fh;jr.parser=Fh.parse;jr.Renderer=BC;jr.TextRenderer=rP;jr.Lexer=Bh;jr.lexer=Bh.lex;jr.Tokenizer=PC;jr.Hooks=MC;jr.parse=jr;_Kt=jr.options,AKt=jr.setOptions,LKt=jr.use,RKt=jr.walkTokens,IKt=jr.parseInline,DKt=Fh.parse,NKt=Bh.lex});function $C(t){for(var e=[],r=1;r${this.parser.parseInline(t)}`}em({tokens:t}){return`${this.parser.parseInline(t)}`}codespan({text:t}){return`${u0(t,!0)}`}br(t){return"
    "}del({tokens:t}){return`${this.parser.parseInline(t)}`}link({href:t,title:e,tokens:r}){let n=this.parser.parseInline(r),i=yhe(t);if(i===null)return n;t=i;let a='
    ",a}image({href:t,title:e,text:r,tokens:n}){n&&(r=this.parser.parseInline(n,this.parser.textRenderer));let i=yhe(t);if(i===null)return u0(r);t=i;let a=`${r}{let s=i[a].flat(1/0);r=r.concat(this.walkTokens(s,e))}):i.tokens&&(r=r.concat(this.walkTokens(i.tokens,e)))}}return r}use(...t){let e=this.defaults.extensions||{renderers:{},childTokens:{}};return t.forEach(r=>{let n={...r};if(n.async=this.defaults.async||n.async||!1,r.extensions&&(r.extensions.forEach(i=>{if(!i.name)throw new Error("extension name required");if("renderer"in i){let a=e.renderers[i.name];a?e.renderers[i.name]=function(...s){let o=i.renderer.apply(this,s);return o===!1&&(o=a.apply(this,s)),o}:e.renderers[i.name]=i.renderer}if("tokenizer"in i){if(!i.level||i.level!=="block"&&i.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let a=e[i.level];a?a.unshift(i.tokenizer):e[i.level]=[i.tokenizer],i.start&&(i.level==="block"?e.startBlock?e.startBlock.push(i.start):e.startBlock=[i.start]:i.level==="inline"&&(e.startInline?e.startInline.push(i.start):e.startInline=[i.start]))}"childTokens"in i&&i.childTokens&&(e.childTokens[i.name]=i.childTokens)}),n.extensions=e),r.renderer){let i=this.defaults.renderer||new yE(this.defaults);for(let a in r.renderer){if(!(a in i))throw new Error(`renderer '${a}' does not exist`);if(["options","parser"].includes(a))continue;let s=a,o=r.renderer[s],l=i[s];i[s]=(...u)=>{let h=o.apply(i,u);return h===!1&&(h=l.apply(i,u)),h||""}}n.renderer=i}if(r.tokenizer){let i=this.defaults.tokenizer||new gE(this.defaults);for(let a in r.tokenizer){if(!(a in i))throw new Error(`tokenizer '${a}' does not exist`);if(["options","rules","lexer"].includes(a))continue;let s=a,o=r.tokenizer[s],l=i[s];i[s]=(...u)=>{let h=o.apply(i,u);return h===!1&&(h=l.apply(i,u)),h}}n.tokenizer=i}if(r.hooks){let i=this.defaults.hooks||new pE;for(let a in r.hooks){if(!(a in i))throw new Error(`hook '${a}' does not exist`);if(["options","block"].includes(a))continue;let s=a,o=r.hooks[s],l=i[s];pE.passThroughHooks.has(a)?i[s]=u=>{if(this.defaults.async)return Promise.resolve(o.call(i,u)).then(f=>l.call(i,f));let h=o.call(i,u);return l.call(i,h)}:i[s]=(...u)=>{let h=o.apply(i,u);return h===!1&&(h=l.apply(i,u)),h}}n.hooks=i}if(r.walkTokens){let i=this.defaults.walkTokens,a=r.walkTokens;n.walkTokens=function(s){let o=[];return o.push(a.call(this,s)),i&&(o=o.concat(i.call(this,s))),o}}this.defaults={...this.defaults,...n}}),this}setOptions(t){return this.defaults={...this.defaults,...t},this}lexer(t,e){return qh.lex(t,e??this.defaults)}parser(t,e){return Uh.parse(t,e??this.defaults)}parseMarkdown(t){return(r,n)=>{let i={...n},a={...this.defaults,...i},s=this.onError(!!a.silent,!!a.async);if(this.defaults.async===!0&&i.async===!1)return s(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof r>"u"||r===null)return s(new Error("marked(): input parameter is undefined or null"));if(typeof r!="string")return s(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(r)+", string expected"));a.hooks&&(a.hooks.options=a,a.hooks.block=t);let o=a.hooks?a.hooks.provideLexer():t?qh.lex:qh.lexInline,l=a.hooks?a.hooks.provideParser():t?Uh.parse:Uh.parseInline;if(a.async)return Promise.resolve(a.hooks?a.hooks.preprocess(r):r).then(u=>o(u,a)).then(u=>a.hooks?a.hooks.processAllTokens(u):u).then(u=>a.walkTokens?Promise.all(this.walkTokens(u,a.walkTokens)).then(()=>u):u).then(u=>l(u,a)).then(u=>a.hooks?a.hooks.postprocess(u):u).catch(s);try{a.hooks&&(r=a.hooks.preprocess(r));let u=o(r,a);a.hooks&&(u=a.hooks.processAllTokens(u)),a.walkTokens&&this.walkTokens(u,a.walkTokens);let h=l(u,a);return a.hooks&&(h=a.hooks.postprocess(h)),h}catch(u){return s(u)}}}onError(t,e){return r=>{if(r.message+=` +Please report this to https://github.com/markedjs/marked.`,t){let n="

    An error occurred:

    "+u0(r.message+"",!0)+"
    ";return e?Promise.resolve(n):n}if(e)return Promise.reject(r);throw r}}},em=new NQe;_n.options=_n.setOptions=function(t){return em.setOptions(t),_n.defaults=em.defaults,bhe(_n.defaults),_n};_n.getDefaults=sF;_n.defaults=tm;_n.use=function(...t){return em.use(...t),_n.defaults=em.defaults,bhe(_n.defaults),_n};_n.walkTokens=function(t,e){return em.walkTokens(t,e)};_n.parseInline=em.parseInline;_n.Parser=Uh;_n.parser=Uh.parse;_n.Renderer=yE;_n.TextRenderer=pF;_n.Lexer=qh;_n.lexer=qh.lex;_n.Tokenizer=gE;_n.Hooks=pE;_n.parse=_n;xtr=_n.options,btr=_n.setOptions,wtr=_n.use,ktr=_n.walkTokens,Ttr=_n.parseInline,Etr=Uh.parse,Str=qh.lex});function bE(t){for(var e=[],r=1;r{});function sue(t,{markdownAutoWrap:e}){let n=t.replace(//g,` +`)),s+=f+n[l+1]}),s}var mF=D(()=>{});function Ihe(t,{markdownAutoWrap:e}){let n=t.replace(//g,` `).replace(/\n{2,}/g,` -`),a=$C(n);return e===!1?a.replace(/ /g," "):a}function oue(t,e={}){let r=sue(t,e),n=jr.lexer(r),a=[[]],i=0;function s(o,l="normal"){o.type==="text"?o.text.split(` -`).forEach((h,f)=>{f!==0&&(i++,a.push([])),h.split(" ").forEach(d=>{d=d.replace(/'/g,"'"),d&&a[i].push({content:d,type:l})})}):o.type==="strong"||o.type==="em"?o.tokens.forEach(u=>{s(u,o.type)}):o.type==="html"&&a[i].push({content:o.text,type:"normal"})}return x(s,"processNode"),n.forEach(o=>{o.type==="paragraph"?o.tokens?.forEach(l=>{s(l)}):o.type==="html"&&a[i].push({content:o.text,type:"normal"})}),a}function lue(t,{markdownAutoWrap:e}={}){let r=jr.lexer(t);function n(a){return a.type==="text"?e===!1?a.text.replace(/\n */g,"
    ").replace(/ /g," "):a.text.replace(/\n */g,"
    "):a.type==="strong"?`${a.tokens?.map(n).join("")}`:a.type==="em"?`${a.tokens?.map(n).join("")}`:a.type==="paragraph"?`

    ${a.tokens?.map(n).join("")}

    `:a.type==="space"?"":a.type==="html"?`${a.text}`:a.type==="escape"?a.text:`Unsupported markdown: ${a.type}`}return x(n,"output"),r.map(n).join("")}function uue(t){return Intl.Segmenter?[...new Intl.Segmenter().segment(t)].map(e=>e.segment):[...t]}function cue(t,e){let r=uue(e.content);return iP(t,[],r,e.type)}function iP(t,e,r,n){if(r.length===0)return[{content:e.join(""),type:n},{content:"",type:n}];let[a,...i]=r,s=[...e,a];return t([{content:s.join(""),type:n}])?iP(t,s,i,n):(e.length===0&&a&&(e.push(a),r.shift()),[{content:e.join(""),type:n},{content:r.join(""),type:n}])}function hue(t,e){if(t.some(({content:r})=>r.includes(` -`)))throw new Error("splitLineToFitWidth does not support newlines in the line");return GC(t,e)}function GC(t,e,r=[],n=[]){if(t.length===0)return n.length>0&&r.push(n),r.length>0?r:[];let a="";t[0].content===" "&&(a=" ",t.shift());let i=t.shift()??{content:" ",type:"normal"},s=[...n];if(a!==""&&s.push({content:a,type:"normal"}),s.push(i),e(s))return GC(t,e,r,s);if(n.length>0)r.push(n),t.unshift(i);else if(i.content){let[o,l]=cue(e,i);r.push([o]),l.content&&t.unshift(l)}return GC(t,e,r)}function aP(t,e){e&&t.attr("style",e)}async function fue(t,e,r,n,a=!1){let i=t.append("foreignObject");i.attr("width",`${10*r}px`),i.attr("height",`${10*r}px`);let s=i.append("xhtml:div"),o=e.label;e.label&&Ha(e.label)&&(o=await Gf(e.label.replace(Ze.lineBreakRegex,` -`),Te()));let l=e.isNode?"nodeLabel":"edgeLabel",u=s.append("span");u.html(o),aP(u,e.labelStyle),u.attr("class",`${l} ${n}`),aP(s,e.labelStyle),s.style("display","table-cell"),s.style("white-space","nowrap"),s.style("line-height","1.5"),s.style("max-width",r+"px"),s.style("text-align","center"),s.attr("xmlns","http://www.w3.org/1999/xhtml"),a&&s.attr("class","labelBkg");let h=s.node().getBoundingClientRect();return h.width===r&&(s.style("display","table"),s.style("white-space","break-spaces"),s.style("width",r+"px"),h=s.node().getBoundingClientRect()),i.node()}function UC(t,e,r){return t.append("tspan").attr("class","text-outer-tspan").attr("x",0).attr("y",e*r-.1+"em").attr("dy",r+"em")}function due(t,e,r){let n=t.append("text"),a=UC(n,1,e);qC(a,r);let i=a.node().getComputedTextLength();return n.remove(),i}function sP(t,e,r){let n=t.append("text"),a=UC(n,1,e);qC(a,[{content:r,type:"normal"}]);let i=a.node()?.getBoundingClientRect();return i&&n.remove(),i}function pue(t,e,r,n=!1){let i=e.append("g"),s=i.insert("rect").attr("class","background").attr("style","stroke: none"),o=i.append("text").attr("y","-10.1"),l=0;for(let u of r){let h=x(d=>due(i,1.1,d)<=t,"checkWidth"),f=h(u)?[u]:hue(u,h);for(let d of f){let p=UC(o,l,1.1);qC(p,d),l++}}if(n){let u=o.node().getBBox(),h=2;return s.attr("x",u.x-h).attr("y",u.y-h).attr("width",u.width+2*h).attr("height",u.height+2*h),i.node()}else return o.node()}function qC(t,e){t.text(""),e.forEach((r,n)=>{let a=t.append("tspan").attr("font-style",r.type==="em"?"italic":"normal").attr("class","text-inner-tspan").attr("font-weight",r.type==="strong"?"bold":"normal");n===0?a.text(r.content):a.text(" "+r.content)})}function VC(t){return t.replace(/fa[bklrs]?:fa-[\w-]+/g,e=>``)}var Xa,Fi=A(()=>{ln();ur();cr();iue();nP();x(sue,"preprocessMarkdown");x(oue,"markdownToLines");x(lue,"markdownToHTML");x(uue,"splitTextToChars");x(cue,"splitWordToFitWidth");x(iP,"splitWordToFitWidthRecursion");x(hue,"splitLineToFitWidth");x(GC,"splitLineToFitWidthRecursion");x(aP,"applyStyle");x(fue,"addHtmlSpan");x(UC,"createTspan");x(due,"computeWidthOfText");x(sP,"computeDimensionOfText");x(pue,"createFormattedText");x(qC,"updateTextContentAndStyles");x(VC,"replaceIconSubstring");Xa=x(async(t,e="",{style:r="",isTitle:n=!1,classes:a="",useHtmlLabels:i=!0,isNode:s=!0,width:o=200,addSvgBackground:l=!1}={},u)=>{if(te.debug("XYZ createText",e,r,n,a,i,s,"addSvgBackground: ",l),i){let h=lue(e,u),f=VC(oo(h)),d=e.replace(/\\\\/g,"\\"),p={isNode:s,label:Ha(e)?d:f,labelStyle:r.replace("fill:","color:")};return await fue(t,p,o,a,l)}else{let h=e.replace(//g,"
    "),f=oue(h.replace("
    ","
    "),u),d=pue(o,t,f,e?l:!1);if(s){/stroke:/.exec(r)&&(r=r.replace("stroke:","lineColor:"));let p=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");We(d).attr("style",p)}else{let p=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/background:/g,"fill:");We(d).select("rect").attr("style",p.replace(/background:/g,"fill:"));let m=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");We(d).select("text").attr("style",m)}return d}},"createText")});function oP(t,e,r){if(t&&t.length){let[n,a]=e,i=Math.PI/180*r,s=Math.cos(i),o=Math.sin(i);for(let l of t){let[u,h]=l;l[0]=(u-n)*s-(h-a)*o+n,l[1]=(u-n)*o+(h-a)*s+a}}}function aXe(t,e){return t[0]===e[0]&&t[1]===e[1]}function iXe(t,e,r,n=1){let a=r,i=Math.max(e,.1),s=t[0]&&t[0][0]&&typeof t[0][0]=="number"?[t]:t,o=[0,0];if(a)for(let u of s)oP(u,o,a);let l=(function(u,h,f){let d=[];for(let b of u){let w=[...b];aXe(w[0],w[w.length-1])||w.push([w[0][0],w[0][1]]),w.length>2&&d.push(w)}let p=[];h=Math.max(h,.1);let m=[];for(let b of d)for(let w=0;wb.yminw.ymin?1:b.xw.x?1:b.ymax===w.ymax?0:(b.ymax-w.ymax)/Math.abs(b.ymax-w.ymax))),!m.length)return p;let g=[],v=m[0].ymin,y=0;for(;g.length||m.length;){if(m.length){let b=-1;for(let w=0;wv);w++)b=w;m.splice(0,b+1).forEach((w=>{g.push({s:v,edge:w})}))}if(g=g.filter((b=>!(b.edge.ymax<=v))),g.sort(((b,w)=>b.edge.x===w.edge.x?0:(b.edge.x-w.edge.x)/Math.abs(b.edge.x-w.edge.x))),(f!==1||y%h==0)&&g.length>1)for(let b=0;b=g.length)break;let C=g[b].edge,k=g[w].edge;p.push([[Math.round(C.x),v],[Math.round(k.x),v]])}v+=f,g.forEach((b=>{b.edge.x=b.edge.x+f*b.edge.islope})),y++}return p})(s,i,n);if(a){for(let u of s)oP(u,o,-a);(function(u,h,f){let d=[];u.forEach((p=>d.push(...p))),oP(d,h,f)})(l,o,-a)}return l}function m3(t,e){var r;let n=e.hachureAngle+90,a=e.hachureGap;a<0&&(a=4*e.strokeWidth),a=Math.round(Math.max(a,.1));let i=1;return e.roughness>=1&&(((r=e.randomizer)===null||r===void 0?void 0:r.next())||Math.random())>.7&&(i=a),iXe(t,a,n,i||1)}function JC(t){let e=t[0],r=t[1];return Math.sqrt(Math.pow(e[0]-r[0],2)+Math.pow(e[1]-r[1],2))}function uP(t,e){return t.type===e}function TP(t){let e=[],r=(function(s){let o=new Array;for(;s!=="";)if(s.match(/^([ \t\r\n,]+)/))s=s.substr(RegExp.$1.length);else if(s.match(/^([aAcChHlLmMqQsStTvVzZ])/))o[o.length]={type:sXe,text:RegExp.$1},s=s.substr(RegExp.$1.length);else{if(!s.match(/^(([-+]?[0-9]+(\.[0-9]*)?|[-+]?\.[0-9]+)([eE][-+]?[0-9]+)?)/))return[];o[o.length]={type:lP,text:`${parseFloat(RegExp.$1)}`},s=s.substr(RegExp.$1.length)}return o[o.length]={type:mue,text:""},o})(t),n="BOD",a=0,i=r[a];for(;!uP(i,mue);){let s=0,o=[];if(n==="BOD"){if(i.text!=="M"&&i.text!=="m")return TP("M0,0"+t);a++,s=HC[i.text],n=i.text}else uP(i,lP)?s=HC[n]:(a++,s=HC[i.text],n=i.text);if(!(a+sh%2?u+r:u+e));i.push({key:"C",data:l}),e=l[4],r=l[5];break}case"Q":i.push({key:"Q",data:[...o]}),e=o[2],r=o[3];break;case"q":{let l=o.map(((u,h)=>h%2?u+r:u+e));i.push({key:"Q",data:l}),e=l[2],r=l[3];break}case"A":i.push({key:"A",data:[...o]}),e=o[5],r=o[6];break;case"a":e+=o[5],r+=o[6],i.push({key:"A",data:[o[0],o[1],o[2],o[3],o[4],e,r]});break;case"H":i.push({key:"H",data:[...o]}),e=o[0];break;case"h":e+=o[0],i.push({key:"H",data:[e]});break;case"V":i.push({key:"V",data:[...o]}),r=o[0];break;case"v":r+=o[0],i.push({key:"V",data:[r]});break;case"S":i.push({key:"S",data:[...o]}),e=o[2],r=o[3];break;case"s":{let l=o.map(((u,h)=>h%2?u+r:u+e));i.push({key:"S",data:l}),e=l[2],r=l[3];break}case"T":i.push({key:"T",data:[...o]}),e=o[0],r=o[1];break;case"t":e+=o[0],r+=o[1],i.push({key:"T",data:[e,r]});break;case"Z":case"z":i.push({key:"Z",data:[]}),e=n,r=a}return i}function Eue(t){let e=[],r="",n=0,a=0,i=0,s=0,o=0,l=0;for(let{key:u,data:h}of t){switch(u){case"M":e.push({key:"M",data:[...h]}),[n,a]=h,[i,s]=h;break;case"C":e.push({key:"C",data:[...h]}),n=h[4],a=h[5],o=h[2],l=h[3];break;case"L":e.push({key:"L",data:[...h]}),[n,a]=h;break;case"H":n=h[0],e.push({key:"L",data:[n,a]});break;case"V":a=h[0],e.push({key:"L",data:[n,a]});break;case"S":{let f=0,d=0;r==="C"||r==="S"?(f=n+(n-o),d=a+(a-l)):(f=n,d=a),e.push({key:"C",data:[f,d,...h]}),o=h[0],l=h[1],n=h[2],a=h[3];break}case"T":{let[f,d]=h,p=0,m=0;r==="Q"||r==="T"?(p=n+(n-o),m=a+(a-l)):(p=n,m=a);let g=n+2*(p-n)/3,v=a+2*(m-a)/3,y=f+2*(p-f)/3,b=d+2*(m-d)/3;e.push({key:"C",data:[g,v,y,b,f,d]}),o=p,l=m,n=f,a=d;break}case"Q":{let[f,d,p,m]=h,g=n+2*(f-n)/3,v=a+2*(d-a)/3,y=p+2*(f-p)/3,b=m+2*(d-m)/3;e.push({key:"C",data:[g,v,y,b,p,m]}),o=f,l=d,n=p,a=m;break}case"A":{let f=Math.abs(h[0]),d=Math.abs(h[1]),p=h[2],m=h[3],g=h[4],v=h[5],y=h[6];f===0||d===0?(e.push({key:"C",data:[n,a,v,y,v,y]}),n=v,a=y):(n!==v||a!==y)&&(Cue(n,a,v,y,f,d,p,m,g).forEach((function(b){e.push({key:"C",data:b})})),n=v,a=y);break}case"Z":e.push({key:"Z",data:[]}),n=i,a=s}r=u}return e}function f3(t,e,r){return[t*Math.cos(r)-e*Math.sin(r),t*Math.sin(r)+e*Math.cos(r)]}function Cue(t,e,r,n,a,i,s,o,l,u){let h=(f=s,Math.PI*f/180);var f;let d=[],p=0,m=0,g=0,v=0;if(u)[p,m,g,v]=u;else{[t,e]=f3(t,e,-h),[r,n]=f3(r,n,-h);let I=(t-r)/2,N=(e-n)/2,O=I*I/(a*a)+N*N/(i*i);O>1&&(O=Math.sqrt(O),a*=O,i*=O);let R=a*a,P=i*i,B=R*P-R*N*N-P*I*I,F=R*N*N+P*I*I,G=(o===l?-1:1)*Math.sqrt(Math.abs(B/F));g=G*a*N/i+(t+r)/2,v=G*-i*I/a+(e+n)/2,p=Math.asin(parseFloat(((e-v)/i).toFixed(9))),m=Math.asin(parseFloat(((n-v)/i).toFixed(9))),tm&&(p-=2*Math.PI),!l&&m>p&&(m-=2*Math.PI)}let y=m-p;if(Math.abs(y)>120*Math.PI/180){let I=m,N=r,O=n;m=l&&m>p?p+120*Math.PI/180*1:p+120*Math.PI/180*-1,d=Cue(r=g+a*Math.cos(m),n=v+i*Math.sin(m),N,O,a,i,s,0,l,[m,I,g,v])}y=m-p;let b=Math.cos(p),w=Math.sin(p),C=Math.cos(m),k=Math.sin(m),E=Math.tan(y/4),_=4/3*a*E,S=4/3*i*E,L=[t,e],M=[t+_*w,e-S*b],D=[r+_*k,n-S*C],T=[r,n];if(M[0]=2*L[0]-M[0],M[1]=2*L[1]-M[1],u)return[M,D,T].concat(d);{d=[M,D,T].concat(d);let I=[];for(let N=0;N2){let a=[];for(let i=0;i2*Math.PI&&(p=0,m=2*Math.PI);let g=2*Math.PI/l.curveStepCount,v=Math.min(g/2,(m-p)/2),y=wue(v,u,h,f,d,p,m,1,l);if(!l.disableMultiStroke){let b=wue(v,u,h,f,d,p,m,1.5,l);y.push(...b)}return s&&(o?y.push(...yd(u,h,u+f*Math.cos(p),h+d*Math.sin(p),l),...yd(u,h,u+f*Math.cos(m),h+d*Math.sin(m),l)):y.push({op:"lineTo",data:[u,h]},{op:"lineTo",data:[u+f*Math.cos(p),h+d*Math.sin(p)]})),{type:"path",ops:y}}function yue(t,e){let r=Eue(Tue(TP(t))),n=[],a=[0,0],i=[0,0];for(let{key:s,data:o}of r)switch(s){case"M":i=[o[0],o[1]],a=[o[0],o[1]];break;case"L":n.push(...yd(i[0],i[1],o[0],o[1],e)),i=[o[0],o[1]];break;case"C":{let[l,u,h,f,d,p]=o;n.push(...uXe(l,u,h,f,d,p,i,e)),i=[d,p];break}case"Z":n.push(...yd(i[0],i[1],a[0],a[1],e)),i=[a[0],a[1]]}return{type:"path",ops:n}}function cP(t,e){let r=[];for(let n of t)if(n.length){let a=e.maxRandomnessOffset||0,i=n.length;if(i>2){r.push({op:"move",data:[n[0][0]+Kt(a,e),n[0][1]+Kt(a,e)]});for(let s=1;s500?.4:-.0016668*l+1.233334;let h=a.maxRandomnessOffset||0;h*h*100>o&&(h=l/10);let f=h/2,d=.2+.2*Aue(a),p=a.bowing*a.maxRandomnessOffset*(n-e)/200,m=a.bowing*a.maxRandomnessOffset*(t-r)/200;p=Kt(p,a,u),m=Kt(m,a,u);let g=[],v=()=>Kt(f,a,u),y=()=>Kt(h,a,u),b=a.preserveVertices;return i&&(s?g.push({op:"move",data:[t+(b?0:v()),e+(b?0:v())]}):g.push({op:"move",data:[t+(b?0:Kt(h,a,u)),e+(b?0:Kt(h,a,u))]})),s?g.push({op:"bcurveTo",data:[p+t+(r-t)*d+v(),m+e+(n-e)*d+v(),p+t+2*(r-t)*d+v(),m+e+2*(n-e)*d+v(),r+(b?0:v()),n+(b?0:v())]}):g.push({op:"bcurveTo",data:[p+t+(r-t)*d+y(),m+e+(n-e)*d+y(),p+t+2*(r-t)*d+y(),m+e+2*(n-e)*d+y(),r+(b?0:y()),n+(b?0:y())]}),g}function WC(t,e,r){if(!t.length)return[];let n=[];n.push([t[0][0]+Kt(e,r),t[0][1]+Kt(e,r)]),n.push([t[0][0]+Kt(e,r),t[0][1]+Kt(e,r)]);for(let a=1;a3){let i=[],s=1-r.curveTightness;a.push({op:"move",data:[t[1][0],t[1][1]]});for(let o=1;o+21&&a.push(o)):a.push(o),a.push(t[e+3])}else{let l=t[e+0],u=t[e+1],h=t[e+2],f=t[e+3],d=Yp(l,u,.5),p=Yp(u,h,.5),m=Yp(h,f,.5),g=Yp(d,p,.5),v=Yp(p,m,.5),y=Yp(g,v,.5);bP([l,d,g,y],0,r,a),bP([y,v,m,f],0,r,a)}var i,s;return a}function hXe(t,e){return QC(t,0,t.length,e)}function QC(t,e,r,n,a){let i=a||[],s=t[e],o=t[r-1],l=0,u=1;for(let h=e+1;hl&&(l=f,u=h)}return Math.sqrt(l)>n?(QC(t,e,u+1,n,i),QC(t,u,r,n,i)):(i.length||i.push(s),i.push(o)),i}function hP(t,e=.15,r){let n=[],a=(t.length-1)/3;for(let i=0;i0?QC(n,0,n.length,r):n}var p3,fP,dP,pP,mP,gP,lo,vP,sXe,lP,mue,HC,oXe,Bo,q1,wP,YC,kP,je,Gt=A(()=>{p3=class{constructor(e){this.helper=e}fillPolygons(e,r){return this._fillPolygons(e,r)}_fillPolygons(e,r){let n=m3(e,r);return{type:"fillSketch",ops:this.renderLines(n,r)}}renderLines(e,r){let n=[];for(let a of e)n.push(...this.helper.doubleLineOps(a[0][0],a[0][1],a[1][0],a[1][1],r));return n}};fP=class extends p3{fillPolygons(e,r){let n=r.hachureGap;n<0&&(n=4*r.strokeWidth),n=Math.max(n,.1);let a=m3(e,Object.assign({},r,{hachureGap:n})),i=Math.PI/180*r.hachureAngle,s=[],o=.5*n*Math.cos(i),l=.5*n*Math.sin(i);for(let[u,h]of a)JC([u,h])&&s.push([[u[0]-o,u[1]+l],[...h]],[[u[0]+o,u[1]-l],[...h]]);return{type:"fillSketch",ops:this.renderLines(s,r)}}},dP=class extends p3{fillPolygons(e,r){let n=this._fillPolygons(e,r),a=Object.assign({},r,{hachureAngle:r.hachureAngle+90}),i=this._fillPolygons(e,a);return n.ops=n.ops.concat(i.ops),n}},pP=class{constructor(e){this.helper=e}fillPolygons(e,r){let n=m3(e,r=Object.assign({},r,{hachureAngle:0}));return this.dotsOnLines(n,r)}dotsOnLines(e,r){let n=[],a=r.hachureGap;a<0&&(a=4*r.strokeWidth),a=Math.max(a,.1);let i=r.fillWeight;i<0&&(i=r.strokeWidth/2);let s=a/4;for(let o of e){let l=JC(o),u=l/a,h=Math.ceil(u)-1,f=l-h*a,d=(o[0][0]+o[1][0])/2-a/4,p=Math.min(o[0][1],o[1][1]);for(let m=0;m{let o=JC(s),l=Math.floor(o/(n+a)),u=(o+a-l*(n+a))/2,h=s[0],f=s[1];h[0]>f[0]&&(h=s[1],f=s[0]);let d=Math.atan((f[1]-h[1])/(f[0]-h[0]));for(let p=0;p{let s=JC(i),o=Math.round(s/(2*r)),l=i[0],u=i[1];l[0]>u[0]&&(l=i[1],u=i[0]);let h=Math.atan((u[1]-l[1])/(u[0]-l[0]));for(let f=0;f2*Math.PI&&(_=0,S=2*Math.PI);let L=(S-_)/b.curveStepCount,M=[];for(let D=_;D<=S;D+=L)M.push([w+k*Math.cos(D),C+E*Math.sin(D)]);return M.push([w+k*Math.cos(S),C+E*Math.sin(S)]),M.push([w,C]),U1([M],b)})(e,r,n,a,i,s,u));return u.stroke!==Bo&&h.push(f),this._d("arc",h,u)}curve(e,r){let n=this._o(r),a=[],i=gue(e,n);if(n.fill&&n.fill!==Bo)if(n.fillStyle==="solid"){let s=gue(e,Object.assign(Object.assign({},n),{disableMultiStroke:!0,roughness:n.roughness?n.roughness+n.fillShapeRoughnessGain:0}));a.push({type:"fillPath",ops:this._mergedShape(s.ops)})}else{let s=[],o=e;if(o.length){let l=typeof o[0][0]=="number"?[o]:o;for(let u of l)u.length<3?s.push(...u):u.length===3?s.push(...hP(kue([u[0],u[0],u[1],u[2]]),10,(1+n.roughness)/2)):s.push(...hP(kue(u),10,(1+n.roughness)/2))}s.length&&a.push(U1([s],n))}return n.stroke!==Bo&&a.push(i),this._d("curve",a,n)}polygon(e,r){let n=this._o(r),a=[],i=XC(e,!0,n);return n.fill&&(n.fillStyle==="solid"?a.push(cP([e],n)):a.push(U1([e],n))),n.stroke!==Bo&&a.push(i),this._d("polygon",a,n)}path(e,r){let n=this._o(r),a=[];if(!e)return this._d("path",a,n);e=(e||"").replace(/\n/g," ").replace(/(-\s)/g,"-").replace("/(ss)/g"," ");let i=n.fill&&n.fill!=="transparent"&&n.fill!==Bo,s=n.stroke!==Bo,o=!!(n.simplification&&n.simplification<1),l=(function(h,f,d){let p=Eue(Tue(TP(h))),m=[],g=[],v=[0,0],y=[],b=()=>{y.length>=4&&g.push(...hP(y,f)),y=[]},w=()=>{b(),g.length&&(m.push(g),g=[])};for(let{key:k,data:E}of p)switch(k){case"M":w(),v=[E[0],E[1]],g.push(v);break;case"L":b(),g.push([E[0],E[1]]);break;case"C":if(!y.length){let _=g.length?g[g.length-1]:v;y.push([_[0],_[1]])}y.push([E[0],E[1]]),y.push([E[2],E[3]]),y.push([E[4],E[5]]);break;case"Z":b(),g.push([v[0],v[1]])}if(w(),!d)return m;let C=[];for(let k of m){let E=hXe(k,d);E.length&&C.push(E)}return C})(e,1,o?4-4*(n.simplification||1):(1+n.roughness)/2),u=yue(e,n);if(i)if(n.fillStyle==="solid")if(l.length===1){let h=yue(e,Object.assign(Object.assign({},n),{disableMultiStroke:!0,roughness:n.roughness?n.roughness+n.fillShapeRoughnessGain:0}));a.push({type:"fillPath",ops:this._mergedShape(h.ops)})}else a.push(cP(l,n));else a.push(U1(l,n));return s&&(o?l.forEach((h=>{a.push(XC(h,!1,n))})):a.push(u)),this._d("path",a,n)}opsToPath(e,r){let n="";for(let a of e.ops){let i=typeof r=="number"&&r>=0?a.data.map((s=>+s.toFixed(r))):a.data;switch(a.op){case"move":n+=`M${i[0]} ${i[1]} `;break;case"bcurveTo":n+=`C${i[0]} ${i[1]}, ${i[2]} ${i[3]}, ${i[4]} ${i[5]} `;break;case"lineTo":n+=`L${i[0]} ${i[1]} `}}return n.trim()}toPaths(e){let r=e.sets||[],n=e.options||this.defaultOptions,a=[];for(let i of r){let s=null;switch(i.type){case"path":s={d:this.opsToPath(i),stroke:n.stroke,strokeWidth:n.strokeWidth,fill:Bo};break;case"fillPath":s={d:this.opsToPath(i),stroke:Bo,strokeWidth:0,fill:n.fill||Bo};break;case"fillSketch":s=this.fillSketch(i,n)}s&&a.push(s)}return a}fillSketch(e,r){let n=r.fillWeight;return n<0&&(n=r.strokeWidth/2),{d:this.opsToPath(e),stroke:r.fill||Bo,strokeWidth:n,fill:Bo}}_mergedShape(e){return e.filter(((r,n)=>n===0||r.op!=="move"))}},wP=class{constructor(e,r){this.canvas=e,this.ctx=this.canvas.getContext("2d"),this.gen=new q1(r)}draw(e){let r=e.sets||[],n=e.options||this.getDefaultOptions(),a=this.ctx,i=e.options.fixedDecimalPlaceDigits;for(let s of r)switch(s.type){case"path":a.save(),a.strokeStyle=n.stroke==="none"?"transparent":n.stroke,a.lineWidth=n.strokeWidth,n.strokeLineDash&&a.setLineDash(n.strokeLineDash),n.strokeLineDashOffset&&(a.lineDashOffset=n.strokeLineDashOffset),this._drawToContext(a,s,i),a.restore();break;case"fillPath":{a.save(),a.fillStyle=n.fill||"";let o=e.shape==="curve"||e.shape==="polygon"||e.shape==="path"?"evenodd":"nonzero";this._drawToContext(a,s,i,o),a.restore();break}case"fillSketch":this.fillSketch(a,s,n)}}fillSketch(e,r,n){let a=n.fillWeight;a<0&&(a=n.strokeWidth/2),e.save(),n.fillLineDash&&e.setLineDash(n.fillLineDash),n.fillLineDashOffset&&(e.lineDashOffset=n.fillLineDashOffset),e.strokeStyle=n.fill||"",e.lineWidth=a,this._drawToContext(e,r,n.fixedDecimalPlaceDigits),e.restore()}_drawToContext(e,r,n,a="nonzero"){e.beginPath();for(let i of r.ops){let s=typeof n=="number"&&n>=0?i.data.map((o=>+o.toFixed(n))):i.data;switch(i.op){case"move":e.moveTo(s[0],s[1]);break;case"bcurveTo":e.bezierCurveTo(s[0],s[1],s[2],s[3],s[4],s[5]);break;case"lineTo":e.lineTo(s[0],s[1])}}r.type==="fillPath"?e.fill(a):e.stroke()}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}line(e,r,n,a,i){let s=this.gen.line(e,r,n,a,i);return this.draw(s),s}rectangle(e,r,n,a,i){let s=this.gen.rectangle(e,r,n,a,i);return this.draw(s),s}ellipse(e,r,n,a,i){let s=this.gen.ellipse(e,r,n,a,i);return this.draw(s),s}circle(e,r,n,a){let i=this.gen.circle(e,r,n,a);return this.draw(i),i}linearPath(e,r){let n=this.gen.linearPath(e,r);return this.draw(n),n}polygon(e,r){let n=this.gen.polygon(e,r);return this.draw(n),n}arc(e,r,n,a,i,s,o=!1,l){let u=this.gen.arc(e,r,n,a,i,s,o,l);return this.draw(u),u}curve(e,r){let n=this.gen.curve(e,r);return this.draw(n),n}path(e,r){let n=this.gen.path(e,r);return this.draw(n),n}},YC="http://www.w3.org/2000/svg",kP=class{constructor(e,r){this.svg=e,this.gen=new q1(r)}draw(e){let r=e.sets||[],n=e.options||this.getDefaultOptions(),a=this.svg.ownerDocument||window.document,i=a.createElementNS(YC,"g"),s=e.options.fixedDecimalPlaceDigits;for(let o of r){let l=null;switch(o.type){case"path":l=a.createElementNS(YC,"path"),l.setAttribute("d",this.opsToPath(o,s)),l.setAttribute("stroke",n.stroke),l.setAttribute("stroke-width",n.strokeWidth+""),l.setAttribute("fill","none"),n.strokeLineDash&&l.setAttribute("stroke-dasharray",n.strokeLineDash.join(" ").trim()),n.strokeLineDashOffset&&l.setAttribute("stroke-dashoffset",`${n.strokeLineDashOffset}`);break;case"fillPath":l=a.createElementNS(YC,"path"),l.setAttribute("d",this.opsToPath(o,s)),l.setAttribute("stroke","none"),l.setAttribute("stroke-width","0"),l.setAttribute("fill",n.fill||""),e.shape!=="curve"&&e.shape!=="polygon"||l.setAttribute("fill-rule","evenodd");break;case"fillSketch":l=this.fillSketch(a,o,n)}l&&i.appendChild(l)}return i}fillSketch(e,r,n){let a=n.fillWeight;a<0&&(a=n.strokeWidth/2);let i=e.createElementNS(YC,"path");return i.setAttribute("d",this.opsToPath(r,n.fixedDecimalPlaceDigits)),i.setAttribute("stroke",n.fill||""),i.setAttribute("stroke-width",a+""),i.setAttribute("fill","none"),n.fillLineDash&&i.setAttribute("stroke-dasharray",n.fillLineDash.join(" ").trim()),n.fillLineDashOffset&&i.setAttribute("stroke-dashoffset",`${n.fillLineDashOffset}`),i}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}opsToPath(e,r){return this.gen.opsToPath(e,r)}line(e,r,n,a,i){let s=this.gen.line(e,r,n,a,i);return this.draw(s)}rectangle(e,r,n,a,i){let s=this.gen.rectangle(e,r,n,a,i);return this.draw(s)}ellipse(e,r,n,a,i){let s=this.gen.ellipse(e,r,n,a,i);return this.draw(s)}circle(e,r,n,a){let i=this.gen.circle(e,r,n,a);return this.draw(i)}linearPath(e,r){let n=this.gen.linearPath(e,r);return this.draw(n)}polygon(e,r){let n=this.gen.polygon(e,r);return this.draw(n)}arc(e,r,n,a,i,s,o=!1,l){let u=this.gen.arc(e,r,n,a,i,s,o,l);return this.draw(u)}curve(e,r){let n=this.gen.curve(e,r);return this.draw(n)}path(e,r){let n=this.gen.path(e,r);return this.draw(n)}},je={canvas:(t,e)=>new wP(t,e),svg:(t,e)=>new kP(t,e),generator:t=>new q1(t),newSeed:()=>q1.newSeed()}});function Pr(t){let e=t.map((r,n)=>`${n===0?"M":"L"}${r.x},${r.y}`);return e.push("Z"),e.join(" ")}function xd(t,e,r,n,a,i){let s=[],l=r-t,u=n-e,h=l/i,f=2*Math.PI/h,d=e+u/2;for(let p=0;p<=50;p++){let m=p/50,g=t+m*l,v=d+a*Math.sin(f*(g-t));s.push({x:g,y:v})}return s}function _P(t,e,r,n,a,i){let s=[],o=a*Math.PI/180,h=(i*Math.PI/180-o)/(n-1);for(let f=0;f"+n+""),Lue(r,t.labelStyle),r.style("display","inline-block"),r.style("padding-right","1px"),r.style("white-space","nowrap"),r.attr("xmlns","http://www.w3.org/1999/xhtml"),e.node()}function Mue(t,e){return t.intersect(e)}function Oue(t,e,r,n){var a=t.x,i=t.y,s=a-n.x,o=i-n.y,l=Math.sqrt(e*e*o*o+r*r*s*s),u=Math.abs(e*r*s/l);n.x0}function zue(t,e,r){let n=t.x,a=t.y,i=[],s=Number.POSITIVE_INFINITY,o=Number.POSITIVE_INFINITY;typeof e.forEach=="function"?e.forEach(function(h){s=Math.min(s,h.x),o=Math.min(o,h.y)}):(s=Math.min(s,e.x),o=Math.min(o,e.y));let l=n-t.width/2-s,u=a-t.height/2-o;for(let h=0;h1&&i.sort(function(h,f){let d=h.x-r.x,p=h.y-r.y,m=Math.sqrt(d*d+p*p),g=f.x-r.x,v=f.y-r.y,y=Math.sqrt(g*g+v*v);return mh,":first-child");return f.attr("class","anchor").attr("style",ns(o)),Ft(e,f),e.intersect=function(d){return te.info("Circle intersect",e,s,d),Ot.circle(e,s,d)},i}function SP(t,e,r,n,a,i,s){let l=(t+r)/2,u=(e+n)/2,h=Math.atan2(n-e,r-t),f=(r-t)/2,d=(n-e)/2,p=f/a,m=d/i,g=Math.sqrt(p**2+m**2);if(g>1)throw new Error("The given radii are too small to create an arc between the points.");let v=Math.sqrt(1-g**2),y=l+v*i*Math.sin(h)*(s?-1:1),b=u-v*a*Math.cos(h)*(s?-1:1),w=Math.atan2((e-b)/i,(t-y)/a),k=Math.atan2((n-b)/i,(r-y)/a)-w;s&&k<0&&(k+=2*Math.PI),!s&&k>0&&(k-=2*Math.PI);let E=[];for(let _=0;_<20;_++){let S=_/19,L=w+S*k,M=y+a*Math.cos(L),D=b+i*Math.sin(L);E.push({x:M,y:D})}return E}async function Gue(t,e){let{labelStyles:r,nodeStyles:n}=qt(e);e.labelStyle=r;let{shapeSvg:a,bbox:i}=await rr(t,e,Jt(e)),s=i.width+e.padding+20,o=i.height+e.padding,l=o/2,u=l/(2.5+o/50),{cssStyles:h}=e,f=[{x:s/2,y:-o/2},{x:-s/2,y:-o/2},...SP(-s/2,-o/2,-s/2,o/2,u,l,!1),{x:s/2,y:o/2},...SP(s/2,o/2,s/2,-o/2,u,l,!0)],d=je.svg(a),p=zt(e,{});e.look!=="handDrawn"&&(p.roughness=0,p.fillStyle="solid");let m=Pr(f),g=d.path(m,p),v=a.insert(()=>g,":first-child");return v.attr("class","basic label-container"),h&&e.look!=="handDrawn"&&v.selectAll("path").attr("style",h),n&&e.look!=="handDrawn"&&v.selectAll("path").attr("style",n),v.attr("transform",`translate(${u/2}, 0)`),Ft(e,v),e.intersect=function(y){return Ot.polygon(e,f,y)},a}function Uh(t,e,r,n){return t.insert("polygon",":first-child").attr("points",n.map(function(a){return a.x+","+a.y}).join(" ")).attr("class","label-container").attr("transform","translate("+-e/2+","+r/2+")")}async function Uue(t,e){let{labelStyles:r,nodeStyles:n}=qt(e);e.labelStyle=r;let{shapeSvg:a,bbox:i}=await rr(t,e,Jt(e)),s=i.height+e.padding,o=12,l=i.width+e.padding+o,u=0,h=l,f=-s,d=0,p=[{x:u+o,y:f},{x:h,y:f},{x:h,y:d},{x:u,y:d},{x:u,y:f+o},{x:u+o,y:f}],m,{cssStyles:g}=e;if(e.look==="handDrawn"){let v=je.svg(a),y=zt(e,{}),b=Pr(p),w=v.path(b,y);m=a.insert(()=>w,":first-child").attr("transform",`translate(${-l/2}, ${s/2})`),g&&m.attr("style",g)}else m=Uh(a,l,s,p);return n&&m.attr("style",n),Ft(e,m),e.intersect=function(v){return Ot.polygon(e,p,v)},a}function que(t,e){let{nodeStyles:r}=qt(e);e.label="";let n=t.insert("g").attr("class",Jt(e)).attr("id",e.domId??e.id),{cssStyles:a}=e,i=Math.max(28,e.width??0),s=[{x:0,y:i/2},{x:i/2,y:0},{x:0,y:-i/2},{x:-i/2,y:0}],o=je.svg(n),l=zt(e,{});e.look!=="handDrawn"&&(l.roughness=0,l.fillStyle="solid");let u=Pr(s),h=o.path(u,l),f=n.insert(()=>h,":first-child");return a&&e.look!=="handDrawn"&&f.selectAll("path").attr("style",a),r&&e.look!=="handDrawn"&&f.selectAll("path").attr("style",r),e.width=28,e.height=28,e.intersect=function(d){return Ot.polygon(e,s,d)},n}async function Vue(t,e){let{labelStyles:r,nodeStyles:n}=qt(e);e.labelStyle=r;let{shapeSvg:a,bbox:i,halfPadding:s}=await rr(t,e,Jt(e)),o=i.width/2+s,l,{cssStyles:u}=e;if(e.look==="handDrawn"){let h=je.svg(a),f=zt(e,{}),d=h.circle(0,0,o*2,f);l=a.insert(()=>d,":first-child"),l.attr("class","basic label-container").attr("style",ns(u))}else l=a.insert("circle",":first-child").attr("class","basic label-container").attr("style",n).attr("r",o).attr("cx",0).attr("cy",0);return Ft(e,l),e.intersect=function(h){return te.info("Circle intersect",e,o,h),Ot.circle(e,o,h)},a}function Hue(t){let e=Math.cos(Math.PI/4),r=Math.sin(Math.PI/4),n=t*2,a={x:n/2*e,y:n/2*r},i={x:-(n/2)*e,y:n/2*r},s={x:-(n/2)*e,y:-(n/2)*r},o={x:n/2*e,y:-(n/2)*r};return`M ${i.x},${i.y} L ${o.x},${o.y} - M ${a.x},${a.y} L ${s.x},${s.y}`}function Wue(t,e){let{labelStyles:r,nodeStyles:n}=qt(e);e.labelStyle=r,e.label="";let a=t.insert("g").attr("class",Jt(e)).attr("id",e.domId??e.id),i=Math.max(30,e?.width??0),{cssStyles:s}=e,o=je.svg(a),l=zt(e,{});e.look!=="handDrawn"&&(l.roughness=0,l.fillStyle="solid");let u=o.circle(0,0,i*2,l),h=Hue(i),f=o.path(h,l),d=a.insert(()=>u,":first-child");return d.insert(()=>f),s&&e.look!=="handDrawn"&&d.selectAll("path").attr("style",s),n&&e.look!=="handDrawn"&&d.selectAll("path").attr("style",n),Ft(e,d),e.intersect=function(p){return te.info("crossedCircle intersect",e,{radius:i,point:p}),Ot.circle(e,i,p)},a}function zh(t,e,r,n=100,a=0,i=180){let s=[],o=a*Math.PI/180,h=(i*Math.PI/180-o)/(n-1);for(let f=0;fw,":first-child").attr("stroke-opacity",0),C.insert(()=>y,":first-child"),C.attr("class","text"),h&&e.look!=="handDrawn"&&C.selectAll("path").attr("style",h),n&&e.look!=="handDrawn"&&C.selectAll("path").attr("style",n),C.attr("transform",`translate(${u}, 0)`),s.attr("transform",`translate(${-o/2+u-(i.x-(i.left??0))},${-l/2+(e.padding??0)/2-(i.y-(i.top??0))})`),Ft(e,C),e.intersect=function(k){return Ot.polygon(e,d,k)},a}function $h(t,e,r,n=100,a=0,i=180){let s=[],o=a*Math.PI/180,h=(i*Math.PI/180-o)/(n-1);for(let f=0;fw,":first-child").attr("stroke-opacity",0),C.insert(()=>y,":first-child"),C.attr("class","text"),h&&e.look!=="handDrawn"&&C.selectAll("path").attr("style",h),n&&e.look!=="handDrawn"&&C.selectAll("path").attr("style",n),C.attr("transform",`translate(${-u}, 0)`),s.attr("transform",`translate(${-o/2+(e.padding??0)/2-(i.x-(i.left??0))},${-l/2+(e.padding??0)/2-(i.y-(i.top??0))})`),Ft(e,C),e.intersect=function(k){return Ot.polygon(e,d,k)},a}function zi(t,e,r,n=100,a=0,i=180){let s=[],o=a*Math.PI/180,h=(i*Math.PI/180-o)/(n-1);for(let f=0;f_,":first-child").attr("stroke-opacity",0),S.insert(()=>b,":first-child"),S.insert(()=>k,":first-child"),S.attr("class","text"),h&&e.look!=="handDrawn"&&S.selectAll("path").attr("style",h),n&&e.look!=="handDrawn"&&S.selectAll("path").attr("style",n),S.attr("transform",`translate(${u-u/4}, 0)`),s.attr("transform",`translate(${-o/2+(e.padding??0)/2-(i.x-(i.left??0))},${-l/2+(e.padding??0)/2-(i.y-(i.top??0))})`),Ft(e,S),e.intersect=function(L){return Ot.polygon(e,p,L)},a}async function Kue(t,e){let{labelStyles:r,nodeStyles:n}=qt(e);e.labelStyle=r;let{shapeSvg:a,bbox:i}=await rr(t,e,Jt(e)),s=80,o=20,l=Math.max(s,(i.width+(e.padding??0)*2)*1.25,e?.width??0),u=Math.max(o,i.height+(e.padding??0)*2,e?.height??0),h=u/2,{cssStyles:f}=e,d=je.svg(a),p=zt(e,{});e.look!=="handDrawn"&&(p.roughness=0,p.fillStyle="solid");let m=l,g=u,v=m-h,y=g/4,b=[{x:v,y:0},{x:y,y:0},{x:0,y:g/2},{x:y,y:g},{x:v,y:g},..._P(-v,-g/2,h,50,270,90)],w=Pr(b),C=d.path(w,p),k=a.insert(()=>C,":first-child");return k.attr("class","basic label-container"),f&&e.look!=="handDrawn"&&k.selectChildren("path").attr("style",f),n&&e.look!=="handDrawn"&&k.selectChildren("path").attr("style",n),k.attr("transform",`translate(${-l/2}, ${-u/2})`),Ft(e,k),e.intersect=function(E){return Ot.polygon(e,b,E)},a}async function Zue(t,e){let{labelStyles:r,nodeStyles:n}=qt(e);e.labelStyle=r;let{shapeSvg:a,bbox:i,label:s}=await rr(t,e,Jt(e)),o=Math.max(i.width+e.padding,e.width??0),l=o/2,u=l/(2.5+o/50),h=Math.max(i.height+u+e.padding,e.height??0),f,{cssStyles:d}=e;if(e.look==="handDrawn"){let p=je.svg(a),m=_Xe(0,0,o,h,l,u),g=AXe(0,u,o,h,l,u),v=p.path(m,zt(e,{})),y=p.path(g,zt(e,{fill:"none"}));f=a.insert(()=>y,":first-child"),f=a.insert(()=>v,":first-child"),f.attr("class","basic label-container"),d&&f.attr("style",d)}else{let p=SXe(0,0,o,h,l,u);f=a.insert("path",":first-child").attr("d",p).attr("class","basic label-container").attr("style",ns(d)).attr("style",n)}return f.attr("label-offset-y",u),f.attr("transform",`translate(${-o/2}, ${-(h/2+u)})`),Ft(e,f),s.attr("transform",`translate(${-(i.width/2)-(i.x-(i.left??0))}, ${-(i.height/2)+(e.padding??0)/1.5-(i.y-(i.top??0))})`),e.intersect=function(p){let m=Ot.rect(e,p),g=m.x-(e.x??0);if(l!=0&&(Math.abs(g)<(e.width??0)/2||Math.abs(g)==(e.width??0)/2&&Math.abs(m.y-(e.y??0))>(e.height??0)/2-u)){let v=u*u*(1-g*g/(l*l));v>0&&(v=Math.sqrt(v)),v=u-v,p.y-(e.y??0)>0&&(v=-v),m.y+=v}return m},a}async function Que(t,e){let{labelStyles:r,nodeStyles:n}=qt(e);e.labelStyle=r;let{shapeSvg:a,bbox:i,label:s}=await rr(t,e,Jt(e)),o=i.width+e.padding,l=i.height+e.padding,u=l*.2,h=-o/2,f=-l/2-u/2,{cssStyles:d}=e,p=je.svg(a),m=zt(e,{});e.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");let g=[{x:h,y:f+u},{x:-h,y:f+u},{x:-h,y:-f},{x:h,y:-f},{x:h,y:f},{x:-h,y:f},{x:-h,y:f+u}],v=p.polygon(g.map(b=>[b.x,b.y]),m),y=a.insert(()=>v,":first-child");return y.attr("class","basic label-container"),d&&e.look!=="handDrawn"&&y.selectAll("path").attr("style",d),n&&e.look!=="handDrawn"&&y.selectAll("path").attr("style",n),s.attr("transform",`translate(${h+(e.padding??0)/2-(i.x-(i.left??0))}, ${f+u+(e.padding??0)/2-(i.y-(i.top??0))})`),Ft(e,y),e.intersect=function(b){return Ot.rect(e,b)},a}async function Jue(t,e){let{labelStyles:r,nodeStyles:n}=qt(e);e.labelStyle=r;let{shapeSvg:a,bbox:i,halfPadding:s}=await rr(t,e,Jt(e)),l=i.width/2+s+5,u=i.width/2+s,h,{cssStyles:f}=e;if(e.look==="handDrawn"){let d=je.svg(a),p=zt(e,{roughness:.2,strokeWidth:2.5}),m=zt(e,{roughness:.2,strokeWidth:1.5}),g=d.circle(0,0,l*2,p),v=d.circle(0,0,u*2,m);h=a.insert("g",":first-child"),h.attr("class",ns(e.cssClasses)).attr("style",ns(f)),h.node()?.appendChild(g),h.node()?.appendChild(v)}else{h=a.insert("g",":first-child");let d=h.insert("circle",":first-child"),p=h.insert("circle");h.attr("class","basic label-container").attr("style",n),d.attr("class","outer-circle").attr("style",n).attr("r",l).attr("cx",0).attr("cy",0),p.attr("class","inner-circle").attr("style",n).attr("r",u).attr("cx",0).attr("cy",0)}return Ft(e,h),e.intersect=function(d){return te.info("DoubleCircle intersect",e,l,d),Ot.circle(e,l,d)},a}function ece(t,e,{config:{themeVariables:r}}){let{labelStyles:n,nodeStyles:a}=qt(e);e.label="",e.labelStyle=n;let i=t.insert("g").attr("class",Jt(e)).attr("id",e.domId??e.id),s=7,{cssStyles:o}=e,l=je.svg(i),{nodeBorder:u}=r,h=zt(e,{fillStyle:"solid"});e.look!=="handDrawn"&&(h.roughness=0);let f=l.circle(0,0,s*2,h),d=i.insert(()=>f,":first-child");return d.selectAll("path").attr("style",`fill: ${u} !important;`),o&&o.length>0&&e.look!=="handDrawn"&&d.selectAll("path").attr("style",o),a&&e.look!=="handDrawn"&&d.selectAll("path").attr("style",a),Ft(e,d),e.intersect=function(p){return te.info("filledCircle intersect",e,{radius:s,point:p}),Ot.circle(e,s,p)},i}async function tce(t,e){let{labelStyles:r,nodeStyles:n}=qt(e);e.labelStyle=r;let{shapeSvg:a,bbox:i,label:s}=await rr(t,e,Jt(e)),o=i.width+(e.padding??0),l=o+i.height,u=o+i.height,h=[{x:0,y:-l},{x:u,y:-l},{x:u/2,y:0}],{cssStyles:f}=e,d=je.svg(a),p=zt(e,{});e.look!=="handDrawn"&&(p.roughness=0,p.fillStyle="solid");let m=Pr(h),g=d.path(m,p),v=a.insert(()=>g,":first-child").attr("transform",`translate(${-l/2}, ${l/2})`);return f&&e.look!=="handDrawn"&&v.selectChildren("path").attr("style",f),n&&e.look!=="handDrawn"&&v.selectChildren("path").attr("style",n),e.width=o,e.height=l,Ft(e,v),s.attr("transform",`translate(${-i.width/2-(i.x-(i.left??0))}, ${-l/2+(e.padding??0)/2+(i.y-(i.top??0))})`),e.intersect=function(y){return te.info("Triangle intersect",e,h,y),Ot.polygon(e,h,y)},a}function rce(t,e,{dir:r,config:{state:n,themeVariables:a}}){let{nodeStyles:i}=qt(e);e.label="";let s=t.insert("g").attr("class",Jt(e)).attr("id",e.domId??e.id),{cssStyles:o}=e,l=Math.max(70,e?.width??0),u=Math.max(10,e?.height??0);r==="LR"&&(l=Math.max(10,e?.width??0),u=Math.max(70,e?.height??0));let h=-1*l/2,f=-1*u/2,d=je.svg(s),p=zt(e,{stroke:a.lineColor,fill:a.lineColor});e.look!=="handDrawn"&&(p.roughness=0,p.fillStyle="solid");let m=d.rectangle(h,f,l,u,p),g=s.insert(()=>m,":first-child");o&&e.look!=="handDrawn"&&g.selectAll("path").attr("style",o),i&&e.look!=="handDrawn"&&g.selectAll("path").attr("style",i),Ft(e,g);let v=n?.padding??0;return e.width&&e.height&&(e.width+=v/2||0,e.height+=v/2||0),e.intersect=function(y){return Ot.rect(e,y)},s}async function nce(t,e){let{labelStyles:r,nodeStyles:n}=qt(e);e.labelStyle=r;let a=80,i=50,{shapeSvg:s,bbox:o}=await rr(t,e,Jt(e)),l=Math.max(a,o.width+(e.padding??0)*2,e?.width??0),u=Math.max(i,o.height+(e.padding??0)*2,e?.height??0),h=u/2,{cssStyles:f}=e,d=je.svg(s),p=zt(e,{});e.look!=="handDrawn"&&(p.roughness=0,p.fillStyle="solid");let m=[{x:-l/2,y:-u/2},{x:l/2-h,y:-u/2},..._P(-l/2+h,0,h,50,90,270),{x:l/2-h,y:u/2},{x:-l/2,y:u/2}],g=Pr(m),v=d.path(g,p),y=s.insert(()=>v,":first-child");return y.attr("class","basic label-container"),f&&e.look!=="handDrawn"&&y.selectChildren("path").attr("style",f),n&&e.look!=="handDrawn"&&y.selectChildren("path").attr("style",n),Ft(e,y),e.intersect=function(b){return te.info("Pill intersect",e,{radius:h,point:b}),Ot.polygon(e,m,b)},s}async function ace(t,e){let{labelStyles:r,nodeStyles:n}=qt(e);e.labelStyle=r;let{shapeSvg:a,bbox:i}=await rr(t,e,Jt(e)),s=4,o=i.height+e.padding,l=o/s,u=i.width+2*l+e.padding,h=[{x:l,y:0},{x:u-l,y:0},{x:u,y:-o/2},{x:u-l,y:-o},{x:l,y:-o},{x:0,y:-o/2}],f,{cssStyles:d}=e;if(e.look==="handDrawn"){let p=je.svg(a),m=zt(e,{}),g=LXe(0,0,u,o,l),v=p.path(g,m);f=a.insert(()=>v,":first-child").attr("transform",`translate(${-u/2}, ${o/2})`),d&&f.attr("style",d)}else f=Uh(a,u,o,h);return n&&f.attr("style",n),e.width=u,e.height=o,Ft(e,f),e.intersect=function(p){return Ot.polygon(e,h,p)},a}async function ice(t,e){let{labelStyles:r,nodeStyles:n}=qt(e);e.label="",e.labelStyle=r;let{shapeSvg:a}=await rr(t,e,Jt(e)),i=Math.max(30,e?.width??0),s=Math.max(30,e?.height??0),{cssStyles:o}=e,l=je.svg(a),u=zt(e,{});e.look!=="handDrawn"&&(u.roughness=0,u.fillStyle="solid");let h=[{x:0,y:0},{x:i,y:0},{x:0,y:s},{x:i,y:s}],f=Pr(h),d=l.path(f,u),p=a.insert(()=>d,":first-child");return p.attr("class","basic label-container"),o&&e.look!=="handDrawn"&&p.selectChildren("path").attr("style",o),n&&e.look!=="handDrawn"&&p.selectChildren("path").attr("style",n),p.attr("transform",`translate(${-i/2}, ${-s/2})`),Ft(e,p),e.intersect=function(m){return te.info("Pill intersect",e,{points:h}),Ot.polygon(e,h,m)},a}async function sce(t,e,{config:{themeVariables:r,flowchart:n}}){let{labelStyles:a}=qt(e);e.labelStyle=a;let i=e.assetHeight??48,s=e.assetWidth??48,o=Math.max(i,s),l=n?.wrappingWidth;e.width=Math.max(o,l??0);let{shapeSvg:u,bbox:h,label:f}=await rr(t,e,"icon-shape default"),d=e.pos==="t",p=o,m=o,{nodeBorder:g}=r,{stylesMap:v}=W1(e),y=-m/2,b=-p/2,w=e.label?8:0,C=je.svg(u),k=zt(e,{stroke:"none",fill:"none"});e.look!=="handDrawn"&&(k.roughness=0,k.fillStyle="solid");let E=C.rectangle(y,b,m,p,k),_=Math.max(m,h.width),S=p+h.height+w,L=C.rectangle(-_/2,-S/2,_,S,{...k,fill:"transparent",stroke:"none"}),M=u.insert(()=>E,":first-child"),D=u.insert(()=>L);if(e.icon){let T=u.append("g");T.html(`${await kh(e.icon,{height:o,width:o,fallbackPrefix:""})}`);let I=T.node().getBBox(),N=I.width,O=I.height,R=I.x,P=I.y;T.attr("transform",`translate(${-N/2-R},${d?h.height/2+w/2-O/2-P:-h.height/2-w/2-O/2-P})`),T.attr("style",`color: ${v.get("stroke")??g};`)}return f.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))},${d?-S/2:S/2-h.height})`),M.attr("transform",`translate(0,${d?h.height/2+w/2:-h.height/2-w/2})`),Ft(e,D),e.intersect=function(T){if(te.info("iconSquare intersect",e,T),!e.label)return Ot.rect(e,T);let I=e.x??0,N=e.y??0,O=e.height??0,R=[];return d?R=[{x:I-h.width/2,y:N-O/2},{x:I+h.width/2,y:N-O/2},{x:I+h.width/2,y:N-O/2+h.height+w},{x:I+m/2,y:N-O/2+h.height+w},{x:I+m/2,y:N+O/2},{x:I-m/2,y:N+O/2},{x:I-m/2,y:N-O/2+h.height+w},{x:I-h.width/2,y:N-O/2+h.height+w}]:R=[{x:I-m/2,y:N-O/2},{x:I+m/2,y:N-O/2},{x:I+m/2,y:N-O/2+p},{x:I+h.width/2,y:N-O/2+p},{x:I+h.width/2/2,y:N+O/2},{x:I-h.width/2,y:N+O/2},{x:I-h.width/2,y:N-O/2+p},{x:I-m/2,y:N-O/2+p}],Ot.polygon(e,R,T)},u}async function oce(t,e,{config:{themeVariables:r,flowchart:n}}){let{labelStyles:a}=qt(e);e.labelStyle=a;let i=e.assetHeight??48,s=e.assetWidth??48,o=Math.max(i,s),l=n?.wrappingWidth;e.width=Math.max(o,l??0);let{shapeSvg:u,bbox:h,label:f}=await rr(t,e,"icon-shape default"),d=20,p=e.label?8:0,m=e.pos==="t",{nodeBorder:g,mainBkg:v}=r,{stylesMap:y}=W1(e),b=je.svg(u),w=zt(e,{});e.look!=="handDrawn"&&(w.roughness=0,w.fillStyle="solid");let C=y.get("fill");w.stroke=C??v;let k=u.append("g");e.icon&&k.html(`${await kh(e.icon,{height:o,width:o,fallbackPrefix:""})}`);let E=k.node().getBBox(),_=E.width,S=E.height,L=E.x,M=E.y,D=Math.max(_,S)*Math.SQRT2+d*2,T=b.circle(0,0,D,w),I=Math.max(D,h.width),N=D+h.height+p,O=b.rectangle(-I/2,-N/2,I,N,{...w,fill:"transparent",stroke:"none"}),R=u.insert(()=>T,":first-child"),P=u.insert(()=>O);return k.attr("transform",`translate(${-_/2-L},${m?h.height/2+p/2-S/2-M:-h.height/2-p/2-S/2-M})`),k.attr("style",`color: ${y.get("stroke")??g};`),f.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))},${m?-N/2:N/2-h.height})`),R.attr("transform",`translate(0,${m?h.height/2+p/2:-h.height/2-p/2})`),Ft(e,P),e.intersect=function(B){return te.info("iconSquare intersect",e,B),Ot.rect(e,B)},u}async function lce(t,e,{config:{themeVariables:r,flowchart:n}}){let{labelStyles:a}=qt(e);e.labelStyle=a;let i=e.assetHeight??48,s=e.assetWidth??48,o=Math.max(i,s),l=n?.wrappingWidth;e.width=Math.max(o,l??0);let{shapeSvg:u,bbox:h,halfPadding:f,label:d}=await rr(t,e,"icon-shape default"),p=e.pos==="t",m=o+f*2,g=o+f*2,{nodeBorder:v,mainBkg:y}=r,{stylesMap:b}=W1(e),w=-g/2,C=-m/2,k=e.label?8:0,E=je.svg(u),_=zt(e,{});e.look!=="handDrawn"&&(_.roughness=0,_.fillStyle="solid");let S=b.get("fill");_.stroke=S??y;let L=E.path(Gh(w,C,g,m,5),_),M=Math.max(g,h.width),D=m+h.height+k,T=E.rectangle(-M/2,-D/2,M,D,{..._,fill:"transparent",stroke:"none"}),I=u.insert(()=>L,":first-child").attr("class","icon-shape2"),N=u.insert(()=>T);if(e.icon){let O=u.append("g");O.html(`${await kh(e.icon,{height:o,width:o,fallbackPrefix:""})}`);let R=O.node().getBBox(),P=R.width,B=R.height,F=R.x,G=R.y;O.attr("transform",`translate(${-P/2-F},${p?h.height/2+k/2-B/2-G:-h.height/2-k/2-B/2-G})`),O.attr("style",`color: ${b.get("stroke")??v};`)}return d.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))},${p?-D/2:D/2-h.height})`),I.attr("transform",`translate(0,${p?h.height/2+k/2:-h.height/2-k/2})`),Ft(e,N),e.intersect=function(O){if(te.info("iconSquare intersect",e,O),!e.label)return Ot.rect(e,O);let R=e.x??0,P=e.y??0,B=e.height??0,F=[];return p?F=[{x:R-h.width/2,y:P-B/2},{x:R+h.width/2,y:P-B/2},{x:R+h.width/2,y:P-B/2+h.height+k},{x:R+g/2,y:P-B/2+h.height+k},{x:R+g/2,y:P+B/2},{x:R-g/2,y:P+B/2},{x:R-g/2,y:P-B/2+h.height+k},{x:R-h.width/2,y:P-B/2+h.height+k}]:F=[{x:R-g/2,y:P-B/2},{x:R+g/2,y:P-B/2},{x:R+g/2,y:P-B/2+m},{x:R+h.width/2,y:P-B/2+m},{x:R+h.width/2/2,y:P+B/2},{x:R-h.width/2,y:P+B/2},{x:R-h.width/2,y:P-B/2+m},{x:R-g/2,y:P-B/2+m}],Ot.polygon(e,F,O)},u}async function uce(t,e,{config:{themeVariables:r,flowchart:n}}){let{labelStyles:a}=qt(e);e.labelStyle=a;let i=e.assetHeight??48,s=e.assetWidth??48,o=Math.max(i,s),l=n?.wrappingWidth;e.width=Math.max(o,l??0);let{shapeSvg:u,bbox:h,halfPadding:f,label:d}=await rr(t,e,"icon-shape default"),p=e.pos==="t",m=o+f*2,g=o+f*2,{nodeBorder:v,mainBkg:y}=r,{stylesMap:b}=W1(e),w=-g/2,C=-m/2,k=e.label?8:0,E=je.svg(u),_=zt(e,{});e.look!=="handDrawn"&&(_.roughness=0,_.fillStyle="solid");let S=b.get("fill");_.stroke=S??y;let L=E.path(Gh(w,C,g,m,.1),_),M=Math.max(g,h.width),D=m+h.height+k,T=E.rectangle(-M/2,-D/2,M,D,{..._,fill:"transparent",stroke:"none"}),I=u.insert(()=>L,":first-child"),N=u.insert(()=>T);if(e.icon){let O=u.append("g");O.html(`${await kh(e.icon,{height:o,width:o,fallbackPrefix:""})}`);let R=O.node().getBBox(),P=R.width,B=R.height,F=R.x,G=R.y;O.attr("transform",`translate(${-P/2-F},${p?h.height/2+k/2-B/2-G:-h.height/2-k/2-B/2-G})`),O.attr("style",`color: ${b.get("stroke")??v};`)}return d.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))},${p?-D/2:D/2-h.height})`),I.attr("transform",`translate(0,${p?h.height/2+k/2:-h.height/2-k/2})`),Ft(e,N),e.intersect=function(O){if(te.info("iconSquare intersect",e,O),!e.label)return Ot.rect(e,O);let R=e.x??0,P=e.y??0,B=e.height??0,F=[];return p?F=[{x:R-h.width/2,y:P-B/2},{x:R+h.width/2,y:P-B/2},{x:R+h.width/2,y:P-B/2+h.height+k},{x:R+g/2,y:P-B/2+h.height+k},{x:R+g/2,y:P+B/2},{x:R-g/2,y:P+B/2},{x:R-g/2,y:P-B/2+h.height+k},{x:R-h.width/2,y:P-B/2+h.height+k}]:F=[{x:R-g/2,y:P-B/2},{x:R+g/2,y:P-B/2},{x:R+g/2,y:P-B/2+m},{x:R+h.width/2,y:P-B/2+m},{x:R+h.width/2/2,y:P+B/2},{x:R-h.width/2,y:P+B/2},{x:R-h.width/2,y:P-B/2+m},{x:R-g/2,y:P-B/2+m}],Ot.polygon(e,F,O)},u}async function cce(t,e,{config:{flowchart:r}}){let n=new Image;n.src=e?.img??"",await n.decode();let a=Number(n.naturalWidth.toString().replace("px","")),i=Number(n.naturalHeight.toString().replace("px",""));e.imageAspectRatio=a/i;let{labelStyles:s}=qt(e);e.labelStyle=s;let o=r?.wrappingWidth;e.defaultWidth=r?.wrappingWidth;let l=Math.max(e.label?o??0:0,e?.assetWidth??a),u=e.constraint==="on"&&e?.assetHeight?e.assetHeight*e.imageAspectRatio:l,h=e.constraint==="on"?u/e.imageAspectRatio:e?.assetHeight??i;e.width=Math.max(u,o??0);let{shapeSvg:f,bbox:d,label:p}=await rr(t,e,"image-shape default"),m=e.pos==="t",g=-u/2,v=-h/2,y=e.label?8:0,b=je.svg(f),w=zt(e,{});e.look!=="handDrawn"&&(w.roughness=0,w.fillStyle="solid");let C=b.rectangle(g,v,u,h,w),k=Math.max(u,d.width),E=h+d.height+y,_=b.rectangle(-k/2,-E/2,k,E,{...w,fill:"none",stroke:"none"}),S=f.insert(()=>C,":first-child"),L=f.insert(()=>_);if(e.img){let M=f.append("image");M.attr("href",e.img),M.attr("width",u),M.attr("height",h),M.attr("preserveAspectRatio","none"),M.attr("transform",`translate(${-u/2},${m?E/2-h:-E/2})`)}return p.attr("transform",`translate(${-d.width/2-(d.x-(d.left??0))},${m?-h/2-d.height/2-y/2:h/2-d.height/2+y/2})`),S.attr("transform",`translate(0,${m?d.height/2+y/2:-d.height/2-y/2})`),Ft(e,L),e.intersect=function(M){if(te.info("iconSquare intersect",e,M),!e.label)return Ot.rect(e,M);let D=e.x??0,T=e.y??0,I=e.height??0,N=[];return m?N=[{x:D-d.width/2,y:T-I/2},{x:D+d.width/2,y:T-I/2},{x:D+d.width/2,y:T-I/2+d.height+y},{x:D+u/2,y:T-I/2+d.height+y},{x:D+u/2,y:T+I/2},{x:D-u/2,y:T+I/2},{x:D-u/2,y:T-I/2+d.height+y},{x:D-d.width/2,y:T-I/2+d.height+y}]:N=[{x:D-u/2,y:T-I/2},{x:D+u/2,y:T-I/2},{x:D+u/2,y:T-I/2+h},{x:D+d.width/2,y:T-I/2+h},{x:D+d.width/2/2,y:T+I/2},{x:D-d.width/2,y:T+I/2},{x:D-d.width/2,y:T-I/2+h},{x:D-u/2,y:T-I/2+h}],Ot.polygon(e,N,M)},f}async function hce(t,e){let{labelStyles:r,nodeStyles:n}=qt(e);e.labelStyle=r;let{shapeSvg:a,bbox:i}=await rr(t,e,Jt(e)),s=Math.max(i.width+(e.padding??0)*2,e?.width??0),o=Math.max(i.height+(e.padding??0)*2,e?.height??0),l=[{x:0,y:0},{x:s,y:0},{x:s+3*o/6,y:-o},{x:-3*o/6,y:-o}],u,{cssStyles:h}=e;if(e.look==="handDrawn"){let f=je.svg(a),d=zt(e,{}),p=Pr(l),m=f.path(p,d);u=a.insert(()=>m,":first-child").attr("transform",`translate(${-s/2}, ${o/2})`),h&&u.attr("style",h)}else u=Uh(a,s,o,l);return n&&u.attr("style",n),e.width=s,e.height=o,Ft(e,u),e.intersect=function(f){return Ot.polygon(e,l,f)},a}async function v3(t,e,r){let{labelStyles:n,nodeStyles:a}=qt(e);e.labelStyle=n;let{shapeSvg:i,bbox:s}=await rr(t,e,Jt(e)),o=Math.max(s.width+r.labelPaddingX*2,e?.width||0),l=Math.max(s.height+r.labelPaddingY*2,e?.height||0),u=-o/2,h=-l/2,f,{rx:d,ry:p}=e,{cssStyles:m}=e;if(r?.rx&&r.ry&&(d=r.rx,p=r.ry),e.look==="handDrawn"){let g=je.svg(i),v=zt(e,{}),y=d||p?g.path(Gh(u,h,o,l,d||0),v):g.rectangle(u,h,o,l,v);f=i.insert(()=>y,":first-child"),f.attr("class","basic label-container").attr("style",ns(m))}else f=i.insert("rect",":first-child"),f.attr("class","basic label-container").attr("style",a).attr("rx",ns(d)).attr("ry",ns(p)).attr("x",u).attr("y",h).attr("width",o).attr("height",l);return Ft(e,f),e.intersect=function(g){return Ot.rect(e,g)},i}async function fce(t,e){let{shapeSvg:r,bbox:n,label:a}=await rr(t,e,"label"),i=r.insert("rect",":first-child");return i.attr("width",.1).attr("height",.1),r.attr("class","label edgeLabel"),a.attr("transform",`translate(${-(n.width/2)-(n.x-(n.left??0))}, ${-(n.height/2)-(n.y-(n.top??0))})`),Ft(e,i),e.intersect=function(l){return Ot.rect(e,l)},r}async function dce(t,e){let{labelStyles:r,nodeStyles:n}=qt(e);e.labelStyle=r;let{shapeSvg:a,bbox:i}=await rr(t,e,Jt(e)),s=Math.max(i.width+(e.padding??0),e?.width??0),o=Math.max(i.height+(e.padding??0),e?.height??0),l=[{x:0,y:0},{x:s+3*o/6,y:0},{x:s,y:-o},{x:-(3*o)/6,y:-o}],u,{cssStyles:h}=e;if(e.look==="handDrawn"){let f=je.svg(a),d=zt(e,{}),p=Pr(l),m=f.path(p,d);u=a.insert(()=>m,":first-child").attr("transform",`translate(${-s/2}, ${o/2})`),h&&u.attr("style",h)}else u=Uh(a,s,o,l);return n&&u.attr("style",n),e.width=s,e.height=o,Ft(e,u),e.intersect=function(f){return Ot.polygon(e,l,f)},a}async function pce(t,e){let{labelStyles:r,nodeStyles:n}=qt(e);e.labelStyle=r;let{shapeSvg:a,bbox:i}=await rr(t,e,Jt(e)),s=Math.max(i.width+(e.padding??0),e?.width??0),o=Math.max(i.height+(e.padding??0),e?.height??0),l=[{x:-3*o/6,y:0},{x:s,y:0},{x:s+3*o/6,y:-o},{x:0,y:-o}],u,{cssStyles:h}=e;if(e.look==="handDrawn"){let f=je.svg(a),d=zt(e,{}),p=Pr(l),m=f.path(p,d);u=a.insert(()=>m,":first-child").attr("transform",`translate(${-s/2}, ${o/2})`),h&&u.attr("style",h)}else u=Uh(a,s,o,l);return n&&u.attr("style",n),e.width=s,e.height=o,Ft(e,u),e.intersect=function(f){return Ot.polygon(e,l,f)},a}function mce(t,e){let{labelStyles:r,nodeStyles:n}=qt(e);e.label="",e.labelStyle=r;let a=t.insert("g").attr("class",Jt(e)).attr("id",e.domId??e.id),{cssStyles:i}=e,s=Math.max(35,e?.width??0),o=Math.max(35,e?.height??0),l=7,u=[{x:s,y:0},{x:0,y:o+l/2},{x:s-2*l,y:o+l/2},{x:0,y:2*o},{x:s,y:o-l/2},{x:2*l,y:o-l/2}],h=je.svg(a),f=zt(e,{});e.look!=="handDrawn"&&(f.roughness=0,f.fillStyle="solid");let d=Pr(u),p=h.path(d,f),m=a.insert(()=>p,":first-child");return i&&e.look!=="handDrawn"&&m.selectAll("path").attr("style",i),n&&e.look!=="handDrawn"&&m.selectAll("path").attr("style",n),m.attr("transform",`translate(-${s/2},${-o})`),Ft(e,m),e.intersect=function(g){return te.info("lightningBolt intersect",e,g),Ot.polygon(e,u,g)},a}async function gce(t,e){let{labelStyles:r,nodeStyles:n}=qt(e);e.labelStyle=r;let{shapeSvg:a,bbox:i,label:s}=await rr(t,e,Jt(e)),o=Math.max(i.width+(e.padding??0),e.width??0),l=o/2,u=l/(2.5+o/50),h=Math.max(i.height+u+(e.padding??0),e.height??0),f=h*.1,d,{cssStyles:p}=e;if(e.look==="handDrawn"){let m=je.svg(a),g=IXe(0,0,o,h,l,u,f),v=DXe(0,u,o,h,l,u),y=zt(e,{}),b=m.path(g,y),w=m.path(v,y);a.insert(()=>w,":first-child").attr("class","line"),d=a.insert(()=>b,":first-child"),d.attr("class","basic label-container"),p&&d.attr("style",p)}else{let m=RXe(0,0,o,h,l,u,f);d=a.insert("path",":first-child").attr("d",m).attr("class","basic label-container").attr("style",ns(p)).attr("style",n)}return d.attr("label-offset-y",u),d.attr("transform",`translate(${-o/2}, ${-(h/2+u)})`),Ft(e,d),s.attr("transform",`translate(${-(i.width/2)-(i.x-(i.left??0))}, ${-(i.height/2)+u-(i.y-(i.top??0))})`),e.intersect=function(m){let g=Ot.rect(e,m),v=g.x-(e.x??0);if(l!=0&&(Math.abs(v)<(e.width??0)/2||Math.abs(v)==(e.width??0)/2&&Math.abs(g.y-(e.y??0))>(e.height??0)/2-u)){let y=u*u*(1-v*v/(l*l));y>0&&(y=Math.sqrt(y)),y=u-y,m.y-(e.y??0)>0&&(y=-y),g.y+=y}return g},a}async function vce(t,e){let{labelStyles:r,nodeStyles:n}=qt(e);e.labelStyle=r;let{shapeSvg:a,bbox:i,label:s}=await rr(t,e,Jt(e)),o=Math.max(i.width+(e.padding??0)*2,e?.width??0),l=Math.max(i.height+(e.padding??0)*2,e?.height??0),u=l/4,h=l+u,{cssStyles:f}=e,d=je.svg(a),p=zt(e,{});e.look!=="handDrawn"&&(p.roughness=0,p.fillStyle="solid");let m=[{x:-o/2-o/2*.1,y:-h/2},{x:-o/2-o/2*.1,y:h/2},...xd(-o/2-o/2*.1,h/2,o/2+o/2*.1,h/2,u,.8),{x:o/2+o/2*.1,y:-h/2},{x:-o/2-o/2*.1,y:-h/2},{x:-o/2,y:-h/2},{x:-o/2,y:h/2*1.1},{x:-o/2,y:-h/2}],g=d.polygon(m.map(y=>[y.x,y.y]),p),v=a.insert(()=>g,":first-child");return v.attr("class","basic label-container"),f&&e.look!=="handDrawn"&&v.selectAll("path").attr("style",f),n&&e.look!=="handDrawn"&&v.selectAll("path").attr("style",n),v.attr("transform",`translate(0,${-u/2})`),s.attr("transform",`translate(${-o/2+(e.padding??0)+o/2*.1/2-(i.x-(i.left??0))},${-l/2+(e.padding??0)-u/2-(i.y-(i.top??0))})`),Ft(e,v),e.intersect=function(y){return Ot.polygon(e,m,y)},a}async function yce(t,e){let{labelStyles:r,nodeStyles:n}=qt(e);e.labelStyle=r;let{shapeSvg:a,bbox:i,label:s}=await rr(t,e,Jt(e)),o=Math.max(i.width+(e.padding??0)*2,e?.width??0),l=Math.max(i.height+(e.padding??0)*2,e?.height??0),u=5,h=-o/2,f=-l/2,{cssStyles:d}=e,p=je.svg(a),m=zt(e,{}),g=[{x:h-u,y:f+u},{x:h-u,y:f+l+u},{x:h+o-u,y:f+l+u},{x:h+o-u,y:f+l},{x:h+o,y:f+l},{x:h+o,y:f+l-u},{x:h+o+u,y:f+l-u},{x:h+o+u,y:f-u},{x:h+u,y:f-u},{x:h+u,y:f},{x:h,y:f},{x:h,y:f+u}],v=[{x:h,y:f+u},{x:h+o-u,y:f+u},{x:h+o-u,y:f+l},{x:h+o,y:f+l},{x:h+o,y:f},{x:h,y:f}];e.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");let y=Pr(g),b=p.path(y,m),w=Pr(v),C=p.path(w,{...m,fill:"none"}),k=a.insert(()=>C,":first-child");return k.insert(()=>b,":first-child"),k.attr("class","basic label-container"),d&&e.look!=="handDrawn"&&k.selectAll("path").attr("style",d),n&&e.look!=="handDrawn"&&k.selectAll("path").attr("style",n),s.attr("transform",`translate(${-(i.width/2)-u-(i.x-(i.left??0))}, ${-(i.height/2)+u-(i.y-(i.top??0))})`),Ft(e,k),e.intersect=function(E){return Ot.polygon(e,g,E)},a}async function xce(t,e){let{labelStyles:r,nodeStyles:n}=qt(e);e.labelStyle=r;let{shapeSvg:a,bbox:i,label:s}=await rr(t,e,Jt(e)),o=Math.max(i.width+(e.padding??0)*2,e?.width??0),l=Math.max(i.height+(e.padding??0)*2,e?.height??0),u=l/4,h=l+u,f=-o/2,d=-h/2,p=5,{cssStyles:m}=e,g=xd(f-p,d+h+p,f+o-p,d+h+p,u,.8),v=g?.[g.length-1],y=[{x:f-p,y:d+p},{x:f-p,y:d+h+p},...g,{x:f+o-p,y:v.y-p},{x:f+o,y:v.y-p},{x:f+o,y:v.y-2*p},{x:f+o+p,y:v.y-2*p},{x:f+o+p,y:d-p},{x:f+p,y:d-p},{x:f+p,y:d},{x:f,y:d},{x:f,y:d+p}],b=[{x:f,y:d+p},{x:f+o-p,y:d+p},{x:f+o-p,y:v.y-p},{x:f+o,y:v.y-p},{x:f+o,y:d},{x:f,y:d}],w=je.svg(a),C=zt(e,{});e.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");let k=Pr(y),E=w.path(k,C),_=Pr(b),S=w.path(_,C),L=a.insert(()=>E,":first-child");return L.insert(()=>S),L.attr("class","basic label-container"),m&&e.look!=="handDrawn"&&L.selectAll("path").attr("style",m),n&&e.look!=="handDrawn"&&L.selectAll("path").attr("style",n),L.attr("transform",`translate(0,${-u/2})`),s.attr("transform",`translate(${-(i.width/2)-p-(i.x-(i.left??0))}, ${-(i.height/2)+p-u/2-(i.y-(i.top??0))})`),Ft(e,L),e.intersect=function(M){return Ot.polygon(e,y,M)},a}async function bce(t,e,{config:{themeVariables:r}}){let{labelStyles:n,nodeStyles:a}=qt(e);e.labelStyle=n,e.useHtmlLabels||wr().flowchart?.htmlLabels!==!1||(e.centerLabel=!0);let{shapeSvg:s,bbox:o}=await rr(t,e,Jt(e)),l=Math.max(o.width+(e.padding??0)*2,e?.width??0),u=Math.max(o.height+(e.padding??0)*2,e?.height??0),h=-l/2,f=-u/2,{cssStyles:d}=e,p=je.svg(s),m=zt(e,{fill:r.noteBkgColor,stroke:r.noteBorderColor});e.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");let g=p.rectangle(h,f,l,u,m),v=s.insert(()=>g,":first-child");return v.attr("class","basic label-container"),d&&e.look!=="handDrawn"&&v.selectAll("path").attr("style",d),a&&e.look!=="handDrawn"&&v.selectAll("path").attr("style",a),Ft(e,v),e.intersect=function(y){return Ot.rect(e,y)},s}async function wce(t,e){let{labelStyles:r,nodeStyles:n}=qt(e);e.labelStyle=r;let{shapeSvg:a,bbox:i}=await rr(t,e,Jt(e)),s=i.width+e.padding,o=i.height+e.padding,l=s+o,u=[{x:l/2,y:0},{x:l,y:-l/2},{x:l/2,y:-l},{x:0,y:-l/2}],h,{cssStyles:f}=e;if(e.look==="handDrawn"){let d=je.svg(a),p=zt(e,{}),m=NXe(0,0,l),g=d.path(m,p);h=a.insert(()=>g,":first-child").attr("transform",`translate(${-l/2}, ${l/2})`),f&&h.attr("style",f)}else h=Uh(a,l,l,u);return n&&h.attr("style",n),Ft(e,h),e.intersect=function(d){return te.debug(`APA12 Intersect called SPLIT +`),i=bE(n);return e===!1?i.replace(/ /g," "):i}function Mhe(t,e={}){let r=Ihe(t,e),n=_n.lexer(r),i=[[]],a=0;function s(o,l="normal"){o.type==="text"?o.text.split(` +`).forEach((h,f)=>{f!==0&&(a++,i.push([])),h.split(" ").forEach(d=>{d=d.replace(/'/g,"'"),d&&i[a].push({content:d,type:l})})}):o.type==="strong"||o.type==="em"?o.tokens.forEach(u=>{s(u,o.type)}):o.type==="html"&&i[a].push({content:o.text,type:"normal"})}return b(s,"processNode"),n.forEach(o=>{o.type==="paragraph"?o.tokens?.forEach(l=>{s(l)}):o.type==="html"&&i[a].push({content:o.text,type:"normal"})}),i}function Nhe(t,{markdownAutoWrap:e}={}){let r=_n.lexer(t);function n(i){return i.type==="text"?e===!1?i.text.replace(/\n */g,"
    ").replace(/ /g," "):i.text.replace(/\n */g,"
    "):i.type==="strong"?`${i.tokens?.map(n).join("")}`:i.type==="em"?`${i.tokens?.map(n).join("")}`:i.type==="paragraph"?`

    ${i.tokens?.map(n).join("")}

    `:i.type==="space"?"":i.type==="html"?`${i.text}`:i.type==="escape"?i.text:`Unsupported markdown: ${i.type}`}return b(n,"output"),r.map(n).join("")}function Ohe(t){return Intl.Segmenter?[...new Intl.Segmenter().segment(t)].map(e=>e.segment):[...t]}function Phe(t,e){let r=Ohe(e.content);return yF(t,[],r,e.type)}function yF(t,e,r,n){if(r.length===0)return[{content:e.join(""),type:n},{content:"",type:n}];let[i,...a]=r,s=[...e,i];return t([{content:s.join(""),type:n}])?yF(t,s,a,n):(e.length===0&&i&&(e.push(i),r.shift()),[{content:e.join(""),type:n},{content:r.join(""),type:n}])}function Bhe(t,e){if(t.some(({content:r})=>r.includes(` +`)))throw new Error("splitLineToFitWidth does not support newlines in the line");return wE(t,e)}function wE(t,e,r=[],n=[]){if(t.length===0)return n.length>0&&r.push(n),r.length>0?r:[];let i="";t[0].content===" "&&(i=" ",t.shift());let a=t.shift()??{content:" ",type:"normal"},s=[...n];if(i!==""&&s.push({content:i,type:"normal"}),s.push(a),e(s))return wE(t,e,r,s);if(n.length>0)r.push(n),t.unshift(a);else if(a.content){let[o,l]=Phe(e,a);r.push([o]),l.content&&t.unshift(l)}return wE(t,e,r)}function gF(t,e){e&&t.attr("style",e)}async function Fhe(t,e,r,n,i=!1){let a=t.append("foreignObject");a.attr("width",`${10*r}px`),a.attr("height",`${10*r}px`);let s=a.append("xhtml:div"),o=e.label;e.label&&za(e.label)&&(o=await jf(e.label.replace(St.lineBreakRegex,` +`),Fe()));let l=e.isNode?"nodeLabel":"edgeLabel",u=s.append("span");u.html(o),gF(u,e.labelStyle),u.attr("class",`${l} ${n}`),gF(s,e.labelStyle),s.style("display","table-cell"),s.style("white-space","nowrap"),s.style("line-height","1.5"),s.style("max-width",r+"px"),s.style("text-align","center"),s.attr("xmlns","http://www.w3.org/1999/xhtml"),i&&s.attr("class","labelBkg");let h=s.node().getBoundingClientRect();return h.width===r&&(s.style("display","table"),s.style("white-space","break-spaces"),s.style("width",r+"px"),h=s.node().getBoundingClientRect()),a.node()}function kE(t,e,r){return t.append("tspan").attr("class","text-outer-tspan").attr("x",0).attr("y",e*r-.1+"em").attr("dy",r+"em")}function zhe(t,e,r){let n=t.append("text"),i=kE(n,1,e);TE(i,r);let a=i.node().getComputedTextLength();return n.remove(),a}function vF(t,e,r){let n=t.append("text"),i=kE(n,1,e);TE(i,[{content:r,type:"normal"}]);let a=i.node()?.getBoundingClientRect();return a&&n.remove(),a}function $he(t,e,r,n=!1){let a=e.append("g"),s=a.insert("rect").attr("class","background").attr("style","stroke: none"),o=a.append("text").attr("y","-10.1"),l=0;for(let u of r){let h=b(d=>zhe(a,1.1,d)<=t,"checkWidth"),f=h(u)?[u]:Bhe(u,h);for(let d of f){let p=kE(o,l,1.1);TE(p,d),l++}}if(n){let u=o.node().getBBox(),h=2;return s.attr("x",u.x-h).attr("y",u.y-h).attr("width",u.width+2*h).attr("height",u.height+2*h),a.node()}else return o.node()}function TE(t,e){t.text(""),e.forEach((r,n)=>{let i=t.append("tspan").attr("font-style",r.type==="em"?"italic":"normal").attr("class","text-inner-tspan").attr("font-weight",r.type==="strong"?"bold":"normal");n===0?i.text(r.content):i.text(" "+r.content)})}function EE(t){return t.replace(/fa[bklrs]?:fa-[\w-]+/g,e=>``)}var qa,As=D(()=>{Hn();Nr();Or();Dhe();mF();b(Ihe,"preprocessMarkdown");b(Mhe,"markdownToLines");b(Nhe,"markdownToHTML");b(Ohe,"splitTextToChars");b(Phe,"splitWordToFitWidth");b(yF,"splitWordToFitWidthRecursion");b(Bhe,"splitLineToFitWidth");b(wE,"splitLineToFitWidthRecursion");b(gF,"applyStyle");b(Fhe,"addHtmlSpan");b(kE,"createTspan");b(zhe,"computeWidthOfText");b(vF,"computeDimensionOfText");b($he,"createFormattedText");b(TE,"updateTextContentAndStyles");b(EE,"replaceIconSubstring");qa=b(async(t,e="",{style:r="",isTitle:n=!1,classes:i="",useHtmlLabels:a=!0,isNode:s=!0,width:o=200,addSvgBackground:l=!1}={},u)=>{if(he.debug("XYZ createText",e,r,n,i,a,s,"addSvgBackground: ",l),a){let h=Nhe(e,u),f=EE(Jo(h)),d=e.replace(/\\\\/g,"\\"),p={isNode:s,label:za(e)?d:f,labelStyle:r.replace("fill:","color:")};return await Fhe(t,p,o,i,l)}else{let h=e.replace(//g,"
    "),f=Mhe(h.replace("
    ","
    "),u),d=$he(o,t,f,e?l:!1);if(s){/stroke:/.exec(r)&&(r=r.replace("stroke:","lineColor:"));let p=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");dt(d).attr("style",p)}else{let p=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/background:/g,"fill:");dt(d).select("rect").attr("style",p.replace(/background:/g,"fill:"));let m=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");dt(d).select("text").attr("style",m)}return d}},"createText")});function xF(t,e,r){if(t&&t.length){let[n,i]=e,a=Math.PI/180*r,s=Math.cos(a),o=Math.sin(a);for(let l of t){let[u,h]=l;l[0]=(u-n)*s-(h-i)*o+n,l[1]=(u-n)*o+(h-i)*s+i}}}function OQe(t,e){return t[0]===e[0]&&t[1]===e[1]}function PQe(t,e,r,n=1){let i=r,a=Math.max(e,.1),s=t[0]&&t[0][0]&&typeof t[0][0]=="number"?[t]:t,o=[0,0];if(i)for(let u of s)xF(u,o,i);let l=(function(u,h,f){let d=[];for(let x of u){let k=[...x];OQe(k[0],k[k.length-1])||k.push([k[0][0],k[0][1]]),k.length>2&&d.push(k)}let p=[];h=Math.max(h,.1);let m=[];for(let x of d)for(let k=0;kx.ymink.ymin?1:x.xk.x?1:x.ymax===k.ymax?0:(x.ymax-k.ymax)/Math.abs(x.ymax-k.ymax))),!m.length)return p;let g=[],y=m[0].ymin,v=0;for(;g.length||m.length;){if(m.length){let x=-1;for(let k=0;ky);k++)x=k;m.splice(0,x+1).forEach((k=>{g.push({s:y,edge:k})}))}if(g=g.filter((x=>!(x.edge.ymax<=y))),g.sort(((x,k)=>x.edge.x===k.edge.x?0:(x.edge.x-k.edge.x)/Math.abs(x.edge.x-k.edge.x))),(f!==1||v%h==0)&&g.length>1)for(let x=0;x=g.length)break;let _=g[x].edge,T=g[k].edge;p.push([[Math.round(_.x),y],[Math.round(T.x),y]])}y+=f,g.forEach((x=>{x.edge.x=x.edge.x+f*x.edge.islope})),v++}return p})(s,a,n);if(i){for(let u of s)xF(u,o,-i);(function(u,h,f){let d=[];u.forEach((p=>d.push(...p))),xF(d,h,f)})(l,o,-i)}return l}function I5(t,e){var r;let n=e.hachureAngle+90,i=e.hachureGap;i<0&&(i=4*e.strokeWidth),i=Math.round(Math.max(i,.1));let a=1;return e.roughness>=1&&(((r=e.randomizer)===null||r===void 0?void 0:r.next())||Math.random())>.7&&(a=i),PQe(t,i,n,a||1)}function ME(t){let e=t[0],r=t[1];return Math.sqrt(Math.pow(e[0]-r[0],2)+Math.pow(e[1]-r[1],2))}function wF(t,e){return t.type===e}function OF(t){let e=[],r=(function(s){let o=new Array;for(;s!=="";)if(s.match(/^([ \t\r\n,]+)/))s=s.substr(RegExp.$1.length);else if(s.match(/^([aAcChHlLmMqQsStTvVzZ])/))o[o.length]={type:BQe,text:RegExp.$1},s=s.substr(RegExp.$1.length);else{if(!s.match(/^(([-+]?[0-9]+(\.[0-9]*)?|[-+]?\.[0-9]+)([eE][-+]?[0-9]+)?)/))return[];o[o.length]={type:bF,text:`${parseFloat(RegExp.$1)}`},s=s.substr(RegExp.$1.length)}return o[o.length]={type:Ghe,text:""},o})(t),n="BOD",i=0,a=r[i];for(;!wF(a,Ghe);){let s=0,o=[];if(n==="BOD"){if(a.text!=="M"&&a.text!=="m")return OF("M0,0"+t);i++,s=SE[a.text],n=a.text}else wF(a,bF)?s=SE[n]:(i++,s=SE[a.text],n=a.text);if(!(i+sh%2?u+r:u+e));a.push({key:"C",data:l}),e=l[4],r=l[5];break}case"Q":a.push({key:"Q",data:[...o]}),e=o[2],r=o[3];break;case"q":{let l=o.map(((u,h)=>h%2?u+r:u+e));a.push({key:"Q",data:l}),e=l[2],r=l[3];break}case"A":a.push({key:"A",data:[...o]}),e=o[5],r=o[6];break;case"a":e+=o[5],r+=o[6],a.push({key:"A",data:[o[0],o[1],o[2],o[3],o[4],e,r]});break;case"H":a.push({key:"H",data:[...o]}),e=o[0];break;case"h":e+=o[0],a.push({key:"H",data:[e]});break;case"V":a.push({key:"V",data:[...o]}),r=o[0];break;case"v":r+=o[0],a.push({key:"V",data:[r]});break;case"S":a.push({key:"S",data:[...o]}),e=o[2],r=o[3];break;case"s":{let l=o.map(((u,h)=>h%2?u+r:u+e));a.push({key:"S",data:l}),e=l[2],r=l[3];break}case"T":a.push({key:"T",data:[...o]}),e=o[0],r=o[1];break;case"t":e+=o[0],r+=o[1],a.push({key:"T",data:[e,r]});break;case"Z":case"z":a.push({key:"Z",data:[]}),e=n,r=i}return a}function Khe(t){let e=[],r="",n=0,i=0,a=0,s=0,o=0,l=0;for(let{key:u,data:h}of t){switch(u){case"M":e.push({key:"M",data:[...h]}),[n,i]=h,[a,s]=h;break;case"C":e.push({key:"C",data:[...h]}),n=h[4],i=h[5],o=h[2],l=h[3];break;case"L":e.push({key:"L",data:[...h]}),[n,i]=h;break;case"H":n=h[0],e.push({key:"L",data:[n,i]});break;case"V":i=h[0],e.push({key:"L",data:[n,i]});break;case"S":{let f=0,d=0;r==="C"||r==="S"?(f=n+(n-o),d=i+(i-l)):(f=n,d=i),e.push({key:"C",data:[f,d,...h]}),o=h[0],l=h[1],n=h[2],i=h[3];break}case"T":{let[f,d]=h,p=0,m=0;r==="Q"||r==="T"?(p=n+(n-o),m=i+(i-l)):(p=n,m=i);let g=n+2*(p-n)/3,y=i+2*(m-i)/3,v=f+2*(p-f)/3,x=d+2*(m-d)/3;e.push({key:"C",data:[g,y,v,x,f,d]}),o=p,l=m,n=f,i=d;break}case"Q":{let[f,d,p,m]=h,g=n+2*(f-n)/3,y=i+2*(d-i)/3,v=p+2*(f-p)/3,x=m+2*(d-m)/3;e.push({key:"C",data:[g,y,v,x,p,m]}),o=f,l=d,n=p,i=m;break}case"A":{let f=Math.abs(h[0]),d=Math.abs(h[1]),p=h[2],m=h[3],g=h[4],y=h[5],v=h[6];f===0||d===0?(e.push({key:"C",data:[n,i,y,v,y,v]}),n=y,i=v):(n!==y||i!==v)&&(Zhe(n,i,y,v,f,d,p,m,g).forEach((function(x){e.push({key:"C",data:x})})),n=y,i=v);break}case"Z":e.push({key:"Z",data:[]}),n=a,i=s}r=u}return e}function L5(t,e,r){return[t*Math.cos(r)-e*Math.sin(r),t*Math.sin(r)+e*Math.cos(r)]}function Zhe(t,e,r,n,i,a,s,o,l,u){let h=(f=s,Math.PI*f/180);var f;let d=[],p=0,m=0,g=0,y=0;if(u)[p,m,g,y]=u;else{[t,e]=L5(t,e,-h),[r,n]=L5(r,n,-h);let N=(t-r)/2,B=(e-n)/2,F=N*N/(i*i)+B*B/(a*a);F>1&&(F=Math.sqrt(F),i*=F,a*=F);let M=i*i,$=a*a,z=M*$-M*B*B-$*N*N,q=M*B*B+$*N*N,V=(o===l?-1:1)*Math.sqrt(Math.abs(z/q));g=V*i*B/a+(t+r)/2,y=V*-a*N/i+(e+n)/2,p=Math.asin(parseFloat(((e-y)/a).toFixed(9))),m=Math.asin(parseFloat(((n-y)/a).toFixed(9))),tm&&(p-=2*Math.PI),!l&&m>p&&(m-=2*Math.PI)}let v=m-p;if(Math.abs(v)>120*Math.PI/180){let N=m,B=r,F=n;m=l&&m>p?p+120*Math.PI/180*1:p+120*Math.PI/180*-1,d=Zhe(r=g+i*Math.cos(m),n=y+a*Math.sin(m),B,F,i,a,s,0,l,[m,N,g,y])}v=m-p;let x=Math.cos(p),k=Math.sin(p),_=Math.cos(m),T=Math.sin(m),S=Math.tan(v/4),R=4/3*i*S,A=4/3*a*S,I=[t,e],P=[t+R*k,e-A*x],O=[r+R*T,n-A*_],C=[r,n];if(P[0]=2*I[0]-P[0],P[1]=2*I[1]-P[1],u)return[P,O,C].concat(d);{d=[P,O,C].concat(d);let N=[];for(let B=0;B2){let i=[];for(let a=0;a2*Math.PI&&(p=0,m=2*Math.PI);let g=2*Math.PI/l.curveStepCount,y=Math.min(g/2,(m-p)/2),v=Yhe(y,u,h,f,d,p,m,1,l);if(!l.disableMultiStroke){let x=Yhe(y,u,h,f,d,p,m,1.5,l);v.push(...x)}return s&&(o?v.push(...Cd(u,h,u+f*Math.cos(p),h+d*Math.sin(p),l),...Cd(u,h,u+f*Math.cos(m),h+d*Math.sin(m),l)):v.push({op:"lineTo",data:[u,h]},{op:"lineTo",data:[u+f*Math.cos(p),h+d*Math.sin(p)]})),{type:"path",ops:v}}function Hhe(t,e){let r=Khe(jhe(OF(t))),n=[],i=[0,0],a=[0,0];for(let{key:s,data:o}of r)switch(s){case"M":a=[o[0],o[1]],i=[o[0],o[1]];break;case"L":n.push(...Cd(a[0],a[1],o[0],o[1],e)),a=[o[0],o[1]];break;case"C":{let[l,u,h,f,d,p]=o;n.push(...$Qe(l,u,h,f,d,p,a,e)),a=[d,p];break}case"Z":n.push(...Cd(a[0],a[1],i[0],i[1],e)),a=[i[0],i[1]]}return{type:"path",ops:n}}function kF(t,e){let r=[];for(let n of t)if(n.length){let i=e.maxRandomnessOffset||0,a=n.length;if(a>2){r.push({op:"move",data:[n[0][0]+wr(i,e),n[0][1]+wr(i,e)]});for(let s=1;s500?.4:-.0016668*l+1.233334;let h=i.maxRandomnessOffset||0;h*h*100>o&&(h=l/10);let f=h/2,d=.2+.2*efe(i),p=i.bowing*i.maxRandomnessOffset*(n-e)/200,m=i.bowing*i.maxRandomnessOffset*(t-r)/200;p=wr(p,i,u),m=wr(m,i,u);let g=[],y=()=>wr(f,i,u),v=()=>wr(h,i,u),x=i.preserveVertices;return a&&(s?g.push({op:"move",data:[t+(x?0:y()),e+(x?0:y())]}):g.push({op:"move",data:[t+(x?0:wr(h,i,u)),e+(x?0:wr(h,i,u))]})),s?g.push({op:"bcurveTo",data:[p+t+(r-t)*d+y(),m+e+(n-e)*d+y(),p+t+2*(r-t)*d+y(),m+e+2*(n-e)*d+y(),r+(x?0:y()),n+(x?0:y())]}):g.push({op:"bcurveTo",data:[p+t+(r-t)*d+v(),m+e+(n-e)*d+v(),p+t+2*(r-t)*d+v(),m+e+2*(n-e)*d+v(),r+(x?0:v()),n+(x?0:v())]}),g}function CE(t,e,r){if(!t.length)return[];let n=[];n.push([t[0][0]+wr(e,r),t[0][1]+wr(e,r)]),n.push([t[0][0]+wr(e,r),t[0][1]+wr(e,r)]);for(let i=1;i3){let a=[],s=1-r.curveTightness;i.push({op:"move",data:[t[1][0],t[1][1]]});for(let o=1;o+21&&i.push(o)):i.push(o),i.push(t[e+3])}else{let l=t[e+0],u=t[e+1],h=t[e+2],f=t[e+3],d=rm(l,u,.5),p=rm(u,h,.5),m=rm(h,f,.5),g=rm(d,p,.5),y=rm(p,m,.5),v=rm(g,y,.5);IF([l,d,g,v],0,r,i),IF([v,y,m,f],0,r,i)}var a,s;return i}function qQe(t,e){return IE(t,0,t.length,e)}function IE(t,e,r,n,i){let a=i||[],s=t[e],o=t[r-1],l=0,u=1;for(let h=e+1;hl&&(l=f,u=h)}return Math.sqrt(l)>n?(IE(t,e,u+1,n,a),IE(t,u,r,n,a)):(a.length||a.push(s),a.push(o)),a}function TF(t,e=.15,r){let n=[],i=(t.length-1)/3;for(let a=0;a0?IE(n,0,n.length,r):n}var D5,EF,SF,CF,_F,AF,el,LF,BQe,bF,Ghe,SE,FQe,Dl,ry,MF,_E,NF,xt,fr=D(()=>{D5=class{constructor(e){this.helper=e}fillPolygons(e,r){return this._fillPolygons(e,r)}_fillPolygons(e,r){let n=I5(e,r);return{type:"fillSketch",ops:this.renderLines(n,r)}}renderLines(e,r){let n=[];for(let i of e)n.push(...this.helper.doubleLineOps(i[0][0],i[0][1],i[1][0],i[1][1],r));return n}};EF=class extends D5{fillPolygons(e,r){let n=r.hachureGap;n<0&&(n=4*r.strokeWidth),n=Math.max(n,.1);let i=I5(e,Object.assign({},r,{hachureGap:n})),a=Math.PI/180*r.hachureAngle,s=[],o=.5*n*Math.cos(a),l=.5*n*Math.sin(a);for(let[u,h]of i)ME([u,h])&&s.push([[u[0]-o,u[1]+l],[...h]],[[u[0]+o,u[1]-l],[...h]]);return{type:"fillSketch",ops:this.renderLines(s,r)}}},SF=class extends D5{fillPolygons(e,r){let n=this._fillPolygons(e,r),i=Object.assign({},r,{hachureAngle:r.hachureAngle+90}),a=this._fillPolygons(e,i);return n.ops=n.ops.concat(a.ops),n}},CF=class{constructor(e){this.helper=e}fillPolygons(e,r){let n=I5(e,r=Object.assign({},r,{hachureAngle:0}));return this.dotsOnLines(n,r)}dotsOnLines(e,r){let n=[],i=r.hachureGap;i<0&&(i=4*r.strokeWidth),i=Math.max(i,.1);let a=r.fillWeight;a<0&&(a=r.strokeWidth/2);let s=i/4;for(let o of e){let l=ME(o),u=l/i,h=Math.ceil(u)-1,f=l-h*i,d=(o[0][0]+o[1][0])/2-i/4,p=Math.min(o[0][1],o[1][1]);for(let m=0;m{let o=ME(s),l=Math.floor(o/(n+i)),u=(o+i-l*(n+i))/2,h=s[0],f=s[1];h[0]>f[0]&&(h=s[1],f=s[0]);let d=Math.atan((f[1]-h[1])/(f[0]-h[0]));for(let p=0;p{let s=ME(a),o=Math.round(s/(2*r)),l=a[0],u=a[1];l[0]>u[0]&&(l=a[1],u=a[0]);let h=Math.atan((u[1]-l[1])/(u[0]-l[0]));for(let f=0;f2*Math.PI&&(R=0,A=2*Math.PI);let I=(A-R)/x.curveStepCount,P=[];for(let O=R;O<=A;O+=I)P.push([k+T*Math.cos(O),_+S*Math.sin(O)]);return P.push([k+T*Math.cos(A),_+S*Math.sin(A)]),P.push([k,_]),ty([P],x)})(e,r,n,i,a,s,u));return u.stroke!==Dl&&h.push(f),this._d("arc",h,u)}curve(e,r){let n=this._o(r),i=[],a=qhe(e,n);if(n.fill&&n.fill!==Dl)if(n.fillStyle==="solid"){let s=qhe(e,Object.assign(Object.assign({},n),{disableMultiStroke:!0,roughness:n.roughness?n.roughness+n.fillShapeRoughnessGain:0}));i.push({type:"fillPath",ops:this._mergedShape(s.ops)})}else{let s=[],o=e;if(o.length){let l=typeof o[0][0]=="number"?[o]:o;for(let u of l)u.length<3?s.push(...u):u.length===3?s.push(...TF(Xhe([u[0],u[0],u[1],u[2]]),10,(1+n.roughness)/2)):s.push(...TF(Xhe(u),10,(1+n.roughness)/2))}s.length&&i.push(ty([s],n))}return n.stroke!==Dl&&i.push(a),this._d("curve",i,n)}polygon(e,r){let n=this._o(r),i=[],a=AE(e,!0,n);return n.fill&&(n.fillStyle==="solid"?i.push(kF([e],n)):i.push(ty([e],n))),n.stroke!==Dl&&i.push(a),this._d("polygon",i,n)}path(e,r){let n=this._o(r),i=[];if(!e)return this._d("path",i,n);e=(e||"").replace(/\n/g," ").replace(/(-\s)/g,"-").replace("/(ss)/g"," ");let a=n.fill&&n.fill!=="transparent"&&n.fill!==Dl,s=n.stroke!==Dl,o=!!(n.simplification&&n.simplification<1),l=(function(h,f,d){let p=Khe(jhe(OF(h))),m=[],g=[],y=[0,0],v=[],x=()=>{v.length>=4&&g.push(...TF(v,f)),v=[]},k=()=>{x(),g.length&&(m.push(g),g=[])};for(let{key:T,data:S}of p)switch(T){case"M":k(),y=[S[0],S[1]],g.push(y);break;case"L":x(),g.push([S[0],S[1]]);break;case"C":if(!v.length){let R=g.length?g[g.length-1]:y;v.push([R[0],R[1]])}v.push([S[0],S[1]]),v.push([S[2],S[3]]),v.push([S[4],S[5]]);break;case"Z":x(),g.push([y[0],y[1]])}if(k(),!d)return m;let _=[];for(let T of m){let S=qQe(T,d);S.length&&_.push(S)}return _})(e,1,o?4-4*(n.simplification||1):(1+n.roughness)/2),u=Hhe(e,n);if(a)if(n.fillStyle==="solid")if(l.length===1){let h=Hhe(e,Object.assign(Object.assign({},n),{disableMultiStroke:!0,roughness:n.roughness?n.roughness+n.fillShapeRoughnessGain:0}));i.push({type:"fillPath",ops:this._mergedShape(h.ops)})}else i.push(kF(l,n));else i.push(ty(l,n));return s&&(o?l.forEach((h=>{i.push(AE(h,!1,n))})):i.push(u)),this._d("path",i,n)}opsToPath(e,r){let n="";for(let i of e.ops){let a=typeof r=="number"&&r>=0?i.data.map((s=>+s.toFixed(r))):i.data;switch(i.op){case"move":n+=`M${a[0]} ${a[1]} `;break;case"bcurveTo":n+=`C${a[0]} ${a[1]}, ${a[2]} ${a[3]}, ${a[4]} ${a[5]} `;break;case"lineTo":n+=`L${a[0]} ${a[1]} `}}return n.trim()}toPaths(e){let r=e.sets||[],n=e.options||this.defaultOptions,i=[];for(let a of r){let s=null;switch(a.type){case"path":s={d:this.opsToPath(a),stroke:n.stroke,strokeWidth:n.strokeWidth,fill:Dl};break;case"fillPath":s={d:this.opsToPath(a),stroke:Dl,strokeWidth:0,fill:n.fill||Dl};break;case"fillSketch":s=this.fillSketch(a,n)}s&&i.push(s)}return i}fillSketch(e,r){let n=r.fillWeight;return n<0&&(n=r.strokeWidth/2),{d:this.opsToPath(e),stroke:r.fill||Dl,strokeWidth:n,fill:Dl}}_mergedShape(e){return e.filter(((r,n)=>n===0||r.op!=="move"))}},MF=class{constructor(e,r){this.canvas=e,this.ctx=this.canvas.getContext("2d"),this.gen=new ry(r)}draw(e){let r=e.sets||[],n=e.options||this.getDefaultOptions(),i=this.ctx,a=e.options.fixedDecimalPlaceDigits;for(let s of r)switch(s.type){case"path":i.save(),i.strokeStyle=n.stroke==="none"?"transparent":n.stroke,i.lineWidth=n.strokeWidth,n.strokeLineDash&&i.setLineDash(n.strokeLineDash),n.strokeLineDashOffset&&(i.lineDashOffset=n.strokeLineDashOffset),this._drawToContext(i,s,a),i.restore();break;case"fillPath":{i.save(),i.fillStyle=n.fill||"";let o=e.shape==="curve"||e.shape==="polygon"||e.shape==="path"?"evenodd":"nonzero";this._drawToContext(i,s,a,o),i.restore();break}case"fillSketch":this.fillSketch(i,s,n)}}fillSketch(e,r,n){let i=n.fillWeight;i<0&&(i=n.strokeWidth/2),e.save(),n.fillLineDash&&e.setLineDash(n.fillLineDash),n.fillLineDashOffset&&(e.lineDashOffset=n.fillLineDashOffset),e.strokeStyle=n.fill||"",e.lineWidth=i,this._drawToContext(e,r,n.fixedDecimalPlaceDigits),e.restore()}_drawToContext(e,r,n,i="nonzero"){e.beginPath();for(let a of r.ops){let s=typeof n=="number"&&n>=0?a.data.map((o=>+o.toFixed(n))):a.data;switch(a.op){case"move":e.moveTo(s[0],s[1]);break;case"bcurveTo":e.bezierCurveTo(s[0],s[1],s[2],s[3],s[4],s[5]);break;case"lineTo":e.lineTo(s[0],s[1])}}r.type==="fillPath"?e.fill(i):e.stroke()}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}line(e,r,n,i,a){let s=this.gen.line(e,r,n,i,a);return this.draw(s),s}rectangle(e,r,n,i,a){let s=this.gen.rectangle(e,r,n,i,a);return this.draw(s),s}ellipse(e,r,n,i,a){let s=this.gen.ellipse(e,r,n,i,a);return this.draw(s),s}circle(e,r,n,i){let a=this.gen.circle(e,r,n,i);return this.draw(a),a}linearPath(e,r){let n=this.gen.linearPath(e,r);return this.draw(n),n}polygon(e,r){let n=this.gen.polygon(e,r);return this.draw(n),n}arc(e,r,n,i,a,s,o=!1,l){let u=this.gen.arc(e,r,n,i,a,s,o,l);return this.draw(u),u}curve(e,r){let n=this.gen.curve(e,r);return this.draw(n),n}path(e,r){let n=this.gen.path(e,r);return this.draw(n),n}},_E="http://www.w3.org/2000/svg",NF=class{constructor(e,r){this.svg=e,this.gen=new ry(r)}draw(e){let r=e.sets||[],n=e.options||this.getDefaultOptions(),i=this.svg.ownerDocument||window.document,a=i.createElementNS(_E,"g"),s=e.options.fixedDecimalPlaceDigits;for(let o of r){let l=null;switch(o.type){case"path":l=i.createElementNS(_E,"path"),l.setAttribute("d",this.opsToPath(o,s)),l.setAttribute("stroke",n.stroke),l.setAttribute("stroke-width",n.strokeWidth+""),l.setAttribute("fill","none"),n.strokeLineDash&&l.setAttribute("stroke-dasharray",n.strokeLineDash.join(" ").trim()),n.strokeLineDashOffset&&l.setAttribute("stroke-dashoffset",`${n.strokeLineDashOffset}`);break;case"fillPath":l=i.createElementNS(_E,"path"),l.setAttribute("d",this.opsToPath(o,s)),l.setAttribute("stroke","none"),l.setAttribute("stroke-width","0"),l.setAttribute("fill",n.fill||""),e.shape!=="curve"&&e.shape!=="polygon"||l.setAttribute("fill-rule","evenodd");break;case"fillSketch":l=this.fillSketch(i,o,n)}l&&a.appendChild(l)}return a}fillSketch(e,r,n){let i=n.fillWeight;i<0&&(i=n.strokeWidth/2);let a=e.createElementNS(_E,"path");return a.setAttribute("d",this.opsToPath(r,n.fixedDecimalPlaceDigits)),a.setAttribute("stroke",n.fill||""),a.setAttribute("stroke-width",i+""),a.setAttribute("fill","none"),n.fillLineDash&&a.setAttribute("stroke-dasharray",n.fillLineDash.join(" ").trim()),n.fillLineDashOffset&&a.setAttribute("stroke-dashoffset",`${n.fillLineDashOffset}`),a}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}opsToPath(e,r){return this.gen.opsToPath(e,r)}line(e,r,n,i,a){let s=this.gen.line(e,r,n,i,a);return this.draw(s)}rectangle(e,r,n,i,a){let s=this.gen.rectangle(e,r,n,i,a);return this.draw(s)}ellipse(e,r,n,i,a){let s=this.gen.ellipse(e,r,n,i,a);return this.draw(s)}circle(e,r,n,i){let a=this.gen.circle(e,r,n,i);return this.draw(a)}linearPath(e,r){let n=this.gen.linearPath(e,r);return this.draw(n)}polygon(e,r){let n=this.gen.polygon(e,r);return this.draw(n)}arc(e,r,n,i,a,s,o=!1,l){let u=this.gen.arc(e,r,n,i,a,s,o,l);return this.draw(u)}curve(e,r){let n=this.gen.curve(e,r);return this.draw(n)}path(e,r){let n=this.gen.path(e,r);return this.draw(n)}},xt={canvas:(t,e)=>new MF(t,e),svg:(t,e)=>new NF(t,e),generator:t=>new ry(t),newSeed:()=>ry.newSeed()}});function fn(t){let e=t.map((r,n)=>`${n===0?"M":"L"}${r.x},${r.y}`);return e.push("Z"),e.join(" ")}function _d(t,e,r,n,i,a){let s=[],l=r-t,u=n-e,h=l/a,f=2*Math.PI/h,d=e+u/2;for(let p=0;p<=50;p++){let m=p/50,g=t+m*l,y=d+i*Math.sin(f*(g-t));s.push({x:g,y})}return s}function zF(t,e,r,n,i,a){let s=[],o=i*Math.PI/180,h=(a*Math.PI/180-o)/(n-1);for(let f=0;f"+n+""),tfe(r,t.labelStyle),r.style("display","inline-block"),r.style("padding-right","1px"),r.style("white-space","nowrap"),r.attr("xmlns","http://www.w3.org/1999/xhtml"),e.node()}function sfe(t,e){return t.intersect(e)}function ofe(t,e,r,n){var i=t.x,a=t.y,s=i-n.x,o=a-n.y,l=Math.sqrt(e*e*o*o+r*r*s*s),u=Math.abs(e*r*s/l);n.x0}function hfe(t,e,r){let n=t.x,i=t.y,a=[],s=Number.POSITIVE_INFINITY,o=Number.POSITIVE_INFINITY;typeof e.forEach=="function"?e.forEach(function(h){s=Math.min(s,h.x),o=Math.min(o,h.y)}):(s=Math.min(s,e.x),o=Math.min(o,e.y));let l=n-t.width/2-s,u=i-t.height/2-o;for(let h=0;h1&&a.sort(function(h,f){let d=h.x-r.x,p=h.y-r.y,m=Math.sqrt(d*d+p*p),g=f.x-r.x,y=f.y-r.y,v=Math.sqrt(g*g+y*y);return mh,":first-child");return f.attr("class","anchor").attr("style",Vs(o)),ur(e,f),e.intersect=function(d){return he.info("Circle intersect",e,s,d),or.circle(e,s,d)},a}function FF(t,e,r,n,i,a,s){let l=(t+r)/2,u=(e+n)/2,h=Math.atan2(n-e,r-t),f=(r-t)/2,d=(n-e)/2,p=f/i,m=d/a,g=Math.sqrt(p**2+m**2);if(g>1)throw new Error("The given radii are too small to create an arc between the points.");let y=Math.sqrt(1-g**2),v=l+y*a*Math.sin(h)*(s?-1:1),x=u-y*i*Math.cos(h)*(s?-1:1),k=Math.atan2((e-x)/a,(t-v)/i),T=Math.atan2((n-x)/a,(r-v)/i)-k;s&&T<0&&(T+=2*Math.PI),!s&&T>0&&(T-=2*Math.PI);let S=[];for(let R=0;R<20;R++){let A=R/19,I=k+A*T,P=v+i*Math.cos(I),O=x+a*Math.sin(I);S.push({x:P,y:O})}return S}async function dfe(t,e){let{labelStyles:r,nodeStyles:n}=dr(e);e.labelStyle=r;let{shapeSvg:i,bbox:a}=await _r(t,e,Sr(e)),s=a.width+e.padding+20,o=a.height+e.padding,l=o/2,u=l/(2.5+o/50),{cssStyles:h}=e,f=[{x:s/2,y:-o/2},{x:-s/2,y:-o/2},...FF(-s/2,-o/2,-s/2,o/2,u,l,!1),{x:s/2,y:o/2},...FF(s/2,o/2,s/2,-o/2,u,l,!0)],d=xt.svg(i),p=cr(e,{});e.look!=="handDrawn"&&(p.roughness=0,p.fillStyle="solid");let m=fn(f),g=d.path(m,p),y=i.insert(()=>g,":first-child");return y.attr("class","basic label-container"),h&&e.look!=="handDrawn"&&y.selectAll("path").attr("style",h),n&&e.look!=="handDrawn"&&y.selectAll("path").attr("style",n),y.attr("transform",`translate(${u/2}, 0)`),ur(e,y),e.intersect=function(v){return or.polygon(e,f,v)},i}function Yh(t,e,r,n){return t.insert("polygon",":first-child").attr("points",n.map(function(i){return i.x+","+i.y}).join(" ")).attr("class","label-container").attr("transform","translate("+-e/2+","+r/2+")")}async function pfe(t,e){let{labelStyles:r,nodeStyles:n}=dr(e);e.labelStyle=r;let{shapeSvg:i,bbox:a}=await _r(t,e,Sr(e)),s=a.height+e.padding,o=12,l=a.width+e.padding+o,u=0,h=l,f=-s,d=0,p=[{x:u+o,y:f},{x:h,y:f},{x:h,y:d},{x:u,y:d},{x:u,y:f+o},{x:u+o,y:f}],m,{cssStyles:g}=e;if(e.look==="handDrawn"){let y=xt.svg(i),v=cr(e,{}),x=fn(p),k=y.path(x,v);m=i.insert(()=>k,":first-child").attr("transform",`translate(${-l/2}, ${s/2})`),g&&m.attr("style",g)}else m=Yh(i,l,s,p);return n&&m.attr("style",n),ur(e,m),e.intersect=function(y){return or.polygon(e,p,y)},i}function mfe(t,e){let{nodeStyles:r}=dr(e);e.label="";let n=t.insert("g").attr("class",Sr(e)).attr("id",e.domId??e.id),{cssStyles:i}=e,a=Math.max(28,e.width??0),s=[{x:0,y:a/2},{x:a/2,y:0},{x:0,y:-a/2},{x:-a/2,y:0}],o=xt.svg(n),l=cr(e,{});e.look!=="handDrawn"&&(l.roughness=0,l.fillStyle="solid");let u=fn(s),h=o.path(u,l),f=n.insert(()=>h,":first-child");return i&&e.look!=="handDrawn"&&f.selectAll("path").attr("style",i),r&&e.look!=="handDrawn"&&f.selectAll("path").attr("style",r),e.width=28,e.height=28,e.intersect=function(d){return or.polygon(e,s,d)},n}async function gfe(t,e){let{labelStyles:r,nodeStyles:n}=dr(e);e.labelStyle=r;let{shapeSvg:i,bbox:a,halfPadding:s}=await _r(t,e,Sr(e)),o=a.width/2+s,l,{cssStyles:u}=e;if(e.look==="handDrawn"){let h=xt.svg(i),f=cr(e,{}),d=h.circle(0,0,o*2,f);l=i.insert(()=>d,":first-child"),l.attr("class","basic label-container").attr("style",Vs(u))}else l=i.insert("circle",":first-child").attr("class","basic label-container").attr("style",n).attr("r",o).attr("cx",0).attr("cy",0);return ur(e,l),e.intersect=function(h){return he.info("Circle intersect",e,o,h),or.circle(e,o,h)},i}function yfe(t){let e=Math.cos(Math.PI/4),r=Math.sin(Math.PI/4),n=t*2,i={x:n/2*e,y:n/2*r},a={x:-(n/2)*e,y:n/2*r},s={x:-(n/2)*e,y:-(n/2)*r},o={x:n/2*e,y:-(n/2)*r};return`M ${a.x},${a.y} L ${o.x},${o.y} + M ${i.x},${i.y} L ${s.x},${s.y}`}function vfe(t,e){let{labelStyles:r,nodeStyles:n}=dr(e);e.labelStyle=r,e.label="";let i=t.insert("g").attr("class",Sr(e)).attr("id",e.domId??e.id),a=Math.max(30,e?.width??0),{cssStyles:s}=e,o=xt.svg(i),l=cr(e,{});e.look!=="handDrawn"&&(l.roughness=0,l.fillStyle="solid");let u=o.circle(0,0,a*2,l),h=yfe(a),f=o.path(h,l),d=i.insert(()=>u,":first-child");return d.insert(()=>f),s&&e.look!=="handDrawn"&&d.selectAll("path").attr("style",s),n&&e.look!=="handDrawn"&&d.selectAll("path").attr("style",n),ur(e,d),e.intersect=function(p){return he.info("crossedCircle intersect",e,{radius:a,point:p}),or.circle(e,a,p)},i}function Hh(t,e,r,n=100,i=0,a=180){let s=[],o=i*Math.PI/180,h=(a*Math.PI/180-o)/(n-1);for(let f=0;fk,":first-child").attr("stroke-opacity",0),_.insert(()=>v,":first-child"),_.attr("class","text"),h&&e.look!=="handDrawn"&&_.selectAll("path").attr("style",h),n&&e.look!=="handDrawn"&&_.selectAll("path").attr("style",n),_.attr("transform",`translate(${u}, 0)`),s.attr("transform",`translate(${-o/2+u-(a.x-(a.left??0))},${-l/2+(e.padding??0)/2-(a.y-(a.top??0))})`),ur(e,_),e.intersect=function(T){return or.polygon(e,d,T)},i}function Vh(t,e,r,n=100,i=0,a=180){let s=[],o=i*Math.PI/180,h=(a*Math.PI/180-o)/(n-1);for(let f=0;fk,":first-child").attr("stroke-opacity",0),_.insert(()=>v,":first-child"),_.attr("class","text"),h&&e.look!=="handDrawn"&&_.selectAll("path").attr("style",h),n&&e.look!=="handDrawn"&&_.selectAll("path").attr("style",n),_.attr("transform",`translate(${-u}, 0)`),s.attr("transform",`translate(${-o/2+(e.padding??0)/2-(a.x-(a.left??0))},${-l/2+(e.padding??0)/2-(a.y-(a.top??0))})`),ur(e,_),e.intersect=function(T){return or.polygon(e,d,T)},i}function Ls(t,e,r,n=100,i=0,a=180){let s=[],o=i*Math.PI/180,h=(a*Math.PI/180-o)/(n-1);for(let f=0;fR,":first-child").attr("stroke-opacity",0),A.insert(()=>x,":first-child"),A.insert(()=>T,":first-child"),A.attr("class","text"),h&&e.look!=="handDrawn"&&A.selectAll("path").attr("style",h),n&&e.look!=="handDrawn"&&A.selectAll("path").attr("style",n),A.attr("transform",`translate(${u-u/4}, 0)`),s.attr("transform",`translate(${-o/2+(e.padding??0)/2-(a.x-(a.left??0))},${-l/2+(e.padding??0)/2-(a.y-(a.top??0))})`),ur(e,A),e.intersect=function(I){return or.polygon(e,p,I)},i}async function kfe(t,e){let{labelStyles:r,nodeStyles:n}=dr(e);e.labelStyle=r;let{shapeSvg:i,bbox:a}=await _r(t,e,Sr(e)),s=80,o=20,l=Math.max(s,(a.width+(e.padding??0)*2)*1.25,e?.width??0),u=Math.max(o,a.height+(e.padding??0)*2,e?.height??0),h=u/2,{cssStyles:f}=e,d=xt.svg(i),p=cr(e,{});e.look!=="handDrawn"&&(p.roughness=0,p.fillStyle="solid");let m=l,g=u,y=m-h,v=g/4,x=[{x:y,y:0},{x:v,y:0},{x:0,y:g/2},{x:v,y:g},{x:y,y:g},...zF(-y,-g/2,h,50,270,90)],k=fn(x),_=d.path(k,p),T=i.insert(()=>_,":first-child");return T.attr("class","basic label-container"),f&&e.look!=="handDrawn"&&T.selectChildren("path").attr("style",f),n&&e.look!=="handDrawn"&&T.selectChildren("path").attr("style",n),T.attr("transform",`translate(${-l/2}, ${-u/2})`),ur(e,T),e.intersect=function(S){return or.polygon(e,x,S)},i}async function Tfe(t,e){let{labelStyles:r,nodeStyles:n}=dr(e);e.labelStyle=r;let{shapeSvg:i,bbox:a,label:s}=await _r(t,e,Sr(e)),o=Math.max(a.width+e.padding,e.width??0),l=o/2,u=l/(2.5+o/50),h=Math.max(a.height+u+e.padding,e.height??0),f,{cssStyles:d}=e;if(e.look==="handDrawn"){let p=xt.svg(i),m=iJe(0,0,o,h,l,u),g=aJe(0,u,o,h,l,u),y=p.path(m,cr(e,{})),v=p.path(g,cr(e,{fill:"none"}));f=i.insert(()=>v,":first-child"),f=i.insert(()=>y,":first-child"),f.attr("class","basic label-container"),d&&f.attr("style",d)}else{let p=nJe(0,0,o,h,l,u);f=i.insert("path",":first-child").attr("d",p).attr("class","basic label-container").attr("style",Vs(d)).attr("style",n)}return f.attr("label-offset-y",u),f.attr("transform",`translate(${-o/2}, ${-(h/2+u)})`),ur(e,f),s.attr("transform",`translate(${-(a.width/2)-(a.x-(a.left??0))}, ${-(a.height/2)+(e.padding??0)/1.5-(a.y-(a.top??0))})`),e.intersect=function(p){let m=or.rect(e,p),g=m.x-(e.x??0);if(l!=0&&(Math.abs(g)<(e.width??0)/2||Math.abs(g)==(e.width??0)/2&&Math.abs(m.y-(e.y??0))>(e.height??0)/2-u)){let y=u*u*(1-g*g/(l*l));y>0&&(y=Math.sqrt(y)),y=u-y,p.y-(e.y??0)>0&&(y=-y),m.y+=y}return m},i}async function Efe(t,e){let{labelStyles:r,nodeStyles:n}=dr(e);e.labelStyle=r;let{shapeSvg:i,bbox:a,label:s}=await _r(t,e,Sr(e)),o=a.width+e.padding,l=a.height+e.padding,u=l*.2,h=-o/2,f=-l/2-u/2,{cssStyles:d}=e,p=xt.svg(i),m=cr(e,{});e.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");let g=[{x:h,y:f+u},{x:-h,y:f+u},{x:-h,y:-f},{x:h,y:-f},{x:h,y:f},{x:-h,y:f},{x:-h,y:f+u}],y=p.polygon(g.map(x=>[x.x,x.y]),m),v=i.insert(()=>y,":first-child");return v.attr("class","basic label-container"),d&&e.look!=="handDrawn"&&v.selectAll("path").attr("style",d),n&&e.look!=="handDrawn"&&v.selectAll("path").attr("style",n),s.attr("transform",`translate(${h+(e.padding??0)/2-(a.x-(a.left??0))}, ${f+u+(e.padding??0)/2-(a.y-(a.top??0))})`),ur(e,v),e.intersect=function(x){return or.rect(e,x)},i}async function Sfe(t,e){let{labelStyles:r,nodeStyles:n}=dr(e);e.labelStyle=r;let{shapeSvg:i,bbox:a,halfPadding:s}=await _r(t,e,Sr(e)),l=a.width/2+s+5,u=a.width/2+s,h,{cssStyles:f}=e;if(e.look==="handDrawn"){let d=xt.svg(i),p=cr(e,{roughness:.2,strokeWidth:2.5}),m=cr(e,{roughness:.2,strokeWidth:1.5}),g=d.circle(0,0,l*2,p),y=d.circle(0,0,u*2,m);h=i.insert("g",":first-child"),h.attr("class",Vs(e.cssClasses)).attr("style",Vs(f)),h.node()?.appendChild(g),h.node()?.appendChild(y)}else{h=i.insert("g",":first-child");let d=h.insert("circle",":first-child"),p=h.insert("circle");h.attr("class","basic label-container").attr("style",n),d.attr("class","outer-circle").attr("style",n).attr("r",l).attr("cx",0).attr("cy",0),p.attr("class","inner-circle").attr("style",n).attr("r",u).attr("cx",0).attr("cy",0)}return ur(e,h),e.intersect=function(d){return he.info("DoubleCircle intersect",e,l,d),or.circle(e,l,d)},i}function Cfe(t,e,{config:{themeVariables:r}}){let{labelStyles:n,nodeStyles:i}=dr(e);e.label="",e.labelStyle=n;let a=t.insert("g").attr("class",Sr(e)).attr("id",e.domId??e.id),s=7,{cssStyles:o}=e,l=xt.svg(a),{nodeBorder:u}=r,h=cr(e,{fillStyle:"solid"});e.look!=="handDrawn"&&(h.roughness=0);let f=l.circle(0,0,s*2,h),d=a.insert(()=>f,":first-child");return d.selectAll("path").attr("style",`fill: ${u} !important;`),o&&o.length>0&&e.look!=="handDrawn"&&d.selectAll("path").attr("style",o),i&&e.look!=="handDrawn"&&d.selectAll("path").attr("style",i),ur(e,d),e.intersect=function(p){return he.info("filledCircle intersect",e,{radius:s,point:p}),or.circle(e,s,p)},a}async function _fe(t,e){let{labelStyles:r,nodeStyles:n}=dr(e);e.labelStyle=r;let{shapeSvg:i,bbox:a,label:s}=await _r(t,e,Sr(e)),o=a.width+(e.padding??0),l=o+a.height,u=o+a.height,h=[{x:0,y:-l},{x:u,y:-l},{x:u/2,y:0}],{cssStyles:f}=e,d=xt.svg(i),p=cr(e,{});e.look!=="handDrawn"&&(p.roughness=0,p.fillStyle="solid");let m=fn(h),g=d.path(m,p),y=i.insert(()=>g,":first-child").attr("transform",`translate(${-l/2}, ${l/2})`);return f&&e.look!=="handDrawn"&&y.selectChildren("path").attr("style",f),n&&e.look!=="handDrawn"&&y.selectChildren("path").attr("style",n),e.width=o,e.height=l,ur(e,y),s.attr("transform",`translate(${-a.width/2-(a.x-(a.left??0))}, ${-l/2+(e.padding??0)/2+(a.y-(a.top??0))})`),e.intersect=function(v){return he.info("Triangle intersect",e,h,v),or.polygon(e,h,v)},i}function Afe(t,e,{dir:r,config:{state:n,themeVariables:i}}){let{nodeStyles:a}=dr(e);e.label="";let s=t.insert("g").attr("class",Sr(e)).attr("id",e.domId??e.id),{cssStyles:o}=e,l=Math.max(70,e?.width??0),u=Math.max(10,e?.height??0);r==="LR"&&(l=Math.max(10,e?.width??0),u=Math.max(70,e?.height??0));let h=-1*l/2,f=-1*u/2,d=xt.svg(s),p=cr(e,{stroke:i.lineColor,fill:i.lineColor});e.look!=="handDrawn"&&(p.roughness=0,p.fillStyle="solid");let m=d.rectangle(h,f,l,u,p),g=s.insert(()=>m,":first-child");o&&e.look!=="handDrawn"&&g.selectAll("path").attr("style",o),a&&e.look!=="handDrawn"&&g.selectAll("path").attr("style",a),ur(e,g);let y=n?.padding??0;return e.width&&e.height&&(e.width+=y/2||0,e.height+=y/2||0),e.intersect=function(v){return or.rect(e,v)},s}async function Lfe(t,e){let{labelStyles:r,nodeStyles:n}=dr(e);e.labelStyle=r;let i=80,a=50,{shapeSvg:s,bbox:o}=await _r(t,e,Sr(e)),l=Math.max(i,o.width+(e.padding??0)*2,e?.width??0),u=Math.max(a,o.height+(e.padding??0)*2,e?.height??0),h=u/2,{cssStyles:f}=e,d=xt.svg(s),p=cr(e,{});e.look!=="handDrawn"&&(p.roughness=0,p.fillStyle="solid");let m=[{x:-l/2,y:-u/2},{x:l/2-h,y:-u/2},...zF(-l/2+h,0,h,50,90,270),{x:l/2-h,y:u/2},{x:-l/2,y:u/2}],g=fn(m),y=d.path(g,p),v=s.insert(()=>y,":first-child");return v.attr("class","basic label-container"),f&&e.look!=="handDrawn"&&v.selectChildren("path").attr("style",f),n&&e.look!=="handDrawn"&&v.selectChildren("path").attr("style",n),ur(e,v),e.intersect=function(x){return he.info("Pill intersect",e,{radius:h,point:x}),or.polygon(e,m,x)},s}async function Rfe(t,e){let{labelStyles:r,nodeStyles:n}=dr(e);e.labelStyle=r;let{shapeSvg:i,bbox:a}=await _r(t,e,Sr(e)),s=4,o=a.height+e.padding,l=o/s,u=a.width+2*l+e.padding,h=[{x:l,y:0},{x:u-l,y:0},{x:u,y:-o/2},{x:u-l,y:-o},{x:l,y:-o},{x:0,y:-o/2}],f,{cssStyles:d}=e;if(e.look==="handDrawn"){let p=xt.svg(i),m=cr(e,{}),g=sJe(0,0,u,o,l),y=p.path(g,m);f=i.insert(()=>y,":first-child").attr("transform",`translate(${-u/2}, ${o/2})`),d&&f.attr("style",d)}else f=Yh(i,u,o,h);return n&&f.attr("style",n),e.width=u,e.height=o,ur(e,f),e.intersect=function(p){return or.polygon(e,h,p)},i}async function Dfe(t,e){let{labelStyles:r,nodeStyles:n}=dr(e);e.label="",e.labelStyle=r;let{shapeSvg:i}=await _r(t,e,Sr(e)),a=Math.max(30,e?.width??0),s=Math.max(30,e?.height??0),{cssStyles:o}=e,l=xt.svg(i),u=cr(e,{});e.look!=="handDrawn"&&(u.roughness=0,u.fillStyle="solid");let h=[{x:0,y:0},{x:a,y:0},{x:0,y:s},{x:a,y:s}],f=fn(h),d=l.path(f,u),p=i.insert(()=>d,":first-child");return p.attr("class","basic label-container"),o&&e.look!=="handDrawn"&&p.selectChildren("path").attr("style",o),n&&e.look!=="handDrawn"&&p.selectChildren("path").attr("style",n),p.attr("transform",`translate(${-a/2}, ${-s/2})`),ur(e,p),e.intersect=function(m){return he.info("Pill intersect",e,{points:h}),or.polygon(e,h,m)},i}async function Ife(t,e,{config:{themeVariables:r,flowchart:n}}){let{labelStyles:i}=dr(e);e.labelStyle=i;let a=e.assetHeight??48,s=e.assetWidth??48,o=Math.max(a,s),l=n?.wrappingWidth;e.width=Math.max(o,l??0);let{shapeSvg:u,bbox:h,label:f}=await _r(t,e,"icon-shape default"),d=e.pos==="t",p=o,m=o,{nodeBorder:g}=r,{stylesMap:y}=ay(e),v=-m/2,x=-p/2,k=e.label?8:0,_=xt.svg(u),T=cr(e,{stroke:"none",fill:"none"});e.look!=="handDrawn"&&(T.roughness=0,T.fillStyle="solid");let S=_.rectangle(v,x,m,p,T),R=Math.max(m,h.width),A=p+h.height+k,I=_.rectangle(-R/2,-A/2,R,A,{...T,fill:"transparent",stroke:"none"}),P=u.insert(()=>S,":first-child"),O=u.insert(()=>I);if(e.icon){let C=u.append("g");C.html(`${await _h(e.icon,{height:o,width:o,fallbackPrefix:""})}`);let N=C.node().getBBox(),B=N.width,F=N.height,M=N.x,$=N.y;C.attr("transform",`translate(${-B/2-M},${d?h.height/2+k/2-F/2-$:-h.height/2-k/2-F/2-$})`),C.attr("style",`color: ${y.get("stroke")??g};`)}return f.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))},${d?-A/2:A/2-h.height})`),P.attr("transform",`translate(0,${d?h.height/2+k/2:-h.height/2-k/2})`),ur(e,O),e.intersect=function(C){if(he.info("iconSquare intersect",e,C),!e.label)return or.rect(e,C);let N=e.x??0,B=e.y??0,F=e.height??0,M=[];return d?M=[{x:N-h.width/2,y:B-F/2},{x:N+h.width/2,y:B-F/2},{x:N+h.width/2,y:B-F/2+h.height+k},{x:N+m/2,y:B-F/2+h.height+k},{x:N+m/2,y:B+F/2},{x:N-m/2,y:B+F/2},{x:N-m/2,y:B-F/2+h.height+k},{x:N-h.width/2,y:B-F/2+h.height+k}]:M=[{x:N-m/2,y:B-F/2},{x:N+m/2,y:B-F/2},{x:N+m/2,y:B-F/2+p},{x:N+h.width/2,y:B-F/2+p},{x:N+h.width/2/2,y:B+F/2},{x:N-h.width/2,y:B+F/2},{x:N-h.width/2,y:B-F/2+p},{x:N-m/2,y:B-F/2+p}],or.polygon(e,M,C)},u}async function Mfe(t,e,{config:{themeVariables:r,flowchart:n}}){let{labelStyles:i}=dr(e);e.labelStyle=i;let a=e.assetHeight??48,s=e.assetWidth??48,o=Math.max(a,s),l=n?.wrappingWidth;e.width=Math.max(o,l??0);let{shapeSvg:u,bbox:h,label:f}=await _r(t,e,"icon-shape default"),d=20,p=e.label?8:0,m=e.pos==="t",{nodeBorder:g,mainBkg:y}=r,{stylesMap:v}=ay(e),x=xt.svg(u),k=cr(e,{});e.look!=="handDrawn"&&(k.roughness=0,k.fillStyle="solid");let _=v.get("fill");k.stroke=_??y;let T=u.append("g");e.icon&&T.html(`${await _h(e.icon,{height:o,width:o,fallbackPrefix:""})}`);let S=T.node().getBBox(),R=S.width,A=S.height,I=S.x,P=S.y,O=Math.max(R,A)*Math.SQRT2+d*2,C=x.circle(0,0,O,k),N=Math.max(O,h.width),B=O+h.height+p,F=x.rectangle(-N/2,-B/2,N,B,{...k,fill:"transparent",stroke:"none"}),M=u.insert(()=>C,":first-child"),$=u.insert(()=>F);return T.attr("transform",`translate(${-R/2-I},${m?h.height/2+p/2-A/2-P:-h.height/2-p/2-A/2-P})`),T.attr("style",`color: ${v.get("stroke")??g};`),f.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))},${m?-B/2:B/2-h.height})`),M.attr("transform",`translate(0,${m?h.height/2+p/2:-h.height/2-p/2})`),ur(e,$),e.intersect=function(z){return he.info("iconSquare intersect",e,z),or.rect(e,z)},u}async function Nfe(t,e,{config:{themeVariables:r,flowchart:n}}){let{labelStyles:i}=dr(e);e.labelStyle=i;let a=e.assetHeight??48,s=e.assetWidth??48,o=Math.max(a,s),l=n?.wrappingWidth;e.width=Math.max(o,l??0);let{shapeSvg:u,bbox:h,halfPadding:f,label:d}=await _r(t,e,"icon-shape default"),p=e.pos==="t",m=o+f*2,g=o+f*2,{nodeBorder:y,mainBkg:v}=r,{stylesMap:x}=ay(e),k=-g/2,_=-m/2,T=e.label?8:0,S=xt.svg(u),R=cr(e,{});e.look!=="handDrawn"&&(R.roughness=0,R.fillStyle="solid");let A=x.get("fill");R.stroke=A??v;let I=S.path(Wh(k,_,g,m,5),R),P=Math.max(g,h.width),O=m+h.height+T,C=S.rectangle(-P/2,-O/2,P,O,{...R,fill:"transparent",stroke:"none"}),N=u.insert(()=>I,":first-child").attr("class","icon-shape2"),B=u.insert(()=>C);if(e.icon){let F=u.append("g");F.html(`${await _h(e.icon,{height:o,width:o,fallbackPrefix:""})}`);let M=F.node().getBBox(),$=M.width,z=M.height,q=M.x,V=M.y;F.attr("transform",`translate(${-$/2-q},${p?h.height/2+T/2-z/2-V:-h.height/2-T/2-z/2-V})`),F.attr("style",`color: ${x.get("stroke")??y};`)}return d.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))},${p?-O/2:O/2-h.height})`),N.attr("transform",`translate(0,${p?h.height/2+T/2:-h.height/2-T/2})`),ur(e,B),e.intersect=function(F){if(he.info("iconSquare intersect",e,F),!e.label)return or.rect(e,F);let M=e.x??0,$=e.y??0,z=e.height??0,q=[];return p?q=[{x:M-h.width/2,y:$-z/2},{x:M+h.width/2,y:$-z/2},{x:M+h.width/2,y:$-z/2+h.height+T},{x:M+g/2,y:$-z/2+h.height+T},{x:M+g/2,y:$+z/2},{x:M-g/2,y:$+z/2},{x:M-g/2,y:$-z/2+h.height+T},{x:M-h.width/2,y:$-z/2+h.height+T}]:q=[{x:M-g/2,y:$-z/2},{x:M+g/2,y:$-z/2},{x:M+g/2,y:$-z/2+m},{x:M+h.width/2,y:$-z/2+m},{x:M+h.width/2/2,y:$+z/2},{x:M-h.width/2,y:$+z/2},{x:M-h.width/2,y:$-z/2+m},{x:M-g/2,y:$-z/2+m}],or.polygon(e,q,F)},u}async function Ofe(t,e,{config:{themeVariables:r,flowchart:n}}){let{labelStyles:i}=dr(e);e.labelStyle=i;let a=e.assetHeight??48,s=e.assetWidth??48,o=Math.max(a,s),l=n?.wrappingWidth;e.width=Math.max(o,l??0);let{shapeSvg:u,bbox:h,halfPadding:f,label:d}=await _r(t,e,"icon-shape default"),p=e.pos==="t",m=o+f*2,g=o+f*2,{nodeBorder:y,mainBkg:v}=r,{stylesMap:x}=ay(e),k=-g/2,_=-m/2,T=e.label?8:0,S=xt.svg(u),R=cr(e,{});e.look!=="handDrawn"&&(R.roughness=0,R.fillStyle="solid");let A=x.get("fill");R.stroke=A??v;let I=S.path(Wh(k,_,g,m,.1),R),P=Math.max(g,h.width),O=m+h.height+T,C=S.rectangle(-P/2,-O/2,P,O,{...R,fill:"transparent",stroke:"none"}),N=u.insert(()=>I,":first-child"),B=u.insert(()=>C);if(e.icon){let F=u.append("g");F.html(`${await _h(e.icon,{height:o,width:o,fallbackPrefix:""})}`);let M=F.node().getBBox(),$=M.width,z=M.height,q=M.x,V=M.y;F.attr("transform",`translate(${-$/2-q},${p?h.height/2+T/2-z/2-V:-h.height/2-T/2-z/2-V})`),F.attr("style",`color: ${x.get("stroke")??y};`)}return d.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))},${p?-O/2:O/2-h.height})`),N.attr("transform",`translate(0,${p?h.height/2+T/2:-h.height/2-T/2})`),ur(e,B),e.intersect=function(F){if(he.info("iconSquare intersect",e,F),!e.label)return or.rect(e,F);let M=e.x??0,$=e.y??0,z=e.height??0,q=[];return p?q=[{x:M-h.width/2,y:$-z/2},{x:M+h.width/2,y:$-z/2},{x:M+h.width/2,y:$-z/2+h.height+T},{x:M+g/2,y:$-z/2+h.height+T},{x:M+g/2,y:$+z/2},{x:M-g/2,y:$+z/2},{x:M-g/2,y:$-z/2+h.height+T},{x:M-h.width/2,y:$-z/2+h.height+T}]:q=[{x:M-g/2,y:$-z/2},{x:M+g/2,y:$-z/2},{x:M+g/2,y:$-z/2+m},{x:M+h.width/2,y:$-z/2+m},{x:M+h.width/2/2,y:$+z/2},{x:M-h.width/2,y:$+z/2},{x:M-h.width/2,y:$-z/2+m},{x:M-g/2,y:$-z/2+m}],or.polygon(e,q,F)},u}async function Pfe(t,e,{config:{flowchart:r}}){let n=new Image;n.src=e?.img??"",await n.decode();let i=Number(n.naturalWidth.toString().replace("px","")),a=Number(n.naturalHeight.toString().replace("px",""));e.imageAspectRatio=i/a;let{labelStyles:s}=dr(e);e.labelStyle=s;let o=r?.wrappingWidth;e.defaultWidth=r?.wrappingWidth;let l=Math.max(e.label?o??0:0,e?.assetWidth??i),u=e.constraint==="on"&&e?.assetHeight?e.assetHeight*e.imageAspectRatio:l,h=e.constraint==="on"?u/e.imageAspectRatio:e?.assetHeight??a;e.width=Math.max(u,o??0);let{shapeSvg:f,bbox:d,label:p}=await _r(t,e,"image-shape default"),m=e.pos==="t",g=-u/2,y=-h/2,v=e.label?8:0,x=xt.svg(f),k=cr(e,{});e.look!=="handDrawn"&&(k.roughness=0,k.fillStyle="solid");let _=x.rectangle(g,y,u,h,k),T=Math.max(u,d.width),S=h+d.height+v,R=x.rectangle(-T/2,-S/2,T,S,{...k,fill:"none",stroke:"none"}),A=f.insert(()=>_,":first-child"),I=f.insert(()=>R);if(e.img){let P=f.append("image");P.attr("href",e.img),P.attr("width",u),P.attr("height",h),P.attr("preserveAspectRatio","none"),P.attr("transform",`translate(${-u/2},${m?S/2-h:-S/2})`)}return p.attr("transform",`translate(${-d.width/2-(d.x-(d.left??0))},${m?-h/2-d.height/2-v/2:h/2-d.height/2+v/2})`),A.attr("transform",`translate(0,${m?d.height/2+v/2:-d.height/2-v/2})`),ur(e,I),e.intersect=function(P){if(he.info("iconSquare intersect",e,P),!e.label)return or.rect(e,P);let O=e.x??0,C=e.y??0,N=e.height??0,B=[];return m?B=[{x:O-d.width/2,y:C-N/2},{x:O+d.width/2,y:C-N/2},{x:O+d.width/2,y:C-N/2+d.height+v},{x:O+u/2,y:C-N/2+d.height+v},{x:O+u/2,y:C+N/2},{x:O-u/2,y:C+N/2},{x:O-u/2,y:C-N/2+d.height+v},{x:O-d.width/2,y:C-N/2+d.height+v}]:B=[{x:O-u/2,y:C-N/2},{x:O+u/2,y:C-N/2},{x:O+u/2,y:C-N/2+h},{x:O+d.width/2,y:C-N/2+h},{x:O+d.width/2/2,y:C+N/2},{x:O-d.width/2,y:C+N/2},{x:O-d.width/2,y:C-N/2+h},{x:O-u/2,y:C-N/2+h}],or.polygon(e,B,P)},f}async function Bfe(t,e){let{labelStyles:r,nodeStyles:n}=dr(e);e.labelStyle=r;let{shapeSvg:i,bbox:a}=await _r(t,e,Sr(e)),s=Math.max(a.width+(e.padding??0)*2,e?.width??0),o=Math.max(a.height+(e.padding??0)*2,e?.height??0),l=[{x:0,y:0},{x:s,y:0},{x:s+3*o/6,y:-o},{x:-3*o/6,y:-o}],u,{cssStyles:h}=e;if(e.look==="handDrawn"){let f=xt.svg(i),d=cr(e,{}),p=fn(l),m=f.path(p,d);u=i.insert(()=>m,":first-child").attr("transform",`translate(${-s/2}, ${o/2})`),h&&u.attr("style",h)}else u=Yh(i,s,o,l);return n&&u.attr("style",n),e.width=s,e.height=o,ur(e,u),e.intersect=function(f){return or.polygon(e,l,f)},i}async function N5(t,e,r){let{labelStyles:n,nodeStyles:i}=dr(e);e.labelStyle=n;let{shapeSvg:a,bbox:s}=await _r(t,e,Sr(e)),o=Math.max(s.width+r.labelPaddingX*2,e?.width||0),l=Math.max(s.height+r.labelPaddingY*2,e?.height||0),u=-o/2,h=-l/2,f,{rx:d,ry:p}=e,{cssStyles:m}=e;if(r?.rx&&r.ry&&(d=r.rx,p=r.ry),e.look==="handDrawn"){let g=xt.svg(a),y=cr(e,{}),v=d||p?g.path(Wh(u,h,o,l,d||0),y):g.rectangle(u,h,o,l,y);f=a.insert(()=>v,":first-child"),f.attr("class","basic label-container").attr("style",Vs(m))}else f=a.insert("rect",":first-child"),f.attr("class","basic label-container").attr("style",i).attr("rx",Vs(d)).attr("ry",Vs(p)).attr("x",u).attr("y",h).attr("width",o).attr("height",l);return ur(e,f),e.intersect=function(g){return or.rect(e,g)},a}async function Ffe(t,e){let{shapeSvg:r,bbox:n,label:i}=await _r(t,e,"label"),a=r.insert("rect",":first-child");return a.attr("width",.1).attr("height",.1),r.attr("class","label edgeLabel"),i.attr("transform",`translate(${-(n.width/2)-(n.x-(n.left??0))}, ${-(n.height/2)-(n.y-(n.top??0))})`),ur(e,a),e.intersect=function(l){return or.rect(e,l)},r}async function zfe(t,e){let{labelStyles:r,nodeStyles:n}=dr(e);e.labelStyle=r;let{shapeSvg:i,bbox:a}=await _r(t,e,Sr(e)),s=Math.max(a.width+(e.padding??0),e?.width??0),o=Math.max(a.height+(e.padding??0),e?.height??0),l=[{x:0,y:0},{x:s+3*o/6,y:0},{x:s,y:-o},{x:-(3*o)/6,y:-o}],u,{cssStyles:h}=e;if(e.look==="handDrawn"){let f=xt.svg(i),d=cr(e,{}),p=fn(l),m=f.path(p,d);u=i.insert(()=>m,":first-child").attr("transform",`translate(${-s/2}, ${o/2})`),h&&u.attr("style",h)}else u=Yh(i,s,o,l);return n&&u.attr("style",n),e.width=s,e.height=o,ur(e,u),e.intersect=function(f){return or.polygon(e,l,f)},i}async function $fe(t,e){let{labelStyles:r,nodeStyles:n}=dr(e);e.labelStyle=r;let{shapeSvg:i,bbox:a}=await _r(t,e,Sr(e)),s=Math.max(a.width+(e.padding??0),e?.width??0),o=Math.max(a.height+(e.padding??0),e?.height??0),l=[{x:-3*o/6,y:0},{x:s,y:0},{x:s+3*o/6,y:-o},{x:0,y:-o}],u,{cssStyles:h}=e;if(e.look==="handDrawn"){let f=xt.svg(i),d=cr(e,{}),p=fn(l),m=f.path(p,d);u=i.insert(()=>m,":first-child").attr("transform",`translate(${-s/2}, ${o/2})`),h&&u.attr("style",h)}else u=Yh(i,s,o,l);return n&&u.attr("style",n),e.width=s,e.height=o,ur(e,u),e.intersect=function(f){return or.polygon(e,l,f)},i}function Gfe(t,e){let{labelStyles:r,nodeStyles:n}=dr(e);e.label="",e.labelStyle=r;let i=t.insert("g").attr("class",Sr(e)).attr("id",e.domId??e.id),{cssStyles:a}=e,s=Math.max(35,e?.width??0),o=Math.max(35,e?.height??0),l=7,u=[{x:s,y:0},{x:0,y:o+l/2},{x:s-2*l,y:o+l/2},{x:0,y:2*o},{x:s,y:o-l/2},{x:2*l,y:o-l/2}],h=xt.svg(i),f=cr(e,{});e.look!=="handDrawn"&&(f.roughness=0,f.fillStyle="solid");let d=fn(u),p=h.path(d,f),m=i.insert(()=>p,":first-child");return a&&e.look!=="handDrawn"&&m.selectAll("path").attr("style",a),n&&e.look!=="handDrawn"&&m.selectAll("path").attr("style",n),m.attr("transform",`translate(-${s/2},${-o})`),ur(e,m),e.intersect=function(g){return he.info("lightningBolt intersect",e,g),or.polygon(e,u,g)},i}async function qfe(t,e){let{labelStyles:r,nodeStyles:n}=dr(e);e.labelStyle=r;let{shapeSvg:i,bbox:a,label:s}=await _r(t,e,Sr(e)),o=Math.max(a.width+(e.padding??0),e.width??0),l=o/2,u=l/(2.5+o/50),h=Math.max(a.height+u+(e.padding??0),e.height??0),f=h*.1,d,{cssStyles:p}=e;if(e.look==="handDrawn"){let m=xt.svg(i),g=lJe(0,0,o,h,l,u,f),y=uJe(0,u,o,h,l,u),v=cr(e,{}),x=m.path(g,v),k=m.path(y,v);i.insert(()=>k,":first-child").attr("class","line"),d=i.insert(()=>x,":first-child"),d.attr("class","basic label-container"),p&&d.attr("style",p)}else{let m=oJe(0,0,o,h,l,u,f);d=i.insert("path",":first-child").attr("d",m).attr("class","basic label-container").attr("style",Vs(p)).attr("style",n)}return d.attr("label-offset-y",u),d.attr("transform",`translate(${-o/2}, ${-(h/2+u)})`),ur(e,d),s.attr("transform",`translate(${-(a.width/2)-(a.x-(a.left??0))}, ${-(a.height/2)+u-(a.y-(a.top??0))})`),e.intersect=function(m){let g=or.rect(e,m),y=g.x-(e.x??0);if(l!=0&&(Math.abs(y)<(e.width??0)/2||Math.abs(y)==(e.width??0)/2&&Math.abs(g.y-(e.y??0))>(e.height??0)/2-u)){let v=u*u*(1-y*y/(l*l));v>0&&(v=Math.sqrt(v)),v=u-v,m.y-(e.y??0)>0&&(v=-v),g.y+=v}return g},i}async function Ufe(t,e){let{labelStyles:r,nodeStyles:n}=dr(e);e.labelStyle=r;let{shapeSvg:i,bbox:a,label:s}=await _r(t,e,Sr(e)),o=Math.max(a.width+(e.padding??0)*2,e?.width??0),l=Math.max(a.height+(e.padding??0)*2,e?.height??0),u=l/4,h=l+u,{cssStyles:f}=e,d=xt.svg(i),p=cr(e,{});e.look!=="handDrawn"&&(p.roughness=0,p.fillStyle="solid");let m=[{x:-o/2-o/2*.1,y:-h/2},{x:-o/2-o/2*.1,y:h/2},..._d(-o/2-o/2*.1,h/2,o/2+o/2*.1,h/2,u,.8),{x:o/2+o/2*.1,y:-h/2},{x:-o/2-o/2*.1,y:-h/2},{x:-o/2,y:-h/2},{x:-o/2,y:h/2*1.1},{x:-o/2,y:-h/2}],g=d.polygon(m.map(v=>[v.x,v.y]),p),y=i.insert(()=>g,":first-child");return y.attr("class","basic label-container"),f&&e.look!=="handDrawn"&&y.selectAll("path").attr("style",f),n&&e.look!=="handDrawn"&&y.selectAll("path").attr("style",n),y.attr("transform",`translate(0,${-u/2})`),s.attr("transform",`translate(${-o/2+(e.padding??0)+o/2*.1/2-(a.x-(a.left??0))},${-l/2+(e.padding??0)-u/2-(a.y-(a.top??0))})`),ur(e,y),e.intersect=function(v){return or.polygon(e,m,v)},i}async function Hfe(t,e){let{labelStyles:r,nodeStyles:n}=dr(e);e.labelStyle=r;let{shapeSvg:i,bbox:a,label:s}=await _r(t,e,Sr(e)),o=Math.max(a.width+(e.padding??0)*2,e?.width??0),l=Math.max(a.height+(e.padding??0)*2,e?.height??0),u=5,h=-o/2,f=-l/2,{cssStyles:d}=e,p=xt.svg(i),m=cr(e,{}),g=[{x:h-u,y:f+u},{x:h-u,y:f+l+u},{x:h+o-u,y:f+l+u},{x:h+o-u,y:f+l},{x:h+o,y:f+l},{x:h+o,y:f+l-u},{x:h+o+u,y:f+l-u},{x:h+o+u,y:f-u},{x:h+u,y:f-u},{x:h+u,y:f},{x:h,y:f},{x:h,y:f+u}],y=[{x:h,y:f+u},{x:h+o-u,y:f+u},{x:h+o-u,y:f+l},{x:h+o,y:f+l},{x:h+o,y:f},{x:h,y:f}];e.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");let v=fn(g),x=p.path(v,m),k=fn(y),_=p.path(k,{...m,fill:"none"}),T=i.insert(()=>_,":first-child");return T.insert(()=>x,":first-child"),T.attr("class","basic label-container"),d&&e.look!=="handDrawn"&&T.selectAll("path").attr("style",d),n&&e.look!=="handDrawn"&&T.selectAll("path").attr("style",n),s.attr("transform",`translate(${-(a.width/2)-u-(a.x-(a.left??0))}, ${-(a.height/2)+u-(a.y-(a.top??0))})`),ur(e,T),e.intersect=function(S){return or.polygon(e,g,S)},i}async function Vfe(t,e){let{labelStyles:r,nodeStyles:n}=dr(e);e.labelStyle=r;let{shapeSvg:i,bbox:a,label:s}=await _r(t,e,Sr(e)),o=Math.max(a.width+(e.padding??0)*2,e?.width??0),l=Math.max(a.height+(e.padding??0)*2,e?.height??0),u=l/4,h=l+u,f=-o/2,d=-h/2,p=5,{cssStyles:m}=e,g=_d(f-p,d+h+p,f+o-p,d+h+p,u,.8),y=g?.[g.length-1],v=[{x:f-p,y:d+p},{x:f-p,y:d+h+p},...g,{x:f+o-p,y:y.y-p},{x:f+o,y:y.y-p},{x:f+o,y:y.y-2*p},{x:f+o+p,y:y.y-2*p},{x:f+o+p,y:d-p},{x:f+p,y:d-p},{x:f+p,y:d},{x:f,y:d},{x:f,y:d+p}],x=[{x:f,y:d+p},{x:f+o-p,y:d+p},{x:f+o-p,y:y.y-p},{x:f+o,y:y.y-p},{x:f+o,y:d},{x:f,y:d}],k=xt.svg(i),_=cr(e,{});e.look!=="handDrawn"&&(_.roughness=0,_.fillStyle="solid");let T=fn(v),S=k.path(T,_),R=fn(x),A=k.path(R,_),I=i.insert(()=>S,":first-child");return I.insert(()=>A),I.attr("class","basic label-container"),m&&e.look!=="handDrawn"&&I.selectAll("path").attr("style",m),n&&e.look!=="handDrawn"&&I.selectAll("path").attr("style",n),I.attr("transform",`translate(0,${-u/2})`),s.attr("transform",`translate(${-(a.width/2)-p-(a.x-(a.left??0))}, ${-(a.height/2)+p-u/2-(a.y-(a.top??0))})`),ur(e,I),e.intersect=function(P){return or.polygon(e,v,P)},i}async function Wfe(t,e,{config:{themeVariables:r}}){let{labelStyles:n,nodeStyles:i}=dr(e);e.labelStyle=n,e.useHtmlLabels||Yr().flowchart?.htmlLabels!==!1||(e.centerLabel=!0);let{shapeSvg:s,bbox:o}=await _r(t,e,Sr(e)),l=Math.max(o.width+(e.padding??0)*2,e?.width??0),u=Math.max(o.height+(e.padding??0)*2,e?.height??0),h=-l/2,f=-u/2,{cssStyles:d}=e,p=xt.svg(s),m=cr(e,{fill:r.noteBkgColor,stroke:r.noteBorderColor});e.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");let g=p.rectangle(h,f,l,u,m),y=s.insert(()=>g,":first-child");return y.attr("class","basic label-container"),d&&e.look!=="handDrawn"&&y.selectAll("path").attr("style",d),i&&e.look!=="handDrawn"&&y.selectAll("path").attr("style",i),ur(e,y),e.intersect=function(v){return or.rect(e,v)},s}async function Yfe(t,e){let{labelStyles:r,nodeStyles:n}=dr(e);e.labelStyle=r;let{shapeSvg:i,bbox:a}=await _r(t,e,Sr(e)),s=a.width+e.padding,o=a.height+e.padding,l=s+o,u=[{x:l/2,y:0},{x:l,y:-l/2},{x:l/2,y:-l},{x:0,y:-l/2}],h,{cssStyles:f}=e;if(e.look==="handDrawn"){let d=xt.svg(i),p=cr(e,{}),m=cJe(0,0,l),g=d.path(m,p);h=i.insert(()=>g,":first-child").attr("transform",`translate(${-l/2}, ${l/2})`),f&&h.attr("style",f)}else h=Yh(i,l,l,u);return n&&h.attr("style",n),ur(e,h),e.intersect=function(d){return he.debug(`APA12 Intersect called SPLIT point:`,d,` node: `,e,` -res:`,Ot.polygon(e,u,d)),Ot.polygon(e,u,d)},a}async function kce(t,e){let{labelStyles:r,nodeStyles:n}=qt(e);e.labelStyle=r;let{shapeSvg:a,bbox:i,label:s}=await rr(t,e,Jt(e)),o=Math.max(i.width+(e.padding??0),e?.width??0),l=Math.max(i.height+(e.padding??0),e?.height??0),u=-o/2,h=-l/2,f=h/2,d=[{x:u+f,y:h},{x:u,y:0},{x:u+f,y:-h},{x:-u,y:-h},{x:-u,y:h}],{cssStyles:p}=e,m=je.svg(a),g=zt(e,{});e.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");let v=Pr(d),y=m.path(v,g),b=a.insert(()=>y,":first-child");return b.attr("class","basic label-container"),p&&e.look!=="handDrawn"&&b.selectAll("path").attr("style",p),n&&e.look!=="handDrawn"&&b.selectAll("path").attr("style",n),b.attr("transform",`translate(${-f/2},0)`),s.attr("transform",`translate(${-f/2-i.width/2-(i.x-(i.left??0))}, ${-(i.height/2)-(i.y-(i.top??0))})`),Ft(e,b),e.intersect=function(w){return Ot.polygon(e,d,w)},a}async function Tce(t,e){let{labelStyles:r,nodeStyles:n}=qt(e);e.labelStyle=r;let a;e.cssClasses?a="node "+e.cssClasses:a="node default";let i=t.insert("g").attr("class",a).attr("id",e.domId||e.id),s=i.insert("g"),o=i.insert("g").attr("class","label").attr("style",n),l=e.description,u=e.label,h=o.node().appendChild(await bd(u,e.labelStyle,!0,!0)),f={width:0,height:0};if(Br(Te()?.flowchart?.htmlLabels)){let S=h.children[0],L=We(h);f=S.getBoundingClientRect(),L.attr("width",f.width),L.attr("height",f.height)}te.info("Text 2",l);let d=l||[],p=h.getBBox(),m=o.node().appendChild(await bd(d.join?d.join("
    "):d,e.labelStyle,!0,!0)),g=m.children[0],v=We(m);f=g.getBoundingClientRect(),v.attr("width",f.width),v.attr("height",f.height);let y=(e.padding||0)/2;We(m).attr("transform","translate( "+(f.width>p.width?0:(p.width-f.width)/2)+", "+(p.height+y+5)+")"),We(h).attr("transform","translate( "+(f.width(te.debug("Rough node insert CXC",M),D),":first-child"),E=i.insert(()=>(te.debug("Rough node insert CXC",M),M),":first-child")}else E=s.insert("rect",":first-child"),_=s.insert("line"),E.attr("class","outer title-state").attr("style",n).attr("x",-f.width/2-y).attr("y",-f.height/2-y).attr("width",f.width+(e.padding||0)).attr("height",f.height+(e.padding||0)),_.attr("class","divider").attr("x1",-f.width/2-y).attr("x2",f.width/2+y).attr("y1",-f.height/2-y+p.height+y).attr("y2",-f.height/2-y+p.height+y);return Ft(e,E),e.intersect=function(S){return Ot.rect(e,S)},i}async function Ece(t,e){let r={rx:5,ry:5,classes:"",labelPaddingX:(e?.padding||0)*1,labelPaddingY:(e?.padding||0)*1};return v3(t,e,r)}async function Cce(t,e){let{labelStyles:r,nodeStyles:n}=qt(e);e.labelStyle=r;let{shapeSvg:a,bbox:i,label:s}=await rr(t,e,Jt(e)),o=e?.padding??0,l=Math.max(i.width+(e.padding??0)*2,e?.width??0),u=Math.max(i.height+(e.padding??0)*2,e?.height??0),h=-i.width/2-o,f=-i.height/2-o,{cssStyles:d}=e,p=je.svg(a),m=zt(e,{});e.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");let g=[{x:h,y:f},{x:h+l+8,y:f},{x:h+l+8,y:f+u},{x:h-8,y:f+u},{x:h-8,y:f},{x:h,y:f},{x:h,y:f+u}],v=p.polygon(g.map(b=>[b.x,b.y]),m),y=a.insert(()=>v,":first-child");return y.attr("class","basic label-container").attr("style",ns(d)),n&&e.look!=="handDrawn"&&y.selectAll("path").attr("style",n),d&&e.look!=="handDrawn"&&y.selectAll("path").attr("style",n),s.attr("transform",`translate(${-l/2+4+(e.padding??0)-(i.x-(i.left??0))},${-u/2+(e.padding??0)-(i.y-(i.top??0))})`),Ft(e,y),e.intersect=function(b){return Ot.rect(e,b)},a}async function Sce(t,e){let{labelStyles:r,nodeStyles:n}=qt(e);e.labelStyle=r;let{shapeSvg:a,bbox:i,label:s}=await rr(t,e,Jt(e)),o=Math.max(i.width+(e.padding??0)*2,e?.width??0),l=Math.max(i.height+(e.padding??0)*2,e?.height??0),u=-o/2,h=-l/2,{cssStyles:f}=e,d=je.svg(a),p=zt(e,{});e.look!=="handDrawn"&&(p.roughness=0,p.fillStyle="solid");let m=[{x:u,y:h},{x:u,y:h+l},{x:u+o,y:h+l},{x:u+o,y:h-l/2}],g=Pr(m),v=d.path(g,p),y=a.insert(()=>v,":first-child");return y.attr("class","basic label-container"),f&&e.look!=="handDrawn"&&y.selectChildren("path").attr("style",f),n&&e.look!=="handDrawn"&&y.selectChildren("path").attr("style",n),y.attr("transform",`translate(0, ${l/4})`),s.attr("transform",`translate(${-o/2+(e.padding??0)-(i.x-(i.left??0))}, ${-l/4+(e.padding??0)-(i.y-(i.top??0))})`),Ft(e,y),e.intersect=function(b){return Ot.polygon(e,m,b)},a}async function _ce(t,e){let r={rx:0,ry:0,classes:"",labelPaddingX:(e?.padding||0)*2,labelPaddingY:(e?.padding||0)*1};return v3(t,e,r)}async function Ace(t,e){let{labelStyles:r,nodeStyles:n}=qt(e);e.labelStyle=r;let{shapeSvg:a,bbox:i}=await rr(t,e,Jt(e)),s=i.height+e.padding,o=i.width+s/4+e.padding,l,{cssStyles:u}=e;if(e.look==="handDrawn"){let h=je.svg(a),f=zt(e,{}),d=Gh(-o/2,-s/2,o,s,s/2),p=h.path(d,f);l=a.insert(()=>p,":first-child"),l.attr("class","basic label-container").attr("style",ns(u))}else l=a.insert("rect",":first-child"),l.attr("class","basic label-container").attr("style",n).attr("rx",s/2).attr("ry",s/2).attr("x",-o/2).attr("y",-s/2).attr("width",o).attr("height",s);return Ft(e,l),e.intersect=function(h){return Ot.rect(e,h)},a}async function Lce(t,e){return v3(t,e,{rx:5,ry:5,classes:"flowchart-node"})}function Rce(t,e,{config:{themeVariables:r}}){let{labelStyles:n,nodeStyles:a}=qt(e);e.labelStyle=n;let{cssStyles:i}=e,{lineColor:s,stateBorder:o,nodeBorder:l}=r,u=t.insert("g").attr("class","node default").attr("id",e.domId||e.id),h=je.svg(u),f=zt(e,{});e.look!=="handDrawn"&&(f.roughness=0,f.fillStyle="solid");let d=h.circle(0,0,14,{...f,stroke:s,strokeWidth:2}),p=o??l,m=h.circle(0,0,5,{...f,fill:p,stroke:p,strokeWidth:2,fillStyle:"solid"}),g=u.insert(()=>d,":first-child");return g.insert(()=>m),i&&g.selectAll("path").attr("style",i),a&&g.selectAll("path").attr("style",a),Ft(e,g),e.intersect=function(v){return Ot.circle(e,7,v)},u}function Ice(t,e,{config:{themeVariables:r}}){let{lineColor:n}=r,a=t.insert("g").attr("class","node default").attr("id",e.domId||e.id),i;if(e.look==="handDrawn"){let o=je.svg(a).circle(0,0,14,pXe(n));i=a.insert(()=>o),i.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14)}else i=a.insert("circle",":first-child"),i.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14);return Ft(e,i),e.intersect=function(s){return Ot.circle(e,7,s)},a}async function Dce(t,e){let{labelStyles:r,nodeStyles:n}=qt(e);e.labelStyle=r;let{shapeSvg:a,bbox:i}=await rr(t,e,Jt(e)),s=(e?.padding||0)/2,o=i.width+e.padding,l=i.height+e.padding,u=-i.width/2-s,h=-i.height/2-s,f=[{x:0,y:0},{x:o,y:0},{x:o,y:-l},{x:0,y:-l},{x:0,y:0},{x:-8,y:0},{x:o+8,y:0},{x:o+8,y:-l},{x:-8,y:-l},{x:-8,y:0}];if(e.look==="handDrawn"){let d=je.svg(a),p=zt(e,{}),m=d.rectangle(u-8,h,o+16,l,p),g=d.line(u,h,u,h+l,p),v=d.line(u+o,h,u+o,h+l,p);a.insert(()=>g,":first-child"),a.insert(()=>v,":first-child");let y=a.insert(()=>m,":first-child"),{cssStyles:b}=e;y.attr("class","basic label-container").attr("style",ns(b)),Ft(e,y)}else{let d=Uh(a,o,l,f);n&&d.attr("style",n),Ft(e,d)}return e.intersect=function(d){return Ot.polygon(e,f,d)},a}async function Nce(t,e){let{labelStyles:r,nodeStyles:n}=qt(e);e.labelStyle=r;let{shapeSvg:a,bbox:i}=await rr(t,e,Jt(e)),s=Math.max(i.width+(e.padding??0)*2,e?.width??0),o=Math.max(i.height+(e.padding??0)*2,e?.height??0),l=-s/2,u=-o/2,h=.2*o,f=.2*o,{cssStyles:d}=e,p=je.svg(a),m=zt(e,{}),g=[{x:l-h/2,y:u},{x:l+s+h/2,y:u},{x:l+s+h/2,y:u+o},{x:l-h/2,y:u+o}],v=[{x:l+s-h/2,y:u+o},{x:l+s+h/2,y:u+o},{x:l+s+h/2,y:u+o-f}];e.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");let y=Pr(g),b=p.path(y,m),w=Pr(v),C=p.path(w,{...m,fillStyle:"solid"}),k=a.insert(()=>C,":first-child");return k.insert(()=>b,":first-child"),k.attr("class","basic label-container"),d&&e.look!=="handDrawn"&&k.selectAll("path").attr("style",d),n&&e.look!=="handDrawn"&&k.selectAll("path").attr("style",n),Ft(e,k),e.intersect=function(E){return Ot.polygon(e,g,E)},a}async function Mce(t,e){let{labelStyles:r,nodeStyles:n}=qt(e);e.labelStyle=r;let{shapeSvg:a,bbox:i,label:s}=await rr(t,e,Jt(e)),o=Math.max(i.width+(e.padding??0)*2,e?.width??0),l=Math.max(i.height+(e.padding??0)*2,e?.height??0),u=l/4,h=.2*o,f=.2*l,d=l+u,{cssStyles:p}=e,m=je.svg(a),g=zt(e,{});e.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");let v=[{x:-o/2-o/2*.1,y:d/2},...xd(-o/2-o/2*.1,d/2,o/2+o/2*.1,d/2,u,.8),{x:o/2+o/2*.1,y:-d/2},{x:-o/2-o/2*.1,y:-d/2}],y=-o/2+o/2*.1,b=-d/2-f*.4,w=[{x:y+o-h,y:(b+l)*1.4},{x:y+o,y:b+l-f},{x:y+o,y:(b+l)*.9},...xd(y+o,(b+l)*1.3,y+o-h,(b+l)*1.5,-l*.03,.5)],C=Pr(v),k=m.path(C,g),E=Pr(w),_=m.path(E,{...g,fillStyle:"solid"}),S=a.insert(()=>_,":first-child");return S.insert(()=>k,":first-child"),S.attr("class","basic label-container"),p&&e.look!=="handDrawn"&&S.selectAll("path").attr("style",p),n&&e.look!=="handDrawn"&&S.selectAll("path").attr("style",n),S.attr("transform",`translate(0,${-u/2})`),s.attr("transform",`translate(${-o/2+(e.padding??0)-(i.x-(i.left??0))},${-l/2+(e.padding??0)-u/2-(i.y-(i.top??0))})`),Ft(e,S),e.intersect=function(L){return Ot.polygon(e,v,L)},a}async function Oce(t,e){let{labelStyles:r,nodeStyles:n}=qt(e);e.labelStyle=r;let{shapeSvg:a,bbox:i}=await rr(t,e,Jt(e)),s=Math.max(i.width+e.padding,e?.width||0),o=Math.max(i.height+e.padding,e?.height||0),l=-s/2,u=-o/2,h=a.insert("rect",":first-child");return h.attr("class","text").attr("style",n).attr("rx",0).attr("ry",0).attr("x",l).attr("y",u).attr("width",s).attr("height",o),Ft(e,h),e.intersect=function(f){return Ot.rect(e,f)},a}async function Pce(t,e){let{labelStyles:r,nodeStyles:n}=qt(e);e.labelStyle=r;let{shapeSvg:a,bbox:i,label:s,halfPadding:o}=await rr(t,e,Jt(e)),l=e.look==="neo"?o*2:o,u=i.height+l,h=u/2,f=h/(2.5+u/50),d=i.width+f+l,{cssStyles:p}=e,m;if(e.look==="handDrawn"){let g=je.svg(a),v=OXe(0,0,d,u,f,h),y=PXe(0,0,d,u,f,h),b=g.path(v,zt(e,{})),w=g.path(y,zt(e,{fill:"none"}));m=a.insert(()=>w,":first-child"),m=a.insert(()=>b,":first-child"),m.attr("class","basic label-container"),p&&m.attr("style",p)}else{let g=MXe(0,0,d,u,f,h);m=a.insert("path",":first-child").attr("d",g).attr("class","basic label-container").attr("style",ns(p)).attr("style",n),m.attr("class","basic label-container"),p&&m.selectAll("path").attr("style",p),n&&m.selectAll("path").attr("style",n)}return m.attr("label-offset-x",f),m.attr("transform",`translate(${-d/2}, ${u/2} )`),s.attr("transform",`translate(${-(i.width/2)-f-(i.x-(i.left??0))}, ${-(i.height/2)-(i.y-(i.top??0))})`),Ft(e,m),e.intersect=function(g){let v=Ot.rect(e,g),y=v.y-(e.y??0);if(h!=0&&(Math.abs(y)<(e.height??0)/2||Math.abs(y)==(e.height??0)/2&&Math.abs(v.x-(e.x??0))>(e.width??0)/2-f)){let b=f*f*(1-y*y/(h*h));b!=0&&(b=Math.sqrt(Math.abs(b))),b=f-b,g.x-(e.x??0)>0&&(b=-b),v.x+=b}return v},a}async function Bce(t,e){let{labelStyles:r,nodeStyles:n}=qt(e);e.labelStyle=r;let{shapeSvg:a,bbox:i}=await rr(t,e,Jt(e)),s=i.width+e.padding,o=i.height+e.padding,l=[{x:-3*o/6,y:0},{x:s+3*o/6,y:0},{x:s,y:-o},{x:0,y:-o}],u,{cssStyles:h}=e;if(e.look==="handDrawn"){let f=je.svg(a),d=zt(e,{}),p=Pr(l),m=f.path(p,d);u=a.insert(()=>m,":first-child").attr("transform",`translate(${-s/2}, ${o/2})`),h&&u.attr("style",h)}else u=Uh(a,s,o,l);return n&&u.attr("style",n),e.width=s,e.height=o,Ft(e,u),e.intersect=function(f){return Ot.polygon(e,l,f)},a}async function Fce(t,e){let{labelStyles:r,nodeStyles:n}=qt(e);e.labelStyle=r;let{shapeSvg:a,bbox:i}=await rr(t,e,Jt(e)),s=60,o=20,l=Math.max(s,i.width+(e.padding??0)*2,e?.width??0),u=Math.max(o,i.height+(e.padding??0)*2,e?.height??0),{cssStyles:h}=e,f=je.svg(a),d=zt(e,{});e.look!=="handDrawn"&&(d.roughness=0,d.fillStyle="solid");let p=[{x:-l/2*.8,y:-u/2},{x:l/2*.8,y:-u/2},{x:l/2,y:-u/2*.6},{x:l/2,y:u/2},{x:-l/2,y:u/2},{x:-l/2,y:-u/2*.6}],m=Pr(p),g=f.path(m,d),v=a.insert(()=>g,":first-child");return v.attr("class","basic label-container"),h&&e.look!=="handDrawn"&&v.selectChildren("path").attr("style",h),n&&e.look!=="handDrawn"&&v.selectChildren("path").attr("style",n),Ft(e,v),e.intersect=function(y){return Ot.polygon(e,p,y)},a}async function zce(t,e){let{labelStyles:r,nodeStyles:n}=qt(e);e.labelStyle=r;let{shapeSvg:a,bbox:i,label:s}=await rr(t,e,Jt(e)),o=Br(Te().flowchart?.htmlLabels),l=i.width+(e.padding??0),u=l+i.height,h=l+i.height,f=[{x:0,y:0},{x:h,y:0},{x:h/2,y:-u}],{cssStyles:d}=e,p=je.svg(a),m=zt(e,{});e.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");let g=Pr(f),v=p.path(g,m),y=a.insert(()=>v,":first-child").attr("transform",`translate(${-u/2}, ${u/2})`);return d&&e.look!=="handDrawn"&&y.selectChildren("path").attr("style",d),n&&e.look!=="handDrawn"&&y.selectChildren("path").attr("style",n),e.width=l,e.height=u,Ft(e,y),s.attr("transform",`translate(${-i.width/2-(i.x-(i.left??0))}, ${u/2-(i.height+(e.padding??0)/(o?2:1)-(i.y-(i.top??0)))})`),e.intersect=function(b){return te.info("Triangle intersect",e,f,b),Ot.polygon(e,f,b)},a}async function $ce(t,e){let{labelStyles:r,nodeStyles:n}=qt(e);e.labelStyle=r;let{shapeSvg:a,bbox:i,label:s}=await rr(t,e,Jt(e)),o=Math.max(i.width+(e.padding??0)*2,e?.width??0),l=Math.max(i.height+(e.padding??0)*2,e?.height??0),u=l/8,h=l+u,{cssStyles:f}=e,p=70-o,m=p>0?p/2:0,g=je.svg(a),v=zt(e,{});e.look!=="handDrawn"&&(v.roughness=0,v.fillStyle="solid");let y=[{x:-o/2-m,y:h/2},...xd(-o/2-m,h/2,o/2+m,h/2,u,.8),{x:o/2+m,y:-h/2},{x:-o/2-m,y:-h/2}],b=Pr(y),w=g.path(b,v),C=a.insert(()=>w,":first-child");return C.attr("class","basic label-container"),f&&e.look!=="handDrawn"&&C.selectAll("path").attr("style",f),n&&e.look!=="handDrawn"&&C.selectAll("path").attr("style",n),C.attr("transform",`translate(0,${-u/2})`),s.attr("transform",`translate(${-o/2+(e.padding??0)-(i.x-(i.left??0))},${-l/2+(e.padding??0)-u-(i.y-(i.top??0))})`),Ft(e,C),e.intersect=function(k){return Ot.polygon(e,y,k)},a}async function Gce(t,e){let{labelStyles:r,nodeStyles:n}=qt(e);e.labelStyle=r;let{shapeSvg:a,bbox:i}=await rr(t,e,Jt(e)),s=100,o=50,l=Math.max(i.width+(e.padding??0)*2,e?.width??0),u=Math.max(i.height+(e.padding??0)*2,e?.height??0),h=l/u,f=l,d=u;f>d*h?d=f/h:f=d*h,f=Math.max(f,s),d=Math.max(d,o);let p=Math.min(d*.2,d/4),m=d+p*2,{cssStyles:g}=e,v=je.svg(a),y=zt(e,{});e.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");let b=[{x:-f/2,y:m/2},...xd(-f/2,m/2,f/2,m/2,p,1),{x:f/2,y:-m/2},...xd(f/2,-m/2,-f/2,-m/2,p,-1)],w=Pr(b),C=v.path(w,y),k=a.insert(()=>C,":first-child");return k.attr("class","basic label-container"),g&&e.look!=="handDrawn"&&k.selectAll("path").attr("style",g),n&&e.look!=="handDrawn"&&k.selectAll("path").attr("style",n),Ft(e,k),e.intersect=function(E){return Ot.polygon(e,b,E)},a}async function Uce(t,e){let{labelStyles:r,nodeStyles:n}=qt(e);e.labelStyle=r;let{shapeSvg:a,bbox:i,label:s}=await rr(t,e,Jt(e)),o=Math.max(i.width+(e.padding??0)*2,e?.width??0),l=Math.max(i.height+(e.padding??0)*2,e?.height??0),u=5,h=-o/2,f=-l/2,{cssStyles:d}=e,p=je.svg(a),m=zt(e,{}),g=[{x:h-u,y:f-u},{x:h-u,y:f+l},{x:h+o,y:f+l},{x:h+o,y:f-u}],v=`M${h-u},${f-u} L${h+o},${f-u} L${h+o},${f+l} L${h-u},${f+l} L${h-u},${f-u} +res:`,or.polygon(e,u,d)),or.polygon(e,u,d)},i}async function Xfe(t,e){let{labelStyles:r,nodeStyles:n}=dr(e);e.labelStyle=r;let{shapeSvg:i,bbox:a,label:s}=await _r(t,e,Sr(e)),o=Math.max(a.width+(e.padding??0),e?.width??0),l=Math.max(a.height+(e.padding??0),e?.height??0),u=-o/2,h=-l/2,f=h/2,d=[{x:u+f,y:h},{x:u,y:0},{x:u+f,y:-h},{x:-u,y:-h},{x:-u,y:h}],{cssStyles:p}=e,m=xt.svg(i),g=cr(e,{});e.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");let y=fn(d),v=m.path(y,g),x=i.insert(()=>v,":first-child");return x.attr("class","basic label-container"),p&&e.look!=="handDrawn"&&x.selectAll("path").attr("style",p),n&&e.look!=="handDrawn"&&x.selectAll("path").attr("style",n),x.attr("transform",`translate(${-f/2},0)`),s.attr("transform",`translate(${-f/2-a.width/2-(a.x-(a.left??0))}, ${-(a.height/2)-(a.y-(a.top??0))})`),ur(e,x),e.intersect=function(k){return or.polygon(e,d,k)},i}async function jfe(t,e){let{labelStyles:r,nodeStyles:n}=dr(e);e.labelStyle=r;let i;e.cssClasses?i="node "+e.cssClasses:i="node default";let a=t.insert("g").attr("class",i).attr("id",e.domId||e.id),s=a.insert("g"),o=a.insert("g").attr("class","label").attr("style",n),l=e.description,u=e.label,h=o.node().appendChild(await Ad(u,e.labelStyle,!0,!0)),f={width:0,height:0};if(dn(Fe()?.flowchart?.htmlLabels)){let A=h.children[0],I=dt(h);f=A.getBoundingClientRect(),I.attr("width",f.width),I.attr("height",f.height)}he.info("Text 2",l);let d=l||[],p=h.getBBox(),m=o.node().appendChild(await Ad(d.join?d.join("
    "):d,e.labelStyle,!0,!0)),g=m.children[0],y=dt(m);f=g.getBoundingClientRect(),y.attr("width",f.width),y.attr("height",f.height);let v=(e.padding||0)/2;dt(m).attr("transform","translate( "+(f.width>p.width?0:(p.width-f.width)/2)+", "+(p.height+v+5)+")"),dt(h).attr("transform","translate( "+(f.width(he.debug("Rough node insert CXC",P),O),":first-child"),S=a.insert(()=>(he.debug("Rough node insert CXC",P),P),":first-child")}else S=s.insert("rect",":first-child"),R=s.insert("line"),S.attr("class","outer title-state").attr("style",n).attr("x",-f.width/2-v).attr("y",-f.height/2-v).attr("width",f.width+(e.padding||0)).attr("height",f.height+(e.padding||0)),R.attr("class","divider").attr("x1",-f.width/2-v).attr("x2",f.width/2+v).attr("y1",-f.height/2-v+p.height+v).attr("y2",-f.height/2-v+p.height+v);return ur(e,S),e.intersect=function(A){return or.rect(e,A)},a}async function Kfe(t,e){let r={rx:5,ry:5,classes:"",labelPaddingX:(e?.padding||0)*1,labelPaddingY:(e?.padding||0)*1};return N5(t,e,r)}async function Zfe(t,e){let{labelStyles:r,nodeStyles:n}=dr(e);e.labelStyle=r;let{shapeSvg:i,bbox:a,label:s}=await _r(t,e,Sr(e)),o=e?.padding??0,l=Math.max(a.width+(e.padding??0)*2,e?.width??0),u=Math.max(a.height+(e.padding??0)*2,e?.height??0),h=-a.width/2-o,f=-a.height/2-o,{cssStyles:d}=e,p=xt.svg(i),m=cr(e,{});e.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");let g=[{x:h,y:f},{x:h+l+8,y:f},{x:h+l+8,y:f+u},{x:h-8,y:f+u},{x:h-8,y:f},{x:h,y:f},{x:h,y:f+u}],y=p.polygon(g.map(x=>[x.x,x.y]),m),v=i.insert(()=>y,":first-child");return v.attr("class","basic label-container").attr("style",Vs(d)),n&&e.look!=="handDrawn"&&v.selectAll("path").attr("style",n),d&&e.look!=="handDrawn"&&v.selectAll("path").attr("style",n),s.attr("transform",`translate(${-l/2+4+(e.padding??0)-(a.x-(a.left??0))},${-u/2+(e.padding??0)-(a.y-(a.top??0))})`),ur(e,v),e.intersect=function(x){return or.rect(e,x)},i}async function Qfe(t,e){let{labelStyles:r,nodeStyles:n}=dr(e);e.labelStyle=r;let{shapeSvg:i,bbox:a,label:s}=await _r(t,e,Sr(e)),o=Math.max(a.width+(e.padding??0)*2,e?.width??0),l=Math.max(a.height+(e.padding??0)*2,e?.height??0),u=-o/2,h=-l/2,{cssStyles:f}=e,d=xt.svg(i),p=cr(e,{});e.look!=="handDrawn"&&(p.roughness=0,p.fillStyle="solid");let m=[{x:u,y:h},{x:u,y:h+l},{x:u+o,y:h+l},{x:u+o,y:h-l/2}],g=fn(m),y=d.path(g,p),v=i.insert(()=>y,":first-child");return v.attr("class","basic label-container"),f&&e.look!=="handDrawn"&&v.selectChildren("path").attr("style",f),n&&e.look!=="handDrawn"&&v.selectChildren("path").attr("style",n),v.attr("transform",`translate(0, ${l/4})`),s.attr("transform",`translate(${-o/2+(e.padding??0)-(a.x-(a.left??0))}, ${-l/4+(e.padding??0)-(a.y-(a.top??0))})`),ur(e,v),e.intersect=function(x){return or.polygon(e,m,x)},i}async function Jfe(t,e){let r={rx:0,ry:0,classes:"",labelPaddingX:(e?.padding||0)*2,labelPaddingY:(e?.padding||0)*1};return N5(t,e,r)}async function ede(t,e){let{labelStyles:r,nodeStyles:n}=dr(e);e.labelStyle=r;let{shapeSvg:i,bbox:a}=await _r(t,e,Sr(e)),s=a.height+e.padding,o=a.width+s/4+e.padding,l,{cssStyles:u}=e;if(e.look==="handDrawn"){let h=xt.svg(i),f=cr(e,{}),d=Wh(-o/2,-s/2,o,s,s/2),p=h.path(d,f);l=i.insert(()=>p,":first-child"),l.attr("class","basic label-container").attr("style",Vs(u))}else l=i.insert("rect",":first-child"),l.attr("class","basic label-container").attr("style",n).attr("rx",s/2).attr("ry",s/2).attr("x",-o/2).attr("y",-s/2).attr("width",o).attr("height",s);return ur(e,l),e.intersect=function(h){return or.rect(e,h)},i}async function tde(t,e){return N5(t,e,{rx:5,ry:5,classes:"flowchart-node"})}function rde(t,e,{config:{themeVariables:r}}){let{labelStyles:n,nodeStyles:i}=dr(e);e.labelStyle=n;let{cssStyles:a}=e,{lineColor:s,stateBorder:o,nodeBorder:l}=r,u=t.insert("g").attr("class","node default").attr("id",e.domId||e.id),h=xt.svg(u),f=cr(e,{});e.look!=="handDrawn"&&(f.roughness=0,f.fillStyle="solid");let d=h.circle(0,0,14,{...f,stroke:s,strokeWidth:2}),p=o??l,m=h.circle(0,0,5,{...f,fill:p,stroke:p,strokeWidth:2,fillStyle:"solid"}),g=u.insert(()=>d,":first-child");return g.insert(()=>m),a&&g.selectAll("path").attr("style",a),i&&g.selectAll("path").attr("style",i),ur(e,g),e.intersect=function(y){return or.circle(e,7,y)},u}function nde(t,e,{config:{themeVariables:r}}){let{lineColor:n}=r,i=t.insert("g").attr("class","node default").attr("id",e.domId||e.id),a;if(e.look==="handDrawn"){let o=xt.svg(i).circle(0,0,14,VQe(n));a=i.insert(()=>o),a.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14)}else a=i.insert("circle",":first-child"),a.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14);return ur(e,a),e.intersect=function(s){return or.circle(e,7,s)},i}async function ide(t,e){let{labelStyles:r,nodeStyles:n}=dr(e);e.labelStyle=r;let{shapeSvg:i,bbox:a}=await _r(t,e,Sr(e)),s=(e?.padding||0)/2,o=a.width+e.padding,l=a.height+e.padding,u=-a.width/2-s,h=-a.height/2-s,f=[{x:0,y:0},{x:o,y:0},{x:o,y:-l},{x:0,y:-l},{x:0,y:0},{x:-8,y:0},{x:o+8,y:0},{x:o+8,y:-l},{x:-8,y:-l},{x:-8,y:0}];if(e.look==="handDrawn"){let d=xt.svg(i),p=cr(e,{}),m=d.rectangle(u-8,h,o+16,l,p),g=d.line(u,h,u,h+l,p),y=d.line(u+o,h,u+o,h+l,p);i.insert(()=>g,":first-child"),i.insert(()=>y,":first-child");let v=i.insert(()=>m,":first-child"),{cssStyles:x}=e;v.attr("class","basic label-container").attr("style",Vs(x)),ur(e,v)}else{let d=Yh(i,o,l,f);n&&d.attr("style",n),ur(e,d)}return e.intersect=function(d){return or.polygon(e,f,d)},i}async function ade(t,e){let{labelStyles:r,nodeStyles:n}=dr(e);e.labelStyle=r;let{shapeSvg:i,bbox:a}=await _r(t,e,Sr(e)),s=Math.max(a.width+(e.padding??0)*2,e?.width??0),o=Math.max(a.height+(e.padding??0)*2,e?.height??0),l=-s/2,u=-o/2,h=.2*o,f=.2*o,{cssStyles:d}=e,p=xt.svg(i),m=cr(e,{}),g=[{x:l-h/2,y:u},{x:l+s+h/2,y:u},{x:l+s+h/2,y:u+o},{x:l-h/2,y:u+o}],y=[{x:l+s-h/2,y:u+o},{x:l+s+h/2,y:u+o},{x:l+s+h/2,y:u+o-f}];e.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");let v=fn(g),x=p.path(v,m),k=fn(y),_=p.path(k,{...m,fillStyle:"solid"}),T=i.insert(()=>_,":first-child");return T.insert(()=>x,":first-child"),T.attr("class","basic label-container"),d&&e.look!=="handDrawn"&&T.selectAll("path").attr("style",d),n&&e.look!=="handDrawn"&&T.selectAll("path").attr("style",n),ur(e,T),e.intersect=function(S){return or.polygon(e,g,S)},i}async function sde(t,e){let{labelStyles:r,nodeStyles:n}=dr(e);e.labelStyle=r;let{shapeSvg:i,bbox:a,label:s}=await _r(t,e,Sr(e)),o=Math.max(a.width+(e.padding??0)*2,e?.width??0),l=Math.max(a.height+(e.padding??0)*2,e?.height??0),u=l/4,h=.2*o,f=.2*l,d=l+u,{cssStyles:p}=e,m=xt.svg(i),g=cr(e,{});e.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");let y=[{x:-o/2-o/2*.1,y:d/2},..._d(-o/2-o/2*.1,d/2,o/2+o/2*.1,d/2,u,.8),{x:o/2+o/2*.1,y:-d/2},{x:-o/2-o/2*.1,y:-d/2}],v=-o/2+o/2*.1,x=-d/2-f*.4,k=[{x:v+o-h,y:(x+l)*1.4},{x:v+o,y:x+l-f},{x:v+o,y:(x+l)*.9},..._d(v+o,(x+l)*1.3,v+o-h,(x+l)*1.5,-l*.03,.5)],_=fn(y),T=m.path(_,g),S=fn(k),R=m.path(S,{...g,fillStyle:"solid"}),A=i.insert(()=>R,":first-child");return A.insert(()=>T,":first-child"),A.attr("class","basic label-container"),p&&e.look!=="handDrawn"&&A.selectAll("path").attr("style",p),n&&e.look!=="handDrawn"&&A.selectAll("path").attr("style",n),A.attr("transform",`translate(0,${-u/2})`),s.attr("transform",`translate(${-o/2+(e.padding??0)-(a.x-(a.left??0))},${-l/2+(e.padding??0)-u/2-(a.y-(a.top??0))})`),ur(e,A),e.intersect=function(I){return or.polygon(e,y,I)},i}async function ode(t,e){let{labelStyles:r,nodeStyles:n}=dr(e);e.labelStyle=r;let{shapeSvg:i,bbox:a}=await _r(t,e,Sr(e)),s=Math.max(a.width+e.padding,e?.width||0),o=Math.max(a.height+e.padding,e?.height||0),l=-s/2,u=-o/2,h=i.insert("rect",":first-child");return h.attr("class","text").attr("style",n).attr("rx",0).attr("ry",0).attr("x",l).attr("y",u).attr("width",s).attr("height",o),ur(e,h),e.intersect=function(f){return or.rect(e,f)},i}async function lde(t,e){let{labelStyles:r,nodeStyles:n}=dr(e);e.labelStyle=r;let{shapeSvg:i,bbox:a,label:s,halfPadding:o}=await _r(t,e,Sr(e)),l=e.look==="neo"?o*2:o,u=a.height+l,h=u/2,f=h/(2.5+u/50),d=a.width+f+l,{cssStyles:p}=e,m;if(e.look==="handDrawn"){let g=xt.svg(i),y=fJe(0,0,d,u,f,h),v=dJe(0,0,d,u,f,h),x=g.path(y,cr(e,{})),k=g.path(v,cr(e,{fill:"none"}));m=i.insert(()=>k,":first-child"),m=i.insert(()=>x,":first-child"),m.attr("class","basic label-container"),p&&m.attr("style",p)}else{let g=hJe(0,0,d,u,f,h);m=i.insert("path",":first-child").attr("d",g).attr("class","basic label-container").attr("style",Vs(p)).attr("style",n),m.attr("class","basic label-container"),p&&m.selectAll("path").attr("style",p),n&&m.selectAll("path").attr("style",n)}return m.attr("label-offset-x",f),m.attr("transform",`translate(${-d/2}, ${u/2} )`),s.attr("transform",`translate(${-(a.width/2)-f-(a.x-(a.left??0))}, ${-(a.height/2)-(a.y-(a.top??0))})`),ur(e,m),e.intersect=function(g){let y=or.rect(e,g),v=y.y-(e.y??0);if(h!=0&&(Math.abs(v)<(e.height??0)/2||Math.abs(v)==(e.height??0)/2&&Math.abs(y.x-(e.x??0))>(e.width??0)/2-f)){let x=f*f*(1-v*v/(h*h));x!=0&&(x=Math.sqrt(Math.abs(x))),x=f-x,g.x-(e.x??0)>0&&(x=-x),y.x+=x}return y},i}async function ude(t,e){let{labelStyles:r,nodeStyles:n}=dr(e);e.labelStyle=r;let{shapeSvg:i,bbox:a}=await _r(t,e,Sr(e)),s=a.width+e.padding,o=a.height+e.padding,l=[{x:-3*o/6,y:0},{x:s+3*o/6,y:0},{x:s,y:-o},{x:0,y:-o}],u,{cssStyles:h}=e;if(e.look==="handDrawn"){let f=xt.svg(i),d=cr(e,{}),p=fn(l),m=f.path(p,d);u=i.insert(()=>m,":first-child").attr("transform",`translate(${-s/2}, ${o/2})`),h&&u.attr("style",h)}else u=Yh(i,s,o,l);return n&&u.attr("style",n),e.width=s,e.height=o,ur(e,u),e.intersect=function(f){return or.polygon(e,l,f)},i}async function cde(t,e){let{labelStyles:r,nodeStyles:n}=dr(e);e.labelStyle=r;let{shapeSvg:i,bbox:a}=await _r(t,e,Sr(e)),s=60,o=20,l=Math.max(s,a.width+(e.padding??0)*2,e?.width??0),u=Math.max(o,a.height+(e.padding??0)*2,e?.height??0),{cssStyles:h}=e,f=xt.svg(i),d=cr(e,{});e.look!=="handDrawn"&&(d.roughness=0,d.fillStyle="solid");let p=[{x:-l/2*.8,y:-u/2},{x:l/2*.8,y:-u/2},{x:l/2,y:-u/2*.6},{x:l/2,y:u/2},{x:-l/2,y:u/2},{x:-l/2,y:-u/2*.6}],m=fn(p),g=f.path(m,d),y=i.insert(()=>g,":first-child");return y.attr("class","basic label-container"),h&&e.look!=="handDrawn"&&y.selectChildren("path").attr("style",h),n&&e.look!=="handDrawn"&&y.selectChildren("path").attr("style",n),ur(e,y),e.intersect=function(v){return or.polygon(e,p,v)},i}async function hde(t,e){let{labelStyles:r,nodeStyles:n}=dr(e);e.labelStyle=r;let{shapeSvg:i,bbox:a,label:s}=await _r(t,e,Sr(e)),o=dn(Fe().flowchart?.htmlLabels),l=a.width+(e.padding??0),u=l+a.height,h=l+a.height,f=[{x:0,y:0},{x:h,y:0},{x:h/2,y:-u}],{cssStyles:d}=e,p=xt.svg(i),m=cr(e,{});e.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");let g=fn(f),y=p.path(g,m),v=i.insert(()=>y,":first-child").attr("transform",`translate(${-u/2}, ${u/2})`);return d&&e.look!=="handDrawn"&&v.selectChildren("path").attr("style",d),n&&e.look!=="handDrawn"&&v.selectChildren("path").attr("style",n),e.width=l,e.height=u,ur(e,v),s.attr("transform",`translate(${-a.width/2-(a.x-(a.left??0))}, ${u/2-(a.height+(e.padding??0)/(o?2:1)-(a.y-(a.top??0)))})`),e.intersect=function(x){return he.info("Triangle intersect",e,f,x),or.polygon(e,f,x)},i}async function fde(t,e){let{labelStyles:r,nodeStyles:n}=dr(e);e.labelStyle=r;let{shapeSvg:i,bbox:a,label:s}=await _r(t,e,Sr(e)),o=Math.max(a.width+(e.padding??0)*2,e?.width??0),l=Math.max(a.height+(e.padding??0)*2,e?.height??0),u=l/8,h=l+u,{cssStyles:f}=e,p=70-o,m=p>0?p/2:0,g=xt.svg(i),y=cr(e,{});e.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");let v=[{x:-o/2-m,y:h/2},..._d(-o/2-m,h/2,o/2+m,h/2,u,.8),{x:o/2+m,y:-h/2},{x:-o/2-m,y:-h/2}],x=fn(v),k=g.path(x,y),_=i.insert(()=>k,":first-child");return _.attr("class","basic label-container"),f&&e.look!=="handDrawn"&&_.selectAll("path").attr("style",f),n&&e.look!=="handDrawn"&&_.selectAll("path").attr("style",n),_.attr("transform",`translate(0,${-u/2})`),s.attr("transform",`translate(${-o/2+(e.padding??0)-(a.x-(a.left??0))},${-l/2+(e.padding??0)-u-(a.y-(a.top??0))})`),ur(e,_),e.intersect=function(T){return or.polygon(e,v,T)},i}async function dde(t,e){let{labelStyles:r,nodeStyles:n}=dr(e);e.labelStyle=r;let{shapeSvg:i,bbox:a}=await _r(t,e,Sr(e)),s=100,o=50,l=Math.max(a.width+(e.padding??0)*2,e?.width??0),u=Math.max(a.height+(e.padding??0)*2,e?.height??0),h=l/u,f=l,d=u;f>d*h?d=f/h:f=d*h,f=Math.max(f,s),d=Math.max(d,o);let p=Math.min(d*.2,d/4),m=d+p*2,{cssStyles:g}=e,y=xt.svg(i),v=cr(e,{});e.look!=="handDrawn"&&(v.roughness=0,v.fillStyle="solid");let x=[{x:-f/2,y:m/2},..._d(-f/2,m/2,f/2,m/2,p,1),{x:f/2,y:-m/2},..._d(f/2,-m/2,-f/2,-m/2,p,-1)],k=fn(x),_=y.path(k,v),T=i.insert(()=>_,":first-child");return T.attr("class","basic label-container"),g&&e.look!=="handDrawn"&&T.selectAll("path").attr("style",g),n&&e.look!=="handDrawn"&&T.selectAll("path").attr("style",n),ur(e,T),e.intersect=function(S){return or.polygon(e,x,S)},i}async function pde(t,e){let{labelStyles:r,nodeStyles:n}=dr(e);e.labelStyle=r;let{shapeSvg:i,bbox:a,label:s}=await _r(t,e,Sr(e)),o=Math.max(a.width+(e.padding??0)*2,e?.width??0),l=Math.max(a.height+(e.padding??0)*2,e?.height??0),u=5,h=-o/2,f=-l/2,{cssStyles:d}=e,p=xt.svg(i),m=cr(e,{}),g=[{x:h-u,y:f-u},{x:h-u,y:f+l},{x:h+o,y:f+l},{x:h+o,y:f-u}],y=`M${h-u},${f-u} L${h+o},${f-u} L${h+o},${f+l} L${h-u},${f+l} L${h-u},${f-u} M${h-u},${f} L${h+o},${f} - M${h},${f-u} L${h},${f+l}`;e.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");let y=p.path(v,m),b=a.insert(()=>y,":first-child");return b.attr("transform",`translate(${u/2}, ${u/2})`),b.attr("class","basic label-container"),d&&e.look!=="handDrawn"&&b.selectAll("path").attr("style",d),n&&e.look!=="handDrawn"&&b.selectAll("path").attr("style",n),s.attr("transform",`translate(${-(i.width/2)+u/2-(i.x-(i.left??0))}, ${-(i.height/2)+u/2-(i.y-(i.top??0))})`),Ft(e,b),e.intersect=function(w){return Ot.polygon(e,g,w)},a}async function LP(t,e){let r=e;if(r.alias&&(e.label=r.alias),e.look==="handDrawn"){let{themeVariables:F}=wr(),{background:G}=F,z={...e,id:e.id+"-background",look:"default",cssStyles:["stroke: none",`fill: ${G}`]};await LP(t,z)}let n=wr();e.useHtmlLabels=n.htmlLabels;let a=n.er?.diagramPadding??10,i=n.er?.entityPadding??6,{cssStyles:s}=e,{labelStyles:o}=qt(e);if(r.attributes.length===0&&e.label){let F={rx:0,ry:0,labelPaddingX:a,labelPaddingY:a*1.5,classes:""};Bi(e.label,n)+F.labelPaddingX*20){let F=h.width+a*2-(p+m+g+v);p+=F/w,m+=F/w,g>0&&(g+=F/w),v>0&&(v+=F/w)}let k=p+m+g+v,E=je.svg(u),_=zt(e,{});e.look!=="handDrawn"&&(_.roughness=0,_.fillStyle="solid");let S=Math.max(C.width+a*2,e?.width||0,k),L=Math.max(C.height+(d[0]||f)+i,e?.height||0),M=-S/2,D=-L/2;u.selectAll("g:not(:first-child)").each((F,G,z)=>{let H=We(z[G]),Q=H.attr("transform"),Y=0,ie=0;if(Q){let oe=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(Q);oe&&(Y=parseFloat(oe[1]),ie=parseFloat(oe[2]),H.attr("class").includes("attribute-name")?Y+=p:H.attr("class").includes("attribute-keys")?Y+=p+m:H.attr("class").includes("attribute-comment")&&(Y+=p+m+g))}H.attr("transform",`translate(${M+a/2+Y}, ${ie+D+h.height+i/2})`)}),u.select(".name").attr("transform","translate("+-h.width/2+", "+(D+i/2)+")");let T=E.rectangle(M,D,S,L,_),I=u.insert(()=>T,":first-child").attr("style",s.join("")),{themeVariables:N}=wr(),{rowEven:O,rowOdd:R,nodeBorder:P}=N;d.push(0);for(let[F,G]of d.entries()){if(F===0&&d.length>1)continue;let z=F%2===0&&G!==0,H=E.rectangle(M,h.height+D+G,S,h.height,{..._,fill:z?O:R,stroke:P});u.insert(()=>H,"g.label").attr("style",s.join("")).attr("class",`row-rect-${F%2===0?"even":"odd"}`)}let B=E.line(M,h.height+D,S+M,h.height+D,_);u.insert(()=>B).attr("class","divider"),B=E.line(p+M,h.height+D,p+M,L+D,_),u.insert(()=>B).attr("class","divider"),y&&(B=E.line(p+m+M,h.height+D,p+m+M,L+D,_),u.insert(()=>B).attr("class","divider")),b&&(B=E.line(p+m+g+M,h.height+D,p+m+g+M,L+D,_),u.insert(()=>B).attr("class","divider"));for(let F of d)B=E.line(M,h.height+D+F,S+M,h.height+D+F,_),u.insert(()=>B).attr("class","divider");return Ft(e,I),e.intersect=function(F){return Ot.rect(e,F)},u}async function V1(t,e,r,n=0,a=0,i=[],s=""){let o=t.insert("g").attr("class",`label ${i.join(" ")}`).attr("transform",`translate(${n}, ${a})`).attr("style",s);e!==Wu(e)&&(e=Wu(e),e=e.replaceAll("<","<").replaceAll(">",">"));let l=o.node().appendChild(await Xa(o,e,{width:Bi(e,r)+100,style:s,useHtmlLabels:r.htmlLabels},r));if(e.includes("<")||e.includes(">")){let h=l.children[0];for(h.textContent=h.textContent.replaceAll("<","<").replaceAll(">",">");h.childNodes[0];)h=h.childNodes[0],h.textContent=h.textContent.replaceAll("<","<").replaceAll(">",">")}let u=l.getBBox();if(Br(r.htmlLabels)){let h=l.children[0];h.style.textAlign="start";let f=We(l);u=h.getBoundingClientRect(),f.attr("width",u.width),f.attr("height",u.height)}return u}async function qce(t,e,r,n,a=r.class.padding??12){let i=n?0:3,s=t.insert("g").attr("class",Jt(e)).attr("id",e.domId||e.id),o=null,l=null,u=null,h=null,f=0,d=0,p=0;if(o=s.insert("g").attr("class","annotation-group text"),e.annotations.length>0){let b=e.annotations[0];await g3(o,{text:`\xAB${b}\xBB`},0),f=o.node().getBBox().height}l=s.insert("g").attr("class","label-group text"),await g3(l,e,0,["font-weight: bolder"]);let m=l.node().getBBox();d=m.height,u=s.insert("g").attr("class","members-group text");let g=0;for(let b of e.members){let w=await g3(u,b,g,[b.parseClassifier()]);g+=w+i}p=u.node().getBBox().height,p<=0&&(p=a/2),h=s.insert("g").attr("class","methods-group text");let v=0;for(let b of e.methods){let w=await g3(h,b,v,[b.parseClassifier()]);v+=w+i}let y=s.node().getBBox();if(o!==null){let b=o.node().getBBox();o.attr("transform",`translate(${-b.width/2})`)}return l.attr("transform",`translate(${-m.width/2}, ${f})`),y=s.node().getBBox(),u.attr("transform",`translate(0, ${f+d+a*2})`),y=s.node().getBBox(),h.attr("transform",`translate(0, ${f+d+(p?p+a*4:a*2)})`),y=s.node().getBBox(),{shapeSvg:s,bbox:y}}async function g3(t,e,r,n=[]){let a=t.insert("g").attr("class","label").attr("style",n.join("; ")),i=wr(),s="useHtmlLabels"in e?e.useHtmlLabels:Br(i.htmlLabels)??!0,o="";"text"in e?o=e.text:o=e.label,!s&&o.startsWith("\\")&&(o=o.substring(1)),Ha(o)&&(s=!0);let l=await Xa(a,MT(oo(o)),{width:Bi(o,i)+50,classes:"markdown-node-label",useHtmlLabels:s},i),u,h=1;if(s){let f=l.children[0],d=We(l);h=f.innerHTML.split("
    ").length,f.innerHTML.includes("")&&(h+=f.innerHTML.split("").length-1);let p=f.getElementsByTagName("img");if(p){let m=o.replace(/]*>/g,"").trim()==="";await Promise.all([...p].map(g=>new Promise(v=>{function y(){if(g.style.display="flex",g.style.flexDirection="column",m){let b=i.fontSize?.toString()??window.getComputedStyle(document.body).fontSize,C=parseInt(b,10)*5+"px";g.style.minWidth=C,g.style.maxWidth=C}else g.style.width="100%";v(g)}x(y,"setupImage"),setTimeout(()=>{g.complete&&y()}),g.addEventListener("error",y),g.addEventListener("load",y)})))}u=f.getBoundingClientRect(),d.attr("width",u.width),d.attr("height",u.height)}else{n.includes("font-weight: bolder")&&We(l).selectAll("tspan").attr("font-weight",""),h=l.children.length;let f=l.children[0];(l.textContent===""||l.textContent.includes(">"))&&(f.textContent=o[0]+o.substring(1).replaceAll(">",">").replaceAll("<","<").trim(),o[1]===" "&&(f.textContent=f.textContent[0]+" "+f.textContent.substring(1))),f.textContent==="undefined"&&(f.textContent=""),u=l.getBBox()}return a.attr("transform","translate(0,"+(-u.height/(2*h)+r)+")"),u.height}async function Vce(t,e){let r=Te(),n=r.class.padding??12,a=n,i=e.useHtmlLabels??Br(r.htmlLabels)??!0,s=e;s.annotations=s.annotations??[],s.members=s.members??[],s.methods=s.methods??[];let{shapeSvg:o,bbox:l}=await qce(t,e,r,i,a),{labelStyles:u,nodeStyles:h}=qt(e);e.labelStyle=u,e.cssStyles=s.styles||"";let f=s.styles?.join(";")||h||"";e.cssStyles||(e.cssStyles=f.replaceAll("!important","").split(";"));let d=s.members.length===0&&s.methods.length===0&&!r.class?.hideEmptyMembersBox,p=je.svg(o),m=zt(e,{});e.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");let g=l.width,v=l.height;s.members.length===0&&s.methods.length===0?v+=a:s.members.length>0&&s.methods.length===0&&(v+=a*2);let y=-g/2,b=-v/2,w=p.rectangle(y-n,b-n-(d?n:s.members.length===0&&s.methods.length===0?-n/2:0),g+2*n,v+2*n+(d?n*2:s.members.length===0&&s.methods.length===0?-n:0),m),C=o.insert(()=>w,":first-child");C.attr("class","basic label-container");let k=C.node().getBBox();o.selectAll(".text").each((L,M,D)=>{let T=We(D[M]),I=T.attr("transform"),N=0;if(I){let B=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(I);B&&(N=parseFloat(B[2]))}let O=N+b+n-(d?n:s.members.length===0&&s.methods.length===0?-n/2:0);i||(O-=4);let R=y;(T.attr("class").includes("label-group")||T.attr("class").includes("annotation-group"))&&(R=-T.node()?.getBBox().width/2||0,o.selectAll("text").each(function(P,B,F){window.getComputedStyle(F[B]).textAnchor==="middle"&&(R=0)})),T.attr("transform",`translate(${R}, ${O})`)});let E=o.select(".annotation-group").node().getBBox().height-(d?n/2:0)||0,_=o.select(".label-group").node().getBBox().height-(d?n/2:0)||0,S=o.select(".members-group").node().getBBox().height-(d?n/2:0)||0;if(s.members.length>0||s.methods.length>0||d){let L=p.line(k.x,E+_+b+n,k.x+k.width,E+_+b+n,m);o.insert(()=>L).attr("class","divider").attr("style",f)}if(d||s.members.length>0||s.methods.length>0){let L=p.line(k.x,E+_+S+b+a*2+n,k.x+k.width,E+_+S+b+n+a*2,m);o.insert(()=>L).attr("class","divider").attr("style",f)}if(s.look!=="handDrawn"&&o.selectAll("path").attr("style",f),C.select(":nth-child(2)").attr("style",f),o.selectAll(".divider").select("path").attr("style",f),e.labelStyle?o.selectAll("span").attr("style",e.labelStyle):o.selectAll("span").attr("style",f),!i){let L=RegExp(/color\s*:\s*([^;]*)/),M=L.exec(f);if(M){let D=M[0].replace("color","fill");o.selectAll("tspan").attr("style",D)}else if(u){let D=L.exec(u);if(D){let T=D[0].replace("color","fill");o.selectAll("tspan").attr("style",T)}}}return Ft(e,C),e.intersect=function(L){return Ot.rect(e,L)},o}async function Hce(t,e){let{labelStyles:r,nodeStyles:n}=qt(e);e.labelStyle=r;let a=e,i=e,s=20,o=20,l="verifyMethod"in e,u=Jt(e),h=t.insert("g").attr("class",u).attr("id",e.domId??e.id),f;l?f=await oc(h,`<<${a.type}>>`,0,e.labelStyle):f=await oc(h,"<<Element>>",0,e.labelStyle);let d=f,p=await oc(h,a.name,d,e.labelStyle+"; font-weight: bold;");if(d+=p+o,l){let E=await oc(h,`${a.requirementId?`Id: ${a.requirementId}`:""}`,d,e.labelStyle);d+=E;let _=await oc(h,`${a.text?`Text: ${a.text}`:""}`,d,e.labelStyle);d+=_;let S=await oc(h,`${a.risk?`Risk: ${a.risk}`:""}`,d,e.labelStyle);d+=S,await oc(h,`${a.verifyMethod?`Verification: ${a.verifyMethod}`:""}`,d,e.labelStyle)}else{let E=await oc(h,`${i.type?`Type: ${i.type}`:""}`,d,e.labelStyle);d+=E,await oc(h,`${i.docRef?`Doc Ref: ${i.docRef}`:""}`,d,e.labelStyle)}let m=(h.node()?.getBBox().width??200)+s,g=(h.node()?.getBBox().height??200)+s,v=-m/2,y=-g/2,b=je.svg(h),w=zt(e,{});e.look!=="handDrawn"&&(w.roughness=0,w.fillStyle="solid");let C=b.rectangle(v,y,m,g,w),k=h.insert(()=>C,":first-child");if(k.attr("class","basic label-container").attr("style",n),h.selectAll(".label").each((E,_,S)=>{let L=We(S[_]),M=L.attr("transform"),D=0,T=0;if(M){let R=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(M);R&&(D=parseFloat(R[1]),T=parseFloat(R[2]))}let I=T-g/2,N=v+s/2;(_===0||_===1)&&(N=D),L.attr("transform",`translate(${N}, ${I+s})`)}),d>f+p+o){let E=b.line(v,y+f+p+o,v+m,y+f+p+o,w);h.insert(()=>E).attr("style",n)}return Ft(e,k),e.intersect=function(E){return Ot.rect(e,E)},h}async function oc(t,e,r,n=""){if(e==="")return 0;let a=t.insert("g").attr("class","label").attr("style",n),i=Te(),s=i.htmlLabels??!0,o=await Xa(a,MT(oo(e)),{width:Bi(e,i)+50,classes:"markdown-node-label",useHtmlLabels:s,style:n},i),l;if(s){let u=o.children[0],h=We(o);l=u.getBoundingClientRect(),h.attr("width",l.width),h.attr("height",l.height)}else{let u=o.children[0];for(let h of u.children)h.textContent=h.textContent.replaceAll(">",">").replaceAll("<","<"),n&&h.setAttribute("style",n);l=o.getBBox(),l.height+=6}return a.attr("transform",`translate(${-l.width/2},${-l.height/2+r})`),l.height}async function Wce(t,e,{config:r}){let{labelStyles:n,nodeStyles:a}=qt(e);e.labelStyle=n||"";let i=10,s=e.width;e.width=(e.width??200)-10;let{shapeSvg:o,bbox:l,label:u}=await rr(t,e,Jt(e)),h=e.padding||10,f="",d;"ticket"in e&&e.ticket&&r?.kanban?.ticketBaseUrl&&(f=r?.kanban?.ticketBaseUrl.replace("#TICKET#",e.ticket),d=o.insert("svg:a",":first-child").attr("class","kanban-ticket-link").attr("xlink:href",f).attr("target","_blank"));let p={useHtmlLabels:e.useHtmlLabels,labelStyle:e.labelStyle||"",width:e.width,img:e.img,padding:e.padding||8,centerLabel:!1},m,g;d?{label:m,bbox:g}=await EP(d,"ticket"in e&&e.ticket||"",p):{label:m,bbox:g}=await EP(o,"ticket"in e&&e.ticket||"",p);let{label:v,bbox:y}=await EP(o,"assigned"in e&&e.assigned||"",p);e.width=s;let b=10,w=e?.width||0,C=Math.max(g.height,y.height)/2,k=Math.max(l.height+b*2,e?.height||0)+C,E=-w/2,_=-k/2;u.attr("transform","translate("+(h-w/2)+", "+(-C-l.height/2)+")"),m.attr("transform","translate("+(h-w/2)+", "+(-C+l.height/2)+")"),v.attr("transform","translate("+(h+w/2-y.width-2*i)+", "+(-C+l.height/2)+")");let S,{rx:L,ry:M}=e,{cssStyles:D}=e;if(e.look==="handDrawn"){let T=je.svg(o),I=zt(e,{}),N=L||M?T.path(Gh(E,_,w,k,L||0),I):T.rectangle(E,_,w,k,I);S=o.insert(()=>N,":first-child"),S.attr("class","basic label-container").attr("style",D||null)}else{S=o.insert("rect",":first-child"),S.attr("class","basic label-container __APA__").attr("style",a).attr("rx",L??5).attr("ry",M??5).attr("x",E).attr("y",_).attr("width",w).attr("height",k);let T="priority"in e&&e.priority;if(T){let I=o.append("line"),N=E+2,O=_+Math.floor((L??0)/2),R=_+k-Math.floor((L??0)/2);I.attr("x1",N).attr("y1",O).attr("x2",N).attr("y2",R).attr("stroke-width","4").attr("stroke",BXe(T))}}return Ft(e,S),e.height=k,e.intersect=function(T){return Ot.rect(e,T)},o}function RP(t){return t in Yce}async function Xp(t,e,r){let n,a;e.shape==="rect"&&(e.rx&&e.ry?e.shape="roundedRect":e.shape="squareRect");let i=e.shape?Yce[e.shape]:void 0;if(!i)throw new Error(`No such shape: ${e.shape}. Please check your syntax.`);if(e.link){let s;r.config.securityLevel==="sandbox"?s="_top":e.linkTarget&&(s=e.linkTarget||"_blank"),n=t.insert("svg:a").attr("xlink:href",e.link).attr("target",s??null),a=await i(n,e,r)}else a=await i(t,e,r),n=a;return e.tooltip&&a.attr("title",e.tooltip),eS.set(e.id,n),e.haveCallback&&n.attr("class",n.attr("class")+" clickable"),n}var rr,EP,Ft,Jt,fXe,H1,dXe,bd,Gh,pXe,W1,mXe,AP,qt,zt,Iue,gXe,vXe,yXe,xXe,bXe,wXe,Due,Y1,Nue,kXe,Pue,TXe,EXe,CXe,Ot,SXe,_Xe,AXe,LXe,RXe,IXe,DXe,NXe,MXe,OXe,PXe,BXe,FXe,zXe,Yce,eS,Xce,jce,y3,Fo=A(()=>{eo();Mo();Fi();ln();ur();cr();cr();Gt();cr();Gt();Gt();Gt();Gt();Gt();Gt();Gt();Gt();Gt();Gt();Gt();Gt();Gt();Gt();Gt();Gt();Gt();Gt();Gt();Gt();Gt();Gt();Gt();Gt();Gt();Gt();Gt();Gt();Gt();Gt();Gt();Gt();Gt();Gt();Gt();Gt();cr();Gt();Gt();Gt();Gt();Gt();Gt();Gt();Gt();Gt();Gt();Gt();Gt();Gt();Gt();Gt();Gt();Gt();cr();cr();Gt();cr();Gt();cr();Gt();rr=x(async(t,e,r)=>{let n,a=e.useHtmlLabels||Br(Te()?.htmlLabels);r?n=r:n="node default";let i=t.insert("g").attr("class",n).attr("id",e.domId||e.id),s=i.insert("g").attr("class","label").attr("style",ns(e.labelStyle)),o;e.label===void 0?o="":o=typeof e.label=="string"?e.label:e.label[0];let l=await Xa(s,Er(oo(o),Te()),{useHtmlLabels:a,width:e.width||Te().flowchart?.wrappingWidth,cssClasses:"markdown-node-label",style:e.labelStyle,addSvgBackground:!!e.icon||!!e.img}),u=l.getBBox(),h=(e?.padding??0)/2;if(a){let f=l.children[0],d=We(l),p=f.getElementsByTagName("img");if(p){let m=o.replace(/]*>/g,"").trim()==="";await Promise.all([...p].map(g=>new Promise(v=>{function y(){if(g.style.display="flex",g.style.flexDirection="column",m){let b=Te().fontSize?Te().fontSize:window.getComputedStyle(document.body).fontSize,w=5,[C=or.fontSize]=fl(b),k=C*w+"px";g.style.minWidth=k,g.style.maxWidth=k}else g.style.width="100%";v(g)}x(y,"setupImage"),setTimeout(()=>{g.complete&&y()}),g.addEventListener("error",y),g.addEventListener("load",y)})))}u=f.getBoundingClientRect(),d.attr("width",u.width),d.attr("height",u.height)}return a?s.attr("transform","translate("+-u.width/2+", "+-u.height/2+")"):s.attr("transform","translate(0, "+-u.height/2+")"),e.centerLabel&&s.attr("transform","translate("+-u.width/2+", "+-u.height/2+")"),s.insert("rect",":first-child"),{shapeSvg:i,bbox:u,halfPadding:h,label:s}},"labelHelper"),EP=x(async(t,e,r)=>{let n=r.useHtmlLabels||Br(Te()?.flowchart?.htmlLabels),a=t.insert("g").attr("class","label").attr("style",r.labelStyle||""),i=await Xa(a,Er(oo(e),Te()),{useHtmlLabels:n,width:r.width||Te()?.flowchart?.wrappingWidth,style:r.labelStyle,addSvgBackground:!!r.icon||!!r.img}),s=i.getBBox(),o=r.padding/2;if(Br(Te()?.flowchart?.htmlLabels)){let l=i.children[0],u=We(i);s=l.getBoundingClientRect(),u.attr("width",s.width),u.attr("height",s.height)}return n?a.attr("transform","translate("+-s.width/2+", "+-s.height/2+")"):a.attr("transform","translate(0, "+-s.height/2+")"),r.centerLabel&&a.attr("transform","translate("+-s.width/2+", "+-s.height/2+")"),a.insert("rect",":first-child"),{shapeSvg:t,bbox:s,halfPadding:o,label:a}},"insertLabel"),Ft=x((t,e)=>{let r=e.node().getBBox();t.width=r.width,t.height=r.height},"updateNodeBounds"),Jt=x((t,e)=>(t.look==="handDrawn"?"rough-node":"node")+" "+t.cssClasses+" "+(e||""),"getNodeClasses");x(Pr,"createPathFromPoints");x(xd,"generateFullSineWavePoints");x(_P,"generateCirclePoints");fXe=x((t,e)=>{var r=t.x,n=t.y,a=e.x-r,i=e.y-n,s=t.width/2,o=t.height/2,l,u;return Math.abs(i)*s>Math.abs(a)*o?(i<0&&(o=-o),l=i===0?0:o*a/i,u=o):(a<0&&(s=-s),l=s,u=a===0?0:s*i/a),{x:r+l,y:n+u}},"intersectRect"),H1=fXe;x(Lue,"applyStyle");x(Rue,"addHtmlLabel");dXe=x(async(t,e,r,n)=>{let a=t||"";if(typeof a=="object"&&(a=a[0]),Br(Te().flowchart.htmlLabels)){a=a.replace(/\\n|\n/g,"
    "),te.info("vertexText"+a);let i={isNode:n,label:oo(a).replace(/fa[blrs]?:fa-[\w-]+/g,o=>``),labelStyle:e&&e.replace("fill:","color:")};return await Rue(i)}else{let i=document.createElementNS("http://www.w3.org/2000/svg","text");i.setAttribute("style",e.replace("color:","fill:"));let s=[];typeof a=="string"?s=a.split(/\\n|\n|/gi):Array.isArray(a)?s=a:s=[];for(let o of s){let l=document.createElementNS("http://www.w3.org/2000/svg","tspan");l.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),l.setAttribute("dy","1em"),l.setAttribute("x","0"),r?l.setAttribute("class","title-row"):l.setAttribute("class","row"),l.textContent=o.trim(),i.appendChild(l)}return i}},"createLabel"),bd=dXe,Gh=x((t,e,r,n,a)=>["M",t+a,e,"H",t+r-a,"A",a,a,0,0,1,t+r,e+a,"V",e+n-a,"A",a,a,0,0,1,t+r-a,e+n,"H",t+a,"A",a,a,0,0,1,t,e+n-a,"V",e+a,"A",a,a,0,0,1,t+a,e,"Z"].join(" "),"createRoundedRectPathD"),pXe=x(t=>{let{handDrawnSeed:e}=Te();return{fill:t,hachureAngle:120,hachureGap:4,fillWeight:2,roughness:.7,stroke:t,seed:e}},"solidStateFill"),W1=x(t=>{let e=mXe([...t.cssCompiledStyles||[],...t.cssStyles||[]]);return{stylesMap:e,stylesArray:[...e]}},"compileStyles"),mXe=x(t=>{let e=new Map;return t.forEach(r=>{let[n,a]=r.split(":");e.set(n.trim(),a?.trim())}),e},"styles2Map"),AP=x(t=>t==="color"||t==="font-size"||t==="font-family"||t==="font-weight"||t==="font-style"||t==="text-decoration"||t==="text-align"||t==="text-transform"||t==="line-height"||t==="letter-spacing"||t==="word-spacing"||t==="text-shadow"||t==="text-overflow"||t==="white-space"||t==="word-wrap"||t==="word-break"||t==="overflow-wrap"||t==="hyphens","isLabelStyle"),qt=x(t=>{let{stylesArray:e}=W1(t),r=[],n=[],a=[],i=[];return e.forEach(s=>{let o=s[0];AP(o)?r.push(s.join(":")+" !important"):(n.push(s.join(":")+" !important"),o.includes("stroke")&&a.push(s.join(":")+" !important"),o==="fill"&&i.push(s.join(":")+" !important"))}),{labelStyles:r.join(";"),nodeStyles:n.join(";"),stylesArray:e,borderStyles:a,backgroundStyles:i}},"styles2String"),zt=x((t,e)=>{let{themeVariables:r,handDrawnSeed:n}=Te(),{nodeBorder:a,mainBkg:i}=r,{stylesMap:s}=W1(t);return Object.assign({roughness:.7,fill:s.get("fill")||i,fillStyle:"hachure",fillWeight:4,hachureGap:5.2,stroke:s.get("stroke")||a,seed:n,strokeWidth:s.get("stroke-width")?.replace("px","")||1.3,fillLineDash:[0,0]},e)},"userNodeOverrides"),Iue=x(async(t,e)=>{te.info("Creating subgraph rect for ",e.id,e);let r=Te(),{themeVariables:n,handDrawnSeed:a}=r,{clusterBkg:i,clusterBorder:s}=n,{labelStyles:o,nodeStyles:l,borderStyles:u,backgroundStyles:h}=qt(e),f=t.insert("g").attr("class","cluster "+e.cssClasses).attr("id",e.id).attr("data-look",e.look),d=Br(r.flowchart.htmlLabels),p=f.insert("g").attr("class","cluster-label "),m=await Xa(p,e.label,{style:e.labelStyle,useHtmlLabels:d,isNode:!0}),g=m.getBBox();if(Br(r.flowchart.htmlLabels)){let _=m.children[0],S=We(m);g=_.getBoundingClientRect(),S.attr("width",g.width),S.attr("height",g.height)}let v=e.width<=g.width+e.padding?g.width+e.padding:e.width;e.width<=g.width+e.padding?e.diff=(v-e.width)/2-e.padding:e.diff=-e.padding;let y=e.height,b=e.x-v/2,w=e.y-y/2;te.trace("Data ",e,JSON.stringify(e));let C;if(e.look==="handDrawn"){let _=je.svg(f),S=zt(e,{roughness:.7,fill:i,stroke:s,fillWeight:3,seed:a}),L=_.path(Gh(b,w,v,y,0),S);C=f.insert(()=>(te.debug("Rough node insert CXC",L),L),":first-child"),C.select("path:nth-child(2)").attr("style",u.join(";")),C.select("path").attr("style",h.join(";").replace("fill","stroke"))}else C=f.insert("rect",":first-child"),C.attr("style",l).attr("rx",e.rx).attr("ry",e.ry).attr("x",b).attr("y",w).attr("width",v).attr("height",y);let{subGraphTitleTopMargin:k}=wh(r);if(p.attr("transform",`translate(${e.x-g.width/2}, ${e.y-e.height/2+k})`),o){let _=p.select("span");_&&_.attr("style",o)}let E=C.node().getBBox();return e.offsetX=0,e.width=E.width,e.height=E.height,e.offsetY=g.height-e.padding/2,e.intersect=function(_){return H1(e,_)},{cluster:f,labelBBox:g}},"rect"),gXe=x((t,e)=>{let r=t.insert("g").attr("class","note-cluster").attr("id",e.id),n=r.insert("rect",":first-child"),a=0*e.padding,i=a/2;n.attr("rx",e.rx).attr("ry",e.ry).attr("x",e.x-e.width/2-i).attr("y",e.y-e.height/2-i).attr("width",e.width+a).attr("height",e.height+a).attr("fill","none");let s=n.node().getBBox();return e.width=s.width,e.height=s.height,e.intersect=function(o){return H1(e,o)},{cluster:r,labelBBox:{width:0,height:0}}},"noteGroup"),vXe=x(async(t,e)=>{let r=Te(),{themeVariables:n,handDrawnSeed:a}=r,{altBackground:i,compositeBackground:s,compositeTitleBackground:o,nodeBorder:l}=n,u=t.insert("g").attr("class",e.cssClasses).attr("id",e.id).attr("data-id",e.id).attr("data-look",e.look),h=u.insert("g",":first-child"),f=u.insert("g").attr("class","cluster-label"),d=u.append("rect"),p=f.node().appendChild(await bd(e.label,e.labelStyle,void 0,!0)),m=p.getBBox();if(Br(r.flowchart.htmlLabels)){let L=p.children[0],M=We(p);m=L.getBoundingClientRect(),M.attr("width",m.width),M.attr("height",m.height)}let g=0*e.padding,v=g/2,y=(e.width<=m.width+e.padding?m.width+e.padding:e.width)+g;e.width<=m.width+e.padding?e.diff=(y-e.width)/2-e.padding:e.diff=-e.padding;let b=e.height+g,w=e.height+g-m.height-6,C=e.x-y/2,k=e.y-b/2;e.width=y;let E=e.y-e.height/2-v+m.height+2,_;if(e.look==="handDrawn"){let L=e.cssClasses.includes("statediagram-cluster-alt"),M=je.svg(u),D=e.rx||e.ry?M.path(Gh(C,k,y,b,10),{roughness:.7,fill:o,fillStyle:"solid",stroke:l,seed:a}):M.rectangle(C,k,y,b,{seed:a});_=u.insert(()=>D,":first-child");let T=M.rectangle(C,E,y,w,{fill:L?i:s,fillStyle:L?"hachure":"solid",stroke:l,seed:a});_=u.insert(()=>D,":first-child"),d=u.insert(()=>T)}else _=h.insert("rect",":first-child"),_.attr("class","outer").attr("x",C).attr("y",k).attr("width",y).attr("height",b).attr("data-look",e.look),d.attr("class","inner").attr("x",C).attr("y",E).attr("width",y).attr("height",w);f.attr("transform",`translate(${e.x-m.width/2}, ${k+1-(Br(r.flowchart.htmlLabels)?0:3)})`);let S=_.node().getBBox();return e.height=S.height,e.offsetX=0,e.offsetY=m.height-e.padding/2,e.labelBBox=m,e.intersect=function(L){return H1(e,L)},{cluster:u,labelBBox:m}},"roundedWithTitle"),yXe=x(async(t,e)=>{te.info("Creating subgraph rect for ",e.id,e);let r=Te(),{themeVariables:n,handDrawnSeed:a}=r,{clusterBkg:i,clusterBorder:s}=n,{labelStyles:o,nodeStyles:l,borderStyles:u,backgroundStyles:h}=qt(e),f=t.insert("g").attr("class","cluster "+e.cssClasses).attr("id",e.id).attr("data-look",e.look),d=Br(r.flowchart.htmlLabels),p=f.insert("g").attr("class","cluster-label "),m=await Xa(p,e.label,{style:e.labelStyle,useHtmlLabels:d,isNode:!0,width:e.width}),g=m.getBBox();if(Br(r.flowchart.htmlLabels)){let _=m.children[0],S=We(m);g=_.getBoundingClientRect(),S.attr("width",g.width),S.attr("height",g.height)}let v=e.width<=g.width+e.padding?g.width+e.padding:e.width;e.width<=g.width+e.padding?e.diff=(v-e.width)/2-e.padding:e.diff=-e.padding;let y=e.height,b=e.x-v/2,w=e.y-y/2;te.trace("Data ",e,JSON.stringify(e));let C;if(e.look==="handDrawn"){let _=je.svg(f),S=zt(e,{roughness:.7,fill:i,stroke:s,fillWeight:4,seed:a}),L=_.path(Gh(b,w,v,y,e.rx),S);C=f.insert(()=>(te.debug("Rough node insert CXC",L),L),":first-child"),C.select("path:nth-child(2)").attr("style",u.join(";")),C.select("path").attr("style",h.join(";").replace("fill","stroke"))}else C=f.insert("rect",":first-child"),C.attr("style",l).attr("rx",e.rx).attr("ry",e.ry).attr("x",b).attr("y",w).attr("width",v).attr("height",y);let{subGraphTitleTopMargin:k}=wh(r);if(p.attr("transform",`translate(${e.x-g.width/2}, ${e.y-e.height/2+k})`),o){let _=p.select("span");_&&_.attr("style",o)}let E=C.node().getBBox();return e.offsetX=0,e.width=E.width,e.height=E.height,e.offsetY=g.height-e.padding/2,e.intersect=function(_){return H1(e,_)},{cluster:f,labelBBox:g}},"kanbanSection"),xXe=x((t,e)=>{let r=Te(),{themeVariables:n,handDrawnSeed:a}=r,{nodeBorder:i}=n,s=t.insert("g").attr("class",e.cssClasses).attr("id",e.id).attr("data-look",e.look),o=s.insert("g",":first-child"),l=0*e.padding,u=e.width+l;e.diff=-e.padding;let h=e.height+l,f=e.x-u/2,d=e.y-h/2;e.width=u;let p;if(e.look==="handDrawn"){let v=je.svg(s).rectangle(f,d,u,h,{fill:"lightgrey",roughness:.5,strokeLineDash:[5],stroke:i,seed:a});p=s.insert(()=>v,":first-child")}else p=o.insert("rect",":first-child"),p.attr("class","divider").attr("x",f).attr("y",d).attr("width",u).attr("height",h).attr("data-look",e.look);let m=p.node().getBBox();return e.height=m.height,e.offsetX=0,e.offsetY=0,e.intersect=function(g){return H1(e,g)},{cluster:s,labelBBox:{}}},"divider"),bXe=Iue,wXe={rect:Iue,squareRect:bXe,roundedWithTitle:vXe,noteGroup:gXe,divider:xXe,kanbanSection:yXe},Due=new Map,Y1=x(async(t,e)=>{let r=e.shape||"rect",n=await wXe[r](t,e);return Due.set(e.id,n),n},"insertCluster"),Nue=x(()=>{Due=new Map},"clear");x(Mue,"intersectNode");kXe=Mue;x(Oue,"intersectEllipse");Pue=Oue;x(Bue,"intersectCircle");TXe=Bue;x(Fue,"intersectLine");x(CP,"sameSign");EXe=Fue;x(zue,"intersectPolygon");CXe=zue,Ot={node:kXe,circle:TXe,ellipse:Pue,polygon:CXe,rect:H1};x($ue,"anchor");x(SP,"generateArcPoints");x(Gue,"bowTieRect");x(Uh,"insertPolygonShape");x(Uue,"card");x(que,"choice");x(Vue,"circle");x(Hue,"createLine");x(Wue,"crossedCircle");x(zh,"generateCirclePoints");x(Yue,"curlyBraceLeft");x($h,"generateCirclePoints");x(Xue,"curlyBraceRight");x(zi,"generateCirclePoints");x(jue,"curlyBraces");x(Kue,"curvedTrapezoid");SXe=x((t,e,r,n,a,i)=>[`M${t},${e+i}`,`a${a},${i} 0,0,0 ${r},0`,`a${a},${i} 0,0,0 ${-r},0`,`l0,${n}`,`a${a},${i} 0,0,0 ${r},0`,`l0,${-n}`].join(" "),"createCylinderPathD"),_Xe=x((t,e,r,n,a,i)=>[`M${t},${e+i}`,`M${t+r},${e+i}`,`a${a},${i} 0,0,0 ${-r},0`,`l0,${n}`,`a${a},${i} 0,0,0 ${r},0`,`l0,${-n}`].join(" "),"createOuterCylinderPathD"),AXe=x((t,e,r,n,a,i)=>[`M${t-r/2},${-n/2}`,`a${a},${i} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD");x(Zue,"cylinder");x(Que,"dividedRectangle");x(Jue,"doublecircle");x(ece,"filledCircle");x(tce,"flippedTriangle");x(rce,"forkJoin");x(nce,"halfRoundedRectangle");LXe=x((t,e,r,n,a)=>[`M${t+a},${e}`,`L${t+r-a},${e}`,`L${t+r},${e-n/2}`,`L${t+r-a},${e-n}`,`L${t+a},${e-n}`,`L${t},${e-n/2}`,"Z"].join(" "),"createHexagonPathD");x(ace,"hexagon");x(ice,"hourglass");x(sce,"icon");x(oce,"iconCircle");x(lce,"iconRounded");x(uce,"iconSquare");x(cce,"imageSquare");x(hce,"inv_trapezoid");x(v3,"drawRect");x(fce,"labelRect");x(dce,"lean_left");x(pce,"lean_right");x(mce,"lightningBolt");RXe=x((t,e,r,n,a,i,s)=>[`M${t},${e+i}`,`a${a},${i} 0,0,0 ${r},0`,`a${a},${i} 0,0,0 ${-r},0`,`l0,${n}`,`a${a},${i} 0,0,0 ${r},0`,`l0,${-n}`,`M${t},${e+i+s}`,`a${a},${i} 0,0,0 ${r},0`].join(" "),"createCylinderPathD"),IXe=x((t,e,r,n,a,i,s)=>[`M${t},${e+i}`,`M${t+r},${e+i}`,`a${a},${i} 0,0,0 ${-r},0`,`l0,${n}`,`a${a},${i} 0,0,0 ${r},0`,`l0,${-n}`,`M${t},${e+i+s}`,`a${a},${i} 0,0,0 ${r},0`].join(" "),"createOuterCylinderPathD"),DXe=x((t,e,r,n,a,i)=>[`M${t-r/2},${-n/2}`,`a${a},${i} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD");x(gce,"linedCylinder");x(vce,"linedWaveEdgedRect");x(yce,"multiRect");x(xce,"multiWaveEdgedRectangle");x(bce,"note");NXe=x((t,e,r)=>[`M${t+r/2},${e}`,`L${t+r},${e-r/2}`,`L${t+r/2},${e-r}`,`L${t},${e-r/2}`,"Z"].join(" "),"createDecisionBoxPathD");x(wce,"question");x(kce,"rect_left_inv_arrow");x(Tce,"rectWithTitle");x(Ece,"roundedRect");x(Cce,"shadedProcess");x(Sce,"slopedRect");x(_ce,"squareRect");x(Ace,"stadium");x(Lce,"state");x(Rce,"stateEnd");x(Ice,"stateStart");x(Dce,"subroutine");x(Nce,"taggedRect");x(Mce,"taggedWaveEdgedRectangle");x(Oce,"text");MXe=x((t,e,r,n,a,i)=>`M${t},${e} - a${a},${i} 0,0,1 0,${-n} + M${h},${f-u} L${h},${f+l}`;e.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");let v=p.path(y,m),x=i.insert(()=>v,":first-child");return x.attr("transform",`translate(${u/2}, ${u/2})`),x.attr("class","basic label-container"),d&&e.look!=="handDrawn"&&x.selectAll("path").attr("style",d),n&&e.look!=="handDrawn"&&x.selectAll("path").attr("style",n),s.attr("transform",`translate(${-(a.width/2)+u/2-(a.x-(a.left??0))}, ${-(a.height/2)+u/2-(a.y-(a.top??0))})`),ur(e,x),e.intersect=function(k){return or.polygon(e,g,k)},i}async function GF(t,e){let r=e;if(r.alias&&(e.label=r.alias),e.look==="handDrawn"){let{themeVariables:q}=Yr(),{background:V}=q,U={...e,id:e.id+"-background",look:"default",cssStyles:["stroke: none",`fill: ${V}`]};await GF(t,U)}let n=Yr();e.useHtmlLabels=n.htmlLabels;let i=n.er?.diagramPadding??10,a=n.er?.entityPadding??6,{cssStyles:s}=e,{labelStyles:o}=dr(e);if(r.attributes.length===0&&e.label){let q={rx:0,ry:0,labelPaddingX:i,labelPaddingY:i*1.5,classes:""};_s(e.label,n)+q.labelPaddingX*20){let q=h.width+i*2-(p+m+g+y);p+=q/k,m+=q/k,g>0&&(g+=q/k),y>0&&(y+=q/k)}let T=p+m+g+y,S=xt.svg(u),R=cr(e,{});e.look!=="handDrawn"&&(R.roughness=0,R.fillStyle="solid");let A=Math.max(_.width+i*2,e?.width||0,T),I=Math.max(_.height+(d[0]||f)+a,e?.height||0),P=-A/2,O=-I/2;u.selectAll("g:not(:first-child)").each((q,V,U)=>{let J=dt(U[V]),se=J.attr("transform"),re=0,me=0;if(se){let ye=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(se);ye&&(re=parseFloat(ye[1]),me=parseFloat(ye[2]),J.attr("class").includes("attribute-name")?re+=p:J.attr("class").includes("attribute-keys")?re+=p+m:J.attr("class").includes("attribute-comment")&&(re+=p+m+g))}J.attr("transform",`translate(${P+i/2+re}, ${me+O+h.height+a/2})`)}),u.select(".name").attr("transform","translate("+-h.width/2+", "+(O+a/2)+")");let C=S.rectangle(P,O,A,I,R),N=u.insert(()=>C,":first-child").attr("style",s.join("")),{themeVariables:B}=Yr(),{rowEven:F,rowOdd:M,nodeBorder:$}=B;d.push(0);for(let[q,V]of d.entries()){if(q===0&&d.length>1)continue;let U=q%2===0&&V!==0,J=S.rectangle(P,h.height+O+V,A,h.height,{...R,fill:U?F:M,stroke:$});u.insert(()=>J,"g.label").attr("style",s.join("")).attr("class",`row-rect-${q%2===0?"even":"odd"}`)}let z=S.line(P,h.height+O,A+P,h.height+O,R);u.insert(()=>z).attr("class","divider"),z=S.line(p+P,h.height+O,p+P,I+O,R),u.insert(()=>z).attr("class","divider"),v&&(z=S.line(p+m+P,h.height+O,p+m+P,I+O,R),u.insert(()=>z).attr("class","divider")),x&&(z=S.line(p+m+g+P,h.height+O,p+m+g+P,I+O,R),u.insert(()=>z).attr("class","divider"));for(let q of d)z=S.line(P,h.height+O+q,A+P,h.height+O+q,R),u.insert(()=>z).attr("class","divider");return ur(e,N),e.intersect=function(q){return or.rect(e,q)},u}async function ny(t,e,r,n=0,i=0,a=[],s=""){let o=t.insert("g").attr("class",`label ${a.join(" ")}`).attr("transform",`translate(${n}, ${i})`).attr("style",s);e!==jc(e)&&(e=jc(e),e=e.replaceAll("<","<").replaceAll(">",">"));let l=o.node().appendChild(await qa(o,e,{width:_s(e,r)+100,style:s,useHtmlLabels:r.htmlLabels},r));if(e.includes("<")||e.includes(">")){let h=l.children[0];for(h.textContent=h.textContent.replaceAll("<","<").replaceAll(">",">");h.childNodes[0];)h=h.childNodes[0],h.textContent=h.textContent.replaceAll("<","<").replaceAll(">",">")}let u=l.getBBox();if(dn(r.htmlLabels)){let h=l.children[0];h.style.textAlign="start";let f=dt(l);u=h.getBoundingClientRect(),f.attr("width",u.width),f.attr("height",u.height)}return u}async function mde(t,e,r,n,i=r.class.padding??12){let a=n?0:3,s=t.insert("g").attr("class",Sr(e)).attr("id",e.domId||e.id),o=null,l=null,u=null,h=null,f=0,d=0,p=0;if(o=s.insert("g").attr("class","annotation-group text"),e.annotations.length>0){let x=e.annotations[0];await M5(o,{text:`\xAB${x}\xBB`},0),f=o.node().getBBox().height}l=s.insert("g").attr("class","label-group text"),await M5(l,e,0,["font-weight: bolder"]);let m=l.node().getBBox();d=m.height,u=s.insert("g").attr("class","members-group text");let g=0;for(let x of e.members){let k=await M5(u,x,g,[x.parseClassifier()]);g+=k+a}p=u.node().getBBox().height,p<=0&&(p=i/2),h=s.insert("g").attr("class","methods-group text");let y=0;for(let x of e.methods){let k=await M5(h,x,y,[x.parseClassifier()]);y+=k+a}let v=s.node().getBBox();if(o!==null){let x=o.node().getBBox();o.attr("transform",`translate(${-x.width/2})`)}return l.attr("transform",`translate(${-m.width/2}, ${f})`),v=s.node().getBBox(),u.attr("transform",`translate(0, ${f+d+i*2})`),v=s.node().getBBox(),h.attr("transform",`translate(0, ${f+d+(p?p+i*4:i*2)})`),v=s.node().getBBox(),{shapeSvg:s,bbox:v}}async function M5(t,e,r,n=[]){let i=t.insert("g").attr("class","label").attr("style",n.join("; ")),a=Yr(),s="useHtmlLabels"in e?e.useHtmlLabels:dn(a.htmlLabels)??!0,o="";"text"in e?o=e.text:o=e.label,!s&&o.startsWith("\\")&&(o=o.substring(1)),za(o)&&(s=!0);let l=await qa(i,pT(Jo(o)),{width:_s(o,a)+50,classes:"markdown-node-label",useHtmlLabels:s},a),u,h=1;if(s){let f=l.children[0],d=dt(l);h=f.innerHTML.split("
    ").length,f.innerHTML.includes("")&&(h+=f.innerHTML.split("").length-1);let p=f.getElementsByTagName("img");if(p){let m=o.replace(/]*>/g,"").trim()==="";await Promise.all([...p].map(g=>new Promise(y=>{function v(){if(g.style.display="flex",g.style.flexDirection="column",m){let x=a.fontSize?.toString()??window.getComputedStyle(document.body).fontSize,_=parseInt(x,10)*5+"px";g.style.minWidth=_,g.style.maxWidth=_}else g.style.width="100%";y(g)}b(v,"setupImage"),setTimeout(()=>{g.complete&&v()}),g.addEventListener("error",v),g.addEventListener("load",v)})))}u=f.getBoundingClientRect(),d.attr("width",u.width),d.attr("height",u.height)}else{n.includes("font-weight: bolder")&&dt(l).selectAll("tspan").attr("font-weight",""),h=l.children.length;let f=l.children[0];(l.textContent===""||l.textContent.includes(">"))&&(f.textContent=o[0]+o.substring(1).replaceAll(">",">").replaceAll("<","<").trim(),o[1]===" "&&(f.textContent=f.textContent[0]+" "+f.textContent.substring(1))),f.textContent==="undefined"&&(f.textContent=""),u=l.getBBox()}return i.attr("transform","translate(0,"+(-u.height/(2*h)+r)+")"),u.height}async function gde(t,e){let r=Fe(),n=r.class.padding??12,i=n,a=e.useHtmlLabels??dn(r.htmlLabels)??!0,s=e;s.annotations=s.annotations??[],s.members=s.members??[],s.methods=s.methods??[];let{shapeSvg:o,bbox:l}=await mde(t,e,r,a,i),{labelStyles:u,nodeStyles:h}=dr(e);e.labelStyle=u,e.cssStyles=s.styles||"";let f=s.styles?.join(";")||h||"";e.cssStyles||(e.cssStyles=f.replaceAll("!important","").split(";"));let d=s.members.length===0&&s.methods.length===0&&!r.class?.hideEmptyMembersBox,p=xt.svg(o),m=cr(e,{});e.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");let g=l.width,y=l.height;s.members.length===0&&s.methods.length===0?y+=i:s.members.length>0&&s.methods.length===0&&(y+=i*2);let v=-g/2,x=-y/2,k=p.rectangle(v-n,x-n-(d?n:s.members.length===0&&s.methods.length===0?-n/2:0),g+2*n,y+2*n+(d?n*2:s.members.length===0&&s.methods.length===0?-n:0),m),_=o.insert(()=>k,":first-child");_.attr("class","basic label-container");let T=_.node().getBBox();o.selectAll(".text").each((I,P,O)=>{let C=dt(O[P]),N=C.attr("transform"),B=0;if(N){let z=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(N);z&&(B=parseFloat(z[2]))}let F=B+x+n-(d?n:s.members.length===0&&s.methods.length===0?-n/2:0);a||(F-=4);let M=v;(C.attr("class").includes("label-group")||C.attr("class").includes("annotation-group"))&&(M=-C.node()?.getBBox().width/2||0,o.selectAll("text").each(function($,z,q){window.getComputedStyle(q[z]).textAnchor==="middle"&&(M=0)})),C.attr("transform",`translate(${M}, ${F})`)});let S=o.select(".annotation-group").node().getBBox().height-(d?n/2:0)||0,R=o.select(".label-group").node().getBBox().height-(d?n/2:0)||0,A=o.select(".members-group").node().getBBox().height-(d?n/2:0)||0;if(s.members.length>0||s.methods.length>0||d){let I=p.line(T.x,S+R+x+n,T.x+T.width,S+R+x+n,m);o.insert(()=>I).attr("class","divider").attr("style",f)}if(d||s.members.length>0||s.methods.length>0){let I=p.line(T.x,S+R+A+x+i*2+n,T.x+T.width,S+R+A+x+n+i*2,m);o.insert(()=>I).attr("class","divider").attr("style",f)}if(s.look!=="handDrawn"&&o.selectAll("path").attr("style",f),_.select(":nth-child(2)").attr("style",f),o.selectAll(".divider").select("path").attr("style",f),e.labelStyle?o.selectAll("span").attr("style",e.labelStyle):o.selectAll("span").attr("style",f),!a){let I=RegExp(/color\s*:\s*([^;]*)/),P=I.exec(f);if(P){let O=P[0].replace("color","fill");o.selectAll("tspan").attr("style",O)}else if(u){let O=I.exec(u);if(O){let C=O[0].replace("color","fill");o.selectAll("tspan").attr("style",C)}}}return ur(e,_),e.intersect=function(I){return or.rect(e,I)},o}async function yde(t,e){let{labelStyles:r,nodeStyles:n}=dr(e);e.labelStyle=r;let i=e,a=e,s=20,o=20,l="verifyMethod"in e,u=Sr(e),h=t.insert("g").attr("class",u).attr("id",e.domId??e.id),f;l?f=await c0(h,`<<${i.type}>>`,0,e.labelStyle):f=await c0(h,"<<Element>>",0,e.labelStyle);let d=f,p=await c0(h,i.name,d,e.labelStyle+"; font-weight: bold;");if(d+=p+o,l){let S=await c0(h,`${i.requirementId?`Id: ${i.requirementId}`:""}`,d,e.labelStyle);d+=S;let R=await c0(h,`${i.text?`Text: ${i.text}`:""}`,d,e.labelStyle);d+=R;let A=await c0(h,`${i.risk?`Risk: ${i.risk}`:""}`,d,e.labelStyle);d+=A,await c0(h,`${i.verifyMethod?`Verification: ${i.verifyMethod}`:""}`,d,e.labelStyle)}else{let S=await c0(h,`${a.type?`Type: ${a.type}`:""}`,d,e.labelStyle);d+=S,await c0(h,`${a.docRef?`Doc Ref: ${a.docRef}`:""}`,d,e.labelStyle)}let m=(h.node()?.getBBox().width??200)+s,g=(h.node()?.getBBox().height??200)+s,y=-m/2,v=-g/2,x=xt.svg(h),k=cr(e,{});e.look!=="handDrawn"&&(k.roughness=0,k.fillStyle="solid");let _=x.rectangle(y,v,m,g,k),T=h.insert(()=>_,":first-child");if(T.attr("class","basic label-container").attr("style",n),h.selectAll(".label").each((S,R,A)=>{let I=dt(A[R]),P=I.attr("transform"),O=0,C=0;if(P){let M=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(P);M&&(O=parseFloat(M[1]),C=parseFloat(M[2]))}let N=C-g/2,B=y+s/2;(R===0||R===1)&&(B=O),I.attr("transform",`translate(${B}, ${N+s})`)}),d>f+p+o){let S=x.line(y,v+f+p+o,y+m,v+f+p+o,k);h.insert(()=>S).attr("style",n)}return ur(e,T),e.intersect=function(S){return or.rect(e,S)},h}async function c0(t,e,r,n=""){if(e==="")return 0;let i=t.insert("g").attr("class","label").attr("style",n),a=Fe(),s=a.htmlLabels??!0,o=await qa(i,pT(Jo(e)),{width:_s(e,a)+50,classes:"markdown-node-label",useHtmlLabels:s,style:n},a),l;if(s){let u=o.children[0],h=dt(o);l=u.getBoundingClientRect(),h.attr("width",l.width),h.attr("height",l.height)}else{let u=o.children[0];for(let h of u.children)h.textContent=h.textContent.replaceAll(">",">").replaceAll("<","<"),n&&h.setAttribute("style",n);l=o.getBBox(),l.height+=6}return i.attr("transform",`translate(${-l.width/2},${-l.height/2+r})`),l.height}async function vde(t,e,{config:r}){let{labelStyles:n,nodeStyles:i}=dr(e);e.labelStyle=n||"";let a=10,s=e.width;e.width=(e.width??200)-10;let{shapeSvg:o,bbox:l,label:u}=await _r(t,e,Sr(e)),h=e.padding||10,f="",d;"ticket"in e&&e.ticket&&r?.kanban?.ticketBaseUrl&&(f=r?.kanban?.ticketBaseUrl.replace("#TICKET#",e.ticket),d=o.insert("svg:a",":first-child").attr("class","kanban-ticket-link").attr("xlink:href",f).attr("target","_blank"));let p={useHtmlLabels:e.useHtmlLabels,labelStyle:e.labelStyle||"",width:e.width,img:e.img,padding:e.padding||8,centerLabel:!1},m,g;d?{label:m,bbox:g}=await PF(d,"ticket"in e&&e.ticket||"",p):{label:m,bbox:g}=await PF(o,"ticket"in e&&e.ticket||"",p);let{label:y,bbox:v}=await PF(o,"assigned"in e&&e.assigned||"",p);e.width=s;let x=10,k=e?.width||0,_=Math.max(g.height,v.height)/2,T=Math.max(l.height+x*2,e?.height||0)+_,S=-k/2,R=-T/2;u.attr("transform","translate("+(h-k/2)+", "+(-_-l.height/2)+")"),m.attr("transform","translate("+(h-k/2)+", "+(-_+l.height/2)+")"),y.attr("transform","translate("+(h+k/2-v.width-2*a)+", "+(-_+l.height/2)+")");let A,{rx:I,ry:P}=e,{cssStyles:O}=e;if(e.look==="handDrawn"){let C=xt.svg(o),N=cr(e,{}),B=I||P?C.path(Wh(S,R,k,T,I||0),N):C.rectangle(S,R,k,T,N);A=o.insert(()=>B,":first-child"),A.attr("class","basic label-container").attr("style",O||null)}else{A=o.insert("rect",":first-child"),A.attr("class","basic label-container __APA__").attr("style",i).attr("rx",I??5).attr("ry",P??5).attr("x",S).attr("y",R).attr("width",k).attr("height",T);let C="priority"in e&&e.priority;if(C){let N=o.append("line"),B=S+2,F=R+Math.floor((I??0)/2),M=R+T-Math.floor((I??0)/2);N.attr("x1",B).attr("y1",F).attr("x2",B).attr("y2",M).attr("stroke-width","4").attr("stroke",pJe(C))}}return ur(e,A),e.height=T,e.intersect=function(C){return or.rect(e,C)},o}function qF(t){return t in xde}async function nm(t,e,r){let n,i;e.shape==="rect"&&(e.rx&&e.ry?e.shape="roundedRect":e.shape="squareRect");let a=e.shape?xde[e.shape]:void 0;if(!a)throw new Error(`No such shape: ${e.shape}. Please check your syntax.`);if(e.link){let s;r.config.securityLevel==="sandbox"?s="_top":e.linkTarget&&(s=e.linkTarget||"_blank"),n=t.insert("svg:a").attr("xlink:href",e.link).attr("target",s??null),i=await a(n,e,r)}else i=await a(t,e,r),n=i;return e.tooltip&&i.attr("title",e.tooltip),NE.set(e.id,n),e.haveCallback&&n.attr("class",n.attr("class")+" clickable"),n}var _r,PF,ur,Sr,UQe,iy,HQe,Ad,Wh,VQe,ay,WQe,$F,dr,cr,nfe,YQe,XQe,jQe,KQe,ZQe,QQe,ife,sy,afe,JQe,lfe,eJe,tJe,rJe,or,nJe,iJe,aJe,sJe,oJe,lJe,uJe,cJe,hJe,fJe,dJe,pJe,mJe,gJe,xde,NE,bde,wde,O5,Il=D(()=>{Wo();Al();As();Hn();Nr();Or();Or();fr();Or();fr();fr();fr();fr();fr();fr();fr();fr();fr();fr();fr();fr();fr();fr();fr();fr();fr();fr();fr();fr();fr();fr();fr();fr();fr();fr();fr();fr();fr();fr();fr();fr();fr();fr();fr();fr();Or();fr();fr();fr();fr();fr();fr();fr();fr();fr();fr();fr();fr();fr();fr();fr();fr();fr();Or();Or();fr();Or();fr();Or();fr();_r=b(async(t,e,r)=>{let n,i=e.useHtmlLabels||dn(Fe()?.htmlLabels);r?n=r:n="node default";let a=t.insert("g").attr("class",n).attr("id",e.domId||e.id),s=a.insert("g").attr("class","label").attr("style",Vs(e.labelStyle)),o;e.label===void 0?o="":o=typeof e.label=="string"?e.label:e.label[0];let l=await qa(s,Qr(Jo(o),Fe()),{useHtmlLabels:i,width:e.width||Fe().flowchart?.wrappingWidth,cssClasses:"markdown-node-label",style:e.labelStyle,addSvgBackground:!!e.icon||!!e.img}),u=l.getBBox(),h=(e?.padding??0)/2;if(i){let f=l.children[0],d=dt(l),p=f.getElementsByTagName("img");if(p){let m=o.replace(/]*>/g,"").trim()==="";await Promise.all([...p].map(g=>new Promise(y=>{function v(){if(g.style.display="flex",g.style.flexDirection="column",m){let x=Fe().fontSize?Fe().fontSize:window.getComputedStyle(document.body).fontSize,k=5,[_=Ir.fontSize]=cu(x),T=_*k+"px";g.style.minWidth=T,g.style.maxWidth=T}else g.style.width="100%";y(g)}b(v,"setupImage"),setTimeout(()=>{g.complete&&v()}),g.addEventListener("error",v),g.addEventListener("load",v)})))}u=f.getBoundingClientRect(),d.attr("width",u.width),d.attr("height",u.height)}return i?s.attr("transform","translate("+-u.width/2+", "+-u.height/2+")"):s.attr("transform","translate(0, "+-u.height/2+")"),e.centerLabel&&s.attr("transform","translate("+-u.width/2+", "+-u.height/2+")"),s.insert("rect",":first-child"),{shapeSvg:a,bbox:u,halfPadding:h,label:s}},"labelHelper"),PF=b(async(t,e,r)=>{let n=r.useHtmlLabels||dn(Fe()?.flowchart?.htmlLabels),i=t.insert("g").attr("class","label").attr("style",r.labelStyle||""),a=await qa(i,Qr(Jo(e),Fe()),{useHtmlLabels:n,width:r.width||Fe()?.flowchart?.wrappingWidth,style:r.labelStyle,addSvgBackground:!!r.icon||!!r.img}),s=a.getBBox(),o=r.padding/2;if(dn(Fe()?.flowchart?.htmlLabels)){let l=a.children[0],u=dt(a);s=l.getBoundingClientRect(),u.attr("width",s.width),u.attr("height",s.height)}return n?i.attr("transform","translate("+-s.width/2+", "+-s.height/2+")"):i.attr("transform","translate(0, "+-s.height/2+")"),r.centerLabel&&i.attr("transform","translate("+-s.width/2+", "+-s.height/2+")"),i.insert("rect",":first-child"),{shapeSvg:t,bbox:s,halfPadding:o,label:i}},"insertLabel"),ur=b((t,e)=>{let r=e.node().getBBox();t.width=r.width,t.height=r.height},"updateNodeBounds"),Sr=b((t,e)=>(t.look==="handDrawn"?"rough-node":"node")+" "+t.cssClasses+" "+(e||""),"getNodeClasses");b(fn,"createPathFromPoints");b(_d,"generateFullSineWavePoints");b(zF,"generateCirclePoints");UQe=b((t,e)=>{var r=t.x,n=t.y,i=e.x-r,a=e.y-n,s=t.width/2,o=t.height/2,l,u;return Math.abs(a)*s>Math.abs(i)*o?(a<0&&(o=-o),l=a===0?0:o*i/a,u=o):(i<0&&(s=-s),l=s,u=i===0?0:s*a/i),{x:r+l,y:n+u}},"intersectRect"),iy=UQe;b(tfe,"applyStyle");b(rfe,"addHtmlLabel");HQe=b(async(t,e,r,n)=>{let i=t||"";if(typeof i=="object"&&(i=i[0]),dn(Fe().flowchart.htmlLabels)){i=i.replace(/\\n|\n/g,"
    "),he.info("vertexText"+i);let a={isNode:n,label:Jo(i).replace(/fa[blrs]?:fa-[\w-]+/g,o=>``),labelStyle:e&&e.replace("fill:","color:")};return await rfe(a)}else{let a=document.createElementNS("http://www.w3.org/2000/svg","text");a.setAttribute("style",e.replace("color:","fill:"));let s=[];typeof i=="string"?s=i.split(/\\n|\n|/gi):Array.isArray(i)?s=i:s=[];for(let o of s){let l=document.createElementNS("http://www.w3.org/2000/svg","tspan");l.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),l.setAttribute("dy","1em"),l.setAttribute("x","0"),r?l.setAttribute("class","title-row"):l.setAttribute("class","row"),l.textContent=o.trim(),a.appendChild(l)}return a}},"createLabel"),Ad=HQe,Wh=b((t,e,r,n,i)=>["M",t+i,e,"H",t+r-i,"A",i,i,0,0,1,t+r,e+i,"V",e+n-i,"A",i,i,0,0,1,t+r-i,e+n,"H",t+i,"A",i,i,0,0,1,t,e+n-i,"V",e+i,"A",i,i,0,0,1,t+i,e,"Z"].join(" "),"createRoundedRectPathD"),VQe=b(t=>{let{handDrawnSeed:e}=Fe();return{fill:t,hachureAngle:120,hachureGap:4,fillWeight:2,roughness:.7,stroke:t,seed:e}},"solidStateFill"),ay=b(t=>{let e=WQe([...t.cssCompiledStyles||[],...t.cssStyles||[]]);return{stylesMap:e,stylesArray:[...e]}},"compileStyles"),WQe=b(t=>{let e=new Map;return t.forEach(r=>{let[n,i]=r.split(":");e.set(n.trim(),i?.trim())}),e},"styles2Map"),$F=b(t=>t==="color"||t==="font-size"||t==="font-family"||t==="font-weight"||t==="font-style"||t==="text-decoration"||t==="text-align"||t==="text-transform"||t==="line-height"||t==="letter-spacing"||t==="word-spacing"||t==="text-shadow"||t==="text-overflow"||t==="white-space"||t==="word-wrap"||t==="word-break"||t==="overflow-wrap"||t==="hyphens","isLabelStyle"),dr=b(t=>{let{stylesArray:e}=ay(t),r=[],n=[],i=[],a=[];return e.forEach(s=>{let o=s[0];$F(o)?r.push(s.join(":")+" !important"):(n.push(s.join(":")+" !important"),o.includes("stroke")&&i.push(s.join(":")+" !important"),o==="fill"&&a.push(s.join(":")+" !important"))}),{labelStyles:r.join(";"),nodeStyles:n.join(";"),stylesArray:e,borderStyles:i,backgroundStyles:a}},"styles2String"),cr=b((t,e)=>{let{themeVariables:r,handDrawnSeed:n}=Fe(),{nodeBorder:i,mainBkg:a}=r,{stylesMap:s}=ay(t);return Object.assign({roughness:.7,fill:s.get("fill")||a,fillStyle:"hachure",fillWeight:4,hachureGap:5.2,stroke:s.get("stroke")||i,seed:n,strokeWidth:s.get("stroke-width")?.replace("px","")||1.3,fillLineDash:[0,0]},e)},"userNodeOverrides"),nfe=b(async(t,e)=>{he.info("Creating subgraph rect for ",e.id,e);let r=Fe(),{themeVariables:n,handDrawnSeed:i}=r,{clusterBkg:a,clusterBorder:s}=n,{labelStyles:o,nodeStyles:l,borderStyles:u,backgroundStyles:h}=dr(e),f=t.insert("g").attr("class","cluster "+e.cssClasses).attr("id",e.id).attr("data-look",e.look),d=dn(r.flowchart.htmlLabels),p=f.insert("g").attr("class","cluster-label "),m=await qa(p,e.label,{style:e.labelStyle,useHtmlLabels:d,isNode:!0}),g=m.getBBox();if(dn(r.flowchart.htmlLabels)){let R=m.children[0],A=dt(m);g=R.getBoundingClientRect(),A.attr("width",g.width),A.attr("height",g.height)}let y=e.width<=g.width+e.padding?g.width+e.padding:e.width;e.width<=g.width+e.padding?e.diff=(y-e.width)/2-e.padding:e.diff=-e.padding;let v=e.height,x=e.x-y/2,k=e.y-v/2;he.trace("Data ",e,JSON.stringify(e));let _;if(e.look==="handDrawn"){let R=xt.svg(f),A=cr(e,{roughness:.7,fill:a,stroke:s,fillWeight:3,seed:i}),I=R.path(Wh(x,k,y,v,0),A);_=f.insert(()=>(he.debug("Rough node insert CXC",I),I),":first-child"),_.select("path:nth-child(2)").attr("style",u.join(";")),_.select("path").attr("style",h.join(";").replace("fill","stroke"))}else _=f.insert("rect",":first-child"),_.attr("style",l).attr("rx",e.rx).attr("ry",e.ry).attr("x",x).attr("y",k).attr("width",y).attr("height",v);let{subGraphTitleTopMargin:T}=Ch(r);if(p.attr("transform",`translate(${e.x-g.width/2}, ${e.y-e.height/2+T})`),o){let R=p.select("span");R&&R.attr("style",o)}let S=_.node().getBBox();return e.offsetX=0,e.width=S.width,e.height=S.height,e.offsetY=g.height-e.padding/2,e.intersect=function(R){return iy(e,R)},{cluster:f,labelBBox:g}},"rect"),YQe=b((t,e)=>{let r=t.insert("g").attr("class","note-cluster").attr("id",e.id),n=r.insert("rect",":first-child"),i=0*e.padding,a=i/2;n.attr("rx",e.rx).attr("ry",e.ry).attr("x",e.x-e.width/2-a).attr("y",e.y-e.height/2-a).attr("width",e.width+i).attr("height",e.height+i).attr("fill","none");let s=n.node().getBBox();return e.width=s.width,e.height=s.height,e.intersect=function(o){return iy(e,o)},{cluster:r,labelBBox:{width:0,height:0}}},"noteGroup"),XQe=b(async(t,e)=>{let r=Fe(),{themeVariables:n,handDrawnSeed:i}=r,{altBackground:a,compositeBackground:s,compositeTitleBackground:o,nodeBorder:l}=n,u=t.insert("g").attr("class",e.cssClasses).attr("id",e.id).attr("data-id",e.id).attr("data-look",e.look),h=u.insert("g",":first-child"),f=u.insert("g").attr("class","cluster-label"),d=u.append("rect"),p=f.node().appendChild(await Ad(e.label,e.labelStyle,void 0,!0)),m=p.getBBox();if(dn(r.flowchart.htmlLabels)){let I=p.children[0],P=dt(p);m=I.getBoundingClientRect(),P.attr("width",m.width),P.attr("height",m.height)}let g=0*e.padding,y=g/2,v=(e.width<=m.width+e.padding?m.width+e.padding:e.width)+g;e.width<=m.width+e.padding?e.diff=(v-e.width)/2-e.padding:e.diff=-e.padding;let x=e.height+g,k=e.height+g-m.height-6,_=e.x-v/2,T=e.y-x/2;e.width=v;let S=e.y-e.height/2-y+m.height+2,R;if(e.look==="handDrawn"){let I=e.cssClasses.includes("statediagram-cluster-alt"),P=xt.svg(u),O=e.rx||e.ry?P.path(Wh(_,T,v,x,10),{roughness:.7,fill:o,fillStyle:"solid",stroke:l,seed:i}):P.rectangle(_,T,v,x,{seed:i});R=u.insert(()=>O,":first-child");let C=P.rectangle(_,S,v,k,{fill:I?a:s,fillStyle:I?"hachure":"solid",stroke:l,seed:i});R=u.insert(()=>O,":first-child"),d=u.insert(()=>C)}else R=h.insert("rect",":first-child"),R.attr("class","outer").attr("x",_).attr("y",T).attr("width",v).attr("height",x).attr("data-look",e.look),d.attr("class","inner").attr("x",_).attr("y",S).attr("width",v).attr("height",k);f.attr("transform",`translate(${e.x-m.width/2}, ${T+1-(dn(r.flowchart.htmlLabels)?0:3)})`);let A=R.node().getBBox();return e.height=A.height,e.offsetX=0,e.offsetY=m.height-e.padding/2,e.labelBBox=m,e.intersect=function(I){return iy(e,I)},{cluster:u,labelBBox:m}},"roundedWithTitle"),jQe=b(async(t,e)=>{he.info("Creating subgraph rect for ",e.id,e);let r=Fe(),{themeVariables:n,handDrawnSeed:i}=r,{clusterBkg:a,clusterBorder:s}=n,{labelStyles:o,nodeStyles:l,borderStyles:u,backgroundStyles:h}=dr(e),f=t.insert("g").attr("class","cluster "+e.cssClasses).attr("id",e.id).attr("data-look",e.look),d=dn(r.flowchart.htmlLabels),p=f.insert("g").attr("class","cluster-label "),m=await qa(p,e.label,{style:e.labelStyle,useHtmlLabels:d,isNode:!0,width:e.width}),g=m.getBBox();if(dn(r.flowchart.htmlLabels)){let R=m.children[0],A=dt(m);g=R.getBoundingClientRect(),A.attr("width",g.width),A.attr("height",g.height)}let y=e.width<=g.width+e.padding?g.width+e.padding:e.width;e.width<=g.width+e.padding?e.diff=(y-e.width)/2-e.padding:e.diff=-e.padding;let v=e.height,x=e.x-y/2,k=e.y-v/2;he.trace("Data ",e,JSON.stringify(e));let _;if(e.look==="handDrawn"){let R=xt.svg(f),A=cr(e,{roughness:.7,fill:a,stroke:s,fillWeight:4,seed:i}),I=R.path(Wh(x,k,y,v,e.rx),A);_=f.insert(()=>(he.debug("Rough node insert CXC",I),I),":first-child"),_.select("path:nth-child(2)").attr("style",u.join(";")),_.select("path").attr("style",h.join(";").replace("fill","stroke"))}else _=f.insert("rect",":first-child"),_.attr("style",l).attr("rx",e.rx).attr("ry",e.ry).attr("x",x).attr("y",k).attr("width",y).attr("height",v);let{subGraphTitleTopMargin:T}=Ch(r);if(p.attr("transform",`translate(${e.x-g.width/2}, ${e.y-e.height/2+T})`),o){let R=p.select("span");R&&R.attr("style",o)}let S=_.node().getBBox();return e.offsetX=0,e.width=S.width,e.height=S.height,e.offsetY=g.height-e.padding/2,e.intersect=function(R){return iy(e,R)},{cluster:f,labelBBox:g}},"kanbanSection"),KQe=b((t,e)=>{let r=Fe(),{themeVariables:n,handDrawnSeed:i}=r,{nodeBorder:a}=n,s=t.insert("g").attr("class",e.cssClasses).attr("id",e.id).attr("data-look",e.look),o=s.insert("g",":first-child"),l=0*e.padding,u=e.width+l;e.diff=-e.padding;let h=e.height+l,f=e.x-u/2,d=e.y-h/2;e.width=u;let p;if(e.look==="handDrawn"){let y=xt.svg(s).rectangle(f,d,u,h,{fill:"lightgrey",roughness:.5,strokeLineDash:[5],stroke:a,seed:i});p=s.insert(()=>y,":first-child")}else p=o.insert("rect",":first-child"),p.attr("class","divider").attr("x",f).attr("y",d).attr("width",u).attr("height",h).attr("data-look",e.look);let m=p.node().getBBox();return e.height=m.height,e.offsetX=0,e.offsetY=0,e.intersect=function(g){return iy(e,g)},{cluster:s,labelBBox:{}}},"divider"),ZQe=nfe,QQe={rect:nfe,squareRect:ZQe,roundedWithTitle:XQe,noteGroup:YQe,divider:KQe,kanbanSection:jQe},ife=new Map,sy=b(async(t,e)=>{let r=e.shape||"rect",n=await QQe[r](t,e);return ife.set(e.id,n),n},"insertCluster"),afe=b(()=>{ife=new Map},"clear");b(sfe,"intersectNode");JQe=sfe;b(ofe,"intersectEllipse");lfe=ofe;b(ufe,"intersectCircle");eJe=ufe;b(cfe,"intersectLine");b(BF,"sameSign");tJe=cfe;b(hfe,"intersectPolygon");rJe=hfe,or={node:JQe,circle:eJe,ellipse:lfe,polygon:rJe,rect:iy};b(ffe,"anchor");b(FF,"generateArcPoints");b(dfe,"bowTieRect");b(Yh,"insertPolygonShape");b(pfe,"card");b(mfe,"choice");b(gfe,"circle");b(yfe,"createLine");b(vfe,"crossedCircle");b(Hh,"generateCirclePoints");b(xfe,"curlyBraceLeft");b(Vh,"generateCirclePoints");b(bfe,"curlyBraceRight");b(Ls,"generateCirclePoints");b(wfe,"curlyBraces");b(kfe,"curvedTrapezoid");nJe=b((t,e,r,n,i,a)=>[`M${t},${e+a}`,`a${i},${a} 0,0,0 ${r},0`,`a${i},${a} 0,0,0 ${-r},0`,`l0,${n}`,`a${i},${a} 0,0,0 ${r},0`,`l0,${-n}`].join(" "),"createCylinderPathD"),iJe=b((t,e,r,n,i,a)=>[`M${t},${e+a}`,`M${t+r},${e+a}`,`a${i},${a} 0,0,0 ${-r},0`,`l0,${n}`,`a${i},${a} 0,0,0 ${r},0`,`l0,${-n}`].join(" "),"createOuterCylinderPathD"),aJe=b((t,e,r,n,i,a)=>[`M${t-r/2},${-n/2}`,`a${i},${a} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD");b(Tfe,"cylinder");b(Efe,"dividedRectangle");b(Sfe,"doublecircle");b(Cfe,"filledCircle");b(_fe,"flippedTriangle");b(Afe,"forkJoin");b(Lfe,"halfRoundedRectangle");sJe=b((t,e,r,n,i)=>[`M${t+i},${e}`,`L${t+r-i},${e}`,`L${t+r},${e-n/2}`,`L${t+r-i},${e-n}`,`L${t+i},${e-n}`,`L${t},${e-n/2}`,"Z"].join(" "),"createHexagonPathD");b(Rfe,"hexagon");b(Dfe,"hourglass");b(Ife,"icon");b(Mfe,"iconCircle");b(Nfe,"iconRounded");b(Ofe,"iconSquare");b(Pfe,"imageSquare");b(Bfe,"inv_trapezoid");b(N5,"drawRect");b(Ffe,"labelRect");b(zfe,"lean_left");b($fe,"lean_right");b(Gfe,"lightningBolt");oJe=b((t,e,r,n,i,a,s)=>[`M${t},${e+a}`,`a${i},${a} 0,0,0 ${r},0`,`a${i},${a} 0,0,0 ${-r},0`,`l0,${n}`,`a${i},${a} 0,0,0 ${r},0`,`l0,${-n}`,`M${t},${e+a+s}`,`a${i},${a} 0,0,0 ${r},0`].join(" "),"createCylinderPathD"),lJe=b((t,e,r,n,i,a,s)=>[`M${t},${e+a}`,`M${t+r},${e+a}`,`a${i},${a} 0,0,0 ${-r},0`,`l0,${n}`,`a${i},${a} 0,0,0 ${r},0`,`l0,${-n}`,`M${t},${e+a+s}`,`a${i},${a} 0,0,0 ${r},0`].join(" "),"createOuterCylinderPathD"),uJe=b((t,e,r,n,i,a)=>[`M${t-r/2},${-n/2}`,`a${i},${a} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD");b(qfe,"linedCylinder");b(Ufe,"linedWaveEdgedRect");b(Hfe,"multiRect");b(Vfe,"multiWaveEdgedRectangle");b(Wfe,"note");cJe=b((t,e,r)=>[`M${t+r/2},${e}`,`L${t+r},${e-r/2}`,`L${t+r/2},${e-r}`,`L${t},${e-r/2}`,"Z"].join(" "),"createDecisionBoxPathD");b(Yfe,"question");b(Xfe,"rect_left_inv_arrow");b(jfe,"rectWithTitle");b(Kfe,"roundedRect");b(Zfe,"shadedProcess");b(Qfe,"slopedRect");b(Jfe,"squareRect");b(ede,"stadium");b(tde,"state");b(rde,"stateEnd");b(nde,"stateStart");b(ide,"subroutine");b(ade,"taggedRect");b(sde,"taggedWaveEdgedRectangle");b(ode,"text");hJe=b((t,e,r,n,i,a)=>`M${t},${e} + a${i},${a} 0,0,1 0,${-n} l${r},0 - a${a},${i} 0,0,1 0,${n} + a${i},${a} 0,0,1 0,${n} M${r},${-n} - a${a},${i} 0,0,0 0,${n} - l${-r},0`,"createCylinderPathD"),OXe=x((t,e,r,n,a,i)=>[`M${t},${e}`,`M${t+r},${e}`,`a${a},${i} 0,0,0 0,${-n}`,`l${-r},0`,`a${a},${i} 0,0,0 0,${n}`,`l${r},0`].join(" "),"createOuterCylinderPathD"),PXe=x((t,e,r,n,a,i)=>[`M${t+r/2},${-n/2}`,`a${a},${i} 0,0,0 0,${n}`].join(" "),"createInnerCylinderPathD");x(Pce,"tiltedCylinder");x(Bce,"trapezoid");x(Fce,"trapezoidalPentagon");x(zce,"triangle");x($ce,"waveEdgedRectangle");x(Gce,"waveRectangle");x(Uce,"windowPane");x(LP,"erBox");x(V1,"addText");x(qce,"textHelper");x(g3,"addText");x(Vce,"classBox");x(Hce,"requirementBox");x(oc,"addText");BXe=x(t=>{switch(t){case"Very High":return"red";case"High":return"orange";case"Medium":return null;case"Low":return"blue";case"Very Low":return"lightblue"}},"colorFromPriority");x(Wce,"kanbanItem");FXe=[{semanticName:"Process",name:"Rectangle",shortName:"rect",description:"Standard process shape",aliases:["proc","process","rectangle"],internalAliases:["squareRect"],handler:_ce},{semanticName:"Event",name:"Rounded Rectangle",shortName:"rounded",description:"Represents an event",aliases:["event"],internalAliases:["roundedRect"],handler:Ece},{semanticName:"Terminal Point",name:"Stadium",shortName:"stadium",description:"Terminal point",aliases:["terminal","pill"],handler:Ace},{semanticName:"Subprocess",name:"Framed Rectangle",shortName:"fr-rect",description:"Subprocess",aliases:["subprocess","subproc","framed-rectangle","subroutine"],handler:Dce},{semanticName:"Database",name:"Cylinder",shortName:"cyl",description:"Database storage",aliases:["db","database","cylinder"],handler:Zue},{semanticName:"Start",name:"Circle",shortName:"circle",description:"Starting point",aliases:["circ"],handler:Vue},{semanticName:"Decision",name:"Diamond",shortName:"diam",description:"Decision-making step",aliases:["decision","diamond","question"],handler:wce},{semanticName:"Prepare Conditional",name:"Hexagon",shortName:"hex",description:"Preparation or condition step",aliases:["hexagon","prepare"],handler:ace},{semanticName:"Data Input/Output",name:"Lean Right",shortName:"lean-r",description:"Represents input or output",aliases:["lean-right","in-out"],internalAliases:["lean_right"],handler:pce},{semanticName:"Data Input/Output",name:"Lean Left",shortName:"lean-l",description:"Represents output or input",aliases:["lean-left","out-in"],internalAliases:["lean_left"],handler:dce},{semanticName:"Priority Action",name:"Trapezoid Base Bottom",shortName:"trap-b",description:"Priority action",aliases:["priority","trapezoid-bottom","trapezoid"],handler:Bce},{semanticName:"Manual Operation",name:"Trapezoid Base Top",shortName:"trap-t",description:"Represents a manual task",aliases:["manual","trapezoid-top","inv-trapezoid"],internalAliases:["inv_trapezoid"],handler:hce},{semanticName:"Stop",name:"Double Circle",shortName:"dbl-circ",description:"Represents a stop point",aliases:["double-circle"],internalAliases:["doublecircle"],handler:Jue},{semanticName:"Text Block",name:"Text Block",shortName:"text",description:"Text block",handler:Oce},{semanticName:"Card",name:"Notched Rectangle",shortName:"notch-rect",description:"Represents a card",aliases:["card","notched-rectangle"],handler:Uue},{semanticName:"Lined/Shaded Process",name:"Lined Rectangle",shortName:"lin-rect",description:"Lined process shape",aliases:["lined-rectangle","lined-process","lin-proc","shaded-process"],handler:Cce},{semanticName:"Start",name:"Small Circle",shortName:"sm-circ",description:"Small starting point",aliases:["start","small-circle"],internalAliases:["stateStart"],handler:Ice},{semanticName:"Stop",name:"Framed Circle",shortName:"fr-circ",description:"Stop point",aliases:["stop","framed-circle"],internalAliases:["stateEnd"],handler:Rce},{semanticName:"Fork/Join",name:"Filled Rectangle",shortName:"fork",description:"Fork or join in process flow",aliases:["join"],internalAliases:["forkJoin"],handler:rce},{semanticName:"Collate",name:"Hourglass",shortName:"hourglass",description:"Represents a collate operation",aliases:["hourglass","collate"],handler:ice},{semanticName:"Comment",name:"Curly Brace",shortName:"brace",description:"Adds a comment",aliases:["comment","brace-l"],handler:Yue},{semanticName:"Comment Right",name:"Curly Brace",shortName:"brace-r",description:"Adds a comment",handler:Xue},{semanticName:"Comment with braces on both sides",name:"Curly Braces",shortName:"braces",description:"Adds a comment",handler:jue},{semanticName:"Com Link",name:"Lightning Bolt",shortName:"bolt",description:"Communication link",aliases:["com-link","lightning-bolt"],handler:mce},{semanticName:"Document",name:"Document",shortName:"doc",description:"Represents a document",aliases:["doc","document"],handler:$ce},{semanticName:"Delay",name:"Half-Rounded Rectangle",shortName:"delay",description:"Represents a delay",aliases:["half-rounded-rectangle"],handler:nce},{semanticName:"Direct Access Storage",name:"Horizontal Cylinder",shortName:"h-cyl",description:"Direct access storage",aliases:["das","horizontal-cylinder"],handler:Pce},{semanticName:"Disk Storage",name:"Lined Cylinder",shortName:"lin-cyl",description:"Disk storage",aliases:["disk","lined-cylinder"],handler:gce},{semanticName:"Display",name:"Curved Trapezoid",shortName:"curv-trap",description:"Represents a display",aliases:["curved-trapezoid","display"],handler:Kue},{semanticName:"Divided Process",name:"Divided Rectangle",shortName:"div-rect",description:"Divided process shape",aliases:["div-proc","divided-rectangle","divided-process"],handler:Que},{semanticName:"Extract",name:"Triangle",shortName:"tri",description:"Extraction process",aliases:["extract","triangle"],handler:zce},{semanticName:"Internal Storage",name:"Window Pane",shortName:"win-pane",description:"Internal storage",aliases:["internal-storage","window-pane"],handler:Uce},{semanticName:"Junction",name:"Filled Circle",shortName:"f-circ",description:"Junction point",aliases:["junction","filled-circle"],handler:ece},{semanticName:"Loop Limit",name:"Trapezoidal Pentagon",shortName:"notch-pent",description:"Loop limit step",aliases:["loop-limit","notched-pentagon"],handler:Fce},{semanticName:"Manual File",name:"Flipped Triangle",shortName:"flip-tri",description:"Manual file operation",aliases:["manual-file","flipped-triangle"],handler:tce},{semanticName:"Manual Input",name:"Sloped Rectangle",shortName:"sl-rect",description:"Manual input step",aliases:["manual-input","sloped-rectangle"],handler:Sce},{semanticName:"Multi-Document",name:"Stacked Document",shortName:"docs",description:"Multiple documents",aliases:["documents","st-doc","stacked-document"],handler:xce},{semanticName:"Multi-Process",name:"Stacked Rectangle",shortName:"st-rect",description:"Multiple processes",aliases:["procs","processes","stacked-rectangle"],handler:yce},{semanticName:"Stored Data",name:"Bow Tie Rectangle",shortName:"bow-rect",description:"Stored data",aliases:["stored-data","bow-tie-rectangle"],handler:Gue},{semanticName:"Summary",name:"Crossed Circle",shortName:"cross-circ",description:"Summary",aliases:["summary","crossed-circle"],handler:Wue},{semanticName:"Tagged Document",name:"Tagged Document",shortName:"tag-doc",description:"Tagged document",aliases:["tag-doc","tagged-document"],handler:Mce},{semanticName:"Tagged Process",name:"Tagged Rectangle",shortName:"tag-rect",description:"Tagged process",aliases:["tagged-rectangle","tag-proc","tagged-process"],handler:Nce},{semanticName:"Paper Tape",name:"Flag",shortName:"flag",description:"Paper tape",aliases:["paper-tape"],handler:Gce},{semanticName:"Odd",name:"Odd",shortName:"odd",description:"Odd shape",internalAliases:["rect_left_inv_arrow"],handler:kce},{semanticName:"Lined Document",name:"Lined Document",shortName:"lin-doc",description:"Lined document",aliases:["lined-document"],handler:vce}],zXe=x(()=>{let e=[...Object.entries({state:Lce,choice:que,note:bce,rectWithTitle:Tce,labelRect:fce,iconSquare:uce,iconCircle:oce,icon:sce,iconRounded:lce,imageSquare:cce,anchor:$ue,kanbanItem:Wce,classBox:Vce,erBox:LP,requirementBox:Hce}),...FXe.flatMap(r=>[r.shortName,..."aliases"in r?r.aliases:[],..."internalAliases"in r?r.internalAliases:[]].map(a=>[a,r.handler]))];return Object.fromEntries(e)},"generateShapeMap"),Yce=zXe();x(RP,"isValidShape");eS=new Map;x(Xp,"insertNode");Xce=x((t,e)=>{eS.set(e.id,t)},"setNodeElem"),jce=x(()=>{eS.clear()},"clear"),y3=x(t=>{let e=eS.get(t.id);te.trace("Transforming node",t.diff,t,"translate("+(t.x-t.width/2-5)+", "+t.width/2+")");let r=8,n=t.diff||0;return t.clusterNode?e.attr("transform","translate("+(t.x+n-t.width/2)+", "+(t.y-t.height/2-r)+")"):e.attr("transform","translate("+t.x+", "+t.y+")"),n},"positionNode")});function b3(t,e){Te().flowchart.htmlLabels&&t&&(t.style.width=e.length*9+"px",t.style.height="12px")}function ehe(t){let e=[],r=[];for(let n=1;n5&&Math.abs(i.y-a.y)>5||a.y===i.y&&i.x===s.x&&Math.abs(i.x-a.x)>5&&Math.abs(i.y-s.y)>5)&&(e.push(i),r.push(n))}return{cornerPoints:e,cornerPointPositions:r}}var $Xe,GXe,Kce,tS,$i,Jce,x3,rS,nS,UXe,qXe,Zce,Qce,VXe,aS,HXe,WXe,YXe,XXe,jXe,KXe,ZXe,QXe,JXe,eje,tje,rje,nje,aje,ije,sje,oje,iS,au=A(()=>{sl();Fo();eo();Fi();ln();ur();cr();Gt();$Xe=x((t,e,r,n,a,i)=>{e.arrowTypeStart&&Kce(t,"start",e.arrowTypeStart,r,n,a,i),e.arrowTypeEnd&&Kce(t,"end",e.arrowTypeEnd,r,n,a,i)},"addEdgeMarkers"),GXe={arrow_cross:{type:"cross",fill:!1},arrow_point:{type:"point",fill:!0},arrow_barb:{type:"barb",fill:!0},arrow_circle:{type:"circle",fill:!1},aggregation:{type:"aggregation",fill:!1},extension:{type:"extension",fill:!1},composition:{type:"composition",fill:!0},dependency:{type:"dependency",fill:!0},lollipop:{type:"lollipop",fill:!1},only_one:{type:"onlyOne",fill:!1},zero_or_one:{type:"zeroOrOne",fill:!1},one_or_more:{type:"oneOrMore",fill:!1},zero_or_more:{type:"zeroOrMore",fill:!1},requirement_arrow:{type:"requirement_arrow",fill:!1},requirement_contains:{type:"requirement_contains",fill:!1}},Kce=x((t,e,r,n,a,i,s)=>{let o=GXe[r];if(!o){te.warn(`Unknown arrow type: ${r}`);return}let l=o.type,h=`${a}_${i}-${l}${e==="start"?"Start":"End"}`;if(s&&s.trim()!==""){let f=s.replace(/[^\dA-Za-z]/g,"_"),d=`${h}_${f}`;if(!document.getElementById(d)){let p=document.getElementById(h);if(p){let m=p.cloneNode(!0);m.id=d,m.querySelectorAll("path, circle, line").forEach(v=>{v.setAttribute("stroke",s),o.fill&&v.setAttribute("fill",s)}),p.parentNode?.appendChild(m)}}t.attr(`marker-${e}`,`url(${n}#${d})`)}else t.attr(`marker-${e}`,`url(${n}#${h})`)},"addEdgeMarker"),tS=new Map,$i=new Map,Jce=x(()=>{tS.clear(),$i.clear()},"clear"),x3=x(t=>t?t.reduce((r,n)=>r+";"+n,""):"","getLabelStyles"),rS=x(async(t,e)=>{let r=Br(Te().flowchart.htmlLabels),n=await Xa(t,e.label,{style:x3(e.labelStyle),useHtmlLabels:r,addSvgBackground:!0,isNode:!1});te.info("abc82",e,e.labelType);let a=t.insert("g").attr("class","edgeLabel"),i=a.insert("g").attr("class","label");i.node().appendChild(n);let s=n.getBBox();if(r){let l=n.children[0],u=We(n);s=l.getBoundingClientRect(),u.attr("width",s.width),u.attr("height",s.height)}i.attr("transform","translate("+-s.width/2+", "+-s.height/2+")"),tS.set(e.id,a),e.width=s.width,e.height=s.height;let o;if(e.startLabelLeft){let l=await bd(e.startLabelLeft,x3(e.labelStyle)),u=t.insert("g").attr("class","edgeTerminals"),h=u.insert("g").attr("class","inner");o=h.node().appendChild(l);let f=l.getBBox();h.attr("transform","translate("+-f.width/2+", "+-f.height/2+")"),$i.get(e.id)||$i.set(e.id,{}),$i.get(e.id).startLeft=u,b3(o,e.startLabelLeft)}if(e.startLabelRight){let l=await bd(e.startLabelRight,x3(e.labelStyle)),u=t.insert("g").attr("class","edgeTerminals"),h=u.insert("g").attr("class","inner");o=u.node().appendChild(l),h.node().appendChild(l);let f=l.getBBox();h.attr("transform","translate("+-f.width/2+", "+-f.height/2+")"),$i.get(e.id)||$i.set(e.id,{}),$i.get(e.id).startRight=u,b3(o,e.startLabelRight)}if(e.endLabelLeft){let l=await bd(e.endLabelLeft,x3(e.labelStyle)),u=t.insert("g").attr("class","edgeTerminals"),h=u.insert("g").attr("class","inner");o=h.node().appendChild(l);let f=l.getBBox();h.attr("transform","translate("+-f.width/2+", "+-f.height/2+")"),u.node().appendChild(l),$i.get(e.id)||$i.set(e.id,{}),$i.get(e.id).endLeft=u,b3(o,e.endLabelLeft)}if(e.endLabelRight){let l=await bd(e.endLabelRight,x3(e.labelStyle)),u=t.insert("g").attr("class","edgeTerminals"),h=u.insert("g").attr("class","inner");o=h.node().appendChild(l);let f=l.getBBox();h.attr("transform","translate("+-f.width/2+", "+-f.height/2+")"),u.node().appendChild(l),$i.get(e.id)||$i.set(e.id,{}),$i.get(e.id).endRight=u,b3(o,e.endLabelRight)}return n},"insertEdgeLabel");x(b3,"setTerminalWidth");nS=x((t,e)=>{te.debug("Moving label abc88 ",t.id,t.label,tS.get(t.id),e);let r=e.updatedPath?e.updatedPath:e.originalPath,n=Te(),{subGraphTitleTotalMargin:a}=wh(n);if(t.label){let i=tS.get(t.id),s=t.x,o=t.y;if(r){let l=Wt.calcLabelPosition(r);te.debug("Moving label "+t.label+" from (",s,",",o,") to (",l.x,",",l.y,") abc88"),e.updatedPath&&(s=l.x,o=l.y)}i.attr("transform",`translate(${s}, ${o+a/2})`)}if(t.startLabelLeft){let i=$i.get(t.id).startLeft,s=t.x,o=t.y;if(r){let l=Wt.calcTerminalLabelPosition(t.arrowTypeStart?10:0,"start_left",r);s=l.x,o=l.y}i.attr("transform",`translate(${s}, ${o})`)}if(t.startLabelRight){let i=$i.get(t.id).startRight,s=t.x,o=t.y;if(r){let l=Wt.calcTerminalLabelPosition(t.arrowTypeStart?10:0,"start_right",r);s=l.x,o=l.y}i.attr("transform",`translate(${s}, ${o})`)}if(t.endLabelLeft){let i=$i.get(t.id).endLeft,s=t.x,o=t.y;if(r){let l=Wt.calcTerminalLabelPosition(t.arrowTypeEnd?10:0,"end_left",r);s=l.x,o=l.y}i.attr("transform",`translate(${s}, ${o})`)}if(t.endLabelRight){let i=$i.get(t.id).endRight,s=t.x,o=t.y;if(r){let l=Wt.calcTerminalLabelPosition(t.arrowTypeEnd?10:0,"end_right",r);s=l.x,o=l.y}i.attr("transform",`translate(${s}, ${o})`)}},"positionEdgeLabel"),UXe=x((t,e)=>{let r=t.x,n=t.y,a=Math.abs(e.x-r),i=Math.abs(e.y-n),s=t.width/2,o=t.height/2;return a>=s||i>=o},"outsideNode"),qXe=x((t,e,r)=>{te.debug(`intersection calc abc89: + a${i},${a} 0,0,0 0,${n} + l${-r},0`,"createCylinderPathD"),fJe=b((t,e,r,n,i,a)=>[`M${t},${e}`,`M${t+r},${e}`,`a${i},${a} 0,0,0 0,${-n}`,`l${-r},0`,`a${i},${a} 0,0,0 0,${n}`,`l${r},0`].join(" "),"createOuterCylinderPathD"),dJe=b((t,e,r,n,i,a)=>[`M${t+r/2},${-n/2}`,`a${i},${a} 0,0,0 0,${n}`].join(" "),"createInnerCylinderPathD");b(lde,"tiltedCylinder");b(ude,"trapezoid");b(cde,"trapezoidalPentagon");b(hde,"triangle");b(fde,"waveEdgedRectangle");b(dde,"waveRectangle");b(pde,"windowPane");b(GF,"erBox");b(ny,"addText");b(mde,"textHelper");b(M5,"addText");b(gde,"classBox");b(yde,"requirementBox");b(c0,"addText");pJe=b(t=>{switch(t){case"Very High":return"red";case"High":return"orange";case"Medium":return null;case"Low":return"blue";case"Very Low":return"lightblue"}},"colorFromPriority");b(vde,"kanbanItem");mJe=[{semanticName:"Process",name:"Rectangle",shortName:"rect",description:"Standard process shape",aliases:["proc","process","rectangle"],internalAliases:["squareRect"],handler:Jfe},{semanticName:"Event",name:"Rounded Rectangle",shortName:"rounded",description:"Represents an event",aliases:["event"],internalAliases:["roundedRect"],handler:Kfe},{semanticName:"Terminal Point",name:"Stadium",shortName:"stadium",description:"Terminal point",aliases:["terminal","pill"],handler:ede},{semanticName:"Subprocess",name:"Framed Rectangle",shortName:"fr-rect",description:"Subprocess",aliases:["subprocess","subproc","framed-rectangle","subroutine"],handler:ide},{semanticName:"Database",name:"Cylinder",shortName:"cyl",description:"Database storage",aliases:["db","database","cylinder"],handler:Tfe},{semanticName:"Start",name:"Circle",shortName:"circle",description:"Starting point",aliases:["circ"],handler:gfe},{semanticName:"Decision",name:"Diamond",shortName:"diam",description:"Decision-making step",aliases:["decision","diamond","question"],handler:Yfe},{semanticName:"Prepare Conditional",name:"Hexagon",shortName:"hex",description:"Preparation or condition step",aliases:["hexagon","prepare"],handler:Rfe},{semanticName:"Data Input/Output",name:"Lean Right",shortName:"lean-r",description:"Represents input or output",aliases:["lean-right","in-out"],internalAliases:["lean_right"],handler:$fe},{semanticName:"Data Input/Output",name:"Lean Left",shortName:"lean-l",description:"Represents output or input",aliases:["lean-left","out-in"],internalAliases:["lean_left"],handler:zfe},{semanticName:"Priority Action",name:"Trapezoid Base Bottom",shortName:"trap-b",description:"Priority action",aliases:["priority","trapezoid-bottom","trapezoid"],handler:ude},{semanticName:"Manual Operation",name:"Trapezoid Base Top",shortName:"trap-t",description:"Represents a manual task",aliases:["manual","trapezoid-top","inv-trapezoid"],internalAliases:["inv_trapezoid"],handler:Bfe},{semanticName:"Stop",name:"Double Circle",shortName:"dbl-circ",description:"Represents a stop point",aliases:["double-circle"],internalAliases:["doublecircle"],handler:Sfe},{semanticName:"Text Block",name:"Text Block",shortName:"text",description:"Text block",handler:ode},{semanticName:"Card",name:"Notched Rectangle",shortName:"notch-rect",description:"Represents a card",aliases:["card","notched-rectangle"],handler:pfe},{semanticName:"Lined/Shaded Process",name:"Lined Rectangle",shortName:"lin-rect",description:"Lined process shape",aliases:["lined-rectangle","lined-process","lin-proc","shaded-process"],handler:Zfe},{semanticName:"Start",name:"Small Circle",shortName:"sm-circ",description:"Small starting point",aliases:["start","small-circle"],internalAliases:["stateStart"],handler:nde},{semanticName:"Stop",name:"Framed Circle",shortName:"fr-circ",description:"Stop point",aliases:["stop","framed-circle"],internalAliases:["stateEnd"],handler:rde},{semanticName:"Fork/Join",name:"Filled Rectangle",shortName:"fork",description:"Fork or join in process flow",aliases:["join"],internalAliases:["forkJoin"],handler:Afe},{semanticName:"Collate",name:"Hourglass",shortName:"hourglass",description:"Represents a collate operation",aliases:["hourglass","collate"],handler:Dfe},{semanticName:"Comment",name:"Curly Brace",shortName:"brace",description:"Adds a comment",aliases:["comment","brace-l"],handler:xfe},{semanticName:"Comment Right",name:"Curly Brace",shortName:"brace-r",description:"Adds a comment",handler:bfe},{semanticName:"Comment with braces on both sides",name:"Curly Braces",shortName:"braces",description:"Adds a comment",handler:wfe},{semanticName:"Com Link",name:"Lightning Bolt",shortName:"bolt",description:"Communication link",aliases:["com-link","lightning-bolt"],handler:Gfe},{semanticName:"Document",name:"Document",shortName:"doc",description:"Represents a document",aliases:["doc","document"],handler:fde},{semanticName:"Delay",name:"Half-Rounded Rectangle",shortName:"delay",description:"Represents a delay",aliases:["half-rounded-rectangle"],handler:Lfe},{semanticName:"Direct Access Storage",name:"Horizontal Cylinder",shortName:"h-cyl",description:"Direct access storage",aliases:["das","horizontal-cylinder"],handler:lde},{semanticName:"Disk Storage",name:"Lined Cylinder",shortName:"lin-cyl",description:"Disk storage",aliases:["disk","lined-cylinder"],handler:qfe},{semanticName:"Display",name:"Curved Trapezoid",shortName:"curv-trap",description:"Represents a display",aliases:["curved-trapezoid","display"],handler:kfe},{semanticName:"Divided Process",name:"Divided Rectangle",shortName:"div-rect",description:"Divided process shape",aliases:["div-proc","divided-rectangle","divided-process"],handler:Efe},{semanticName:"Extract",name:"Triangle",shortName:"tri",description:"Extraction process",aliases:["extract","triangle"],handler:hde},{semanticName:"Internal Storage",name:"Window Pane",shortName:"win-pane",description:"Internal storage",aliases:["internal-storage","window-pane"],handler:pde},{semanticName:"Junction",name:"Filled Circle",shortName:"f-circ",description:"Junction point",aliases:["junction","filled-circle"],handler:Cfe},{semanticName:"Loop Limit",name:"Trapezoidal Pentagon",shortName:"notch-pent",description:"Loop limit step",aliases:["loop-limit","notched-pentagon"],handler:cde},{semanticName:"Manual File",name:"Flipped Triangle",shortName:"flip-tri",description:"Manual file operation",aliases:["manual-file","flipped-triangle"],handler:_fe},{semanticName:"Manual Input",name:"Sloped Rectangle",shortName:"sl-rect",description:"Manual input step",aliases:["manual-input","sloped-rectangle"],handler:Qfe},{semanticName:"Multi-Document",name:"Stacked Document",shortName:"docs",description:"Multiple documents",aliases:["documents","st-doc","stacked-document"],handler:Vfe},{semanticName:"Multi-Process",name:"Stacked Rectangle",shortName:"st-rect",description:"Multiple processes",aliases:["procs","processes","stacked-rectangle"],handler:Hfe},{semanticName:"Stored Data",name:"Bow Tie Rectangle",shortName:"bow-rect",description:"Stored data",aliases:["stored-data","bow-tie-rectangle"],handler:dfe},{semanticName:"Summary",name:"Crossed Circle",shortName:"cross-circ",description:"Summary",aliases:["summary","crossed-circle"],handler:vfe},{semanticName:"Tagged Document",name:"Tagged Document",shortName:"tag-doc",description:"Tagged document",aliases:["tag-doc","tagged-document"],handler:sde},{semanticName:"Tagged Process",name:"Tagged Rectangle",shortName:"tag-rect",description:"Tagged process",aliases:["tagged-rectangle","tag-proc","tagged-process"],handler:ade},{semanticName:"Paper Tape",name:"Flag",shortName:"flag",description:"Paper tape",aliases:["paper-tape"],handler:dde},{semanticName:"Odd",name:"Odd",shortName:"odd",description:"Odd shape",internalAliases:["rect_left_inv_arrow"],handler:Xfe},{semanticName:"Lined Document",name:"Lined Document",shortName:"lin-doc",description:"Lined document",aliases:["lined-document"],handler:Ufe}],gJe=b(()=>{let e=[...Object.entries({state:tde,choice:mfe,note:Wfe,rectWithTitle:jfe,labelRect:Ffe,iconSquare:Ofe,iconCircle:Mfe,icon:Ife,iconRounded:Nfe,imageSquare:Pfe,anchor:ffe,kanbanItem:vde,classBox:gde,erBox:GF,requirementBox:yde}),...mJe.flatMap(r=>[r.shortName,..."aliases"in r?r.aliases:[],..."internalAliases"in r?r.internalAliases:[]].map(i=>[i,r.handler]))];return Object.fromEntries(e)},"generateShapeMap"),xde=gJe();b(qF,"isValidShape");NE=new Map;b(nm,"insertNode");bde=b((t,e)=>{NE.set(e.id,t)},"setNodeElem"),wde=b(()=>{NE.clear()},"clear"),O5=b(t=>{let e=NE.get(t.id);he.trace("Transforming node",t.diff,t,"translate("+(t.x-t.width/2-5)+", "+t.width/2+")");let r=8,n=t.diff||0;return t.clusterNode?e.attr("transform","translate("+(t.x+n-t.width/2)+", "+(t.y-t.height/2-r)+")"):e.attr("transform","translate("+t.x+", "+t.y+")"),n},"positionNode")});function B5(t,e){Fe().flowchart.htmlLabels&&t&&(t.style.width=e.length*9+"px",t.style.height="12px")}function Cde(t){let e=[],r=[];for(let n=1;n5&&Math.abs(a.y-i.y)>5||i.y===a.y&&a.x===s.x&&Math.abs(a.x-i.x)>5&&Math.abs(a.y-s.y)>5)&&(e.push(a),r.push(n))}return{cornerPoints:e,cornerPointPositions:r}}var yJe,vJe,kde,OE,Rs,Sde,P5,PE,BE,xJe,bJe,Tde,Ede,wJe,FE,kJe,TJe,EJe,SJe,CJe,_Je,AJe,LJe,RJe,DJe,IJe,MJe,NJe,OJe,PJe,BJe,FJe,zE,nc=D(()=>{iu();Il();Wo();As();Hn();Nr();Or();fr();yJe=b((t,e,r,n,i,a)=>{e.arrowTypeStart&&kde(t,"start",e.arrowTypeStart,r,n,i,a),e.arrowTypeEnd&&kde(t,"end",e.arrowTypeEnd,r,n,i,a)},"addEdgeMarkers"),vJe={arrow_cross:{type:"cross",fill:!1},arrow_point:{type:"point",fill:!0},arrow_barb:{type:"barb",fill:!0},arrow_circle:{type:"circle",fill:!1},aggregation:{type:"aggregation",fill:!1},extension:{type:"extension",fill:!1},composition:{type:"composition",fill:!0},dependency:{type:"dependency",fill:!0},lollipop:{type:"lollipop",fill:!1},only_one:{type:"onlyOne",fill:!1},zero_or_one:{type:"zeroOrOne",fill:!1},one_or_more:{type:"oneOrMore",fill:!1},zero_or_more:{type:"zeroOrMore",fill:!1},requirement_arrow:{type:"requirement_arrow",fill:!1},requirement_contains:{type:"requirement_contains",fill:!1}},kde=b((t,e,r,n,i,a,s)=>{let o=vJe[r];if(!o){he.warn(`Unknown arrow type: ${r}`);return}let l=o.type,h=`${i}_${a}-${l}${e==="start"?"Start":"End"}`;if(s&&s.trim()!==""){let f=s.replace(/[^\dA-Za-z]/g,"_"),d=`${h}_${f}`;if(!document.getElementById(d)){let p=document.getElementById(h);if(p){let m=p.cloneNode(!0);m.id=d,m.querySelectorAll("path, circle, line").forEach(y=>{y.setAttribute("stroke",s),o.fill&&y.setAttribute("fill",s)}),p.parentNode?.appendChild(m)}}t.attr(`marker-${e}`,`url(${n}#${d})`)}else t.attr(`marker-${e}`,`url(${n}#${h})`)},"addEdgeMarker"),OE=new Map,Rs=new Map,Sde=b(()=>{OE.clear(),Rs.clear()},"clear"),P5=b(t=>t?t.reduce((r,n)=>r+";"+n,""):"","getLabelStyles"),PE=b(async(t,e)=>{let r=dn(Fe().flowchart.htmlLabels),n=await qa(t,e.label,{style:P5(e.labelStyle),useHtmlLabels:r,addSvgBackground:!0,isNode:!1});he.info("abc82",e,e.labelType);let i=t.insert("g").attr("class","edgeLabel"),a=i.insert("g").attr("class","label");a.node().appendChild(n);let s=n.getBBox();if(r){let l=n.children[0],u=dt(n);s=l.getBoundingClientRect(),u.attr("width",s.width),u.attr("height",s.height)}a.attr("transform","translate("+-s.width/2+", "+-s.height/2+")"),OE.set(e.id,i),e.width=s.width,e.height=s.height;let o;if(e.startLabelLeft){let l=await Ad(e.startLabelLeft,P5(e.labelStyle)),u=t.insert("g").attr("class","edgeTerminals"),h=u.insert("g").attr("class","inner");o=h.node().appendChild(l);let f=l.getBBox();h.attr("transform","translate("+-f.width/2+", "+-f.height/2+")"),Rs.get(e.id)||Rs.set(e.id,{}),Rs.get(e.id).startLeft=u,B5(o,e.startLabelLeft)}if(e.startLabelRight){let l=await Ad(e.startLabelRight,P5(e.labelStyle)),u=t.insert("g").attr("class","edgeTerminals"),h=u.insert("g").attr("class","inner");o=u.node().appendChild(l),h.node().appendChild(l);let f=l.getBBox();h.attr("transform","translate("+-f.width/2+", "+-f.height/2+")"),Rs.get(e.id)||Rs.set(e.id,{}),Rs.get(e.id).startRight=u,B5(o,e.startLabelRight)}if(e.endLabelLeft){let l=await Ad(e.endLabelLeft,P5(e.labelStyle)),u=t.insert("g").attr("class","edgeTerminals"),h=u.insert("g").attr("class","inner");o=h.node().appendChild(l);let f=l.getBBox();h.attr("transform","translate("+-f.width/2+", "+-f.height/2+")"),u.node().appendChild(l),Rs.get(e.id)||Rs.set(e.id,{}),Rs.get(e.id).endLeft=u,B5(o,e.endLabelLeft)}if(e.endLabelRight){let l=await Ad(e.endLabelRight,P5(e.labelStyle)),u=t.insert("g").attr("class","edgeTerminals"),h=u.insert("g").attr("class","inner");o=h.node().appendChild(l);let f=l.getBBox();h.attr("transform","translate("+-f.width/2+", "+-f.height/2+")"),u.node().appendChild(l),Rs.get(e.id)||Rs.set(e.id,{}),Rs.get(e.id).endRight=u,B5(o,e.endLabelRight)}return n},"insertEdgeLabel");b(B5,"setTerminalWidth");BE=b((t,e)=>{he.debug("Moving label abc88 ",t.id,t.label,OE.get(t.id),e);let r=e.updatedPath?e.updatedPath:e.originalPath,n=Fe(),{subGraphTitleTotalMargin:i}=Ch(n);if(t.label){let a=OE.get(t.id),s=t.x,o=t.y;if(r){let l=gr.calcLabelPosition(r);he.debug("Moving label "+t.label+" from (",s,",",o,") to (",l.x,",",l.y,") abc88"),e.updatedPath&&(s=l.x,o=l.y)}a.attr("transform",`translate(${s}, ${o+i/2})`)}if(t.startLabelLeft){let a=Rs.get(t.id).startLeft,s=t.x,o=t.y;if(r){let l=gr.calcTerminalLabelPosition(t.arrowTypeStart?10:0,"start_left",r);s=l.x,o=l.y}a.attr("transform",`translate(${s}, ${o})`)}if(t.startLabelRight){let a=Rs.get(t.id).startRight,s=t.x,o=t.y;if(r){let l=gr.calcTerminalLabelPosition(t.arrowTypeStart?10:0,"start_right",r);s=l.x,o=l.y}a.attr("transform",`translate(${s}, ${o})`)}if(t.endLabelLeft){let a=Rs.get(t.id).endLeft,s=t.x,o=t.y;if(r){let l=gr.calcTerminalLabelPosition(t.arrowTypeEnd?10:0,"end_left",r);s=l.x,o=l.y}a.attr("transform",`translate(${s}, ${o})`)}if(t.endLabelRight){let a=Rs.get(t.id).endRight,s=t.x,o=t.y;if(r){let l=gr.calcTerminalLabelPosition(t.arrowTypeEnd?10:0,"end_right",r);s=l.x,o=l.y}a.attr("transform",`translate(${s}, ${o})`)}},"positionEdgeLabel"),xJe=b((t,e)=>{let r=t.x,n=t.y,i=Math.abs(e.x-r),a=Math.abs(e.y-n),s=t.width/2,o=t.height/2;return i>=s||a>=o},"outsideNode"),bJe=b((t,e,r)=>{he.debug(`intersection calc abc89: outsidePoint: ${JSON.stringify(e)} insidePoint : ${JSON.stringify(r)} - node : x:${t.x} y:${t.y} w:${t.width} h:${t.height}`);let n=t.x,a=t.y,i=Math.abs(n-r.x),s=t.width/2,o=r.xMath.abs(n-e.x)*l){let f=r.y{te.warn("abc88 cutPathAtIntersect",t,e);let r=[],n=t[0],a=!1;return t.forEach(i=>{if(te.info("abc88 checking point",i,e),!UXe(e,i)&&!a){let s=qXe(e,n,i);te.debug("abc88 inside",i,n,s),te.debug("abc88 intersection",s,e);let o=!1;r.forEach(l=>{o=o||l.x===s.x&&l.y===s.y}),r.some(l=>l.x===s.x&&l.y===s.y)?te.warn("abc88 no intersect",s,r):r.push(s),a=!0}else te.warn("abc88 outside",i,n),n=i,a||r.push(i)}),te.debug("returning points",r),r},"cutPathAtIntersect");x(ehe,"extractCornerPoints");Qce=x(function(t,e,r){let n=e.x-t.x,a=e.y-t.y,i=Math.sqrt(n*n+a*a),s=r/i;return{x:e.x-s*n,y:e.y-s*a}},"findAdjacentPoint"),VXe=x(function(t){let{cornerPointPositions:e}=ehe(t),r=[];for(let n=0;n10&&Math.abs(i.y-a.y)>=10){te.debug("Corner point fixing",Math.abs(i.x-a.x),Math.abs(i.y-a.y));let p=5;s.x===o.x?d={x:u<0?o.x-p+f:o.x+p-f,y:h<0?o.y-f:o.y+f}:d={x:u<0?o.x-f:o.x+f,y:h<0?o.y-p+f:o.y+p-f}}else te.debug("Corner point skipping fixing",Math.abs(i.x-a.x),Math.abs(i.y-a.y));r.push(d,l)}else r.push(t[n]);return r},"fixCorners"),aS=x(function(t,e,r,n,a,i,s){let{handDrawnSeed:o}=Te(),l=e.points,u=!1,h=a;var f=i;let d=[];for(let L in e.cssCompiledStyles)AP(L)||d.push(e.cssCompiledStyles[L]);f.intersect&&h.intersect&&(l=l.slice(1,e.points.length-1),l.unshift(h.intersect(l[0])),te.debug("Last point APA12",e.start,"-->",e.end,l[l.length-1],f,f.intersect(l[l.length-1])),l.push(f.intersect(l[l.length-1]))),e.toCluster&&(te.info("to cluster abc88",r.get(e.toCluster)),l=Zce(e.points,r.get(e.toCluster).node),u=!0),e.fromCluster&&(te.debug("from cluster abc88",r.get(e.fromCluster),JSON.stringify(l,null,2)),l=Zce(l.reverse(),r.get(e.fromCluster).node).reverse(),u=!0);let p=l.filter(L=>!Number.isNaN(L.y));p=VXe(p);let m=eu;switch(m=Jf,e.curve){case"linear":m=Jf;break;case"basis":m=eu;break;case"cardinal":m=N4;break;case"bumpX":m=A4;break;case"bumpY":m=L4;break;case"catmullRom":m=P4;break;case"monotoneX":m=B4;break;case"monotoneY":m=F4;break;case"natural":m=z4;break;case"step":m=$4;break;case"stepAfter":m=U4;break;case"stepBefore":m=G4;break;default:m=eu}let{x:g,y:v}=XT(e),y=tc().x(g).y(v).curve(m),b;switch(e.thickness){case"normal":b="edge-thickness-normal";break;case"thick":b="edge-thickness-thick";break;case"invisible":b="edge-thickness-invisible";break;default:b="edge-thickness-normal"}switch(e.pattern){case"solid":b+=" edge-pattern-solid";break;case"dotted":b+=" edge-pattern-dotted";break;case"dashed":b+=" edge-pattern-dashed";break;default:b+=" edge-pattern-solid"}let w,C=y(p),k=Array.isArray(e.style)?e.style:[e.style],E=k.find(L=>L?.startsWith("stroke:"));if(e.look==="handDrawn"){let L=je.svg(t);Object.assign([],p);let M=L.path(C,{roughness:.3,seed:o});b+=" transition",w=We(M).select("path").attr("id",e.id).attr("class"," "+b+(e.classes?" "+e.classes:"")).attr("style",k?k.reduce((T,I)=>T+";"+I,""):"");let D=w.attr("d");w.attr("d",D),t.node().appendChild(w.node())}else{let L=d.join(";"),M=k?k.reduce((I,N)=>I+N+";",""):"",D="";e.animate&&(D=" edge-animation-fast"),e.animation&&(D=" edge-animation-"+e.animation);let T=L?L+";"+M+";":M;w=t.append("path").attr("d",C).attr("id",e.id).attr("class"," "+b+(e.classes?" "+e.classes:"")+(D??"")).attr("style",T),E=T.match(/stroke:([^;]+)/)?.[1]}let _="";(Te().flowchart.arrowMarkerAbsolute||Te().state.arrowMarkerAbsolute)&&(_=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,_=_.replace(/\(/g,"\\(").replace(/\)/g,"\\)")),te.info("arrowTypeStart",e.arrowTypeStart),te.info("arrowTypeEnd",e.arrowTypeEnd),$Xe(w,e,_,s,n,E);let S={};return u&&(S.updatedPath=l),S.originalPath=e.points,S},"insertEdge"),HXe=x((t,e,r,n)=>{e.forEach(a=>{oje[a](t,r,n)})},"insertMarkers"),WXe=x((t,e,r)=>{te.trace("Making markers for ",r),t.append("defs").append("marker").attr("id",r+"_"+e+"-extensionStart").attr("class","marker extension "+e).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 1,7 L18,13 V 1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-extensionEnd").attr("class","marker extension "+e).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 1,1 V 13 L18,7 Z")},"extension"),YXe=x((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-compositionStart").attr("class","marker composition "+e).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-compositionEnd").attr("class","marker composition "+e).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"composition"),XXe=x((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-aggregationStart").attr("class","marker aggregation "+e).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-aggregationEnd").attr("class","marker aggregation "+e).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"aggregation"),jXe=x((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-dependencyStart").attr("class","marker dependency "+e).attr("refX",6).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-dependencyEnd").attr("class","marker dependency "+e).attr("refX",13).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},"dependency"),KXe=x((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-lollipopStart").attr("class","marker lollipop "+e).attr("refX",13).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("stroke","black").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6),t.append("defs").append("marker").attr("id",r+"_"+e+"-lollipopEnd").attr("class","marker lollipop "+e).attr("refX",1).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("stroke","black").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6)},"lollipop"),ZXe=x((t,e,r)=>{t.append("marker").attr("id",r+"_"+e+"-pointEnd").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",8).attr("markerHeight",8).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),t.append("marker").attr("id",r+"_"+e+"-pointStart").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",4.5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",8).attr("markerHeight",8).attr("orient","auto").append("path").attr("d","M 0 5 L 10 10 L 10 0 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0")},"point"),QXe=x((t,e,r)=>{t.append("marker").attr("id",r+"_"+e+"-circleEnd").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",11).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),t.append("marker").attr("id",r+"_"+e+"-circleStart").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",-1).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0")},"circle"),JXe=x((t,e,r)=>{t.append("marker").attr("id",r+"_"+e+"-crossEnd").attr("class","marker cross "+e).attr("viewBox","0 0 11 11").attr("refX",12).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0"),t.append("marker").attr("id",r+"_"+e+"-crossStart").attr("class","marker cross "+e).attr("viewBox","0 0 11 11").attr("refX",-1).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0")},"cross"),eje=x((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-barbEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","userSpaceOnUse").attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")},"barb"),tje=x((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-onlyOneStart").attr("class","marker onlyOne "+e).attr("refX",0).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("d","M9,0 L9,18 M15,0 L15,18"),t.append("defs").append("marker").attr("id",r+"_"+e+"-onlyOneEnd").attr("class","marker onlyOne "+e).attr("refX",18).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("d","M3,0 L3,18 M9,0 L9,18")},"only_one"),rje=x((t,e,r)=>{let n=t.append("defs").append("marker").attr("id",r+"_"+e+"-zeroOrOneStart").attr("class","marker zeroOrOne "+e).attr("refX",0).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto");n.append("circle").attr("fill","white").attr("cx",21).attr("cy",9).attr("r",6),n.append("path").attr("d","M9,0 L9,18");let a=t.append("defs").append("marker").attr("id",r+"_"+e+"-zeroOrOneEnd").attr("class","marker zeroOrOne "+e).attr("refX",30).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto");a.append("circle").attr("fill","white").attr("cx",9).attr("cy",9).attr("r",6),a.append("path").attr("d","M21,0 L21,18")},"zero_or_one"),nje=x((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-oneOrMoreStart").attr("class","marker oneOrMore "+e).attr("refX",18).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").attr("d","M0,18 Q 18,0 36,18 Q 18,36 0,18 M42,9 L42,27"),t.append("defs").append("marker").attr("id",r+"_"+e+"-oneOrMoreEnd").attr("class","marker oneOrMore "+e).attr("refX",27).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").attr("d","M3,9 L3,27 M9,18 Q27,0 45,18 Q27,36 9,18")},"one_or_more"),aje=x((t,e,r)=>{let n=t.append("defs").append("marker").attr("id",r+"_"+e+"-zeroOrMoreStart").attr("class","marker zeroOrMore "+e).attr("refX",18).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto");n.append("circle").attr("fill","white").attr("cx",48).attr("cy",18).attr("r",6),n.append("path").attr("d","M0,18 Q18,0 36,18 Q18,36 0,18");let a=t.append("defs").append("marker").attr("id",r+"_"+e+"-zeroOrMoreEnd").attr("class","marker zeroOrMore "+e).attr("refX",39).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto");a.append("circle").attr("fill","white").attr("cx",9).attr("cy",18).attr("r",6),a.append("path").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18")},"zero_or_more"),ije=x((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-requirement_arrowEnd").attr("refX",20).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").append("path").attr("d",`M0,0 + node : x:${t.x} y:${t.y} w:${t.width} h:${t.height}`);let n=t.x,i=t.y,a=Math.abs(n-r.x),s=t.width/2,o=r.xMath.abs(n-e.x)*l){let f=r.y{he.warn("abc88 cutPathAtIntersect",t,e);let r=[],n=t[0],i=!1;return t.forEach(a=>{if(he.info("abc88 checking point",a,e),!xJe(e,a)&&!i){let s=bJe(e,n,a);he.debug("abc88 inside",a,n,s),he.debug("abc88 intersection",s,e);let o=!1;r.forEach(l=>{o=o||l.x===s.x&&l.y===s.y}),r.some(l=>l.x===s.x&&l.y===s.y)?he.warn("abc88 no intersect",s,r):r.push(s),i=!0}else he.warn("abc88 outside",a,n),n=a,i||r.push(a)}),he.debug("returning points",r),r},"cutPathAtIntersect");b(Cde,"extractCornerPoints");Ede=b(function(t,e,r){let n=e.x-t.x,i=e.y-t.y,a=Math.sqrt(n*n+i*i),s=r/a;return{x:e.x-s*n,y:e.y-s*i}},"findAdjacentPoint"),wJe=b(function(t){let{cornerPointPositions:e}=Cde(t),r=[];for(let n=0;n10&&Math.abs(a.y-i.y)>=10){he.debug("Corner point fixing",Math.abs(a.x-i.x),Math.abs(a.y-i.y));let p=5;s.x===o.x?d={x:u<0?o.x-p+f:o.x+p-f,y:h<0?o.y-f:o.y+f}:d={x:u<0?o.x-f:o.x+f,y:h<0?o.y-p+f:o.y+p-f}}else he.debug("Corner point skipping fixing",Math.abs(a.x-i.x),Math.abs(a.y-i.y));r.push(d,l)}else r.push(t[n]);return r},"fixCorners"),FE=b(function(t,e,r,n,i,a,s){let{handDrawnSeed:o}=Fe(),l=e.points,u=!1,h=i;var f=a;let d=[];for(let I in e.cssCompiledStyles)$F(I)||d.push(e.cssCompiledStyles[I]);f.intersect&&h.intersect&&(l=l.slice(1,e.points.length-1),l.unshift(h.intersect(l[0])),he.debug("Last point APA12",e.start,"-->",e.end,l[l.length-1],f,f.intersect(l[l.length-1])),l.push(f.intersect(l[l.length-1]))),e.toCluster&&(he.info("to cluster abc88",r.get(e.toCluster)),l=Tde(e.points,r.get(e.toCluster).node),u=!0),e.fromCluster&&(he.debug("from cluster abc88",r.get(e.fromCluster),JSON.stringify(l,null,2)),l=Tde(l.reverse(),r.get(e.fromCluster).node).reverse(),u=!0);let p=l.filter(I=>!Number.isNaN(I.y));p=wJe(p);let m=Ju;switch(m=od,e.curve){case"linear":m=od;break;case"basis":m=Ju;break;case"cardinal":m=K3;break;case"bumpX":m=V3;break;case"bumpY":m=W3;break;case"catmullRom":m=J3;break;case"monotoneX":m=e5;break;case"monotoneY":m=t5;break;case"natural":m=r5;break;case"step":m=n5;break;case"stepAfter":m=a5;break;case"stepBefore":m=i5;break;default:m=Ju}let{x:g,y}=AT(e),v=i0().x(g).y(y).curve(m),x;switch(e.thickness){case"normal":x="edge-thickness-normal";break;case"thick":x="edge-thickness-thick";break;case"invisible":x="edge-thickness-invisible";break;default:x="edge-thickness-normal"}switch(e.pattern){case"solid":x+=" edge-pattern-solid";break;case"dotted":x+=" edge-pattern-dotted";break;case"dashed":x+=" edge-pattern-dashed";break;default:x+=" edge-pattern-solid"}let k,_=v(p),T=Array.isArray(e.style)?e.style:[e.style],S=T.find(I=>I?.startsWith("stroke:"));if(e.look==="handDrawn"){let I=xt.svg(t);Object.assign([],p);let P=I.path(_,{roughness:.3,seed:o});x+=" transition",k=dt(P).select("path").attr("id",e.id).attr("class"," "+x+(e.classes?" "+e.classes:"")).attr("style",T?T.reduce((C,N)=>C+";"+N,""):"");let O=k.attr("d");k.attr("d",O),t.node().appendChild(k.node())}else{let I=d.join(";"),P=T?T.reduce((N,B)=>N+B+";",""):"",O="";e.animate&&(O=" edge-animation-fast"),e.animation&&(O=" edge-animation-"+e.animation);let C=I?I+";"+P+";":P;k=t.append("path").attr("d",_).attr("id",e.id).attr("class"," "+x+(e.classes?" "+e.classes:"")+(O??"")).attr("style",C),S=C.match(/stroke:([^;]+)/)?.[1]}let R="";(Fe().flowchart.arrowMarkerAbsolute||Fe().state.arrowMarkerAbsolute)&&(R=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,R=R.replace(/\(/g,"\\(").replace(/\)/g,"\\)")),he.info("arrowTypeStart",e.arrowTypeStart),he.info("arrowTypeEnd",e.arrowTypeEnd),yJe(k,e,R,s,n,S);let A={};return u&&(A.updatedPath=l),A.originalPath=e.points,A},"insertEdge"),kJe=b((t,e,r,n)=>{e.forEach(i=>{FJe[i](t,r,n)})},"insertMarkers"),TJe=b((t,e,r)=>{he.trace("Making markers for ",r),t.append("defs").append("marker").attr("id",r+"_"+e+"-extensionStart").attr("class","marker extension "+e).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 1,7 L18,13 V 1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-extensionEnd").attr("class","marker extension "+e).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 1,1 V 13 L18,7 Z")},"extension"),EJe=b((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-compositionStart").attr("class","marker composition "+e).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-compositionEnd").attr("class","marker composition "+e).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"composition"),SJe=b((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-aggregationStart").attr("class","marker aggregation "+e).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-aggregationEnd").attr("class","marker aggregation "+e).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"aggregation"),CJe=b((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-dependencyStart").attr("class","marker dependency "+e).attr("refX",6).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-dependencyEnd").attr("class","marker dependency "+e).attr("refX",13).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},"dependency"),_Je=b((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-lollipopStart").attr("class","marker lollipop "+e).attr("refX",13).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("stroke","black").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6),t.append("defs").append("marker").attr("id",r+"_"+e+"-lollipopEnd").attr("class","marker lollipop "+e).attr("refX",1).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("stroke","black").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6)},"lollipop"),AJe=b((t,e,r)=>{t.append("marker").attr("id",r+"_"+e+"-pointEnd").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",8).attr("markerHeight",8).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),t.append("marker").attr("id",r+"_"+e+"-pointStart").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",4.5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",8).attr("markerHeight",8).attr("orient","auto").append("path").attr("d","M 0 5 L 10 10 L 10 0 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0")},"point"),LJe=b((t,e,r)=>{t.append("marker").attr("id",r+"_"+e+"-circleEnd").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",11).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),t.append("marker").attr("id",r+"_"+e+"-circleStart").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",-1).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0")},"circle"),RJe=b((t,e,r)=>{t.append("marker").attr("id",r+"_"+e+"-crossEnd").attr("class","marker cross "+e).attr("viewBox","0 0 11 11").attr("refX",12).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0"),t.append("marker").attr("id",r+"_"+e+"-crossStart").attr("class","marker cross "+e).attr("viewBox","0 0 11 11").attr("refX",-1).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0")},"cross"),DJe=b((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-barbEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","userSpaceOnUse").attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")},"barb"),IJe=b((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-onlyOneStart").attr("class","marker onlyOne "+e).attr("refX",0).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("d","M9,0 L9,18 M15,0 L15,18"),t.append("defs").append("marker").attr("id",r+"_"+e+"-onlyOneEnd").attr("class","marker onlyOne "+e).attr("refX",18).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("d","M3,0 L3,18 M9,0 L9,18")},"only_one"),MJe=b((t,e,r)=>{let n=t.append("defs").append("marker").attr("id",r+"_"+e+"-zeroOrOneStart").attr("class","marker zeroOrOne "+e).attr("refX",0).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto");n.append("circle").attr("fill","white").attr("cx",21).attr("cy",9).attr("r",6),n.append("path").attr("d","M9,0 L9,18");let i=t.append("defs").append("marker").attr("id",r+"_"+e+"-zeroOrOneEnd").attr("class","marker zeroOrOne "+e).attr("refX",30).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto");i.append("circle").attr("fill","white").attr("cx",9).attr("cy",9).attr("r",6),i.append("path").attr("d","M21,0 L21,18")},"zero_or_one"),NJe=b((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-oneOrMoreStart").attr("class","marker oneOrMore "+e).attr("refX",18).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").attr("d","M0,18 Q 18,0 36,18 Q 18,36 0,18 M42,9 L42,27"),t.append("defs").append("marker").attr("id",r+"_"+e+"-oneOrMoreEnd").attr("class","marker oneOrMore "+e).attr("refX",27).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").attr("d","M3,9 L3,27 M9,18 Q27,0 45,18 Q27,36 9,18")},"one_or_more"),OJe=b((t,e,r)=>{let n=t.append("defs").append("marker").attr("id",r+"_"+e+"-zeroOrMoreStart").attr("class","marker zeroOrMore "+e).attr("refX",18).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto");n.append("circle").attr("fill","white").attr("cx",48).attr("cy",18).attr("r",6),n.append("path").attr("d","M0,18 Q18,0 36,18 Q18,36 0,18");let i=t.append("defs").append("marker").attr("id",r+"_"+e+"-zeroOrMoreEnd").attr("class","marker zeroOrMore "+e).attr("refX",39).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto");i.append("circle").attr("fill","white").attr("cx",9).attr("cy",18).attr("r",6),i.append("path").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18")},"zero_or_more"),PJe=b((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-requirement_arrowEnd").attr("refX",20).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").append("path").attr("d",`M0,0 L20,10 M20,10 - L0,20`)},"requirement_arrow"),sje=x((t,e,r)=>{let n=t.append("defs").append("marker").attr("id",r+"_"+e+"-requirement_containsStart").attr("refX",0).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").append("g");n.append("circle").attr("cx",10).attr("cy",10).attr("r",9).attr("fill","none"),n.append("line").attr("x1",1).attr("x2",19).attr("y1",10).attr("y2",10),n.append("line").attr("y1",1).attr("y2",19).attr("x1",10).attr("x2",10)},"requirement_contains"),oje={extension:WXe,composition:YXe,aggregation:XXe,dependency:jXe,lollipop:KXe,point:ZXe,circle:QXe,cross:JXe,barb:eje,only_one:tje,zero_or_one:rje,one_or_more:nje,zero_or_more:aje,requirement_arrow:ije,requirement_contains:sje},iS=HXe});function uje(t){return typeof t=="symbol"||xa(t)&&Es(t)==lje}var lje,zo,jp=A(()=>{td();tu();lje="[object Symbol]";zo=uje});function cje(t,e){for(var r=-1,n=t==null?0:t.length,a=Array(n);++r{lc=cje});function nhe(t){if(typeof t=="string")return t;if(pr(t))return lc(t,nhe)+"";if(zo(t))return rhe?rhe.call(t):"";var e=t+"";return e=="0"&&1/t==-hje?"-0":e}var hje,the,rhe,ahe,ihe=A(()=>{Up();w3();Da();jp();hje=1/0,the=di?di.prototype:void 0,rhe=the?the.toString:void 0;ahe=nhe});function dje(t){for(var e=t.length;e--&&fje.test(t.charAt(e)););return e}var fje,she,ohe=A(()=>{fje=/\s/;she=dje});function mje(t){return t&&t.slice(0,she(t)+1).replace(pje,"")}var pje,lhe,uhe=A(()=>{ohe();pje=/^\s+/;lhe=mje});function bje(t){if(typeof t=="number")return t;if(zo(t))return che;if(Vn(t)){var e=typeof t.valueOf=="function"?t.valueOf():t;t=Vn(e)?e+"":e}if(typeof t!="string")return t===0?t:+t;t=lhe(t);var r=vje.test(t);return r||yje.test(t)?xje(t.slice(2),r?2:8):gje.test(t)?che:+t}var che,gje,vje,yje,xje,hhe,fhe=A(()=>{uhe();cl();jp();che=NaN,gje=/^[-+]0x[0-9a-f]+$/i,vje=/^0b[01]+$/i,yje=/^0o[0-7]+$/i,xje=parseInt;hhe=bje});function kje(t){if(!t)return t===0?t:0;if(t=hhe(t),t===dhe||t===-dhe){var e=t<0?-1:1;return e*wje}return t===t?t:0}var dhe,wje,X1,IP=A(()=>{fhe();dhe=1/0,wje=17976931348623157e292;X1=kje});function Tje(t){var e=X1(t),r=e%1;return e===e?r?e-r:e:0}var phe,mhe=A(()=>{IP();phe=Tje});var Eje,sS,ghe=A(()=>{rd();ul();Eje=no(ca,"WeakMap"),sS=Eje});function Cje(){}var vhe,yhe=A(()=>{vhe=Cje});function Sje(t,e){for(var r=-1,n=t==null?0:t.length;++r{oS=Sje});function _je(t,e,r,n){for(var a=t.length,i=r+(n?1:-1);n?i--:++i{lS=_je});function Aje(t){return t!==t}var xhe,bhe=A(()=>{xhe=Aje});function Lje(t,e,r){for(var n=r-1,a=t.length;++n{whe=Lje});function Rje(t,e,r){return e===e?whe(t,e,r):lS(t,xhe,r)}var The,Ehe=A(()=>{NP();bhe();khe();The=Rje});function Ije(t,e){var r=t==null?0:t.length;return!!r&&The(t,e,0)>-1}var Che,She=A(()=>{Ehe();Che=Ije});var Dje,_he,Ahe=A(()=>{SO();Dje=bC(Object.keys,Object),_he=Dje});function Oje(t){if(!ld(t))return _he(t);var e=[];for(var r in Object(t))Mje.call(t,r)&&r!="constructor"&&e.push(r);return e}var Nje,Mje,j1,uS=A(()=>{Q4();Ahe();Nje=Object.prototype,Mje=Nje.hasOwnProperty;j1=Oje});function Pje(t){return pi(t)?SC(t):j1(t)}var ha,qh=A(()=>{DO();uS();ac();ha=Pje});function zje(t,e){if(pr(t))return!1;var r=typeof t;return r=="number"||r=="symbol"||r=="boolean"||t==null||zo(t)?!0:Fje.test(t)||!Bje.test(t)||e!=null&&t in Object(e)}var Bje,Fje,K1,cS=A(()=>{Da();jp();Bje=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Fje=/^\w*$/;K1=zje});function Gje(t){var e=R1(t,function(n){return r.size===$je&&r.clear(),n}),r=e.cache;return e}var $je,Lhe,Rhe=A(()=>{xO();$je=500;Lhe=Gje});var Uje,qje,Vje,Ihe,Dhe=A(()=>{Rhe();Uje=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,qje=/\\(\\)?/g,Vje=Lhe(function(t){var e=[];return t.charCodeAt(0)===46&&e.push(""),t.replace(Uje,function(r,n,a,i){e.push(a?i.replace(qje,"$1"):n||r)}),e}),Ihe=Vje});function Hje(t){return t==null?"":ahe(t)}var hS,MP=A(()=>{ihe();hS=Hje});function Wje(t,e){return pr(t)?t:K1(t,e)?[t]:Ihe(hS(t))}var wd,k3=A(()=>{Da();cS();Dhe();MP();wd=Wje});function Xje(t){if(typeof t=="string"||zo(t))return t;var e=t+"";return e=="0"&&1/t==-Yje?"-0":e}var Yje,uc,Z1=A(()=>{jp();Yje=1/0;uc=Xje});function jje(t,e){e=wd(e,t);for(var r=0,n=e.length;t!=null&&r{k3();Z1();kd=jje});function Kje(t,e,r){var n=t==null?void 0:kd(t,e);return n===void 0?r:n}var Nhe,Mhe=A(()=>{T3();Nhe=Kje});function Zje(t,e){for(var r=-1,n=e.length,a=t.length;++r{Q1=Zje});function Qje(t){return pr(t)||ru(t)||!!(Ohe&&t&&t[Ohe])}var Ohe,Phe,Bhe=A(()=>{Up();B1();Da();Ohe=di?di.isConcatSpreadable:void 0;Phe=Qje});function Fhe(t,e,r,n,a){var i=-1,s=t.length;for(r||(r=Phe),a||(a=[]);++i0&&r(o)?e>1?Fhe(o,e-1,r,n,a):Q1(a,o):n||(a[a.length]=o)}return a}var Td,E3=A(()=>{fS();Bhe();Td=Fhe});function Jje(t){var e=t==null?0:t.length;return e?Td(t,1):[]}var uo,dS=A(()=>{E3();uo=Jje});function eKe(t){return AC(_C(t,void 0,uo),t+"")}var zhe,$he=A(()=>{dS();NO();OO();zhe=eKe});function uKe(t){return lKe.test(t)}var tKe,rKe,nKe,aKe,iKe,sKe,oKe,lKe,Ghe,Uhe=A(()=>{tKe="\\ud800-\\udfff",rKe="\\u0300-\\u036f",nKe="\\ufe20-\\ufe2f",aKe="\\u20d0-\\u20ff",iKe=rKe+nKe+aKe,sKe="\\ufe0e\\ufe0f",oKe="\\u200d",lKe=RegExp("["+oKe+tKe+iKe+sKe+"]");Ghe=uKe});function cKe(t,e,r,n){var a=-1,i=t==null?0:t.length;for(n&&i&&(r=t[++a]);++a{qhe=cKe});function hKe(t,e){return t&&ic(e,ha(e),t)}var Hhe,Whe=A(()=>{$1();qh();Hhe=hKe});function fKe(t,e){return t&&ic(e,ao(e),t)}var Yhe,Xhe=A(()=>{$1();dd();Yhe=fKe});function dKe(t,e){for(var r=-1,n=t==null?0:t.length,a=0,i=[];++r{pS=dKe});function pKe(){return[]}var mS,PP=A(()=>{mS=pKe});var mKe,gKe,jhe,vKe,J1,gS=A(()=>{OP();PP();mKe=Object.prototype,gKe=mKe.propertyIsEnumerable,jhe=Object.getOwnPropertySymbols,vKe=jhe?function(t){return t==null?[]:(t=Object(t),pS(jhe(t),function(e){return gKe.call(t,e)}))}:mS,J1=vKe});function yKe(t,e){return ic(t,J1(t),e)}var Khe,Zhe=A(()=>{$1();gS();Khe=yKe});var xKe,bKe,vS,BP=A(()=>{fS();wC();gS();PP();xKe=Object.getOwnPropertySymbols,bKe=xKe?function(t){for(var e=[];t;)Q1(e,J1(t)),t=P1(t);return e}:mS,vS=bKe});function wKe(t,e){return ic(t,vS(t),e)}var Qhe,Jhe=A(()=>{$1();BP();Qhe=wKe});function kKe(t,e,r){var n=e(t);return pr(t)?n:Q1(n,r(t))}var yS,FP=A(()=>{fS();Da();yS=kKe});function TKe(t){return yS(t,ha,J1)}var C3,zP=A(()=>{FP();gS();qh();C3=TKe});function EKe(t){return yS(t,ao,vS)}var efe,tfe=A(()=>{FP();BP();dd();efe=EKe});var CKe,xS,rfe=A(()=>{rd();ul();CKe=no(ca,"DataView"),xS=CKe});var SKe,bS,nfe=A(()=>{rd();ul();SKe=no(ca,"Promise"),bS=SKe});var _Ke,Ed,$P=A(()=>{rd();ul();_Ke=no(ca,"Set"),Ed=_Ke});var afe,AKe,ife,sfe,ofe,lfe,LKe,RKe,IKe,DKe,NKe,Kp,$o,Zp=A(()=>{rfe();dC();nfe();$P();ghe();td();gO();afe="[object Map]",AKe="[object Object]",ife="[object Promise]",sfe="[object Set]",ofe="[object WeakMap]",lfe="[object DataView]",LKe=Nh(xS),RKe=Nh(id),IKe=Nh(bS),DKe=Nh(Ed),NKe=Nh(sS),Kp=Es;(xS&&Kp(new xS(new ArrayBuffer(1)))!=lfe||id&&Kp(new id)!=afe||bS&&Kp(bS.resolve())!=ife||Ed&&Kp(new Ed)!=sfe||sS&&Kp(new sS)!=ofe)&&(Kp=function(t){var e=Es(t),r=e==AKe?t.constructor:void 0,n=r?Nh(r):"";if(n)switch(n){case LKe:return lfe;case RKe:return afe;case IKe:return ife;case DKe:return sfe;case NKe:return ofe}return e});$o=Kp});function PKe(t){var e=t.length,r=new t.constructor(e);return e&&typeof t[0]=="string"&&OKe.call(t,"index")&&(r.index=t.index,r.input=t.input),r}var MKe,OKe,ufe,cfe=A(()=>{MKe=Object.prototype,OKe=MKe.hasOwnProperty;ufe=PKe});function BKe(t,e){var r=e?O1(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.byteLength)}var hfe,ffe=A(()=>{vC();hfe=BKe});function zKe(t){var e=new t.constructor(t.source,FKe.exec(t));return e.lastIndex=t.lastIndex,e}var FKe,dfe,pfe=A(()=>{FKe=/\w*$/;dfe=zKe});function $Ke(t){return gfe?Object(gfe.call(t)):{}}var mfe,gfe,vfe,yfe=A(()=>{Up();mfe=di?di.prototype:void 0,gfe=mfe?mfe.valueOf:void 0;vfe=$Ke});function sZe(t,e,r){var n=t.constructor;switch(e){case jKe:return O1(t);case GKe:case UKe:return new n(+t);case KKe:return hfe(t,r);case ZKe:case QKe:case JKe:case eZe:case tZe:case rZe:case nZe:case aZe:case iZe:return yC(t,r);case qKe:return new n;case VKe:case YKe:return new n(t);case HKe:return dfe(t);case WKe:return new n;case XKe:return vfe(t)}}var GKe,UKe,qKe,VKe,HKe,WKe,YKe,XKe,jKe,KKe,ZKe,QKe,JKe,eZe,tZe,rZe,nZe,aZe,iZe,xfe,bfe=A(()=>{vC();ffe();pfe();yfe();EO();GKe="[object Boolean]",UKe="[object Date]",qKe="[object Map]",VKe="[object Number]",HKe="[object RegExp]",WKe="[object Set]",YKe="[object String]",XKe="[object Symbol]",jKe="[object ArrayBuffer]",KKe="[object DataView]",ZKe="[object Float32Array]",QKe="[object Float64Array]",JKe="[object Int8Array]",eZe="[object Int16Array]",tZe="[object Int32Array]",rZe="[object Uint8Array]",nZe="[object Uint8ClampedArray]",aZe="[object Uint16Array]",iZe="[object Uint32Array]";xfe=sZe});function lZe(t){return xa(t)&&$o(t)==oZe}var oZe,wfe,kfe=A(()=>{Zp();tu();oZe="[object Map]";wfe=lZe});var Tfe,uZe,Efe,Cfe=A(()=>{kfe();J4();CC();Tfe=Oh&&Oh.isMap,uZe=Tfe?ud(Tfe):wfe,Efe=uZe});function hZe(t){return xa(t)&&$o(t)==cZe}var cZe,Sfe,_fe=A(()=>{Zp();tu();cZe="[object Set]";Sfe=hZe});var Afe,fZe,Lfe,Rfe=A(()=>{_fe();J4();CC();Afe=Oh&&Oh.isSet,fZe=Afe?ud(Afe):Sfe,Lfe=fZe});function wS(t,e,r,n,a,i){var s,o=e&dZe,l=e&pZe,u=e&mZe;if(r&&(s=a?r(t,n,a,i):r(t)),s!==void 0)return s;if(!Vn(t))return t;var h=pr(t);if(h){if(s=ufe(t),!o)return xC(t,s)}else{var f=$o(t),d=f==Dfe||f==bZe;if(nu(t))return gC(t,o);if(f==Nfe||f==Ife||d&&!a){if(s=l||d?{}:kC(t),!o)return l?Qhe(t,Yhe(s,t)):Khe(t,Hhe(s,t))}else{if(!Cn[f])return a?t:{};s=xfe(t,f,o)}}i||(i=new nc);var p=i.get(t);if(p)return p;i.set(t,s),Lfe(t)?t.forEach(function(v){s.add(wS(v,e,r,v,t,i))}):Efe(t)&&t.forEach(function(v,y){s.set(y,wS(v,e,r,y,t,i))});var m=u?l?efe:C3:l?ao:ha,g=h?void 0:m(t);return oS(g||t,function(v,y){g&&(y=v,v=t[y]),hd(s,y,wS(v,e,r,y,t,i))}),s}var dZe,pZe,mZe,Ife,gZe,vZe,yZe,xZe,Dfe,bZe,wZe,kZe,Nfe,TZe,EZe,CZe,SZe,_Ze,AZe,LZe,RZe,IZe,DZe,NZe,MZe,OZe,PZe,BZe,FZe,Cn,kS,GP=A(()=>{j4();DP();n3();Whe();Xhe();kO();CO();Zhe();Jhe();zP();tfe();Zp();cfe();bfe();_O();Da();z1();Cfe();cl();Rfe();qh();dd();dZe=1,pZe=2,mZe=4,Ife="[object Arguments]",gZe="[object Array]",vZe="[object Boolean]",yZe="[object Date]",xZe="[object Error]",Dfe="[object Function]",bZe="[object GeneratorFunction]",wZe="[object Map]",kZe="[object Number]",Nfe="[object Object]",TZe="[object RegExp]",EZe="[object Set]",CZe="[object String]",SZe="[object Symbol]",_Ze="[object WeakMap]",AZe="[object ArrayBuffer]",LZe="[object DataView]",RZe="[object Float32Array]",IZe="[object Float64Array]",DZe="[object Int8Array]",NZe="[object Int16Array]",MZe="[object Int32Array]",OZe="[object Uint8Array]",PZe="[object Uint8ClampedArray]",BZe="[object Uint16Array]",FZe="[object Uint32Array]",Cn={};Cn[Ife]=Cn[gZe]=Cn[AZe]=Cn[LZe]=Cn[vZe]=Cn[yZe]=Cn[RZe]=Cn[IZe]=Cn[DZe]=Cn[NZe]=Cn[MZe]=Cn[wZe]=Cn[kZe]=Cn[Nfe]=Cn[TZe]=Cn[EZe]=Cn[CZe]=Cn[SZe]=Cn[OZe]=Cn[PZe]=Cn[BZe]=Cn[FZe]=!0;Cn[xZe]=Cn[Dfe]=Cn[_Ze]=!1;kS=wS});function $Ze(t){return kS(t,zZe)}var zZe,S3,UP=A(()=>{GP();zZe=4;S3=$Ze});function qZe(t){return kS(t,GZe|UZe)}var GZe,UZe,qP,Mfe=A(()=>{GP();GZe=1,UZe=4;qP=qZe});function HZe(t){return this.__data__.set(t,VZe),this}var VZe,Ofe,Pfe=A(()=>{VZe="__lodash_hash_undefined__";Ofe=HZe});function WZe(t){return this.__data__.has(t)}var Bfe,Ffe=A(()=>{Bfe=WZe});function TS(t){var e=-1,r=t==null?0:t.length;for(this.__data__=new Vp;++e{pC();Pfe();Ffe();TS.prototype.add=TS.prototype.push=Ofe;TS.prototype.has=Bfe;ES=TS});function YZe(t,e){for(var r=-1,n=t==null?0:t.length;++r{zfe=YZe});function XZe(t,e){return t.has(e)}var CS,HP=A(()=>{CS=XZe});function ZZe(t,e,r,n,a,i){var s=r&jZe,o=t.length,l=e.length;if(o!=l&&!(s&&l>o))return!1;var u=i.get(t),h=i.get(e);if(u&&h)return u==e&&h==t;var f=-1,d=!0,p=r&KZe?new ES:void 0;for(i.set(t,e),i.set(e,t);++f{VP();$fe();HP();jZe=1,KZe=2;SS=ZZe});function QZe(t){var e=-1,r=Array(t.size);return t.forEach(function(n,a){r[++e]=[a,n]}),r}var Gfe,Ufe=A(()=>{Gfe=QZe});function JZe(t){var e=-1,r=Array(t.size);return t.forEach(function(n){r[++e]=n}),r}var ev,_S=A(()=>{ev=JZe});function dQe(t,e,r,n,a,i,s){switch(r){case fQe:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case hQe:return!(t.byteLength!=e.byteLength||!i(new M1(t),new M1(e)));case rQe:case nQe:case sQe:return hl(+t,+e);case aQe:return t.name==e.name&&t.message==e.message;case oQe:case uQe:return t==e+"";case iQe:var o=Gfe;case lQe:var l=n&eQe;if(o||(o=ev),t.size!=e.size&&!l)return!1;var u=s.get(t);if(u)return u==e;n|=tQe,s.set(t,e);var h=SS(o(t),o(e),n,a,i,s);return s.delete(t),h;case cQe:if(YP)return YP.call(t)==YP.call(e)}return!1}var eQe,tQe,rQe,nQe,aQe,iQe,sQe,oQe,lQe,uQe,cQe,hQe,fQe,qfe,YP,Vfe,Hfe=A(()=>{Up();TO();qp();WP();Ufe();_S();eQe=1,tQe=2,rQe="[object Boolean]",nQe="[object Date]",aQe="[object Error]",iQe="[object Map]",sQe="[object Number]",oQe="[object RegExp]",lQe="[object Set]",uQe="[object String]",cQe="[object Symbol]",hQe="[object ArrayBuffer]",fQe="[object DataView]",qfe=di?di.prototype:void 0,YP=qfe?qfe.valueOf:void 0;Vfe=dQe});function vQe(t,e,r,n,a,i){var s=r&pQe,o=C3(t),l=o.length,u=C3(e),h=u.length;if(l!=h&&!s)return!1;for(var f=l;f--;){var d=o[f];if(!(s?d in e:gQe.call(e,d)))return!1}var p=i.get(t),m=i.get(e);if(p&&m)return p==e&&m==t;var g=!0;i.set(t,e),i.set(e,t);for(var v=s;++f{zP();pQe=1,mQe=Object.prototype,gQe=mQe.hasOwnProperty;Wfe=vQe});function bQe(t,e,r,n,a,i){var s=pr(t),o=pr(e),l=s?jfe:$o(t),u=o?jfe:$o(e);l=l==Xfe?AS:l,u=u==Xfe?AS:u;var h=l==AS,f=u==AS,d=l==u;if(d&&nu(t)){if(!nu(e))return!1;s=!0,h=!1}if(d&&!h)return i||(i=new nc),s||cd(t)?SS(t,e,r,n,a,i):Vfe(t,e,l,r,n,a,i);if(!(r&yQe)){var p=h&&Kfe.call(t,"__wrapped__"),m=f&&Kfe.call(e,"__wrapped__");if(p||m){var g=p?t.value():t,v=m?e.value():e;return i||(i=new nc),a(g,v,r,n,i)}}return d?(i||(i=new nc),Wfe(t,e,r,n,a,i)):!1}var yQe,Xfe,jfe,AS,xQe,Kfe,Zfe,Qfe=A(()=>{j4();WP();Hfe();Yfe();Zp();Da();z1();t3();yQe=1,Xfe="[object Arguments]",jfe="[object Array]",AS="[object Object]",xQe=Object.prototype,Kfe=xQe.hasOwnProperty;Zfe=bQe});function Jfe(t,e,r,n,a){return t===e?!0:t==null||e==null||!xa(t)&&!xa(e)?t!==t&&e!==e:Zfe(t,e,r,n,Jfe,a)}var LS,XP=A(()=>{Qfe();tu();LS=Jfe});function TQe(t,e,r,n){var a=r.length,i=a,s=!n;if(t==null)return!i;for(t=Object(t);a--;){var o=r[a];if(s&&o[2]?o[1]!==t[o[0]]:!(o[0]in t))return!1}for(;++a{j4();XP();wQe=1,kQe=2;ede=TQe});function EQe(t){return t===t&&!Vn(t)}var RS,jP=A(()=>{cl();RS=EQe});function CQe(t){for(var e=ha(t),r=e.length;r--;){var n=e[r],a=t[n];e[r]=[n,a,RS(a)]}return e}var rde,nde=A(()=>{jP();qh();rde=CQe});function SQe(t,e){return function(r){return r==null?!1:r[t]===e&&(e!==void 0||t in Object(r))}}var IS,KP=A(()=>{IS=SQe});function _Qe(t){var e=rde(t);return e.length==1&&e[0][2]?IS(e[0][0],e[0][1]):function(r){return r===t||ede(r,t,e)}}var ade,ide=A(()=>{tde();nde();KP();ade=_Qe});function AQe(t,e){return t!=null&&e in Object(t)}var sde,ode=A(()=>{sde=AQe});function LQe(t,e,r){e=wd(e,t);for(var n=-1,a=e.length,i=!1;++n{k3();B1();Da();a3();TC();Z1();DS=LQe});function RQe(t,e){return t!=null&&DS(t,e,sde)}var NS,QP=A(()=>{ode();ZP();NS=RQe});function NQe(t,e){return K1(t)&&RS(e)?IS(uc(t),e):function(r){var n=Nhe(r,t);return n===void 0&&n===e?NS(r,t):LS(e,n,IQe|DQe)}}var IQe,DQe,lde,ude=A(()=>{XP();Mhe();QP();cS();jP();KP();Z1();IQe=1,DQe=2;lde=NQe});function MQe(t){return function(e){return e?.[t]}}var MS,JP=A(()=>{MS=MQe});function OQe(t){return function(e){return kd(e,t)}}var cde,hde=A(()=>{T3();cde=OQe});function PQe(t){return K1(t)?MS(uc(t)):cde(t)}var fde,dde=A(()=>{JP();hde();cS();Z1();fde=PQe});function BQe(t){return typeof t=="function"?t:t==null?io:typeof t=="object"?pr(t)?lde(t[0],t[1]):ade(t):fde(t)}var gi,cc=A(()=>{ide();ude();pd();Da();dde();gi=BQe});function FQe(t,e){return t&&N1(t,e,ha)}var tv,OS=A(()=>{mC();qh();tv=FQe});function zQe(t,e){return function(r,n){if(r==null)return r;if(!pi(r))return t(r,n);for(var a=r.length,i=e?a:-1,s=Object(r);(e?i--:++i{ac();pde=zQe});var $Qe,Cd,_3=A(()=>{OS();mde();$Qe=pde(tv),Cd=$Qe});var GQe,PS,gde=A(()=>{ul();GQe=function(){return ca.Date.now()},PS=GQe});var vde,UQe,qQe,eB,yde=A(()=>{i3();qp();s3();dd();vde=Object.prototype,UQe=vde.hasOwnProperty,qQe=md(function(t,e){t=Object(t);var r=-1,n=e.length,a=n>2?e[2]:void 0;for(a&&Ph(e[0],e[1],a)&&(n=1);++r{xde=VQe});function HQe(t){var e=t==null?0:t.length;return e?t[e-1]:void 0}var Sd,wde=A(()=>{Sd=HQe});function WQe(t){return typeof t=="function"?t:io}var rv,BS=A(()=>{pd();rv=WQe});function YQe(t,e){var r=pr(t)?oS:Cd;return r(t,rv(e))}var Ge,FS=A(()=>{DP();_3();BS();Da();Ge=YQe});var kde=A(()=>{FS()});function XQe(t,e){var r=[];return Cd(t,function(n,a,i){e(n,a,i)&&r.push(n)}),r}var Tde,Ede=A(()=>{_3();Tde=XQe});function jQe(t,e){var r=pr(t)?pS:Tde;return r(t,gi(e,3))}var Gi,tB=A(()=>{OP();Ede();cc();Da();Gi=jQe});function KQe(t){return function(e,r,n){var a=Object(e);if(!pi(e)){var i=gi(r,3);e=ha(e),r=function(o){return i(a[o],o,a)}}var s=t(e,r,n);return s>-1?a[i?e[s]:s]:void 0}}var Cde,Sde=A(()=>{cc();ac();qh();Cde=KQe});function QQe(t,e,r){var n=t==null?0:t.length;if(!n)return-1;var a=r==null?0:phe(r);return a<0&&(a=ZQe(n+a,0)),lS(t,gi(e,3),a)}var ZQe,_de,Ade=A(()=>{NP();cc();mhe();ZQe=Math.max;_de=QQe});var JQe,nv,Lde=A(()=>{Sde();Ade();JQe=Cde(_de),nv=JQe});function eJe(t,e){var r=-1,n=pi(t)?Array(t.length):[];return Cd(t,function(a,i,s){n[++r]=e(a,i,s)}),n}var zS,rB=A(()=>{_3();ac();zS=eJe});function tJe(t,e){var r=pr(t)?lc:zS;return r(t,gi(e,3))}var sr,av=A(()=>{w3();cc();rB();Da();sr=tJe});function rJe(t,e){return Td(sr(t,e),1)}var Rde,Ide=A(()=>{E3();av();Rde=rJe});function nJe(t,e){return t==null?t:N1(t,rv(e),ao)}var nB,Dde=A(()=>{mC();BS();dd();nB=nJe});function aJe(t,e){return t&&tv(t,rv(e))}var aB,Nde=A(()=>{OS();BS();aB=aJe});function iJe(t,e){return t>e}var Mde,Ode=A(()=>{Mde=iJe});function lJe(t,e){return t!=null&&oJe.call(t,e)}var sJe,oJe,Pde,Bde=A(()=>{sJe=Object.prototype,oJe=sJe.hasOwnProperty;Pde=lJe});function uJe(t,e){return t!=null&&DS(t,e,Pde)}var A3,Fde=A(()=>{Bde();ZP();A3=uJe});function hJe(t){return typeof t=="string"||!pr(t)&&xa(t)&&Es(t)==cJe}var cJe,zde,$de=A(()=>{td();Da();tu();cJe="[object String]";zde=hJe});function fJe(t,e){return lc(e,function(r){return t[r]})}var Gde,Ude=A(()=>{w3();Gde=fJe});function dJe(t){return t==null?[]:Gde(t,ha(t))}var Go,qde=A(()=>{Ude();qh();Go=dJe});function yJe(t){if(t==null)return!0;if(pi(t)&&(pr(t)||typeof t=="string"||typeof t.splice=="function"||nu(t)||cd(t)||ru(t)))return!t.length;var e=$o(t);if(e==pJe||e==mJe)return!t.size;if(ld(t))return!j1(t).length;for(var r in t)if(vJe.call(t,r))return!1;return!0}var pJe,mJe,gJe,vJe,Vh,$S=A(()=>{uS();Zp();B1();Da();ac();z1();Q4();t3();pJe="[object Map]",mJe="[object Set]",gJe=Object.prototype,vJe=gJe.hasOwnProperty;Vh=yJe});function xJe(t){return t===void 0}var un,Vde=A(()=>{un=xJe});function bJe(t,e){return t{GS=bJe});function wJe(t,e){var r={};return e=gi(e,3),tv(t,function(n,a,i){od(r,a,e(n,a,i))}),r}var Qp,Hde=A(()=>{K4();OS();cc();Qp=wJe});function kJe(t,e,r){for(var n=-1,a=t.length;++n{jp();iv=kJe});function TJe(t){return t&&t.length?iv(t,io,Mde):void 0}var co,Wde=A(()=>{US();Ode();pd();co=TJe});function EJe(t){return t&&t.length?iv(t,io,GS):void 0}var iu,sB=A(()=>{US();iB();pd();iu=EJe});function CJe(t,e){return t&&t.length?iv(t,gi(e,2),GS):void 0}var Jp,Yde=A(()=>{US();cc();iB();Jp=CJe});function SJe(t,e,r,n){if(!Vn(t))return t;e=wd(e,t);for(var a=-1,i=e.length,s=i-1,o=t;o!=null&&++a{n3();k3();a3();cl();Z1();Xde=SJe});function _Je(t,e,r){for(var n=-1,a=e.length,i={};++n{T3();jde();k3();Kde=_Je});function AJe(t,e){var r=t.length;for(t.sort(e);r--;)t[r]=t[r].value;return t}var Qde,Jde=A(()=>{Qde=AJe});function LJe(t,e){if(t!==e){var r=t!==void 0,n=t===null,a=t===t,i=zo(t),s=e!==void 0,o=e===null,l=e===e,u=zo(e);if(!o&&!u&&!i&&t>e||i&&s&&l&&!o&&!u||n&&s&&l||!r&&l||!a)return 1;if(!n&&!i&&!u&&t{jp();e0e=LJe});function RJe(t,e,r){for(var n=-1,a=t.criteria,i=e.criteria,s=a.length,o=r.length;++n=o)return l;var u=r[n];return l*(u=="desc"?-1:1)}}return t.index-e.index}var r0e,n0e=A(()=>{t0e();r0e=RJe});function IJe(t,e,r){e.length?e=lc(e,function(i){return pr(i)?function(s){return kd(s,i.length===1?i[0]:i)}:i}):e=[io];var n=-1;e=lc(e,ud(gi));var a=zS(t,function(i,s,o){var l=lc(e,function(u){return u(i)});return{criteria:l,index:++n,value:i}});return Qde(a,function(i,s){return r0e(i,s,r)})}var a0e,i0e=A(()=>{w3();T3();cc();rB();Jde();J4();n0e();pd();Da();a0e=IJe});var DJe,s0e,o0e=A(()=>{JP();DJe=MS("length"),s0e=DJe});function VJe(t){for(var e=l0e.lastIndex=0;l0e.test(t);)++e;return e}var u0e,NJe,MJe,OJe,PJe,BJe,FJe,oB,lB,zJe,c0e,h0e,f0e,$Je,d0e,p0e,GJe,UJe,qJe,l0e,m0e,g0e=A(()=>{u0e="\\ud800-\\udfff",NJe="\\u0300-\\u036f",MJe="\\ufe20-\\ufe2f",OJe="\\u20d0-\\u20ff",PJe=NJe+MJe+OJe,BJe="\\ufe0e\\ufe0f",FJe="["+u0e+"]",oB="["+PJe+"]",lB="\\ud83c[\\udffb-\\udfff]",zJe="(?:"+oB+"|"+lB+")",c0e="[^"+u0e+"]",h0e="(?:\\ud83c[\\udde6-\\uddff]){2}",f0e="[\\ud800-\\udbff][\\udc00-\\udfff]",$Je="\\u200d",d0e=zJe+"?",p0e="["+BJe+"]?",GJe="(?:"+$Je+"(?:"+[c0e,h0e,f0e].join("|")+")"+p0e+d0e+")*",UJe=p0e+d0e+GJe,qJe="(?:"+[c0e+oB+"?",oB,h0e,f0e,FJe].join("|")+")",l0e=RegExp(lB+"(?="+lB+")|"+qJe+UJe,"g");m0e=VJe});function HJe(t){return Ghe(t)?m0e(t):s0e(t)}var v0e,y0e=A(()=>{o0e();Uhe();g0e();v0e=HJe});function WJe(t,e){return Kde(t,e,function(r,n){return NS(t,n)})}var x0e,b0e=A(()=>{Zde();QP();x0e=WJe});var YJe,em,w0e=A(()=>{b0e();$he();YJe=zhe(function(t,e){return t==null?{}:x0e(t,e)}),em=YJe});function KJe(t,e,r,n){for(var a=-1,i=jJe(XJe((e-t)/(r||1)),0),s=Array(i);i--;)s[n?i:++a]=t,t+=r;return s}var XJe,jJe,k0e,T0e=A(()=>{XJe=Math.ceil,jJe=Math.max;k0e=KJe});function ZJe(t){return function(e,r,n){return n&&typeof n!="number"&&Ph(e,r,n)&&(r=n=void 0),e=X1(e),r===void 0?(r=e,e=0):r=X1(r),n=n===void 0?e{T0e();s3();IP();E0e=ZJe});var QJe,dl,S0e=A(()=>{C0e();QJe=E0e(),dl=QJe});function JJe(t,e,r,n,a){return a(t,function(i,s,o){r=n?(n=!1,i):e(r,i,s,o)}),r}var _0e,A0e=A(()=>{_0e=JJe});function eet(t,e,r){var n=pr(t)?qhe:_0e,a=arguments.length<3;return n(t,gi(e,4),r,a,Cd)}var Uo,uB=A(()=>{Vhe();_3();cc();A0e();Da();Uo=eet});function net(t){if(t==null)return 0;if(pi(t))return zde(t)?v0e(t):t.length;var e=$o(t);return e==tet||e==ret?t.size:j1(t).length}var tet,ret,cB,L0e=A(()=>{uS();Zp();ac();$de();y0e();tet="[object Map]",ret="[object Set]";cB=net});var aet,hc,R0e=A(()=>{E3();i0e();i3();s3();aet=md(function(t,e){if(t==null)return[];var r=e.length;return r>1&&Ph(t,e[0],e[1])?e=[]:r>2&&Ph(e[0],e[1],e[2])&&(e=[e[0]]),a0e(t,Td(e,1),[])}),hc=aet});var iet,set,I0e,D0e=A(()=>{$P();yhe();_S();iet=1/0,set=Ed&&1/ev(new Ed([,-0]))[1]==iet?function(t){return new Ed(t)}:vhe,I0e=set});function uet(t,e,r){var n=-1,a=Che,i=t.length,s=!0,o=[],l=o;if(r)s=!1,a=xde;else if(i>=oet){var u=e?null:I0e(t);if(u)return ev(u);s=!1,a=CS,l=new ES}else l=e?[]:o;e:for(;++n{VP();She();bde();HP();D0e();_S();oet=200;qS=uet});var cet,fB,N0e=A(()=>{E3();i3();hB();LO();cet=md(function(t){return qS(Td(t,1,EC,!0))}),fB=cet});function het(t,e){return t&&t.length?qS(t,gi(e,2)):[]}var M0e,O0e=A(()=>{cc();hB();M0e=het});function det(t){var e=++fet;return hS(t)+e}var fet,tm,P0e=A(()=>{MP();fet=0;tm=det});function pet(t,e,r){for(var n=-1,a=t.length,i=e.length,s={};++n{B0e=pet});function met(t,e){return B0e(t||[],e||[],hd)}var VS,z0e=A(()=>{n3();F0e();VS=met});var Qr=A(()=>{UP();Mfe();MO();yde();kde();tB();Lde();dS();FS();Dde();Nde();Fde();Da();$S();V4();Vde();qh();wde();av();Hde();Wde();PO();sB();Yde();gde();w0e();S0e();uB();L0e();R0e();N0e();P0e();qde();z0e();});function G0e(t,e){t[e]?t[e]++:t[e]=1}function U0e(t,e){--t[e]||delete t[e]}function L3(t,e,r,n){var a=""+e,i=""+r;if(!t&&a>i){var s=a;a=i,i=s}return a+$0e+i+$0e+(un(n)?get:n)}function vet(t,e,r,n){var a=""+e,i=""+r;if(!t&&a>i){var s=a;a=i,i=s}var o={v:a,w:i};return n&&(o.name=n),o}function dB(t,e){return L3(t,e.v,e.w,e.name)}var get,rm,$0e,Jr,HS=A(()=>{Qr();get="\0",rm="\0",$0e="",Jr=class{constructor(e={}){this._isDirected=Object.prototype.hasOwnProperty.call(e,"directed")?e.directed:!0,this._isMultigraph=Object.prototype.hasOwnProperty.call(e,"multigraph")?e.multigraph:!1,this._isCompound=Object.prototype.hasOwnProperty.call(e,"compound")?e.compound:!1,this._label=void 0,this._defaultNodeLabelFn=so(void 0),this._defaultEdgeLabelFn=so(void 0),this._nodes={},this._isCompound&&(this._parent={},this._children={},this._children[rm]={}),this._in={},this._preds={},this._out={},this._sucs={},this._edgeObjs={},this._edgeLabels={}}isDirected(){return this._isDirected}isMultigraph(){return this._isMultigraph}isCompound(){return this._isCompound}setGraph(e){return this._label=e,this}graph(){return this._label}setDefaultNodeLabel(e){return rc(e)||(e=so(e)),this._defaultNodeLabelFn=e,this}nodeCount(){return this._nodeCount}nodes(){return ha(this._nodes)}sources(){var e=this;return Gi(this.nodes(),function(r){return Vh(e._in[r])})}sinks(){var e=this;return Gi(this.nodes(),function(r){return Vh(e._out[r])})}setNodes(e,r){var n=arguments,a=this;return Ge(e,function(i){n.length>1?a.setNode(i,r):a.setNode(i)}),this}setNode(e,r){return Object.prototype.hasOwnProperty.call(this._nodes,e)?(arguments.length>1&&(this._nodes[e]=r),this):(this._nodes[e]=arguments.length>1?r:this._defaultNodeLabelFn(e),this._isCompound&&(this._parent[e]=rm,this._children[e]={},this._children[rm][e]=!0),this._in[e]={},this._preds[e]={},this._out[e]={},this._sucs[e]={},++this._nodeCount,this)}node(e){return this._nodes[e]}hasNode(e){return Object.prototype.hasOwnProperty.call(this._nodes,e)}removeNode(e){if(Object.prototype.hasOwnProperty.call(this._nodes,e)){var r=n=>this.removeEdge(this._edgeObjs[n]);delete this._nodes[e],this._isCompound&&(this._removeFromParentsChildList(e),delete this._parent[e],Ge(this.children(e),n=>{this.setParent(n)}),delete this._children[e]),Ge(ha(this._in[e]),r),delete this._in[e],delete this._preds[e],Ge(ha(this._out[e]),r),delete this._out[e],delete this._sucs[e],--this._nodeCount}return this}setParent(e,r){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(un(r))r=rm;else{r+="";for(var n=r;!un(n);n=this.parent(n))if(n===e)throw new Error("Setting "+r+" as parent of "+e+" would create a cycle");this.setNode(r)}return this.setNode(e),this._removeFromParentsChildList(e),this._parent[e]=r,this._children[r][e]=!0,this}_removeFromParentsChildList(e){delete this._children[this._parent[e]][e]}parent(e){if(this._isCompound){var r=this._parent[e];if(r!==rm)return r}}children(e){if(un(e)&&(e=rm),this._isCompound){var r=this._children[e];if(r)return ha(r)}else{if(e===rm)return this.nodes();if(this.hasNode(e))return[]}}predecessors(e){var r=this._preds[e];if(r)return ha(r)}successors(e){var r=this._sucs[e];if(r)return ha(r)}neighbors(e){var r=this.predecessors(e);if(r)return fB(r,this.successors(e))}isLeaf(e){var r;return this.isDirected()?r=this.successors(e):r=this.neighbors(e),r.length===0}filterNodes(e){var r=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});r.setGraph(this.graph());var n=this;Ge(this._nodes,function(s,o){e(o)&&r.setNode(o,s)}),Ge(this._edgeObjs,function(s){r.hasNode(s.v)&&r.hasNode(s.w)&&r.setEdge(s,n.edge(s))});var a={};function i(s){var o=n.parent(s);return o===void 0||r.hasNode(o)?(a[s]=o,o):o in a?a[o]:i(o)}return this._isCompound&&Ge(r.nodes(),function(s){r.setParent(s,i(s))}),r}setDefaultEdgeLabel(e){return rc(e)||(e=so(e)),this._defaultEdgeLabelFn=e,this}edgeCount(){return this._edgeCount}edges(){return Go(this._edgeObjs)}setPath(e,r){var n=this,a=arguments;return Uo(e,function(i,s){return a.length>1?n.setEdge(i,s,r):n.setEdge(i,s),s}),this}setEdge(){var e,r,n,a,i=!1,s=arguments[0];typeof s=="object"&&s!==null&&"v"in s?(e=s.v,r=s.w,n=s.name,arguments.length===2&&(a=arguments[1],i=!0)):(e=s,r=arguments[1],n=arguments[3],arguments.length>2&&(a=arguments[2],i=!0)),e=""+e,r=""+r,un(n)||(n=""+n);var o=L3(this._isDirected,e,r,n);if(Object.prototype.hasOwnProperty.call(this._edgeLabels,o))return i&&(this._edgeLabels[o]=a),this;if(!un(n)&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(e),this.setNode(r),this._edgeLabels[o]=i?a:this._defaultEdgeLabelFn(e,r,n);var l=vet(this._isDirected,e,r,n);return e=l.v,r=l.w,Object.freeze(l),this._edgeObjs[o]=l,G0e(this._preds[r],e),G0e(this._sucs[e],r),this._in[r][o]=l,this._out[e][o]=l,this._edgeCount++,this}edge(e,r,n){var a=arguments.length===1?dB(this._isDirected,arguments[0]):L3(this._isDirected,e,r,n);return this._edgeLabels[a]}hasEdge(e,r,n){var a=arguments.length===1?dB(this._isDirected,arguments[0]):L3(this._isDirected,e,r,n);return Object.prototype.hasOwnProperty.call(this._edgeLabels,a)}removeEdge(e,r,n){var a=arguments.length===1?dB(this._isDirected,arguments[0]):L3(this._isDirected,e,r,n),i=this._edgeObjs[a];return i&&(e=i.v,r=i.w,delete this._edgeLabels[a],delete this._edgeObjs[a],U0e(this._preds[r],e),U0e(this._sucs[e],r),delete this._in[r][a],delete this._out[e][a],this._edgeCount--),this}inEdges(e,r){var n=this._in[e];if(n){var a=Go(n);return r?Gi(a,function(i){return i.v===r}):a}}outEdges(e,r){var n=this._out[e];if(n){var a=Go(n);return r?Gi(a,function(i){return i.w===r}):a}}nodeEdges(e,r){var n=this.inEdges(e,r);if(n)return n.concat(this.outEdges(e,r))}};Jr.prototype._nodeCount=0;Jr.prototype._edgeCount=0});var pl=A(()=>{HS()});function q0e(t){t._prev._next=t._next,t._next._prev=t._prev,delete t._next,delete t._prev}function yet(t,e){if(t!=="_next"&&t!=="_prev")return e}var YS,V0e=A(()=>{YS=class{constructor(){var e={};e._next=e._prev=e,this._sentinel=e}dequeue(){var e=this._sentinel,r=e._prev;if(r!==e)return q0e(r),r}enqueue(e){var r=this._sentinel;e._prev&&e._next&&q0e(e),e._next=r._next,r._next._prev=e,r._next=e,e._prev=r}toString(){for(var e=[],r=this._sentinel,n=r._prev;n!==r;)e.push(JSON.stringify(n,yet)),n=n._prev;return"["+e.join(", ")+"]"}}});function H0e(t,e){if(t.nodeCount()<=1)return[];var r=wet(t,e||xet),n=bet(r.graph,r.buckets,r.zeroIdx);return uo(sr(n,function(a){return t.outEdges(a.v,a.w)}))}function bet(t,e,r){for(var n=[],a=e[e.length-1],i=e[0],s;t.nodeCount();){for(;s=i.dequeue();)pB(t,e,r,s);for(;s=a.dequeue();)pB(t,e,r,s);if(t.nodeCount()){for(var o=e.length-2;o>0;--o)if(s=e[o].dequeue(),s){n=n.concat(pB(t,e,r,s,!0));break}}}return n}function pB(t,e,r,n,a){var i=a?[]:void 0;return Ge(t.inEdges(n.v),function(s){var o=t.edge(s),l=t.node(s.v);a&&i.push({v:s.v,w:s.w}),l.out-=o,mB(e,r,l)}),Ge(t.outEdges(n.v),function(s){var o=t.edge(s),l=s.w,u=t.node(l);u.in-=o,mB(e,r,u)}),t.removeNode(n.v),i}function wet(t,e){var r=new Jr,n=0,a=0;Ge(t.nodes(),function(o){r.setNode(o,{v:o,in:0,out:0})}),Ge(t.edges(),function(o){var l=r.edge(o.v,o.w)||0,u=e(o),h=l+u;r.setEdge(o.v,o.w,h),a=Math.max(a,r.node(o.v).out+=u),n=Math.max(n,r.node(o.w).in+=u)});var i=dl(a+n+3).map(function(){return new YS}),s=n+1;return Ge(r.nodes(),function(o){mB(i,s,r.node(o))}),{graph:r,buckets:i,zeroIdx:s}}function mB(t,e,r){r.out?r.in?t[r.out-r.in+e].enqueue(r):t[t.length-1].enqueue(r):t[0].enqueue(r)}var xet,W0e=A(()=>{Qr();pl();V0e();xet=so(1)});function Y0e(t){var e=t.graph().acyclicer==="greedy"?H0e(t,r(t)):ket(t);Ge(e,function(n){var a=t.edge(n);t.removeEdge(n),a.forwardName=n.name,a.reversed=!0,t.setEdge(n.w,n.v,a,tm("rev"))});function r(n){return function(a){return n.edge(a).weight}}}function ket(t){var e=[],r={},n={};function a(i){Object.prototype.hasOwnProperty.call(n,i)||(n[i]=!0,r[i]=!0,Ge(t.outEdges(i),function(s){Object.prototype.hasOwnProperty.call(r,s.w)?e.push(s):a(s.w)}),delete r[i])}return Ge(t.nodes(),a),e}function X0e(t){Ge(t.edges(),function(e){var r=t.edge(e);if(r.reversed){t.removeEdge(e);var n=r.forwardName;delete r.reversed,delete r.forwardName,t.setEdge(e.w,e.v,r,n)}})}var gB=A(()=>{Qr();W0e()});function fc(t,e,r,n){var a;do a=tm(n);while(t.hasNode(a));return r.dummy=e,t.setNode(a,r),a}function K0e(t){var e=new Jr().setGraph(t.graph());return Ge(t.nodes(),function(r){e.setNode(r,t.node(r))}),Ge(t.edges(),function(r){var n=e.edge(r.v,r.w)||{weight:0,minlen:1},a=t.edge(r);e.setEdge(r.v,r.w,{weight:n.weight+a.weight,minlen:Math.max(n.minlen,a.minlen)})}),e}function XS(t){var e=new Jr({multigraph:t.isMultigraph()}).setGraph(t.graph());return Ge(t.nodes(),function(r){t.children(r).length||e.setNode(r,t.node(r))}),Ge(t.edges(),function(r){e.setEdge(r,t.edge(r))}),e}function vB(t,e){var r=t.x,n=t.y,a=e.x-r,i=e.y-n,s=t.width/2,o=t.height/2;if(!a&&!i)throw new Error("Not possible to find intersection inside of the rectangle");var l,u;return Math.abs(i)*s>Math.abs(a)*o?(i<0&&(o=-o),l=o*a/i,u=o):(a<0&&(s=-s),l=s,u=s*i/a),{x:r+l,y:n+u}}function _d(t){var e=sr(dl(xB(t)+1),function(){return[]});return Ge(t.nodes(),function(r){var n=t.node(r),a=n.rank;un(a)||(e[a][n.order]=r)}),e}function Z0e(t){var e=iu(sr(t.nodes(),function(r){return t.node(r).rank}));Ge(t.nodes(),function(r){var n=t.node(r);A3(n,"rank")&&(n.rank-=e)})}function Q0e(t){var e=iu(sr(t.nodes(),function(i){return t.node(i).rank})),r=[];Ge(t.nodes(),function(i){var s=t.node(i).rank-e;r[s]||(r[s]=[]),r[s].push(i)});var n=0,a=t.graph().nodeRankFactor;Ge(r,function(i,s){un(i)&&s%a!==0?--n:n&&Ge(i,function(o){t.node(o).rank+=n})})}function yB(t,e,r,n){var a={width:0,height:0};return arguments.length>=4&&(a.rank=r,a.order=n),fc(t,"border",a,e)}function xB(t){return co(sr(t.nodes(),function(e){var r=t.node(e).rank;if(!un(r))return r}))}function J0e(t,e){var r={lhs:[],rhs:[]};return Ge(t,function(n){e(n)?r.lhs.push(n):r.rhs.push(n)}),r}function epe(t,e){var r=PS();try{return e()}finally{console.log(t+" time: "+(PS()-r)+"ms")}}function tpe(t,e){return e()}var dc=A(()=>{Qr();pl()});function npe(t){function e(r){var n=t.children(r),a=t.node(r);if(n.length&&Ge(n,e),Object.prototype.hasOwnProperty.call(a,"minRank")){a.borderLeft=[],a.borderRight=[];for(var i=a.minRank,s=a.maxRank+1;i{Qr();dc()});function spe(t){var e=t.graph().rankdir.toLowerCase();(e==="lr"||e==="rl")&&lpe(t)}function ope(t){var e=t.graph().rankdir.toLowerCase();(e==="bt"||e==="rl")&&Tet(t),(e==="lr"||e==="rl")&&(Eet(t),lpe(t))}function lpe(t){Ge(t.nodes(),function(e){ipe(t.node(e))}),Ge(t.edges(),function(e){ipe(t.edge(e))})}function ipe(t){var e=t.width;t.width=t.height,t.height=e}function Tet(t){Ge(t.nodes(),function(e){bB(t.node(e))}),Ge(t.edges(),function(e){var r=t.edge(e);Ge(r.points,bB),Object.prototype.hasOwnProperty.call(r,"y")&&bB(r)})}function bB(t){t.y=-t.y}function Eet(t){Ge(t.nodes(),function(e){wB(t.node(e))}),Ge(t.edges(),function(e){var r=t.edge(e);Ge(r.points,wB),Object.prototype.hasOwnProperty.call(r,"x")&&wB(r)})}function wB(t){var e=t.x;t.x=t.y,t.y=e}var upe=A(()=>{Qr()});function cpe(t){t.graph().dummyChains=[],Ge(t.edges(),function(e){_et(t,e)})}function _et(t,e){var r=e.v,n=t.node(r).rank,a=e.w,i=t.node(a).rank,s=e.name,o=t.edge(e),l=o.labelRank;if(i!==n+1){t.removeEdge(e);var u=void 0,h,f;for(f=0,++n;n{Qr();dc()});function R3(t){var e={};function r(n){var a=t.node(n);if(Object.prototype.hasOwnProperty.call(e,n))return a.rank;e[n]=!0;var i=iu(sr(t.outEdges(n),function(s){return r(s.w)-t.edge(s).minlen}));return(i===Number.POSITIVE_INFINITY||i===void 0||i===null)&&(i=0),a.rank=i}Ge(t.sources(),r)}function nm(t,e){return t.node(e.w).rank-t.node(e.v).rank-t.edge(e).minlen}var jS=A(()=>{Qr()});function KS(t){var e=new Jr({directed:!1}),r=t.nodes()[0],n=t.nodeCount();e.setNode(r,{});for(var a,i;Aet(e,t){Qr();pl();jS()});var dpe=A(()=>{});var EB=A(()=>{});var Vor,CB=A(()=>{Qr();EB();Vor=so(1)});var ppe=A(()=>{CB()});var SB=A(()=>{});var mpe=A(()=>{SB()});var Zor,gpe=A(()=>{Qr();Zor=so(1)});function _B(t){var e={},r={},n=[];function a(i){if(Object.prototype.hasOwnProperty.call(r,i))throw new I3;Object.prototype.hasOwnProperty.call(e,i)||(r[i]=!0,e[i]=!0,Ge(t.predecessors(i),a),delete r[i],n.push(i))}if(Ge(t.sinks(),a),cB(e)!==t.nodeCount())throw new I3;return n}function I3(){}var AB=A(()=>{Qr();_B.CycleException=I3;I3.prototype=new Error});var vpe=A(()=>{AB()});function ZS(t,e,r){pr(e)||(e=[e]);var n=(t.isDirected()?t.successors:t.neighbors).bind(t),a=[],i={};return Ge(e,function(s){if(!t.hasNode(s))throw new Error("Graph does not have node: "+s);ype(t,s,r==="post",i,n,a)}),a}function ype(t,e,r,n,a,i){Object.prototype.hasOwnProperty.call(n,e)||(n[e]=!0,r||i.push(e),Ge(a(e),function(s){ype(t,s,r,n,a,i)}),r&&i.push(e))}var LB=A(()=>{Qr()});function RB(t,e){return ZS(t,e,"post")}var xpe=A(()=>{LB()});function IB(t,e){return ZS(t,e,"pre")}var bpe=A(()=>{LB()});var wpe=A(()=>{EB();HS()});var kpe=A(()=>{dpe();CB();ppe();mpe();gpe();vpe();xpe();bpe();wpe();SB();AB()});function Ld(t){t=K0e(t),R3(t);var e=KS(t);NB(e),DB(e,t);for(var r,n;r=Spe(e);)n=_pe(e,t,r),Ape(e,t,r,n)}function DB(t,e){var r=RB(t,t.nodes());r=r.slice(0,r.length-1),Ge(r,function(n){Oet(t,e,n)})}function Oet(t,e,r){var n=t.node(r),a=n.parent;t.edge(r,a).cutvalue=Epe(t,e,r)}function Epe(t,e,r){var n=t.node(r),a=n.parent,i=!0,s=e.edge(r,a),o=0;return s||(i=!1,s=e.edge(a,r)),o=s.weight,Ge(e.nodeEdges(r),function(l){var u=l.v===r,h=u?l.w:l.v;if(h!==a){var f=u===i,d=e.edge(l).weight;if(o+=f?d:-d,Bet(t,r,h)){var p=t.edge(r,h).cutvalue;o+=f?-p:p}}}),o}function NB(t,e){arguments.length<2&&(e=t.nodes()[0]),Cpe(t,{},1,e)}function Cpe(t,e,r,n,a){var i=r,s=t.node(n);return e[n]=!0,Ge(t.neighbors(n),function(o){Object.prototype.hasOwnProperty.call(e,o)||(r=Cpe(t,e,r,o,n))}),s.low=i,s.lim=r++,a?s.parent=a:delete s.parent,r}function Spe(t){return nv(t.edges(),function(e){return t.edge(e).cutvalue<0})}function _pe(t,e,r){var n=r.v,a=r.w;e.hasEdge(n,a)||(n=r.w,a=r.v);var i=t.node(n),s=t.node(a),o=i,l=!1;i.lim>s.lim&&(o=s,l=!0);var u=Gi(e.edges(),function(h){return l===Tpe(t,t.node(h.v),o)&&l!==Tpe(t,t.node(h.w),o)});return Jp(u,function(h){return nm(e,h)})}function Ape(t,e,r,n){var a=r.v,i=r.w;t.removeEdge(a,i),t.setEdge(n.v,n.w,{}),NB(t),DB(t,e),Pet(t,e)}function Pet(t,e){var r=nv(t.nodes(),function(a){return!e.node(a).parent}),n=IB(t,r);n=n.slice(1),Ge(n,function(a){var i=t.node(a).parent,s=e.edge(a,i),o=!1;s||(s=e.edge(i,a),o=!0),e.node(a).rank=e.node(i).rank+(o?s.minlen:-s.minlen)})}function Bet(t,e,r){return t.hasEdge(e,r)}function Tpe(t,e,r){return r.low<=e.lim&&e.lim<=r.lim}var Lpe=A(()=>{Qr();kpe();dc();TB();jS();Ld.initLowLimValues=NB;Ld.initCutValues=DB;Ld.calcCutValue=Epe;Ld.leaveEdge=Spe;Ld.enterEdge=_pe;Ld.exchangeEdges=Ape});function MB(t){switch(t.graph().ranker){case"network-simplex":Rpe(t);break;case"tight-tree":zet(t);break;case"longest-path":Fet(t);break;default:Rpe(t)}}function zet(t){R3(t),KS(t)}function Rpe(t){Ld(t)}var Fet,OB=A(()=>{TB();Lpe();jS();Fet=R3});function Ipe(t){var e=fc(t,"root",{},"_root"),r=$et(t),n=co(Go(r))-1,a=2*n+1;t.graph().nestingRoot=e,Ge(t.edges(),function(s){t.edge(s).minlen*=a});var i=Get(t)+1;Ge(t.children(),function(s){Dpe(t,e,a,i,n,r,s)}),t.graph().nodeRankFactor=a}function Dpe(t,e,r,n,a,i,s){var o=t.children(s);if(!o.length){s!==e&&t.setEdge(e,s,{weight:0,minlen:r});return}var l=yB(t,"_bt"),u=yB(t,"_bb"),h=t.node(s);t.setParent(l,s),h.borderTop=l,t.setParent(u,s),h.borderBottom=u,Ge(o,function(f){Dpe(t,e,r,n,a,i,f);var d=t.node(f),p=d.borderTop?d.borderTop:f,m=d.borderBottom?d.borderBottom:f,g=d.borderTop?n:2*n,v=p!==m?1:a-i[s]+1;t.setEdge(l,p,{weight:g,minlen:v,nestingEdge:!0}),t.setEdge(m,u,{weight:g,minlen:v,nestingEdge:!0})}),t.parent(s)||t.setEdge(e,l,{weight:0,minlen:a+i[s]})}function $et(t){var e={};function r(n,a){var i=t.children(n);i&&i.length&&Ge(i,function(s){r(s,a+1)}),e[n]=a}return Ge(t.children(),function(n){r(n,1)}),e}function Get(t){return Uo(t.edges(),function(e,r){return e+t.edge(r).weight},0)}function Npe(t){var e=t.graph();t.removeNode(e.nestingRoot),delete e.nestingRoot,Ge(t.edges(),function(r){var n=t.edge(r);n.nestingEdge&&t.removeEdge(r)})}var Mpe=A(()=>{Qr();dc()});function Ope(t,e,r){var n={},a;Ge(r,function(i){for(var s=t.parent(i),o,l;s;){if(o=t.parent(s),o?(l=n[o],n[o]=s):(l=a,a=s),l&&l!==s){e.setEdge(l,s);return}s=o}})}var Ppe=A(()=>{Qr()});function Bpe(t,e,r){var n=qet(t),a=new Jr({compound:!0}).setGraph({root:n}).setDefaultNodeLabel(function(i){return t.node(i)});return Ge(t.nodes(),function(i){var s=t.node(i),o=t.parent(i);(s.rank===e||s.minRank<=e&&e<=s.maxRank)&&(a.setNode(i),a.setParent(i,o||n),Ge(t[r](i),function(l){var u=l.v===i?l.w:l.v,h=a.edge(u,i),f=un(h)?0:h.weight;a.setEdge(u,i,{weight:t.edge(l).weight+f})}),Object.prototype.hasOwnProperty.call(s,"minRank")&&a.setNode(i,{borderLeft:s.borderLeft[e],borderRight:s.borderRight[e]}))}),a}function qet(t){for(var e;t.hasNode(e=tm("_root")););return e}var Fpe=A(()=>{Qr();pl()});function zpe(t,e){for(var r=0,n=1;n0;)h%2&&(f+=o[h+1]),h=h-1>>1,o[h]+=u.weight;l+=u.weight*f})),l}var $pe=A(()=>{Qr()});function Gpe(t){var e={},r=Gi(t.nodes(),function(o){return!t.children(o).length}),n=co(sr(r,function(o){return t.node(o).rank})),a=sr(dl(n+1),function(){return[]});function i(o){if(!A3(e,o)){e[o]=!0;var l=t.node(o);a[l.rank].push(o),Ge(t.successors(o),i)}}var s=hc(r,function(o){return t.node(o).rank});return Ge(s,i),a}var Upe=A(()=>{Qr()});function qpe(t,e){return sr(e,function(r){var n=t.inEdges(r);if(n.length){var a=Uo(n,function(i,s){var o=t.edge(s),l=t.node(s.v);return{sum:i.sum+o.weight*l.order,weight:i.weight+o.weight}},{sum:0,weight:0});return{v:r,barycenter:a.sum/a.weight,weight:a.weight}}else return{v:r}})}var Vpe=A(()=>{Qr()});function Hpe(t,e){var r={};Ge(t,function(a,i){var s=r[a.v]={indegree:0,in:[],out:[],vs:[a.v],i};un(a.barycenter)||(s.barycenter=a.barycenter,s.weight=a.weight)}),Ge(e.edges(),function(a){var i=r[a.v],s=r[a.w];!un(i)&&!un(s)&&(s.indegree++,i.out.push(r[a.w]))});var n=Gi(r,function(a){return!a.indegree});return Het(n)}function Het(t){var e=[];function r(i){return function(s){s.merged||(un(s.barycenter)||un(i.barycenter)||s.barycenter>=i.barycenter)&&Wet(i,s)}}function n(i){return function(s){s.in.push(i),--s.indegree===0&&t.push(s)}}for(;t.length;){var a=t.pop();e.push(a),Ge(a.in.reverse(),r(a)),Ge(a.out,n(a))}return sr(Gi(e,function(i){return!i.merged}),function(i){return em(i,["vs","i","barycenter","weight"])})}function Wet(t,e){var r=0,n=0;t.weight&&(r+=t.barycenter*t.weight,n+=t.weight),e.weight&&(r+=e.barycenter*e.weight,n+=e.weight),t.vs=e.vs.concat(t.vs),t.barycenter=r/n,t.weight=n,t.i=Math.min(e.i,t.i),e.merged=!0}var Wpe=A(()=>{Qr()});function Xpe(t,e){var r=J0e(t,function(h){return Object.prototype.hasOwnProperty.call(h,"barycenter")}),n=r.lhs,a=hc(r.rhs,function(h){return-h.i}),i=[],s=0,o=0,l=0;n.sort(Yet(!!e)),l=Ype(i,a,l),Ge(n,function(h){l+=h.vs.length,i.push(h.vs),s+=h.barycenter*h.weight,o+=h.weight,l=Ype(i,a,l)});var u={vs:uo(i)};return o&&(u.barycenter=s/o,u.weight=o),u}function Ype(t,e,r){for(var n;e.length&&(n=Sd(e)).i<=r;)e.pop(),t.push(n.vs),r++;return r}function Yet(t){return function(e,r){return e.barycenterr.barycenter?1:t?r.i-e.i:e.i-r.i}}var jpe=A(()=>{Qr();dc()});function PB(t,e,r,n){var a=t.children(e),i=t.node(e),s=i?i.borderLeft:void 0,o=i?i.borderRight:void 0,l={};s&&(a=Gi(a,function(m){return m!==s&&m!==o}));var u=qpe(t,a);Ge(u,function(m){if(t.children(m.v).length){var g=PB(t,m.v,r,n);l[m.v]=g,Object.prototype.hasOwnProperty.call(g,"barycenter")&&jet(m,g)}});var h=Hpe(u,r);Xet(h,l);var f=Xpe(h,n);if(s&&(f.vs=uo([s,f.vs,o]),t.predecessors(s).length)){var d=t.node(t.predecessors(s)[0]),p=t.node(t.predecessors(o)[0]);Object.prototype.hasOwnProperty.call(f,"barycenter")||(f.barycenter=0,f.weight=0),f.barycenter=(f.barycenter*f.weight+d.order+p.order)/(f.weight+2),f.weight+=2}return f}function Xet(t,e){Ge(t,function(r){r.vs=uo(r.vs.map(function(n){return e[n]?e[n].vs:n}))})}function jet(t,e){un(t.barycenter)?(t.barycenter=e.barycenter,t.weight=e.weight):(t.barycenter=(t.barycenter*t.weight+e.barycenter*e.weight)/(t.weight+e.weight),t.weight+=e.weight)}var Kpe=A(()=>{Qr();Vpe();Wpe();jpe()});function Jpe(t){var e=xB(t),r=Zpe(t,dl(1,e+1),"inEdges"),n=Zpe(t,dl(e-1,-1,-1),"outEdges"),a=Gpe(t);Qpe(t,a);for(var i=Number.POSITIVE_INFINITY,s,o=0,l=0;l<4;++o,++l){Ket(o%2?r:n,o%4>=2),a=_d(t);var u=zpe(t,a);u{Qr();pl();dc();Ppe();Fpe();$pe();Upe();Kpe()});function tme(t){var e=Qet(t);Ge(t.graph().dummyChains,function(r){for(var n=t.node(r),a=n.edgeObj,i=Zet(t,e,a.v,a.w),s=i.path,o=i.lca,l=0,u=s[l],h=!0;r!==a.w;){if(n=t.node(r),h){for(;(u=s[l])!==o&&t.node(u).maxRanks||o>e[l].lim));for(u=l,l=n;(l=t.parent(l))!==u;)i.push(l);return{path:a.concat(i.reverse()),lca:u}}function Qet(t){var e={},r=0;function n(a){var i=r;Ge(t.children(a),n),e[a]={low:i,lim:r++}}return Ge(t.children(),n),e}var rme=A(()=>{Qr()});function Jet(t,e){var r={};function n(a,i){var s=0,o=0,l=a.length,u=Sd(i);return Ge(i,function(h,f){var d=ttt(t,h),p=d?t.node(d).order:l;(d||h===u)&&(Ge(i.slice(o,f+1),function(m){Ge(t.predecessors(m),function(g){var v=t.node(g),y=v.order;(yu)&&nme(r,d,h)})})}function a(i,s){var o=-1,l,u=0;return Ge(s,function(h,f){if(t.node(h).dummy==="border"){var d=t.predecessors(h);d.length&&(l=t.node(d[0]).order,n(s,u,f,o,l),u=f,o=l)}n(s,u,s.length,l,i.length)}),s}return Uo(e,a),r}function ttt(t,e){if(t.node(e).dummy)return nv(t.predecessors(e),function(r){return t.node(r).dummy})}function nme(t,e,r){if(e>r){var n=e;e=r,r=n}var a=t[e];a||(t[e]=a={}),a[r]=!0}function rtt(t,e,r){if(e>r){var n=e;e=r,r=n}return!!t[e]&&Object.prototype.hasOwnProperty.call(t[e],r)}function ntt(t,e,r,n){var a={},i={},s={};return Ge(e,function(o){Ge(o,function(l,u){a[l]=l,i[l]=l,s[l]=u})}),Ge(e,function(o){var l=-1;Ge(o,function(u){var h=n(u);if(h.length){h=hc(h,function(g){return s[g]});for(var f=(h.length-1)/2,d=Math.floor(f),p=Math.ceil(f);d<=p;++d){var m=h[d];i[u]===u&&l{Qr();pl();dc()});function sme(t){t=XS(t),htt(t),aB(ame(t),function(e,r){t.node(r).x=e})}function htt(t){var e=_d(t),r=t.graph().ranksep,n=0;Ge(e,function(a){var i=co(sr(a,function(s){return t.node(s).height}));Ge(a,function(s){t.node(s).y=n+i/2}),n+=i+r})}var ome=A(()=>{Qr();dc();ime()});function D3(t,e){var r=e&&e.debugTiming?epe:tpe;r("layout",()=>{var n=r(" buildLayoutGraph",()=>ktt(t));r(" runLayout",()=>ftt(n,r)),r(" updateInputGraph",()=>dtt(t,n))})}function ftt(t,e){e(" makeSpaceForEdgeLabels",()=>Ttt(t)),e(" removeSelfEdges",()=>Dtt(t)),e(" acyclic",()=>Y0e(t)),e(" nestingGraph.run",()=>Ipe(t)),e(" rank",()=>MB(XS(t))),e(" injectEdgeLabelProxies",()=>Ett(t)),e(" removeEmptyRanks",()=>Q0e(t)),e(" nestingGraph.cleanup",()=>Npe(t)),e(" normalizeRanks",()=>Z0e(t)),e(" assignRankMinMax",()=>Ctt(t)),e(" removeEdgeLabelProxies",()=>Stt(t)),e(" normalize.run",()=>cpe(t)),e(" parentDummyChains",()=>tme(t)),e(" addBorderSegments",()=>npe(t)),e(" order",()=>Jpe(t)),e(" insertSelfEdges",()=>Ntt(t)),e(" adjustCoordinateSystem",()=>spe(t)),e(" position",()=>sme(t)),e(" positionSelfEdges",()=>Mtt(t)),e(" removeBorderNodes",()=>Itt(t)),e(" normalize.undo",()=>hpe(t)),e(" fixupEdgeLabelCoords",()=>Ltt(t)),e(" undoCoordinateSystem",()=>ope(t)),e(" translateGraph",()=>_tt(t)),e(" assignNodeIntersects",()=>Att(t)),e(" reversePoints",()=>Rtt(t)),e(" acyclic.undo",()=>X0e(t))}function dtt(t,e){Ge(t.nodes(),function(r){var n=t.node(r),a=e.node(r);n&&(n.x=a.x,n.y=a.y,e.children(r).length&&(n.width=a.width,n.height=a.height))}),Ge(t.edges(),function(r){var n=t.edge(r),a=e.edge(r);n.points=a.points,Object.prototype.hasOwnProperty.call(a,"x")&&(n.x=a.x,n.y=a.y)}),t.graph().width=e.graph().width,t.graph().height=e.graph().height}function ktt(t){var e=new Jr({multigraph:!0,compound:!0}),r=FB(t.graph());return e.setGraph(gd({},mtt,BB(r,ptt),em(r,gtt))),Ge(t.nodes(),function(n){var a=FB(t.node(n));e.setNode(n,eB(BB(a,vtt),ytt)),e.setParent(n,t.parent(n))}),Ge(t.edges(),function(n){var a=FB(t.edge(n));e.setEdge(n,gd({},btt,BB(a,xtt),em(a,wtt)))}),e}function Ttt(t){var e=t.graph();e.ranksep/=2,Ge(t.edges(),function(r){var n=t.edge(r);n.minlen*=2,n.labelpos.toLowerCase()!=="c"&&(e.rankdir==="TB"||e.rankdir==="BT"?n.width+=n.labeloffset:n.height+=n.labeloffset)})}function Ett(t){Ge(t.edges(),function(e){var r=t.edge(e);if(r.width&&r.height){var n=t.node(e.v),a=t.node(e.w),i={rank:(a.rank-n.rank)/2+n.rank,e};fc(t,"edge-proxy",i,"_ep")}})}function Ctt(t){var e=0;Ge(t.nodes(),function(r){var n=t.node(r);n.borderTop&&(n.minRank=t.node(n.borderTop).rank,n.maxRank=t.node(n.borderBottom).rank,e=co(e,n.maxRank))}),t.graph().maxRank=e}function Stt(t){Ge(t.nodes(),function(e){var r=t.node(e);r.dummy==="edge-proxy"&&(t.edge(r.e).labelRank=r.rank,t.removeNode(e))})}function _tt(t){var e=Number.POSITIVE_INFINITY,r=0,n=Number.POSITIVE_INFINITY,a=0,i=t.graph(),s=i.marginx||0,o=i.marginy||0;function l(u){var h=u.x,f=u.y,d=u.width,p=u.height;e=Math.min(e,h-d/2),r=Math.max(r,h+d/2),n=Math.min(n,f-p/2),a=Math.max(a,f+p/2)}Ge(t.nodes(),function(u){l(t.node(u))}),Ge(t.edges(),function(u){var h=t.edge(u);Object.prototype.hasOwnProperty.call(h,"x")&&l(h)}),e-=s,n-=o,Ge(t.nodes(),function(u){var h=t.node(u);h.x-=e,h.y-=n}),Ge(t.edges(),function(u){var h=t.edge(u);Ge(h.points,function(f){f.x-=e,f.y-=n}),Object.prototype.hasOwnProperty.call(h,"x")&&(h.x-=e),Object.prototype.hasOwnProperty.call(h,"y")&&(h.y-=n)}),i.width=r-e+s,i.height=a-n+o}function Att(t){Ge(t.edges(),function(e){var r=t.edge(e),n=t.node(e.v),a=t.node(e.w),i,s;r.points?(i=r.points[0],s=r.points[r.points.length-1]):(r.points=[],i=a,s=n),r.points.unshift(vB(n,i)),r.points.push(vB(a,s))})}function Ltt(t){Ge(t.edges(),function(e){var r=t.edge(e);if(Object.prototype.hasOwnProperty.call(r,"x"))switch((r.labelpos==="l"||r.labelpos==="r")&&(r.width-=r.labeloffset),r.labelpos){case"l":r.x-=r.width/2+r.labeloffset;break;case"r":r.x+=r.width/2+r.labeloffset;break}})}function Rtt(t){Ge(t.edges(),function(e){var r=t.edge(e);r.reversed&&r.points.reverse()})}function Itt(t){Ge(t.nodes(),function(e){if(t.children(e).length){var r=t.node(e),n=t.node(r.borderTop),a=t.node(r.borderBottom),i=t.node(Sd(r.borderLeft)),s=t.node(Sd(r.borderRight));r.width=Math.abs(s.x-i.x),r.height=Math.abs(a.y-n.y),r.x=i.x+r.width/2,r.y=n.y+r.height/2}}),Ge(t.nodes(),function(e){t.node(e).dummy==="border"&&t.removeNode(e)})}function Dtt(t){Ge(t.edges(),function(e){if(e.v===e.w){var r=t.node(e.v);r.selfEdges||(r.selfEdges=[]),r.selfEdges.push({e,label:t.edge(e)}),t.removeEdge(e)}})}function Ntt(t){var e=_d(t);Ge(e,function(r){var n=0;Ge(r,function(a,i){var s=t.node(a);s.order=i+n,Ge(s.selfEdges,function(o){fc(t,"selfedge",{width:o.label.width,height:o.label.height,rank:s.rank,order:i+ ++n,e:o.e,label:o.label},"_se")}),delete s.selfEdges})})}function Mtt(t){Ge(t.nodes(),function(e){var r=t.node(e);if(r.dummy==="selfedge"){var n=t.node(r.e.v),a=n.x+n.width/2,i=n.y,s=r.x-a,o=n.height/2;t.setEdge(r.e,r.label),t.removeNode(e),r.label.points=[{x:a+2*s/3,y:i-o},{x:a+5*s/6,y:i-o},{x:a+s,y:i},{x:a+5*s/6,y:i+o},{x:a+2*s/3,y:i+o}],r.label.x=r.x,r.label.y=r.y}})}function BB(t,e){return Qp(em(t,e),Number)}function FB(t){var e={};return Ge(t,function(r,n){e[n.toLowerCase()]=r}),e}var ptt,mtt,gtt,vtt,ytt,xtt,btt,wtt,lme=A(()=>{Qr();pl();ape();upe();gB();kB();OB();Mpe();eme();rme();ome();dc();ptt=["nodesep","edgesep","ranksep","marginx","marginy"],mtt={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},gtt=["acyclicer","ranker","rankdir","align"],vtt=["width","height"],ytt={width:0,height:0},xtt=["minlen","weight","width","height","labeloffset"],btt={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},wtt=["labelpos"]});var zB=A(()=>{gB();lme();kB();OB()});function ml(t){var e={options:{directed:t.isDirected(),multigraph:t.isMultigraph(),compound:t.isCompound()},nodes:Ott(t),edges:Ptt(t)};return un(t.graph())||(e.value=S3(t.graph())),e}function Ott(t){return sr(t.nodes(),function(e){var r=t.node(e),n=t.parent(e),a={v:e};return un(r)||(a.value=r),un(n)||(a.parent=n),a})}function Ptt(t){return sr(t.edges(),function(e){var r=t.edge(e),n={v:e.v,w:e.w};return un(e.name)||(n.name=e.name),un(r)||(n.value=r),n})}var $B=A(()=>{Qr();HS()});var vme={};lr(vme,{render:()=>Utt});var gr,am,hme,Btt,QS,Ftt,fme,dme,ztt,N3,cme,$tt,pme,mme,Gtt,gme,Utt,yme=A(()=>{au();sl();Fo();eo();Mo();Fi();ln();ur();zB();$B();pl();pl();$B();gr=new Map,am=new Map,hme=new Map,Btt=x(()=>{am.clear(),hme.clear(),gr.clear()},"clear"),QS=x((t,e)=>{let r=am.get(e)||[];return te.trace("In isDescendant",e," ",t," = ",r.includes(t)),r.includes(t)},"isDescendant"),Ftt=x((t,e)=>{let r=am.get(e)||[];return te.info("Descendants of ",e," is ",r),te.info("Edge is ",t),t.v===e||t.w===e?!1:r?r.includes(t.v)||QS(t.v,e)||QS(t.w,e)||r.includes(t.w):(te.debug("Tilt, ",e,",not in descendants"),!1)},"edgeInCluster"),fme=x((t,e,r,n)=>{te.warn("Copying children of ",t,"root",n,"data",e.node(t),n);let a=e.children(t)||[];t!==n&&a.push(t),te.warn("Copying (nodes) clusterId",t,"nodes",a),a.forEach(i=>{if(e.children(i).length>0)fme(i,e,r,n);else{let s=e.node(i);te.info("cp ",i," to ",n," with parent ",t),r.setNode(i,s),n!==e.parent(i)&&(te.warn("Setting parent",i,e.parent(i)),r.setParent(i,e.parent(i))),t!==n&&i!==t?(te.debug("Setting parent",i,t),r.setParent(i,t)):(te.info("In copy ",t,"root",n,"data",e.node(t),n),te.debug("Not Setting parent for node=",i,"cluster!==rootId",t!==n,"node!==clusterId",i!==t));let o=e.edges(i);te.debug("Copying Edges",o),o.forEach(l=>{te.info("Edge",l);let u=e.edge(l.v,l.w,l.name);te.info("Edge data",u,n);try{Ftt(l,n)?(te.info("Copying as ",l.v,l.w,u,l.name),r.setEdge(l.v,l.w,u,l.name),te.info("newGraph edges ",r.edges(),r.edge(r.edges()[0]))):te.info("Skipping copy of edge ",l.v,"-->",l.w," rootId: ",n," clusterId:",t)}catch(h){te.error(h)}})}te.debug("Removing node",i),e.removeNode(i)})},"copy"),dme=x((t,e)=>{let r=e.children(t),n=[...r];for(let a of r)hme.set(a,t),n=[...n,...dme(a,e)];return n},"extractDescendants"),ztt=x((t,e,r)=>{let n=t.edges().filter(l=>l.v===e||l.w===e),a=t.edges().filter(l=>l.v===r||l.w===r),i=n.map(l=>({v:l.v===e?r:l.v,w:l.w===e?e:l.w})),s=a.map(l=>({v:l.v,w:l.w}));return i.filter(l=>s.some(u=>l.v===u.v&&l.w===u.w))},"findCommonEdges"),N3=x((t,e,r)=>{let n=e.children(t);if(te.trace("Searching children of id ",t,n),n.length<1)return t;let a;for(let i of n){let s=N3(i,e,r),o=ztt(e,r,s);if(s)if(o.length>0)a=s;else return s}return a},"findNonClusterChild"),cme=x(t=>!gr.has(t)||!gr.get(t).externalConnections?t:gr.has(t)?gr.get(t).id:t,"getAnchorId"),$tt=x((t,e)=>{if(!t||e>10){te.debug("Opting out, no graph ");return}else te.debug("Opting in, graph ");t.nodes().forEach(function(r){t.children(r).length>0&&(te.warn("Cluster identified",r," Replacement id in edges: ",N3(r,t,r)),am.set(r,dme(r,t)),gr.set(r,{id:N3(r,t,r),clusterData:t.node(r)}))}),t.nodes().forEach(function(r){let n=t.children(r),a=t.edges();n.length>0?(te.debug("Cluster identified",r,am),a.forEach(i=>{let s=QS(i.v,r),o=QS(i.w,r);s^o&&(te.warn("Edge: ",i," leaves cluster ",r),te.warn("Descendants of XXX ",r,": ",am.get(r)),gr.get(r).externalConnections=!0)})):te.debug("Not a cluster ",r,am)});for(let r of gr.keys()){let n=gr.get(r).id,a=t.parent(n);a!==r&&gr.has(a)&&!gr.get(a).externalConnections&&(gr.get(r).id=a)}t.edges().forEach(function(r){let n=t.edge(r);te.warn("Edge "+r.v+" -> "+r.w+": "+JSON.stringify(r)),te.warn("Edge "+r.v+" -> "+r.w+": "+JSON.stringify(t.edge(r)));let a=r.v,i=r.w;if(te.warn("Fix XXX",gr,"ids:",r.v,r.w,"Translating: ",gr.get(r.v)," --- ",gr.get(r.w)),gr.get(r.v)||gr.get(r.w)){if(te.warn("Fixing and trying - removing XXX",r.v,r.w,r.name),a=cme(r.v),i=cme(r.w),t.removeEdge(r.v,r.w,r.name),a!==r.v){let s=t.parent(a);gr.get(s).externalConnections=!0,n.fromCluster=r.v}if(i!==r.w){let s=t.parent(i);gr.get(s).externalConnections=!0,n.toCluster=r.w}te.warn("Fix Replacing with XXX",a,i,r.name),t.setEdge(a,i,n,r.name)}}),te.warn("Adjusted Graph",ml(t)),pme(t,0),te.trace(gr)},"adjustClustersAndEdges"),pme=x((t,e)=>{if(te.warn("extractor - ",e,ml(t),t.children("D")),e>10){te.error("Bailing out");return}let r=t.nodes(),n=!1;for(let a of r){let i=t.children(a);n=n||i.length>0}if(!n){te.debug("Done, no node has children",t.nodes());return}te.debug("Nodes = ",r,e);for(let a of r)if(te.debug("Extracting node",a,gr,gr.has(a)&&!gr.get(a).externalConnections,!t.parent(a),t.node(a),t.children("D")," Depth ",e),!gr.has(a))te.debug("Not a cluster",a,e);else if(!gr.get(a).externalConnections&&t.children(a)&&t.children(a).length>0){te.warn("Cluster without external connections, without a parent and with children",a,e);let s=t.graph().rankdir==="TB"?"LR":"TB";gr.get(a)?.clusterData?.dir&&(s=gr.get(a).clusterData.dir,te.warn("Fixing dir",gr.get(a).clusterData.dir,s));let o=new Jr({multigraph:!0,compound:!0}).setGraph({rankdir:s,nodesep:50,ranksep:50,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}});te.warn("Old graph before copy",ml(t)),fme(a,t,o,a),t.setNode(a,{clusterNode:!0,id:a,clusterData:gr.get(a).clusterData,label:gr.get(a).label,graph:o}),te.warn("New graph after copy node: (",a,")",ml(o)),te.debug("Old graph after copy",ml(t))}else te.warn("Cluster ** ",a," **not meeting the criteria !externalConnections:",!gr.get(a).externalConnections," no parent: ",!t.parent(a)," children ",t.children(a)&&t.children(a).length>0,t.children("D"),e),te.debug(gr);r=t.nodes(),te.warn("New list of nodes",r);for(let a of r){let i=t.node(a);te.warn(" Now next level",a,i),i?.clusterNode&&pme(i.graph,e+1)}},"extractor"),mme=x((t,e)=>{if(e.length===0)return[];let r=Object.assign([],e);return e.forEach(n=>{let a=t.children(n),i=mme(t,a);r=[...r,...i]}),r},"sorter"),Gtt=x(t=>mme(t,t.children()),"sortNodesByHierarchy"),gme=x(async(t,e,r,n,a,i)=>{te.warn("Graph in recursive render:XAX",ml(e),a);let s=e.graph().rankdir;te.trace("Dir in recursive render - dir:",s);let o=t.insert("g").attr("class","root");e.nodes()?te.info("Recursive render XXX",e.nodes()):te.info("No nodes found for",e),e.edges().length>0&&te.info("Recursive edges",e.edge(e.edges()[0]));let l=o.insert("g").attr("class","clusters"),u=o.insert("g").attr("class","edgePaths"),h=o.insert("g").attr("class","edgeLabels"),f=o.insert("g").attr("class","nodes");await Promise.all(e.nodes().map(async function(g){let v=e.node(g);if(a!==void 0){let y=JSON.parse(JSON.stringify(a.clusterData));te.trace(`Setting data for parent cluster XXX + L0,20`)},"requirement_arrow"),BJe=b((t,e,r)=>{let n=t.append("defs").append("marker").attr("id",r+"_"+e+"-requirement_containsStart").attr("refX",0).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").append("g");n.append("circle").attr("cx",10).attr("cy",10).attr("r",9).attr("fill","none"),n.append("line").attr("x1",1).attr("x2",19).attr("y1",10).attr("y2",10),n.append("line").attr("y1",1).attr("y2",19).attr("x1",10).attr("x2",10)},"requirement_contains"),FJe={extension:TJe,composition:EJe,aggregation:SJe,dependency:CJe,lollipop:_Je,point:AJe,circle:LJe,cross:RJe,barb:DJe,only_one:IJe,zero_or_one:MJe,one_or_more:NJe,zero_or_more:OJe,requirement_arrow:PJe,requirement_contains:BJe},zE=kJe});function $Je(t){return typeof t=="symbol"||oa(t)&&mo(t)==zJe}var zJe,Ml,im=D(()=>{ud();ec();zJe="[object Symbol]";Ml=$Je});function GJe(t,e){for(var r=-1,n=t==null?0:t.length,i=Array(n);++r{h0=GJe});function Lde(t){if(typeof t=="string")return t;if(Gr(t))return h0(t,Lde)+"";if(Ml(t))return Ade?Ade.call(t):"";var e=t+"";return e=="0"&&1/t==-qJe?"-0":e}var qJe,_de,Ade,Rde,Dde=D(()=>{Z1();F5();Ta();im();qJe=1/0,_de=ss?ss.prototype:void 0,Ade=_de?_de.toString:void 0;Rde=Lde});function HJe(t){for(var e=t.length;e--&&UJe.test(t.charAt(e)););return e}var UJe,Ide,Mde=D(()=>{UJe=/\s/;Ide=HJe});function WJe(t){return t&&t.slice(0,Ide(t)+1).replace(VJe,"")}var VJe,Nde,Ode=D(()=>{Mde();VJe=/^\s+/;Nde=WJe});function ZJe(t){if(typeof t=="number")return t;if(Ml(t))return Pde;if(Ai(t)){var e=typeof t.valueOf=="function"?t.valueOf():t;t=Ai(e)?e+"":e}if(typeof t!="string")return t===0?t:+t;t=Nde(t);var r=XJe.test(t);return r||jJe.test(t)?KJe(t.slice(2),r?2:8):YJe.test(t)?Pde:+t}var Pde,YJe,XJe,jJe,KJe,Bde,Fde=D(()=>{Ode();lu();im();Pde=NaN,YJe=/^[-+]0x[0-9a-f]+$/i,XJe=/^0b[01]+$/i,jJe=/^0o[0-7]+$/i,KJe=parseInt;Bde=ZJe});function JJe(t){if(!t)return t===0?t:0;if(t=Bde(t),t===zde||t===-zde){var e=t<0?-1:1;return e*QJe}return t===t?t:0}var zde,QJe,oy,UF=D(()=>{Fde();zde=1/0,QJe=17976931348623157e292;oy=JJe});function eet(t){var e=oy(t),r=e%1;return e===e?r?e-r:e:0}var $de,Gde=D(()=>{UF();$de=eet});var tet,$E,qde=D(()=>{cd();ou();tet=jo(ji,"WeakMap"),$E=tet});function ret(){}var Ude,Hde=D(()=>{Ude=ret});function net(t,e){for(var r=-1,n=t==null?0:t.length;++r{GE=net});function iet(t,e,r,n){for(var i=t.length,a=r+(n?1:-1);n?a--:++a{qE=iet});function aet(t){return t!==t}var Vde,Wde=D(()=>{Vde=aet});function set(t,e,r){for(var n=r-1,i=t.length;++n{Yde=set});function oet(t,e,r){return e===e?Yde(t,e,r):qE(t,Vde,r)}var jde,Kde=D(()=>{VF();Wde();Xde();jde=oet});function uet(t,e){var r=t==null?0:t.length;return!!r&&jde(t,e,0)>-1}var Zde,Qde=D(()=>{Kde();Zde=uet});var cet,Jde,epe=D(()=>{FB();cet=eE(Object.keys,Object),Jde=cet});function det(t){if(!gd(t))return Jde(t);var e=[];for(var r in Object(t))fet.call(t,r)&&r!="constructor"&&e.push(r);return e}var het,fet,ly,UE=D(()=>{m5();epe();het=Object.prototype,fet=het.hasOwnProperty;ly=det});function pet(t){return os(t)?sE(t):ly(t)}var Ki,Xh=D(()=>{HB();UE();o0();Ki=pet});function yet(t,e){if(Gr(t))return!1;var r=typeof t;return r=="number"||r=="symbol"||r=="boolean"||t==null||Ml(t)?!0:get.test(t)||!met.test(t)||e!=null&&t in Object(e)}var met,get,uy,HE=D(()=>{Ta();im();met=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,get=/^\w*$/;uy=yet});function xet(t){var e=U2(t,function(n){return r.size===vet&&r.clear(),n}),r=e.cache;return e}var vet,tpe,rpe=D(()=>{DB();vet=500;tpe=xet});var bet,wet,ket,npe,ipe=D(()=>{rpe();bet=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,wet=/\\(\\)?/g,ket=tpe(function(t){var e=[];return t.charCodeAt(0)===46&&e.push(""),t.replace(bet,function(r,n,i,a){e.push(i?a.replace(wet,"$1"):n||r)}),e}),npe=ket});function Tet(t){return t==null?"":Rde(t)}var VE,WF=D(()=>{Dde();VE=Tet});function Eet(t,e){return Gr(t)?t:uy(t,e)?[t]:npe(VE(t))}var Ld,z5=D(()=>{Ta();HE();ipe();WF();Ld=Eet});function _et(t){if(typeof t=="string"||Ml(t))return t;var e=t+"";return e=="0"&&1/t==-Cet?"-0":e}var Cet,f0,cy=D(()=>{im();Cet=1/0;f0=_et});function Aet(t,e){e=Ld(e,t);for(var r=0,n=e.length;t!=null&&r{z5();cy();Rd=Aet});function Let(t,e,r){var n=t==null?void 0:Rd(t,e);return n===void 0?r:n}var ape,spe=D(()=>{$5();ape=Let});function Ret(t,e){for(var r=-1,n=e.length,i=t.length;++r{hy=Ret});function Det(t){return Gr(t)||tc(t)||!!(ope&&t&&t[ope])}var ope,lpe,upe=D(()=>{Z1();K2();Ta();ope=ss?ss.isConcatSpreadable:void 0;lpe=Det});function cpe(t,e,r,n,i){var a=-1,s=t.length;for(r||(r=lpe),i||(i=[]);++a0&&r(o)?e>1?cpe(o,e-1,r,n,i):hy(i,o):n||(i[i.length]=o)}return i}var Dd,G5=D(()=>{WE();upe();Dd=cpe});function Iet(t){var e=t==null?0:t.length;return e?Dd(t,1):[]}var tl,YE=D(()=>{G5();tl=Iet});function Met(t){return lE(oE(t,void 0,tl),t+"")}var hpe,fpe=D(()=>{YE();VB();YB();hpe=Met});function qet(t){return Get.test(t)}var Net,Oet,Pet,Bet,Fet,zet,$et,Get,dpe,ppe=D(()=>{Net="\\ud800-\\udfff",Oet="\\u0300-\\u036f",Pet="\\ufe20-\\ufe2f",Bet="\\u20d0-\\u20ff",Fet=Oet+Pet+Bet,zet="\\ufe0e\\ufe0f",$et="\\u200d",Get=RegExp("["+$et+Net+Fet+zet+"]");dpe=qet});function Uet(t,e,r,n){var i=-1,a=t==null?0:t.length;for(n&&a&&(r=t[++i]);++i{mpe=Uet});function Het(t,e){return t&&l0(e,Ki(e),t)}var ype,vpe=D(()=>{J2();Xh();ype=Het});function Vet(t,e){return t&&l0(e,Ko(e),t)}var xpe,bpe=D(()=>{J2();wd();xpe=Vet});function Wet(t,e){for(var r=-1,n=t==null?0:t.length,i=0,a=[];++r{XE=Wet});function Yet(){return[]}var jE,XF=D(()=>{jE=Yet});var Xet,jet,wpe,Ket,fy,KE=D(()=>{YF();XF();Xet=Object.prototype,jet=Xet.propertyIsEnumerable,wpe=Object.getOwnPropertySymbols,Ket=wpe?function(t){return t==null?[]:(t=Object(t),XE(wpe(t),function(e){return jet.call(t,e)}))}:jE,fy=Ket});function Zet(t,e){return l0(t,fy(t),e)}var kpe,Tpe=D(()=>{J2();KE();kpe=Zet});var Qet,Jet,ZE,jF=D(()=>{WE();tE();KE();XF();Qet=Object.getOwnPropertySymbols,Jet=Qet?function(t){for(var e=[];t;)hy(e,fy(t)),t=j2(t);return e}:jE,ZE=Jet});function ett(t,e){return l0(t,ZE(t),e)}var Epe,Spe=D(()=>{J2();jF();Epe=ett});function ttt(t,e,r){var n=e(t);return Gr(t)?n:hy(n,r(t))}var QE,KF=D(()=>{WE();Ta();QE=ttt});function rtt(t){return QE(t,Ki,fy)}var q5,ZF=D(()=>{KF();KE();Xh();q5=rtt});function ntt(t){return QE(t,Ko,ZE)}var Cpe,_pe=D(()=>{KF();jF();wd();Cpe=ntt});var itt,JE,Ape=D(()=>{cd();ou();itt=jo(ji,"DataView"),JE=itt});var att,eS,Lpe=D(()=>{cd();ou();att=jo(ji,"Promise"),eS=att});var stt,Id,QF=D(()=>{cd();ou();stt=jo(ji,"Set"),Id=stt});var Rpe,ott,Dpe,Ipe,Mpe,Npe,ltt,utt,ctt,htt,ftt,am,Nl,sm=D(()=>{Ape();Y9();Lpe();QF();qde();ud();AB();Rpe="[object Map]",ott="[object Object]",Dpe="[object Promise]",Ipe="[object Set]",Mpe="[object WeakMap]",Npe="[object DataView]",ltt=Fh(JE),utt=Fh(dd),ctt=Fh(eS),htt=Fh(Id),ftt=Fh($E),am=mo;(JE&&am(new JE(new ArrayBuffer(1)))!=Npe||dd&&am(new dd)!=Rpe||eS&&am(eS.resolve())!=Dpe||Id&&am(new Id)!=Ipe||$E&&am(new $E)!=Mpe)&&(am=function(t){var e=mo(t),r=e==ott?t.constructor:void 0,n=r?Fh(r):"";if(n)switch(n){case ltt:return Npe;case utt:return Rpe;case ctt:return Dpe;case htt:return Ipe;case ftt:return Mpe}return e});Nl=am});function mtt(t){var e=t.length,r=new t.constructor(e);return e&&typeof t[0]=="string"&&ptt.call(t,"index")&&(r.index=t.index,r.input=t.input),r}var dtt,ptt,Ope,Ppe=D(()=>{dtt=Object.prototype,ptt=dtt.hasOwnProperty;Ope=mtt});function gtt(t,e){var r=e?X2(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.byteLength)}var Bpe,Fpe=D(()=>{Z9();Bpe=gtt});function vtt(t){var e=new t.constructor(t.source,ytt.exec(t));return e.lastIndex=t.lastIndex,e}var ytt,zpe,$pe=D(()=>{ytt=/\w*$/;zpe=vtt});function xtt(t){return qpe?Object(qpe.call(t)):{}}var Gpe,qpe,Upe,Hpe=D(()=>{Z1();Gpe=ss?ss.prototype:void 0,qpe=Gpe?Gpe.valueOf:void 0;Upe=xtt});function ztt(t,e,r){var n=t.constructor;switch(e){case Att:return X2(t);case btt:case wtt:return new n(+t);case Ltt:return Bpe(t,r);case Rtt:case Dtt:case Itt:case Mtt:case Ntt:case Ott:case Ptt:case Btt:case Ftt:return Q9(t,r);case ktt:return new n;case Ttt:case Ctt:return new n(t);case Ett:return zpe(t);case Stt:return new n;case _tt:return Upe(t)}}var btt,wtt,ktt,Ttt,Ett,Stt,Ctt,_tt,Att,Ltt,Rtt,Dtt,Itt,Mtt,Ntt,Ott,Ptt,Btt,Ftt,Vpe,Wpe=D(()=>{Z9();Fpe();$pe();Hpe();PB();btt="[object Boolean]",wtt="[object Date]",ktt="[object Map]",Ttt="[object Number]",Ett="[object RegExp]",Stt="[object Set]",Ctt="[object String]",_tt="[object Symbol]",Att="[object ArrayBuffer]",Ltt="[object DataView]",Rtt="[object Float32Array]",Dtt="[object Float64Array]",Itt="[object Int8Array]",Mtt="[object Int16Array]",Ntt="[object Int32Array]",Ott="[object Uint8Array]",Ptt="[object Uint8ClampedArray]",Btt="[object Uint16Array]",Ftt="[object Uint32Array]";Vpe=ztt});function Gtt(t){return oa(t)&&Nl(t)==$tt}var $tt,Ype,Xpe=D(()=>{sm();ec();$tt="[object Map]";Ype=Gtt});var jpe,qtt,Kpe,Zpe=D(()=>{Xpe();g5();aE();jpe=$h&&$h.isMap,qtt=jpe?yd(jpe):Ype,Kpe=qtt});function Htt(t){return oa(t)&&Nl(t)==Utt}var Utt,Qpe,Jpe=D(()=>{sm();ec();Utt="[object Set]";Qpe=Htt});var e1e,Vtt,t1e,r1e=D(()=>{Jpe();g5();aE();e1e=$h&&$h.isSet,Vtt=e1e?yd(e1e):Qpe,t1e=Vtt});function tS(t,e,r,n,i,a){var s,o=e&Wtt,l=e&Ytt,u=e&Xtt;if(r&&(s=i?r(t,n,i,a):r(t)),s!==void 0)return s;if(!Ai(t))return t;var h=Gr(t);if(h){if(s=Ope(t),!o)return J9(t,s)}else{var f=Nl(t),d=f==i1e||f==Jtt;if(rc(t))return K9(t,o);if(f==a1e||f==n1e||d&&!i){if(s=l||d?{}:rE(t),!o)return l?Epe(t,xpe(s,t)):kpe(t,ype(s,t))}else{if(!oi[f])return i?t:{};s=Vpe(t,f,o)}}a||(a=new s0);var p=a.get(t);if(p)return p;a.set(t,s),t1e(t)?t.forEach(function(y){s.add(tS(y,e,r,y,t,a))}):Kpe(t)&&t.forEach(function(y,v){s.set(v,tS(y,e,r,v,t,a))});var m=u?l?Cpe:q5:l?Ko:Ki,g=h?void 0:m(t);return GE(g||t,function(y,v){g&&(v=y,y=t[v]),xd(s,v,tS(y,e,r,v,t,a))}),s}var Wtt,Ytt,Xtt,n1e,jtt,Ktt,Ztt,Qtt,i1e,Jtt,ert,trt,a1e,rrt,nrt,irt,art,srt,ort,lrt,urt,crt,hrt,frt,drt,prt,mrt,grt,yrt,oi,rS,JF=D(()=>{f5();HF();b5();vpe();bpe();NB();BB();Tpe();Spe();ZF();_pe();sm();Ppe();Wpe();zB();Ta();Q2();Zpe();lu();r1e();Xh();wd();Wtt=1,Ytt=2,Xtt=4,n1e="[object Arguments]",jtt="[object Array]",Ktt="[object Boolean]",Ztt="[object Date]",Qtt="[object Error]",i1e="[object Function]",Jtt="[object GeneratorFunction]",ert="[object Map]",trt="[object Number]",a1e="[object Object]",rrt="[object RegExp]",nrt="[object Set]",irt="[object String]",art="[object Symbol]",srt="[object WeakMap]",ort="[object ArrayBuffer]",lrt="[object DataView]",urt="[object Float32Array]",crt="[object Float64Array]",hrt="[object Int8Array]",frt="[object Int16Array]",drt="[object Int32Array]",prt="[object Uint8Array]",mrt="[object Uint8ClampedArray]",grt="[object Uint16Array]",yrt="[object Uint32Array]",oi={};oi[n1e]=oi[jtt]=oi[ort]=oi[lrt]=oi[Ktt]=oi[Ztt]=oi[urt]=oi[crt]=oi[hrt]=oi[frt]=oi[drt]=oi[ert]=oi[trt]=oi[a1e]=oi[rrt]=oi[nrt]=oi[irt]=oi[art]=oi[prt]=oi[mrt]=oi[grt]=oi[yrt]=!0;oi[Qtt]=oi[i1e]=oi[srt]=!1;rS=tS});function xrt(t){return rS(t,vrt)}var vrt,U5,ez=D(()=>{JF();vrt=4;U5=xrt});function krt(t){return rS(t,brt|wrt)}var brt,wrt,tz,s1e=D(()=>{JF();brt=1,wrt=4;tz=krt});function Ert(t){return this.__data__.set(t,Trt),this}var Trt,o1e,l1e=D(()=>{Trt="__lodash_hash_undefined__";o1e=Ert});function Srt(t){return this.__data__.has(t)}var u1e,c1e=D(()=>{u1e=Srt});function nS(t){var e=-1,r=t==null?0:t.length;for(this.__data__=new J1;++e{X9();l1e();c1e();nS.prototype.add=nS.prototype.push=o1e;nS.prototype.has=u1e;iS=nS});function Crt(t,e){for(var r=-1,n=t==null?0:t.length;++r{h1e=Crt});function _rt(t,e){return t.has(e)}var aS,nz=D(()=>{aS=_rt});function Rrt(t,e,r,n,i,a){var s=r&Art,o=t.length,l=e.length;if(o!=l&&!(s&&l>o))return!1;var u=a.get(t),h=a.get(e);if(u&&h)return u==e&&h==t;var f=-1,d=!0,p=r&Lrt?new iS:void 0;for(a.set(t,e),a.set(e,t);++f{rz();f1e();nz();Art=1,Lrt=2;sS=Rrt});function Drt(t){var e=-1,r=Array(t.size);return t.forEach(function(n,i){r[++e]=[i,n]}),r}var d1e,p1e=D(()=>{d1e=Drt});function Irt(t){var e=-1,r=Array(t.size);return t.forEach(function(n){r[++e]=n}),r}var dy,oS=D(()=>{dy=Irt});function Wrt(t,e,r,n,i,a,s){switch(r){case Vrt:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case Hrt:return!(t.byteLength!=e.byteLength||!a(new Y2(t),new Y2(e)));case Ort:case Prt:case zrt:return uu(+t,+e);case Brt:return t.name==e.name&&t.message==e.message;case $rt:case qrt:return t==e+"";case Frt:var o=d1e;case Grt:var l=n&Mrt;if(o||(o=dy),t.size!=e.size&&!l)return!1;var u=s.get(t);if(u)return u==e;n|=Nrt,s.set(t,e);var h=sS(o(t),o(e),n,i,a,s);return s.delete(t),h;case Urt:if(az)return az.call(t)==az.call(e)}return!1}var Mrt,Nrt,Ort,Prt,Brt,Frt,zrt,$rt,Grt,qrt,Urt,Hrt,Vrt,m1e,az,g1e,y1e=D(()=>{Z1();OB();Q1();iz();p1e();oS();Mrt=1,Nrt=2,Ort="[object Boolean]",Prt="[object Date]",Brt="[object Error]",Frt="[object Map]",zrt="[object Number]",$rt="[object RegExp]",Grt="[object Set]",qrt="[object String]",Urt="[object Symbol]",Hrt="[object ArrayBuffer]",Vrt="[object DataView]",m1e=ss?ss.prototype:void 0,az=m1e?m1e.valueOf:void 0;g1e=Wrt});function Krt(t,e,r,n,i,a){var s=r&Yrt,o=q5(t),l=o.length,u=q5(e),h=u.length;if(l!=h&&!s)return!1;for(var f=l;f--;){var d=o[f];if(!(s?d in e:jrt.call(e,d)))return!1}var p=a.get(t),m=a.get(e);if(p&&m)return p==e&&m==t;var g=!0;a.set(t,e),a.set(e,t);for(var y=s;++f{ZF();Yrt=1,Xrt=Object.prototype,jrt=Xrt.hasOwnProperty;v1e=Krt});function Jrt(t,e,r,n,i,a){var s=Gr(t),o=Gr(e),l=s?w1e:Nl(t),u=o?w1e:Nl(e);l=l==b1e?lS:l,u=u==b1e?lS:u;var h=l==lS,f=u==lS,d=l==u;if(d&&rc(t)){if(!rc(e))return!1;s=!0,h=!1}if(d&&!h)return a||(a=new s0),s||vd(t)?sS(t,e,r,n,i,a):g1e(t,e,l,r,n,i,a);if(!(r&Zrt)){var p=h&&k1e.call(t,"__wrapped__"),m=f&&k1e.call(e,"__wrapped__");if(p||m){var g=p?t.value():t,y=m?e.value():e;return a||(a=new s0),i(g,y,r,n,a)}}return d?(a||(a=new s0),v1e(t,e,r,n,i,a)):!1}var Zrt,b1e,w1e,lS,Qrt,k1e,T1e,E1e=D(()=>{f5();iz();y1e();x1e();sm();Ta();Q2();v5();Zrt=1,b1e="[object Arguments]",w1e="[object Array]",lS="[object Object]",Qrt=Object.prototype,k1e=Qrt.hasOwnProperty;T1e=Jrt});function S1e(t,e,r,n,i){return t===e?!0:t==null||e==null||!oa(t)&&!oa(e)?t!==t&&e!==e:T1e(t,e,r,n,S1e,i)}var uS,sz=D(()=>{E1e();ec();uS=S1e});function rnt(t,e,r,n){var i=r.length,a=i,s=!n;if(t==null)return!a;for(t=Object(t);i--;){var o=r[i];if(s&&o[2]?o[1]!==t[o[0]]:!(o[0]in t))return!1}for(;++i{f5();sz();ent=1,tnt=2;C1e=rnt});function nnt(t){return t===t&&!Ai(t)}var cS,oz=D(()=>{lu();cS=nnt});function int(t){for(var e=Ki(t),r=e.length;r--;){var n=e[r],i=t[n];e[r]=[n,i,cS(i)]}return e}var A1e,L1e=D(()=>{oz();Xh();A1e=int});function ant(t,e){return function(r){return r==null?!1:r[t]===e&&(e!==void 0||t in Object(r))}}var hS,lz=D(()=>{hS=ant});function snt(t){var e=A1e(t);return e.length==1&&e[0][2]?hS(e[0][0],e[0][1]):function(r){return r===t||C1e(r,t,e)}}var R1e,D1e=D(()=>{_1e();L1e();lz();R1e=snt});function ont(t,e){return t!=null&&e in Object(t)}var I1e,M1e=D(()=>{I1e=ont});function lnt(t,e,r){e=Ld(e,t);for(var n=-1,i=e.length,a=!1;++n{z5();K2();Ta();w5();nE();cy();fS=lnt});function unt(t,e){return t!=null&&fS(t,e,I1e)}var dS,cz=D(()=>{M1e();uz();dS=unt});function fnt(t,e){return uy(t)&&cS(e)?hS(f0(t),e):function(r){var n=ape(r,t);return n===void 0&&n===e?dS(r,t):uS(e,n,cnt|hnt)}}var cnt,hnt,N1e,O1e=D(()=>{sz();spe();cz();HE();oz();lz();cy();cnt=1,hnt=2;N1e=fnt});function dnt(t){return function(e){return e?.[t]}}var pS,hz=D(()=>{pS=dnt});function pnt(t){return function(e){return Rd(e,t)}}var P1e,B1e=D(()=>{$5();P1e=pnt});function mnt(t){return uy(t)?pS(f0(t)):P1e(t)}var F1e,z1e=D(()=>{hz();B1e();HE();cy();F1e=mnt});function gnt(t){return typeof t=="function"?t:t==null?Zo:typeof t=="object"?Gr(t)?N1e(t[0],t[1]):R1e(t):F1e(t)}var us,d0=D(()=>{D1e();O1e();kd();Ta();z1e();us=gnt});function ynt(t,e){return t&&W2(t,e,Ki)}var py,mS=D(()=>{j9();Xh();py=ynt});function vnt(t,e){return function(r,n){if(r==null)return r;if(!os(r))return t(r,n);for(var i=r.length,a=e?i:-1,s=Object(r);(e?a--:++a{o0();$1e=vnt});var xnt,Md,H5=D(()=>{mS();G1e();xnt=$1e(py),Md=xnt});var bnt,gS,q1e=D(()=>{ou();bnt=function(){return ji.Date.now()},gS=bnt});var U1e,wnt,knt,fz,H1e=D(()=>{k5();Q1();T5();wd();U1e=Object.prototype,wnt=U1e.hasOwnProperty,knt=Td(function(t,e){t=Object(t);var r=-1,n=e.length,i=n>2?e[2]:void 0;for(i&&Gh(e[0],e[1],i)&&(n=1);++r{V1e=Tnt});function Ent(t){var e=t==null?0:t.length;return e?t[e-1]:void 0}var Nd,Y1e=D(()=>{Nd=Ent});function Snt(t){return typeof t=="function"?t:Zo}var my,yS=D(()=>{kd();my=Snt});function Cnt(t,e){var r=Gr(t)?GE:Md;return r(t,my(e))}var lt,vS=D(()=>{HF();H5();yS();Ta();lt=Cnt});var X1e=D(()=>{vS()});function _nt(t,e){var r=[];return Md(t,function(n,i,a){e(n,i,a)&&r.push(n)}),r}var j1e,K1e=D(()=>{H5();j1e=_nt});function Ant(t,e){var r=Gr(t)?XE:j1e;return r(t,us(e,3))}var Ds,dz=D(()=>{YF();K1e();d0();Ta();Ds=Ant});function Lnt(t){return function(e,r,n){var i=Object(e);if(!os(e)){var a=us(r,3);e=Ki(e),r=function(o){return a(i[o],o,i)}}var s=t(e,r,n);return s>-1?i[a?e[s]:s]:void 0}}var Z1e,Q1e=D(()=>{d0();o0();Xh();Z1e=Lnt});function Dnt(t,e,r){var n=t==null?0:t.length;if(!n)return-1;var i=r==null?0:$de(r);return i<0&&(i=Rnt(n+i,0)),qE(t,us(e,3),i)}var Rnt,J1e,eme=D(()=>{VF();d0();Gde();Rnt=Math.max;J1e=Dnt});var Int,gy,tme=D(()=>{Q1e();eme();Int=Z1e(J1e),gy=Int});function Mnt(t,e){var r=-1,n=os(t)?Array(t.length):[];return Md(t,function(i,a,s){n[++r]=e(i,a,s)}),n}var xS,pz=D(()=>{H5();o0();xS=Mnt});function Nnt(t,e){var r=Gr(t)?h0:xS;return r(t,us(e,3))}var Dr,yy=D(()=>{F5();d0();pz();Ta();Dr=Nnt});function Ont(t,e){return Dd(Dr(t,e),1)}var rme,nme=D(()=>{G5();yy();rme=Ont});function Pnt(t,e){return t==null?t:W2(t,my(e),Ko)}var mz,ime=D(()=>{j9();yS();wd();mz=Pnt});function Bnt(t,e){return t&&py(t,my(e))}var gz,ame=D(()=>{mS();yS();gz=Bnt});function Fnt(t,e){return t>e}var sme,ome=D(()=>{sme=Fnt});function Gnt(t,e){return t!=null&&$nt.call(t,e)}var znt,$nt,lme,ume=D(()=>{znt=Object.prototype,$nt=znt.hasOwnProperty;lme=Gnt});function qnt(t,e){return t!=null&&fS(t,e,lme)}var V5,cme=D(()=>{ume();uz();V5=qnt});function Hnt(t){return typeof t=="string"||!Gr(t)&&oa(t)&&mo(t)==Unt}var Unt,hme,fme=D(()=>{ud();Ta();ec();Unt="[object String]";hme=Hnt});function Vnt(t,e){return h0(e,function(r){return t[r]})}var dme,pme=D(()=>{F5();dme=Vnt});function Wnt(t){return t==null?[]:dme(t,Ki(t))}var Ol,mme=D(()=>{pme();Xh();Ol=Wnt});function Znt(t){if(t==null)return!0;if(os(t)&&(Gr(t)||typeof t=="string"||typeof t.splice=="function"||rc(t)||vd(t)||tc(t)))return!t.length;var e=Nl(t);if(e==Ynt||e==Xnt)return!t.size;if(gd(t))return!ly(t).length;for(var r in t)if(Knt.call(t,r))return!1;return!0}var Ynt,Xnt,jnt,Knt,jh,bS=D(()=>{UE();sm();K2();Ta();o0();Q2();m5();v5();Ynt="[object Map]",Xnt="[object Set]",jnt=Object.prototype,Knt=jnt.hasOwnProperty;jh=Znt});function Qnt(t){return t===void 0}var Vn,gme=D(()=>{Vn=Qnt});function Jnt(t,e){return t{wS=Jnt});function eit(t,e){var r={};return e=us(e,3),py(t,function(n,i,a){md(r,i,e(n,i,a))}),r}var om,yme=D(()=>{d5();mS();d0();om=eit});function tit(t,e,r){for(var n=-1,i=t.length;++n{im();vy=tit});function rit(t){return t&&t.length?vy(t,Zo,sme):void 0}var rl,vme=D(()=>{kS();ome();kd();rl=rit});function nit(t){return t&&t.length?vy(t,Zo,wS):void 0}var ic,vz=D(()=>{kS();yz();kd();ic=nit});function iit(t,e){return t&&t.length?vy(t,us(e,2),wS):void 0}var lm,xme=D(()=>{kS();d0();yz();lm=iit});function ait(t,e,r,n){if(!Ai(t))return t;e=Ld(e,t);for(var i=-1,a=e.length,s=a-1,o=t;o!=null&&++i{b5();z5();w5();lu();cy();bme=ait});function sit(t,e,r){for(var n=-1,i=e.length,a={};++n{$5();wme();z5();kme=sit});function oit(t,e){var r=t.length;for(t.sort(e);r--;)t[r]=t[r].value;return t}var Eme,Sme=D(()=>{Eme=oit});function lit(t,e){if(t!==e){var r=t!==void 0,n=t===null,i=t===t,a=Ml(t),s=e!==void 0,o=e===null,l=e===e,u=Ml(e);if(!o&&!u&&!a&&t>e||a&&s&&l&&!o&&!u||n&&s&&l||!r&&l||!i)return 1;if(!n&&!a&&!u&&t{im();Cme=lit});function uit(t,e,r){for(var n=-1,i=t.criteria,a=e.criteria,s=i.length,o=r.length;++n=o)return l;var u=r[n];return l*(u=="desc"?-1:1)}}return t.index-e.index}var Ame,Lme=D(()=>{_me();Ame=uit});function cit(t,e,r){e.length?e=h0(e,function(a){return Gr(a)?function(s){return Rd(s,a.length===1?a[0]:a)}:a}):e=[Zo];var n=-1;e=h0(e,yd(us));var i=xS(t,function(a,s,o){var l=h0(e,function(u){return u(a)});return{criteria:l,index:++n,value:a}});return Eme(i,function(a,s){return Ame(a,s,r)})}var Rme,Dme=D(()=>{F5();$5();d0();pz();Sme();g5();Lme();kd();Ta();Rme=cit});var hit,Ime,Mme=D(()=>{hz();hit=pS("length"),Ime=hit});function Tit(t){for(var e=Nme.lastIndex=0;Nme.test(t);)++e;return e}var Ome,fit,dit,pit,mit,git,yit,xz,bz,vit,Pme,Bme,Fme,xit,zme,$me,bit,wit,kit,Nme,Gme,qme=D(()=>{Ome="\\ud800-\\udfff",fit="\\u0300-\\u036f",dit="\\ufe20-\\ufe2f",pit="\\u20d0-\\u20ff",mit=fit+dit+pit,git="\\ufe0e\\ufe0f",yit="["+Ome+"]",xz="["+mit+"]",bz="\\ud83c[\\udffb-\\udfff]",vit="(?:"+xz+"|"+bz+")",Pme="[^"+Ome+"]",Bme="(?:\\ud83c[\\udde6-\\uddff]){2}",Fme="[\\ud800-\\udbff][\\udc00-\\udfff]",xit="\\u200d",zme=vit+"?",$me="["+git+"]?",bit="(?:"+xit+"(?:"+[Pme,Bme,Fme].join("|")+")"+$me+zme+")*",wit=$me+zme+bit,kit="(?:"+[Pme+xz+"?",xz,Bme,Fme,yit].join("|")+")",Nme=RegExp(bz+"(?="+bz+")|"+kit+wit,"g");Gme=Tit});function Eit(t){return dpe(t)?Gme(t):Ime(t)}var Ume,Hme=D(()=>{Mme();ppe();qme();Ume=Eit});function Sit(t,e){return kme(t,e,function(r,n){return dS(t,n)})}var Vme,Wme=D(()=>{Tme();cz();Vme=Sit});var Cit,um,Yme=D(()=>{Wme();fpe();Cit=hpe(function(t,e){return t==null?{}:Vme(t,e)}),um=Cit});function Lit(t,e,r,n){for(var i=-1,a=Ait(_it((e-t)/(r||1)),0),s=Array(a);a--;)s[n?a:++i]=t,t+=r;return s}var _it,Ait,Xme,jme=D(()=>{_it=Math.ceil,Ait=Math.max;Xme=Lit});function Rit(t){return function(e,r,n){return n&&typeof n!="number"&&Gh(e,r,n)&&(r=n=void 0),e=oy(e),r===void 0?(r=e,e=0):r=oy(r),n=n===void 0?e{jme();T5();UF();Kme=Rit});var Dit,hu,Qme=D(()=>{Zme();Dit=Kme(),hu=Dit});function Iit(t,e,r,n,i){return i(t,function(a,s,o){r=n?(n=!1,a):e(r,a,s,o)}),r}var Jme,ege=D(()=>{Jme=Iit});function Mit(t,e,r){var n=Gr(t)?mpe:Jme,i=arguments.length<3;return n(t,us(e,4),r,i,Md)}var Pl,wz=D(()=>{gpe();H5();d0();ege();Ta();Pl=Mit});function Pit(t){if(t==null)return 0;if(os(t))return hme(t)?Ume(t):t.length;var e=Nl(t);return e==Nit||e==Oit?t.size:ly(t).length}var Nit,Oit,kz,tge=D(()=>{UE();sm();o0();fme();Hme();Nit="[object Map]",Oit="[object Set]";kz=Pit});var Bit,p0,rge=D(()=>{G5();Dme();k5();T5();Bit=Td(function(t,e){if(t==null)return[];var r=e.length;return r>1&&Gh(t,e[0],e[1])?e=[]:r>2&&Gh(e[0],e[1],e[2])&&(e=[e[0]]),Rme(t,Dd(e,1),[])}),p0=Bit});var Fit,zit,nge,ige=D(()=>{QF();Hde();oS();Fit=1/0,zit=Id&&1/dy(new Id([,-0]))[1]==Fit?function(t){return new Id(t)}:Ude,nge=zit});function Git(t,e,r){var n=-1,i=Zde,a=t.length,s=!0,o=[],l=o;if(r)s=!1,i=V1e;else if(a>=$it){var u=e?null:nge(t);if(u)return dy(u);s=!1,i=aS,l=new iS}else l=e?[]:o;e:for(;++n{rz();Qde();W1e();nz();ige();oS();$it=200;TS=Git});var qit,Ez,age=D(()=>{G5();k5();Tz();GB();qit=Td(function(t){return TS(Dd(t,1,iE,!0))}),Ez=qit});function Uit(t,e){return t&&t.length?TS(t,us(e,2)):[]}var sge,oge=D(()=>{d0();Tz();sge=Uit});function Vit(t){var e=++Hit;return VE(t)+e}var Hit,cm,lge=D(()=>{WF();Hit=0;cm=Vit});function Wit(t,e,r){for(var n=-1,i=t.length,a=e.length,s={};++n{uge=Wit});function Yit(t,e){return uge(t||[],e||[],xd)}var ES,hge=D(()=>{b5();cge();ES=Yit});var Dn=D(()=>{ez();s1e();WB();H1e();X1e();dz();tme();YE();vS();ime();ame();cme();Ta();bS();o5();gme();Xh();Y1e();yy();yme();vme();XB();vz();xme();q1e();Yme();Qme();wz();tge();rge();age();lge();mme();hge();});function dge(t,e){t[e]?t[e]++:t[e]=1}function pge(t,e){--t[e]||delete t[e]}function W5(t,e,r,n){var i=""+e,a=""+r;if(!t&&i>a){var s=i;i=a,a=s}return i+fge+a+fge+(Vn(n)?Xit:n)}function jit(t,e,r,n){var i=""+e,a=""+r;if(!t&&i>a){var s=i;i=a,a=s}var o={v:i,w:a};return n&&(o.name=n),o}function Sz(t,e){return W5(t,e.v,e.w,e.name)}var Xit,hm,fge,In,SS=D(()=>{Dn();Xit="\0",hm="\0",fge="",In=class{constructor(e={}){this._isDirected=Object.prototype.hasOwnProperty.call(e,"directed")?e.directed:!0,this._isMultigraph=Object.prototype.hasOwnProperty.call(e,"multigraph")?e.multigraph:!1,this._isCompound=Object.prototype.hasOwnProperty.call(e,"compound")?e.compound:!1,this._label=void 0,this._defaultNodeLabelFn=Qo(void 0),this._defaultEdgeLabelFn=Qo(void 0),this._nodes={},this._isCompound&&(this._parent={},this._children={},this._children[hm]={}),this._in={},this._preds={},this._out={},this._sucs={},this._edgeObjs={},this._edgeLabels={}}isDirected(){return this._isDirected}isMultigraph(){return this._isMultigraph}isCompound(){return this._isCompound}setGraph(e){return this._label=e,this}graph(){return this._label}setDefaultNodeLabel(e){return a0(e)||(e=Qo(e)),this._defaultNodeLabelFn=e,this}nodeCount(){return this._nodeCount}nodes(){return Ki(this._nodes)}sources(){var e=this;return Ds(this.nodes(),function(r){return jh(e._in[r])})}sinks(){var e=this;return Ds(this.nodes(),function(r){return jh(e._out[r])})}setNodes(e,r){var n=arguments,i=this;return lt(e,function(a){n.length>1?i.setNode(a,r):i.setNode(a)}),this}setNode(e,r){return Object.prototype.hasOwnProperty.call(this._nodes,e)?(arguments.length>1&&(this._nodes[e]=r),this):(this._nodes[e]=arguments.length>1?r:this._defaultNodeLabelFn(e),this._isCompound&&(this._parent[e]=hm,this._children[e]={},this._children[hm][e]=!0),this._in[e]={},this._preds[e]={},this._out[e]={},this._sucs[e]={},++this._nodeCount,this)}node(e){return this._nodes[e]}hasNode(e){return Object.prototype.hasOwnProperty.call(this._nodes,e)}removeNode(e){if(Object.prototype.hasOwnProperty.call(this._nodes,e)){var r=n=>this.removeEdge(this._edgeObjs[n]);delete this._nodes[e],this._isCompound&&(this._removeFromParentsChildList(e),delete this._parent[e],lt(this.children(e),n=>{this.setParent(n)}),delete this._children[e]),lt(Ki(this._in[e]),r),delete this._in[e],delete this._preds[e],lt(Ki(this._out[e]),r),delete this._out[e],delete this._sucs[e],--this._nodeCount}return this}setParent(e,r){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(Vn(r))r=hm;else{r+="";for(var n=r;!Vn(n);n=this.parent(n))if(n===e)throw new Error("Setting "+r+" as parent of "+e+" would create a cycle");this.setNode(r)}return this.setNode(e),this._removeFromParentsChildList(e),this._parent[e]=r,this._children[r][e]=!0,this}_removeFromParentsChildList(e){delete this._children[this._parent[e]][e]}parent(e){if(this._isCompound){var r=this._parent[e];if(r!==hm)return r}}children(e){if(Vn(e)&&(e=hm),this._isCompound){var r=this._children[e];if(r)return Ki(r)}else{if(e===hm)return this.nodes();if(this.hasNode(e))return[]}}predecessors(e){var r=this._preds[e];if(r)return Ki(r)}successors(e){var r=this._sucs[e];if(r)return Ki(r)}neighbors(e){var r=this.predecessors(e);if(r)return Ez(r,this.successors(e))}isLeaf(e){var r;return this.isDirected()?r=this.successors(e):r=this.neighbors(e),r.length===0}filterNodes(e){var r=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});r.setGraph(this.graph());var n=this;lt(this._nodes,function(s,o){e(o)&&r.setNode(o,s)}),lt(this._edgeObjs,function(s){r.hasNode(s.v)&&r.hasNode(s.w)&&r.setEdge(s,n.edge(s))});var i={};function a(s){var o=n.parent(s);return o===void 0||r.hasNode(o)?(i[s]=o,o):o in i?i[o]:a(o)}return this._isCompound&<(r.nodes(),function(s){r.setParent(s,a(s))}),r}setDefaultEdgeLabel(e){return a0(e)||(e=Qo(e)),this._defaultEdgeLabelFn=e,this}edgeCount(){return this._edgeCount}edges(){return Ol(this._edgeObjs)}setPath(e,r){var n=this,i=arguments;return Pl(e,function(a,s){return i.length>1?n.setEdge(a,s,r):n.setEdge(a,s),s}),this}setEdge(){var e,r,n,i,a=!1,s=arguments[0];typeof s=="object"&&s!==null&&"v"in s?(e=s.v,r=s.w,n=s.name,arguments.length===2&&(i=arguments[1],a=!0)):(e=s,r=arguments[1],n=arguments[3],arguments.length>2&&(i=arguments[2],a=!0)),e=""+e,r=""+r,Vn(n)||(n=""+n);var o=W5(this._isDirected,e,r,n);if(Object.prototype.hasOwnProperty.call(this._edgeLabels,o))return a&&(this._edgeLabels[o]=i),this;if(!Vn(n)&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(e),this.setNode(r),this._edgeLabels[o]=a?i:this._defaultEdgeLabelFn(e,r,n);var l=jit(this._isDirected,e,r,n);return e=l.v,r=l.w,Object.freeze(l),this._edgeObjs[o]=l,dge(this._preds[r],e),dge(this._sucs[e],r),this._in[r][o]=l,this._out[e][o]=l,this._edgeCount++,this}edge(e,r,n){var i=arguments.length===1?Sz(this._isDirected,arguments[0]):W5(this._isDirected,e,r,n);return this._edgeLabels[i]}hasEdge(e,r,n){var i=arguments.length===1?Sz(this._isDirected,arguments[0]):W5(this._isDirected,e,r,n);return Object.prototype.hasOwnProperty.call(this._edgeLabels,i)}removeEdge(e,r,n){var i=arguments.length===1?Sz(this._isDirected,arguments[0]):W5(this._isDirected,e,r,n),a=this._edgeObjs[i];return a&&(e=a.v,r=a.w,delete this._edgeLabels[i],delete this._edgeObjs[i],pge(this._preds[r],e),pge(this._sucs[e],r),delete this._in[r][i],delete this._out[e][i],this._edgeCount--),this}inEdges(e,r){var n=this._in[e];if(n){var i=Ol(n);return r?Ds(i,function(a){return a.v===r}):i}}outEdges(e,r){var n=this._out[e];if(n){var i=Ol(n);return r?Ds(i,function(a){return a.w===r}):i}}nodeEdges(e,r){var n=this.inEdges(e,r);if(n)return n.concat(this.outEdges(e,r))}};In.prototype._nodeCount=0;In.prototype._edgeCount=0});var fu=D(()=>{SS()});function mge(t){t._prev._next=t._next,t._next._prev=t._prev,delete t._next,delete t._prev}function Kit(t,e){if(t!=="_next"&&t!=="_prev")return e}var _S,gge=D(()=>{_S=class{constructor(){var e={};e._next=e._prev=e,this._sentinel=e}dequeue(){var e=this._sentinel,r=e._prev;if(r!==e)return mge(r),r}enqueue(e){var r=this._sentinel;e._prev&&e._next&&mge(e),e._next=r._next,r._next._prev=e,r._next=e,e._prev=r}toString(){for(var e=[],r=this._sentinel,n=r._prev;n!==r;)e.push(JSON.stringify(n,Kit)),n=n._prev;return"["+e.join(", ")+"]"}}});function yge(t,e){if(t.nodeCount()<=1)return[];var r=Jit(t,e||Zit),n=Qit(r.graph,r.buckets,r.zeroIdx);return tl(Dr(n,function(i){return t.outEdges(i.v,i.w)}))}function Qit(t,e,r){for(var n=[],i=e[e.length-1],a=e[0],s;t.nodeCount();){for(;s=a.dequeue();)Cz(t,e,r,s);for(;s=i.dequeue();)Cz(t,e,r,s);if(t.nodeCount()){for(var o=e.length-2;o>0;--o)if(s=e[o].dequeue(),s){n=n.concat(Cz(t,e,r,s,!0));break}}}return n}function Cz(t,e,r,n,i){var a=i?[]:void 0;return lt(t.inEdges(n.v),function(s){var o=t.edge(s),l=t.node(s.v);i&&a.push({v:s.v,w:s.w}),l.out-=o,_z(e,r,l)}),lt(t.outEdges(n.v),function(s){var o=t.edge(s),l=s.w,u=t.node(l);u.in-=o,_z(e,r,u)}),t.removeNode(n.v),a}function Jit(t,e){var r=new In,n=0,i=0;lt(t.nodes(),function(o){r.setNode(o,{v:o,in:0,out:0})}),lt(t.edges(),function(o){var l=r.edge(o.v,o.w)||0,u=e(o),h=l+u;r.setEdge(o.v,o.w,h),i=Math.max(i,r.node(o.v).out+=u),n=Math.max(n,r.node(o.w).in+=u)});var a=hu(i+n+3).map(function(){return new _S}),s=n+1;return lt(r.nodes(),function(o){_z(a,s,r.node(o))}),{graph:r,buckets:a,zeroIdx:s}}function _z(t,e,r){r.out?r.in?t[r.out-r.in+e].enqueue(r):t[t.length-1].enqueue(r):t[0].enqueue(r)}var Zit,vge=D(()=>{Dn();fu();gge();Zit=Qo(1)});function xge(t){var e=t.graph().acyclicer==="greedy"?yge(t,r(t)):eat(t);lt(e,function(n){var i=t.edge(n);t.removeEdge(n),i.forwardName=n.name,i.reversed=!0,t.setEdge(n.w,n.v,i,cm("rev"))});function r(n){return function(i){return n.edge(i).weight}}}function eat(t){var e=[],r={},n={};function i(a){Object.prototype.hasOwnProperty.call(n,a)||(n[a]=!0,r[a]=!0,lt(t.outEdges(a),function(s){Object.prototype.hasOwnProperty.call(r,s.w)?e.push(s):i(s.w)}),delete r[a])}return lt(t.nodes(),i),e}function bge(t){lt(t.edges(),function(e){var r=t.edge(e);if(r.reversed){t.removeEdge(e);var n=r.forwardName;delete r.reversed,delete r.forwardName,t.setEdge(e.w,e.v,r,n)}})}var Az=D(()=>{Dn();vge()});function m0(t,e,r,n){var i;do i=cm(n);while(t.hasNode(i));return r.dummy=e,t.setNode(i,r),i}function kge(t){var e=new In().setGraph(t.graph());return lt(t.nodes(),function(r){e.setNode(r,t.node(r))}),lt(t.edges(),function(r){var n=e.edge(r.v,r.w)||{weight:0,minlen:1},i=t.edge(r);e.setEdge(r.v,r.w,{weight:n.weight+i.weight,minlen:Math.max(n.minlen,i.minlen)})}),e}function AS(t){var e=new In({multigraph:t.isMultigraph()}).setGraph(t.graph());return lt(t.nodes(),function(r){t.children(r).length||e.setNode(r,t.node(r))}),lt(t.edges(),function(r){e.setEdge(r,t.edge(r))}),e}function Lz(t,e){var r=t.x,n=t.y,i=e.x-r,a=e.y-n,s=t.width/2,o=t.height/2;if(!i&&!a)throw new Error("Not possible to find intersection inside of the rectangle");var l,u;return Math.abs(a)*s>Math.abs(i)*o?(a<0&&(o=-o),l=o*i/a,u=o):(i<0&&(s=-s),l=s,u=s*a/i),{x:r+l,y:n+u}}function Od(t){var e=Dr(hu(Dz(t)+1),function(){return[]});return lt(t.nodes(),function(r){var n=t.node(r),i=n.rank;Vn(i)||(e[i][n.order]=r)}),e}function Tge(t){var e=ic(Dr(t.nodes(),function(r){return t.node(r).rank}));lt(t.nodes(),function(r){var n=t.node(r);V5(n,"rank")&&(n.rank-=e)})}function Ege(t){var e=ic(Dr(t.nodes(),function(a){return t.node(a).rank})),r=[];lt(t.nodes(),function(a){var s=t.node(a).rank-e;r[s]||(r[s]=[]),r[s].push(a)});var n=0,i=t.graph().nodeRankFactor;lt(r,function(a,s){Vn(a)&&s%i!==0?--n:n&<(a,function(o){t.node(o).rank+=n})})}function Rz(t,e,r,n){var i={width:0,height:0};return arguments.length>=4&&(i.rank=r,i.order=n),m0(t,"border",i,e)}function Dz(t){return rl(Dr(t.nodes(),function(e){var r=t.node(e).rank;if(!Vn(r))return r}))}function Sge(t,e){var r={lhs:[],rhs:[]};return lt(t,function(n){e(n)?r.lhs.push(n):r.rhs.push(n)}),r}function Cge(t,e){var r=gS();try{return e()}finally{console.log(t+" time: "+(gS()-r)+"ms")}}function _ge(t,e){return e()}var g0=D(()=>{Dn();fu()});function Lge(t){function e(r){var n=t.children(r),i=t.node(r);if(n.length&<(n,e),Object.prototype.hasOwnProperty.call(i,"minRank")){i.borderLeft=[],i.borderRight=[];for(var a=i.minRank,s=i.maxRank+1;a{Dn();g0()});function Ige(t){var e=t.graph().rankdir.toLowerCase();(e==="lr"||e==="rl")&&Nge(t)}function Mge(t){var e=t.graph().rankdir.toLowerCase();(e==="bt"||e==="rl")&&tat(t),(e==="lr"||e==="rl")&&(rat(t),Nge(t))}function Nge(t){lt(t.nodes(),function(e){Dge(t.node(e))}),lt(t.edges(),function(e){Dge(t.edge(e))})}function Dge(t){var e=t.width;t.width=t.height,t.height=e}function tat(t){lt(t.nodes(),function(e){Iz(t.node(e))}),lt(t.edges(),function(e){var r=t.edge(e);lt(r.points,Iz),Object.prototype.hasOwnProperty.call(r,"y")&&Iz(r)})}function Iz(t){t.y=-t.y}function rat(t){lt(t.nodes(),function(e){Mz(t.node(e))}),lt(t.edges(),function(e){var r=t.edge(e);lt(r.points,Mz),Object.prototype.hasOwnProperty.call(r,"x")&&Mz(r)})}function Mz(t){var e=t.x;t.x=t.y,t.y=e}var Oge=D(()=>{Dn()});function Pge(t){t.graph().dummyChains=[],lt(t.edges(),function(e){iat(t,e)})}function iat(t,e){var r=e.v,n=t.node(r).rank,i=e.w,a=t.node(i).rank,s=e.name,o=t.edge(e),l=o.labelRank;if(a!==n+1){t.removeEdge(e);var u=void 0,h,f;for(f=0,++n;n{Dn();g0()});function Y5(t){var e={};function r(n){var i=t.node(n);if(Object.prototype.hasOwnProperty.call(e,n))return i.rank;e[n]=!0;var a=ic(Dr(t.outEdges(n),function(s){return r(s.w)-t.edge(s).minlen}));return(a===Number.POSITIVE_INFINITY||a===void 0||a===null)&&(a=0),i.rank=a}lt(t.sources(),r)}function fm(t,e){return t.node(e.w).rank-t.node(e.v).rank-t.edge(e).minlen}var LS=D(()=>{Dn()});function RS(t){var e=new In({directed:!1}),r=t.nodes()[0],n=t.nodeCount();e.setNode(r,{});for(var i,a;aat(e,t){Dn();fu();LS()});var zge=D(()=>{});var Pz=D(()=>{});var Phr,Bz=D(()=>{Dn();Pz();Phr=Qo(1)});var $ge=D(()=>{Bz()});var Fz=D(()=>{});var Gge=D(()=>{Fz()});var Uhr,qge=D(()=>{Dn();Uhr=Qo(1)});function zz(t){var e={},r={},n=[];function i(a){if(Object.prototype.hasOwnProperty.call(r,a))throw new X5;Object.prototype.hasOwnProperty.call(e,a)||(r[a]=!0,e[a]=!0,lt(t.predecessors(a),i),delete r[a],n.push(a))}if(lt(t.sinks(),i),kz(e)!==t.nodeCount())throw new X5;return n}function X5(){}var $z=D(()=>{Dn();zz.CycleException=X5;X5.prototype=new Error});var Uge=D(()=>{$z()});function DS(t,e,r){Gr(e)||(e=[e]);var n=(t.isDirected()?t.successors:t.neighbors).bind(t),i=[],a={};return lt(e,function(s){if(!t.hasNode(s))throw new Error("Graph does not have node: "+s);Hge(t,s,r==="post",a,n,i)}),i}function Hge(t,e,r,n,i,a){Object.prototype.hasOwnProperty.call(n,e)||(n[e]=!0,r||a.push(e),lt(i(e),function(s){Hge(t,s,r,n,i,a)}),r&&a.push(e))}var Gz=D(()=>{Dn()});function qz(t,e){return DS(t,e,"post")}var Vge=D(()=>{Gz()});function Uz(t,e){return DS(t,e,"pre")}var Wge=D(()=>{Gz()});var Yge=D(()=>{Pz();SS()});var Xge=D(()=>{zge();Bz();$ge();Gge();qge();Uge();Vge();Wge();Yge();Fz();$z()});function Bd(t){t=kge(t),Y5(t);var e=RS(t);Vz(e),Hz(e,t);for(var r,n;r=Qge(e);)n=Jge(e,t,r),e2e(e,t,r,n)}function Hz(t,e){var r=qz(t,t.nodes());r=r.slice(0,r.length-1),lt(r,function(n){fat(t,e,n)})}function fat(t,e,r){var n=t.node(r),i=n.parent;t.edge(r,i).cutvalue=Kge(t,e,r)}function Kge(t,e,r){var n=t.node(r),i=n.parent,a=!0,s=e.edge(r,i),o=0;return s||(a=!1,s=e.edge(i,r)),o=s.weight,lt(e.nodeEdges(r),function(l){var u=l.v===r,h=u?l.w:l.v;if(h!==i){var f=u===a,d=e.edge(l).weight;if(o+=f?d:-d,pat(t,r,h)){var p=t.edge(r,h).cutvalue;o+=f?-p:p}}}),o}function Vz(t,e){arguments.length<2&&(e=t.nodes()[0]),Zge(t,{},1,e)}function Zge(t,e,r,n,i){var a=r,s=t.node(n);return e[n]=!0,lt(t.neighbors(n),function(o){Object.prototype.hasOwnProperty.call(e,o)||(r=Zge(t,e,r,o,n))}),s.low=a,s.lim=r++,i?s.parent=i:delete s.parent,r}function Qge(t){return gy(t.edges(),function(e){return t.edge(e).cutvalue<0})}function Jge(t,e,r){var n=r.v,i=r.w;e.hasEdge(n,i)||(n=r.w,i=r.v);var a=t.node(n),s=t.node(i),o=a,l=!1;a.lim>s.lim&&(o=s,l=!0);var u=Ds(e.edges(),function(h){return l===jge(t,t.node(h.v),o)&&l!==jge(t,t.node(h.w),o)});return lm(u,function(h){return fm(e,h)})}function e2e(t,e,r,n){var i=r.v,a=r.w;t.removeEdge(i,a),t.setEdge(n.v,n.w,{}),Vz(t),Hz(t,e),dat(t,e)}function dat(t,e){var r=gy(t.nodes(),function(i){return!e.node(i).parent}),n=Uz(t,r);n=n.slice(1),lt(n,function(i){var a=t.node(i).parent,s=e.edge(i,a),o=!1;s||(s=e.edge(a,i),o=!0),e.node(i).rank=e.node(a).rank+(o?s.minlen:-s.minlen)})}function pat(t,e,r){return t.hasEdge(e,r)}function jge(t,e,r){return r.low<=e.lim&&e.lim<=r.lim}var t2e=D(()=>{Dn();Xge();g0();Oz();LS();Bd.initLowLimValues=Vz;Bd.initCutValues=Hz;Bd.calcCutValue=Kge;Bd.leaveEdge=Qge;Bd.enterEdge=Jge;Bd.exchangeEdges=e2e});function Wz(t){switch(t.graph().ranker){case"network-simplex":r2e(t);break;case"tight-tree":gat(t);break;case"longest-path":mat(t);break;default:r2e(t)}}function gat(t){Y5(t),RS(t)}function r2e(t){Bd(t)}var mat,Yz=D(()=>{Oz();t2e();LS();mat=Y5});function n2e(t){var e=m0(t,"root",{},"_root"),r=yat(t),n=rl(Ol(r))-1,i=2*n+1;t.graph().nestingRoot=e,lt(t.edges(),function(s){t.edge(s).minlen*=i});var a=vat(t)+1;lt(t.children(),function(s){i2e(t,e,i,a,n,r,s)}),t.graph().nodeRankFactor=i}function i2e(t,e,r,n,i,a,s){var o=t.children(s);if(!o.length){s!==e&&t.setEdge(e,s,{weight:0,minlen:r});return}var l=Rz(t,"_bt"),u=Rz(t,"_bb"),h=t.node(s);t.setParent(l,s),h.borderTop=l,t.setParent(u,s),h.borderBottom=u,lt(o,function(f){i2e(t,e,r,n,i,a,f);var d=t.node(f),p=d.borderTop?d.borderTop:f,m=d.borderBottom?d.borderBottom:f,g=d.borderTop?n:2*n,y=p!==m?1:i-a[s]+1;t.setEdge(l,p,{weight:g,minlen:y,nestingEdge:!0}),t.setEdge(m,u,{weight:g,minlen:y,nestingEdge:!0})}),t.parent(s)||t.setEdge(e,l,{weight:0,minlen:i+a[s]})}function yat(t){var e={};function r(n,i){var a=t.children(n);a&&a.length&<(a,function(s){r(s,i+1)}),e[n]=i}return lt(t.children(),function(n){r(n,1)}),e}function vat(t){return Pl(t.edges(),function(e,r){return e+t.edge(r).weight},0)}function a2e(t){var e=t.graph();t.removeNode(e.nestingRoot),delete e.nestingRoot,lt(t.edges(),function(r){var n=t.edge(r);n.nestingEdge&&t.removeEdge(r)})}var s2e=D(()=>{Dn();g0()});function o2e(t,e,r){var n={},i;lt(r,function(a){for(var s=t.parent(a),o,l;s;){if(o=t.parent(s),o?(l=n[o],n[o]=s):(l=i,i=s),l&&l!==s){e.setEdge(l,s);return}s=o}})}var l2e=D(()=>{Dn()});function u2e(t,e,r){var n=bat(t),i=new In({compound:!0}).setGraph({root:n}).setDefaultNodeLabel(function(a){return t.node(a)});return lt(t.nodes(),function(a){var s=t.node(a),o=t.parent(a);(s.rank===e||s.minRank<=e&&e<=s.maxRank)&&(i.setNode(a),i.setParent(a,o||n),lt(t[r](a),function(l){var u=l.v===a?l.w:l.v,h=i.edge(u,a),f=Vn(h)?0:h.weight;i.setEdge(u,a,{weight:t.edge(l).weight+f})}),Object.prototype.hasOwnProperty.call(s,"minRank")&&i.setNode(a,{borderLeft:s.borderLeft[e],borderRight:s.borderRight[e]}))}),i}function bat(t){for(var e;t.hasNode(e=cm("_root")););return e}var c2e=D(()=>{Dn();fu()});function h2e(t,e){for(var r=0,n=1;n0;)h%2&&(f+=o[h+1]),h=h-1>>1,o[h]+=u.weight;l+=u.weight*f})),l}var f2e=D(()=>{Dn()});function d2e(t){var e={},r=Ds(t.nodes(),function(o){return!t.children(o).length}),n=rl(Dr(r,function(o){return t.node(o).rank})),i=Dr(hu(n+1),function(){return[]});function a(o){if(!V5(e,o)){e[o]=!0;var l=t.node(o);i[l.rank].push(o),lt(t.successors(o),a)}}var s=p0(r,function(o){return t.node(o).rank});return lt(s,a),i}var p2e=D(()=>{Dn()});function m2e(t,e){return Dr(e,function(r){var n=t.inEdges(r);if(n.length){var i=Pl(n,function(a,s){var o=t.edge(s),l=t.node(s.v);return{sum:a.sum+o.weight*l.order,weight:a.weight+o.weight}},{sum:0,weight:0});return{v:r,barycenter:i.sum/i.weight,weight:i.weight}}else return{v:r}})}var g2e=D(()=>{Dn()});function y2e(t,e){var r={};lt(t,function(i,a){var s=r[i.v]={indegree:0,in:[],out:[],vs:[i.v],i:a};Vn(i.barycenter)||(s.barycenter=i.barycenter,s.weight=i.weight)}),lt(e.edges(),function(i){var a=r[i.v],s=r[i.w];!Vn(a)&&!Vn(s)&&(s.indegree++,a.out.push(r[i.w]))});var n=Ds(r,function(i){return!i.indegree});return kat(n)}function kat(t){var e=[];function r(a){return function(s){s.merged||(Vn(s.barycenter)||Vn(a.barycenter)||s.barycenter>=a.barycenter)&&Tat(a,s)}}function n(a){return function(s){s.in.push(a),--s.indegree===0&&t.push(s)}}for(;t.length;){var i=t.pop();e.push(i),lt(i.in.reverse(),r(i)),lt(i.out,n(i))}return Dr(Ds(e,function(a){return!a.merged}),function(a){return um(a,["vs","i","barycenter","weight"])})}function Tat(t,e){var r=0,n=0;t.weight&&(r+=t.barycenter*t.weight,n+=t.weight),e.weight&&(r+=e.barycenter*e.weight,n+=e.weight),t.vs=e.vs.concat(t.vs),t.barycenter=r/n,t.weight=n,t.i=Math.min(e.i,t.i),e.merged=!0}var v2e=D(()=>{Dn()});function b2e(t,e){var r=Sge(t,function(h){return Object.prototype.hasOwnProperty.call(h,"barycenter")}),n=r.lhs,i=p0(r.rhs,function(h){return-h.i}),a=[],s=0,o=0,l=0;n.sort(Eat(!!e)),l=x2e(a,i,l),lt(n,function(h){l+=h.vs.length,a.push(h.vs),s+=h.barycenter*h.weight,o+=h.weight,l=x2e(a,i,l)});var u={vs:tl(a)};return o&&(u.barycenter=s/o,u.weight=o),u}function x2e(t,e,r){for(var n;e.length&&(n=Nd(e)).i<=r;)e.pop(),t.push(n.vs),r++;return r}function Eat(t){return function(e,r){return e.barycenterr.barycenter?1:t?r.i-e.i:e.i-r.i}}var w2e=D(()=>{Dn();g0()});function Xz(t,e,r,n){var i=t.children(e),a=t.node(e),s=a?a.borderLeft:void 0,o=a?a.borderRight:void 0,l={};s&&(i=Ds(i,function(m){return m!==s&&m!==o}));var u=m2e(t,i);lt(u,function(m){if(t.children(m.v).length){var g=Xz(t,m.v,r,n);l[m.v]=g,Object.prototype.hasOwnProperty.call(g,"barycenter")&&Cat(m,g)}});var h=y2e(u,r);Sat(h,l);var f=b2e(h,n);if(s&&(f.vs=tl([s,f.vs,o]),t.predecessors(s).length)){var d=t.node(t.predecessors(s)[0]),p=t.node(t.predecessors(o)[0]);Object.prototype.hasOwnProperty.call(f,"barycenter")||(f.barycenter=0,f.weight=0),f.barycenter=(f.barycenter*f.weight+d.order+p.order)/(f.weight+2),f.weight+=2}return f}function Sat(t,e){lt(t,function(r){r.vs=tl(r.vs.map(function(n){return e[n]?e[n].vs:n}))})}function Cat(t,e){Vn(t.barycenter)?(t.barycenter=e.barycenter,t.weight=e.weight):(t.barycenter=(t.barycenter*t.weight+e.barycenter*e.weight)/(t.weight+e.weight),t.weight+=e.weight)}var k2e=D(()=>{Dn();g2e();v2e();w2e()});function S2e(t){var e=Dz(t),r=T2e(t,hu(1,e+1),"inEdges"),n=T2e(t,hu(e-1,-1,-1),"outEdges"),i=d2e(t);E2e(t,i);for(var a=Number.POSITIVE_INFINITY,s,o=0,l=0;l<4;++o,++l){_at(o%2?r:n,o%4>=2),i=Od(t);var u=h2e(t,i);u{Dn();fu();g0();l2e();c2e();f2e();p2e();k2e()});function _2e(t){var e=Lat(t);lt(t.graph().dummyChains,function(r){for(var n=t.node(r),i=n.edgeObj,a=Aat(t,e,i.v,i.w),s=a.path,o=a.lca,l=0,u=s[l],h=!0;r!==i.w;){if(n=t.node(r),h){for(;(u=s[l])!==o&&t.node(u).maxRanks||o>e[l].lim));for(u=l,l=n;(l=t.parent(l))!==u;)a.push(l);return{path:i.concat(a.reverse()),lca:u}}function Lat(t){var e={},r=0;function n(i){var a=r;lt(t.children(i),n),e[i]={low:a,lim:r++}}return lt(t.children(),n),e}var A2e=D(()=>{Dn()});function Rat(t,e){var r={};function n(i,a){var s=0,o=0,l=i.length,u=Nd(a);return lt(a,function(h,f){var d=Iat(t,h),p=d?t.node(d).order:l;(d||h===u)&&(lt(a.slice(o,f+1),function(m){lt(t.predecessors(m),function(g){var y=t.node(g),v=y.order;(vu)&&L2e(r,d,h)})})}function i(a,s){var o=-1,l,u=0;return lt(s,function(h,f){if(t.node(h).dummy==="border"){var d=t.predecessors(h);d.length&&(l=t.node(d[0]).order,n(s,u,f,o,l),u=f,o=l)}n(s,u,s.length,l,a.length)}),s}return Pl(e,i),r}function Iat(t,e){if(t.node(e).dummy)return gy(t.predecessors(e),function(r){return t.node(r).dummy})}function L2e(t,e,r){if(e>r){var n=e;e=r,r=n}var i=t[e];i||(t[e]=i={}),i[r]=!0}function Mat(t,e,r){if(e>r){var n=e;e=r,r=n}return!!t[e]&&Object.prototype.hasOwnProperty.call(t[e],r)}function Nat(t,e,r,n){var i={},a={},s={};return lt(e,function(o){lt(o,function(l,u){i[l]=l,a[l]=l,s[l]=u})}),lt(e,function(o){var l=-1;lt(o,function(u){var h=n(u);if(h.length){h=p0(h,function(g){return s[g]});for(var f=(h.length-1)/2,d=Math.floor(f),p=Math.ceil(f);d<=p;++d){var m=h[d];a[u]===u&&l{Dn();fu();g0()});function I2e(t){t=AS(t),qat(t),gz(R2e(t),function(e,r){t.node(r).x=e})}function qat(t){var e=Od(t),r=t.graph().ranksep,n=0;lt(e,function(i){var a=rl(Dr(i,function(s){return t.node(s).height}));lt(i,function(s){t.node(s).y=n+a/2}),n+=a+r})}var M2e=D(()=>{Dn();g0();D2e()});function j5(t,e){var r=e&&e.debugTiming?Cge:_ge;r("layout",()=>{var n=r(" buildLayoutGraph",()=>Jat(t));r(" runLayout",()=>Uat(n,r)),r(" updateInputGraph",()=>Hat(t,n))})}function Uat(t,e){e(" makeSpaceForEdgeLabels",()=>est(t)),e(" removeSelfEdges",()=>ust(t)),e(" acyclic",()=>xge(t)),e(" nestingGraph.run",()=>n2e(t)),e(" rank",()=>Wz(AS(t))),e(" injectEdgeLabelProxies",()=>tst(t)),e(" removeEmptyRanks",()=>Ege(t)),e(" nestingGraph.cleanup",()=>a2e(t)),e(" normalizeRanks",()=>Tge(t)),e(" assignRankMinMax",()=>rst(t)),e(" removeEdgeLabelProxies",()=>nst(t)),e(" normalize.run",()=>Pge(t)),e(" parentDummyChains",()=>_2e(t)),e(" addBorderSegments",()=>Lge(t)),e(" order",()=>S2e(t)),e(" insertSelfEdges",()=>cst(t)),e(" adjustCoordinateSystem",()=>Ige(t)),e(" position",()=>I2e(t)),e(" positionSelfEdges",()=>hst(t)),e(" removeBorderNodes",()=>lst(t)),e(" normalize.undo",()=>Bge(t)),e(" fixupEdgeLabelCoords",()=>sst(t)),e(" undoCoordinateSystem",()=>Mge(t)),e(" translateGraph",()=>ist(t)),e(" assignNodeIntersects",()=>ast(t)),e(" reversePoints",()=>ost(t)),e(" acyclic.undo",()=>bge(t))}function Hat(t,e){lt(t.nodes(),function(r){var n=t.node(r),i=e.node(r);n&&(n.x=i.x,n.y=i.y,e.children(r).length&&(n.width=i.width,n.height=i.height))}),lt(t.edges(),function(r){var n=t.edge(r),i=e.edge(r);n.points=i.points,Object.prototype.hasOwnProperty.call(i,"x")&&(n.x=i.x,n.y=i.y)}),t.graph().width=e.graph().width,t.graph().height=e.graph().height}function Jat(t){var e=new In({multigraph:!0,compound:!0}),r=Kz(t.graph());return e.setGraph(Ed({},Wat,jz(r,Vat),um(r,Yat))),lt(t.nodes(),function(n){var i=Kz(t.node(n));e.setNode(n,fz(jz(i,Xat),jat)),e.setParent(n,t.parent(n))}),lt(t.edges(),function(n){var i=Kz(t.edge(n));e.setEdge(n,Ed({},Zat,jz(i,Kat),um(i,Qat)))}),e}function est(t){var e=t.graph();e.ranksep/=2,lt(t.edges(),function(r){var n=t.edge(r);n.minlen*=2,n.labelpos.toLowerCase()!=="c"&&(e.rankdir==="TB"||e.rankdir==="BT"?n.width+=n.labeloffset:n.height+=n.labeloffset)})}function tst(t){lt(t.edges(),function(e){var r=t.edge(e);if(r.width&&r.height){var n=t.node(e.v),i=t.node(e.w),a={rank:(i.rank-n.rank)/2+n.rank,e};m0(t,"edge-proxy",a,"_ep")}})}function rst(t){var e=0;lt(t.nodes(),function(r){var n=t.node(r);n.borderTop&&(n.minRank=t.node(n.borderTop).rank,n.maxRank=t.node(n.borderBottom).rank,e=rl(e,n.maxRank))}),t.graph().maxRank=e}function nst(t){lt(t.nodes(),function(e){var r=t.node(e);r.dummy==="edge-proxy"&&(t.edge(r.e).labelRank=r.rank,t.removeNode(e))})}function ist(t){var e=Number.POSITIVE_INFINITY,r=0,n=Number.POSITIVE_INFINITY,i=0,a=t.graph(),s=a.marginx||0,o=a.marginy||0;function l(u){var h=u.x,f=u.y,d=u.width,p=u.height;e=Math.min(e,h-d/2),r=Math.max(r,h+d/2),n=Math.min(n,f-p/2),i=Math.max(i,f+p/2)}lt(t.nodes(),function(u){l(t.node(u))}),lt(t.edges(),function(u){var h=t.edge(u);Object.prototype.hasOwnProperty.call(h,"x")&&l(h)}),e-=s,n-=o,lt(t.nodes(),function(u){var h=t.node(u);h.x-=e,h.y-=n}),lt(t.edges(),function(u){var h=t.edge(u);lt(h.points,function(f){f.x-=e,f.y-=n}),Object.prototype.hasOwnProperty.call(h,"x")&&(h.x-=e),Object.prototype.hasOwnProperty.call(h,"y")&&(h.y-=n)}),a.width=r-e+s,a.height=i-n+o}function ast(t){lt(t.edges(),function(e){var r=t.edge(e),n=t.node(e.v),i=t.node(e.w),a,s;r.points?(a=r.points[0],s=r.points[r.points.length-1]):(r.points=[],a=i,s=n),r.points.unshift(Lz(n,a)),r.points.push(Lz(i,s))})}function sst(t){lt(t.edges(),function(e){var r=t.edge(e);if(Object.prototype.hasOwnProperty.call(r,"x"))switch((r.labelpos==="l"||r.labelpos==="r")&&(r.width-=r.labeloffset),r.labelpos){case"l":r.x-=r.width/2+r.labeloffset;break;case"r":r.x+=r.width/2+r.labeloffset;break}})}function ost(t){lt(t.edges(),function(e){var r=t.edge(e);r.reversed&&r.points.reverse()})}function lst(t){lt(t.nodes(),function(e){if(t.children(e).length){var r=t.node(e),n=t.node(r.borderTop),i=t.node(r.borderBottom),a=t.node(Nd(r.borderLeft)),s=t.node(Nd(r.borderRight));r.width=Math.abs(s.x-a.x),r.height=Math.abs(i.y-n.y),r.x=a.x+r.width/2,r.y=n.y+r.height/2}}),lt(t.nodes(),function(e){t.node(e).dummy==="border"&&t.removeNode(e)})}function ust(t){lt(t.edges(),function(e){if(e.v===e.w){var r=t.node(e.v);r.selfEdges||(r.selfEdges=[]),r.selfEdges.push({e,label:t.edge(e)}),t.removeEdge(e)}})}function cst(t){var e=Od(t);lt(e,function(r){var n=0;lt(r,function(i,a){var s=t.node(i);s.order=a+n,lt(s.selfEdges,function(o){m0(t,"selfedge",{width:o.label.width,height:o.label.height,rank:s.rank,order:a+ ++n,e:o.e,label:o.label},"_se")}),delete s.selfEdges})})}function hst(t){lt(t.nodes(),function(e){var r=t.node(e);if(r.dummy==="selfedge"){var n=t.node(r.e.v),i=n.x+n.width/2,a=n.y,s=r.x-i,o=n.height/2;t.setEdge(r.e,r.label),t.removeNode(e),r.label.points=[{x:i+2*s/3,y:a-o},{x:i+5*s/6,y:a-o},{x:i+s,y:a},{x:i+5*s/6,y:a+o},{x:i+2*s/3,y:a+o}],r.label.x=r.x,r.label.y=r.y}})}function jz(t,e){return om(um(t,e),Number)}function Kz(t){var e={};return lt(t,function(r,n){e[n.toLowerCase()]=r}),e}var Vat,Wat,Yat,Xat,jat,Kat,Zat,Qat,N2e=D(()=>{Dn();fu();Rge();Oge();Az();Nz();Yz();s2e();C2e();A2e();M2e();g0();Vat=["nodesep","edgesep","ranksep","marginx","marginy"],Wat={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},Yat=["acyclicer","ranker","rankdir","align"],Xat=["width","height"],jat={width:0,height:0},Kat=["minlen","weight","width","height","labeloffset"],Zat={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},Qat=["labelpos"]});var Zz=D(()=>{Az();N2e();Nz();Yz()});function du(t){var e={options:{directed:t.isDirected(),multigraph:t.isMultigraph(),compound:t.isCompound()},nodes:fst(t),edges:dst(t)};return Vn(t.graph())||(e.value=U5(t.graph())),e}function fst(t){return Dr(t.nodes(),function(e){var r=t.node(e),n=t.parent(e),i={v:e};return Vn(r)||(i.value=r),Vn(n)||(i.parent=n),i})}function dst(t){return Dr(t.edges(),function(e){var r=t.edge(e),n={v:e.v,w:e.w};return Vn(e.name)||(n.name=e.name),Vn(r)||(n.value=r),n})}var Qz=D(()=>{Dn();SS()});var U2e={};Mr(U2e,{render:()=>xst});var qr,dm,B2e,pst,IS,mst,F2e,z2e,gst,K5,P2e,yst,$2e,G2e,vst,q2e,xst,H2e=D(()=>{nc();iu();Il();Wo();Al();As();Hn();Nr();Zz();Qz();fu();fu();Qz();qr=new Map,dm=new Map,B2e=new Map,pst=b(()=>{dm.clear(),B2e.clear(),qr.clear()},"clear"),IS=b((t,e)=>{let r=dm.get(e)||[];return he.trace("In isDescendant",e," ",t," = ",r.includes(t)),r.includes(t)},"isDescendant"),mst=b((t,e)=>{let r=dm.get(e)||[];return he.info("Descendants of ",e," is ",r),he.info("Edge is ",t),t.v===e||t.w===e?!1:r?r.includes(t.v)||IS(t.v,e)||IS(t.w,e)||r.includes(t.w):(he.debug("Tilt, ",e,",not in descendants"),!1)},"edgeInCluster"),F2e=b((t,e,r,n)=>{he.warn("Copying children of ",t,"root",n,"data",e.node(t),n);let i=e.children(t)||[];t!==n&&i.push(t),he.warn("Copying (nodes) clusterId",t,"nodes",i),i.forEach(a=>{if(e.children(a).length>0)F2e(a,e,r,n);else{let s=e.node(a);he.info("cp ",a," to ",n," with parent ",t),r.setNode(a,s),n!==e.parent(a)&&(he.warn("Setting parent",a,e.parent(a)),r.setParent(a,e.parent(a))),t!==n&&a!==t?(he.debug("Setting parent",a,t),r.setParent(a,t)):(he.info("In copy ",t,"root",n,"data",e.node(t),n),he.debug("Not Setting parent for node=",a,"cluster!==rootId",t!==n,"node!==clusterId",a!==t));let o=e.edges(a);he.debug("Copying Edges",o),o.forEach(l=>{he.info("Edge",l);let u=e.edge(l.v,l.w,l.name);he.info("Edge data",u,n);try{mst(l,n)?(he.info("Copying as ",l.v,l.w,u,l.name),r.setEdge(l.v,l.w,u,l.name),he.info("newGraph edges ",r.edges(),r.edge(r.edges()[0]))):he.info("Skipping copy of edge ",l.v,"-->",l.w," rootId: ",n," clusterId:",t)}catch(h){he.error(h)}})}he.debug("Removing node",a),e.removeNode(a)})},"copy"),z2e=b((t,e)=>{let r=e.children(t),n=[...r];for(let i of r)B2e.set(i,t),n=[...n,...z2e(i,e)];return n},"extractDescendants"),gst=b((t,e,r)=>{let n=t.edges().filter(l=>l.v===e||l.w===e),i=t.edges().filter(l=>l.v===r||l.w===r),a=n.map(l=>({v:l.v===e?r:l.v,w:l.w===e?e:l.w})),s=i.map(l=>({v:l.v,w:l.w}));return a.filter(l=>s.some(u=>l.v===u.v&&l.w===u.w))},"findCommonEdges"),K5=b((t,e,r)=>{let n=e.children(t);if(he.trace("Searching children of id ",t,n),n.length<1)return t;let i;for(let a of n){let s=K5(a,e,r),o=gst(e,r,s);if(s)if(o.length>0)i=s;else return s}return i},"findNonClusterChild"),P2e=b(t=>!qr.has(t)||!qr.get(t).externalConnections?t:qr.has(t)?qr.get(t).id:t,"getAnchorId"),yst=b((t,e)=>{if(!t||e>10){he.debug("Opting out, no graph ");return}else he.debug("Opting in, graph ");t.nodes().forEach(function(r){t.children(r).length>0&&(he.warn("Cluster identified",r," Replacement id in edges: ",K5(r,t,r)),dm.set(r,z2e(r,t)),qr.set(r,{id:K5(r,t,r),clusterData:t.node(r)}))}),t.nodes().forEach(function(r){let n=t.children(r),i=t.edges();n.length>0?(he.debug("Cluster identified",r,dm),i.forEach(a=>{let s=IS(a.v,r),o=IS(a.w,r);s^o&&(he.warn("Edge: ",a," leaves cluster ",r),he.warn("Descendants of XXX ",r,": ",dm.get(r)),qr.get(r).externalConnections=!0)})):he.debug("Not a cluster ",r,dm)});for(let r of qr.keys()){let n=qr.get(r).id,i=t.parent(n);i!==r&&qr.has(i)&&!qr.get(i).externalConnections&&(qr.get(r).id=i)}t.edges().forEach(function(r){let n=t.edge(r);he.warn("Edge "+r.v+" -> "+r.w+": "+JSON.stringify(r)),he.warn("Edge "+r.v+" -> "+r.w+": "+JSON.stringify(t.edge(r)));let i=r.v,a=r.w;if(he.warn("Fix XXX",qr,"ids:",r.v,r.w,"Translating: ",qr.get(r.v)," --- ",qr.get(r.w)),qr.get(r.v)||qr.get(r.w)){if(he.warn("Fixing and trying - removing XXX",r.v,r.w,r.name),i=P2e(r.v),a=P2e(r.w),t.removeEdge(r.v,r.w,r.name),i!==r.v){let s=t.parent(i);qr.get(s).externalConnections=!0,n.fromCluster=r.v}if(a!==r.w){let s=t.parent(a);qr.get(s).externalConnections=!0,n.toCluster=r.w}he.warn("Fix Replacing with XXX",i,a,r.name),t.setEdge(i,a,n,r.name)}}),he.warn("Adjusted Graph",du(t)),$2e(t,0),he.trace(qr)},"adjustClustersAndEdges"),$2e=b((t,e)=>{if(he.warn("extractor - ",e,du(t),t.children("D")),e>10){he.error("Bailing out");return}let r=t.nodes(),n=!1;for(let i of r){let a=t.children(i);n=n||a.length>0}if(!n){he.debug("Done, no node has children",t.nodes());return}he.debug("Nodes = ",r,e);for(let i of r)if(he.debug("Extracting node",i,qr,qr.has(i)&&!qr.get(i).externalConnections,!t.parent(i),t.node(i),t.children("D")," Depth ",e),!qr.has(i))he.debug("Not a cluster",i,e);else if(!qr.get(i).externalConnections&&t.children(i)&&t.children(i).length>0){he.warn("Cluster without external connections, without a parent and with children",i,e);let s=t.graph().rankdir==="TB"?"LR":"TB";qr.get(i)?.clusterData?.dir&&(s=qr.get(i).clusterData.dir,he.warn("Fixing dir",qr.get(i).clusterData.dir,s));let o=new In({multigraph:!0,compound:!0}).setGraph({rankdir:s,nodesep:50,ranksep:50,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}});he.warn("Old graph before copy",du(t)),F2e(i,t,o,i),t.setNode(i,{clusterNode:!0,id:i,clusterData:qr.get(i).clusterData,label:qr.get(i).label,graph:o}),he.warn("New graph after copy node: (",i,")",du(o)),he.debug("Old graph after copy",du(t))}else he.warn("Cluster ** ",i," **not meeting the criteria !externalConnections:",!qr.get(i).externalConnections," no parent: ",!t.parent(i)," children ",t.children(i)&&t.children(i).length>0,t.children("D"),e),he.debug(qr);r=t.nodes(),he.warn("New list of nodes",r);for(let i of r){let a=t.node(i);he.warn(" Now next level",i,a),a?.clusterNode&&$2e(a.graph,e+1)}},"extractor"),G2e=b((t,e)=>{if(e.length===0)return[];let r=Object.assign([],e);return e.forEach(n=>{let i=t.children(n),a=G2e(t,i);r=[...r,...a]}),r},"sorter"),vst=b(t=>G2e(t,t.children()),"sortNodesByHierarchy"),q2e=b(async(t,e,r,n,i,a)=>{he.warn("Graph in recursive render:XAX",du(e),i);let s=e.graph().rankdir;he.trace("Dir in recursive render - dir:",s);let o=t.insert("g").attr("class","root");e.nodes()?he.info("Recursive render XXX",e.nodes()):he.info("No nodes found for",e),e.edges().length>0&&he.info("Recursive edges",e.edge(e.edges()[0]));let l=o.insert("g").attr("class","clusters"),u=o.insert("g").attr("class","edgePaths"),h=o.insert("g").attr("class","edgeLabels"),f=o.insert("g").attr("class","nodes");await Promise.all(e.nodes().map(async function(g){let y=e.node(g);if(i!==void 0){let v=JSON.parse(JSON.stringify(i.clusterData));he.trace(`Setting data for parent cluster XXX Node.id = `,g,` - data=`,y.height,` -Parent cluster`,a.height),e.setNode(a.id,y),e.parent(g)||(te.trace("Setting parent",g,a.id),e.setParent(g,a.id,y))}if(te.info("(Insert) Node XXX"+g+": "+JSON.stringify(e.node(g))),v?.clusterNode){te.info("Cluster identified XBX",g,v.width,e.node(g));let{ranksep:y,nodesep:b}=e.graph();v.graph.setGraph({...v.graph.graph(),ranksep:y+25,nodesep:b});let w=await gme(f,v.graph,r,n,e.node(g),i),C=w.elem;Ft(v,C),v.diff=w.diff||0,te.info("New compound node after recursive render XAX",g,"width",v.width,"height",v.height),Xce(C,v)}else e.children(g).length>0?(te.trace("Cluster - the non recursive path XBX",g,v.id,v,v.width,"Graph:",e),te.trace(N3(v.id,e)),gr.set(v.id,{id:N3(v.id,e),node:v})):(te.trace("Node - the non recursive path XAX",g,f,e.node(g),s),await Xp(f,e.node(g),{config:i,dir:s}))})),await x(async()=>{let g=e.edges().map(async function(v){let y=e.edge(v.v,v.w,v.name);te.info("Edge "+v.v+" -> "+v.w+": "+JSON.stringify(v)),te.info("Edge "+v.v+" -> "+v.w+": ",v," ",JSON.stringify(e.edge(v))),te.info("Fix",gr,"ids:",v.v,v.w,"Translating: ",gr.get(v.v),gr.get(v.w)),await rS(h,y)});await Promise.all(g)},"processEdges")(),te.info("Graph before layout:",JSON.stringify(ml(e))),te.info("############################################# XXX"),te.info("### Layout ### XXX"),te.info("############################################# XXX"),D3(e),te.info("Graph after layout:",JSON.stringify(ml(e)));let p=0,{subGraphTitleTotalMargin:m}=wh(i);return await Promise.all(Gtt(e).map(async function(g){let v=e.node(g);if(te.info("Position XBX => "+g+": ("+v.x,","+v.y,") width: ",v.width," height: ",v.height),v?.clusterNode)v.y+=m,te.info("A tainted cluster node XBX1",g,v.id,v.width,v.height,v.x,v.y,e.parent(g)),gr.get(v.id).node=v,y3(v);else if(e.children(g).length>0){te.info("A pure cluster node XBX1",g,v.id,v.x,v.y,v.width,v.height,e.parent(g)),v.height+=m,e.node(v.parentId);let y=v?.padding/2||0,b=v?.labelBBox?.height||0,w=b-y||0;te.debug("OffsetY",w,"labelHeight",b,"halfPadding",y),await Y1(l,v),gr.get(v.id).node=v}else{let y=e.node(v.parentId);v.y+=m/2,te.info("A regular node XBX1 - using the padding",v.id,"parent",v.parentId,v.width,v.height,v.x,v.y,"offsetY",v.offsetY,"parent",y,y?.offsetY,v),y3(v)}})),e.edges().forEach(function(g){let v=e.edge(g);te.info("Edge "+g.v+" -> "+g.w+": "+JSON.stringify(v),v),v.points.forEach(C=>C.y+=m/2);let y=e.node(g.v);var b=e.node(g.w);let w=aS(u,v,gr,r,y,b,n);nS(v,w)}),e.nodes().forEach(function(g){let v=e.node(g);te.info(g,v.type,v.diff),v.isGroup&&(p=v.diff)}),te.warn("Returning from recursive render XAX",o,p),{elem:o,diff:p}},"recursiveRender"),Utt=x(async(t,e)=>{let r=new Jr({multigraph:!0,compound:!0}).setGraph({rankdir:t.direction,nodesep:t.config?.nodeSpacing||t.config?.flowchart?.nodeSpacing||t.nodeSpacing,ranksep:t.config?.rankSpacing||t.config?.flowchart?.rankSpacing||t.rankSpacing,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}}),n=e.select("g");iS(n,t.markers,t.type,t.diagramId),jce(),Jce(),Nue(),Btt(),t.nodes.forEach(i=>{r.setNode(i.id,{...i}),i.parentId&&r.setParent(i.id,i.parentId)}),te.debug("Edges:",t.edges),t.edges.forEach(i=>{if(i.start===i.end){let s=i.start,o=s+"---"+s+"---1",l=s+"---"+s+"---2",u=r.node(s);r.setNode(o,{domId:o,id:o,parentId:u.parentId,labelStyle:"",label:"",padding:0,shape:"labelRect",style:"",width:10,height:10}),r.setParent(o,u.parentId),r.setNode(l,{domId:l,id:l,parentId:u.parentId,labelStyle:"",padding:0,shape:"labelRect",label:"",style:"",width:10,height:10}),r.setParent(l,u.parentId);let h=structuredClone(i),f=structuredClone(i),d=structuredClone(i);h.label="",h.arrowTypeEnd="none",h.id=s+"-cyclic-special-1",f.arrowTypeStart="none",f.arrowTypeEnd="none",f.id=s+"-cyclic-special-mid",d.label="",u.isGroup&&(h.fromCluster=s,d.toCluster=s),d.id=s+"-cyclic-special-2",d.arrowTypeStart="none",r.setEdge(s,o,h,s+"-cyclic-special-0"),r.setEdge(o,l,f,s+"-cyclic-special-1"),r.setEdge(l,s,d,s+"-cyc{au();Fo();ln();ur();qtt={common:Ze,getConfig:wr,insertCluster:Y1,insertEdge:aS,insertEdgeLabel:rS,insertMarkers:iS,insertNode:Xp,interpolateToCurve:RC,labelHelper:rr,log:te,positionEdgeLabel:nS},M3={},GB=x(t=>{for(let e of t)M3[e.name]=e},"registerLayoutLoaders"),Vtt=x(()=>{GB([{name:"dagre",loader:x(async()=>await Promise.resolve().then(()=>(yme(),vme)),"loader")}])},"registerDefaultLayoutLoaders");Vtt();pc=x(async(t,e)=>{if(!(t.layoutAlgorithm in M3))throw new Error(`Unknown layout algorithm: ${t.layoutAlgorithm}`);let r=M3[t.layoutAlgorithm];return(await r.loader()).render(t,e,qtt,{algorithm:r.algorithm})},"render"),Rd=x((t="",{fallback:e="dagre"}={})=>{if(t in M3)return t;if(e in M3)return te.warn(`Layout algorithm ${t} is not registered. Using ${e} as fallback.`),e;throw new Error(`Both layout algorithms ${t} and ${e} are not registered.`)},"getRegisteredLayoutAlgorithm")});var O3,UB=A(()=>{O3={name:"mermaid",version:"11.6.0",description:"Markdown-ish syntax for generating flowcharts, mindmaps, sequence diagrams, class diagrams, gantt charts, git graphs and more.",type:"module",module:"./dist/mermaid.core.mjs",types:"./dist/mermaid.d.ts",exports:{".":{types:"./dist/mermaid.d.ts",import:"./dist/mermaid.core.mjs",default:"./dist/mermaid.core.mjs"},"./*":"./*"},keywords:["diagram","markdown","flowchart","sequence diagram","gantt","class diagram","git graph","mindmap","packet diagram","c4 diagram","er diagram","pie chart","pie diagram","quadrant chart","requirement diagram","graph"],scripts:{clean:"rimraf dist",dev:"pnpm -w dev","docs:code":"typedoc src/defaultConfig.ts src/config.ts src/mermaid.ts && prettier --write ./src/docs/config/setup","docs:build":"rimraf ../../docs && pnpm docs:code && pnpm docs:spellcheck && tsx scripts/docs.cli.mts","docs:verify":"pnpm docs:code && pnpm docs:spellcheck && tsx scripts/docs.cli.mts --verify","docs:pre:vitepress":"pnpm --filter ./src/docs prefetch && rimraf src/vitepress && pnpm docs:code && tsx scripts/docs.cli.mts --vitepress && pnpm --filter ./src/vitepress install --no-frozen-lockfile --ignore-scripts","docs:build:vitepress":"pnpm docs:pre:vitepress && (cd src/vitepress && pnpm run build) && cpy --flat src/docs/landing/ ./src/vitepress/.vitepress/dist/landing","docs:dev":'pnpm docs:pre:vitepress && concurrently "pnpm --filter ./src/vitepress dev" "tsx scripts/docs.cli.mts --watch --vitepress"',"docs:dev:docker":'pnpm docs:pre:vitepress && concurrently "pnpm --filter ./src/vitepress dev:docker" "tsx scripts/docs.cli.mts --watch --vitepress"',"docs:serve":"pnpm docs:build:vitepress && vitepress serve src/vitepress","docs:spellcheck":'cspell "src/docs/**/*.md"',"docs:release-version":"tsx scripts/update-release-version.mts","docs:verify-version":"tsx scripts/update-release-version.mts --verify","types:build-config":"tsx scripts/create-types-from-json-schema.mts","types:verify-config":"tsx scripts/create-types-from-json-schema.mts --verify",checkCircle:"npx madge --circular ./src",prepublishOnly:"pnpm docs:verify-version"},repository:{type:"git",url:"https://github.com/mermaid-js/mermaid"},author:"Knut Sveidqvist",license:"MIT",standard:{ignore:["**/parser/*.js","dist/**/*.js","cypress/**/*.js"],globals:["page"]},dependencies:{"@braintree/sanitize-url":"^7.0.4","@iconify/utils":"^2.1.33","@mermaid-js/parser":"workspace:^","@types/d3":"^7.4.3",cytoscape:"^3.29.3","cytoscape-cose-bilkent":"^4.1.0","cytoscape-fcose":"^2.2.0",d3:"^7.9.0","d3-sankey":"^0.12.3","dagre-d3-es":"7.0.11",dayjs:"^1.11.13",dompurify:"^3.2.4",katex:"^0.16.9",khroma:"^2.1.0","lodash-es":"^4.17.21",marked:"^15.0.7",roughjs:"^4.6.6",stylis:"^4.3.6","ts-dedent":"^2.2.0",uuid:"^11.1.0"},devDependencies:{"@adobe/jsonschema2md":"^8.0.2","@iconify/types":"^2.0.0","@types/cytoscape":"^3.21.9","@types/cytoscape-fcose":"^2.2.4","@types/d3-sankey":"^0.12.4","@types/d3-scale":"^4.0.9","@types/d3-scale-chromatic":"^3.1.0","@types/d3-selection":"^3.0.11","@types/d3-shape":"^3.1.7","@types/jsdom":"^21.1.7","@types/katex":"^0.16.7","@types/lodash-es":"^4.17.12","@types/micromatch":"^4.0.9","@types/stylis":"^4.2.7","@types/uuid":"^10.0.0",ajv:"^8.17.1",chokidar:"^4.0.3",concurrently:"^9.1.2","csstree-validator":"^4.0.1",globby:"^14.0.2",jison:"^0.4.18","js-base64":"^3.7.7",jsdom:"^26.0.0","json-schema-to-typescript":"^15.0.4",micromatch:"^4.0.8","path-browserify":"^1.0.1",prettier:"^3.5.2",remark:"^15.0.1","remark-frontmatter":"^5.0.0","remark-gfm":"^4.0.1",rimraf:"^6.0.1","start-server-and-test":"^2.0.10","type-fest":"^4.35.0",typedoc:"^0.27.8","typedoc-plugin-markdown":"^4.4.2",typescript:"~5.7.3","unist-util-flatmap":"^1.0.0","unist-util-visit":"^5.0.0",vitepress:"^1.0.2","vitepress-plugin-search":"1.0.4-alpha.22"},files:["dist/","README.md"],publishConfig:{access:"public"}}});var yi,mc=A(()=>{ur();cr();yi=x(t=>{let{securityLevel:e}=Te(),r=We("body");if(e==="sandbox"){let i=We(`#i${t}`).node()?.contentDocument??document;r=We(i.body)}return r.select(`#${t}`)},"selectSvgElement")});var VB,sm,c_,Fme,zme,$me,gc,h_,f_=A(()=>{ur();VB=ii(o1(),1),sm=x((t,e)=>{let r=t.append("rect");if(r.attr("x",e.x),r.attr("y",e.y),r.attr("fill",e.fill),r.attr("stroke",e.stroke),r.attr("width",e.width),r.attr("height",e.height),e.name&&r.attr("name",e.name),e.rx&&r.attr("rx",e.rx),e.ry&&r.attr("ry",e.ry),e.attrs!==void 0)for(let n in e.attrs)r.attr(n,e.attrs[n]);return e.class&&r.attr("class",e.class),r},"drawRect"),c_=x((t,e)=>{let r={x:e.startx,y:e.starty,width:e.stopx-e.startx,height:e.stopy-e.starty,fill:e.fill,stroke:e.stroke,class:"rect"};sm(t,r).lower()},"drawBackgroundRect"),Fme=x((t,e)=>{let r=e.text.replace(gp," "),n=t.append("text");n.attr("x",e.x),n.attr("y",e.y),n.attr("class","legend"),n.style("text-anchor",e.anchor),e.class&&n.attr("class",e.class);let a=n.append("tspan");return a.attr("x",e.x+e.textMargin*2),a.text(r),n},"drawText"),zme=x((t,e,r,n)=>{let a=t.append("image");a.attr("x",e),a.attr("y",r);let i=(0,VB.sanitizeUrl)(n);a.attr("xlink:href",i)},"drawImage"),$me=x((t,e,r,n)=>{let a=t.append("use");a.attr("x",e),a.attr("y",r);let i=(0,VB.sanitizeUrl)(n);a.attr("xlink:href",`#${i}`)},"drawEmbeddedImage"),gc=x(()=>({x:0,y:0,width:100,height:100,fill:"#EDF2AE",stroke:"#666",anchor:"start",rx:0,ry:0}),"getNoteRect"),h_=x(()=>({x:0,y:0,width:100,height:100,"text-anchor":"start",style:"#666",textMargin:0,rx:0,ry:0,tspan:!0}),"getTextObj")});var Qme={};lr(Qme,{diagram:()=>zrt});function xl(t,e,r,n,a){if(!e[t].width)if(r)e[t].text=UO(e[t].text,a,n),e[t].textLines=e[t].text.split(Ze.lineBreakRegex).length,e[t].width=a,e[t].height=o3(e[t].text,n);else{let i=e[t].text.split(Ze.lineBreakRegex);e[t].textLines=i.length;let s=0;e[t].height=0,e[t].width=0;for(let o of i)e[t].width=Math.max(Bi(o,n),e[t].width),s=o3(o,n),e[t].height=e[t].height+s}}function ZB(t,e,r,n,a){let i=new jme(a);i.data.widthLimit=r.data.widthLimit/Math.min(WB,n.length);for(let[s,o]of n.entries()){let l=0;o.image={width:0,height:0,Y:0},o.sprite&&(o.image.width=48,o.image.height=48,o.image.Y=l,l=o.image.Y+o.image.height);let u=o.wrap&&$t.wrap,h=d_($t);if(h.fontSize=h.fontSize+2,h.fontWeight="bold",xl("label",o,u,h,i.data.widthLimit),o.label.Y=l+8,l=o.label.Y+o.label.height,o.type&&o.type.text!==""){o.type.text="["+o.type.text+"]";let m=d_($t);xl("type",o,u,m,i.data.widthLimit),o.type.Y=l+5,l=o.type.Y+o.type.height}if(o.descr&&o.descr.text!==""){let m=d_($t);m.fontSize=m.fontSize-2,xl("descr",o,u,m,i.data.widthLimit),o.descr.Y=l+20,l=o.descr.Y+o.descr.height}if(s==0||s%WB===0){let m=r.data.startx+$t.diagramMarginX,g=r.data.stopy+$t.diagramMarginY+l;i.setData(m,m,g,g)}else{let m=i.data.stopx!==i.data.startx?i.data.stopx+$t.diagramMarginX:i.data.startx,g=i.data.starty;i.setData(m,m,g,g)}i.name=o.alias;let f=a.db.getC4ShapeArray(o.alias),d=a.db.getC4ShapeKeys(o.alias);d.length>0&&Zme(i,t,f,d),e=o.alias;let p=a.db.getBoundarys(e);p.length>0&&ZB(t,e,i,p,a),o.alias!=="global"&&Kme(t,o,i),r.data.stopy=Math.max(i.data.stopy+$t.c4ShapeMargin,r.data.stopy),r.data.stopx=Math.max(i.data.stopx+$t.c4ShapeMargin,r.data.stopx),v_=Math.max(v_,r.data.stopx),y_=Math.max(y_,r.data.stopy)}}var Wme,p_,Wtt,lu,Nd,Ss,ou,yc,F3,XB,jB,m_,g_,qme,Ytt,Xtt,jtt,Ktt,Ztt,Qtt,Jtt,ert,trt,rrt,nrt,art,irt,srt,ort,lrt,urt,Vme,crt,hrt,Hme,frt,drt,prt,mrt,Md,grt,vrt,yrt,xrt,brt,HB,KB,Yme,wrt,krt,Trt,Ert,Crt,Srt,_rt,Art,Lrt,Rrt,Irt,Drt,Wh,vc,v_,y_,Xme,WB,$t,cv,jme,YB,B3,d_,Nrt,Kme,Zme,hv,yl,Gme,Mrt,Ort,Prt,Ume,Brt,Frt,zrt,Jme=A(()=>{f_();ln();ur();cr();Wme=ii(o1(),1),p_=(function(){var t=x(function(Fe,Ae,Me,ke){for(Me=Me||{},ke=Fe.length;ke--;Me[Fe[ke]]=Ae);return Me},"o"),e=[1,24],r=[1,25],n=[1,26],a=[1,27],i=[1,28],s=[1,63],o=[1,64],l=[1,65],u=[1,66],h=[1,67],f=[1,68],d=[1,69],p=[1,29],m=[1,30],g=[1,31],v=[1,32],y=[1,33],b=[1,34],w=[1,35],C=[1,36],k=[1,37],E=[1,38],_=[1,39],S=[1,40],L=[1,41],M=[1,42],D=[1,43],T=[1,44],I=[1,45],N=[1,46],O=[1,47],R=[1,48],P=[1,50],B=[1,51],F=[1,52],G=[1,53],z=[1,54],H=[1,55],Q=[1,56],Y=[1,57],ie=[1,58],se=[1,59],oe=[1,60],pe=[14,42],J=[14,34,36,37,38,39,40,41,42,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],j=[12,14,34,36,37,38,39,40,41,42,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],Z=[1,82],K=[1,83],X=[1,84],ae=[1,85],W=[12,14,42],Se=[12,14,33,42],ne=[12,14,33,42,76,77,79,80],ee=[12,33],$e=[34,36,37,38,39,40,41,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],me={trace:x(function(){},"trace"),yy:{},symbols_:{error:2,start:3,mermaidDoc:4,direction:5,direction_tb:6,direction_bt:7,direction_rl:8,direction_lr:9,graphConfig:10,C4_CONTEXT:11,NEWLINE:12,statements:13,EOF:14,C4_CONTAINER:15,C4_COMPONENT:16,C4_DYNAMIC:17,C4_DEPLOYMENT:18,otherStatements:19,diagramStatements:20,otherStatement:21,title:22,accDescription:23,acc_title:24,acc_title_value:25,acc_descr:26,acc_descr_value:27,acc_descr_multiline_value:28,boundaryStatement:29,boundaryStartStatement:30,boundaryStopStatement:31,boundaryStart:32,LBRACE:33,ENTERPRISE_BOUNDARY:34,attributes:35,SYSTEM_BOUNDARY:36,BOUNDARY:37,CONTAINER_BOUNDARY:38,NODE:39,NODE_L:40,NODE_R:41,RBRACE:42,diagramStatement:43,PERSON:44,PERSON_EXT:45,SYSTEM:46,SYSTEM_DB:47,SYSTEM_QUEUE:48,SYSTEM_EXT:49,SYSTEM_EXT_DB:50,SYSTEM_EXT_QUEUE:51,CONTAINER:52,CONTAINER_DB:53,CONTAINER_QUEUE:54,CONTAINER_EXT:55,CONTAINER_EXT_DB:56,CONTAINER_EXT_QUEUE:57,COMPONENT:58,COMPONENT_DB:59,COMPONENT_QUEUE:60,COMPONENT_EXT:61,COMPONENT_EXT_DB:62,COMPONENT_EXT_QUEUE:63,REL:64,BIREL:65,REL_U:66,REL_D:67,REL_L:68,REL_R:69,REL_B:70,REL_INDEX:71,UPDATE_EL_STYLE:72,UPDATE_REL_STYLE:73,UPDATE_LAYOUT_CONFIG:74,attribute:75,STR:76,STR_KEY:77,STR_VALUE:78,ATTRIBUTE:79,ATTRIBUTE_EMPTY:80,$accept:0,$end:1},terminals_:{2:"error",6:"direction_tb",7:"direction_bt",8:"direction_rl",9:"direction_lr",11:"C4_CONTEXT",12:"NEWLINE",14:"EOF",15:"C4_CONTAINER",16:"C4_COMPONENT",17:"C4_DYNAMIC",18:"C4_DEPLOYMENT",22:"title",23:"accDescription",24:"acc_title",25:"acc_title_value",26:"acc_descr",27:"acc_descr_value",28:"acc_descr_multiline_value",33:"LBRACE",34:"ENTERPRISE_BOUNDARY",36:"SYSTEM_BOUNDARY",37:"BOUNDARY",38:"CONTAINER_BOUNDARY",39:"NODE",40:"NODE_L",41:"NODE_R",42:"RBRACE",44:"PERSON",45:"PERSON_EXT",46:"SYSTEM",47:"SYSTEM_DB",48:"SYSTEM_QUEUE",49:"SYSTEM_EXT",50:"SYSTEM_EXT_DB",51:"SYSTEM_EXT_QUEUE",52:"CONTAINER",53:"CONTAINER_DB",54:"CONTAINER_QUEUE",55:"CONTAINER_EXT",56:"CONTAINER_EXT_DB",57:"CONTAINER_EXT_QUEUE",58:"COMPONENT",59:"COMPONENT_DB",60:"COMPONENT_QUEUE",61:"COMPONENT_EXT",62:"COMPONENT_EXT_DB",63:"COMPONENT_EXT_QUEUE",64:"REL",65:"BIREL",66:"REL_U",67:"REL_D",68:"REL_L",69:"REL_R",70:"REL_B",71:"REL_INDEX",72:"UPDATE_EL_STYLE",73:"UPDATE_REL_STYLE",74:"UPDATE_LAYOUT_CONFIG",76:"STR",77:"STR_KEY",78:"STR_VALUE",79:"ATTRIBUTE",80:"ATTRIBUTE_EMPTY"},productions_:[0,[3,1],[3,1],[5,1],[5,1],[5,1],[5,1],[4,1],[10,4],[10,4],[10,4],[10,4],[10,4],[13,1],[13,1],[13,2],[19,1],[19,2],[19,3],[21,1],[21,1],[21,2],[21,2],[21,1],[29,3],[30,3],[30,3],[30,4],[32,2],[32,2],[32,2],[32,2],[32,2],[32,2],[32,2],[31,1],[20,1],[20,2],[20,3],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,1],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[35,1],[35,2],[75,1],[75,2],[75,1],[75,1]],performAction:x(function(Ae,Me,ke,ve,_e,fe,ue){var $=fe.length-1;switch(_e){case 3:ve.setDirection("TB");break;case 4:ve.setDirection("BT");break;case 5:ve.setDirection("RL");break;case 6:ve.setDirection("LR");break;case 8:case 9:case 10:case 11:case 12:ve.setC4Type(fe[$-3]);break;case 19:ve.setTitle(fe[$].substring(6)),this.$=fe[$].substring(6);break;case 20:ve.setAccDescription(fe[$].substring(15)),this.$=fe[$].substring(15);break;case 21:this.$=fe[$].trim(),ve.setTitle(this.$);break;case 22:case 23:this.$=fe[$].trim(),ve.setAccDescription(this.$);break;case 28:fe[$].splice(2,0,"ENTERPRISE"),ve.addPersonOrSystemBoundary(...fe[$]),this.$=fe[$];break;case 29:fe[$].splice(2,0,"SYSTEM"),ve.addPersonOrSystemBoundary(...fe[$]),this.$=fe[$];break;case 30:ve.addPersonOrSystemBoundary(...fe[$]),this.$=fe[$];break;case 31:fe[$].splice(2,0,"CONTAINER"),ve.addContainerBoundary(...fe[$]),this.$=fe[$];break;case 32:ve.addDeploymentNode("node",...fe[$]),this.$=fe[$];break;case 33:ve.addDeploymentNode("nodeL",...fe[$]),this.$=fe[$];break;case 34:ve.addDeploymentNode("nodeR",...fe[$]),this.$=fe[$];break;case 35:ve.popBoundaryParseStack();break;case 39:ve.addPersonOrSystem("person",...fe[$]),this.$=fe[$];break;case 40:ve.addPersonOrSystem("external_person",...fe[$]),this.$=fe[$];break;case 41:ve.addPersonOrSystem("system",...fe[$]),this.$=fe[$];break;case 42:ve.addPersonOrSystem("system_db",...fe[$]),this.$=fe[$];break;case 43:ve.addPersonOrSystem("system_queue",...fe[$]),this.$=fe[$];break;case 44:ve.addPersonOrSystem("external_system",...fe[$]),this.$=fe[$];break;case 45:ve.addPersonOrSystem("external_system_db",...fe[$]),this.$=fe[$];break;case 46:ve.addPersonOrSystem("external_system_queue",...fe[$]),this.$=fe[$];break;case 47:ve.addContainer("container",...fe[$]),this.$=fe[$];break;case 48:ve.addContainer("container_db",...fe[$]),this.$=fe[$];break;case 49:ve.addContainer("container_queue",...fe[$]),this.$=fe[$];break;case 50:ve.addContainer("external_container",...fe[$]),this.$=fe[$];break;case 51:ve.addContainer("external_container_db",...fe[$]),this.$=fe[$];break;case 52:ve.addContainer("external_container_queue",...fe[$]),this.$=fe[$];break;case 53:ve.addComponent("component",...fe[$]),this.$=fe[$];break;case 54:ve.addComponent("component_db",...fe[$]),this.$=fe[$];break;case 55:ve.addComponent("component_queue",...fe[$]),this.$=fe[$];break;case 56:ve.addComponent("external_component",...fe[$]),this.$=fe[$];break;case 57:ve.addComponent("external_component_db",...fe[$]),this.$=fe[$];break;case 58:ve.addComponent("external_component_queue",...fe[$]),this.$=fe[$];break;case 60:ve.addRel("rel",...fe[$]),this.$=fe[$];break;case 61:ve.addRel("birel",...fe[$]),this.$=fe[$];break;case 62:ve.addRel("rel_u",...fe[$]),this.$=fe[$];break;case 63:ve.addRel("rel_d",...fe[$]),this.$=fe[$];break;case 64:ve.addRel("rel_l",...fe[$]),this.$=fe[$];break;case 65:ve.addRel("rel_r",...fe[$]),this.$=fe[$];break;case 66:ve.addRel("rel_b",...fe[$]),this.$=fe[$];break;case 67:fe[$].splice(0,1),ve.addRel("rel",...fe[$]),this.$=fe[$];break;case 68:ve.updateElStyle("update_el_style",...fe[$]),this.$=fe[$];break;case 69:ve.updateRelStyle("update_rel_style",...fe[$]),this.$=fe[$];break;case 70:ve.updateLayoutConfig("update_layout_config",...fe[$]),this.$=fe[$];break;case 71:this.$=[fe[$]];break;case 72:fe[$].unshift(fe[$-1]),this.$=fe[$];break;case 73:case 75:this.$=fe[$].trim();break;case 74:let le={};le[fe[$-1].trim()]=fe[$].trim(),this.$=le;break;case 76:this.$="";break}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],7:[1,6],8:[1,7],9:[1,8],10:4,11:[1,9],15:[1,10],16:[1,11],17:[1,12],18:[1,13]},{1:[3]},{1:[2,1]},{1:[2,2]},{1:[2,7]},{1:[2,3]},{1:[2,4]},{1:[2,5]},{1:[2,6]},{12:[1,14]},{12:[1,15]},{12:[1,16]},{12:[1,17]},{12:[1,18]},{13:19,19:20,20:21,21:22,22:e,23:r,24:n,26:a,28:i,29:49,30:61,32:62,34:s,36:o,37:l,38:u,39:h,40:f,41:d,43:23,44:p,45:m,46:g,47:v,48:y,49:b,50:w,51:C,52:k,53:E,54:_,55:S,56:L,57:M,58:D,59:T,60:I,61:N,62:O,63:R,64:P,65:B,66:F,67:G,68:z,69:H,70:Q,71:Y,72:ie,73:se,74:oe},{13:70,19:20,20:21,21:22,22:e,23:r,24:n,26:a,28:i,29:49,30:61,32:62,34:s,36:o,37:l,38:u,39:h,40:f,41:d,43:23,44:p,45:m,46:g,47:v,48:y,49:b,50:w,51:C,52:k,53:E,54:_,55:S,56:L,57:M,58:D,59:T,60:I,61:N,62:O,63:R,64:P,65:B,66:F,67:G,68:z,69:H,70:Q,71:Y,72:ie,73:se,74:oe},{13:71,19:20,20:21,21:22,22:e,23:r,24:n,26:a,28:i,29:49,30:61,32:62,34:s,36:o,37:l,38:u,39:h,40:f,41:d,43:23,44:p,45:m,46:g,47:v,48:y,49:b,50:w,51:C,52:k,53:E,54:_,55:S,56:L,57:M,58:D,59:T,60:I,61:N,62:O,63:R,64:P,65:B,66:F,67:G,68:z,69:H,70:Q,71:Y,72:ie,73:se,74:oe},{13:72,19:20,20:21,21:22,22:e,23:r,24:n,26:a,28:i,29:49,30:61,32:62,34:s,36:o,37:l,38:u,39:h,40:f,41:d,43:23,44:p,45:m,46:g,47:v,48:y,49:b,50:w,51:C,52:k,53:E,54:_,55:S,56:L,57:M,58:D,59:T,60:I,61:N,62:O,63:R,64:P,65:B,66:F,67:G,68:z,69:H,70:Q,71:Y,72:ie,73:se,74:oe},{13:73,19:20,20:21,21:22,22:e,23:r,24:n,26:a,28:i,29:49,30:61,32:62,34:s,36:o,37:l,38:u,39:h,40:f,41:d,43:23,44:p,45:m,46:g,47:v,48:y,49:b,50:w,51:C,52:k,53:E,54:_,55:S,56:L,57:M,58:D,59:T,60:I,61:N,62:O,63:R,64:P,65:B,66:F,67:G,68:z,69:H,70:Q,71:Y,72:ie,73:se,74:oe},{14:[1,74]},t(pe,[2,13],{43:23,29:49,30:61,32:62,20:75,34:s,36:o,37:l,38:u,39:h,40:f,41:d,44:p,45:m,46:g,47:v,48:y,49:b,50:w,51:C,52:k,53:E,54:_,55:S,56:L,57:M,58:D,59:T,60:I,61:N,62:O,63:R,64:P,65:B,66:F,67:G,68:z,69:H,70:Q,71:Y,72:ie,73:se,74:oe}),t(pe,[2,14]),t(J,[2,16],{12:[1,76]}),t(pe,[2,36],{12:[1,77]}),t(j,[2,19]),t(j,[2,20]),{25:[1,78]},{27:[1,79]},t(j,[2,23]),{35:80,75:81,76:Z,77:K,79:X,80:ae},{35:86,75:81,76:Z,77:K,79:X,80:ae},{35:87,75:81,76:Z,77:K,79:X,80:ae},{35:88,75:81,76:Z,77:K,79:X,80:ae},{35:89,75:81,76:Z,77:K,79:X,80:ae},{35:90,75:81,76:Z,77:K,79:X,80:ae},{35:91,75:81,76:Z,77:K,79:X,80:ae},{35:92,75:81,76:Z,77:K,79:X,80:ae},{35:93,75:81,76:Z,77:K,79:X,80:ae},{35:94,75:81,76:Z,77:K,79:X,80:ae},{35:95,75:81,76:Z,77:K,79:X,80:ae},{35:96,75:81,76:Z,77:K,79:X,80:ae},{35:97,75:81,76:Z,77:K,79:X,80:ae},{35:98,75:81,76:Z,77:K,79:X,80:ae},{35:99,75:81,76:Z,77:K,79:X,80:ae},{35:100,75:81,76:Z,77:K,79:X,80:ae},{35:101,75:81,76:Z,77:K,79:X,80:ae},{35:102,75:81,76:Z,77:K,79:X,80:ae},{35:103,75:81,76:Z,77:K,79:X,80:ae},{35:104,75:81,76:Z,77:K,79:X,80:ae},t(W,[2,59]),{35:105,75:81,76:Z,77:K,79:X,80:ae},{35:106,75:81,76:Z,77:K,79:X,80:ae},{35:107,75:81,76:Z,77:K,79:X,80:ae},{35:108,75:81,76:Z,77:K,79:X,80:ae},{35:109,75:81,76:Z,77:K,79:X,80:ae},{35:110,75:81,76:Z,77:K,79:X,80:ae},{35:111,75:81,76:Z,77:K,79:X,80:ae},{35:112,75:81,76:Z,77:K,79:X,80:ae},{35:113,75:81,76:Z,77:K,79:X,80:ae},{35:114,75:81,76:Z,77:K,79:X,80:ae},{35:115,75:81,76:Z,77:K,79:X,80:ae},{20:116,29:49,30:61,32:62,34:s,36:o,37:l,38:u,39:h,40:f,41:d,43:23,44:p,45:m,46:g,47:v,48:y,49:b,50:w,51:C,52:k,53:E,54:_,55:S,56:L,57:M,58:D,59:T,60:I,61:N,62:O,63:R,64:P,65:B,66:F,67:G,68:z,69:H,70:Q,71:Y,72:ie,73:se,74:oe},{12:[1,118],33:[1,117]},{35:119,75:81,76:Z,77:K,79:X,80:ae},{35:120,75:81,76:Z,77:K,79:X,80:ae},{35:121,75:81,76:Z,77:K,79:X,80:ae},{35:122,75:81,76:Z,77:K,79:X,80:ae},{35:123,75:81,76:Z,77:K,79:X,80:ae},{35:124,75:81,76:Z,77:K,79:X,80:ae},{35:125,75:81,76:Z,77:K,79:X,80:ae},{14:[1,126]},{14:[1,127]},{14:[1,128]},{14:[1,129]},{1:[2,8]},t(pe,[2,15]),t(J,[2,17],{21:22,19:130,22:e,23:r,24:n,26:a,28:i}),t(pe,[2,37],{19:20,20:21,21:22,43:23,29:49,30:61,32:62,13:131,22:e,23:r,24:n,26:a,28:i,34:s,36:o,37:l,38:u,39:h,40:f,41:d,44:p,45:m,46:g,47:v,48:y,49:b,50:w,51:C,52:k,53:E,54:_,55:S,56:L,57:M,58:D,59:T,60:I,61:N,62:O,63:R,64:P,65:B,66:F,67:G,68:z,69:H,70:Q,71:Y,72:ie,73:se,74:oe}),t(j,[2,21]),t(j,[2,22]),t(W,[2,39]),t(Se,[2,71],{75:81,35:132,76:Z,77:K,79:X,80:ae}),t(ne,[2,73]),{78:[1,133]},t(ne,[2,75]),t(ne,[2,76]),t(W,[2,40]),t(W,[2,41]),t(W,[2,42]),t(W,[2,43]),t(W,[2,44]),t(W,[2,45]),t(W,[2,46]),t(W,[2,47]),t(W,[2,48]),t(W,[2,49]),t(W,[2,50]),t(W,[2,51]),t(W,[2,52]),t(W,[2,53]),t(W,[2,54]),t(W,[2,55]),t(W,[2,56]),t(W,[2,57]),t(W,[2,58]),t(W,[2,60]),t(W,[2,61]),t(W,[2,62]),t(W,[2,63]),t(W,[2,64]),t(W,[2,65]),t(W,[2,66]),t(W,[2,67]),t(W,[2,68]),t(W,[2,69]),t(W,[2,70]),{31:134,42:[1,135]},{12:[1,136]},{33:[1,137]},t(ee,[2,28]),t(ee,[2,29]),t(ee,[2,30]),t(ee,[2,31]),t(ee,[2,32]),t(ee,[2,33]),t(ee,[2,34]),{1:[2,9]},{1:[2,10]},{1:[2,11]},{1:[2,12]},t(J,[2,18]),t(pe,[2,38]),t(Se,[2,72]),t(ne,[2,74]),t(W,[2,24]),t(W,[2,35]),t($e,[2,25]),t($e,[2,26],{12:[1,138]}),t($e,[2,27])],defaultActions:{2:[2,1],3:[2,2],4:[2,7],5:[2,3],6:[2,4],7:[2,5],8:[2,6],74:[2,8],126:[2,9],127:[2,10],128:[2,11],129:[2,12]},parseError:x(function(Ae,Me){if(Me.recoverable)this.trace(Ae);else{var ke=new Error(Ae);throw ke.hash=Me,ke}},"parseError"),parse:x(function(Ae){var Me=this,ke=[0],ve=[],_e=[null],fe=[],ue=this.table,$="",le=0,V=0,he=0,de=2,Ne=1,we=fe.slice.call(arguments,1),ye=Object.create(this.lexer),Be={yy:{}};for(var Le in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Le)&&(Be.yy[Le]=this.yy[Le]);ye.setInput(Ae,Be.yy),Be.yy.lexer=ye,Be.yy.parser=this,typeof ye.yylloc>"u"&&(ye.yylloc={});var qe=ye.yylloc;fe.push(qe);var Ke=ye.options&&ye.options.ranges;typeof Be.yy.parseError=="function"?this.parseError=Be.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Ye(at){ke.length=ke.length-2*at,_e.length=_e.length-at,fe.length=fe.length-at}x(Ye,"popStack");function Xe(){var at;return at=ve.pop()||ye.lex()||Ne,typeof at!="number"&&(at instanceof Array&&(ve=at,at=ve.pop()),at=Me.symbols_[at]||at),at}x(Xe,"lex");for(var Ve,ot,He,nt,It,it,Tt={},lt,ct,ft,dt;;){if(He=ke[ke.length-1],this.defaultActions[He]?nt=this.defaultActions[He]:((Ve===null||typeof Ve>"u")&&(Ve=Xe()),nt=ue[He]&&ue[He][Ve]),typeof nt>"u"||!nt.length||!nt[0]){var yt="";dt=[];for(lt in ue[He])this.terminals_[lt]&<>de&&dt.push("'"+this.terminals_[lt]+"'");ye.showPosition?yt="Parse error on line "+(le+1)+`: -`+ye.showPosition()+` -Expecting `+dt.join(", ")+", got '"+(this.terminals_[Ve]||Ve)+"'":yt="Parse error on line "+(le+1)+": Unexpected "+(Ve==Ne?"end of input":"'"+(this.terminals_[Ve]||Ve)+"'"),this.parseError(yt,{text:ye.match,token:this.terminals_[Ve]||Ve,line:ye.yylineno,loc:qe,expected:dt})}if(nt[0]instanceof Array&&nt.length>1)throw new Error("Parse Error: multiple actions possible at state: "+He+", token: "+Ve);switch(nt[0]){case 1:ke.push(Ve),_e.push(ye.yytext),fe.push(ye.yylloc),ke.push(nt[1]),Ve=null,ot?(Ve=ot,ot=null):(V=ye.yyleng,$=ye.yytext,le=ye.yylineno,qe=ye.yylloc,he>0&&he--);break;case 2:if(ct=this.productions_[nt[1]][1],Tt.$=_e[_e.length-ct],Tt._$={first_line:fe[fe.length-(ct||1)].first_line,last_line:fe[fe.length-1].last_line,first_column:fe[fe.length-(ct||1)].first_column,last_column:fe[fe.length-1].last_column},Ke&&(Tt._$.range=[fe[fe.length-(ct||1)].range[0],fe[fe.length-1].range[1]]),it=this.performAction.apply(Tt,[$,V,le,Be.yy,nt[1],_e,fe].concat(we)),typeof it<"u")return it;ct&&(ke=ke.slice(0,-1*ct*2),_e=_e.slice(0,-1*ct),fe=fe.slice(0,-1*ct)),ke.push(this.productions_[nt[1]][0]),_e.push(Tt.$),fe.push(Tt._$),ft=ue[ke[ke.length-2]][ke[ke.length-1]],ke.push(ft);break;case 3:return!0}}return!0},"parse")},Ie=(function(){var Fe={EOF:1,parseError:x(function(Me,ke){if(this.yy.parser)this.yy.parser.parseError(Me,ke);else throw new Error(Me)},"parseError"),setInput:x(function(Ae,Me){return this.yy=Me||this.yy||{},this._input=Ae,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:x(function(){var Ae=this._input[0];this.yytext+=Ae,this.yyleng++,this.offset++,this.match+=Ae,this.matched+=Ae;var Me=Ae.match(/(?:\r\n?|\n).*/g);return Me?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),Ae},"input"),unput:x(function(Ae){var Me=Ae.length,ke=Ae.split(/(?:\r\n?|\n)/g);this._input=Ae+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-Me),this.offset-=Me;var ve=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),ke.length-1&&(this.yylineno-=ke.length-1);var _e=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:ke?(ke.length===ve.length?this.yylloc.first_column:0)+ve[ve.length-ke.length].length-ke[0].length:this.yylloc.first_column-Me},this.options.ranges&&(this.yylloc.range=[_e[0],_e[0]+this.yyleng-Me]),this.yyleng=this.yytext.length,this},"unput"),more:x(function(){return this._more=!0,this},"more"),reject:x(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). -`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:x(function(Ae){this.unput(this.match.slice(Ae))},"less"),pastInput:x(function(){var Ae=this.matched.substr(0,this.matched.length-this.match.length);return(Ae.length>20?"...":"")+Ae.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:x(function(){var Ae=this.match;return Ae.length<20&&(Ae+=this._input.substr(0,20-Ae.length)),(Ae.substr(0,20)+(Ae.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:x(function(){var Ae=this.pastInput(),Me=new Array(Ae.length+1).join("-");return Ae+this.upcomingInput()+` -`+Me+"^"},"showPosition"),test_match:x(function(Ae,Me){var ke,ve,_e;if(this.options.backtrack_lexer&&(_e={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(_e.yylloc.range=this.yylloc.range.slice(0))),ve=Ae[0].match(/(?:\r\n?|\n).*/g),ve&&(this.yylineno+=ve.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:ve?ve[ve.length-1].length-ve[ve.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+Ae[0].length},this.yytext+=Ae[0],this.match+=Ae[0],this.matches=Ae,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(Ae[0].length),this.matched+=Ae[0],ke=this.performAction.call(this,this.yy,this,Me,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),ke)return ke;if(this._backtrack){for(var fe in _e)this[fe]=_e[fe];return!1}return!1},"test_match"),next:x(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var Ae,Me,ke,ve;this._more||(this.yytext="",this.match="");for(var _e=this._currentRules(),fe=0;fe<_e.length;fe++)if(ke=this._input.match(this.rules[_e[fe]]),ke&&(!Me||ke[0].length>Me[0].length)){if(Me=ke,ve=fe,this.options.backtrack_lexer){if(Ae=this.test_match(ke,_e[fe]),Ae!==!1)return Ae;if(this._backtrack){Me=!1;continue}else return!1}else if(!this.options.flex)break}return Me?(Ae=this.test_match(Me,_e[ve]),Ae!==!1?Ae:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. -`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:x(function(){var Me=this.next();return Me||this.lex()},"lex"),begin:x(function(Me){this.conditionStack.push(Me)},"begin"),popState:x(function(){var Me=this.conditionStack.length-1;return Me>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:x(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:x(function(Me){return Me=this.conditionStack.length-1-Math.abs(Me||0),Me>=0?this.conditionStack[Me]:"INITIAL"},"topState"),pushState:x(function(Me){this.begin(Me)},"pushState"),stateStackSize:x(function(){return this.conditionStack.length},"stateStackSize"),options:{},performAction:x(function(Me,ke,ve,_e){var fe=_e;switch(ve){case 0:return 6;case 1:return 7;case 2:return 8;case 3:return 9;case 4:return 22;case 5:return 23;case 6:return this.begin("acc_title"),24;break;case 7:return this.popState(),"acc_title_value";break;case 8:return this.begin("acc_descr"),26;break;case 9:return this.popState(),"acc_descr_value";break;case 10:this.begin("acc_descr_multiline");break;case 11:this.popState();break;case 12:return"acc_descr_multiline_value";case 13:break;case 14:c;break;case 15:return 12;case 16:break;case 17:return 11;case 18:return 15;case 19:return 16;case 20:return 17;case 21:return 18;case 22:return this.begin("person_ext"),45;break;case 23:return this.begin("person"),44;break;case 24:return this.begin("system_ext_queue"),51;break;case 25:return this.begin("system_ext_db"),50;break;case 26:return this.begin("system_ext"),49;break;case 27:return this.begin("system_queue"),48;break;case 28:return this.begin("system_db"),47;break;case 29:return this.begin("system"),46;break;case 30:return this.begin("boundary"),37;break;case 31:return this.begin("enterprise_boundary"),34;break;case 32:return this.begin("system_boundary"),36;break;case 33:return this.begin("container_ext_queue"),57;break;case 34:return this.begin("container_ext_db"),56;break;case 35:return this.begin("container_ext"),55;break;case 36:return this.begin("container_queue"),54;break;case 37:return this.begin("container_db"),53;break;case 38:return this.begin("container"),52;break;case 39:return this.begin("container_boundary"),38;break;case 40:return this.begin("component_ext_queue"),63;break;case 41:return this.begin("component_ext_db"),62;break;case 42:return this.begin("component_ext"),61;break;case 43:return this.begin("component_queue"),60;break;case 44:return this.begin("component_db"),59;break;case 45:return this.begin("component"),58;break;case 46:return this.begin("node"),39;break;case 47:return this.begin("node"),39;break;case 48:return this.begin("node_l"),40;break;case 49:return this.begin("node_r"),41;break;case 50:return this.begin("rel"),64;break;case 51:return this.begin("birel"),65;break;case 52:return this.begin("rel_u"),66;break;case 53:return this.begin("rel_u"),66;break;case 54:return this.begin("rel_d"),67;break;case 55:return this.begin("rel_d"),67;break;case 56:return this.begin("rel_l"),68;break;case 57:return this.begin("rel_l"),68;break;case 58:return this.begin("rel_r"),69;break;case 59:return this.begin("rel_r"),69;break;case 60:return this.begin("rel_b"),70;break;case 61:return this.begin("rel_index"),71;break;case 62:return this.begin("update_el_style"),72;break;case 63:return this.begin("update_rel_style"),73;break;case 64:return this.begin("update_layout_config"),74;break;case 65:return"EOF_IN_STRUCT";case 66:return this.begin("attribute"),"ATTRIBUTE_EMPTY";break;case 67:this.begin("attribute");break;case 68:this.popState(),this.popState();break;case 69:return 80;case 70:break;case 71:return 80;case 72:this.begin("string");break;case 73:this.popState();break;case 74:return"STR";case 75:this.begin("string_kv");break;case 76:return this.begin("string_kv_key"),"STR_KEY";break;case 77:this.popState(),this.begin("string_kv_value");break;case 78:return"STR_VALUE";case 79:this.popState(),this.popState();break;case 80:return"STR";case 81:return"LBRACE";case 82:return"RBRACE";case 83:return"SPACE";case 84:return"EOL";case 85:return 14}},"anonymous"),rules:[/^(?:.*direction\s+TB[^\n]*)/,/^(?:.*direction\s+BT[^\n]*)/,/^(?:.*direction\s+RL[^\n]*)/,/^(?:.*direction\s+LR[^\n]*)/,/^(?:title\s[^#\n;]+)/,/^(?:accDescription\s[^#\n;]+)/,/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?:%%(?!\{)*[^\n]*(\r?\n?)+)/,/^(?:%%[^\n]*(\r?\n)*)/,/^(?:\s*(\r?\n)+)/,/^(?:\s+)/,/^(?:C4Context\b)/,/^(?:C4Container\b)/,/^(?:C4Component\b)/,/^(?:C4Dynamic\b)/,/^(?:C4Deployment\b)/,/^(?:Person_Ext\b)/,/^(?:Person\b)/,/^(?:SystemQueue_Ext\b)/,/^(?:SystemDb_Ext\b)/,/^(?:System_Ext\b)/,/^(?:SystemQueue\b)/,/^(?:SystemDb\b)/,/^(?:System\b)/,/^(?:Boundary\b)/,/^(?:Enterprise_Boundary\b)/,/^(?:System_Boundary\b)/,/^(?:ContainerQueue_Ext\b)/,/^(?:ContainerDb_Ext\b)/,/^(?:Container_Ext\b)/,/^(?:ContainerQueue\b)/,/^(?:ContainerDb\b)/,/^(?:Container\b)/,/^(?:Container_Boundary\b)/,/^(?:ComponentQueue_Ext\b)/,/^(?:ComponentDb_Ext\b)/,/^(?:Component_Ext\b)/,/^(?:ComponentQueue\b)/,/^(?:ComponentDb\b)/,/^(?:Component\b)/,/^(?:Deployment_Node\b)/,/^(?:Node\b)/,/^(?:Node_L\b)/,/^(?:Node_R\b)/,/^(?:Rel\b)/,/^(?:BiRel\b)/,/^(?:Rel_Up\b)/,/^(?:Rel_U\b)/,/^(?:Rel_Down\b)/,/^(?:Rel_D\b)/,/^(?:Rel_Left\b)/,/^(?:Rel_L\b)/,/^(?:Rel_Right\b)/,/^(?:Rel_R\b)/,/^(?:Rel_Back\b)/,/^(?:RelIndex\b)/,/^(?:UpdateElementStyle\b)/,/^(?:UpdateRelStyle\b)/,/^(?:UpdateLayoutConfig\b)/,/^(?:$)/,/^(?:[(][ ]*[,])/,/^(?:[(])/,/^(?:[)])/,/^(?:,,)/,/^(?:,)/,/^(?:[ ]*["]["])/,/^(?:[ ]*["])/,/^(?:["])/,/^(?:[^"]*)/,/^(?:[ ]*[\$])/,/^(?:[^=]*)/,/^(?:[=][ ]*["])/,/^(?:[^"]+)/,/^(?:["])/,/^(?:[^,]+)/,/^(?:\{)/,/^(?:\})/,/^(?:[\s]+)/,/^(?:[\n\r]+)/,/^(?:$)/],conditions:{acc_descr_multiline:{rules:[11,12],inclusive:!1},acc_descr:{rules:[9],inclusive:!1},acc_title:{rules:[7],inclusive:!1},string_kv_value:{rules:[78,79],inclusive:!1},string_kv_key:{rules:[77],inclusive:!1},string_kv:{rules:[76],inclusive:!1},string:{rules:[73,74],inclusive:!1},attribute:{rules:[68,69,70,71,72,75,80],inclusive:!1},update_layout_config:{rules:[65,66,67,68],inclusive:!1},update_rel_style:{rules:[65,66,67,68],inclusive:!1},update_el_style:{rules:[65,66,67,68],inclusive:!1},rel_b:{rules:[65,66,67,68],inclusive:!1},rel_r:{rules:[65,66,67,68],inclusive:!1},rel_l:{rules:[65,66,67,68],inclusive:!1},rel_d:{rules:[65,66,67,68],inclusive:!1},rel_u:{rules:[65,66,67,68],inclusive:!1},rel_bi:{rules:[],inclusive:!1},rel:{rules:[65,66,67,68],inclusive:!1},node_r:{rules:[65,66,67,68],inclusive:!1},node_l:{rules:[65,66,67,68],inclusive:!1},node:{rules:[65,66,67,68],inclusive:!1},index:{rules:[],inclusive:!1},rel_index:{rules:[65,66,67,68],inclusive:!1},component_ext_queue:{rules:[],inclusive:!1},component_ext_db:{rules:[65,66,67,68],inclusive:!1},component_ext:{rules:[65,66,67,68],inclusive:!1},component_queue:{rules:[65,66,67,68],inclusive:!1},component_db:{rules:[65,66,67,68],inclusive:!1},component:{rules:[65,66,67,68],inclusive:!1},container_boundary:{rules:[65,66,67,68],inclusive:!1},container_ext_queue:{rules:[65,66,67,68],inclusive:!1},container_ext_db:{rules:[65,66,67,68],inclusive:!1},container_ext:{rules:[65,66,67,68],inclusive:!1},container_queue:{rules:[65,66,67,68],inclusive:!1},container_db:{rules:[65,66,67,68],inclusive:!1},container:{rules:[65,66,67,68],inclusive:!1},birel:{rules:[65,66,67,68],inclusive:!1},system_boundary:{rules:[65,66,67,68],inclusive:!1},enterprise_boundary:{rules:[65,66,67,68],inclusive:!1},boundary:{rules:[65,66,67,68],inclusive:!1},system_ext_queue:{rules:[65,66,67,68],inclusive:!1},system_ext_db:{rules:[65,66,67,68],inclusive:!1},system_ext:{rules:[65,66,67,68],inclusive:!1},system_queue:{rules:[65,66,67,68],inclusive:!1},system_db:{rules:[65,66,67,68],inclusive:!1},system:{rules:[65,66,67,68],inclusive:!1},person_ext:{rules:[65,66,67,68],inclusive:!1},person:{rules:[65,66,67,68],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,8,10,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,81,82,83,84,85],inclusive:!0}}};return Fe})();me.lexer=Ie;function Ue(){this.yy={}}return x(Ue,"Parser"),Ue.prototype=me,me.Parser=Ue,new Ue})();p_.parser=p_;Wtt=p_,lu=[],Nd=[""],Ss="global",ou="",yc=[{alias:"global",label:{text:"global"},type:{text:"global"},tags:null,link:null,parentBoundary:""}],F3=[],XB="",jB=!1,m_=4,g_=2,Ytt=x(function(){return qme},"getC4Type"),Xtt=x(function(t){qme=Er(t,Te())},"setC4Type"),jtt=x(function(t,e,r,n,a,i,s,o,l){if(t==null||e===void 0||e===null||r===void 0||r===null||n===void 0||n===null)return;let u={},h=F3.find(f=>f.from===e&&f.to===r);if(h?u=h:F3.push(u),u.type=t,u.from=e,u.to=r,u.label={text:n},a==null)u.techn={text:""};else if(typeof a=="object"){let[f,d]=Object.entries(a)[0];u[f]={text:d}}else u.techn={text:a};if(i==null)u.descr={text:""};else if(typeof i=="object"){let[f,d]=Object.entries(i)[0];u[f]={text:d}}else u.descr={text:i};if(typeof s=="object"){let[f,d]=Object.entries(s)[0];u[f]=d}else u.sprite=s;if(typeof o=="object"){let[f,d]=Object.entries(o)[0];u[f]=d}else u.tags=o;if(typeof l=="object"){let[f,d]=Object.entries(l)[0];u[f]=d}else u.link=l;u.wrap=Md()},"addRel"),Ktt=x(function(t,e,r,n,a,i,s){if(e===null||r===null)return;let o={},l=lu.find(u=>u.alias===e);if(l&&e===l.alias?o=l:(o.alias=e,lu.push(o)),r==null?o.label={text:""}:o.label={text:r},n==null)o.descr={text:""};else if(typeof n=="object"){let[u,h]=Object.entries(n)[0];o[u]={text:h}}else o.descr={text:n};if(typeof a=="object"){let[u,h]=Object.entries(a)[0];o[u]=h}else o.sprite=a;if(typeof i=="object"){let[u,h]=Object.entries(i)[0];o[u]=h}else o.tags=i;if(typeof s=="object"){let[u,h]=Object.entries(s)[0];o[u]=h}else o.link=s;o.typeC4Shape={text:t},o.parentBoundary=Ss,o.wrap=Md()},"addPersonOrSystem"),Ztt=x(function(t,e,r,n,a,i,s,o){if(e===null||r===null)return;let l={},u=lu.find(h=>h.alias===e);if(u&&e===u.alias?l=u:(l.alias=e,lu.push(l)),r==null?l.label={text:""}:l.label={text:r},n==null)l.techn={text:""};else if(typeof n=="object"){let[h,f]=Object.entries(n)[0];l[h]={text:f}}else l.techn={text:n};if(a==null)l.descr={text:""};else if(typeof a=="object"){let[h,f]=Object.entries(a)[0];l[h]={text:f}}else l.descr={text:a};if(typeof i=="object"){let[h,f]=Object.entries(i)[0];l[h]=f}else l.sprite=i;if(typeof s=="object"){let[h,f]=Object.entries(s)[0];l[h]=f}else l.tags=s;if(typeof o=="object"){let[h,f]=Object.entries(o)[0];l[h]=f}else l.link=o;l.wrap=Md(),l.typeC4Shape={text:t},l.parentBoundary=Ss},"addContainer"),Qtt=x(function(t,e,r,n,a,i,s,o){if(e===null||r===null)return;let l={},u=lu.find(h=>h.alias===e);if(u&&e===u.alias?l=u:(l.alias=e,lu.push(l)),r==null?l.label={text:""}:l.label={text:r},n==null)l.techn={text:""};else if(typeof n=="object"){let[h,f]=Object.entries(n)[0];l[h]={text:f}}else l.techn={text:n};if(a==null)l.descr={text:""};else if(typeof a=="object"){let[h,f]=Object.entries(a)[0];l[h]={text:f}}else l.descr={text:a};if(typeof i=="object"){let[h,f]=Object.entries(i)[0];l[h]=f}else l.sprite=i;if(typeof s=="object"){let[h,f]=Object.entries(s)[0];l[h]=f}else l.tags=s;if(typeof o=="object"){let[h,f]=Object.entries(o)[0];l[h]=f}else l.link=o;l.wrap=Md(),l.typeC4Shape={text:t},l.parentBoundary=Ss},"addComponent"),Jtt=x(function(t,e,r,n,a){if(t===null||e===null)return;let i={},s=yc.find(o=>o.alias===t);if(s&&t===s.alias?i=s:(i.alias=t,yc.push(i)),e==null?i.label={text:""}:i.label={text:e},r==null)i.type={text:"system"};else if(typeof r=="object"){let[o,l]=Object.entries(r)[0];i[o]={text:l}}else i.type={text:r};if(typeof n=="object"){let[o,l]=Object.entries(n)[0];i[o]=l}else i.tags=n;if(typeof a=="object"){let[o,l]=Object.entries(a)[0];i[o]=l}else i.link=a;i.parentBoundary=Ss,i.wrap=Md(),ou=Ss,Ss=t,Nd.push(ou)},"addPersonOrSystemBoundary"),ert=x(function(t,e,r,n,a){if(t===null||e===null)return;let i={},s=yc.find(o=>o.alias===t);if(s&&t===s.alias?i=s:(i.alias=t,yc.push(i)),e==null?i.label={text:""}:i.label={text:e},r==null)i.type={text:"container"};else if(typeof r=="object"){let[o,l]=Object.entries(r)[0];i[o]={text:l}}else i.type={text:r};if(typeof n=="object"){let[o,l]=Object.entries(n)[0];i[o]=l}else i.tags=n;if(typeof a=="object"){let[o,l]=Object.entries(a)[0];i[o]=l}else i.link=a;i.parentBoundary=Ss,i.wrap=Md(),ou=Ss,Ss=t,Nd.push(ou)},"addContainerBoundary"),trt=x(function(t,e,r,n,a,i,s,o){if(e===null||r===null)return;let l={},u=yc.find(h=>h.alias===e);if(u&&e===u.alias?l=u:(l.alias=e,yc.push(l)),r==null?l.label={text:""}:l.label={text:r},n==null)l.type={text:"node"};else if(typeof n=="object"){let[h,f]=Object.entries(n)[0];l[h]={text:f}}else l.type={text:n};if(a==null)l.descr={text:""};else if(typeof a=="object"){let[h,f]=Object.entries(a)[0];l[h]={text:f}}else l.descr={text:a};if(typeof s=="object"){let[h,f]=Object.entries(s)[0];l[h]=f}else l.tags=s;if(typeof o=="object"){let[h,f]=Object.entries(o)[0];l[h]=f}else l.link=o;l.nodeType=t,l.parentBoundary=Ss,l.wrap=Md(),ou=Ss,Ss=e,Nd.push(ou)},"addDeploymentNode"),rrt=x(function(){Ss=ou,Nd.pop(),ou=Nd.pop(),Nd.push(ou)},"popBoundaryParseStack"),nrt=x(function(t,e,r,n,a,i,s,o,l,u,h){let f=lu.find(d=>d.alias===e);if(!(f===void 0&&(f=yc.find(d=>d.alias===e),f===void 0))){if(r!=null)if(typeof r=="object"){let[d,p]=Object.entries(r)[0];f[d]=p}else f.bgColor=r;if(n!=null)if(typeof n=="object"){let[d,p]=Object.entries(n)[0];f[d]=p}else f.fontColor=n;if(a!=null)if(typeof a=="object"){let[d,p]=Object.entries(a)[0];f[d]=p}else f.borderColor=a;if(i!=null)if(typeof i=="object"){let[d,p]=Object.entries(i)[0];f[d]=p}else f.shadowing=i;if(s!=null)if(typeof s=="object"){let[d,p]=Object.entries(s)[0];f[d]=p}else f.shape=s;if(o!=null)if(typeof o=="object"){let[d,p]=Object.entries(o)[0];f[d]=p}else f.sprite=o;if(l!=null)if(typeof l=="object"){let[d,p]=Object.entries(l)[0];f[d]=p}else f.techn=l;if(u!=null)if(typeof u=="object"){let[d,p]=Object.entries(u)[0];f[d]=p}else f.legendText=u;if(h!=null)if(typeof h=="object"){let[d,p]=Object.entries(h)[0];f[d]=p}else f.legendSprite=h}},"updateElStyle"),art=x(function(t,e,r,n,a,i,s){let o=F3.find(l=>l.from===e&&l.to===r);if(o!==void 0){if(n!=null)if(typeof n=="object"){let[l,u]=Object.entries(n)[0];o[l]=u}else o.textColor=n;if(a!=null)if(typeof a=="object"){let[l,u]=Object.entries(a)[0];o[l]=u}else o.lineColor=a;if(i!=null)if(typeof i=="object"){let[l,u]=Object.entries(i)[0];o[l]=parseInt(u)}else o.offsetX=parseInt(i);if(s!=null)if(typeof s=="object"){let[l,u]=Object.entries(s)[0];o[l]=parseInt(u)}else o.offsetY=parseInt(s)}},"updateRelStyle"),irt=x(function(t,e,r){let n=m_,a=g_;if(typeof e=="object"){let i=Object.values(e)[0];n=parseInt(i)}else n=parseInt(e);if(typeof r=="object"){let i=Object.values(r)[0];a=parseInt(i)}else a=parseInt(r);n>=1&&(m_=n),a>=1&&(g_=a)},"updateLayoutConfig"),srt=x(function(){return m_},"getC4ShapeInRow"),ort=x(function(){return g_},"getC4BoundaryInRow"),lrt=x(function(){return Ss},"getCurrentBoundaryParse"),urt=x(function(){return ou},"getParentBoundaryParse"),Vme=x(function(t){return t==null?lu:lu.filter(e=>e.parentBoundary===t)},"getC4ShapeArray"),crt=x(function(t){return lu.find(e=>e.alias===t)},"getC4Shape"),hrt=x(function(t){return Object.keys(Vme(t))},"getC4ShapeKeys"),Hme=x(function(t){return t==null?yc:yc.filter(e=>e.parentBoundary===t)},"getBoundaries"),frt=Hme,drt=x(function(){return F3},"getRels"),prt=x(function(){return XB},"getTitle"),mrt=x(function(t){jB=t},"setWrap"),Md=x(function(){return jB},"autoWrap"),grt=x(function(){lu=[],yc=[{alias:"global",label:{text:"global"},type:{text:"global"},tags:null,link:null,parentBoundary:""}],ou="",Ss="global",Nd=[""],F3=[],Nd=[""],XB="",jB=!1,m_=4,g_=2},"clear"),vrt={SOLID:0,DOTTED:1,NOTE:2,SOLID_CROSS:3,DOTTED_CROSS:4,SOLID_OPEN:5,DOTTED_OPEN:6,LOOP_START:10,LOOP_END:11,ALT_START:12,ALT_ELSE:13,ALT_END:14,OPT_START:15,OPT_END:16,ACTIVE_START:17,ACTIVE_END:18,PAR_START:19,PAR_AND:20,PAR_END:21,RECT_START:22,RECT_END:23,SOLID_POINT:24,DOTTED_POINT:25},yrt={FILLED:0,OPEN:1},xrt={LEFTOF:0,RIGHTOF:1,OVER:2},brt=x(function(t){XB=Er(t,Te())},"setTitle"),HB={addPersonOrSystem:Ktt,addPersonOrSystemBoundary:Jtt,addContainer:Ztt,addContainerBoundary:ert,addComponent:Qtt,addDeploymentNode:trt,popBoundaryParseStack:rrt,addRel:jtt,updateElStyle:nrt,updateRelStyle:art,updateLayoutConfig:irt,autoWrap:Md,setWrap:mrt,getC4ShapeArray:Vme,getC4Shape:crt,getC4ShapeKeys:hrt,getBoundaries:Hme,getBoundarys:frt,getCurrentBoundaryParse:lrt,getParentBoundaryParse:urt,getRels:drt,getTitle:prt,getC4Type:Ytt,getC4ShapeInRow:srt,getC4BoundaryInRow:ort,setAccTitle:Sr,getAccTitle:_r,getAccDescription:Lr,setAccDescription:Ar,getConfig:x(()=>Te().c4,"getConfig"),clear:grt,LINETYPE:vrt,ARROWTYPE:yrt,PLACEMENT:xrt,setTitle:brt,setC4Type:Xtt},KB=x(function(t,e){return sm(t,e)},"drawRect"),Yme=x(function(t,e,r,n,a,i){let s=t.append("image");s.attr("width",e),s.attr("height",r),s.attr("x",n),s.attr("y",a);let o=i.startsWith("data:image/png;base64")?i:(0,Wme.sanitizeUrl)(i);s.attr("xlink:href",o)},"drawImage"),wrt=x((t,e,r)=>{let n=t.append("g"),a=0;for(let i of e){let s=i.textColor?i.textColor:"#444444",o=i.lineColor?i.lineColor:"#444444",l=i.offsetX?parseInt(i.offsetX):0,u=i.offsetY?parseInt(i.offsetY):0,h="";if(a===0){let d=n.append("line");d.attr("x1",i.startPoint.x),d.attr("y1",i.startPoint.y),d.attr("x2",i.endPoint.x),d.attr("y2",i.endPoint.y),d.attr("stroke-width","1"),d.attr("stroke",o),d.style("fill","none"),i.type!=="rel_b"&&d.attr("marker-end","url("+h+"#arrowhead)"),(i.type==="birel"||i.type==="rel_b")&&d.attr("marker-start","url("+h+"#arrowend)"),a=-1}else{let d=n.append("path");d.attr("fill","none").attr("stroke-width","1").attr("stroke",o).attr("d","Mstartx,starty Qcontrolx,controly stopx,stopy ".replaceAll("startx",i.startPoint.x).replaceAll("starty",i.startPoint.y).replaceAll("controlx",i.startPoint.x+(i.endPoint.x-i.startPoint.x)/2-(i.endPoint.x-i.startPoint.x)/4).replaceAll("controly",i.startPoint.y+(i.endPoint.y-i.startPoint.y)/2).replaceAll("stopx",i.endPoint.x).replaceAll("stopy",i.endPoint.y)),i.type!=="rel_b"&&d.attr("marker-end","url("+h+"#arrowhead)"),(i.type==="birel"||i.type==="rel_b")&&d.attr("marker-start","url("+h+"#arrowend)")}let f=r.messageFont();Wh(r)(i.label.text,n,Math.min(i.startPoint.x,i.endPoint.x)+Math.abs(i.endPoint.x-i.startPoint.x)/2+l,Math.min(i.startPoint.y,i.endPoint.y)+Math.abs(i.endPoint.y-i.startPoint.y)/2+u,i.label.width,i.label.height,{fill:s},f),i.techn&&i.techn.text!==""&&(f=r.messageFont(),Wh(r)("["+i.techn.text+"]",n,Math.min(i.startPoint.x,i.endPoint.x)+Math.abs(i.endPoint.x-i.startPoint.x)/2+l,Math.min(i.startPoint.y,i.endPoint.y)+Math.abs(i.endPoint.y-i.startPoint.y)/2+r.messageFontSize+5+u,Math.max(i.label.width,i.techn.width),i.techn.height,{fill:s,"font-style":"italic"},f))}},"drawRels"),krt=x(function(t,e,r){let n=t.append("g"),a=e.bgColor?e.bgColor:"none",i=e.borderColor?e.borderColor:"#444444",s=e.fontColor?e.fontColor:"black",o={"stroke-width":1,"stroke-dasharray":"7.0,7.0"};e.nodeType&&(o={"stroke-width":1});let l={x:e.x,y:e.y,fill:a,stroke:i,width:e.width,height:e.height,rx:2.5,ry:2.5,attrs:o};KB(n,l);let u=r.boundaryFont();u.fontWeight="bold",u.fontSize=u.fontSize+2,u.fontColor=s,Wh(r)(e.label.text,n,e.x,e.y+e.label.Y,e.width,e.height,{fill:"#444444"},u),e.type&&e.type.text!==""&&(u=r.boundaryFont(),u.fontColor=s,Wh(r)(e.type.text,n,e.x,e.y+e.type.Y,e.width,e.height,{fill:"#444444"},u)),e.descr&&e.descr.text!==""&&(u=r.boundaryFont(),u.fontSize=u.fontSize-2,u.fontColor=s,Wh(r)(e.descr.text,n,e.x,e.y+e.descr.Y,e.width,e.height,{fill:"#444444"},u))},"drawBoundary"),Trt=x(function(t,e,r){let n=e.bgColor?e.bgColor:r[e.typeC4Shape.text+"_bg_color"],a=e.borderColor?e.borderColor:r[e.typeC4Shape.text+"_border_color"],i=e.fontColor?e.fontColor:"#FFFFFF",s="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAIAAADYYG7QAAACD0lEQVR4Xu2YoU4EMRCGT+4j8Ai8AhaH4QHgAUjQuFMECUgMIUgwJAgMhgQsAYUiJCiQIBBY+EITsjfTdme6V24v4c8vyGbb+ZjOtN0bNcvjQXmkH83WvYBWto6PLm6v7p7uH1/w2fXD+PBycX1Pv2l3IdDm/vn7x+dXQiAubRzoURa7gRZWd0iGRIiJbOnhnfYBQZNJjNbuyY2eJG8fkDE3bbG4ep6MHUAsgYxmE3nVs6VsBWJSGccsOlFPmLIViMzLOB7pCVO2AtHJMohH7Fh6zqitQK7m0rJvAVYgGcEpe//PLdDz65sM4pF9N7ICcXDKIB5Nv6j7tD0NoSdM2QrU9Gg0ewE1LqBhHR3BBdvj2vapnidjHxD/q6vd7Pvhr31AwcY8eXMTXAKECZZJFXuEq27aLgQK5uLMohCenGGuGewOxSjBvYBqeG6B+Nqiblggdjnc+ZXDy+FNFpFzw76O3UBAROuXh6FoiAcf5g9eTvUgzy0nWg6I8cXHRUpg5bOVBCo+KDpFajOf23GgPme7RSQ+lacIENUgJ6gg1k6HjgOlqnLqip4tEuhv0hNEMXUD0clyXE3p6pZA0S2nnvTlXwLJEZWlb7cTQH1+USgTN4VhAenm/wea1OCAOmqo6fE1WCb9WSKBah+rbUWPWAmE2Rvk0ApiB45eOyNAzU8xcTvj8KvkKEoOaIYeHNA3ZuygAvFMUO0AAAAASUVORK5CYII=";switch(e.typeC4Shape.text){case"person":s="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAIAAADYYG7QAAACD0lEQVR4Xu2YoU4EMRCGT+4j8Ai8AhaH4QHgAUjQuFMECUgMIUgwJAgMhgQsAYUiJCiQIBBY+EITsjfTdme6V24v4c8vyGbb+ZjOtN0bNcvjQXmkH83WvYBWto6PLm6v7p7uH1/w2fXD+PBycX1Pv2l3IdDm/vn7x+dXQiAubRzoURa7gRZWd0iGRIiJbOnhnfYBQZNJjNbuyY2eJG8fkDE3bbG4ep6MHUAsgYxmE3nVs6VsBWJSGccsOlFPmLIViMzLOB7pCVO2AtHJMohH7Fh6zqitQK7m0rJvAVYgGcEpe//PLdDz65sM4pF9N7ICcXDKIB5Nv6j7tD0NoSdM2QrU9Gg0ewE1LqBhHR3BBdvj2vapnidjHxD/q6vd7Pvhr31AwcY8eXMTXAKECZZJFXuEq27aLgQK5uLMohCenGGuGewOxSjBvYBqeG6B+Nqiblggdjnc+ZXDy+FNFpFzw76O3UBAROuXh6FoiAcf5g9eTvUgzy0nWg6I8cXHRUpg5bOVBCo+KDpFajOf23GgPme7RSQ+lacIENUgJ6gg1k6HjgOlqnLqip4tEuhv0hNEMXUD0clyXE3p6pZA0S2nnvTlXwLJEZWlb7cTQH1+USgTN4VhAenm/wea1OCAOmqo6fE1WCb9WSKBah+rbUWPWAmE2Rvk0ApiB45eOyNAzU8xcTvj8KvkKEoOaIYeHNA3ZuygAvFMUO0AAAAASUVORK5CYII=";break;case"external_person":s="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAIAAADYYG7QAAAB6ElEQVR4Xu2YLY+EMBCG9+dWr0aj0Wg0Go1Go0+j8Xdv2uTCvv1gpt0ebHKPuhDaeW4605Z9mJvx4AdXUyTUdd08z+u6flmWZRnHsWkafk9DptAwDPu+f0eAYtu2PEaGWuj5fCIZrBAC2eLBAnRCsEkkxmeaJp7iDJ2QMDdHsLg8SxKFEJaAo8lAXnmuOFIhTMpxxKATebo4UiFknuNo4OniSIXQyRxEA3YsnjGCVEjVXD7yLUAqxBGUyPv/Y4W2beMgGuS7kVQIBycH0fD+oi5pezQETxdHKmQKGk1eQEYldK+jw5GxPfZ9z7Mk0Qnhf1W1m3w//EUn5BDmSZsbR44QQLBEqrBHqOrmSKaQAxdnLArCrxZcM7A7ZKs4ioRq8LFC+NpC3WCBJsvpVw5edm9iEXFuyNfxXAgSwfrFQ1c0iNda8AdejvUgnktOtJQQxmcfFzGglc5WVCj7oDgFqU18boeFSs52CUh8LE8BIVQDT1ABrB0HtgSEYlX5doJnCwv9TXocKCaKbnwhdDKPq4lf3SwU3HLq4V/+WYhHVMa/3b4IlfyikAduCkcBc7mQ3/z/Qq/cTuikhkzB12Ae/mcJC9U+Vo8Ej1gWAtgbeGgFsAMHr50BIWOLCbezvhpBFUdY6EJuJ/QDW0XoMX60zZ0AAAAASUVORK5CYII=";break}let o=t.append("g");o.attr("class","person-man");let l=gc();switch(e.typeC4Shape.text){case"person":case"external_person":case"system":case"external_system":case"container":case"external_container":case"component":case"external_component":l.x=e.x,l.y=e.y,l.fill=n,l.width=e.width,l.height=e.height,l.stroke=a,l.rx=2.5,l.ry=2.5,l.attrs={"stroke-width":.5},KB(o,l);break;case"system_db":case"external_system_db":case"container_db":case"external_container_db":case"component_db":case"external_component_db":o.append("path").attr("fill",n).attr("stroke-width","0.5").attr("stroke",a).attr("d","Mstartx,startyc0,-10 half,-10 half,-10c0,0 half,0 half,10l0,heightc0,10 -half,10 -half,10c0,0 -half,0 -half,-10l0,-height".replaceAll("startx",e.x).replaceAll("starty",e.y).replaceAll("half",e.width/2).replaceAll("height",e.height)),o.append("path").attr("fill","none").attr("stroke-width","0.5").attr("stroke",a).attr("d","Mstartx,startyc0,10 half,10 half,10c0,0 half,0 half,-10".replaceAll("startx",e.x).replaceAll("starty",e.y).replaceAll("half",e.width/2));break;case"system_queue":case"external_system_queue":case"container_queue":case"external_container_queue":case"component_queue":case"external_component_queue":o.append("path").attr("fill",n).attr("stroke-width","0.5").attr("stroke",a).attr("d","Mstartx,startylwidth,0c5,0 5,half 5,halfc0,0 0,half -5,halfl-width,0c-5,0 -5,-half -5,-halfc0,0 0,-half 5,-half".replaceAll("startx",e.x).replaceAll("starty",e.y).replaceAll("width",e.width).replaceAll("half",e.height/2)),o.append("path").attr("fill","none").attr("stroke-width","0.5").attr("stroke",a).attr("d","Mstartx,startyc-5,0 -5,half -5,halfc0,half 5,half 5,half".replaceAll("startx",e.x+e.width).replaceAll("starty",e.y).replaceAll("half",e.height/2));break}let u=Drt(r,e.typeC4Shape.text);switch(o.append("text").attr("fill",i).attr("font-family",u.fontFamily).attr("font-size",u.fontSize-2).attr("font-style","italic").attr("lengthAdjust","spacing").attr("textLength",e.typeC4Shape.width).attr("x",e.x+e.width/2-e.typeC4Shape.width/2).attr("y",e.y+e.typeC4Shape.Y).text("<<"+e.typeC4Shape.text+">>"),e.typeC4Shape.text){case"person":case"external_person":Yme(o,48,48,e.x+e.width/2-24,e.y+e.image.Y,s);break}let h=r[e.typeC4Shape.text+"Font"]();return h.fontWeight="bold",h.fontSize=h.fontSize+2,h.fontColor=i,Wh(r)(e.label.text,o,e.x,e.y+e.label.Y,e.width,e.height,{fill:i},h),h=r[e.typeC4Shape.text+"Font"](),h.fontColor=i,e.techn&&e.techn?.text!==""?Wh(r)(e.techn.text,o,e.x,e.y+e.techn.Y,e.width,e.height,{fill:i,"font-style":"italic"},h):e.type&&e.type.text!==""&&Wh(r)(e.type.text,o,e.x,e.y+e.type.Y,e.width,e.height,{fill:i,"font-style":"italic"},h),e.descr&&e.descr.text!==""&&(h=r.personFont(),h.fontColor=i,Wh(r)(e.descr.text,o,e.x,e.y+e.descr.Y,e.width,e.height,{fill:i},h)),e.height},"drawC4Shape"),Ert=x(function(t){t.append("defs").append("symbol").attr("id","database").attr("fill-rule","evenodd").attr("clip-rule","evenodd").append("path").attr("transform","scale(.5)").attr("d","M12.258.001l.256.004.255.005.253.008.251.01.249.012.247.015.246.016.242.019.241.02.239.023.236.024.233.027.231.028.229.031.225.032.223.034.22.036.217.038.214.04.211.041.208.043.205.045.201.046.198.048.194.05.191.051.187.053.183.054.18.056.175.057.172.059.168.06.163.061.16.063.155.064.15.066.074.033.073.033.071.034.07.034.069.035.068.035.067.035.066.035.064.036.064.036.062.036.06.036.06.037.058.037.058.037.055.038.055.038.053.038.052.038.051.039.05.039.048.039.047.039.045.04.044.04.043.04.041.04.04.041.039.041.037.041.036.041.034.041.033.042.032.042.03.042.029.042.027.042.026.043.024.043.023.043.021.043.02.043.018.044.017.043.015.044.013.044.012.044.011.045.009.044.007.045.006.045.004.045.002.045.001.045v17l-.001.045-.002.045-.004.045-.006.045-.007.045-.009.044-.011.045-.012.044-.013.044-.015.044-.017.043-.018.044-.02.043-.021.043-.023.043-.024.043-.026.043-.027.042-.029.042-.03.042-.032.042-.033.042-.034.041-.036.041-.037.041-.039.041-.04.041-.041.04-.043.04-.044.04-.045.04-.047.039-.048.039-.05.039-.051.039-.052.038-.053.038-.055.038-.055.038-.058.037-.058.037-.06.037-.06.036-.062.036-.064.036-.064.036-.066.035-.067.035-.068.035-.069.035-.07.034-.071.034-.073.033-.074.033-.15.066-.155.064-.16.063-.163.061-.168.06-.172.059-.175.057-.18.056-.183.054-.187.053-.191.051-.194.05-.198.048-.201.046-.205.045-.208.043-.211.041-.214.04-.217.038-.22.036-.223.034-.225.032-.229.031-.231.028-.233.027-.236.024-.239.023-.241.02-.242.019-.246.016-.247.015-.249.012-.251.01-.253.008-.255.005-.256.004-.258.001-.258-.001-.256-.004-.255-.005-.253-.008-.251-.01-.249-.012-.247-.015-.245-.016-.243-.019-.241-.02-.238-.023-.236-.024-.234-.027-.231-.028-.228-.031-.226-.032-.223-.034-.22-.036-.217-.038-.214-.04-.211-.041-.208-.043-.204-.045-.201-.046-.198-.048-.195-.05-.19-.051-.187-.053-.184-.054-.179-.056-.176-.057-.172-.059-.167-.06-.164-.061-.159-.063-.155-.064-.151-.066-.074-.033-.072-.033-.072-.034-.07-.034-.069-.035-.068-.035-.067-.035-.066-.035-.064-.036-.063-.036-.062-.036-.061-.036-.06-.037-.058-.037-.057-.037-.056-.038-.055-.038-.053-.038-.052-.038-.051-.039-.049-.039-.049-.039-.046-.039-.046-.04-.044-.04-.043-.04-.041-.04-.04-.041-.039-.041-.037-.041-.036-.041-.034-.041-.033-.042-.032-.042-.03-.042-.029-.042-.027-.042-.026-.043-.024-.043-.023-.043-.021-.043-.02-.043-.018-.044-.017-.043-.015-.044-.013-.044-.012-.044-.011-.045-.009-.044-.007-.045-.006-.045-.004-.045-.002-.045-.001-.045v-17l.001-.045.002-.045.004-.045.006-.045.007-.045.009-.044.011-.045.012-.044.013-.044.015-.044.017-.043.018-.044.02-.043.021-.043.023-.043.024-.043.026-.043.027-.042.029-.042.03-.042.032-.042.033-.042.034-.041.036-.041.037-.041.039-.041.04-.041.041-.04.043-.04.044-.04.046-.04.046-.039.049-.039.049-.039.051-.039.052-.038.053-.038.055-.038.056-.038.057-.037.058-.037.06-.037.061-.036.062-.036.063-.036.064-.036.066-.035.067-.035.068-.035.069-.035.07-.034.072-.034.072-.033.074-.033.151-.066.155-.064.159-.063.164-.061.167-.06.172-.059.176-.057.179-.056.184-.054.187-.053.19-.051.195-.05.198-.048.201-.046.204-.045.208-.043.211-.041.214-.04.217-.038.22-.036.223-.034.226-.032.228-.031.231-.028.234-.027.236-.024.238-.023.241-.02.243-.019.245-.016.247-.015.249-.012.251-.01.253-.008.255-.005.256-.004.258-.001.258.001zm-9.258 20.499v.01l.001.021.003.021.004.022.005.021.006.022.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.023.018.024.019.024.021.024.022.025.023.024.024.025.052.049.056.05.061.051.066.051.07.051.075.051.079.052.084.052.088.052.092.052.097.052.102.051.105.052.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.048.144.049.147.047.152.047.155.047.16.045.163.045.167.043.171.043.176.041.178.041.183.039.187.039.19.037.194.035.197.035.202.033.204.031.209.03.212.029.216.027.219.025.222.024.226.021.23.02.233.018.236.016.24.015.243.012.246.01.249.008.253.005.256.004.259.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.021.224-.024.22-.026.216-.027.212-.028.21-.031.205-.031.202-.034.198-.034.194-.036.191-.037.187-.039.183-.04.179-.04.175-.042.172-.043.168-.044.163-.045.16-.046.155-.046.152-.047.148-.048.143-.049.139-.049.136-.05.131-.05.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.053.083-.051.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.05.023-.024.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.023.01-.022.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.127l-.077.055-.08.053-.083.054-.085.053-.087.052-.09.052-.093.051-.095.05-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.045-.118.044-.12.043-.122.042-.124.042-.126.041-.128.04-.13.04-.132.038-.134.038-.135.037-.138.037-.139.035-.142.035-.143.034-.144.033-.147.032-.148.031-.15.03-.151.03-.153.029-.154.027-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.01-.179.008-.179.008-.181.006-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.006-.179-.008-.179-.008-.178-.01-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.027-.153-.029-.151-.03-.15-.03-.148-.031-.146-.032-.145-.033-.143-.034-.141-.035-.14-.035-.137-.037-.136-.037-.134-.038-.132-.038-.13-.04-.128-.04-.126-.041-.124-.042-.122-.042-.12-.044-.117-.043-.116-.045-.113-.045-.112-.046-.109-.047-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.05-.093-.052-.09-.051-.087-.052-.085-.053-.083-.054-.08-.054-.077-.054v4.127zm0-5.654v.011l.001.021.003.021.004.021.005.022.006.022.007.022.009.022.01.022.011.023.012.023.013.023.015.024.016.023.017.024.018.024.019.024.021.024.022.024.023.025.024.024.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.052.11.051.114.051.119.052.123.05.127.051.131.05.135.049.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.044.171.042.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.022.23.02.233.018.236.016.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.012.241-.015.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.048.139-.05.136-.049.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.051.051-.049.023-.025.023-.024.021-.025.02-.024.019-.024.018-.024.017-.024.015-.023.014-.023.013-.024.012-.022.01-.023.01-.023.008-.022.006-.022.006-.022.004-.021.004-.022.001-.021.001-.021v-4.139l-.077.054-.08.054-.083.054-.085.052-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.044-.118.044-.12.044-.122.042-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.035-.143.033-.144.033-.147.033-.148.031-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.009-.179.009-.179.007-.181.007-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.007-.179-.007-.179-.009-.178-.009-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.031-.146-.033-.145-.033-.143-.033-.141-.035-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.04-.126-.041-.124-.042-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.051-.093-.051-.09-.051-.087-.053-.085-.052-.083-.054-.08-.054-.077-.054v4.139zm0-5.666v.011l.001.02.003.022.004.021.005.022.006.021.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.024.018.023.019.024.021.025.022.024.023.024.024.025.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.051.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.043.171.043.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.021.23.02.233.018.236.017.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.013.241-.014.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.049.139-.049.136-.049.131-.051.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.049.023-.025.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.022.01-.023.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.153l-.077.054-.08.054-.083.053-.085.053-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.048-.105.048-.106.048-.109.046-.111.046-.114.046-.115.044-.118.044-.12.043-.122.043-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.034-.143.034-.144.033-.147.032-.148.032-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.024-.161.024-.162.023-.163.023-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.01-.178.01-.179.009-.179.007-.181.006-.182.006-.182.004-.184.003-.184.001-.185.001-.185-.001-.184-.001-.184-.003-.182-.004-.182-.006-.181-.006-.179-.007-.179-.009-.178-.01-.176-.01-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.023-.162-.023-.161-.024-.159-.024-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.032-.146-.032-.145-.033-.143-.034-.141-.034-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.041-.126-.041-.124-.041-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.048-.105-.048-.102-.048-.1-.05-.097-.049-.095-.051-.093-.051-.09-.052-.087-.052-.085-.053-.083-.053-.08-.054-.077-.054v4.153zm8.74-8.179l-.257.004-.254.005-.25.008-.247.011-.244.012-.241.014-.237.016-.233.018-.231.021-.226.022-.224.023-.22.026-.216.027-.212.028-.21.031-.205.032-.202.033-.198.034-.194.036-.191.038-.187.038-.183.04-.179.041-.175.042-.172.043-.168.043-.163.045-.16.046-.155.046-.152.048-.148.048-.143.048-.139.049-.136.05-.131.05-.126.051-.123.051-.118.051-.114.052-.11.052-.106.052-.101.052-.096.052-.092.052-.088.052-.083.052-.079.052-.074.051-.07.052-.065.051-.06.05-.056.05-.051.05-.023.025-.023.024-.021.024-.02.025-.019.024-.018.024-.017.023-.015.024-.014.023-.013.023-.012.023-.01.023-.01.022-.008.022-.006.023-.006.021-.004.022-.004.021-.001.021-.001.021.001.021.001.021.004.021.004.022.006.021.006.023.008.022.01.022.01.023.012.023.013.023.014.023.015.024.017.023.018.024.019.024.02.025.021.024.023.024.023.025.051.05.056.05.06.05.065.051.07.052.074.051.079.052.083.052.088.052.092.052.096.052.101.052.106.052.11.052.114.052.118.051.123.051.126.051.131.05.136.05.139.049.143.048.148.048.152.048.155.046.16.046.163.045.168.043.172.043.175.042.179.041.183.04.187.038.191.038.194.036.198.034.202.033.205.032.21.031.212.028.216.027.22.026.224.023.226.022.231.021.233.018.237.016.241.014.244.012.247.011.25.008.254.005.257.004.26.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.022.224-.023.22-.026.216-.027.212-.028.21-.031.205-.032.202-.033.198-.034.194-.036.191-.038.187-.038.183-.04.179-.041.175-.042.172-.043.168-.043.163-.045.16-.046.155-.046.152-.048.148-.048.143-.048.139-.049.136-.05.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.05.051-.05.023-.025.023-.024.021-.024.02-.025.019-.024.018-.024.017-.023.015-.024.014-.023.013-.023.012-.023.01-.023.01-.022.008-.022.006-.023.006-.021.004-.022.004-.021.001-.021.001-.021-.001-.021-.001-.021-.004-.021-.004-.022-.006-.021-.006-.023-.008-.022-.01-.022-.01-.023-.012-.023-.013-.023-.014-.023-.015-.024-.017-.023-.018-.024-.019-.024-.02-.025-.021-.024-.023-.024-.023-.025-.051-.05-.056-.05-.06-.05-.065-.051-.07-.052-.074-.051-.079-.052-.083-.052-.088-.052-.092-.052-.096-.052-.101-.052-.106-.052-.11-.052-.114-.052-.118-.051-.123-.051-.126-.051-.131-.05-.136-.05-.139-.049-.143-.048-.148-.048-.152-.048-.155-.046-.16-.046-.163-.045-.168-.043-.172-.043-.175-.042-.179-.041-.183-.04-.187-.038-.191-.038-.194-.036-.198-.034-.202-.033-.205-.032-.21-.031-.212-.028-.216-.027-.22-.026-.224-.023-.226-.022-.231-.021-.233-.018-.237-.016-.241-.014-.244-.012-.247-.011-.25-.008-.254-.005-.257-.004-.26-.001-.26.001z")},"insertDatabaseIcon"),Crt=x(function(t){t.append("defs").append("symbol").attr("id","computer").attr("width","24").attr("height","24").append("path").attr("transform","scale(.5)").attr("d","M2 2v13h20v-13h-20zm18 11h-16v-9h16v9zm-10.228 6l.466-1h3.524l.467 1h-4.457zm14.228 3h-24l2-6h2.104l-1.33 4h18.45l-1.297-4h2.073l2 6zm-5-10h-14v-7h14v7z")},"insertComputerIcon"),Srt=x(function(t){t.append("defs").append("symbol").attr("id","clock").attr("width","24").attr("height","24").append("path").attr("transform","scale(.5)").attr("d","M12 2c5.514 0 10 4.486 10 10s-4.486 10-10 10-10-4.486-10-10 4.486-10 10-10zm0-2c-6.627 0-12 5.373-12 12s5.373 12 12 12 12-5.373 12-12-5.373-12-12-12zm5.848 12.459c.202.038.202.333.001.372-1.907.361-6.045 1.111-6.547 1.111-.719 0-1.301-.582-1.301-1.301 0-.512.77-5.447 1.125-7.445.034-.192.312-.181.343.014l.985 6.238 5.394 1.011z")},"insertClockIcon"),_rt=x(function(t){t.append("defs").append("marker").attr("id","arrowhead").attr("refX",9).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z")},"insertArrowHead"),Art=x(function(t){t.append("defs").append("marker").attr("id","arrowend").attr("refX",1).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 10 0 L 0 5 L 10 10 z")},"insertArrowEnd"),Lrt=x(function(t){t.append("defs").append("marker").attr("id","filled-head").attr("refX",18).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},"insertArrowFilledHead"),Rrt=x(function(t){t.append("defs").append("marker").attr("id","sequencenumber").attr("refX",15).attr("refY",15).attr("markerWidth",60).attr("markerHeight",40).attr("orient","auto").append("circle").attr("cx",15).attr("cy",15).attr("r",6)},"insertDynamicNumber"),Irt=x(function(t){let r=t.append("defs").append("marker").attr("id","crosshead").attr("markerWidth",15).attr("markerHeight",8).attr("orient","auto").attr("refX",16).attr("refY",4);r.append("path").attr("fill","black").attr("stroke","#000000").style("stroke-dasharray","0, 0").attr("stroke-width","1px").attr("d","M 9,2 V 6 L16,4 Z"),r.append("path").attr("fill","none").attr("stroke","#000000").style("stroke-dasharray","0, 0").attr("stroke-width","1px").attr("d","M 0,1 L 6,7 M 6,1 L 0,7")},"insertArrowCrossHead"),Drt=x((t,e)=>({fontFamily:t[e+"FontFamily"],fontSize:t[e+"FontSize"],fontWeight:t[e+"FontWeight"]}),"getC4ShapeFont"),Wh=(function(){function t(a,i,s,o,l,u,h){let f=i.append("text").attr("x",s+l/2).attr("y",o+u/2+5).style("text-anchor","middle").text(a);n(f,h)}x(t,"byText");function e(a,i,s,o,l,u,h,f){let{fontSize:d,fontFamily:p,fontWeight:m}=f,g=a.split(Ze.lineBreakRegex);for(let v=0;v=this.data.widthLimit||n>=this.data.widthLimit||this.nextData.cnt>Xme)&&(r=this.nextData.startx+e.margin+$t.nextLinePaddingX,a=this.nextData.stopy+e.margin*2,this.nextData.stopx=n=r+e.width,this.nextData.starty=this.nextData.stopy,this.nextData.stopy=i=a+e.height,this.nextData.cnt=1),e.x=r,e.y=a,this.updateVal(this.data,"startx",r,Math.min),this.updateVal(this.data,"starty",a,Math.min),this.updateVal(this.data,"stopx",n,Math.max),this.updateVal(this.data,"stopy",i,Math.max),this.updateVal(this.nextData,"startx",r,Math.min),this.updateVal(this.nextData,"starty",a,Math.min),this.updateVal(this.nextData,"stopx",n,Math.max),this.updateVal(this.nextData,"stopy",i,Math.max)}init(e){this.name="",this.data={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0,widthLimit:void 0},this.nextData={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0,cnt:0},YB(e.db.getConfig())}bumpLastMargin(e){this.data.stopx+=e,this.data.stopy+=e}},x(cv,"Bounds"),cv),YB=x(function(t){ra($t,t),t.fontFamily&&($t.personFontFamily=$t.systemFontFamily=$t.messageFontFamily=t.fontFamily),t.fontSize&&($t.personFontSize=$t.systemFontSize=$t.messageFontSize=t.fontSize),t.fontWeight&&($t.personFontWeight=$t.systemFontWeight=$t.messageFontWeight=t.fontWeight)},"setConf"),B3=x((t,e)=>({fontFamily:t[e+"FontFamily"],fontSize:t[e+"FontSize"],fontWeight:t[e+"FontWeight"]}),"c4ShapeFont"),d_=x(t=>({fontFamily:t.boundaryFontFamily,fontSize:t.boundaryFontSize,fontWeight:t.boundaryFontWeight}),"boundaryFont"),Nrt=x(t=>({fontFamily:t.messageFontFamily,fontSize:t.messageFontSize,fontWeight:t.messageFontWeight}),"messageFont");x(xl,"calcC4ShapeTextWH");Kme=x(function(t,e,r){e.x=r.data.startx,e.y=r.data.starty,e.width=r.data.stopx-r.data.startx,e.height=r.data.stopy-r.data.starty,e.label.y=$t.c4ShapeMargin-35;let n=e.wrap&&$t.wrap,a=d_($t);a.fontSize=a.fontSize+2,a.fontWeight="bold";let i=Bi(e.label.text,a);xl("label",e,n,a,i),vc.drawBoundary(t,e,$t)},"drawBoundary"),Zme=x(function(t,e,r,n){let a=0;for(let i of n){a=0;let s=r[i],o=B3($t,s.typeC4Shape.text);switch(o.fontSize=o.fontSize-2,s.typeC4Shape.width=Bi("\xAB"+s.typeC4Shape.text+"\xBB",o),s.typeC4Shape.height=o.fontSize+2,s.typeC4Shape.Y=$t.c4ShapePadding,a=s.typeC4Shape.Y+s.typeC4Shape.height-4,s.image={width:0,height:0,Y:0},s.typeC4Shape.text){case"person":case"external_person":s.image.width=48,s.image.height=48,s.image.Y=a,a=s.image.Y+s.image.height;break}s.sprite&&(s.image.width=48,s.image.height=48,s.image.Y=a,a=s.image.Y+s.image.height);let l=s.wrap&&$t.wrap,u=$t.width-$t.c4ShapePadding*2,h=B3($t,s.typeC4Shape.text);if(h.fontSize=h.fontSize+2,h.fontWeight="bold",xl("label",s,l,h,u),s.label.Y=a+8,a=s.label.Y+s.label.height,s.type&&s.type.text!==""){s.type.text="["+s.type.text+"]";let p=B3($t,s.typeC4Shape.text);xl("type",s,l,p,u),s.type.Y=a+5,a=s.type.Y+s.type.height}else if(s.techn&&s.techn.text!==""){s.techn.text="["+s.techn.text+"]";let p=B3($t,s.techn.text);xl("techn",s,l,p,u),s.techn.Y=a+5,a=s.techn.Y+s.techn.height}let f=a,d=s.label.width;if(s.descr&&s.descr.text!==""){let p=B3($t,s.typeC4Shape.text);xl("descr",s,l,p,u),s.descr.Y=a+20,a=s.descr.Y+s.descr.height,d=Math.max(s.label.width,s.descr.width),f=a-s.descr.textLines*5}d=d+$t.c4ShapePadding,s.width=Math.max(s.width||$t.width,d,$t.width),s.height=Math.max(s.height||$t.height,f,$t.height),s.margin=s.margin||$t.c4ShapeMargin,t.insert(s),vc.drawC4Shape(e,s,$t)}t.bumpLastMargin($t.c4ShapeMargin)},"drawC4ShapeArray"),yl=(hv=class{constructor(e,r){this.x=e,this.y=r}},x(hv,"Point"),hv),Gme=x(function(t,e){let r=t.x,n=t.y,a=e.x,i=e.y,s=r+t.width/2,o=n+t.height/2,l=Math.abs(r-a),u=Math.abs(n-i),h=u/l,f=t.height/t.width,d=null;return n==i&&ra?d=new yl(r,o):r==a&&ni&&(d=new yl(s,n)),r>a&&n=h?d=new yl(r,o+h*t.width/2):d=new yl(s-l/u*t.height/2,n+t.height):r=h?d=new yl(r+t.width,o+h*t.width/2):d=new yl(s+l/u*t.height/2,n+t.height):ri?f>=h?d=new yl(r+t.width,o-h*t.width/2):d=new yl(s+t.height/2*l/u,n):r>a&&n>i&&(f>=h?d=new yl(r,o-t.width/2*h):d=new yl(s-t.height/2*l/u,n)),d},"getIntersectPoint"),Mrt=x(function(t,e){let r={x:0,y:0};r.x=e.x+e.width/2,r.y=e.y+e.height/2;let n=Gme(t,r);r.x=t.x+t.width/2,r.y=t.y+t.height/2;let a=Gme(e,r);return{startPoint:n,endPoint:a}},"getIntersectPoints"),Ort=x(function(t,e,r,n){let a=0;for(let i of e){a=a+1;let s=i.wrap&&$t.wrap,o=Nrt($t);n.db.getC4Type()==="C4Dynamic"&&(i.label.text=a+": "+i.label.text);let u=Bi(i.label.text,o);xl("label",i,s,o,u),i.techn&&i.techn.text!==""&&(u=Bi(i.techn.text,o),xl("techn",i,s,o,u)),i.descr&&i.descr.text!==""&&(u=Bi(i.descr.text,o),xl("descr",i,s,o,u));let h=r(i.from),f=r(i.to),d=Mrt(h,f);i.startPoint=d.startPoint,i.endPoint=d.endPoint}vc.drawRels(t,e,$t)},"drawRels");x(ZB,"drawInsideBoundary");Prt=x(function(t,e,r,n){$t=Te().c4;let a=Te().securityLevel,i;a==="sandbox"&&(i=We("#i"+e));let s=a==="sandbox"?We(i.nodes()[0].contentDocument.body):We("body"),o=n.db;n.db.setWrap($t.wrap),Xme=o.getC4ShapeInRow(),WB=o.getC4BoundaryInRow(),te.debug(`C:${JSON.stringify($t,null,2)}`);let l=a==="sandbox"?s.select(`[id="${e}"]`):We(`[id="${e}"]`);vc.insertComputerIcon(l),vc.insertDatabaseIcon(l),vc.insertClockIcon(l);let u=new jme(n);u.setData($t.diagramMarginX,$t.diagramMarginX,$t.diagramMarginY,$t.diagramMarginY),u.data.widthLimit=screen.availWidth,v_=$t.diagramMarginX,y_=$t.diagramMarginY;let h=n.db.getTitle(),f=n.db.getBoundarys("");ZB(l,"",u,f,n),vc.insertArrowHead(l),vc.insertArrowEnd(l),vc.insertArrowCrossHead(l),vc.insertArrowFilledHead(l),Ort(l,n.db.getRels(),n.db.getC4Shape,n),u.data.stopx=v_,u.data.stopy=y_;let d=u.data,m=d.stopy-d.starty+2*$t.diagramMarginY,v=d.stopx-d.startx+2*$t.diagramMarginX;h&&l.append("text").text(h).attr("x",(d.stopx-d.startx)/2-4*$t.diagramMarginX).attr("y",d.starty+$t.diagramMarginY),gn(l,m,v,$t.useMaxWidth);let y=h?60:0;l.attr("viewBox",d.startx-$t.diagramMarginX+" -"+($t.diagramMarginY+y)+" "+v+" "+(m+y)),te.debug("models:",d)},"draw"),Ume={drawPersonOrSystemArray:Zme,drawBoundary:Kme,setConf:YB,draw:Prt},Brt=x(t=>`.person { + data=`,v.height,` +Parent cluster`,i.height),e.setNode(i.id,v),e.parent(g)||(he.trace("Setting parent",g,i.id),e.setParent(g,i.id,v))}if(he.info("(Insert) Node XXX"+g+": "+JSON.stringify(e.node(g))),y?.clusterNode){he.info("Cluster identified XBX",g,y.width,e.node(g));let{ranksep:v,nodesep:x}=e.graph();y.graph.setGraph({...y.graph.graph(),ranksep:v+25,nodesep:x});let k=await q2e(f,y.graph,r,n,e.node(g),a),_=k.elem;ur(y,_),y.diff=k.diff||0,he.info("New compound node after recursive render XAX",g,"width",y.width,"height",y.height),bde(_,y)}else e.children(g).length>0?(he.trace("Cluster - the non recursive path XBX",g,y.id,y,y.width,"Graph:",e),he.trace(K5(y.id,e)),qr.set(y.id,{id:K5(y.id,e),node:y})):(he.trace("Node - the non recursive path XAX",g,f,e.node(g),s),await nm(f,e.node(g),{config:a,dir:s}))})),await b(async()=>{let g=e.edges().map(async function(y){let v=e.edge(y.v,y.w,y.name);he.info("Edge "+y.v+" -> "+y.w+": "+JSON.stringify(y)),he.info("Edge "+y.v+" -> "+y.w+": ",y," ",JSON.stringify(e.edge(y))),he.info("Fix",qr,"ids:",y.v,y.w,"Translating: ",qr.get(y.v),qr.get(y.w)),await PE(h,v)});await Promise.all(g)},"processEdges")(),he.info("Graph before layout:",JSON.stringify(du(e))),he.info("############################################# XXX"),he.info("### Layout ### XXX"),he.info("############################################# XXX"),j5(e),he.info("Graph after layout:",JSON.stringify(du(e)));let p=0,{subGraphTitleTotalMargin:m}=Ch(a);return await Promise.all(vst(e).map(async function(g){let y=e.node(g);if(he.info("Position XBX => "+g+": ("+y.x,","+y.y,") width: ",y.width," height: ",y.height),y?.clusterNode)y.y+=m,he.info("A tainted cluster node XBX1",g,y.id,y.width,y.height,y.x,y.y,e.parent(g)),qr.get(y.id).node=y,O5(y);else if(e.children(g).length>0){he.info("A pure cluster node XBX1",g,y.id,y.x,y.y,y.width,y.height,e.parent(g)),y.height+=m,e.node(y.parentId);let v=y?.padding/2||0,x=y?.labelBBox?.height||0,k=x-v||0;he.debug("OffsetY",k,"labelHeight",x,"halfPadding",v),await sy(l,y),qr.get(y.id).node=y}else{let v=e.node(y.parentId);y.y+=m/2,he.info("A regular node XBX1 - using the padding",y.id,"parent",y.parentId,y.width,y.height,y.x,y.y,"offsetY",y.offsetY,"parent",v,v?.offsetY,y),O5(y)}})),e.edges().forEach(function(g){let y=e.edge(g);he.info("Edge "+g.v+" -> "+g.w+": "+JSON.stringify(y),y),y.points.forEach(_=>_.y+=m/2);let v=e.node(g.v);var x=e.node(g.w);let k=FE(u,y,qr,r,v,x,n);BE(y,k)}),e.nodes().forEach(function(g){let y=e.node(g);he.info(g,y.type,y.diff),y.isGroup&&(p=y.diff)}),he.warn("Returning from recursive render XAX",o,p),{elem:o,diff:p}},"recursiveRender"),xst=b(async(t,e)=>{let r=new In({multigraph:!0,compound:!0}).setGraph({rankdir:t.direction,nodesep:t.config?.nodeSpacing||t.config?.flowchart?.nodeSpacing||t.nodeSpacing,ranksep:t.config?.rankSpacing||t.config?.flowchart?.rankSpacing||t.rankSpacing,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}}),n=e.select("g");zE(n,t.markers,t.type,t.diagramId),wde(),Sde(),afe(),pst(),t.nodes.forEach(a=>{r.setNode(a.id,{...a}),a.parentId&&r.setParent(a.id,a.parentId)}),he.debug("Edges:",t.edges),t.edges.forEach(a=>{if(a.start===a.end){let s=a.start,o=s+"---"+s+"---1",l=s+"---"+s+"---2",u=r.node(s);r.setNode(o,{domId:o,id:o,parentId:u.parentId,labelStyle:"",label:"",padding:0,shape:"labelRect",style:"",width:10,height:10}),r.setParent(o,u.parentId),r.setNode(l,{domId:l,id:l,parentId:u.parentId,labelStyle:"",padding:0,shape:"labelRect",label:"",style:"",width:10,height:10}),r.setParent(l,u.parentId);let h=structuredClone(a),f=structuredClone(a),d=structuredClone(a);h.label="",h.arrowTypeEnd="none",h.id=s+"-cyclic-special-1",f.arrowTypeStart="none",f.arrowTypeEnd="none",f.id=s+"-cyclic-special-mid",d.label="",u.isGroup&&(h.fromCluster=s,d.toCluster=s),d.id=s+"-cyclic-special-2",d.arrowTypeStart="none",r.setEdge(s,o,h,s+"-cyclic-special-0"),r.setEdge(o,l,f,s+"-cyclic-special-1"),r.setEdge(l,s,d,s+"-cyc{nc();Il();Hn();Nr();bst={common:St,getConfig:Yr,insertCluster:sy,insertEdge:FE,insertEdgeLabel:PE,insertMarkers:zE,insertNode:nm,interpolateToCurve:cE,labelHelper:_r,log:he,positionEdgeLabel:BE},Z5={},Jz=b(t=>{for(let e of t)Z5[e.name]=e},"registerLayoutLoaders"),wst=b(()=>{Jz([{name:"dagre",loader:b(async()=>await Promise.resolve().then(()=>(H2e(),U2e)),"loader")}])},"registerDefaultLayoutLoaders");wst();y0=b(async(t,e)=>{if(!(t.layoutAlgorithm in Z5))throw new Error(`Unknown layout algorithm: ${t.layoutAlgorithm}`);let r=Z5[t.layoutAlgorithm];return(await r.loader()).render(t,e,bst,{algorithm:r.algorithm})},"render"),Fd=b((t="",{fallback:e="dagre"}={})=>{if(t in Z5)return t;if(e in Z5)return he.warn(`Layout algorithm ${t} is not registered. Using ${e} as fallback.`),e;throw new Error(`Both layout algorithms ${t} and ${e} are not registered.`)},"getRegisteredLayoutAlgorithm")});var Q5,e$=D(()=>{Q5={name:"mermaid",version:"11.6.0",description:"Markdown-ish syntax for generating flowcharts, mindmaps, sequence diagrams, class diagrams, gantt charts, git graphs and more.",type:"module",module:"./dist/mermaid.core.mjs",types:"./dist/mermaid.d.ts",exports:{".":{types:"./dist/mermaid.d.ts",import:"./dist/mermaid.core.mjs",default:"./dist/mermaid.core.mjs"},"./*":"./*"},keywords:["diagram","markdown","flowchart","sequence diagram","gantt","class diagram","git graph","mindmap","packet diagram","c4 diagram","er diagram","pie chart","pie diagram","quadrant chart","requirement diagram","graph"],scripts:{clean:"rimraf dist",dev:"pnpm -w dev","docs:code":"typedoc src/defaultConfig.ts src/config.ts src/mermaid.ts && prettier --write ./src/docs/config/setup","docs:build":"rimraf ../../docs && pnpm docs:code && pnpm docs:spellcheck && tsx scripts/docs.cli.mts","docs:verify":"pnpm docs:code && pnpm docs:spellcheck && tsx scripts/docs.cli.mts --verify","docs:pre:vitepress":"pnpm --filter ./src/docs prefetch && rimraf src/vitepress && pnpm docs:code && tsx scripts/docs.cli.mts --vitepress && pnpm --filter ./src/vitepress install --no-frozen-lockfile --ignore-scripts","docs:build:vitepress":"pnpm docs:pre:vitepress && (cd src/vitepress && pnpm run build) && cpy --flat src/docs/landing/ ./src/vitepress/.vitepress/dist/landing","docs:dev":'pnpm docs:pre:vitepress && concurrently "pnpm --filter ./src/vitepress dev" "tsx scripts/docs.cli.mts --watch --vitepress"',"docs:dev:docker":'pnpm docs:pre:vitepress && concurrently "pnpm --filter ./src/vitepress dev:docker" "tsx scripts/docs.cli.mts --watch --vitepress"',"docs:serve":"pnpm docs:build:vitepress && vitepress serve src/vitepress","docs:spellcheck":'cspell "src/docs/**/*.md"',"docs:release-version":"tsx scripts/update-release-version.mts","docs:verify-version":"tsx scripts/update-release-version.mts --verify","types:build-config":"tsx scripts/create-types-from-json-schema.mts","types:verify-config":"tsx scripts/create-types-from-json-schema.mts --verify",checkCircle:"npx madge --circular ./src",prepublishOnly:"pnpm docs:verify-version"},repository:{type:"git",url:"https://github.com/mermaid-js/mermaid"},author:"Knut Sveidqvist",license:"MIT",standard:{ignore:["**/parser/*.js","dist/**/*.js","cypress/**/*.js"],globals:["page"]},dependencies:{"@braintree/sanitize-url":"^7.0.4","@iconify/utils":"^2.1.33","@mermaid-js/parser":"workspace:^","@types/d3":"^7.4.3",cytoscape:"^3.29.3","cytoscape-cose-bilkent":"^4.1.0","cytoscape-fcose":"^2.2.0",d3:"^7.9.0","d3-sankey":"^0.12.3","dagre-d3-es":"7.0.11",dayjs:"^1.11.13",dompurify:"^3.2.4",katex:"^0.16.9",khroma:"^2.1.0","lodash-es":"^4.17.21",marked:"^15.0.7",roughjs:"^4.6.6",stylis:"^4.3.6","ts-dedent":"^2.2.0",uuid:"^11.1.0"},devDependencies:{"@adobe/jsonschema2md":"^8.0.2","@iconify/types":"^2.0.0","@types/cytoscape":"^3.21.9","@types/cytoscape-fcose":"^2.2.4","@types/d3-sankey":"^0.12.4","@types/d3-scale":"^4.0.9","@types/d3-scale-chromatic":"^3.1.0","@types/d3-selection":"^3.0.11","@types/d3-shape":"^3.1.7","@types/jsdom":"^21.1.7","@types/katex":"^0.16.7","@types/lodash-es":"^4.17.12","@types/micromatch":"^4.0.9","@types/stylis":"^4.2.7","@types/uuid":"^10.0.0",ajv:"^8.17.1",chokidar:"^4.0.3",concurrently:"^9.1.2","csstree-validator":"^4.0.1",globby:"^14.0.2",jison:"^0.4.18","js-base64":"^3.7.7",jsdom:"^26.0.0","json-schema-to-typescript":"^15.0.4",micromatch:"^4.0.8","path-browserify":"^1.0.1",prettier:"^3.5.2",remark:"^15.0.1","remark-frontmatter":"^5.0.0","remark-gfm":"^4.0.1",rimraf:"^6.0.1","start-server-and-test":"^2.0.10","type-fest":"^4.35.0",typedoc:"^0.27.8","typedoc-plugin-markdown":"^4.4.2",typescript:"~5.7.3","unist-util-flatmap":"^1.0.0","unist-util-visit":"^5.0.0",vitepress:"^1.0.2","vitepress-plugin-search":"1.0.4-alpha.22"},files:["dist/","README.md"],publishConfig:{access:"public"}}});var cs,v0=D(()=>{Nr();Or();cs=b(t=>{let{securityLevel:e}=Fe(),r=dt("body");if(e==="sandbox"){let a=dt(`#i${t}`).node()?.contentDocument??document;r=dt(a.body)}return r.select(`#${t}`)},"selectSvgElement")});var r$,mm,HS,cye,hye,fye,x0,VS,WS=D(()=>{Nr();r$=Na(b2(),1),mm=b((t,e)=>{let r=t.append("rect");if(r.attr("x",e.x),r.attr("y",e.y),r.attr("fill",e.fill),r.attr("stroke",e.stroke),r.attr("width",e.width),r.attr("height",e.height),e.name&&r.attr("name",e.name),e.rx&&r.attr("rx",e.rx),e.ry&&r.attr("ry",e.ry),e.attrs!==void 0)for(let n in e.attrs)r.attr(n,e.attrs[n]);return e.class&&r.attr("class",e.class),r},"drawRect"),HS=b((t,e)=>{let r={x:e.startx,y:e.starty,width:e.stopx-e.startx,height:e.stopy-e.starty,fill:e.fill,stroke:e.stroke,class:"rect"};mm(t,r).lower()},"drawBackgroundRect"),cye=b((t,e)=>{let r=e.text.replace(S1," "),n=t.append("text");n.attr("x",e.x),n.attr("y",e.y),n.attr("class","legend"),n.style("text-anchor",e.anchor),e.class&&n.attr("class",e.class);let i=n.append("tspan");return i.attr("x",e.x+e.textMargin*2),i.text(r),n},"drawText"),hye=b((t,e,r,n)=>{let i=t.append("image");i.attr("x",e),i.attr("y",r);let a=(0,r$.sanitizeUrl)(n);i.attr("xlink:href",a)},"drawImage"),fye=b((t,e,r,n)=>{let i=t.append("use");i.attr("x",e),i.attr("y",r);let a=(0,r$.sanitizeUrl)(n);i.attr("xlink:href",`#${a}`)},"drawEmbeddedImage"),x0=b(()=>({x:0,y:0,width:100,height:100,fill:"#EDF2AE",stroke:"#666",anchor:"start",rx:0,ry:0}),"getNoteRect"),VS=b(()=>({x:0,y:0,width:100,height:100,"text-anchor":"start",style:"#666",textMargin:0,rx:0,ry:0,tspan:!0}),"getTextObj")});var Eye={};Mr(Eye,{diagram:()=>got});function yu(t,e,r,n,i){if(!e[t].width)if(r)e[t].text=eF(e[t].text,i,n),e[t].textLines=e[t].text.split(St.lineBreakRegex).length,e[t].width=i,e[t].height=E5(e[t].text,n);else{let a=e[t].text.split(St.lineBreakRegex);e[t].textLines=a.length;let s=0;e[t].height=0,e[t].width=0;for(let o of a)e[t].width=Math.max(_s(o,n),e[t].width),s=E5(o,n),e[t].height=e[t].height+s}}function u$(t,e,r,n,i){let a=new wye(i);a.data.widthLimit=r.data.widthLimit/Math.min(i$,n.length);for(let[s,o]of n.entries()){let l=0;o.image={width:0,height:0,Y:0},o.sprite&&(o.image.width=48,o.image.height=48,o.image.Y=l,l=o.image.Y+o.image.height);let u=o.wrap&&hr.wrap,h=YS(hr);if(h.fontSize=h.fontSize+2,h.fontWeight="bold",yu("label",o,u,h,a.data.widthLimit),o.label.Y=l+8,l=o.label.Y+o.label.height,o.type&&o.type.text!==""){o.type.text="["+o.type.text+"]";let m=YS(hr);yu("type",o,u,m,a.data.widthLimit),o.type.Y=l+5,l=o.type.Y+o.type.height}if(o.descr&&o.descr.text!==""){let m=YS(hr);m.fontSize=m.fontSize-2,yu("descr",o,u,m,a.data.widthLimit),o.descr.Y=l+20,l=o.descr.Y+o.descr.height}if(s==0||s%i$===0){let m=r.data.startx+hr.diagramMarginX,g=r.data.stopy+hr.diagramMarginY+l;a.setData(m,m,g,g)}else{let m=a.data.stopx!==a.data.startx?a.data.stopx+hr.diagramMarginX:a.data.startx,g=a.data.starty;a.setData(m,m,g,g)}a.name=o.alias;let f=i.db.getC4ShapeArray(o.alias),d=i.db.getC4ShapeKeys(o.alias);d.length>0&&Tye(a,t,f,d),e=o.alias;let p=i.db.getBoundarys(e);p.length>0&&u$(t,e,a,p,i),o.alias!=="global"&&kye(t,o,a),r.data.stopy=Math.max(a.data.stopy+hr.c4ShapeMargin,r.data.stopy),r.data.stopx=Math.max(a.data.stopx+hr.c4ShapeMargin,r.data.stopx),ZS=Math.max(ZS,r.data.stopx),QS=Math.max(QS,r.data.stopy)}}var vye,XS,Tst,oc,Gd,yo,sc,w0,t6,s$,o$,jS,KS,mye,Est,Sst,Cst,_st,Ast,Lst,Rst,Dst,Ist,Mst,Nst,Ost,Pst,Bst,Fst,zst,$st,gye,Gst,qst,yye,Ust,Hst,Vst,Wst,qd,Yst,Xst,jst,Kst,Zst,n$,l$,xye,Qst,Jst,eot,tot,rot,not,iot,aot,sot,oot,lot,uot,Zh,b0,ZS,QS,bye,i$,hr,Ty,wye,a$,e6,YS,cot,kye,Tye,Ey,gu,dye,hot,fot,dot,pye,pot,mot,got,Sye=D(()=>{WS();Hn();Nr();Or();vye=Na(b2(),1),XS=(function(){var t=b(function(rt,Xe,Ze,Pe){for(Ze=Ze||{},Pe=rt.length;Pe--;Ze[rt[Pe]]=Xe);return Ze},"o"),e=[1,24],r=[1,25],n=[1,26],i=[1,27],a=[1,28],s=[1,63],o=[1,64],l=[1,65],u=[1,66],h=[1,67],f=[1,68],d=[1,69],p=[1,29],m=[1,30],g=[1,31],y=[1,32],v=[1,33],x=[1,34],k=[1,35],_=[1,36],T=[1,37],S=[1,38],R=[1,39],A=[1,40],I=[1,41],P=[1,42],O=[1,43],C=[1,44],N=[1,45],B=[1,46],F=[1,47],M=[1,48],$=[1,50],z=[1,51],q=[1,52],V=[1,53],U=[1,54],J=[1,55],se=[1,56],re=[1,57],me=[1,58],ge=[1,59],ye=[1,60],_e=[14,42],ue=[14,34,36,37,38,39,40,41,42,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],ie=[12,14,34,36,37,38,39,40,41,42,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],le=[1,82],oe=[1,83],ne=[1,84],pe=[1,85],te=[12,14,42],He=[12,14,33,42],de=[12,14,33,42,76,77,79,80],ce=[12,33],st=[34,36,37,38,39,40,41,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],Ae={trace:b(function(){},"trace"),yy:{},symbols_:{error:2,start:3,mermaidDoc:4,direction:5,direction_tb:6,direction_bt:7,direction_rl:8,direction_lr:9,graphConfig:10,C4_CONTEXT:11,NEWLINE:12,statements:13,EOF:14,C4_CONTAINER:15,C4_COMPONENT:16,C4_DYNAMIC:17,C4_DEPLOYMENT:18,otherStatements:19,diagramStatements:20,otherStatement:21,title:22,accDescription:23,acc_title:24,acc_title_value:25,acc_descr:26,acc_descr_value:27,acc_descr_multiline_value:28,boundaryStatement:29,boundaryStartStatement:30,boundaryStopStatement:31,boundaryStart:32,LBRACE:33,ENTERPRISE_BOUNDARY:34,attributes:35,SYSTEM_BOUNDARY:36,BOUNDARY:37,CONTAINER_BOUNDARY:38,NODE:39,NODE_L:40,NODE_R:41,RBRACE:42,diagramStatement:43,PERSON:44,PERSON_EXT:45,SYSTEM:46,SYSTEM_DB:47,SYSTEM_QUEUE:48,SYSTEM_EXT:49,SYSTEM_EXT_DB:50,SYSTEM_EXT_QUEUE:51,CONTAINER:52,CONTAINER_DB:53,CONTAINER_QUEUE:54,CONTAINER_EXT:55,CONTAINER_EXT_DB:56,CONTAINER_EXT_QUEUE:57,COMPONENT:58,COMPONENT_DB:59,COMPONENT_QUEUE:60,COMPONENT_EXT:61,COMPONENT_EXT_DB:62,COMPONENT_EXT_QUEUE:63,REL:64,BIREL:65,REL_U:66,REL_D:67,REL_L:68,REL_R:69,REL_B:70,REL_INDEX:71,UPDATE_EL_STYLE:72,UPDATE_REL_STYLE:73,UPDATE_LAYOUT_CONFIG:74,attribute:75,STR:76,STR_KEY:77,STR_VALUE:78,ATTRIBUTE:79,ATTRIBUTE_EMPTY:80,$accept:0,$end:1},terminals_:{2:"error",6:"direction_tb",7:"direction_bt",8:"direction_rl",9:"direction_lr",11:"C4_CONTEXT",12:"NEWLINE",14:"EOF",15:"C4_CONTAINER",16:"C4_COMPONENT",17:"C4_DYNAMIC",18:"C4_DEPLOYMENT",22:"title",23:"accDescription",24:"acc_title",25:"acc_title_value",26:"acc_descr",27:"acc_descr_value",28:"acc_descr_multiline_value",33:"LBRACE",34:"ENTERPRISE_BOUNDARY",36:"SYSTEM_BOUNDARY",37:"BOUNDARY",38:"CONTAINER_BOUNDARY",39:"NODE",40:"NODE_L",41:"NODE_R",42:"RBRACE",44:"PERSON",45:"PERSON_EXT",46:"SYSTEM",47:"SYSTEM_DB",48:"SYSTEM_QUEUE",49:"SYSTEM_EXT",50:"SYSTEM_EXT_DB",51:"SYSTEM_EXT_QUEUE",52:"CONTAINER",53:"CONTAINER_DB",54:"CONTAINER_QUEUE",55:"CONTAINER_EXT",56:"CONTAINER_EXT_DB",57:"CONTAINER_EXT_QUEUE",58:"COMPONENT",59:"COMPONENT_DB",60:"COMPONENT_QUEUE",61:"COMPONENT_EXT",62:"COMPONENT_EXT_DB",63:"COMPONENT_EXT_QUEUE",64:"REL",65:"BIREL",66:"REL_U",67:"REL_D",68:"REL_L",69:"REL_R",70:"REL_B",71:"REL_INDEX",72:"UPDATE_EL_STYLE",73:"UPDATE_REL_STYLE",74:"UPDATE_LAYOUT_CONFIG",76:"STR",77:"STR_KEY",78:"STR_VALUE",79:"ATTRIBUTE",80:"ATTRIBUTE_EMPTY"},productions_:[0,[3,1],[3,1],[5,1],[5,1],[5,1],[5,1],[4,1],[10,4],[10,4],[10,4],[10,4],[10,4],[13,1],[13,1],[13,2],[19,1],[19,2],[19,3],[21,1],[21,1],[21,2],[21,2],[21,1],[29,3],[30,3],[30,3],[30,4],[32,2],[32,2],[32,2],[32,2],[32,2],[32,2],[32,2],[31,1],[20,1],[20,2],[20,3],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,1],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[35,1],[35,2],[75,1],[75,2],[75,1],[75,1]],performAction:b(function(Xe,Ze,Pe,Re,Ve,ke,xe){var H=ke.length-1;switch(Ve){case 3:Re.setDirection("TB");break;case 4:Re.setDirection("BT");break;case 5:Re.setDirection("RL");break;case 6:Re.setDirection("LR");break;case 8:case 9:case 10:case 11:case 12:Re.setC4Type(ke[H-3]);break;case 19:Re.setTitle(ke[H].substring(6)),this.$=ke[H].substring(6);break;case 20:Re.setAccDescription(ke[H].substring(15)),this.$=ke[H].substring(15);break;case 21:this.$=ke[H].trim(),Re.setTitle(this.$);break;case 22:case 23:this.$=ke[H].trim(),Re.setAccDescription(this.$);break;case 28:ke[H].splice(2,0,"ENTERPRISE"),Re.addPersonOrSystemBoundary(...ke[H]),this.$=ke[H];break;case 29:ke[H].splice(2,0,"SYSTEM"),Re.addPersonOrSystemBoundary(...ke[H]),this.$=ke[H];break;case 30:Re.addPersonOrSystemBoundary(...ke[H]),this.$=ke[H];break;case 31:ke[H].splice(2,0,"CONTAINER"),Re.addContainerBoundary(...ke[H]),this.$=ke[H];break;case 32:Re.addDeploymentNode("node",...ke[H]),this.$=ke[H];break;case 33:Re.addDeploymentNode("nodeL",...ke[H]),this.$=ke[H];break;case 34:Re.addDeploymentNode("nodeR",...ke[H]),this.$=ke[H];break;case 35:Re.popBoundaryParseStack();break;case 39:Re.addPersonOrSystem("person",...ke[H]),this.$=ke[H];break;case 40:Re.addPersonOrSystem("external_person",...ke[H]),this.$=ke[H];break;case 41:Re.addPersonOrSystem("system",...ke[H]),this.$=ke[H];break;case 42:Re.addPersonOrSystem("system_db",...ke[H]),this.$=ke[H];break;case 43:Re.addPersonOrSystem("system_queue",...ke[H]),this.$=ke[H];break;case 44:Re.addPersonOrSystem("external_system",...ke[H]),this.$=ke[H];break;case 45:Re.addPersonOrSystem("external_system_db",...ke[H]),this.$=ke[H];break;case 46:Re.addPersonOrSystem("external_system_queue",...ke[H]),this.$=ke[H];break;case 47:Re.addContainer("container",...ke[H]),this.$=ke[H];break;case 48:Re.addContainer("container_db",...ke[H]),this.$=ke[H];break;case 49:Re.addContainer("container_queue",...ke[H]),this.$=ke[H];break;case 50:Re.addContainer("external_container",...ke[H]),this.$=ke[H];break;case 51:Re.addContainer("external_container_db",...ke[H]),this.$=ke[H];break;case 52:Re.addContainer("external_container_queue",...ke[H]),this.$=ke[H];break;case 53:Re.addComponent("component",...ke[H]),this.$=ke[H];break;case 54:Re.addComponent("component_db",...ke[H]),this.$=ke[H];break;case 55:Re.addComponent("component_queue",...ke[H]),this.$=ke[H];break;case 56:Re.addComponent("external_component",...ke[H]),this.$=ke[H];break;case 57:Re.addComponent("external_component_db",...ke[H]),this.$=ke[H];break;case 58:Re.addComponent("external_component_queue",...ke[H]),this.$=ke[H];break;case 60:Re.addRel("rel",...ke[H]),this.$=ke[H];break;case 61:Re.addRel("birel",...ke[H]),this.$=ke[H];break;case 62:Re.addRel("rel_u",...ke[H]),this.$=ke[H];break;case 63:Re.addRel("rel_d",...ke[H]),this.$=ke[H];break;case 64:Re.addRel("rel_l",...ke[H]),this.$=ke[H];break;case 65:Re.addRel("rel_r",...ke[H]),this.$=ke[H];break;case 66:Re.addRel("rel_b",...ke[H]),this.$=ke[H];break;case 67:ke[H].splice(0,1),Re.addRel("rel",...ke[H]),this.$=ke[H];break;case 68:Re.updateElStyle("update_el_style",...ke[H]),this.$=ke[H];break;case 69:Re.updateRelStyle("update_rel_style",...ke[H]),this.$=ke[H];break;case 70:Re.updateLayoutConfig("update_layout_config",...ke[H]),this.$=ke[H];break;case 71:this.$=[ke[H]];break;case 72:ke[H].unshift(ke[H-1]),this.$=ke[H];break;case 73:case 75:this.$=ke[H].trim();break;case 74:let ve={};ve[ke[H-1].trim()]=ke[H].trim(),this.$=ve;break;case 76:this.$="";break}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],7:[1,6],8:[1,7],9:[1,8],10:4,11:[1,9],15:[1,10],16:[1,11],17:[1,12],18:[1,13]},{1:[3]},{1:[2,1]},{1:[2,2]},{1:[2,7]},{1:[2,3]},{1:[2,4]},{1:[2,5]},{1:[2,6]},{12:[1,14]},{12:[1,15]},{12:[1,16]},{12:[1,17]},{12:[1,18]},{13:19,19:20,20:21,21:22,22:e,23:r,24:n,26:i,28:a,29:49,30:61,32:62,34:s,36:o,37:l,38:u,39:h,40:f,41:d,43:23,44:p,45:m,46:g,47:y,48:v,49:x,50:k,51:_,52:T,53:S,54:R,55:A,56:I,57:P,58:O,59:C,60:N,61:B,62:F,63:M,64:$,65:z,66:q,67:V,68:U,69:J,70:se,71:re,72:me,73:ge,74:ye},{13:70,19:20,20:21,21:22,22:e,23:r,24:n,26:i,28:a,29:49,30:61,32:62,34:s,36:o,37:l,38:u,39:h,40:f,41:d,43:23,44:p,45:m,46:g,47:y,48:v,49:x,50:k,51:_,52:T,53:S,54:R,55:A,56:I,57:P,58:O,59:C,60:N,61:B,62:F,63:M,64:$,65:z,66:q,67:V,68:U,69:J,70:se,71:re,72:me,73:ge,74:ye},{13:71,19:20,20:21,21:22,22:e,23:r,24:n,26:i,28:a,29:49,30:61,32:62,34:s,36:o,37:l,38:u,39:h,40:f,41:d,43:23,44:p,45:m,46:g,47:y,48:v,49:x,50:k,51:_,52:T,53:S,54:R,55:A,56:I,57:P,58:O,59:C,60:N,61:B,62:F,63:M,64:$,65:z,66:q,67:V,68:U,69:J,70:se,71:re,72:me,73:ge,74:ye},{13:72,19:20,20:21,21:22,22:e,23:r,24:n,26:i,28:a,29:49,30:61,32:62,34:s,36:o,37:l,38:u,39:h,40:f,41:d,43:23,44:p,45:m,46:g,47:y,48:v,49:x,50:k,51:_,52:T,53:S,54:R,55:A,56:I,57:P,58:O,59:C,60:N,61:B,62:F,63:M,64:$,65:z,66:q,67:V,68:U,69:J,70:se,71:re,72:me,73:ge,74:ye},{13:73,19:20,20:21,21:22,22:e,23:r,24:n,26:i,28:a,29:49,30:61,32:62,34:s,36:o,37:l,38:u,39:h,40:f,41:d,43:23,44:p,45:m,46:g,47:y,48:v,49:x,50:k,51:_,52:T,53:S,54:R,55:A,56:I,57:P,58:O,59:C,60:N,61:B,62:F,63:M,64:$,65:z,66:q,67:V,68:U,69:J,70:se,71:re,72:me,73:ge,74:ye},{14:[1,74]},t(_e,[2,13],{43:23,29:49,30:61,32:62,20:75,34:s,36:o,37:l,38:u,39:h,40:f,41:d,44:p,45:m,46:g,47:y,48:v,49:x,50:k,51:_,52:T,53:S,54:R,55:A,56:I,57:P,58:O,59:C,60:N,61:B,62:F,63:M,64:$,65:z,66:q,67:V,68:U,69:J,70:se,71:re,72:me,73:ge,74:ye}),t(_e,[2,14]),t(ue,[2,16],{12:[1,76]}),t(_e,[2,36],{12:[1,77]}),t(ie,[2,19]),t(ie,[2,20]),{25:[1,78]},{27:[1,79]},t(ie,[2,23]),{35:80,75:81,76:le,77:oe,79:ne,80:pe},{35:86,75:81,76:le,77:oe,79:ne,80:pe},{35:87,75:81,76:le,77:oe,79:ne,80:pe},{35:88,75:81,76:le,77:oe,79:ne,80:pe},{35:89,75:81,76:le,77:oe,79:ne,80:pe},{35:90,75:81,76:le,77:oe,79:ne,80:pe},{35:91,75:81,76:le,77:oe,79:ne,80:pe},{35:92,75:81,76:le,77:oe,79:ne,80:pe},{35:93,75:81,76:le,77:oe,79:ne,80:pe},{35:94,75:81,76:le,77:oe,79:ne,80:pe},{35:95,75:81,76:le,77:oe,79:ne,80:pe},{35:96,75:81,76:le,77:oe,79:ne,80:pe},{35:97,75:81,76:le,77:oe,79:ne,80:pe},{35:98,75:81,76:le,77:oe,79:ne,80:pe},{35:99,75:81,76:le,77:oe,79:ne,80:pe},{35:100,75:81,76:le,77:oe,79:ne,80:pe},{35:101,75:81,76:le,77:oe,79:ne,80:pe},{35:102,75:81,76:le,77:oe,79:ne,80:pe},{35:103,75:81,76:le,77:oe,79:ne,80:pe},{35:104,75:81,76:le,77:oe,79:ne,80:pe},t(te,[2,59]),{35:105,75:81,76:le,77:oe,79:ne,80:pe},{35:106,75:81,76:le,77:oe,79:ne,80:pe},{35:107,75:81,76:le,77:oe,79:ne,80:pe},{35:108,75:81,76:le,77:oe,79:ne,80:pe},{35:109,75:81,76:le,77:oe,79:ne,80:pe},{35:110,75:81,76:le,77:oe,79:ne,80:pe},{35:111,75:81,76:le,77:oe,79:ne,80:pe},{35:112,75:81,76:le,77:oe,79:ne,80:pe},{35:113,75:81,76:le,77:oe,79:ne,80:pe},{35:114,75:81,76:le,77:oe,79:ne,80:pe},{35:115,75:81,76:le,77:oe,79:ne,80:pe},{20:116,29:49,30:61,32:62,34:s,36:o,37:l,38:u,39:h,40:f,41:d,43:23,44:p,45:m,46:g,47:y,48:v,49:x,50:k,51:_,52:T,53:S,54:R,55:A,56:I,57:P,58:O,59:C,60:N,61:B,62:F,63:M,64:$,65:z,66:q,67:V,68:U,69:J,70:se,71:re,72:me,73:ge,74:ye},{12:[1,118],33:[1,117]},{35:119,75:81,76:le,77:oe,79:ne,80:pe},{35:120,75:81,76:le,77:oe,79:ne,80:pe},{35:121,75:81,76:le,77:oe,79:ne,80:pe},{35:122,75:81,76:le,77:oe,79:ne,80:pe},{35:123,75:81,76:le,77:oe,79:ne,80:pe},{35:124,75:81,76:le,77:oe,79:ne,80:pe},{35:125,75:81,76:le,77:oe,79:ne,80:pe},{14:[1,126]},{14:[1,127]},{14:[1,128]},{14:[1,129]},{1:[2,8]},t(_e,[2,15]),t(ue,[2,17],{21:22,19:130,22:e,23:r,24:n,26:i,28:a}),t(_e,[2,37],{19:20,20:21,21:22,43:23,29:49,30:61,32:62,13:131,22:e,23:r,24:n,26:i,28:a,34:s,36:o,37:l,38:u,39:h,40:f,41:d,44:p,45:m,46:g,47:y,48:v,49:x,50:k,51:_,52:T,53:S,54:R,55:A,56:I,57:P,58:O,59:C,60:N,61:B,62:F,63:M,64:$,65:z,66:q,67:V,68:U,69:J,70:se,71:re,72:me,73:ge,74:ye}),t(ie,[2,21]),t(ie,[2,22]),t(te,[2,39]),t(He,[2,71],{75:81,35:132,76:le,77:oe,79:ne,80:pe}),t(de,[2,73]),{78:[1,133]},t(de,[2,75]),t(de,[2,76]),t(te,[2,40]),t(te,[2,41]),t(te,[2,42]),t(te,[2,43]),t(te,[2,44]),t(te,[2,45]),t(te,[2,46]),t(te,[2,47]),t(te,[2,48]),t(te,[2,49]),t(te,[2,50]),t(te,[2,51]),t(te,[2,52]),t(te,[2,53]),t(te,[2,54]),t(te,[2,55]),t(te,[2,56]),t(te,[2,57]),t(te,[2,58]),t(te,[2,60]),t(te,[2,61]),t(te,[2,62]),t(te,[2,63]),t(te,[2,64]),t(te,[2,65]),t(te,[2,66]),t(te,[2,67]),t(te,[2,68]),t(te,[2,69]),t(te,[2,70]),{31:134,42:[1,135]},{12:[1,136]},{33:[1,137]},t(ce,[2,28]),t(ce,[2,29]),t(ce,[2,30]),t(ce,[2,31]),t(ce,[2,32]),t(ce,[2,33]),t(ce,[2,34]),{1:[2,9]},{1:[2,10]},{1:[2,11]},{1:[2,12]},t(ue,[2,18]),t(_e,[2,38]),t(He,[2,72]),t(de,[2,74]),t(te,[2,24]),t(te,[2,35]),t(st,[2,25]),t(st,[2,26],{12:[1,138]}),t(st,[2,27])],defaultActions:{2:[2,1],3:[2,2],4:[2,7],5:[2,3],6:[2,4],7:[2,5],8:[2,6],74:[2,8],126:[2,9],127:[2,10],128:[2,11],129:[2,12]},parseError:b(function(Xe,Ze){if(Ze.recoverable)this.trace(Xe);else{var Pe=new Error(Xe);throw Pe.hash=Ze,Pe}},"parseError"),parse:b(function(Xe){var Ze=this,Pe=[0],Re=[],Ve=[null],ke=[],xe=this.table,H="",ve=0,K=0,we=0,Ee=2,Ke=1,Be=ke.slice.call(arguments,1),De=Object.create(this.lexer),nt={yy:{}};for(var We in this.yy)Object.prototype.hasOwnProperty.call(this.yy,We)&&(nt.yy[We]=this.yy[We]);De.setInput(Xe,nt.yy),nt.yy.lexer=De,nt.yy.parser=this,typeof De.yylloc>"u"&&(De.yylloc={});var ut=De.yylloc;ke.push(ut);var vt=De.options&&De.options.ranges;typeof nt.yy.parseError=="function"?this.parseError=nt.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function gt(At){Pe.length=Pe.length-2*At,Ve.length=Ve.length-At,ke.length=ke.length-At}b(gt,"popStack");function mt(){var At;return At=Re.pop()||De.lex()||Ke,typeof At!="number"&&(At instanceof Array&&(Re=At,At=Re.pop()),At=Ze.symbols_[At]||At),At}b(mt,"lex");for(var ft,Dt,ht,yt,W,j,Je={},ee,Te,bt,at;;){if(ht=Pe[Pe.length-1],this.defaultActions[ht]?yt=this.defaultActions[ht]:((ft===null||typeof ft>"u")&&(ft=mt()),yt=xe[ht]&&xe[ht][ft]),typeof yt>"u"||!yt.length||!yt[0]){var It="";at=[];for(ee in xe[ht])this.terminals_[ee]&&ee>Ee&&at.push("'"+this.terminals_[ee]+"'");De.showPosition?It="Parse error on line "+(ve+1)+`: +`+De.showPosition()+` +Expecting `+at.join(", ")+", got '"+(this.terminals_[ft]||ft)+"'":It="Parse error on line "+(ve+1)+": Unexpected "+(ft==Ke?"end of input":"'"+(this.terminals_[ft]||ft)+"'"),this.parseError(It,{text:De.match,token:this.terminals_[ft]||ft,line:De.yylineno,loc:ut,expected:at})}if(yt[0]instanceof Array&&yt.length>1)throw new Error("Parse Error: multiple actions possible at state: "+ht+", token: "+ft);switch(yt[0]){case 1:Pe.push(ft),Ve.push(De.yytext),ke.push(De.yylloc),Pe.push(yt[1]),ft=null,Dt?(ft=Dt,Dt=null):(K=De.yyleng,H=De.yytext,ve=De.yylineno,ut=De.yylloc,we>0&&we--);break;case 2:if(Te=this.productions_[yt[1]][1],Je.$=Ve[Ve.length-Te],Je._$={first_line:ke[ke.length-(Te||1)].first_line,last_line:ke[ke.length-1].last_line,first_column:ke[ke.length-(Te||1)].first_column,last_column:ke[ke.length-1].last_column},vt&&(Je._$.range=[ke[ke.length-(Te||1)].range[0],ke[ke.length-1].range[1]]),j=this.performAction.apply(Je,[H,K,ve,nt.yy,yt[1],Ve,ke].concat(Be)),typeof j<"u")return j;Te&&(Pe=Pe.slice(0,-1*Te*2),Ve=Ve.slice(0,-1*Te),ke=ke.slice(0,-1*Te)),Pe.push(this.productions_[yt[1]][0]),Ve.push(Je.$),ke.push(Je._$),bt=xe[Pe[Pe.length-2]][Pe[Pe.length-1]],Pe.push(bt);break;case 3:return!0}}return!0},"parse")},Ye=(function(){var rt={EOF:1,parseError:b(function(Ze,Pe){if(this.yy.parser)this.yy.parser.parseError(Ze,Pe);else throw new Error(Ze)},"parseError"),setInput:b(function(Xe,Ze){return this.yy=Ze||this.yy||{},this._input=Xe,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:b(function(){var Xe=this._input[0];this.yytext+=Xe,this.yyleng++,this.offset++,this.match+=Xe,this.matched+=Xe;var Ze=Xe.match(/(?:\r\n?|\n).*/g);return Ze?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),Xe},"input"),unput:b(function(Xe){var Ze=Xe.length,Pe=Xe.split(/(?:\r\n?|\n)/g);this._input=Xe+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-Ze),this.offset-=Ze;var Re=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),Pe.length-1&&(this.yylineno-=Pe.length-1);var Ve=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:Pe?(Pe.length===Re.length?this.yylloc.first_column:0)+Re[Re.length-Pe.length].length-Pe[0].length:this.yylloc.first_column-Ze},this.options.ranges&&(this.yylloc.range=[Ve[0],Ve[0]+this.yyleng-Ze]),this.yyleng=this.yytext.length,this},"unput"),more:b(function(){return this._more=!0,this},"more"),reject:b(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). +`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:b(function(Xe){this.unput(this.match.slice(Xe))},"less"),pastInput:b(function(){var Xe=this.matched.substr(0,this.matched.length-this.match.length);return(Xe.length>20?"...":"")+Xe.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:b(function(){var Xe=this.match;return Xe.length<20&&(Xe+=this._input.substr(0,20-Xe.length)),(Xe.substr(0,20)+(Xe.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:b(function(){var Xe=this.pastInput(),Ze=new Array(Xe.length+1).join("-");return Xe+this.upcomingInput()+` +`+Ze+"^"},"showPosition"),test_match:b(function(Xe,Ze){var Pe,Re,Ve;if(this.options.backtrack_lexer&&(Ve={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(Ve.yylloc.range=this.yylloc.range.slice(0))),Re=Xe[0].match(/(?:\r\n?|\n).*/g),Re&&(this.yylineno+=Re.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:Re?Re[Re.length-1].length-Re[Re.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+Xe[0].length},this.yytext+=Xe[0],this.match+=Xe[0],this.matches=Xe,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(Xe[0].length),this.matched+=Xe[0],Pe=this.performAction.call(this,this.yy,this,Ze,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),Pe)return Pe;if(this._backtrack){for(var ke in Ve)this[ke]=Ve[ke];return!1}return!1},"test_match"),next:b(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var Xe,Ze,Pe,Re;this._more||(this.yytext="",this.match="");for(var Ve=this._currentRules(),ke=0;keZe[0].length)){if(Ze=Pe,Re=ke,this.options.backtrack_lexer){if(Xe=this.test_match(Pe,Ve[ke]),Xe!==!1)return Xe;if(this._backtrack){Ze=!1;continue}else return!1}else if(!this.options.flex)break}return Ze?(Xe=this.test_match(Ze,Ve[Re]),Xe!==!1?Xe:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. +`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:b(function(){var Ze=this.next();return Ze||this.lex()},"lex"),begin:b(function(Ze){this.conditionStack.push(Ze)},"begin"),popState:b(function(){var Ze=this.conditionStack.length-1;return Ze>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:b(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:b(function(Ze){return Ze=this.conditionStack.length-1-Math.abs(Ze||0),Ze>=0?this.conditionStack[Ze]:"INITIAL"},"topState"),pushState:b(function(Ze){this.begin(Ze)},"pushState"),stateStackSize:b(function(){return this.conditionStack.length},"stateStackSize"),options:{},performAction:b(function(Ze,Pe,Re,Ve){var ke=Ve;switch(Re){case 0:return 6;case 1:return 7;case 2:return 8;case 3:return 9;case 4:return 22;case 5:return 23;case 6:return this.begin("acc_title"),24;break;case 7:return this.popState(),"acc_title_value";break;case 8:return this.begin("acc_descr"),26;break;case 9:return this.popState(),"acc_descr_value";break;case 10:this.begin("acc_descr_multiline");break;case 11:this.popState();break;case 12:return"acc_descr_multiline_value";case 13:break;case 14:c;break;case 15:return 12;case 16:break;case 17:return 11;case 18:return 15;case 19:return 16;case 20:return 17;case 21:return 18;case 22:return this.begin("person_ext"),45;break;case 23:return this.begin("person"),44;break;case 24:return this.begin("system_ext_queue"),51;break;case 25:return this.begin("system_ext_db"),50;break;case 26:return this.begin("system_ext"),49;break;case 27:return this.begin("system_queue"),48;break;case 28:return this.begin("system_db"),47;break;case 29:return this.begin("system"),46;break;case 30:return this.begin("boundary"),37;break;case 31:return this.begin("enterprise_boundary"),34;break;case 32:return this.begin("system_boundary"),36;break;case 33:return this.begin("container_ext_queue"),57;break;case 34:return this.begin("container_ext_db"),56;break;case 35:return this.begin("container_ext"),55;break;case 36:return this.begin("container_queue"),54;break;case 37:return this.begin("container_db"),53;break;case 38:return this.begin("container"),52;break;case 39:return this.begin("container_boundary"),38;break;case 40:return this.begin("component_ext_queue"),63;break;case 41:return this.begin("component_ext_db"),62;break;case 42:return this.begin("component_ext"),61;break;case 43:return this.begin("component_queue"),60;break;case 44:return this.begin("component_db"),59;break;case 45:return this.begin("component"),58;break;case 46:return this.begin("node"),39;break;case 47:return this.begin("node"),39;break;case 48:return this.begin("node_l"),40;break;case 49:return this.begin("node_r"),41;break;case 50:return this.begin("rel"),64;break;case 51:return this.begin("birel"),65;break;case 52:return this.begin("rel_u"),66;break;case 53:return this.begin("rel_u"),66;break;case 54:return this.begin("rel_d"),67;break;case 55:return this.begin("rel_d"),67;break;case 56:return this.begin("rel_l"),68;break;case 57:return this.begin("rel_l"),68;break;case 58:return this.begin("rel_r"),69;break;case 59:return this.begin("rel_r"),69;break;case 60:return this.begin("rel_b"),70;break;case 61:return this.begin("rel_index"),71;break;case 62:return this.begin("update_el_style"),72;break;case 63:return this.begin("update_rel_style"),73;break;case 64:return this.begin("update_layout_config"),74;break;case 65:return"EOF_IN_STRUCT";case 66:return this.begin("attribute"),"ATTRIBUTE_EMPTY";break;case 67:this.begin("attribute");break;case 68:this.popState(),this.popState();break;case 69:return 80;case 70:break;case 71:return 80;case 72:this.begin("string");break;case 73:this.popState();break;case 74:return"STR";case 75:this.begin("string_kv");break;case 76:return this.begin("string_kv_key"),"STR_KEY";break;case 77:this.popState(),this.begin("string_kv_value");break;case 78:return"STR_VALUE";case 79:this.popState(),this.popState();break;case 80:return"STR";case 81:return"LBRACE";case 82:return"RBRACE";case 83:return"SPACE";case 84:return"EOL";case 85:return 14}},"anonymous"),rules:[/^(?:.*direction\s+TB[^\n]*)/,/^(?:.*direction\s+BT[^\n]*)/,/^(?:.*direction\s+RL[^\n]*)/,/^(?:.*direction\s+LR[^\n]*)/,/^(?:title\s[^#\n;]+)/,/^(?:accDescription\s[^#\n;]+)/,/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?:%%(?!\{)*[^\n]*(\r?\n?)+)/,/^(?:%%[^\n]*(\r?\n)*)/,/^(?:\s*(\r?\n)+)/,/^(?:\s+)/,/^(?:C4Context\b)/,/^(?:C4Container\b)/,/^(?:C4Component\b)/,/^(?:C4Dynamic\b)/,/^(?:C4Deployment\b)/,/^(?:Person_Ext\b)/,/^(?:Person\b)/,/^(?:SystemQueue_Ext\b)/,/^(?:SystemDb_Ext\b)/,/^(?:System_Ext\b)/,/^(?:SystemQueue\b)/,/^(?:SystemDb\b)/,/^(?:System\b)/,/^(?:Boundary\b)/,/^(?:Enterprise_Boundary\b)/,/^(?:System_Boundary\b)/,/^(?:ContainerQueue_Ext\b)/,/^(?:ContainerDb_Ext\b)/,/^(?:Container_Ext\b)/,/^(?:ContainerQueue\b)/,/^(?:ContainerDb\b)/,/^(?:Container\b)/,/^(?:Container_Boundary\b)/,/^(?:ComponentQueue_Ext\b)/,/^(?:ComponentDb_Ext\b)/,/^(?:Component_Ext\b)/,/^(?:ComponentQueue\b)/,/^(?:ComponentDb\b)/,/^(?:Component\b)/,/^(?:Deployment_Node\b)/,/^(?:Node\b)/,/^(?:Node_L\b)/,/^(?:Node_R\b)/,/^(?:Rel\b)/,/^(?:BiRel\b)/,/^(?:Rel_Up\b)/,/^(?:Rel_U\b)/,/^(?:Rel_Down\b)/,/^(?:Rel_D\b)/,/^(?:Rel_Left\b)/,/^(?:Rel_L\b)/,/^(?:Rel_Right\b)/,/^(?:Rel_R\b)/,/^(?:Rel_Back\b)/,/^(?:RelIndex\b)/,/^(?:UpdateElementStyle\b)/,/^(?:UpdateRelStyle\b)/,/^(?:UpdateLayoutConfig\b)/,/^(?:$)/,/^(?:[(][ ]*[,])/,/^(?:[(])/,/^(?:[)])/,/^(?:,,)/,/^(?:,)/,/^(?:[ ]*["]["])/,/^(?:[ ]*["])/,/^(?:["])/,/^(?:[^"]*)/,/^(?:[ ]*[\$])/,/^(?:[^=]*)/,/^(?:[=][ ]*["])/,/^(?:[^"]+)/,/^(?:["])/,/^(?:[^,]+)/,/^(?:\{)/,/^(?:\})/,/^(?:[\s]+)/,/^(?:[\n\r]+)/,/^(?:$)/],conditions:{acc_descr_multiline:{rules:[11,12],inclusive:!1},acc_descr:{rules:[9],inclusive:!1},acc_title:{rules:[7],inclusive:!1},string_kv_value:{rules:[78,79],inclusive:!1},string_kv_key:{rules:[77],inclusive:!1},string_kv:{rules:[76],inclusive:!1},string:{rules:[73,74],inclusive:!1},attribute:{rules:[68,69,70,71,72,75,80],inclusive:!1},update_layout_config:{rules:[65,66,67,68],inclusive:!1},update_rel_style:{rules:[65,66,67,68],inclusive:!1},update_el_style:{rules:[65,66,67,68],inclusive:!1},rel_b:{rules:[65,66,67,68],inclusive:!1},rel_r:{rules:[65,66,67,68],inclusive:!1},rel_l:{rules:[65,66,67,68],inclusive:!1},rel_d:{rules:[65,66,67,68],inclusive:!1},rel_u:{rules:[65,66,67,68],inclusive:!1},rel_bi:{rules:[],inclusive:!1},rel:{rules:[65,66,67,68],inclusive:!1},node_r:{rules:[65,66,67,68],inclusive:!1},node_l:{rules:[65,66,67,68],inclusive:!1},node:{rules:[65,66,67,68],inclusive:!1},index:{rules:[],inclusive:!1},rel_index:{rules:[65,66,67,68],inclusive:!1},component_ext_queue:{rules:[],inclusive:!1},component_ext_db:{rules:[65,66,67,68],inclusive:!1},component_ext:{rules:[65,66,67,68],inclusive:!1},component_queue:{rules:[65,66,67,68],inclusive:!1},component_db:{rules:[65,66,67,68],inclusive:!1},component:{rules:[65,66,67,68],inclusive:!1},container_boundary:{rules:[65,66,67,68],inclusive:!1},container_ext_queue:{rules:[65,66,67,68],inclusive:!1},container_ext_db:{rules:[65,66,67,68],inclusive:!1},container_ext:{rules:[65,66,67,68],inclusive:!1},container_queue:{rules:[65,66,67,68],inclusive:!1},container_db:{rules:[65,66,67,68],inclusive:!1},container:{rules:[65,66,67,68],inclusive:!1},birel:{rules:[65,66,67,68],inclusive:!1},system_boundary:{rules:[65,66,67,68],inclusive:!1},enterprise_boundary:{rules:[65,66,67,68],inclusive:!1},boundary:{rules:[65,66,67,68],inclusive:!1},system_ext_queue:{rules:[65,66,67,68],inclusive:!1},system_ext_db:{rules:[65,66,67,68],inclusive:!1},system_ext:{rules:[65,66,67,68],inclusive:!1},system_queue:{rules:[65,66,67,68],inclusive:!1},system_db:{rules:[65,66,67,68],inclusive:!1},system:{rules:[65,66,67,68],inclusive:!1},person_ext:{rules:[65,66,67,68],inclusive:!1},person:{rules:[65,66,67,68],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,8,10,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,81,82,83,84,85],inclusive:!0}}};return rt})();Ae.lexer=Ye;function Ge(){this.yy={}}return b(Ge,"Parser"),Ge.prototype=Ae,Ae.Parser=Ge,new Ge})();XS.parser=XS;Tst=XS,oc=[],Gd=[""],yo="global",sc="",w0=[{alias:"global",label:{text:"global"},type:{text:"global"},tags:null,link:null,parentBoundary:""}],t6=[],s$="",o$=!1,jS=4,KS=2,Est=b(function(){return mye},"getC4Type"),Sst=b(function(t){mye=Qr(t,Fe())},"setC4Type"),Cst=b(function(t,e,r,n,i,a,s,o,l){if(t==null||e===void 0||e===null||r===void 0||r===null||n===void 0||n===null)return;let u={},h=t6.find(f=>f.from===e&&f.to===r);if(h?u=h:t6.push(u),u.type=t,u.from=e,u.to=r,u.label={text:n},i==null)u.techn={text:""};else if(typeof i=="object"){let[f,d]=Object.entries(i)[0];u[f]={text:d}}else u.techn={text:i};if(a==null)u.descr={text:""};else if(typeof a=="object"){let[f,d]=Object.entries(a)[0];u[f]={text:d}}else u.descr={text:a};if(typeof s=="object"){let[f,d]=Object.entries(s)[0];u[f]=d}else u.sprite=s;if(typeof o=="object"){let[f,d]=Object.entries(o)[0];u[f]=d}else u.tags=o;if(typeof l=="object"){let[f,d]=Object.entries(l)[0];u[f]=d}else u.link=l;u.wrap=qd()},"addRel"),_st=b(function(t,e,r,n,i,a,s){if(e===null||r===null)return;let o={},l=oc.find(u=>u.alias===e);if(l&&e===l.alias?o=l:(o.alias=e,oc.push(o)),r==null?o.label={text:""}:o.label={text:r},n==null)o.descr={text:""};else if(typeof n=="object"){let[u,h]=Object.entries(n)[0];o[u]={text:h}}else o.descr={text:n};if(typeof i=="object"){let[u,h]=Object.entries(i)[0];o[u]=h}else o.sprite=i;if(typeof a=="object"){let[u,h]=Object.entries(a)[0];o[u]=h}else o.tags=a;if(typeof s=="object"){let[u,h]=Object.entries(s)[0];o[u]=h}else o.link=s;o.typeC4Shape={text:t},o.parentBoundary=yo,o.wrap=qd()},"addPersonOrSystem"),Ast=b(function(t,e,r,n,i,a,s,o){if(e===null||r===null)return;let l={},u=oc.find(h=>h.alias===e);if(u&&e===u.alias?l=u:(l.alias=e,oc.push(l)),r==null?l.label={text:""}:l.label={text:r},n==null)l.techn={text:""};else if(typeof n=="object"){let[h,f]=Object.entries(n)[0];l[h]={text:f}}else l.techn={text:n};if(i==null)l.descr={text:""};else if(typeof i=="object"){let[h,f]=Object.entries(i)[0];l[h]={text:f}}else l.descr={text:i};if(typeof a=="object"){let[h,f]=Object.entries(a)[0];l[h]=f}else l.sprite=a;if(typeof s=="object"){let[h,f]=Object.entries(s)[0];l[h]=f}else l.tags=s;if(typeof o=="object"){let[h,f]=Object.entries(o)[0];l[h]=f}else l.link=o;l.wrap=qd(),l.typeC4Shape={text:t},l.parentBoundary=yo},"addContainer"),Lst=b(function(t,e,r,n,i,a,s,o){if(e===null||r===null)return;let l={},u=oc.find(h=>h.alias===e);if(u&&e===u.alias?l=u:(l.alias=e,oc.push(l)),r==null?l.label={text:""}:l.label={text:r},n==null)l.techn={text:""};else if(typeof n=="object"){let[h,f]=Object.entries(n)[0];l[h]={text:f}}else l.techn={text:n};if(i==null)l.descr={text:""};else if(typeof i=="object"){let[h,f]=Object.entries(i)[0];l[h]={text:f}}else l.descr={text:i};if(typeof a=="object"){let[h,f]=Object.entries(a)[0];l[h]=f}else l.sprite=a;if(typeof s=="object"){let[h,f]=Object.entries(s)[0];l[h]=f}else l.tags=s;if(typeof o=="object"){let[h,f]=Object.entries(o)[0];l[h]=f}else l.link=o;l.wrap=qd(),l.typeC4Shape={text:t},l.parentBoundary=yo},"addComponent"),Rst=b(function(t,e,r,n,i){if(t===null||e===null)return;let a={},s=w0.find(o=>o.alias===t);if(s&&t===s.alias?a=s:(a.alias=t,w0.push(a)),e==null?a.label={text:""}:a.label={text:e},r==null)a.type={text:"system"};else if(typeof r=="object"){let[o,l]=Object.entries(r)[0];a[o]={text:l}}else a.type={text:r};if(typeof n=="object"){let[o,l]=Object.entries(n)[0];a[o]=l}else a.tags=n;if(typeof i=="object"){let[o,l]=Object.entries(i)[0];a[o]=l}else a.link=i;a.parentBoundary=yo,a.wrap=qd(),sc=yo,yo=t,Gd.push(sc)},"addPersonOrSystemBoundary"),Dst=b(function(t,e,r,n,i){if(t===null||e===null)return;let a={},s=w0.find(o=>o.alias===t);if(s&&t===s.alias?a=s:(a.alias=t,w0.push(a)),e==null?a.label={text:""}:a.label={text:e},r==null)a.type={text:"container"};else if(typeof r=="object"){let[o,l]=Object.entries(r)[0];a[o]={text:l}}else a.type={text:r};if(typeof n=="object"){let[o,l]=Object.entries(n)[0];a[o]=l}else a.tags=n;if(typeof i=="object"){let[o,l]=Object.entries(i)[0];a[o]=l}else a.link=i;a.parentBoundary=yo,a.wrap=qd(),sc=yo,yo=t,Gd.push(sc)},"addContainerBoundary"),Ist=b(function(t,e,r,n,i,a,s,o){if(e===null||r===null)return;let l={},u=w0.find(h=>h.alias===e);if(u&&e===u.alias?l=u:(l.alias=e,w0.push(l)),r==null?l.label={text:""}:l.label={text:r},n==null)l.type={text:"node"};else if(typeof n=="object"){let[h,f]=Object.entries(n)[0];l[h]={text:f}}else l.type={text:n};if(i==null)l.descr={text:""};else if(typeof i=="object"){let[h,f]=Object.entries(i)[0];l[h]={text:f}}else l.descr={text:i};if(typeof s=="object"){let[h,f]=Object.entries(s)[0];l[h]=f}else l.tags=s;if(typeof o=="object"){let[h,f]=Object.entries(o)[0];l[h]=f}else l.link=o;l.nodeType=t,l.parentBoundary=yo,l.wrap=qd(),sc=yo,yo=e,Gd.push(sc)},"addDeploymentNode"),Mst=b(function(){yo=sc,Gd.pop(),sc=Gd.pop(),Gd.push(sc)},"popBoundaryParseStack"),Nst=b(function(t,e,r,n,i,a,s,o,l,u,h){let f=oc.find(d=>d.alias===e);if(!(f===void 0&&(f=w0.find(d=>d.alias===e),f===void 0))){if(r!=null)if(typeof r=="object"){let[d,p]=Object.entries(r)[0];f[d]=p}else f.bgColor=r;if(n!=null)if(typeof n=="object"){let[d,p]=Object.entries(n)[0];f[d]=p}else f.fontColor=n;if(i!=null)if(typeof i=="object"){let[d,p]=Object.entries(i)[0];f[d]=p}else f.borderColor=i;if(a!=null)if(typeof a=="object"){let[d,p]=Object.entries(a)[0];f[d]=p}else f.shadowing=a;if(s!=null)if(typeof s=="object"){let[d,p]=Object.entries(s)[0];f[d]=p}else f.shape=s;if(o!=null)if(typeof o=="object"){let[d,p]=Object.entries(o)[0];f[d]=p}else f.sprite=o;if(l!=null)if(typeof l=="object"){let[d,p]=Object.entries(l)[0];f[d]=p}else f.techn=l;if(u!=null)if(typeof u=="object"){let[d,p]=Object.entries(u)[0];f[d]=p}else f.legendText=u;if(h!=null)if(typeof h=="object"){let[d,p]=Object.entries(h)[0];f[d]=p}else f.legendSprite=h}},"updateElStyle"),Ost=b(function(t,e,r,n,i,a,s){let o=t6.find(l=>l.from===e&&l.to===r);if(o!==void 0){if(n!=null)if(typeof n=="object"){let[l,u]=Object.entries(n)[0];o[l]=u}else o.textColor=n;if(i!=null)if(typeof i=="object"){let[l,u]=Object.entries(i)[0];o[l]=u}else o.lineColor=i;if(a!=null)if(typeof a=="object"){let[l,u]=Object.entries(a)[0];o[l]=parseInt(u)}else o.offsetX=parseInt(a);if(s!=null)if(typeof s=="object"){let[l,u]=Object.entries(s)[0];o[l]=parseInt(u)}else o.offsetY=parseInt(s)}},"updateRelStyle"),Pst=b(function(t,e,r){let n=jS,i=KS;if(typeof e=="object"){let a=Object.values(e)[0];n=parseInt(a)}else n=parseInt(e);if(typeof r=="object"){let a=Object.values(r)[0];i=parseInt(a)}else i=parseInt(r);n>=1&&(jS=n),i>=1&&(KS=i)},"updateLayoutConfig"),Bst=b(function(){return jS},"getC4ShapeInRow"),Fst=b(function(){return KS},"getC4BoundaryInRow"),zst=b(function(){return yo},"getCurrentBoundaryParse"),$st=b(function(){return sc},"getParentBoundaryParse"),gye=b(function(t){return t==null?oc:oc.filter(e=>e.parentBoundary===t)},"getC4ShapeArray"),Gst=b(function(t){return oc.find(e=>e.alias===t)},"getC4Shape"),qst=b(function(t){return Object.keys(gye(t))},"getC4ShapeKeys"),yye=b(function(t){return t==null?w0:w0.filter(e=>e.parentBoundary===t)},"getBoundaries"),Ust=yye,Hst=b(function(){return t6},"getRels"),Vst=b(function(){return s$},"getTitle"),Wst=b(function(t){o$=t},"setWrap"),qd=b(function(){return o$},"autoWrap"),Yst=b(function(){oc=[],w0=[{alias:"global",label:{text:"global"},type:{text:"global"},tags:null,link:null,parentBoundary:""}],sc="",yo="global",Gd=[""],t6=[],Gd=[""],s$="",o$=!1,jS=4,KS=2},"clear"),Xst={SOLID:0,DOTTED:1,NOTE:2,SOLID_CROSS:3,DOTTED_CROSS:4,SOLID_OPEN:5,DOTTED_OPEN:6,LOOP_START:10,LOOP_END:11,ALT_START:12,ALT_ELSE:13,ALT_END:14,OPT_START:15,OPT_END:16,ACTIVE_START:17,ACTIVE_END:18,PAR_START:19,PAR_AND:20,PAR_END:21,RECT_START:22,RECT_END:23,SOLID_POINT:24,DOTTED_POINT:25},jst={FILLED:0,OPEN:1},Kst={LEFTOF:0,RIGHTOF:1,OVER:2},Zst=b(function(t){s$=Qr(t,Fe())},"setTitle"),n$={addPersonOrSystem:_st,addPersonOrSystemBoundary:Rst,addContainer:Ast,addContainerBoundary:Dst,addComponent:Lst,addDeploymentNode:Ist,popBoundaryParseStack:Mst,addRel:Cst,updateElStyle:Nst,updateRelStyle:Ost,updateLayoutConfig:Pst,autoWrap:qd,setWrap:Wst,getC4ShapeArray:gye,getC4Shape:Gst,getC4ShapeKeys:qst,getBoundaries:yye,getBoundarys:Ust,getCurrentBoundaryParse:zst,getParentBoundaryParse:$st,getRels:Hst,getTitle:Vst,getC4Type:Est,getC4ShapeInRow:Bst,getC4BoundaryInRow:Fst,setAccTitle:en,getAccTitle:tn,getAccDescription:nn,setAccDescription:rn,getConfig:b(()=>Fe().c4,"getConfig"),clear:Yst,LINETYPE:Xst,ARROWTYPE:jst,PLACEMENT:Kst,setTitle:Zst,setC4Type:Sst},l$=b(function(t,e){return mm(t,e)},"drawRect"),xye=b(function(t,e,r,n,i,a){let s=t.append("image");s.attr("width",e),s.attr("height",r),s.attr("x",n),s.attr("y",i);let o=a.startsWith("data:image/png;base64")?a:(0,vye.sanitizeUrl)(a);s.attr("xlink:href",o)},"drawImage"),Qst=b((t,e,r)=>{let n=t.append("g"),i=0;for(let a of e){let s=a.textColor?a.textColor:"#444444",o=a.lineColor?a.lineColor:"#444444",l=a.offsetX?parseInt(a.offsetX):0,u=a.offsetY?parseInt(a.offsetY):0,h="";if(i===0){let d=n.append("line");d.attr("x1",a.startPoint.x),d.attr("y1",a.startPoint.y),d.attr("x2",a.endPoint.x),d.attr("y2",a.endPoint.y),d.attr("stroke-width","1"),d.attr("stroke",o),d.style("fill","none"),a.type!=="rel_b"&&d.attr("marker-end","url("+h+"#arrowhead)"),(a.type==="birel"||a.type==="rel_b")&&d.attr("marker-start","url("+h+"#arrowend)"),i=-1}else{let d=n.append("path");d.attr("fill","none").attr("stroke-width","1").attr("stroke",o).attr("d","Mstartx,starty Qcontrolx,controly stopx,stopy ".replaceAll("startx",a.startPoint.x).replaceAll("starty",a.startPoint.y).replaceAll("controlx",a.startPoint.x+(a.endPoint.x-a.startPoint.x)/2-(a.endPoint.x-a.startPoint.x)/4).replaceAll("controly",a.startPoint.y+(a.endPoint.y-a.startPoint.y)/2).replaceAll("stopx",a.endPoint.x).replaceAll("stopy",a.endPoint.y)),a.type!=="rel_b"&&d.attr("marker-end","url("+h+"#arrowhead)"),(a.type==="birel"||a.type==="rel_b")&&d.attr("marker-start","url("+h+"#arrowend)")}let f=r.messageFont();Zh(r)(a.label.text,n,Math.min(a.startPoint.x,a.endPoint.x)+Math.abs(a.endPoint.x-a.startPoint.x)/2+l,Math.min(a.startPoint.y,a.endPoint.y)+Math.abs(a.endPoint.y-a.startPoint.y)/2+u,a.label.width,a.label.height,{fill:s},f),a.techn&&a.techn.text!==""&&(f=r.messageFont(),Zh(r)("["+a.techn.text+"]",n,Math.min(a.startPoint.x,a.endPoint.x)+Math.abs(a.endPoint.x-a.startPoint.x)/2+l,Math.min(a.startPoint.y,a.endPoint.y)+Math.abs(a.endPoint.y-a.startPoint.y)/2+r.messageFontSize+5+u,Math.max(a.label.width,a.techn.width),a.techn.height,{fill:s,"font-style":"italic"},f))}},"drawRels"),Jst=b(function(t,e,r){let n=t.append("g"),i=e.bgColor?e.bgColor:"none",a=e.borderColor?e.borderColor:"#444444",s=e.fontColor?e.fontColor:"black",o={"stroke-width":1,"stroke-dasharray":"7.0,7.0"};e.nodeType&&(o={"stroke-width":1});let l={x:e.x,y:e.y,fill:i,stroke:a,width:e.width,height:e.height,rx:2.5,ry:2.5,attrs:o};l$(n,l);let u=r.boundaryFont();u.fontWeight="bold",u.fontSize=u.fontSize+2,u.fontColor=s,Zh(r)(e.label.text,n,e.x,e.y+e.label.Y,e.width,e.height,{fill:"#444444"},u),e.type&&e.type.text!==""&&(u=r.boundaryFont(),u.fontColor=s,Zh(r)(e.type.text,n,e.x,e.y+e.type.Y,e.width,e.height,{fill:"#444444"},u)),e.descr&&e.descr.text!==""&&(u=r.boundaryFont(),u.fontSize=u.fontSize-2,u.fontColor=s,Zh(r)(e.descr.text,n,e.x,e.y+e.descr.Y,e.width,e.height,{fill:"#444444"},u))},"drawBoundary"),eot=b(function(t,e,r){let n=e.bgColor?e.bgColor:r[e.typeC4Shape.text+"_bg_color"],i=e.borderColor?e.borderColor:r[e.typeC4Shape.text+"_border_color"],a=e.fontColor?e.fontColor:"#FFFFFF",s="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAIAAADYYG7QAAACD0lEQVR4Xu2YoU4EMRCGT+4j8Ai8AhaH4QHgAUjQuFMECUgMIUgwJAgMhgQsAYUiJCiQIBBY+EITsjfTdme6V24v4c8vyGbb+ZjOtN0bNcvjQXmkH83WvYBWto6PLm6v7p7uH1/w2fXD+PBycX1Pv2l3IdDm/vn7x+dXQiAubRzoURa7gRZWd0iGRIiJbOnhnfYBQZNJjNbuyY2eJG8fkDE3bbG4ep6MHUAsgYxmE3nVs6VsBWJSGccsOlFPmLIViMzLOB7pCVO2AtHJMohH7Fh6zqitQK7m0rJvAVYgGcEpe//PLdDz65sM4pF9N7ICcXDKIB5Nv6j7tD0NoSdM2QrU9Gg0ewE1LqBhHR3BBdvj2vapnidjHxD/q6vd7Pvhr31AwcY8eXMTXAKECZZJFXuEq27aLgQK5uLMohCenGGuGewOxSjBvYBqeG6B+Nqiblggdjnc+ZXDy+FNFpFzw76O3UBAROuXh6FoiAcf5g9eTvUgzy0nWg6I8cXHRUpg5bOVBCo+KDpFajOf23GgPme7RSQ+lacIENUgJ6gg1k6HjgOlqnLqip4tEuhv0hNEMXUD0clyXE3p6pZA0S2nnvTlXwLJEZWlb7cTQH1+USgTN4VhAenm/wea1OCAOmqo6fE1WCb9WSKBah+rbUWPWAmE2Rvk0ApiB45eOyNAzU8xcTvj8KvkKEoOaIYeHNA3ZuygAvFMUO0AAAAASUVORK5CYII=";switch(e.typeC4Shape.text){case"person":s="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAIAAADYYG7QAAACD0lEQVR4Xu2YoU4EMRCGT+4j8Ai8AhaH4QHgAUjQuFMECUgMIUgwJAgMhgQsAYUiJCiQIBBY+EITsjfTdme6V24v4c8vyGbb+ZjOtN0bNcvjQXmkH83WvYBWto6PLm6v7p7uH1/w2fXD+PBycX1Pv2l3IdDm/vn7x+dXQiAubRzoURa7gRZWd0iGRIiJbOnhnfYBQZNJjNbuyY2eJG8fkDE3bbG4ep6MHUAsgYxmE3nVs6VsBWJSGccsOlFPmLIViMzLOB7pCVO2AtHJMohH7Fh6zqitQK7m0rJvAVYgGcEpe//PLdDz65sM4pF9N7ICcXDKIB5Nv6j7tD0NoSdM2QrU9Gg0ewE1LqBhHR3BBdvj2vapnidjHxD/q6vd7Pvhr31AwcY8eXMTXAKECZZJFXuEq27aLgQK5uLMohCenGGuGewOxSjBvYBqeG6B+Nqiblggdjnc+ZXDy+FNFpFzw76O3UBAROuXh6FoiAcf5g9eTvUgzy0nWg6I8cXHRUpg5bOVBCo+KDpFajOf23GgPme7RSQ+lacIENUgJ6gg1k6HjgOlqnLqip4tEuhv0hNEMXUD0clyXE3p6pZA0S2nnvTlXwLJEZWlb7cTQH1+USgTN4VhAenm/wea1OCAOmqo6fE1WCb9WSKBah+rbUWPWAmE2Rvk0ApiB45eOyNAzU8xcTvj8KvkKEoOaIYeHNA3ZuygAvFMUO0AAAAASUVORK5CYII=";break;case"external_person":s="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAIAAADYYG7QAAAB6ElEQVR4Xu2YLY+EMBCG9+dWr0aj0Wg0Go1Go0+j8Xdv2uTCvv1gpt0ebHKPuhDaeW4605Z9mJvx4AdXUyTUdd08z+u6flmWZRnHsWkafk9DptAwDPu+f0eAYtu2PEaGWuj5fCIZrBAC2eLBAnRCsEkkxmeaJp7iDJ2QMDdHsLg8SxKFEJaAo8lAXnmuOFIhTMpxxKATebo4UiFknuNo4OniSIXQyRxEA3YsnjGCVEjVXD7yLUAqxBGUyPv/Y4W2beMgGuS7kVQIBycH0fD+oi5pezQETxdHKmQKGk1eQEYldK+jw5GxPfZ9z7Mk0Qnhf1W1m3w//EUn5BDmSZsbR44QQLBEqrBHqOrmSKaQAxdnLArCrxZcM7A7ZKs4ioRq8LFC+NpC3WCBJsvpVw5edm9iEXFuyNfxXAgSwfrFQ1c0iNda8AdejvUgnktOtJQQxmcfFzGglc5WVCj7oDgFqU18boeFSs52CUh8LE8BIVQDT1ABrB0HtgSEYlX5doJnCwv9TXocKCaKbnwhdDKPq4lf3SwU3HLq4V/+WYhHVMa/3b4IlfyikAduCkcBc7mQ3/z/Qq/cTuikhkzB12Ae/mcJC9U+Vo8Ej1gWAtgbeGgFsAMHr50BIWOLCbezvhpBFUdY6EJuJ/QDW0XoMX60zZ0AAAAASUVORK5CYII=";break}let o=t.append("g");o.attr("class","person-man");let l=x0();switch(e.typeC4Shape.text){case"person":case"external_person":case"system":case"external_system":case"container":case"external_container":case"component":case"external_component":l.x=e.x,l.y=e.y,l.fill=n,l.width=e.width,l.height=e.height,l.stroke=i,l.rx=2.5,l.ry=2.5,l.attrs={"stroke-width":.5},l$(o,l);break;case"system_db":case"external_system_db":case"container_db":case"external_container_db":case"component_db":case"external_component_db":o.append("path").attr("fill",n).attr("stroke-width","0.5").attr("stroke",i).attr("d","Mstartx,startyc0,-10 half,-10 half,-10c0,0 half,0 half,10l0,heightc0,10 -half,10 -half,10c0,0 -half,0 -half,-10l0,-height".replaceAll("startx",e.x).replaceAll("starty",e.y).replaceAll("half",e.width/2).replaceAll("height",e.height)),o.append("path").attr("fill","none").attr("stroke-width","0.5").attr("stroke",i).attr("d","Mstartx,startyc0,10 half,10 half,10c0,0 half,0 half,-10".replaceAll("startx",e.x).replaceAll("starty",e.y).replaceAll("half",e.width/2));break;case"system_queue":case"external_system_queue":case"container_queue":case"external_container_queue":case"component_queue":case"external_component_queue":o.append("path").attr("fill",n).attr("stroke-width","0.5").attr("stroke",i).attr("d","Mstartx,startylwidth,0c5,0 5,half 5,halfc0,0 0,half -5,halfl-width,0c-5,0 -5,-half -5,-halfc0,0 0,-half 5,-half".replaceAll("startx",e.x).replaceAll("starty",e.y).replaceAll("width",e.width).replaceAll("half",e.height/2)),o.append("path").attr("fill","none").attr("stroke-width","0.5").attr("stroke",i).attr("d","Mstartx,startyc-5,0 -5,half -5,halfc0,half 5,half 5,half".replaceAll("startx",e.x+e.width).replaceAll("starty",e.y).replaceAll("half",e.height/2));break}let u=uot(r,e.typeC4Shape.text);switch(o.append("text").attr("fill",a).attr("font-family",u.fontFamily).attr("font-size",u.fontSize-2).attr("font-style","italic").attr("lengthAdjust","spacing").attr("textLength",e.typeC4Shape.width).attr("x",e.x+e.width/2-e.typeC4Shape.width/2).attr("y",e.y+e.typeC4Shape.Y).text("<<"+e.typeC4Shape.text+">>"),e.typeC4Shape.text){case"person":case"external_person":xye(o,48,48,e.x+e.width/2-24,e.y+e.image.Y,s);break}let h=r[e.typeC4Shape.text+"Font"]();return h.fontWeight="bold",h.fontSize=h.fontSize+2,h.fontColor=a,Zh(r)(e.label.text,o,e.x,e.y+e.label.Y,e.width,e.height,{fill:a},h),h=r[e.typeC4Shape.text+"Font"](),h.fontColor=a,e.techn&&e.techn?.text!==""?Zh(r)(e.techn.text,o,e.x,e.y+e.techn.Y,e.width,e.height,{fill:a,"font-style":"italic"},h):e.type&&e.type.text!==""&&Zh(r)(e.type.text,o,e.x,e.y+e.type.Y,e.width,e.height,{fill:a,"font-style":"italic"},h),e.descr&&e.descr.text!==""&&(h=r.personFont(),h.fontColor=a,Zh(r)(e.descr.text,o,e.x,e.y+e.descr.Y,e.width,e.height,{fill:a},h)),e.height},"drawC4Shape"),tot=b(function(t){t.append("defs").append("symbol").attr("id","database").attr("fill-rule","evenodd").attr("clip-rule","evenodd").append("path").attr("transform","scale(.5)").attr("d","M12.258.001l.256.004.255.005.253.008.251.01.249.012.247.015.246.016.242.019.241.02.239.023.236.024.233.027.231.028.229.031.225.032.223.034.22.036.217.038.214.04.211.041.208.043.205.045.201.046.198.048.194.05.191.051.187.053.183.054.18.056.175.057.172.059.168.06.163.061.16.063.155.064.15.066.074.033.073.033.071.034.07.034.069.035.068.035.067.035.066.035.064.036.064.036.062.036.06.036.06.037.058.037.058.037.055.038.055.038.053.038.052.038.051.039.05.039.048.039.047.039.045.04.044.04.043.04.041.04.04.041.039.041.037.041.036.041.034.041.033.042.032.042.03.042.029.042.027.042.026.043.024.043.023.043.021.043.02.043.018.044.017.043.015.044.013.044.012.044.011.045.009.044.007.045.006.045.004.045.002.045.001.045v17l-.001.045-.002.045-.004.045-.006.045-.007.045-.009.044-.011.045-.012.044-.013.044-.015.044-.017.043-.018.044-.02.043-.021.043-.023.043-.024.043-.026.043-.027.042-.029.042-.03.042-.032.042-.033.042-.034.041-.036.041-.037.041-.039.041-.04.041-.041.04-.043.04-.044.04-.045.04-.047.039-.048.039-.05.039-.051.039-.052.038-.053.038-.055.038-.055.038-.058.037-.058.037-.06.037-.06.036-.062.036-.064.036-.064.036-.066.035-.067.035-.068.035-.069.035-.07.034-.071.034-.073.033-.074.033-.15.066-.155.064-.16.063-.163.061-.168.06-.172.059-.175.057-.18.056-.183.054-.187.053-.191.051-.194.05-.198.048-.201.046-.205.045-.208.043-.211.041-.214.04-.217.038-.22.036-.223.034-.225.032-.229.031-.231.028-.233.027-.236.024-.239.023-.241.02-.242.019-.246.016-.247.015-.249.012-.251.01-.253.008-.255.005-.256.004-.258.001-.258-.001-.256-.004-.255-.005-.253-.008-.251-.01-.249-.012-.247-.015-.245-.016-.243-.019-.241-.02-.238-.023-.236-.024-.234-.027-.231-.028-.228-.031-.226-.032-.223-.034-.22-.036-.217-.038-.214-.04-.211-.041-.208-.043-.204-.045-.201-.046-.198-.048-.195-.05-.19-.051-.187-.053-.184-.054-.179-.056-.176-.057-.172-.059-.167-.06-.164-.061-.159-.063-.155-.064-.151-.066-.074-.033-.072-.033-.072-.034-.07-.034-.069-.035-.068-.035-.067-.035-.066-.035-.064-.036-.063-.036-.062-.036-.061-.036-.06-.037-.058-.037-.057-.037-.056-.038-.055-.038-.053-.038-.052-.038-.051-.039-.049-.039-.049-.039-.046-.039-.046-.04-.044-.04-.043-.04-.041-.04-.04-.041-.039-.041-.037-.041-.036-.041-.034-.041-.033-.042-.032-.042-.03-.042-.029-.042-.027-.042-.026-.043-.024-.043-.023-.043-.021-.043-.02-.043-.018-.044-.017-.043-.015-.044-.013-.044-.012-.044-.011-.045-.009-.044-.007-.045-.006-.045-.004-.045-.002-.045-.001-.045v-17l.001-.045.002-.045.004-.045.006-.045.007-.045.009-.044.011-.045.012-.044.013-.044.015-.044.017-.043.018-.044.02-.043.021-.043.023-.043.024-.043.026-.043.027-.042.029-.042.03-.042.032-.042.033-.042.034-.041.036-.041.037-.041.039-.041.04-.041.041-.04.043-.04.044-.04.046-.04.046-.039.049-.039.049-.039.051-.039.052-.038.053-.038.055-.038.056-.038.057-.037.058-.037.06-.037.061-.036.062-.036.063-.036.064-.036.066-.035.067-.035.068-.035.069-.035.07-.034.072-.034.072-.033.074-.033.151-.066.155-.064.159-.063.164-.061.167-.06.172-.059.176-.057.179-.056.184-.054.187-.053.19-.051.195-.05.198-.048.201-.046.204-.045.208-.043.211-.041.214-.04.217-.038.22-.036.223-.034.226-.032.228-.031.231-.028.234-.027.236-.024.238-.023.241-.02.243-.019.245-.016.247-.015.249-.012.251-.01.253-.008.255-.005.256-.004.258-.001.258.001zm-9.258 20.499v.01l.001.021.003.021.004.022.005.021.006.022.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.023.018.024.019.024.021.024.022.025.023.024.024.025.052.049.056.05.061.051.066.051.07.051.075.051.079.052.084.052.088.052.092.052.097.052.102.051.105.052.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.048.144.049.147.047.152.047.155.047.16.045.163.045.167.043.171.043.176.041.178.041.183.039.187.039.19.037.194.035.197.035.202.033.204.031.209.03.212.029.216.027.219.025.222.024.226.021.23.02.233.018.236.016.24.015.243.012.246.01.249.008.253.005.256.004.259.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.021.224-.024.22-.026.216-.027.212-.028.21-.031.205-.031.202-.034.198-.034.194-.036.191-.037.187-.039.183-.04.179-.04.175-.042.172-.043.168-.044.163-.045.16-.046.155-.046.152-.047.148-.048.143-.049.139-.049.136-.05.131-.05.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.053.083-.051.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.05.023-.024.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.023.01-.022.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.127l-.077.055-.08.053-.083.054-.085.053-.087.052-.09.052-.093.051-.095.05-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.045-.118.044-.12.043-.122.042-.124.042-.126.041-.128.04-.13.04-.132.038-.134.038-.135.037-.138.037-.139.035-.142.035-.143.034-.144.033-.147.032-.148.031-.15.03-.151.03-.153.029-.154.027-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.01-.179.008-.179.008-.181.006-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.006-.179-.008-.179-.008-.178-.01-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.027-.153-.029-.151-.03-.15-.03-.148-.031-.146-.032-.145-.033-.143-.034-.141-.035-.14-.035-.137-.037-.136-.037-.134-.038-.132-.038-.13-.04-.128-.04-.126-.041-.124-.042-.122-.042-.12-.044-.117-.043-.116-.045-.113-.045-.112-.046-.109-.047-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.05-.093-.052-.09-.051-.087-.052-.085-.053-.083-.054-.08-.054-.077-.054v4.127zm0-5.654v.011l.001.021.003.021.004.021.005.022.006.022.007.022.009.022.01.022.011.023.012.023.013.023.015.024.016.023.017.024.018.024.019.024.021.024.022.024.023.025.024.024.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.052.11.051.114.051.119.052.123.05.127.051.131.05.135.049.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.044.171.042.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.022.23.02.233.018.236.016.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.012.241-.015.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.048.139-.05.136-.049.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.051.051-.049.023-.025.023-.024.021-.025.02-.024.019-.024.018-.024.017-.024.015-.023.014-.023.013-.024.012-.022.01-.023.01-.023.008-.022.006-.022.006-.022.004-.021.004-.022.001-.021.001-.021v-4.139l-.077.054-.08.054-.083.054-.085.052-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.044-.118.044-.12.044-.122.042-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.035-.143.033-.144.033-.147.033-.148.031-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.009-.179.009-.179.007-.181.007-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.007-.179-.007-.179-.009-.178-.009-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.031-.146-.033-.145-.033-.143-.033-.141-.035-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.04-.126-.041-.124-.042-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.051-.093-.051-.09-.051-.087-.053-.085-.052-.083-.054-.08-.054-.077-.054v4.139zm0-5.666v.011l.001.02.003.022.004.021.005.022.006.021.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.024.018.023.019.024.021.025.022.024.023.024.024.025.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.051.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.043.171.043.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.021.23.02.233.018.236.017.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.013.241-.014.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.049.139-.049.136-.049.131-.051.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.049.023-.025.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.022.01-.023.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.153l-.077.054-.08.054-.083.053-.085.053-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.048-.105.048-.106.048-.109.046-.111.046-.114.046-.115.044-.118.044-.12.043-.122.043-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.034-.143.034-.144.033-.147.032-.148.032-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.024-.161.024-.162.023-.163.023-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.01-.178.01-.179.009-.179.007-.181.006-.182.006-.182.004-.184.003-.184.001-.185.001-.185-.001-.184-.001-.184-.003-.182-.004-.182-.006-.181-.006-.179-.007-.179-.009-.178-.01-.176-.01-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.023-.162-.023-.161-.024-.159-.024-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.032-.146-.032-.145-.033-.143-.034-.141-.034-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.041-.126-.041-.124-.041-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.048-.105-.048-.102-.048-.1-.05-.097-.049-.095-.051-.093-.051-.09-.052-.087-.052-.085-.053-.083-.053-.08-.054-.077-.054v4.153zm8.74-8.179l-.257.004-.254.005-.25.008-.247.011-.244.012-.241.014-.237.016-.233.018-.231.021-.226.022-.224.023-.22.026-.216.027-.212.028-.21.031-.205.032-.202.033-.198.034-.194.036-.191.038-.187.038-.183.04-.179.041-.175.042-.172.043-.168.043-.163.045-.16.046-.155.046-.152.048-.148.048-.143.048-.139.049-.136.05-.131.05-.126.051-.123.051-.118.051-.114.052-.11.052-.106.052-.101.052-.096.052-.092.052-.088.052-.083.052-.079.052-.074.051-.07.052-.065.051-.06.05-.056.05-.051.05-.023.025-.023.024-.021.024-.02.025-.019.024-.018.024-.017.023-.015.024-.014.023-.013.023-.012.023-.01.023-.01.022-.008.022-.006.023-.006.021-.004.022-.004.021-.001.021-.001.021.001.021.001.021.004.021.004.022.006.021.006.023.008.022.01.022.01.023.012.023.013.023.014.023.015.024.017.023.018.024.019.024.02.025.021.024.023.024.023.025.051.05.056.05.06.05.065.051.07.052.074.051.079.052.083.052.088.052.092.052.096.052.101.052.106.052.11.052.114.052.118.051.123.051.126.051.131.05.136.05.139.049.143.048.148.048.152.048.155.046.16.046.163.045.168.043.172.043.175.042.179.041.183.04.187.038.191.038.194.036.198.034.202.033.205.032.21.031.212.028.216.027.22.026.224.023.226.022.231.021.233.018.237.016.241.014.244.012.247.011.25.008.254.005.257.004.26.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.022.224-.023.22-.026.216-.027.212-.028.21-.031.205-.032.202-.033.198-.034.194-.036.191-.038.187-.038.183-.04.179-.041.175-.042.172-.043.168-.043.163-.045.16-.046.155-.046.152-.048.148-.048.143-.048.139-.049.136-.05.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.05.051-.05.023-.025.023-.024.021-.024.02-.025.019-.024.018-.024.017-.023.015-.024.014-.023.013-.023.012-.023.01-.023.01-.022.008-.022.006-.023.006-.021.004-.022.004-.021.001-.021.001-.021-.001-.021-.001-.021-.004-.021-.004-.022-.006-.021-.006-.023-.008-.022-.01-.022-.01-.023-.012-.023-.013-.023-.014-.023-.015-.024-.017-.023-.018-.024-.019-.024-.02-.025-.021-.024-.023-.024-.023-.025-.051-.05-.056-.05-.06-.05-.065-.051-.07-.052-.074-.051-.079-.052-.083-.052-.088-.052-.092-.052-.096-.052-.101-.052-.106-.052-.11-.052-.114-.052-.118-.051-.123-.051-.126-.051-.131-.05-.136-.05-.139-.049-.143-.048-.148-.048-.152-.048-.155-.046-.16-.046-.163-.045-.168-.043-.172-.043-.175-.042-.179-.041-.183-.04-.187-.038-.191-.038-.194-.036-.198-.034-.202-.033-.205-.032-.21-.031-.212-.028-.216-.027-.22-.026-.224-.023-.226-.022-.231-.021-.233-.018-.237-.016-.241-.014-.244-.012-.247-.011-.25-.008-.254-.005-.257-.004-.26-.001-.26.001z")},"insertDatabaseIcon"),rot=b(function(t){t.append("defs").append("symbol").attr("id","computer").attr("width","24").attr("height","24").append("path").attr("transform","scale(.5)").attr("d","M2 2v13h20v-13h-20zm18 11h-16v-9h16v9zm-10.228 6l.466-1h3.524l.467 1h-4.457zm14.228 3h-24l2-6h2.104l-1.33 4h18.45l-1.297-4h2.073l2 6zm-5-10h-14v-7h14v7z")},"insertComputerIcon"),not=b(function(t){t.append("defs").append("symbol").attr("id","clock").attr("width","24").attr("height","24").append("path").attr("transform","scale(.5)").attr("d","M12 2c5.514 0 10 4.486 10 10s-4.486 10-10 10-10-4.486-10-10 4.486-10 10-10zm0-2c-6.627 0-12 5.373-12 12s5.373 12 12 12 12-5.373 12-12-5.373-12-12-12zm5.848 12.459c.202.038.202.333.001.372-1.907.361-6.045 1.111-6.547 1.111-.719 0-1.301-.582-1.301-1.301 0-.512.77-5.447 1.125-7.445.034-.192.312-.181.343.014l.985 6.238 5.394 1.011z")},"insertClockIcon"),iot=b(function(t){t.append("defs").append("marker").attr("id","arrowhead").attr("refX",9).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z")},"insertArrowHead"),aot=b(function(t){t.append("defs").append("marker").attr("id","arrowend").attr("refX",1).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 10 0 L 0 5 L 10 10 z")},"insertArrowEnd"),sot=b(function(t){t.append("defs").append("marker").attr("id","filled-head").attr("refX",18).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},"insertArrowFilledHead"),oot=b(function(t){t.append("defs").append("marker").attr("id","sequencenumber").attr("refX",15).attr("refY",15).attr("markerWidth",60).attr("markerHeight",40).attr("orient","auto").append("circle").attr("cx",15).attr("cy",15).attr("r",6)},"insertDynamicNumber"),lot=b(function(t){let r=t.append("defs").append("marker").attr("id","crosshead").attr("markerWidth",15).attr("markerHeight",8).attr("orient","auto").attr("refX",16).attr("refY",4);r.append("path").attr("fill","black").attr("stroke","#000000").style("stroke-dasharray","0, 0").attr("stroke-width","1px").attr("d","M 9,2 V 6 L16,4 Z"),r.append("path").attr("fill","none").attr("stroke","#000000").style("stroke-dasharray","0, 0").attr("stroke-width","1px").attr("d","M 0,1 L 6,7 M 6,1 L 0,7")},"insertArrowCrossHead"),uot=b((t,e)=>({fontFamily:t[e+"FontFamily"],fontSize:t[e+"FontSize"],fontWeight:t[e+"FontWeight"]}),"getC4ShapeFont"),Zh=(function(){function t(i,a,s,o,l,u,h){let f=a.append("text").attr("x",s+l/2).attr("y",o+u/2+5).style("text-anchor","middle").text(i);n(f,h)}b(t,"byText");function e(i,a,s,o,l,u,h,f){let{fontSize:d,fontFamily:p,fontWeight:m}=f,g=i.split(St.lineBreakRegex);for(let y=0;y=this.data.widthLimit||n>=this.data.widthLimit||this.nextData.cnt>bye)&&(r=this.nextData.startx+e.margin+hr.nextLinePaddingX,i=this.nextData.stopy+e.margin*2,this.nextData.stopx=n=r+e.width,this.nextData.starty=this.nextData.stopy,this.nextData.stopy=a=i+e.height,this.nextData.cnt=1),e.x=r,e.y=i,this.updateVal(this.data,"startx",r,Math.min),this.updateVal(this.data,"starty",i,Math.min),this.updateVal(this.data,"stopx",n,Math.max),this.updateVal(this.data,"stopy",a,Math.max),this.updateVal(this.nextData,"startx",r,Math.min),this.updateVal(this.nextData,"starty",i,Math.min),this.updateVal(this.nextData,"stopx",n,Math.max),this.updateVal(this.nextData,"stopy",a,Math.max)}init(e){this.name="",this.data={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0,widthLimit:void 0},this.nextData={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0,cnt:0},a$(e.db.getConfig())}bumpLastMargin(e){this.data.stopx+=e,this.data.stopy+=e}},b(Ty,"Bounds"),Ty),a$=b(function(t){Gi(hr,t),t.fontFamily&&(hr.personFontFamily=hr.systemFontFamily=hr.messageFontFamily=t.fontFamily),t.fontSize&&(hr.personFontSize=hr.systemFontSize=hr.messageFontSize=t.fontSize),t.fontWeight&&(hr.personFontWeight=hr.systemFontWeight=hr.messageFontWeight=t.fontWeight)},"setConf"),e6=b((t,e)=>({fontFamily:t[e+"FontFamily"],fontSize:t[e+"FontSize"],fontWeight:t[e+"FontWeight"]}),"c4ShapeFont"),YS=b(t=>({fontFamily:t.boundaryFontFamily,fontSize:t.boundaryFontSize,fontWeight:t.boundaryFontWeight}),"boundaryFont"),cot=b(t=>({fontFamily:t.messageFontFamily,fontSize:t.messageFontSize,fontWeight:t.messageFontWeight}),"messageFont");b(yu,"calcC4ShapeTextWH");kye=b(function(t,e,r){e.x=r.data.startx,e.y=r.data.starty,e.width=r.data.stopx-r.data.startx,e.height=r.data.stopy-r.data.starty,e.label.y=hr.c4ShapeMargin-35;let n=e.wrap&&hr.wrap,i=YS(hr);i.fontSize=i.fontSize+2,i.fontWeight="bold";let a=_s(e.label.text,i);yu("label",e,n,i,a),b0.drawBoundary(t,e,hr)},"drawBoundary"),Tye=b(function(t,e,r,n){let i=0;for(let a of n){i=0;let s=r[a],o=e6(hr,s.typeC4Shape.text);switch(o.fontSize=o.fontSize-2,s.typeC4Shape.width=_s("\xAB"+s.typeC4Shape.text+"\xBB",o),s.typeC4Shape.height=o.fontSize+2,s.typeC4Shape.Y=hr.c4ShapePadding,i=s.typeC4Shape.Y+s.typeC4Shape.height-4,s.image={width:0,height:0,Y:0},s.typeC4Shape.text){case"person":case"external_person":s.image.width=48,s.image.height=48,s.image.Y=i,i=s.image.Y+s.image.height;break}s.sprite&&(s.image.width=48,s.image.height=48,s.image.Y=i,i=s.image.Y+s.image.height);let l=s.wrap&&hr.wrap,u=hr.width-hr.c4ShapePadding*2,h=e6(hr,s.typeC4Shape.text);if(h.fontSize=h.fontSize+2,h.fontWeight="bold",yu("label",s,l,h,u),s.label.Y=i+8,i=s.label.Y+s.label.height,s.type&&s.type.text!==""){s.type.text="["+s.type.text+"]";let p=e6(hr,s.typeC4Shape.text);yu("type",s,l,p,u),s.type.Y=i+5,i=s.type.Y+s.type.height}else if(s.techn&&s.techn.text!==""){s.techn.text="["+s.techn.text+"]";let p=e6(hr,s.techn.text);yu("techn",s,l,p,u),s.techn.Y=i+5,i=s.techn.Y+s.techn.height}let f=i,d=s.label.width;if(s.descr&&s.descr.text!==""){let p=e6(hr,s.typeC4Shape.text);yu("descr",s,l,p,u),s.descr.Y=i+20,i=s.descr.Y+s.descr.height,d=Math.max(s.label.width,s.descr.width),f=i-s.descr.textLines*5}d=d+hr.c4ShapePadding,s.width=Math.max(s.width||hr.width,d,hr.width),s.height=Math.max(s.height||hr.height,f,hr.height),s.margin=s.margin||hr.c4ShapeMargin,t.insert(s),b0.drawC4Shape(e,s,hr)}t.bumpLastMargin(hr.c4ShapeMargin)},"drawC4ShapeArray"),gu=(Ey=class{constructor(e,r){this.x=e,this.y=r}},b(Ey,"Point"),Ey),dye=b(function(t,e){let r=t.x,n=t.y,i=e.x,a=e.y,s=r+t.width/2,o=n+t.height/2,l=Math.abs(r-i),u=Math.abs(n-a),h=u/l,f=t.height/t.width,d=null;return n==a&&ri?d=new gu(r,o):r==i&&na&&(d=new gu(s,n)),r>i&&n=h?d=new gu(r,o+h*t.width/2):d=new gu(s-l/u*t.height/2,n+t.height):r=h?d=new gu(r+t.width,o+h*t.width/2):d=new gu(s+l/u*t.height/2,n+t.height):ra?f>=h?d=new gu(r+t.width,o-h*t.width/2):d=new gu(s+t.height/2*l/u,n):r>i&&n>a&&(f>=h?d=new gu(r,o-t.width/2*h):d=new gu(s-t.height/2*l/u,n)),d},"getIntersectPoint"),hot=b(function(t,e){let r={x:0,y:0};r.x=e.x+e.width/2,r.y=e.y+e.height/2;let n=dye(t,r);r.x=t.x+t.width/2,r.y=t.y+t.height/2;let i=dye(e,r);return{startPoint:n,endPoint:i}},"getIntersectPoints"),fot=b(function(t,e,r,n){let i=0;for(let a of e){i=i+1;let s=a.wrap&&hr.wrap,o=cot(hr);n.db.getC4Type()==="C4Dynamic"&&(a.label.text=i+": "+a.label.text);let u=_s(a.label.text,o);yu("label",a,s,o,u),a.techn&&a.techn.text!==""&&(u=_s(a.techn.text,o),yu("techn",a,s,o,u)),a.descr&&a.descr.text!==""&&(u=_s(a.descr.text,o),yu("descr",a,s,o,u));let h=r(a.from),f=r(a.to),d=hot(h,f);a.startPoint=d.startPoint,a.endPoint=d.endPoint}b0.drawRels(t,e,hr)},"drawRels");b(u$,"drawInsideBoundary");dot=b(function(t,e,r,n){hr=Fe().c4;let i=Fe().securityLevel,a;i==="sandbox"&&(a=dt("#i"+e));let s=i==="sandbox"?dt(a.nodes()[0].contentDocument.body):dt("body"),o=n.db;n.db.setWrap(hr.wrap),bye=o.getC4ShapeInRow(),i$=o.getC4BoundaryInRow(),he.debug(`C:${JSON.stringify(hr,null,2)}`);let l=i==="sandbox"?s.select(`[id="${e}"]`):dt(`[id="${e}"]`);b0.insertComputerIcon(l),b0.insertDatabaseIcon(l),b0.insertClockIcon(l);let u=new wye(n);u.setData(hr.diagramMarginX,hr.diagramMarginX,hr.diagramMarginY,hr.diagramMarginY),u.data.widthLimit=screen.availWidth,ZS=hr.diagramMarginX,QS=hr.diagramMarginY;let h=n.db.getTitle(),f=n.db.getBoundarys("");u$(l,"",u,f,n),b0.insertArrowHead(l),b0.insertArrowEnd(l),b0.insertArrowCrossHead(l),b0.insertArrowFilledHead(l),fot(l,n.db.getRels(),n.db.getC4Shape,n),u.data.stopx=ZS,u.data.stopy=QS;let d=u.data,m=d.stopy-d.starty+2*hr.diagramMarginY,y=d.stopx-d.startx+2*hr.diagramMarginX;h&&l.append("text").text(h).attr("x",(d.stopx-d.startx)/2-4*hr.diagramMarginX).attr("y",d.starty+hr.diagramMarginY),ei(l,m,y,hr.useMaxWidth);let v=h?60:0;l.attr("viewBox",d.startx-hr.diagramMarginX+" -"+(hr.diagramMarginY+v)+" "+y+" "+(m+v)),he.debug("models:",d)},"draw"),pye={drawPersonOrSystemArray:Tye,drawBoundary:kye,setConf:a$,draw:dot},pot=b(t=>`.person { stroke: ${t.personBorder}; fill: ${t.personBkg}; } -`,"getStyles"),Frt=Brt,zrt={parser:Wtt,db:HB,renderer:Ume,styles:Frt,init:x(({c4:t,wrap:e})=>{Ume.setConf(t),HB.setWrap(e)},"init")}});var xc,bc,$rt,Grt,wc=A(()=>{ur();cr();xc=x((t,e)=>{let r;return e==="sandbox"&&(r=We("#i"+t)),(e==="sandbox"?We(r.nodes()[0].contentDocument.body):We("body")).select(`[id="${t}"]`)},"getDiagramElement"),bc=x((t,e,r,n)=>{t.attr("class",r);let{width:a,height:i,x:s,y:o}=$rt(t,e);gn(t,i,a,n);let l=Grt(s,o,a,i,e);t.attr("viewBox",l),te.debug(`viewBox configured: ${l} with padding: ${e}`)},"setupViewPortForSVG"),$rt=x((t,e)=>{let r=t.node()?.getBBox()||{width:0,height:0,x:0,y:0};return{width:r.width+e*2,height:r.height+e*2,x:r.x,y:r.y}},"calculateDimensionsWithPadding"),Grt=x((t,e,r,n,a)=>`${t-a} ${e-a} ${r} ${n}`,"createViewBox")});var x_={};lr(x_,{diagram:()=>Zrt});var Urt,fv,qrt,Vrt,Hrt,Wrt,QB,ege,tge,Yrt,Xrt,jrt,Krt,Zrt,b_=A(()=>{YT();wc();su();au();sl();Fo();eo();Mo();Fi();ln();ur();cr();cr();Lo();Urt="flowchart-",qrt=(fv=class{constructor(){this.vertexCounter=0,this.config=Te(),this.vertices=new Map,this.edges=[],this.classes=new Map,this.subGraphs=[],this.subGraphLookup=new Map,this.tooltips=new Map,this.subCount=0,this.firstGraphFlag=!0,this.secCount=-1,this.posCrossRef=[],this.funs=[],this.setAccTitle=Sr,this.setAccDescription=Ar,this.setDiagramTitle=Fr,this.getAccTitle=_r,this.getAccDescription=Lr,this.getDiagramTitle=Rr,this.funs.push(this.setupToolTips.bind(this)),this.addVertex=this.addVertex.bind(this),this.firstGraph=this.firstGraph.bind(this),this.setDirection=this.setDirection.bind(this),this.addSubGraph=this.addSubGraph.bind(this),this.addLink=this.addLink.bind(this),this.setLink=this.setLink.bind(this),this.updateLink=this.updateLink.bind(this),this.addClass=this.addClass.bind(this),this.setClass=this.setClass.bind(this),this.destructLink=this.destructLink.bind(this),this.setClickEvent=this.setClickEvent.bind(this),this.setTooltip=this.setTooltip.bind(this),this.updateLinkInterpolate=this.updateLinkInterpolate.bind(this),this.setClickFun=this.setClickFun.bind(this),this.bindFunctions=this.bindFunctions.bind(this),this.lex={firstGraph:this.firstGraph.bind(this)},this.clear(),this.setGen("gen-2")}sanitizeText(e){return Ze.sanitizeText(e,this.config)}lookUpDomId(e){for(let r of this.vertices.values())if(r.id===e)return r.domId;return e}addVertex(e,r,n,a,i,s,o={},l){if(!e||e.trim().length===0)return;let u;if(l!==void 0){let p;l.includes(` +`,"getStyles"),mot=pot,got={parser:Tst,db:n$,renderer:pye,styles:mot,init:b(({c4:t,wrap:e})=>{pye.setConf(t),n$.setWrap(e)},"init")}});var k0,T0,yot,vot,E0=D(()=>{Nr();Or();k0=b((t,e)=>{let r;return e==="sandbox"&&(r=dt("#i"+t)),(e==="sandbox"?dt(r.nodes()[0].contentDocument.body):dt("body")).select(`[id="${t}"]`)},"getDiagramElement"),T0=b((t,e,r,n)=>{t.attr("class",r);let{width:i,height:a,x:s,y:o}=yot(t,e);ei(t,a,i,n);let l=vot(s,o,i,a,e);t.attr("viewBox",l),he.debug(`viewBox configured: ${l} with padding: ${e}`)},"setupViewPortForSVG"),yot=b((t,e)=>{let r=t.node()?.getBBox()||{width:0,height:0,x:0,y:0};return{width:r.width+e*2,height:r.height+e*2,x:r.x,y:r.y}},"calculateDimensionsWithPadding"),vot=b((t,e,r,n,i)=>`${t-i} ${e-i} ${r} ${n}`,"createViewBox")});var JS={};Mr(JS,{diagram:()=>Aot});var xot,Sy,bot,wot,kot,Tot,c$,Cye,_ye,Eot,Sot,Cot,_ot,Aot,eC=D(()=>{_T();E0();ac();nc();iu();Il();Wo();Al();As();Hn();Nr();Or();Or();Cl();xot="flowchart-",bot=(Sy=class{constructor(){this.vertexCounter=0,this.config=Fe(),this.vertices=new Map,this.edges=[],this.classes=new Map,this.subGraphs=[],this.subGraphLookup=new Map,this.tooltips=new Map,this.subCount=0,this.firstGraphFlag=!0,this.secCount=-1,this.posCrossRef=[],this.funs=[],this.setAccTitle=en,this.setAccDescription=rn,this.setDiagramTitle=pn,this.getAccTitle=tn,this.getAccDescription=nn,this.getDiagramTitle=an,this.funs.push(this.setupToolTips.bind(this)),this.addVertex=this.addVertex.bind(this),this.firstGraph=this.firstGraph.bind(this),this.setDirection=this.setDirection.bind(this),this.addSubGraph=this.addSubGraph.bind(this),this.addLink=this.addLink.bind(this),this.setLink=this.setLink.bind(this),this.updateLink=this.updateLink.bind(this),this.addClass=this.addClass.bind(this),this.setClass=this.setClass.bind(this),this.destructLink=this.destructLink.bind(this),this.setClickEvent=this.setClickEvent.bind(this),this.setTooltip=this.setTooltip.bind(this),this.updateLinkInterpolate=this.updateLinkInterpolate.bind(this),this.setClickFun=this.setClickFun.bind(this),this.bindFunctions=this.bindFunctions.bind(this),this.lex={firstGraph:this.firstGraph.bind(this)},this.clear(),this.setGen("gen-2")}sanitizeText(e){return St.sanitizeText(e,this.config)}lookUpDomId(e){for(let r of this.vertices.values())if(r.id===e)return r.domId;return e}addVertex(e,r,n,i,a,s,o={},l){if(!e||e.trim().length===0)return;let u;if(l!==void 0){let p;l.includes(` `)?p=l+` `:p=`{ `+l+` -}`,u=r1(p,{schema:t1})}let h=this.edges.find(p=>p.id===e);if(h){let p=u;p?.animate!==void 0&&(h.animate=p.animate),p?.animation!==void 0&&(h.animation=p.animation);return}let f,d=this.vertices.get(e);if(d===void 0&&(d={id:e,labelType:"text",domId:Urt+e+"-"+this.vertexCounter,styles:[],classes:[]},this.vertices.set(e,d)),this.vertexCounter++,r!==void 0?(this.config=Te(),f=this.sanitizeText(r.text.trim()),d.labelType=r.type,f.startsWith('"')&&f.endsWith('"')&&(f=f.substring(1,f.length-1)),d.text=f):d.text===void 0&&(d.text=e),n!==void 0&&(d.type=n),a?.forEach(p=>{d.styles.push(p)}),i?.forEach(p=>{d.classes.push(p)}),s!==void 0&&(d.dir=s),d.props===void 0?d.props=o:o!==void 0&&Object.assign(d.props,o),u!==void 0){if(u.shape){if(u.shape!==u.shape.toLowerCase()||u.shape.includes("_"))throw new Error(`No such shape: ${u.shape}. Shape names should be lowercase.`);if(!RP(u.shape))throw new Error(`No such shape: ${u.shape}.`);d.type=u?.shape}u?.label&&(d.text=u?.label),u?.icon&&(d.icon=u?.icon,!u.label?.trim()&&d.text===e&&(d.text="")),u?.form&&(d.form=u?.form),u?.pos&&(d.pos=u?.pos),u?.img&&(d.img=u?.img,!u.label?.trim()&&d.text===e&&(d.text="")),u?.constraint&&(d.constraint=u.constraint),u.w&&(d.assetWidth=Number(u.w)),u.h&&(d.assetHeight=Number(u.h))}}addSingleLink(e,r,n,a){let o={start:e,end:r,type:void 0,text:"",labelType:"text",classes:[],isUserDefinedId:!1,interpolate:this.edges.defaultInterpolate};te.info("abc78 Got edge...",o);let l=n.text;if(l!==void 0&&(o.text=this.sanitizeText(l.text.trim()),o.text.startsWith('"')&&o.text.endsWith('"')&&(o.text=o.text.substring(1,o.text.length-1)),o.labelType=l.type),n!==void 0&&(o.type=n.type,o.stroke=n.stroke,o.length=n.length>10?10:n.length),a&&!this.edges.some(u=>u.id===a))o.id=a,o.isUserDefinedId=!0;else{let u=this.edges.filter(h=>h.start===o.start&&h.end===o.end);u.length===0?o.id=vd(o.start,o.end,{counter:0,prefix:"L"}):o.id=vd(o.start,o.end,{counter:u.length+1,prefix:"L"})}if(this.edges.length<(this.config.maxEdges??500))te.info("Pushing edge..."),this.edges.push(o);else throw new Error(`Edge limit exceeded. ${this.edges.length} edges found, but the limit is ${this.config.maxEdges}. +}`,u=m2(p,{schema:p2})}let h=this.edges.find(p=>p.id===e);if(h){let p=u;p?.animate!==void 0&&(h.animate=p.animate),p?.animation!==void 0&&(h.animation=p.animation);return}let f,d=this.vertices.get(e);if(d===void 0&&(d={id:e,labelType:"text",domId:xot+e+"-"+this.vertexCounter,styles:[],classes:[]},this.vertices.set(e,d)),this.vertexCounter++,r!==void 0?(this.config=Fe(),f=this.sanitizeText(r.text.trim()),d.labelType=r.type,f.startsWith('"')&&f.endsWith('"')&&(f=f.substring(1,f.length-1)),d.text=f):d.text===void 0&&(d.text=e),n!==void 0&&(d.type=n),i?.forEach(p=>{d.styles.push(p)}),a?.forEach(p=>{d.classes.push(p)}),s!==void 0&&(d.dir=s),d.props===void 0?d.props=o:o!==void 0&&Object.assign(d.props,o),u!==void 0){if(u.shape){if(u.shape!==u.shape.toLowerCase()||u.shape.includes("_"))throw new Error(`No such shape: ${u.shape}. Shape names should be lowercase.`);if(!qF(u.shape))throw new Error(`No such shape: ${u.shape}.`);d.type=u?.shape}u?.label&&(d.text=u?.label),u?.icon&&(d.icon=u?.icon,!u.label?.trim()&&d.text===e&&(d.text="")),u?.form&&(d.form=u?.form),u?.pos&&(d.pos=u?.pos),u?.img&&(d.img=u?.img,!u.label?.trim()&&d.text===e&&(d.text="")),u?.constraint&&(d.constraint=u.constraint),u.w&&(d.assetWidth=Number(u.w)),u.h&&(d.assetHeight=Number(u.h))}}addSingleLink(e,r,n,i){let o={start:e,end:r,type:void 0,text:"",labelType:"text",classes:[],isUserDefinedId:!1,interpolate:this.edges.defaultInterpolate};he.info("abc78 Got edge...",o);let l=n.text;if(l!==void 0&&(o.text=this.sanitizeText(l.text.trim()),o.text.startsWith('"')&&o.text.endsWith('"')&&(o.text=o.text.substring(1,o.text.length-1)),o.labelType=l.type),n!==void 0&&(o.type=n.type,o.stroke=n.stroke,o.length=n.length>10?10:n.length),i&&!this.edges.some(u=>u.id===i))o.id=i,o.isUserDefinedId=!0;else{let u=this.edges.filter(h=>h.start===o.start&&h.end===o.end);u.length===0?o.id=Sd(o.start,o.end,{counter:0,prefix:"L"}):o.id=Sd(o.start,o.end,{counter:u.length+1,prefix:"L"})}if(this.edges.length<(this.config.maxEdges??500))he.info("Pushing edge..."),this.edges.push(o);else throw new Error(`Edge limit exceeded. ${this.edges.length} edges found, but the limit is ${this.config.maxEdges}. Initialize mermaid with maxEdges set to a higher number to allow more edges. You cannot set this config via configuration inside the diagram as it is a secure config. -You have to call mermaid.initialize.`)}isLinkData(e){return e!==null&&typeof e=="object"&&"id"in e&&typeof e.id=="string"}addLink(e,r,n){let a=this.isLinkData(n)?n.id.replace("@",""):void 0;te.info("addLink",e,r,a);for(let i of e)for(let s of r){let o=i===e[e.length-1],l=s===r[0];o&&l?this.addSingleLink(i,s,n,a):this.addSingleLink(i,s,n,void 0)}}updateLinkInterpolate(e,r){e.forEach(n=>{n==="default"?this.edges.defaultInterpolate=r:this.edges[n].interpolate=r})}updateLink(e,r){e.forEach(n=>{if(typeof n=="number"&&n>=this.edges.length)throw new Error(`The index ${n} for linkStyle is out of bounds. Valid indices for linkStyle are between 0 and ${this.edges.length-1}. (Help: Ensure that the index is within the range of existing edges.)`);n==="default"?this.edges.defaultStyle=r:(this.edges[n].style=r,(this.edges[n]?.style?.length??0)>0&&!this.edges[n]?.style?.some(a=>a?.startsWith("fill"))&&this.edges[n]?.style?.push("fill:none"))})}addClass(e,r){let n=r.join().replace(/\\,/g,"\xA7\xA7\xA7").replace(/,/g,";").replace(/§§§/g,",").split(";");e.split(",").forEach(a=>{let i=this.classes.get(a);i===void 0&&(i={id:a,styles:[],textStyles:[]},this.classes.set(a,i)),n?.forEach(s=>{if(/color/.exec(s)){let o=s.replace("fill","bgFill");i.textStyles.push(o)}i.styles.push(s)})})}setDirection(e){this.direction=e,/.*/.exec(this.direction)&&(this.direction="LR"),/.*v/.exec(this.direction)&&(this.direction="TB"),this.direction==="TD"&&(this.direction="TB")}setClass(e,r){for(let n of e.split(",")){let a=this.vertices.get(n);a&&a.classes.push(r);let i=this.edges.find(o=>o.id===n);i&&i.classes.push(r);let s=this.subGraphLookup.get(n);s&&s.classes.push(r)}}setTooltip(e,r){if(r!==void 0){r=this.sanitizeText(r);for(let n of e.split(","))this.tooltips.set(this.version==="gen-1"?this.lookUpDomId(n):n,r)}}setClickFun(e,r,n){let a=this.lookUpDomId(e);if(Te().securityLevel!=="loose"||r===void 0)return;let i=[];if(typeof n=="string"){i=n.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let o=0;o{let o=document.querySelector(`[id="${a}"]`);o!==null&&o.addEventListener("click",()=>{Wt.runFunc(r,...i)},!1)}))}setLink(e,r,n){e.split(",").forEach(a=>{let i=this.vertices.get(a);i!==void 0&&(i.link=Wt.formatUrl(r,this.config),i.linkTarget=n)}),this.setClass(e,"clickable")}getTooltip(e){return this.tooltips.get(e)}setClickEvent(e,r,n){e.split(",").forEach(a=>{this.setClickFun(a,r,n)}),this.setClass(e,"clickable")}bindFunctions(e){this.funs.forEach(r=>{r(e)})}getDirection(){return this.direction?.trim()}getVertices(){return this.vertices}getEdges(){return this.edges}getClasses(){return this.classes}setupToolTips(e){let r=We(".mermaidTooltip");(r._groups||r)[0][0]===null&&(r=We("body").append("div").attr("class","mermaidTooltip").style("opacity",0)),We(e).select("svg").selectAll("g.node").on("mouseover",i=>{let s=We(i.currentTarget);if(s.attr("title")===null)return;let l=i.currentTarget?.getBoundingClientRect();r.transition().duration(200).style("opacity",".9"),r.text(s.attr("title")).style("left",window.scrollX+l.left+(l.right-l.left)/2+"px").style("top",window.scrollY+l.bottom+"px"),r.html(r.html().replace(/<br\/>/g,"
    ")),s.classed("hover",!0)}).on("mouseout",i=>{r.transition().duration(500).style("opacity",0),We(i.currentTarget).classed("hover",!1)})}clear(e="gen-2"){this.vertices=new Map,this.classes=new Map,this.edges=[],this.funs=[this.setupToolTips.bind(this)],this.subGraphs=[],this.subGraphLookup=new Map,this.subCount=0,this.tooltips=new Map,this.firstGraphFlag=!0,this.version=e,this.config=Te(),Cr()}setGen(e){this.version=e||"gen-2"}defaultStyle(){return"fill:#ffa;stroke: #f66; stroke-width: 3px; stroke-dasharray: 5, 5;fill:#ffa;stroke: #666;"}addSubGraph(e,r,n){let a=e.text.trim(),i=n.text;e===n&&/\s/.exec(n.text)&&(a=void 0);let s=x(h=>{let f={boolean:{},number:{},string:{}},d=[],p;return{nodeList:h.filter(function(g){let v=typeof g;return g.stmt&&g.stmt==="dir"?(p=g.value,!1):g.trim()===""?!1:v in f?f[v].hasOwnProperty(g)?!1:f[v][g]=!0:d.includes(g)?!1:d.push(g)}),dir:p}},"uniq"),{nodeList:o,dir:l}=s(r.flat());if(this.version==="gen-1")for(let h=0;h2e3)return{result:!1,count:0};if(this.posCrossRef[this.secCount]=r,this.subGraphs[r].id===e)return{result:!0,count:0};let a=0,i=1;for(;a=0){let o=this.indexNodes2(e,s);if(o.result)return{result:!0,count:i+o.count};i=i+o.count}a=a+1}return{result:!1,count:i}}getDepthFirstPos(e){return this.posCrossRef[e]}indexNodes(){this.secCount=-1,this.subGraphs.length>0&&this.indexNodes2("none",this.subGraphs.length-1)}getSubGraphs(){return this.subGraphs}firstGraph(){return this.firstGraphFlag?(this.firstGraphFlag=!1,!0):!1}destructStartLink(e){let r=e.trim(),n="arrow_open";switch(r[0]){case"<":n="arrow_point",r=r.slice(1);break;case"x":n="arrow_cross",r=r.slice(1);break;case"o":n="arrow_circle",r=r.slice(1);break}let a="normal";return r.includes("=")&&(a="thick"),r.includes(".")&&(a="dotted"),{type:n,stroke:a}}countChar(e,r){let n=r.length,a=0;for(let i=0;i":a="arrow_point",r.startsWith("<")&&(a="double_"+a,n=n.slice(1));break;case"o":a="arrow_circle",r.startsWith("o")&&(a="double_"+a,n=n.slice(1));break}let i="normal",s=n.length-1;n.startsWith("=")&&(i="thick"),n.startsWith("~")&&(i="invisible");let o=this.countChar(".",n);return o&&(i="dotted",s=o),{type:a,stroke:i,length:s}}destructLink(e,r){let n=this.destructEndLink(e),a;if(r){if(a=this.destructStartLink(r),a.stroke!==n.stroke)return{type:"INVALID",stroke:"INVALID"};if(a.type==="arrow_open")a.type=n.type;else{if(a.type!==n.type)return{type:"INVALID",stroke:"INVALID"};a.type="double_"+a.type}return a.type==="double_arrow"&&(a.type="double_arrow_point"),a.length=n.length,a}return n}exists(e,r){for(let n of e)if(n.nodes.includes(r))return!0;return!1}makeUniq(e,r){let n=[];return e.nodes.forEach((a,i)=>{this.exists(r,a)||n.push(e.nodes[i])}),{nodes:n}}getTypeFromVertex(e){if(e.img)return"imageSquare";if(e.icon)return e.form==="circle"?"iconCircle":e.form==="square"?"iconSquare":e.form==="rounded"?"iconRounded":"icon";switch(e.type){case"square":case void 0:return"squareRect";case"round":return"roundedRect";case"ellipse":return"ellipse";default:return e.type}}findNode(e,r){return e.find(n=>n.id===r)}destructEdgeType(e){let r="none",n="arrow_point";switch(e){case"arrow_point":case"arrow_circle":case"arrow_cross":n=e;break;case"double_arrow_point":case"double_arrow_circle":case"double_arrow_cross":r=e.replace("double_",""),n=r;break}return{arrowTypeStart:r,arrowTypeEnd:n}}addNodeFromVertex(e,r,n,a,i,s){let o=n.get(e.id),l=a.get(e.id)??!1,u=this.findNode(r,e.id);if(u)u.cssStyles=e.styles,u.cssCompiledStyles=this.getCompiledStyles(e.classes),u.cssClasses=e.classes.join(" ");else{let h={id:e.id,label:e.text,labelStyle:"",parentId:o,padding:i.flowchart?.padding||8,cssStyles:e.styles,cssCompiledStyles:this.getCompiledStyles(["default","node",...e.classes]),cssClasses:"default "+e.classes.join(" "),dir:e.dir,domId:e.domId,look:s,link:e.link,linkTarget:e.linkTarget,tooltip:this.getTooltip(e.id),icon:e.icon,pos:e.pos,img:e.img,assetWidth:e.assetWidth,assetHeight:e.assetHeight,constraint:e.constraint};l?r.push({...h,isGroup:!0,shape:"rect"}):r.push({...h,isGroup:!1,shape:this.getTypeFromVertex(e)})}}getCompiledStyles(e){let r=[];for(let n of e){let a=this.classes.get(n);a?.styles&&(r=[...r,...a.styles??[]].map(i=>i.trim())),a?.textStyles&&(r=[...r,...a.textStyles??[]].map(i=>i.trim()))}return r}getData(){let e=Te(),r=[],n=[],a=this.getSubGraphs(),i=new Map,s=new Map;for(let u=a.length-1;u>=0;u--){let h=a[u];h.nodes.length>0&&s.set(h.id,!0);for(let f of h.nodes)i.set(f,h.id)}for(let u=a.length-1;u>=0;u--){let h=a[u];r.push({id:h.id,label:h.title,labelStyle:"",parentId:i.get(h.id),padding:8,cssCompiledStyles:this.getCompiledStyles(h.classes),cssClasses:h.classes.join(" "),shape:"rect",dir:h.dir,isGroup:!0,look:e.look})}this.getVertices().forEach(u=>{this.addNodeFromVertex(u,r,i,s,e,e.look||"classic")});let l=this.getEdges();return l.forEach((u,h)=>{let{arrowTypeStart:f,arrowTypeEnd:d}=this.destructEdgeType(u.type),p=[...l.defaultStyle??[]];u.style&&p.push(...u.style);let m={id:vd(u.start,u.end,{counter:h,prefix:"L"},u.id),isUserDefinedId:u.isUserDefinedId,start:u.start,end:u.end,type:u.type??"normal",label:u.text,labelpos:"c",thickness:u.stroke,minlen:u.length,classes:u?.stroke==="invisible"?"":"edge-thickness-normal edge-pattern-solid flowchart-link",arrowTypeStart:u?.stroke==="invisible"||u?.type==="arrow_open"?"none":f,arrowTypeEnd:u?.stroke==="invisible"||u?.type==="arrow_open"?"none":d,arrowheadStyle:"fill: #333",cssCompiledStyles:this.getCompiledStyles(u.classes),labelStyle:p,style:p,pattern:u.stroke,look:e.look,animate:u.animate,animation:u.animation,curve:u.interpolate||this.edges.defaultInterpolate||e.flowchart?.curve};n.push(m)}),{nodes:r,edges:n,other:{},config:e}}defaultConfig(){return NT.flowchart}},x(fv,"FlowDB"),fv),Vrt=x(function(t,e){return e.db.getClasses()},"getClasses"),Hrt=x(async function(t,e,r,n){te.info("REF0:"),te.info("Drawing state diagram (v2)",e);let{securityLevel:a,flowchart:i,layout:s}=Te(),o;a==="sandbox"&&(o=We("#i"+e));let l=a==="sandbox"?o.nodes()[0].contentDocument:document;te.debug("Before getData: ");let u=n.db.getData();te.debug("Data: ",u);let h=xc(e,a),f=n.db.getDirection();u.type=n.type,u.layoutAlgorithm=Rd(s),u.layoutAlgorithm==="dagre"&&s==="elk"&&te.warn("flowchart-elk was moved to an external package in Mermaid v11. Please refer [release notes](https://github.com/mermaid-js/mermaid/releases/tag/v11.0.0) for more details. This diagram will be rendered using `dagre` layout as a fallback."),u.direction=f,u.nodeSpacing=i?.nodeSpacing||50,u.rankSpacing=i?.rankSpacing||50,u.markers=["point","circle","cross"],u.diagramId=e,te.debug("REF1:",u),await pc(u,h);let d=u.config.flowchart?.diagramPadding??8;Wt.insertTitle(h,"flowchartTitleText",i?.titleTopMargin||0,n.db.getDiagramTitle()),bc(h,d,"flowchart",i?.useMaxWidth||!1);for(let p of u.nodes){let m=We(`#${e} [id="${p.id}"]`);if(!m||!p.link)continue;let g=l.createElementNS("http://www.w3.org/2000/svg","a");g.setAttributeNS("http://www.w3.org/2000/svg","class",p.cssClasses),g.setAttributeNS("http://www.w3.org/2000/svg","rel","noopener"),a==="sandbox"?g.setAttributeNS("http://www.w3.org/2000/svg","target","_top"):p.linkTarget&&g.setAttributeNS("http://www.w3.org/2000/svg","target",p.linkTarget);let v=m.insert(function(){return g},":first-child"),y=m.select(".label-container");y&&v.append(function(){return y.node()});let b=m.select(".label");b&&v.append(function(){return b.node()})}},"draw"),Wrt={getClasses:Vrt,draw:Hrt},QB=(function(){var t=x(function(Wr,Je,gt,St){for(gt=gt||{},St=Wr.length;St--;gt[Wr[St]]=Je);return gt},"o"),e=[1,4],r=[1,3],n=[1,5],a=[1,8,9,10,11,27,34,36,38,44,60,84,85,86,87,88,89,102,105,106,109,111,114,115,116,121,122,123,124],i=[2,2],s=[1,13],o=[1,14],l=[1,15],u=[1,16],h=[1,23],f=[1,25],d=[1,26],p=[1,27],m=[1,49],g=[1,48],v=[1,29],y=[1,30],b=[1,31],w=[1,32],C=[1,33],k=[1,44],E=[1,46],_=[1,42],S=[1,47],L=[1,43],M=[1,50],D=[1,45],T=[1,51],I=[1,52],N=[1,34],O=[1,35],R=[1,36],P=[1,37],B=[1,57],F=[1,8,9,10,11,27,32,34,36,38,44,60,84,85,86,87,88,89,102,105,106,109,111,114,115,116,121,122,123,124],G=[1,61],z=[1,60],H=[1,62],Q=[8,9,11,75,77,78],Y=[1,78],ie=[1,91],se=[1,96],oe=[1,95],pe=[1,92],J=[1,88],j=[1,94],Z=[1,90],K=[1,97],X=[1,93],ae=[1,98],W=[1,89],Se=[8,9,10,11,40,75,77,78],ne=[8,9,10,11,40,46,75,77,78],ee=[8,9,10,11,29,40,44,46,48,50,52,54,56,58,60,63,65,67,68,70,75,77,78,89,102,105,106,109,111,114,115,116],$e=[8,9,11,44,60,75,77,78,89,102,105,106,109,111,114,115,116],me=[44,60,89,102,105,106,109,111,114,115,116],Ie=[1,121],Ue=[1,122],Fe=[1,124],Ae=[1,123],Me=[44,60,62,74,89,102,105,106,109,111,114,115,116],ke=[1,133],ve=[1,147],_e=[1,148],fe=[1,149],ue=[1,150],$=[1,135],le=[1,137],V=[1,141],he=[1,142],de=[1,143],Ne=[1,144],we=[1,145],ye=[1,146],Be=[1,151],Le=[1,152],qe=[1,131],Ke=[1,132],Ye=[1,139],Xe=[1,134],Ve=[1,138],ot=[1,136],He=[8,9,10,11,27,32,34,36,38,44,60,84,85,86,87,88,89,102,105,106,109,111,114,115,116,121,122,123,124],nt=[1,154],It=[1,156],it=[8,9,11],Tt=[8,9,10,11,14,44,60,89,105,106,109,111,114,115,116],lt=[1,176],ct=[1,172],ft=[1,173],dt=[1,177],yt=[1,174],at=[1,175],dn=[77,116,119],Ct=[8,9,10,11,12,14,27,29,32,44,60,75,84,85,86,87,88,89,90,105,109,111,114,115,116],Ut=[10,106],Qt=[31,49,51,53,55,57,62,64,66,67,69,71,116,117,118],er=[1,247],mr=[1,245],xr=[1,249],Tn=[1,243],Hr=[1,244],_i=[1,246],ji=[1,248],Ai=[1,250],el=[1,268],Li=[8,9,11,106],Ca=[8,9,10,11,60,84,105,106,109,110,111,112],Sa={trace:x(function(){},"trace"),yy:{},symbols_:{error:2,start:3,graphConfig:4,document:5,line:6,statement:7,SEMI:8,NEWLINE:9,SPACE:10,EOF:11,GRAPH:12,NODIR:13,DIR:14,FirstStmtSeparator:15,ending:16,endToken:17,spaceList:18,spaceListNewline:19,vertexStatement:20,separator:21,styleStatement:22,linkStyleStatement:23,classDefStatement:24,classStatement:25,clickStatement:26,subgraph:27,textNoTags:28,SQS:29,text:30,SQE:31,end:32,direction:33,acc_title:34,acc_title_value:35,acc_descr:36,acc_descr_value:37,acc_descr_multiline_value:38,shapeData:39,SHAPE_DATA:40,link:41,node:42,styledVertex:43,AMP:44,vertex:45,STYLE_SEPARATOR:46,idString:47,DOUBLECIRCLESTART:48,DOUBLECIRCLEEND:49,PS:50,PE:51,"(-":52,"-)":53,STADIUMSTART:54,STADIUMEND:55,SUBROUTINESTART:56,SUBROUTINEEND:57,VERTEX_WITH_PROPS_START:58,"NODE_STRING[field]":59,COLON:60,"NODE_STRING[value]":61,PIPE:62,CYLINDERSTART:63,CYLINDEREND:64,DIAMOND_START:65,DIAMOND_STOP:66,TAGEND:67,TRAPSTART:68,TRAPEND:69,INVTRAPSTART:70,INVTRAPEND:71,linkStatement:72,arrowText:73,TESTSTR:74,START_LINK:75,edgeText:76,LINK:77,LINK_ID:78,edgeTextToken:79,STR:80,MD_STR:81,textToken:82,keywords:83,STYLE:84,LINKSTYLE:85,CLASSDEF:86,CLASS:87,CLICK:88,DOWN:89,UP:90,textNoTagsToken:91,stylesOpt:92,"idString[vertex]":93,"idString[class]":94,CALLBACKNAME:95,CALLBACKARGS:96,HREF:97,LINK_TARGET:98,"STR[link]":99,"STR[tooltip]":100,alphaNum:101,DEFAULT:102,numList:103,INTERPOLATE:104,NUM:105,COMMA:106,style:107,styleComponent:108,NODE_STRING:109,UNIT:110,BRKT:111,PCT:112,idStringToken:113,MINUS:114,MULT:115,UNICODE_TEXT:116,TEXT:117,TAGSTART:118,EDGE_TEXT:119,alphaNumToken:120,direction_tb:121,direction_bt:122,direction_rl:123,direction_lr:124,$accept:0,$end:1},terminals_:{2:"error",8:"SEMI",9:"NEWLINE",10:"SPACE",11:"EOF",12:"GRAPH",13:"NODIR",14:"DIR",27:"subgraph",29:"SQS",31:"SQE",32:"end",34:"acc_title",35:"acc_title_value",36:"acc_descr",37:"acc_descr_value",38:"acc_descr_multiline_value",40:"SHAPE_DATA",44:"AMP",46:"STYLE_SEPARATOR",48:"DOUBLECIRCLESTART",49:"DOUBLECIRCLEEND",50:"PS",51:"PE",52:"(-",53:"-)",54:"STADIUMSTART",55:"STADIUMEND",56:"SUBROUTINESTART",57:"SUBROUTINEEND",58:"VERTEX_WITH_PROPS_START",59:"NODE_STRING[field]",60:"COLON",61:"NODE_STRING[value]",62:"PIPE",63:"CYLINDERSTART",64:"CYLINDEREND",65:"DIAMOND_START",66:"DIAMOND_STOP",67:"TAGEND",68:"TRAPSTART",69:"TRAPEND",70:"INVTRAPSTART",71:"INVTRAPEND",74:"TESTSTR",75:"START_LINK",77:"LINK",78:"LINK_ID",80:"STR",81:"MD_STR",84:"STYLE",85:"LINKSTYLE",86:"CLASSDEF",87:"CLASS",88:"CLICK",89:"DOWN",90:"UP",93:"idString[vertex]",94:"idString[class]",95:"CALLBACKNAME",96:"CALLBACKARGS",97:"HREF",98:"LINK_TARGET",99:"STR[link]",100:"STR[tooltip]",102:"DEFAULT",104:"INTERPOLATE",105:"NUM",106:"COMMA",109:"NODE_STRING",110:"UNIT",111:"BRKT",112:"PCT",114:"MINUS",115:"MULT",116:"UNICODE_TEXT",117:"TEXT",118:"TAGSTART",119:"EDGE_TEXT",121:"direction_tb",122:"direction_bt",123:"direction_rl",124:"direction_lr"},productions_:[0,[3,2],[5,0],[5,2],[6,1],[6,1],[6,1],[6,1],[6,1],[4,2],[4,2],[4,2],[4,3],[16,2],[16,1],[17,1],[17,1],[17,1],[15,1],[15,1],[15,2],[19,2],[19,2],[19,1],[19,1],[18,2],[18,1],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,9],[7,6],[7,4],[7,1],[7,2],[7,2],[7,1],[21,1],[21,1],[21,1],[39,2],[39,1],[20,4],[20,3],[20,4],[20,2],[20,2],[20,1],[42,1],[42,6],[42,5],[43,1],[43,3],[45,4],[45,4],[45,6],[45,4],[45,4],[45,4],[45,8],[45,4],[45,4],[45,4],[45,6],[45,4],[45,4],[45,4],[45,4],[45,4],[45,1],[41,2],[41,3],[41,3],[41,1],[41,3],[41,4],[76,1],[76,2],[76,1],[76,1],[72,1],[72,2],[73,3],[30,1],[30,2],[30,1],[30,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[28,1],[28,2],[28,1],[28,1],[24,5],[25,5],[26,2],[26,4],[26,3],[26,5],[26,3],[26,5],[26,5],[26,7],[26,2],[26,4],[26,2],[26,4],[26,4],[26,6],[22,5],[23,5],[23,5],[23,9],[23,9],[23,7],[23,7],[103,1],[103,3],[92,1],[92,3],[107,1],[107,2],[108,1],[108,1],[108,1],[108,1],[108,1],[108,1],[108,1],[108,1],[113,1],[113,1],[113,1],[113,1],[113,1],[113,1],[113,1],[113,1],[113,1],[113,1],[113,1],[82,1],[82,1],[82,1],[82,1],[91,1],[91,1],[91,1],[91,1],[91,1],[91,1],[91,1],[91,1],[91,1],[91,1],[91,1],[79,1],[79,1],[120,1],[120,1],[120,1],[120,1],[120,1],[120,1],[120,1],[120,1],[120,1],[120,1],[120,1],[47,1],[47,2],[101,1],[101,2],[33,1],[33,1],[33,1],[33,1]],performAction:x(function(Je,gt,St,Qe,Mr,ge,Mn){var be=ge.length-1;switch(Mr){case 2:this.$=[];break;case 3:(!Array.isArray(ge[be])||ge[be].length>0)&&ge[be-1].push(ge[be]),this.$=ge[be-1];break;case 4:case 183:this.$=ge[be];break;case 11:Qe.setDirection("TB"),this.$="TB";break;case 12:Qe.setDirection(ge[be-1]),this.$=ge[be-1];break;case 27:this.$=ge[be-1].nodes;break;case 28:case 29:case 30:case 31:case 32:this.$=[];break;case 33:this.$=Qe.addSubGraph(ge[be-6],ge[be-1],ge[be-4]);break;case 34:this.$=Qe.addSubGraph(ge[be-3],ge[be-1],ge[be-3]);break;case 35:this.$=Qe.addSubGraph(void 0,ge[be-1],void 0);break;case 37:this.$=ge[be].trim(),Qe.setAccTitle(this.$);break;case 38:case 39:this.$=ge[be].trim(),Qe.setAccDescription(this.$);break;case 43:this.$=ge[be-1]+ge[be];break;case 44:this.$=ge[be];break;case 45:Qe.addVertex(ge[be-1][ge[be-1].length-1],void 0,void 0,void 0,void 0,void 0,void 0,ge[be]),Qe.addLink(ge[be-3].stmt,ge[be-1],ge[be-2]),this.$={stmt:ge[be-1],nodes:ge[be-1].concat(ge[be-3].nodes)};break;case 46:Qe.addLink(ge[be-2].stmt,ge[be],ge[be-1]),this.$={stmt:ge[be],nodes:ge[be].concat(ge[be-2].nodes)};break;case 47:Qe.addLink(ge[be-3].stmt,ge[be-1],ge[be-2]),this.$={stmt:ge[be-1],nodes:ge[be-1].concat(ge[be-3].nodes)};break;case 48:this.$={stmt:ge[be-1],nodes:ge[be-1]};break;case 49:Qe.addVertex(ge[be-1][ge[be-1].length-1],void 0,void 0,void 0,void 0,void 0,void 0,ge[be]),this.$={stmt:ge[be-1],nodes:ge[be-1],shapeData:ge[be]};break;case 50:this.$={stmt:ge[be],nodes:ge[be]};break;case 51:this.$=[ge[be]];break;case 52:Qe.addVertex(ge[be-5][ge[be-5].length-1],void 0,void 0,void 0,void 0,void 0,void 0,ge[be-4]),this.$=ge[be-5].concat(ge[be]);break;case 53:this.$=ge[be-4].concat(ge[be]);break;case 54:this.$=ge[be];break;case 55:this.$=ge[be-2],Qe.setClass(ge[be-2],ge[be]);break;case 56:this.$=ge[be-3],Qe.addVertex(ge[be-3],ge[be-1],"square");break;case 57:this.$=ge[be-3],Qe.addVertex(ge[be-3],ge[be-1],"doublecircle");break;case 58:this.$=ge[be-5],Qe.addVertex(ge[be-5],ge[be-2],"circle");break;case 59:this.$=ge[be-3],Qe.addVertex(ge[be-3],ge[be-1],"ellipse");break;case 60:this.$=ge[be-3],Qe.addVertex(ge[be-3],ge[be-1],"stadium");break;case 61:this.$=ge[be-3],Qe.addVertex(ge[be-3],ge[be-1],"subroutine");break;case 62:this.$=ge[be-7],Qe.addVertex(ge[be-7],ge[be-1],"rect",void 0,void 0,void 0,Object.fromEntries([[ge[be-5],ge[be-3]]]));break;case 63:this.$=ge[be-3],Qe.addVertex(ge[be-3],ge[be-1],"cylinder");break;case 64:this.$=ge[be-3],Qe.addVertex(ge[be-3],ge[be-1],"round");break;case 65:this.$=ge[be-3],Qe.addVertex(ge[be-3],ge[be-1],"diamond");break;case 66:this.$=ge[be-5],Qe.addVertex(ge[be-5],ge[be-2],"hexagon");break;case 67:this.$=ge[be-3],Qe.addVertex(ge[be-3],ge[be-1],"odd");break;case 68:this.$=ge[be-3],Qe.addVertex(ge[be-3],ge[be-1],"trapezoid");break;case 69:this.$=ge[be-3],Qe.addVertex(ge[be-3],ge[be-1],"inv_trapezoid");break;case 70:this.$=ge[be-3],Qe.addVertex(ge[be-3],ge[be-1],"lean_right");break;case 71:this.$=ge[be-3],Qe.addVertex(ge[be-3],ge[be-1],"lean_left");break;case 72:this.$=ge[be],Qe.addVertex(ge[be]);break;case 73:ge[be-1].text=ge[be],this.$=ge[be-1];break;case 74:case 75:ge[be-2].text=ge[be-1],this.$=ge[be-2];break;case 76:this.$=ge[be];break;case 77:var Zn=Qe.destructLink(ge[be],ge[be-2]);this.$={type:Zn.type,stroke:Zn.stroke,length:Zn.length,text:ge[be-1]};break;case 78:var Zn=Qe.destructLink(ge[be],ge[be-2]);this.$={type:Zn.type,stroke:Zn.stroke,length:Zn.length,text:ge[be-1],id:ge[be-3]};break;case 79:this.$={text:ge[be],type:"text"};break;case 80:this.$={text:ge[be-1].text+""+ge[be],type:ge[be-1].type};break;case 81:this.$={text:ge[be],type:"string"};break;case 82:this.$={text:ge[be],type:"markdown"};break;case 83:var Zn=Qe.destructLink(ge[be]);this.$={type:Zn.type,stroke:Zn.stroke,length:Zn.length};break;case 84:var Zn=Qe.destructLink(ge[be]);this.$={type:Zn.type,stroke:Zn.stroke,length:Zn.length,id:ge[be-1]};break;case 85:this.$=ge[be-1];break;case 86:this.$={text:ge[be],type:"text"};break;case 87:this.$={text:ge[be-1].text+""+ge[be],type:ge[be-1].type};break;case 88:this.$={text:ge[be],type:"string"};break;case 89:case 104:this.$={text:ge[be],type:"markdown"};break;case 101:this.$={text:ge[be],type:"text"};break;case 102:this.$={text:ge[be-1].text+""+ge[be],type:ge[be-1].type};break;case 103:this.$={text:ge[be],type:"text"};break;case 105:this.$=ge[be-4],Qe.addClass(ge[be-2],ge[be]);break;case 106:this.$=ge[be-4],Qe.setClass(ge[be-2],ge[be]);break;case 107:case 115:this.$=ge[be-1],Qe.setClickEvent(ge[be-1],ge[be]);break;case 108:case 116:this.$=ge[be-3],Qe.setClickEvent(ge[be-3],ge[be-2]),Qe.setTooltip(ge[be-3],ge[be]);break;case 109:this.$=ge[be-2],Qe.setClickEvent(ge[be-2],ge[be-1],ge[be]);break;case 110:this.$=ge[be-4],Qe.setClickEvent(ge[be-4],ge[be-3],ge[be-2]),Qe.setTooltip(ge[be-4],ge[be]);break;case 111:this.$=ge[be-2],Qe.setLink(ge[be-2],ge[be]);break;case 112:this.$=ge[be-4],Qe.setLink(ge[be-4],ge[be-2]),Qe.setTooltip(ge[be-4],ge[be]);break;case 113:this.$=ge[be-4],Qe.setLink(ge[be-4],ge[be-2],ge[be]);break;case 114:this.$=ge[be-6],Qe.setLink(ge[be-6],ge[be-4],ge[be]),Qe.setTooltip(ge[be-6],ge[be-2]);break;case 117:this.$=ge[be-1],Qe.setLink(ge[be-1],ge[be]);break;case 118:this.$=ge[be-3],Qe.setLink(ge[be-3],ge[be-2]),Qe.setTooltip(ge[be-3],ge[be]);break;case 119:this.$=ge[be-3],Qe.setLink(ge[be-3],ge[be-2],ge[be]);break;case 120:this.$=ge[be-5],Qe.setLink(ge[be-5],ge[be-4],ge[be]),Qe.setTooltip(ge[be-5],ge[be-2]);break;case 121:this.$=ge[be-4],Qe.addVertex(ge[be-2],void 0,void 0,ge[be]);break;case 122:this.$=ge[be-4],Qe.updateLink([ge[be-2]],ge[be]);break;case 123:this.$=ge[be-4],Qe.updateLink(ge[be-2],ge[be]);break;case 124:this.$=ge[be-8],Qe.updateLinkInterpolate([ge[be-6]],ge[be-2]),Qe.updateLink([ge[be-6]],ge[be]);break;case 125:this.$=ge[be-8],Qe.updateLinkInterpolate(ge[be-6],ge[be-2]),Qe.updateLink(ge[be-6],ge[be]);break;case 126:this.$=ge[be-6],Qe.updateLinkInterpolate([ge[be-4]],ge[be]);break;case 127:this.$=ge[be-6],Qe.updateLinkInterpolate(ge[be-4],ge[be]);break;case 128:case 130:this.$=[ge[be]];break;case 129:case 131:ge[be-2].push(ge[be]),this.$=ge[be-2];break;case 133:this.$=ge[be-1]+ge[be];break;case 181:this.$=ge[be];break;case 182:this.$=ge[be-1]+""+ge[be];break;case 184:this.$=ge[be-1]+""+ge[be];break;case 185:this.$={stmt:"dir",value:"TB"};break;case 186:this.$={stmt:"dir",value:"BT"};break;case 187:this.$={stmt:"dir",value:"RL"};break;case 188:this.$={stmt:"dir",value:"LR"};break}},"anonymous"),table:[{3:1,4:2,9:e,10:r,12:n},{1:[3]},t(a,i,{5:6}),{4:7,9:e,10:r,12:n},{4:8,9:e,10:r,12:n},{13:[1,9],14:[1,10]},{1:[2,1],6:11,7:12,8:s,9:o,10:l,11:u,20:17,22:18,23:19,24:20,25:21,26:22,27:h,33:24,34:f,36:d,38:p,42:28,43:38,44:m,45:39,47:40,60:g,84:v,85:y,86:b,87:w,88:C,89:k,102:E,105:_,106:S,109:L,111:M,113:41,114:D,115:T,116:I,121:N,122:O,123:R,124:P},t(a,[2,9]),t(a,[2,10]),t(a,[2,11]),{8:[1,54],9:[1,55],10:B,15:53,18:56},t(F,[2,3]),t(F,[2,4]),t(F,[2,5]),t(F,[2,6]),t(F,[2,7]),t(F,[2,8]),{8:G,9:z,11:H,21:58,41:59,72:63,75:[1,64],77:[1,66],78:[1,65]},{8:G,9:z,11:H,21:67},{8:G,9:z,11:H,21:68},{8:G,9:z,11:H,21:69},{8:G,9:z,11:H,21:70},{8:G,9:z,11:H,21:71},{8:G,9:z,10:[1,72],11:H,21:73},t(F,[2,36]),{35:[1,74]},{37:[1,75]},t(F,[2,39]),t(Q,[2,50],{18:76,39:77,10:B,40:Y}),{10:[1,79]},{10:[1,80]},{10:[1,81]},{10:[1,82]},{14:ie,44:se,60:oe,80:[1,86],89:pe,95:[1,83],97:[1,84],101:85,105:J,106:j,109:Z,111:K,114:X,115:ae,116:W,120:87},t(F,[2,185]),t(F,[2,186]),t(F,[2,187]),t(F,[2,188]),t(Se,[2,51]),t(Se,[2,54],{46:[1,99]}),t(ne,[2,72],{113:112,29:[1,100],44:m,48:[1,101],50:[1,102],52:[1,103],54:[1,104],56:[1,105],58:[1,106],60:g,63:[1,107],65:[1,108],67:[1,109],68:[1,110],70:[1,111],89:k,102:E,105:_,106:S,109:L,111:M,114:D,115:T,116:I}),t(ee,[2,181]),t(ee,[2,142]),t(ee,[2,143]),t(ee,[2,144]),t(ee,[2,145]),t(ee,[2,146]),t(ee,[2,147]),t(ee,[2,148]),t(ee,[2,149]),t(ee,[2,150]),t(ee,[2,151]),t(ee,[2,152]),t(a,[2,12]),t(a,[2,18]),t(a,[2,19]),{9:[1,113]},t($e,[2,26],{18:114,10:B}),t(F,[2,27]),{42:115,43:38,44:m,45:39,47:40,60:g,89:k,102:E,105:_,106:S,109:L,111:M,113:41,114:D,115:T,116:I},t(F,[2,40]),t(F,[2,41]),t(F,[2,42]),t(me,[2,76],{73:116,62:[1,118],74:[1,117]}),{76:119,79:120,80:Ie,81:Ue,116:Fe,119:Ae},{75:[1,125],77:[1,126]},t(Me,[2,83]),t(F,[2,28]),t(F,[2,29]),t(F,[2,30]),t(F,[2,31]),t(F,[2,32]),{10:ke,12:ve,14:_e,27:fe,28:127,32:ue,44:$,60:le,75:V,80:[1,129],81:[1,130],83:140,84:he,85:de,86:Ne,87:we,88:ye,89:Be,90:Le,91:128,105:qe,109:Ke,111:Ye,114:Xe,115:Ve,116:ot},t(He,i,{5:153}),t(F,[2,37]),t(F,[2,38]),t(Q,[2,48],{44:nt}),t(Q,[2,49],{18:155,10:B,40:It}),t(Se,[2,44]),{44:m,47:157,60:g,89:k,102:E,105:_,106:S,109:L,111:M,113:41,114:D,115:T,116:I},{102:[1,158],103:159,105:[1,160]},{44:m,47:161,60:g,89:k,102:E,105:_,106:S,109:L,111:M,113:41,114:D,115:T,116:I},{44:m,47:162,60:g,89:k,102:E,105:_,106:S,109:L,111:M,113:41,114:D,115:T,116:I},t(it,[2,107],{10:[1,163],96:[1,164]}),{80:[1,165]},t(it,[2,115],{120:167,10:[1,166],14:ie,44:se,60:oe,89:pe,105:J,106:j,109:Z,111:K,114:X,115:ae,116:W}),t(it,[2,117],{10:[1,168]}),t(Tt,[2,183]),t(Tt,[2,170]),t(Tt,[2,171]),t(Tt,[2,172]),t(Tt,[2,173]),t(Tt,[2,174]),t(Tt,[2,175]),t(Tt,[2,176]),t(Tt,[2,177]),t(Tt,[2,178]),t(Tt,[2,179]),t(Tt,[2,180]),{44:m,47:169,60:g,89:k,102:E,105:_,106:S,109:L,111:M,113:41,114:D,115:T,116:I},{30:170,67:lt,80:ct,81:ft,82:171,116:dt,117:yt,118:at},{30:178,67:lt,80:ct,81:ft,82:171,116:dt,117:yt,118:at},{30:180,50:[1,179],67:lt,80:ct,81:ft,82:171,116:dt,117:yt,118:at},{30:181,67:lt,80:ct,81:ft,82:171,116:dt,117:yt,118:at},{30:182,67:lt,80:ct,81:ft,82:171,116:dt,117:yt,118:at},{30:183,67:lt,80:ct,81:ft,82:171,116:dt,117:yt,118:at},{109:[1,184]},{30:185,67:lt,80:ct,81:ft,82:171,116:dt,117:yt,118:at},{30:186,65:[1,187],67:lt,80:ct,81:ft,82:171,116:dt,117:yt,118:at},{30:188,67:lt,80:ct,81:ft,82:171,116:dt,117:yt,118:at},{30:189,67:lt,80:ct,81:ft,82:171,116:dt,117:yt,118:at},{30:190,67:lt,80:ct,81:ft,82:171,116:dt,117:yt,118:at},t(ee,[2,182]),t(a,[2,20]),t($e,[2,25]),t(Q,[2,46],{39:191,18:192,10:B,40:Y}),t(me,[2,73],{10:[1,193]}),{10:[1,194]},{30:195,67:lt,80:ct,81:ft,82:171,116:dt,117:yt,118:at},{77:[1,196],79:197,116:Fe,119:Ae},t(dn,[2,79]),t(dn,[2,81]),t(dn,[2,82]),t(dn,[2,168]),t(dn,[2,169]),{76:198,79:120,80:Ie,81:Ue,116:Fe,119:Ae},t(Me,[2,84]),{8:G,9:z,10:ke,11:H,12:ve,14:_e,21:200,27:fe,29:[1,199],32:ue,44:$,60:le,75:V,83:140,84:he,85:de,86:Ne,87:we,88:ye,89:Be,90:Le,91:201,105:qe,109:Ke,111:Ye,114:Xe,115:Ve,116:ot},t(Ct,[2,101]),t(Ct,[2,103]),t(Ct,[2,104]),t(Ct,[2,157]),t(Ct,[2,158]),t(Ct,[2,159]),t(Ct,[2,160]),t(Ct,[2,161]),t(Ct,[2,162]),t(Ct,[2,163]),t(Ct,[2,164]),t(Ct,[2,165]),t(Ct,[2,166]),t(Ct,[2,167]),t(Ct,[2,90]),t(Ct,[2,91]),t(Ct,[2,92]),t(Ct,[2,93]),t(Ct,[2,94]),t(Ct,[2,95]),t(Ct,[2,96]),t(Ct,[2,97]),t(Ct,[2,98]),t(Ct,[2,99]),t(Ct,[2,100]),{6:11,7:12,8:s,9:o,10:l,11:u,20:17,22:18,23:19,24:20,25:21,26:22,27:h,32:[1,202],33:24,34:f,36:d,38:p,42:28,43:38,44:m,45:39,47:40,60:g,84:v,85:y,86:b,87:w,88:C,89:k,102:E,105:_,106:S,109:L,111:M,113:41,114:D,115:T,116:I,121:N,122:O,123:R,124:P},{10:B,18:203},{44:[1,204]},t(Se,[2,43]),{10:[1,205],44:m,60:g,89:k,102:E,105:_,106:S,109:L,111:M,113:112,114:D,115:T,116:I},{10:[1,206]},{10:[1,207],106:[1,208]},t(Ut,[2,128]),{10:[1,209],44:m,60:g,89:k,102:E,105:_,106:S,109:L,111:M,113:112,114:D,115:T,116:I},{10:[1,210],44:m,60:g,89:k,102:E,105:_,106:S,109:L,111:M,113:112,114:D,115:T,116:I},{80:[1,211]},t(it,[2,109],{10:[1,212]}),t(it,[2,111],{10:[1,213]}),{80:[1,214]},t(Tt,[2,184]),{80:[1,215],98:[1,216]},t(Se,[2,55],{113:112,44:m,60:g,89:k,102:E,105:_,106:S,109:L,111:M,114:D,115:T,116:I}),{31:[1,217],67:lt,82:218,116:dt,117:yt,118:at},t(Qt,[2,86]),t(Qt,[2,88]),t(Qt,[2,89]),t(Qt,[2,153]),t(Qt,[2,154]),t(Qt,[2,155]),t(Qt,[2,156]),{49:[1,219],67:lt,82:218,116:dt,117:yt,118:at},{30:220,67:lt,80:ct,81:ft,82:171,116:dt,117:yt,118:at},{51:[1,221],67:lt,82:218,116:dt,117:yt,118:at},{53:[1,222],67:lt,82:218,116:dt,117:yt,118:at},{55:[1,223],67:lt,82:218,116:dt,117:yt,118:at},{57:[1,224],67:lt,82:218,116:dt,117:yt,118:at},{60:[1,225]},{64:[1,226],67:lt,82:218,116:dt,117:yt,118:at},{66:[1,227],67:lt,82:218,116:dt,117:yt,118:at},{30:228,67:lt,80:ct,81:ft,82:171,116:dt,117:yt,118:at},{31:[1,229],67:lt,82:218,116:dt,117:yt,118:at},{67:lt,69:[1,230],71:[1,231],82:218,116:dt,117:yt,118:at},{67:lt,69:[1,233],71:[1,232],82:218,116:dt,117:yt,118:at},t(Q,[2,45],{18:155,10:B,40:It}),t(Q,[2,47],{44:nt}),t(me,[2,75]),t(me,[2,74]),{62:[1,234],67:lt,82:218,116:dt,117:yt,118:at},t(me,[2,77]),t(dn,[2,80]),{77:[1,235],79:197,116:Fe,119:Ae},{30:236,67:lt,80:ct,81:ft,82:171,116:dt,117:yt,118:at},t(He,i,{5:237}),t(Ct,[2,102]),t(F,[2,35]),{43:238,44:m,45:39,47:40,60:g,89:k,102:E,105:_,106:S,109:L,111:M,113:41,114:D,115:T,116:I},{10:B,18:239},{10:er,60:mr,84:xr,92:240,105:Tn,107:241,108:242,109:Hr,110:_i,111:ji,112:Ai},{10:er,60:mr,84:xr,92:251,104:[1,252],105:Tn,107:241,108:242,109:Hr,110:_i,111:ji,112:Ai},{10:er,60:mr,84:xr,92:253,104:[1,254],105:Tn,107:241,108:242,109:Hr,110:_i,111:ji,112:Ai},{105:[1,255]},{10:er,60:mr,84:xr,92:256,105:Tn,107:241,108:242,109:Hr,110:_i,111:ji,112:Ai},{44:m,47:257,60:g,89:k,102:E,105:_,106:S,109:L,111:M,113:41,114:D,115:T,116:I},t(it,[2,108]),{80:[1,258]},{80:[1,259],98:[1,260]},t(it,[2,116]),t(it,[2,118],{10:[1,261]}),t(it,[2,119]),t(ne,[2,56]),t(Qt,[2,87]),t(ne,[2,57]),{51:[1,262],67:lt,82:218,116:dt,117:yt,118:at},t(ne,[2,64]),t(ne,[2,59]),t(ne,[2,60]),t(ne,[2,61]),{109:[1,263]},t(ne,[2,63]),t(ne,[2,65]),{66:[1,264],67:lt,82:218,116:dt,117:yt,118:at},t(ne,[2,67]),t(ne,[2,68]),t(ne,[2,70]),t(ne,[2,69]),t(ne,[2,71]),t([10,44,60,89,102,105,106,109,111,114,115,116],[2,85]),t(me,[2,78]),{31:[1,265],67:lt,82:218,116:dt,117:yt,118:at},{6:11,7:12,8:s,9:o,10:l,11:u,20:17,22:18,23:19,24:20,25:21,26:22,27:h,32:[1,266],33:24,34:f,36:d,38:p,42:28,43:38,44:m,45:39,47:40,60:g,84:v,85:y,86:b,87:w,88:C,89:k,102:E,105:_,106:S,109:L,111:M,113:41,114:D,115:T,116:I,121:N,122:O,123:R,124:P},t(Se,[2,53]),{43:267,44:m,45:39,47:40,60:g,89:k,102:E,105:_,106:S,109:L,111:M,113:41,114:D,115:T,116:I},t(it,[2,121],{106:el}),t(Li,[2,130],{108:269,10:er,60:mr,84:xr,105:Tn,109:Hr,110:_i,111:ji,112:Ai}),t(Ca,[2,132]),t(Ca,[2,134]),t(Ca,[2,135]),t(Ca,[2,136]),t(Ca,[2,137]),t(Ca,[2,138]),t(Ca,[2,139]),t(Ca,[2,140]),t(Ca,[2,141]),t(it,[2,122],{106:el}),{10:[1,270]},t(it,[2,123],{106:el}),{10:[1,271]},t(Ut,[2,129]),t(it,[2,105],{106:el}),t(it,[2,106],{113:112,44:m,60:g,89:k,102:E,105:_,106:S,109:L,111:M,114:D,115:T,116:I}),t(it,[2,110]),t(it,[2,112],{10:[1,272]}),t(it,[2,113]),{98:[1,273]},{51:[1,274]},{62:[1,275]},{66:[1,276]},{8:G,9:z,11:H,21:277},t(F,[2,34]),t(Se,[2,52]),{10:er,60:mr,84:xr,105:Tn,107:278,108:242,109:Hr,110:_i,111:ji,112:Ai},t(Ca,[2,133]),{14:ie,44:se,60:oe,89:pe,101:279,105:J,106:j,109:Z,111:K,114:X,115:ae,116:W,120:87},{14:ie,44:se,60:oe,89:pe,101:280,105:J,106:j,109:Z,111:K,114:X,115:ae,116:W,120:87},{98:[1,281]},t(it,[2,120]),t(ne,[2,58]),{30:282,67:lt,80:ct,81:ft,82:171,116:dt,117:yt,118:at},t(ne,[2,66]),t(He,i,{5:283}),t(Li,[2,131],{108:269,10:er,60:mr,84:xr,105:Tn,109:Hr,110:_i,111:ji,112:Ai}),t(it,[2,126],{120:167,10:[1,284],14:ie,44:se,60:oe,89:pe,105:J,106:j,109:Z,111:K,114:X,115:ae,116:W}),t(it,[2,127],{120:167,10:[1,285],14:ie,44:se,60:oe,89:pe,105:J,106:j,109:Z,111:K,114:X,115:ae,116:W}),t(it,[2,114]),{31:[1,286],67:lt,82:218,116:dt,117:yt,118:at},{6:11,7:12,8:s,9:o,10:l,11:u,20:17,22:18,23:19,24:20,25:21,26:22,27:h,32:[1,287],33:24,34:f,36:d,38:p,42:28,43:38,44:m,45:39,47:40,60:g,84:v,85:y,86:b,87:w,88:C,89:k,102:E,105:_,106:S,109:L,111:M,113:41,114:D,115:T,116:I,121:N,122:O,123:R,124:P},{10:er,60:mr,84:xr,92:288,105:Tn,107:241,108:242,109:Hr,110:_i,111:ji,112:Ai},{10:er,60:mr,84:xr,92:289,105:Tn,107:241,108:242,109:Hr,110:_i,111:ji,112:Ai},t(ne,[2,62]),t(F,[2,33]),t(it,[2,124],{106:el}),t(it,[2,125],{106:el})],defaultActions:{},parseError:x(function(Je,gt){if(gt.recoverable)this.trace(Je);else{var St=new Error(Je);throw St.hash=gt,St}},"parseError"),parse:x(function(Je){var gt=this,St=[0],Qe=[],Mr=[null],ge=[],Mn=this.table,be="",Zn=0,vg=0,fb=0,sk=2,ok=1,lk=ge.slice.call(arguments,1),_a=Object.create(this.lexer),sh={yy:{}};for(var yg in this.yy)Object.prototype.hasOwnProperty.call(this.yy,yg)&&(sh.yy[yg]=this.yy[yg]);_a.setInput(Je,sh.yy),sh.yy.lexer=_a,sh.yy.parser=this,typeof _a.yylloc>"u"&&(_a.yylloc={});var Cf=_a.yylloc;ge.push(Cf);var db=_a.options&&_a.options.ranges;typeof sh.yy.parseError=="function"?this.parseError=sh.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function pt(_o){St.length=St.length-2*_o,Mr.length=Mr.length-_o,ge.length=ge.length-_o}x(pt,"popStack");function xe(){var _o;return _o=Qe.pop()||_a.lex()||ok,typeof _o!="number"&&(_o instanceof Array&&(Qe=_o,_o=Qe.pop()),_o=gt.symbols_[_o]||_o),_o}x(xe,"lex");for(var Pe,et,_t,Pt,ar,En,Qn={},Zi,zn,Ks,Aa;;){if(_t=St[St.length-1],this.defaultActions[_t]?Pt=this.defaultActions[_t]:((Pe===null||typeof Pe>"u")&&(Pe=xe()),Pt=Mn[_t]&&Mn[_t][Pe]),typeof Pt>"u"||!Pt.length||!Pt[0]){var $L="";Aa=[];for(Zi in Mn[_t])this.terminals_[Zi]&&Zi>sk&&Aa.push("'"+this.terminals_[Zi]+"'");_a.showPosition?$L="Parse error on line "+(Zn+1)+`: -`+_a.showPosition()+` -Expecting `+Aa.join(", ")+", got '"+(this.terminals_[Pe]||Pe)+"'":$L="Parse error on line "+(Zn+1)+": Unexpected "+(Pe==ok?"end of input":"'"+(this.terminals_[Pe]||Pe)+"'"),this.parseError($L,{text:_a.match,token:this.terminals_[Pe]||Pe,line:_a.yylineno,loc:Cf,expected:Aa})}if(Pt[0]instanceof Array&&Pt.length>1)throw new Error("Parse Error: multiple actions possible at state: "+_t+", token: "+Pe);switch(Pt[0]){case 1:St.push(Pe),Mr.push(_a.yytext),ge.push(_a.yylloc),St.push(Pt[1]),Pe=null,et?(Pe=et,et=null):(vg=_a.yyleng,be=_a.yytext,Zn=_a.yylineno,Cf=_a.yylloc,fb>0&&fb--);break;case 2:if(zn=this.productions_[Pt[1]][1],Qn.$=Mr[Mr.length-zn],Qn._$={first_line:ge[ge.length-(zn||1)].first_line,last_line:ge[ge.length-1].last_line,first_column:ge[ge.length-(zn||1)].first_column,last_column:ge[ge.length-1].last_column},db&&(Qn._$.range=[ge[ge.length-(zn||1)].range[0],ge[ge.length-1].range[1]]),En=this.performAction.apply(Qn,[be,vg,Zn,sh.yy,Pt[1],Mr,ge].concat(lk)),typeof En<"u")return En;zn&&(St=St.slice(0,-1*zn*2),Mr=Mr.slice(0,-1*zn),ge=ge.slice(0,-1*zn)),St.push(this.productions_[Pt[1]][0]),Mr.push(Qn.$),ge.push(Qn._$),Ks=Mn[St[St.length-2]][St[St.length-1]],St.push(Ks);break;case 3:return!0}}return!0},"parse")},$l=(function(){var Wr={EOF:1,parseError:x(function(gt,St){if(this.yy.parser)this.yy.parser.parseError(gt,St);else throw new Error(gt)},"parseError"),setInput:x(function(Je,gt){return this.yy=gt||this.yy||{},this._input=Je,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:x(function(){var Je=this._input[0];this.yytext+=Je,this.yyleng++,this.offset++,this.match+=Je,this.matched+=Je;var gt=Je.match(/(?:\r\n?|\n).*/g);return gt?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),Je},"input"),unput:x(function(Je){var gt=Je.length,St=Je.split(/(?:\r\n?|\n)/g);this._input=Je+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-gt),this.offset-=gt;var Qe=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),St.length-1&&(this.yylineno-=St.length-1);var Mr=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:St?(St.length===Qe.length?this.yylloc.first_column:0)+Qe[Qe.length-St.length].length-St[0].length:this.yylloc.first_column-gt},this.options.ranges&&(this.yylloc.range=[Mr[0],Mr[0]+this.yyleng-gt]),this.yyleng=this.yytext.length,this},"unput"),more:x(function(){return this._more=!0,this},"more"),reject:x(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). -`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:x(function(Je){this.unput(this.match.slice(Je))},"less"),pastInput:x(function(){var Je=this.matched.substr(0,this.matched.length-this.match.length);return(Je.length>20?"...":"")+Je.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:x(function(){var Je=this.match;return Je.length<20&&(Je+=this._input.substr(0,20-Je.length)),(Je.substr(0,20)+(Je.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:x(function(){var Je=this.pastInput(),gt=new Array(Je.length+1).join("-");return Je+this.upcomingInput()+` -`+gt+"^"},"showPosition"),test_match:x(function(Je,gt){var St,Qe,Mr;if(this.options.backtrack_lexer&&(Mr={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(Mr.yylloc.range=this.yylloc.range.slice(0))),Qe=Je[0].match(/(?:\r\n?|\n).*/g),Qe&&(this.yylineno+=Qe.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:Qe?Qe[Qe.length-1].length-Qe[Qe.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+Je[0].length},this.yytext+=Je[0],this.match+=Je[0],this.matches=Je,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(Je[0].length),this.matched+=Je[0],St=this.performAction.call(this,this.yy,this,gt,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),St)return St;if(this._backtrack){for(var ge in Mr)this[ge]=Mr[ge];return!1}return!1},"test_match"),next:x(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var Je,gt,St,Qe;this._more||(this.yytext="",this.match="");for(var Mr=this._currentRules(),ge=0;gegt[0].length)){if(gt=St,Qe=ge,this.options.backtrack_lexer){if(Je=this.test_match(St,Mr[ge]),Je!==!1)return Je;if(this._backtrack){gt=!1;continue}else return!1}else if(!this.options.flex)break}return gt?(Je=this.test_match(gt,Mr[Qe]),Je!==!1?Je:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. -`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:x(function(){var gt=this.next();return gt||this.lex()},"lex"),begin:x(function(gt){this.conditionStack.push(gt)},"begin"),popState:x(function(){var gt=this.conditionStack.length-1;return gt>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:x(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:x(function(gt){return gt=this.conditionStack.length-1-Math.abs(gt||0),gt>=0?this.conditionStack[gt]:"INITIAL"},"topState"),pushState:x(function(gt){this.begin(gt)},"pushState"),stateStackSize:x(function(){return this.conditionStack.length},"stateStackSize"),options:{},performAction:x(function(gt,St,Qe,Mr){var ge=Mr;switch(Qe){case 0:return this.begin("acc_title"),34;break;case 1:return this.popState(),"acc_title_value";break;case 2:return this.begin("acc_descr"),36;break;case 3:return this.popState(),"acc_descr_value";break;case 4:this.begin("acc_descr_multiline");break;case 5:this.popState();break;case 6:return"acc_descr_multiline_value";case 7:return this.pushState("shapeData"),St.yytext="",40;break;case 8:return this.pushState("shapeDataStr"),40;break;case 9:return this.popState(),40;break;case 10:let Mn=/\n\s*/g;return St.yytext=St.yytext.replace(Mn,"
    "),40;break;case 11:return 40;case 12:this.popState();break;case 13:this.begin("callbackname");break;case 14:this.popState();break;case 15:this.popState(),this.begin("callbackargs");break;case 16:return 95;case 17:this.popState();break;case 18:return 96;case 19:return"MD_STR";case 20:this.popState();break;case 21:this.begin("md_string");break;case 22:return"STR";case 23:this.popState();break;case 24:this.pushState("string");break;case 25:return 84;case 26:return 102;case 27:return 85;case 28:return 104;case 29:return 86;case 30:return 87;case 31:return 97;case 32:this.begin("click");break;case 33:this.popState();break;case 34:return 88;case 35:return gt.lex.firstGraph()&&this.begin("dir"),12;break;case 36:return gt.lex.firstGraph()&&this.begin("dir"),12;break;case 37:return gt.lex.firstGraph()&&this.begin("dir"),12;break;case 38:return 27;case 39:return 32;case 40:return 98;case 41:return 98;case 42:return 98;case 43:return 98;case 44:return this.popState(),13;break;case 45:return this.popState(),14;break;case 46:return this.popState(),14;break;case 47:return this.popState(),14;break;case 48:return this.popState(),14;break;case 49:return this.popState(),14;break;case 50:return this.popState(),14;break;case 51:return this.popState(),14;break;case 52:return this.popState(),14;break;case 53:return this.popState(),14;break;case 54:return this.popState(),14;break;case 55:return 121;case 56:return 122;case 57:return 123;case 58:return 124;case 59:return 78;case 60:return 105;case 61:return 111;case 62:return 46;case 63:return 60;case 64:return 44;case 65:return 8;case 66:return 106;case 67:return 115;case 68:return this.popState(),77;break;case 69:return this.pushState("edgeText"),75;break;case 70:return 119;case 71:return this.popState(),77;break;case 72:return this.pushState("thickEdgeText"),75;break;case 73:return 119;case 74:return this.popState(),77;break;case 75:return this.pushState("dottedEdgeText"),75;break;case 76:return 119;case 77:return 77;case 78:return this.popState(),53;break;case 79:return"TEXT";case 80:return this.pushState("ellipseText"),52;break;case 81:return this.popState(),55;break;case 82:return this.pushState("text"),54;break;case 83:return this.popState(),57;break;case 84:return this.pushState("text"),56;break;case 85:return 58;case 86:return this.pushState("text"),67;break;case 87:return this.popState(),64;break;case 88:return this.pushState("text"),63;break;case 89:return this.popState(),49;break;case 90:return this.pushState("text"),48;break;case 91:return this.popState(),69;break;case 92:return this.popState(),71;break;case 93:return 117;case 94:return this.pushState("trapText"),68;break;case 95:return this.pushState("trapText"),70;break;case 96:return 118;case 97:return 67;case 98:return 90;case 99:return"SEP";case 100:return 89;case 101:return 115;case 102:return 111;case 103:return 44;case 104:return 109;case 105:return 114;case 106:return 116;case 107:return this.popState(),62;break;case 108:return this.pushState("text"),62;break;case 109:return this.popState(),51;break;case 110:return this.pushState("text"),50;break;case 111:return this.popState(),31;break;case 112:return this.pushState("text"),29;break;case 113:return this.popState(),66;break;case 114:return this.pushState("text"),65;break;case 115:return"TEXT";case 116:return"QUOTE";case 117:return 9;case 118:return 10;case 119:return 11}},"anonymous"),rules:[/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?:@\{)/,/^(?:["])/,/^(?:["])/,/^(?:[^\"]+)/,/^(?:[^}^"]+)/,/^(?:\})/,/^(?:call[\s]+)/,/^(?:\([\s]*\))/,/^(?:\()/,/^(?:[^(]*)/,/^(?:\))/,/^(?:[^)]*)/,/^(?:[^`"]+)/,/^(?:[`]["])/,/^(?:["][`])/,/^(?:[^"]+)/,/^(?:["])/,/^(?:["])/,/^(?:style\b)/,/^(?:default\b)/,/^(?:linkStyle\b)/,/^(?:interpolate\b)/,/^(?:classDef\b)/,/^(?:class\b)/,/^(?:href[\s])/,/^(?:click[\s]+)/,/^(?:[\s\n])/,/^(?:[^\s\n]*)/,/^(?:flowchart-elk\b)/,/^(?:graph\b)/,/^(?:flowchart\b)/,/^(?:subgraph\b)/,/^(?:end\b\s*)/,/^(?:_self\b)/,/^(?:_blank\b)/,/^(?:_parent\b)/,/^(?:_top\b)/,/^(?:(\r?\n)*\s*\n)/,/^(?:\s*LR\b)/,/^(?:\s*RL\b)/,/^(?:\s*TB\b)/,/^(?:\s*BT\b)/,/^(?:\s*TD\b)/,/^(?:\s*BR\b)/,/^(?:\s*<)/,/^(?:\s*>)/,/^(?:\s*\^)/,/^(?:\s*v\b)/,/^(?:.*direction\s+TB[^\n]*)/,/^(?:.*direction\s+BT[^\n]*)/,/^(?:.*direction\s+RL[^\n]*)/,/^(?:.*direction\s+LR[^\n]*)/,/^(?:[^\s\"]+@(?=[^\{\"]))/,/^(?:[0-9]+)/,/^(?:#)/,/^(?::::)/,/^(?::)/,/^(?:&)/,/^(?:;)/,/^(?:,)/,/^(?:\*)/,/^(?:\s*[xo<]?--+[-xo>]\s*)/,/^(?:\s*[xo<]?--\s*)/,/^(?:[^-]|-(?!-)+)/,/^(?:\s*[xo<]?==+[=xo>]\s*)/,/^(?:\s*[xo<]?==\s*)/,/^(?:[^=]|=(?!))/,/^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/,/^(?:\s*[xo<]?-\.\s*)/,/^(?:[^\.]|\.(?!))/,/^(?:\s*~~[\~]+\s*)/,/^(?:[-/\)][\)])/,/^(?:[^\(\)\[\]\{\}]|!\)+)/,/^(?:\(-)/,/^(?:\]\))/,/^(?:\(\[)/,/^(?:\]\])/,/^(?:\[\[)/,/^(?:\[\|)/,/^(?:>)/,/^(?:\)\])/,/^(?:\[\()/,/^(?:\)\)\))/,/^(?:\(\(\()/,/^(?:[\\(?=\])][\]])/,/^(?:\/(?=\])\])/,/^(?:\/(?!\])|\\(?!\])|[^\\\[\]\(\)\{\}\/]+)/,/^(?:\[\/)/,/^(?:\[\\)/,/^(?:<)/,/^(?:>)/,/^(?:\^)/,/^(?:\\\|)/,/^(?:v\b)/,/^(?:\*)/,/^(?:#)/,/^(?:&)/,/^(?:([A-Za-z0-9!"\#$%&'*+\.`?\\_\/]|-(?=[^\>\-\.])|(?!))+)/,/^(?:-)/,/^(?:[\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6]|[\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377]|[\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5]|[\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA]|[\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE]|[\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA]|[\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0]|[\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977]|[\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2]|[\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A]|[\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39]|[\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8]|[\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C]|[\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C]|[\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99]|[\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0]|[\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D]|[\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3]|[\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10]|[\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1]|[\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81]|[\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3]|[\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6]|[\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A]|[\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081]|[\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D]|[\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0]|[\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310]|[\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C]|[\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711]|[\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7]|[\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C]|[\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16]|[\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF]|[\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC]|[\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D]|[\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D]|[\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3]|[\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F]|[\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128]|[\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184]|[\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3]|[\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6]|[\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE]|[\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C]|[\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D]|[\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC]|[\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B]|[\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788]|[\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805]|[\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB]|[\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28]|[\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5]|[\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4]|[\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E]|[\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D]|[\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36]|[\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D]|[\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC]|[\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF]|[\uFFD2-\uFFD7\uFFDA-\uFFDC])/,/^(?:\|)/,/^(?:\|)/,/^(?:\))/,/^(?:\()/,/^(?:\])/,/^(?:\[)/,/^(?:(\}))/,/^(?:\{)/,/^(?:[^\[\]\(\)\{\}\|\"]+)/,/^(?:")/,/^(?:(\r?\n)+)/,/^(?:\s)/,/^(?:$)/],conditions:{shapeDataEndBracket:{rules:[21,24,77,80,82,84,88,90,94,95,108,110,112,114],inclusive:!1},shapeDataStr:{rules:[9,10,21,24,77,80,82,84,88,90,94,95,108,110,112,114],inclusive:!1},shapeData:{rules:[8,11,12,21,24,77,80,82,84,88,90,94,95,108,110,112,114],inclusive:!1},callbackargs:{rules:[17,18,21,24,77,80,82,84,88,90,94,95,108,110,112,114],inclusive:!1},callbackname:{rules:[14,15,16,21,24,77,80,82,84,88,90,94,95,108,110,112,114],inclusive:!1},href:{rules:[21,24,77,80,82,84,88,90,94,95,108,110,112,114],inclusive:!1},click:{rules:[21,24,33,34,77,80,82,84,88,90,94,95,108,110,112,114],inclusive:!1},dottedEdgeText:{rules:[21,24,74,76,77,80,82,84,88,90,94,95,108,110,112,114],inclusive:!1},thickEdgeText:{rules:[21,24,71,73,77,80,82,84,88,90,94,95,108,110,112,114],inclusive:!1},edgeText:{rules:[21,24,68,70,77,80,82,84,88,90,94,95,108,110,112,114],inclusive:!1},trapText:{rules:[21,24,77,80,82,84,88,90,91,92,93,94,95,108,110,112,114],inclusive:!1},ellipseText:{rules:[21,24,77,78,79,80,82,84,88,90,94,95,108,110,112,114],inclusive:!1},text:{rules:[21,24,77,80,81,82,83,84,87,88,89,90,94,95,107,108,109,110,111,112,113,114,115],inclusive:!1},vertex:{rules:[21,24,77,80,82,84,88,90,94,95,108,110,112,114],inclusive:!1},dir:{rules:[21,24,44,45,46,47,48,49,50,51,52,53,54,77,80,82,84,88,90,94,95,108,110,112,114],inclusive:!1},acc_descr_multiline:{rules:[5,6,21,24,77,80,82,84,88,90,94,95,108,110,112,114],inclusive:!1},acc_descr:{rules:[3,21,24,77,80,82,84,88,90,94,95,108,110,112,114],inclusive:!1},acc_title:{rules:[1,21,24,77,80,82,84,88,90,94,95,108,110,112,114],inclusive:!1},md_string:{rules:[19,20,21,24,77,80,82,84,88,90,94,95,108,110,112,114],inclusive:!1},string:{rules:[21,22,23,24,77,80,82,84,88,90,94,95,108,110,112,114],inclusive:!1},INITIAL:{rules:[0,2,4,7,13,21,24,25,26,27,28,29,30,31,32,35,36,37,38,39,40,41,42,43,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,71,72,74,75,77,80,82,84,85,86,88,90,94,95,96,97,98,99,100,101,102,103,104,105,106,108,110,112,114,116,117,118,119],inclusive:!0}}};return Wr})();Sa.lexer=$l;function Ki(){this.yy={}}return x(Ki,"Parser"),Ki.prototype=Sa,Sa.Parser=Ki,new Ki})();QB.parser=QB;ege=QB,tge=Object.assign({},ege);tge.parse=t=>{let e=t.replace(/}\s*\n/g,`} -`);return ege.parse(e)};Yrt=tge,Xrt=x((t,e)=>{let r=op,n=r(t,"r"),a=r(t,"g"),i=r(t,"b");return ms(n,a,i,e)},"fade"),jrt=x(t=>`.label { +You have to call mermaid.initialize.`)}isLinkData(e){return e!==null&&typeof e=="object"&&"id"in e&&typeof e.id=="string"}addLink(e,r,n){let i=this.isLinkData(n)?n.id.replace("@",""):void 0;he.info("addLink",e,r,i);for(let a of e)for(let s of r){let o=a===e[e.length-1],l=s===r[0];o&&l?this.addSingleLink(a,s,n,i):this.addSingleLink(a,s,n,void 0)}}updateLinkInterpolate(e,r){e.forEach(n=>{n==="default"?this.edges.defaultInterpolate=r:this.edges[n].interpolate=r})}updateLink(e,r){e.forEach(n=>{if(typeof n=="number"&&n>=this.edges.length)throw new Error(`The index ${n} for linkStyle is out of bounds. Valid indices for linkStyle are between 0 and ${this.edges.length-1}. (Help: Ensure that the index is within the range of existing edges.)`);n==="default"?this.edges.defaultStyle=r:(this.edges[n].style=r,(this.edges[n]?.style?.length??0)>0&&!this.edges[n]?.style?.some(i=>i?.startsWith("fill"))&&this.edges[n]?.style?.push("fill:none"))})}addClass(e,r){let n=r.join().replace(/\\,/g,"\xA7\xA7\xA7").replace(/,/g,";").replace(/§§§/g,",").split(";");e.split(",").forEach(i=>{let a=this.classes.get(i);a===void 0&&(a={id:i,styles:[],textStyles:[]},this.classes.set(i,a)),n?.forEach(s=>{if(/color/.exec(s)){let o=s.replace("fill","bgFill");a.textStyles.push(o)}a.styles.push(s)})})}setDirection(e){this.direction=e,/.*/.exec(this.direction)&&(this.direction="LR"),/.*v/.exec(this.direction)&&(this.direction="TB"),this.direction==="TD"&&(this.direction="TB")}setClass(e,r){for(let n of e.split(",")){let i=this.vertices.get(n);i&&i.classes.push(r);let a=this.edges.find(o=>o.id===n);a&&a.classes.push(r);let s=this.subGraphLookup.get(n);s&&s.classes.push(r)}}setTooltip(e,r){if(r!==void 0){r=this.sanitizeText(r);for(let n of e.split(","))this.tooltips.set(this.version==="gen-1"?this.lookUpDomId(n):n,r)}}setClickFun(e,r,n){let i=this.lookUpDomId(e);if(Fe().securityLevel!=="loose"||r===void 0)return;let a=[];if(typeof n=="string"){a=n.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let o=0;o{let o=document.querySelector(`[id="${i}"]`);o!==null&&o.addEventListener("click",()=>{gr.runFunc(r,...a)},!1)}))}setLink(e,r,n){e.split(",").forEach(i=>{let a=this.vertices.get(i);a!==void 0&&(a.link=gr.formatUrl(r,this.config),a.linkTarget=n)}),this.setClass(e,"clickable")}getTooltip(e){return this.tooltips.get(e)}setClickEvent(e,r,n){e.split(",").forEach(i=>{this.setClickFun(i,r,n)}),this.setClass(e,"clickable")}bindFunctions(e){this.funs.forEach(r=>{r(e)})}getDirection(){return this.direction?.trim()}getVertices(){return this.vertices}getEdges(){return this.edges}getClasses(){return this.classes}setupToolTips(e){let r=dt(".mermaidTooltip");(r._groups||r)[0][0]===null&&(r=dt("body").append("div").attr("class","mermaidTooltip").style("opacity",0)),dt(e).select("svg").selectAll("g.node").on("mouseover",a=>{let s=dt(a.currentTarget);if(s.attr("title")===null)return;let l=a.currentTarget?.getBoundingClientRect();r.transition().duration(200).style("opacity",".9"),r.text(s.attr("title")).style("left",window.scrollX+l.left+(l.right-l.left)/2+"px").style("top",window.scrollY+l.bottom+"px"),r.html(r.html().replace(/<br\/>/g,"
    ")),s.classed("hover",!0)}).on("mouseout",a=>{r.transition().duration(500).style("opacity",0),dt(a.currentTarget).classed("hover",!1)})}clear(e="gen-2"){this.vertices=new Map,this.classes=new Map,this.edges=[],this.funs=[this.setupToolTips.bind(this)],this.subGraphs=[],this.subGraphLookup=new Map,this.subCount=0,this.tooltips=new Map,this.firstGraphFlag=!0,this.version=e,this.config=Fe(),Jr()}setGen(e){this.version=e||"gen-2"}defaultStyle(){return"fill:#ffa;stroke: #f66; stroke-width: 3px; stroke-dasharray: 5, 5;fill:#ffa;stroke: #666;"}addSubGraph(e,r,n){let i=e.text.trim(),a=n.text;e===n&&/\s/.exec(n.text)&&(i=void 0);let s=b(h=>{let f={boolean:{},number:{},string:{}},d=[],p;return{nodeList:h.filter(function(g){let y=typeof g;return g.stmt&&g.stmt==="dir"?(p=g.value,!1):g.trim()===""?!1:y in f?f[y].hasOwnProperty(g)?!1:f[y][g]=!0:d.includes(g)?!1:d.push(g)}),dir:p}},"uniq"),{nodeList:o,dir:l}=s(r.flat());if(this.version==="gen-1")for(let h=0;h2e3)return{result:!1,count:0};if(this.posCrossRef[this.secCount]=r,this.subGraphs[r].id===e)return{result:!0,count:0};let i=0,a=1;for(;i=0){let o=this.indexNodes2(e,s);if(o.result)return{result:!0,count:a+o.count};a=a+o.count}i=i+1}return{result:!1,count:a}}getDepthFirstPos(e){return this.posCrossRef[e]}indexNodes(){this.secCount=-1,this.subGraphs.length>0&&this.indexNodes2("none",this.subGraphs.length-1)}getSubGraphs(){return this.subGraphs}firstGraph(){return this.firstGraphFlag?(this.firstGraphFlag=!1,!0):!1}destructStartLink(e){let r=e.trim(),n="arrow_open";switch(r[0]){case"<":n="arrow_point",r=r.slice(1);break;case"x":n="arrow_cross",r=r.slice(1);break;case"o":n="arrow_circle",r=r.slice(1);break}let i="normal";return r.includes("=")&&(i="thick"),r.includes(".")&&(i="dotted"),{type:n,stroke:i}}countChar(e,r){let n=r.length,i=0;for(let a=0;a":i="arrow_point",r.startsWith("<")&&(i="double_"+i,n=n.slice(1));break;case"o":i="arrow_circle",r.startsWith("o")&&(i="double_"+i,n=n.slice(1));break}let a="normal",s=n.length-1;n.startsWith("=")&&(a="thick"),n.startsWith("~")&&(a="invisible");let o=this.countChar(".",n);return o&&(a="dotted",s=o),{type:i,stroke:a,length:s}}destructLink(e,r){let n=this.destructEndLink(e),i;if(r){if(i=this.destructStartLink(r),i.stroke!==n.stroke)return{type:"INVALID",stroke:"INVALID"};if(i.type==="arrow_open")i.type=n.type;else{if(i.type!==n.type)return{type:"INVALID",stroke:"INVALID"};i.type="double_"+i.type}return i.type==="double_arrow"&&(i.type="double_arrow_point"),i.length=n.length,i}return n}exists(e,r){for(let n of e)if(n.nodes.includes(r))return!0;return!1}makeUniq(e,r){let n=[];return e.nodes.forEach((i,a)=>{this.exists(r,i)||n.push(e.nodes[a])}),{nodes:n}}getTypeFromVertex(e){if(e.img)return"imageSquare";if(e.icon)return e.form==="circle"?"iconCircle":e.form==="square"?"iconSquare":e.form==="rounded"?"iconRounded":"icon";switch(e.type){case"square":case void 0:return"squareRect";case"round":return"roundedRect";case"ellipse":return"ellipse";default:return e.type}}findNode(e,r){return e.find(n=>n.id===r)}destructEdgeType(e){let r="none",n="arrow_point";switch(e){case"arrow_point":case"arrow_circle":case"arrow_cross":n=e;break;case"double_arrow_point":case"double_arrow_circle":case"double_arrow_cross":r=e.replace("double_",""),n=r;break}return{arrowTypeStart:r,arrowTypeEnd:n}}addNodeFromVertex(e,r,n,i,a,s){let o=n.get(e.id),l=i.get(e.id)??!1,u=this.findNode(r,e.id);if(u)u.cssStyles=e.styles,u.cssCompiledStyles=this.getCompiledStyles(e.classes),u.cssClasses=e.classes.join(" ");else{let h={id:e.id,label:e.text,labelStyle:"",parentId:o,padding:a.flowchart?.padding||8,cssStyles:e.styles,cssCompiledStyles:this.getCompiledStyles(["default","node",...e.classes]),cssClasses:"default "+e.classes.join(" "),dir:e.dir,domId:e.domId,look:s,link:e.link,linkTarget:e.linkTarget,tooltip:this.getTooltip(e.id),icon:e.icon,pos:e.pos,img:e.img,assetWidth:e.assetWidth,assetHeight:e.assetHeight,constraint:e.constraint};l?r.push({...h,isGroup:!0,shape:"rect"}):r.push({...h,isGroup:!1,shape:this.getTypeFromVertex(e)})}}getCompiledStyles(e){let r=[];for(let n of e){let i=this.classes.get(n);i?.styles&&(r=[...r,...i.styles??[]].map(a=>a.trim())),i?.textStyles&&(r=[...r,...i.textStyles??[]].map(a=>a.trim()))}return r}getData(){let e=Fe(),r=[],n=[],i=this.getSubGraphs(),a=new Map,s=new Map;for(let u=i.length-1;u>=0;u--){let h=i[u];h.nodes.length>0&&s.set(h.id,!0);for(let f of h.nodes)a.set(f,h.id)}for(let u=i.length-1;u>=0;u--){let h=i[u];r.push({id:h.id,label:h.title,labelStyle:"",parentId:a.get(h.id),padding:8,cssCompiledStyles:this.getCompiledStyles(h.classes),cssClasses:h.classes.join(" "),shape:"rect",dir:h.dir,isGroup:!0,look:e.look})}this.getVertices().forEach(u=>{this.addNodeFromVertex(u,r,a,s,e,e.look||"classic")});let l=this.getEdges();return l.forEach((u,h)=>{let{arrowTypeStart:f,arrowTypeEnd:d}=this.destructEdgeType(u.type),p=[...l.defaultStyle??[]];u.style&&p.push(...u.style);let m={id:Sd(u.start,u.end,{counter:h,prefix:"L"},u.id),isUserDefinedId:u.isUserDefinedId,start:u.start,end:u.end,type:u.type??"normal",label:u.text,labelpos:"c",thickness:u.stroke,minlen:u.length,classes:u?.stroke==="invisible"?"":"edge-thickness-normal edge-pattern-solid flowchart-link",arrowTypeStart:u?.stroke==="invisible"||u?.type==="arrow_open"?"none":f,arrowTypeEnd:u?.stroke==="invisible"||u?.type==="arrow_open"?"none":d,arrowheadStyle:"fill: #333",cssCompiledStyles:this.getCompiledStyles(u.classes),labelStyle:p,style:p,pattern:u.stroke,look:e.look,animate:u.animate,animation:u.animation,curve:u.interpolate||this.edges.defaultInterpolate||e.flowchart?.curve};n.push(m)}),{nodes:r,edges:n,other:{},config:e}}defaultConfig(){return dT.flowchart}},b(Sy,"FlowDB"),Sy),wot=b(function(t,e){return e.db.getClasses()},"getClasses"),kot=b(async function(t,e,r,n){he.info("REF0:"),he.info("Drawing state diagram (v2)",e);let{securityLevel:i,flowchart:a,layout:s}=Fe(),o;i==="sandbox"&&(o=dt("#i"+e));let l=i==="sandbox"?o.nodes()[0].contentDocument:document;he.debug("Before getData: ");let u=n.db.getData();he.debug("Data: ",u);let h=k0(e,i),f=n.db.getDirection();u.type=n.type,u.layoutAlgorithm=Fd(s),u.layoutAlgorithm==="dagre"&&s==="elk"&&he.warn("flowchart-elk was moved to an external package in Mermaid v11. Please refer [release notes](https://github.com/mermaid-js/mermaid/releases/tag/v11.0.0) for more details. This diagram will be rendered using `dagre` layout as a fallback."),u.direction=f,u.nodeSpacing=a?.nodeSpacing||50,u.rankSpacing=a?.rankSpacing||50,u.markers=["point","circle","cross"],u.diagramId=e,he.debug("REF1:",u),await y0(u,h);let d=u.config.flowchart?.diagramPadding??8;gr.insertTitle(h,"flowchartTitleText",a?.titleTopMargin||0,n.db.getDiagramTitle()),T0(h,d,"flowchart",a?.useMaxWidth||!1);for(let p of u.nodes){let m=dt(`#${e} [id="${p.id}"]`);if(!m||!p.link)continue;let g=l.createElementNS("http://www.w3.org/2000/svg","a");g.setAttributeNS("http://www.w3.org/2000/svg","class",p.cssClasses),g.setAttributeNS("http://www.w3.org/2000/svg","rel","noopener"),i==="sandbox"?g.setAttributeNS("http://www.w3.org/2000/svg","target","_top"):p.linkTarget&&g.setAttributeNS("http://www.w3.org/2000/svg","target",p.linkTarget);let y=m.insert(function(){return g},":first-child"),v=m.select(".label-container");v&&y.append(function(){return v.node()});let x=m.select(".label");x&&y.append(function(){return x.node()})}},"draw"),Tot={getClasses:wot,draw:kot},c$=(function(){var t=b(function(cn,Ct,$t,Xt){for($t=$t||{},Xt=cn.length;Xt--;$t[cn[Xt]]=Ct);return $t},"o"),e=[1,4],r=[1,3],n=[1,5],i=[1,8,9,10,11,27,34,36,38,44,60,84,85,86,87,88,89,102,105,106,109,111,114,115,116,121,122,123,124],a=[2,2],s=[1,13],o=[1,14],l=[1,15],u=[1,16],h=[1,23],f=[1,25],d=[1,26],p=[1,27],m=[1,49],g=[1,48],y=[1,29],v=[1,30],x=[1,31],k=[1,32],_=[1,33],T=[1,44],S=[1,46],R=[1,42],A=[1,47],I=[1,43],P=[1,50],O=[1,45],C=[1,51],N=[1,52],B=[1,34],F=[1,35],M=[1,36],$=[1,37],z=[1,57],q=[1,8,9,10,11,27,32,34,36,38,44,60,84,85,86,87,88,89,102,105,106,109,111,114,115,116,121,122,123,124],V=[1,61],U=[1,60],J=[1,62],se=[8,9,11,75,77,78],re=[1,78],me=[1,91],ge=[1,96],ye=[1,95],_e=[1,92],ue=[1,88],ie=[1,94],le=[1,90],oe=[1,97],ne=[1,93],pe=[1,98],te=[1,89],He=[8,9,10,11,40,75,77,78],de=[8,9,10,11,40,46,75,77,78],ce=[8,9,10,11,29,40,44,46,48,50,52,54,56,58,60,63,65,67,68,70,75,77,78,89,102,105,106,109,111,114,115,116],st=[8,9,11,44,60,75,77,78,89,102,105,106,109,111,114,115,116],Ae=[44,60,89,102,105,106,109,111,114,115,116],Ye=[1,121],Ge=[1,122],rt=[1,124],Xe=[1,123],Ze=[44,60,62,74,89,102,105,106,109,111,114,115,116],Pe=[1,133],Re=[1,147],Ve=[1,148],ke=[1,149],xe=[1,150],H=[1,135],ve=[1,137],K=[1,141],we=[1,142],Ee=[1,143],Ke=[1,144],Be=[1,145],De=[1,146],nt=[1,151],We=[1,152],ut=[1,131],vt=[1,132],gt=[1,139],mt=[1,134],ft=[1,138],Dt=[1,136],ht=[8,9,10,11,27,32,34,36,38,44,60,84,85,86,87,88,89,102,105,106,109,111,114,115,116,121,122,123,124],yt=[1,154],W=[1,156],j=[8,9,11],Je=[8,9,10,11,14,44,60,89,105,106,109,111,114,115,116],ee=[1,176],Te=[1,172],bt=[1,173],at=[1,177],It=[1,174],At=[1,175],Ut=[77,116,119],Bt=[8,9,10,11,12,14,27,29,32,44,60,75,84,85,86,87,88,89,90,105,109,111,114,115,116],Kt=[10,106],vr=[31,49,51,53,55,57,62,64,66,67,69,71,116,117,118],Me=[1,247],kr=[1,245],Ue=[1,249],Bn=[1,243],un=[1,244],da=[1,246],ra=[1,248],nr=[1,250],zs=[1,268],na=[8,9,11,106],Oi=[8,9,10,11,60,84,105,106,109,110,111,112],Pi={trace:b(function(){},"trace"),yy:{},symbols_:{error:2,start:3,graphConfig:4,document:5,line:6,statement:7,SEMI:8,NEWLINE:9,SPACE:10,EOF:11,GRAPH:12,NODIR:13,DIR:14,FirstStmtSeparator:15,ending:16,endToken:17,spaceList:18,spaceListNewline:19,vertexStatement:20,separator:21,styleStatement:22,linkStyleStatement:23,classDefStatement:24,classStatement:25,clickStatement:26,subgraph:27,textNoTags:28,SQS:29,text:30,SQE:31,end:32,direction:33,acc_title:34,acc_title_value:35,acc_descr:36,acc_descr_value:37,acc_descr_multiline_value:38,shapeData:39,SHAPE_DATA:40,link:41,node:42,styledVertex:43,AMP:44,vertex:45,STYLE_SEPARATOR:46,idString:47,DOUBLECIRCLESTART:48,DOUBLECIRCLEEND:49,PS:50,PE:51,"(-":52,"-)":53,STADIUMSTART:54,STADIUMEND:55,SUBROUTINESTART:56,SUBROUTINEEND:57,VERTEX_WITH_PROPS_START:58,"NODE_STRING[field]":59,COLON:60,"NODE_STRING[value]":61,PIPE:62,CYLINDERSTART:63,CYLINDEREND:64,DIAMOND_START:65,DIAMOND_STOP:66,TAGEND:67,TRAPSTART:68,TRAPEND:69,INVTRAPSTART:70,INVTRAPEND:71,linkStatement:72,arrowText:73,TESTSTR:74,START_LINK:75,edgeText:76,LINK:77,LINK_ID:78,edgeTextToken:79,STR:80,MD_STR:81,textToken:82,keywords:83,STYLE:84,LINKSTYLE:85,CLASSDEF:86,CLASS:87,CLICK:88,DOWN:89,UP:90,textNoTagsToken:91,stylesOpt:92,"idString[vertex]":93,"idString[class]":94,CALLBACKNAME:95,CALLBACKARGS:96,HREF:97,LINK_TARGET:98,"STR[link]":99,"STR[tooltip]":100,alphaNum:101,DEFAULT:102,numList:103,INTERPOLATE:104,NUM:105,COMMA:106,style:107,styleComponent:108,NODE_STRING:109,UNIT:110,BRKT:111,PCT:112,idStringToken:113,MINUS:114,MULT:115,UNICODE_TEXT:116,TEXT:117,TAGSTART:118,EDGE_TEXT:119,alphaNumToken:120,direction_tb:121,direction_bt:122,direction_rl:123,direction_lr:124,$accept:0,$end:1},terminals_:{2:"error",8:"SEMI",9:"NEWLINE",10:"SPACE",11:"EOF",12:"GRAPH",13:"NODIR",14:"DIR",27:"subgraph",29:"SQS",31:"SQE",32:"end",34:"acc_title",35:"acc_title_value",36:"acc_descr",37:"acc_descr_value",38:"acc_descr_multiline_value",40:"SHAPE_DATA",44:"AMP",46:"STYLE_SEPARATOR",48:"DOUBLECIRCLESTART",49:"DOUBLECIRCLEEND",50:"PS",51:"PE",52:"(-",53:"-)",54:"STADIUMSTART",55:"STADIUMEND",56:"SUBROUTINESTART",57:"SUBROUTINEEND",58:"VERTEX_WITH_PROPS_START",59:"NODE_STRING[field]",60:"COLON",61:"NODE_STRING[value]",62:"PIPE",63:"CYLINDERSTART",64:"CYLINDEREND",65:"DIAMOND_START",66:"DIAMOND_STOP",67:"TAGEND",68:"TRAPSTART",69:"TRAPEND",70:"INVTRAPSTART",71:"INVTRAPEND",74:"TESTSTR",75:"START_LINK",77:"LINK",78:"LINK_ID",80:"STR",81:"MD_STR",84:"STYLE",85:"LINKSTYLE",86:"CLASSDEF",87:"CLASS",88:"CLICK",89:"DOWN",90:"UP",93:"idString[vertex]",94:"idString[class]",95:"CALLBACKNAME",96:"CALLBACKARGS",97:"HREF",98:"LINK_TARGET",99:"STR[link]",100:"STR[tooltip]",102:"DEFAULT",104:"INTERPOLATE",105:"NUM",106:"COMMA",109:"NODE_STRING",110:"UNIT",111:"BRKT",112:"PCT",114:"MINUS",115:"MULT",116:"UNICODE_TEXT",117:"TEXT",118:"TAGSTART",119:"EDGE_TEXT",121:"direction_tb",122:"direction_bt",123:"direction_rl",124:"direction_lr"},productions_:[0,[3,2],[5,0],[5,2],[6,1],[6,1],[6,1],[6,1],[6,1],[4,2],[4,2],[4,2],[4,3],[16,2],[16,1],[17,1],[17,1],[17,1],[15,1],[15,1],[15,2],[19,2],[19,2],[19,1],[19,1],[18,2],[18,1],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,9],[7,6],[7,4],[7,1],[7,2],[7,2],[7,1],[21,1],[21,1],[21,1],[39,2],[39,1],[20,4],[20,3],[20,4],[20,2],[20,2],[20,1],[42,1],[42,6],[42,5],[43,1],[43,3],[45,4],[45,4],[45,6],[45,4],[45,4],[45,4],[45,8],[45,4],[45,4],[45,4],[45,6],[45,4],[45,4],[45,4],[45,4],[45,4],[45,1],[41,2],[41,3],[41,3],[41,1],[41,3],[41,4],[76,1],[76,2],[76,1],[76,1],[72,1],[72,2],[73,3],[30,1],[30,2],[30,1],[30,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[28,1],[28,2],[28,1],[28,1],[24,5],[25,5],[26,2],[26,4],[26,3],[26,5],[26,3],[26,5],[26,5],[26,7],[26,2],[26,4],[26,2],[26,4],[26,4],[26,6],[22,5],[23,5],[23,5],[23,9],[23,9],[23,7],[23,7],[103,1],[103,3],[92,1],[92,3],[107,1],[107,2],[108,1],[108,1],[108,1],[108,1],[108,1],[108,1],[108,1],[108,1],[113,1],[113,1],[113,1],[113,1],[113,1],[113,1],[113,1],[113,1],[113,1],[113,1],[113,1],[82,1],[82,1],[82,1],[82,1],[91,1],[91,1],[91,1],[91,1],[91,1],[91,1],[91,1],[91,1],[91,1],[91,1],[91,1],[79,1],[79,1],[120,1],[120,1],[120,1],[120,1],[120,1],[120,1],[120,1],[120,1],[120,1],[120,1],[120,1],[47,1],[47,2],[101,1],[101,2],[33,1],[33,1],[33,1],[33,1]],performAction:b(function(Ct,$t,Xt,kt,jr,Le,qn){var Oe=Le.length-1;switch(jr){case 2:this.$=[];break;case 3:(!Array.isArray(Le[Oe])||Le[Oe].length>0)&&Le[Oe-1].push(Le[Oe]),this.$=Le[Oe-1];break;case 4:case 183:this.$=Le[Oe];break;case 11:kt.setDirection("TB"),this.$="TB";break;case 12:kt.setDirection(Le[Oe-1]),this.$=Le[Oe-1];break;case 27:this.$=Le[Oe-1].nodes;break;case 28:case 29:case 30:case 31:case 32:this.$=[];break;case 33:this.$=kt.addSubGraph(Le[Oe-6],Le[Oe-1],Le[Oe-4]);break;case 34:this.$=kt.addSubGraph(Le[Oe-3],Le[Oe-1],Le[Oe-3]);break;case 35:this.$=kt.addSubGraph(void 0,Le[Oe-1],void 0);break;case 37:this.$=Le[Oe].trim(),kt.setAccTitle(this.$);break;case 38:case 39:this.$=Le[Oe].trim(),kt.setAccDescription(this.$);break;case 43:this.$=Le[Oe-1]+Le[Oe];break;case 44:this.$=Le[Oe];break;case 45:kt.addVertex(Le[Oe-1][Le[Oe-1].length-1],void 0,void 0,void 0,void 0,void 0,void 0,Le[Oe]),kt.addLink(Le[Oe-3].stmt,Le[Oe-1],Le[Oe-2]),this.$={stmt:Le[Oe-1],nodes:Le[Oe-1].concat(Le[Oe-3].nodes)};break;case 46:kt.addLink(Le[Oe-2].stmt,Le[Oe],Le[Oe-1]),this.$={stmt:Le[Oe],nodes:Le[Oe].concat(Le[Oe-2].nodes)};break;case 47:kt.addLink(Le[Oe-3].stmt,Le[Oe-1],Le[Oe-2]),this.$={stmt:Le[Oe-1],nodes:Le[Oe-1].concat(Le[Oe-3].nodes)};break;case 48:this.$={stmt:Le[Oe-1],nodes:Le[Oe-1]};break;case 49:kt.addVertex(Le[Oe-1][Le[Oe-1].length-1],void 0,void 0,void 0,void 0,void 0,void 0,Le[Oe]),this.$={stmt:Le[Oe-1],nodes:Le[Oe-1],shapeData:Le[Oe]};break;case 50:this.$={stmt:Le[Oe],nodes:Le[Oe]};break;case 51:this.$=[Le[Oe]];break;case 52:kt.addVertex(Le[Oe-5][Le[Oe-5].length-1],void 0,void 0,void 0,void 0,void 0,void 0,Le[Oe-4]),this.$=Le[Oe-5].concat(Le[Oe]);break;case 53:this.$=Le[Oe-4].concat(Le[Oe]);break;case 54:this.$=Le[Oe];break;case 55:this.$=Le[Oe-2],kt.setClass(Le[Oe-2],Le[Oe]);break;case 56:this.$=Le[Oe-3],kt.addVertex(Le[Oe-3],Le[Oe-1],"square");break;case 57:this.$=Le[Oe-3],kt.addVertex(Le[Oe-3],Le[Oe-1],"doublecircle");break;case 58:this.$=Le[Oe-5],kt.addVertex(Le[Oe-5],Le[Oe-2],"circle");break;case 59:this.$=Le[Oe-3],kt.addVertex(Le[Oe-3],Le[Oe-1],"ellipse");break;case 60:this.$=Le[Oe-3],kt.addVertex(Le[Oe-3],Le[Oe-1],"stadium");break;case 61:this.$=Le[Oe-3],kt.addVertex(Le[Oe-3],Le[Oe-1],"subroutine");break;case 62:this.$=Le[Oe-7],kt.addVertex(Le[Oe-7],Le[Oe-1],"rect",void 0,void 0,void 0,Object.fromEntries([[Le[Oe-5],Le[Oe-3]]]));break;case 63:this.$=Le[Oe-3],kt.addVertex(Le[Oe-3],Le[Oe-1],"cylinder");break;case 64:this.$=Le[Oe-3],kt.addVertex(Le[Oe-3],Le[Oe-1],"round");break;case 65:this.$=Le[Oe-3],kt.addVertex(Le[Oe-3],Le[Oe-1],"diamond");break;case 66:this.$=Le[Oe-5],kt.addVertex(Le[Oe-5],Le[Oe-2],"hexagon");break;case 67:this.$=Le[Oe-3],kt.addVertex(Le[Oe-3],Le[Oe-1],"odd");break;case 68:this.$=Le[Oe-3],kt.addVertex(Le[Oe-3],Le[Oe-1],"trapezoid");break;case 69:this.$=Le[Oe-3],kt.addVertex(Le[Oe-3],Le[Oe-1],"inv_trapezoid");break;case 70:this.$=Le[Oe-3],kt.addVertex(Le[Oe-3],Le[Oe-1],"lean_right");break;case 71:this.$=Le[Oe-3],kt.addVertex(Le[Oe-3],Le[Oe-1],"lean_left");break;case 72:this.$=Le[Oe],kt.addVertex(Le[Oe]);break;case 73:Le[Oe-1].text=Le[Oe],this.$=Le[Oe-1];break;case 74:case 75:Le[Oe-2].text=Le[Oe-1],this.$=Le[Oe-2];break;case 76:this.$=Le[Oe];break;case 77:var gi=kt.destructLink(Le[Oe],Le[Oe-2]);this.$={type:gi.type,stroke:gi.stroke,length:gi.length,text:Le[Oe-1]};break;case 78:var gi=kt.destructLink(Le[Oe],Le[Oe-2]);this.$={type:gi.type,stroke:gi.stroke,length:gi.length,text:Le[Oe-1],id:Le[Oe-3]};break;case 79:this.$={text:Le[Oe],type:"text"};break;case 80:this.$={text:Le[Oe-1].text+""+Le[Oe],type:Le[Oe-1].type};break;case 81:this.$={text:Le[Oe],type:"string"};break;case 82:this.$={text:Le[Oe],type:"markdown"};break;case 83:var gi=kt.destructLink(Le[Oe]);this.$={type:gi.type,stroke:gi.stroke,length:gi.length};break;case 84:var gi=kt.destructLink(Le[Oe]);this.$={type:gi.type,stroke:gi.stroke,length:gi.length,id:Le[Oe-1]};break;case 85:this.$=Le[Oe-1];break;case 86:this.$={text:Le[Oe],type:"text"};break;case 87:this.$={text:Le[Oe-1].text+""+Le[Oe],type:Le[Oe-1].type};break;case 88:this.$={text:Le[Oe],type:"string"};break;case 89:case 104:this.$={text:Le[Oe],type:"markdown"};break;case 101:this.$={text:Le[Oe],type:"text"};break;case 102:this.$={text:Le[Oe-1].text+""+Le[Oe],type:Le[Oe-1].type};break;case 103:this.$={text:Le[Oe],type:"text"};break;case 105:this.$=Le[Oe-4],kt.addClass(Le[Oe-2],Le[Oe]);break;case 106:this.$=Le[Oe-4],kt.setClass(Le[Oe-2],Le[Oe]);break;case 107:case 115:this.$=Le[Oe-1],kt.setClickEvent(Le[Oe-1],Le[Oe]);break;case 108:case 116:this.$=Le[Oe-3],kt.setClickEvent(Le[Oe-3],Le[Oe-2]),kt.setTooltip(Le[Oe-3],Le[Oe]);break;case 109:this.$=Le[Oe-2],kt.setClickEvent(Le[Oe-2],Le[Oe-1],Le[Oe]);break;case 110:this.$=Le[Oe-4],kt.setClickEvent(Le[Oe-4],Le[Oe-3],Le[Oe-2]),kt.setTooltip(Le[Oe-4],Le[Oe]);break;case 111:this.$=Le[Oe-2],kt.setLink(Le[Oe-2],Le[Oe]);break;case 112:this.$=Le[Oe-4],kt.setLink(Le[Oe-4],Le[Oe-2]),kt.setTooltip(Le[Oe-4],Le[Oe]);break;case 113:this.$=Le[Oe-4],kt.setLink(Le[Oe-4],Le[Oe-2],Le[Oe]);break;case 114:this.$=Le[Oe-6],kt.setLink(Le[Oe-6],Le[Oe-4],Le[Oe]),kt.setTooltip(Le[Oe-6],Le[Oe-2]);break;case 117:this.$=Le[Oe-1],kt.setLink(Le[Oe-1],Le[Oe]);break;case 118:this.$=Le[Oe-3],kt.setLink(Le[Oe-3],Le[Oe-2]),kt.setTooltip(Le[Oe-3],Le[Oe]);break;case 119:this.$=Le[Oe-3],kt.setLink(Le[Oe-3],Le[Oe-2],Le[Oe]);break;case 120:this.$=Le[Oe-5],kt.setLink(Le[Oe-5],Le[Oe-4],Le[Oe]),kt.setTooltip(Le[Oe-5],Le[Oe-2]);break;case 121:this.$=Le[Oe-4],kt.addVertex(Le[Oe-2],void 0,void 0,Le[Oe]);break;case 122:this.$=Le[Oe-4],kt.updateLink([Le[Oe-2]],Le[Oe]);break;case 123:this.$=Le[Oe-4],kt.updateLink(Le[Oe-2],Le[Oe]);break;case 124:this.$=Le[Oe-8],kt.updateLinkInterpolate([Le[Oe-6]],Le[Oe-2]),kt.updateLink([Le[Oe-6]],Le[Oe]);break;case 125:this.$=Le[Oe-8],kt.updateLinkInterpolate(Le[Oe-6],Le[Oe-2]),kt.updateLink(Le[Oe-6],Le[Oe]);break;case 126:this.$=Le[Oe-6],kt.updateLinkInterpolate([Le[Oe-4]],Le[Oe]);break;case 127:this.$=Le[Oe-6],kt.updateLinkInterpolate(Le[Oe-4],Le[Oe]);break;case 128:case 130:this.$=[Le[Oe]];break;case 129:case 131:Le[Oe-2].push(Le[Oe]),this.$=Le[Oe-2];break;case 133:this.$=Le[Oe-1]+Le[Oe];break;case 181:this.$=Le[Oe];break;case 182:this.$=Le[Oe-1]+""+Le[Oe];break;case 184:this.$=Le[Oe-1]+""+Le[Oe];break;case 185:this.$={stmt:"dir",value:"TB"};break;case 186:this.$={stmt:"dir",value:"BT"};break;case 187:this.$={stmt:"dir",value:"RL"};break;case 188:this.$={stmt:"dir",value:"LR"};break}},"anonymous"),table:[{3:1,4:2,9:e,10:r,12:n},{1:[3]},t(i,a,{5:6}),{4:7,9:e,10:r,12:n},{4:8,9:e,10:r,12:n},{13:[1,9],14:[1,10]},{1:[2,1],6:11,7:12,8:s,9:o,10:l,11:u,20:17,22:18,23:19,24:20,25:21,26:22,27:h,33:24,34:f,36:d,38:p,42:28,43:38,44:m,45:39,47:40,60:g,84:y,85:v,86:x,87:k,88:_,89:T,102:S,105:R,106:A,109:I,111:P,113:41,114:O,115:C,116:N,121:B,122:F,123:M,124:$},t(i,[2,9]),t(i,[2,10]),t(i,[2,11]),{8:[1,54],9:[1,55],10:z,15:53,18:56},t(q,[2,3]),t(q,[2,4]),t(q,[2,5]),t(q,[2,6]),t(q,[2,7]),t(q,[2,8]),{8:V,9:U,11:J,21:58,41:59,72:63,75:[1,64],77:[1,66],78:[1,65]},{8:V,9:U,11:J,21:67},{8:V,9:U,11:J,21:68},{8:V,9:U,11:J,21:69},{8:V,9:U,11:J,21:70},{8:V,9:U,11:J,21:71},{8:V,9:U,10:[1,72],11:J,21:73},t(q,[2,36]),{35:[1,74]},{37:[1,75]},t(q,[2,39]),t(se,[2,50],{18:76,39:77,10:z,40:re}),{10:[1,79]},{10:[1,80]},{10:[1,81]},{10:[1,82]},{14:me,44:ge,60:ye,80:[1,86],89:_e,95:[1,83],97:[1,84],101:85,105:ue,106:ie,109:le,111:oe,114:ne,115:pe,116:te,120:87},t(q,[2,185]),t(q,[2,186]),t(q,[2,187]),t(q,[2,188]),t(He,[2,51]),t(He,[2,54],{46:[1,99]}),t(de,[2,72],{113:112,29:[1,100],44:m,48:[1,101],50:[1,102],52:[1,103],54:[1,104],56:[1,105],58:[1,106],60:g,63:[1,107],65:[1,108],67:[1,109],68:[1,110],70:[1,111],89:T,102:S,105:R,106:A,109:I,111:P,114:O,115:C,116:N}),t(ce,[2,181]),t(ce,[2,142]),t(ce,[2,143]),t(ce,[2,144]),t(ce,[2,145]),t(ce,[2,146]),t(ce,[2,147]),t(ce,[2,148]),t(ce,[2,149]),t(ce,[2,150]),t(ce,[2,151]),t(ce,[2,152]),t(i,[2,12]),t(i,[2,18]),t(i,[2,19]),{9:[1,113]},t(st,[2,26],{18:114,10:z}),t(q,[2,27]),{42:115,43:38,44:m,45:39,47:40,60:g,89:T,102:S,105:R,106:A,109:I,111:P,113:41,114:O,115:C,116:N},t(q,[2,40]),t(q,[2,41]),t(q,[2,42]),t(Ae,[2,76],{73:116,62:[1,118],74:[1,117]}),{76:119,79:120,80:Ye,81:Ge,116:rt,119:Xe},{75:[1,125],77:[1,126]},t(Ze,[2,83]),t(q,[2,28]),t(q,[2,29]),t(q,[2,30]),t(q,[2,31]),t(q,[2,32]),{10:Pe,12:Re,14:Ve,27:ke,28:127,32:xe,44:H,60:ve,75:K,80:[1,129],81:[1,130],83:140,84:we,85:Ee,86:Ke,87:Be,88:De,89:nt,90:We,91:128,105:ut,109:vt,111:gt,114:mt,115:ft,116:Dt},t(ht,a,{5:153}),t(q,[2,37]),t(q,[2,38]),t(se,[2,48],{44:yt}),t(se,[2,49],{18:155,10:z,40:W}),t(He,[2,44]),{44:m,47:157,60:g,89:T,102:S,105:R,106:A,109:I,111:P,113:41,114:O,115:C,116:N},{102:[1,158],103:159,105:[1,160]},{44:m,47:161,60:g,89:T,102:S,105:R,106:A,109:I,111:P,113:41,114:O,115:C,116:N},{44:m,47:162,60:g,89:T,102:S,105:R,106:A,109:I,111:P,113:41,114:O,115:C,116:N},t(j,[2,107],{10:[1,163],96:[1,164]}),{80:[1,165]},t(j,[2,115],{120:167,10:[1,166],14:me,44:ge,60:ye,89:_e,105:ue,106:ie,109:le,111:oe,114:ne,115:pe,116:te}),t(j,[2,117],{10:[1,168]}),t(Je,[2,183]),t(Je,[2,170]),t(Je,[2,171]),t(Je,[2,172]),t(Je,[2,173]),t(Je,[2,174]),t(Je,[2,175]),t(Je,[2,176]),t(Je,[2,177]),t(Je,[2,178]),t(Je,[2,179]),t(Je,[2,180]),{44:m,47:169,60:g,89:T,102:S,105:R,106:A,109:I,111:P,113:41,114:O,115:C,116:N},{30:170,67:ee,80:Te,81:bt,82:171,116:at,117:It,118:At},{30:178,67:ee,80:Te,81:bt,82:171,116:at,117:It,118:At},{30:180,50:[1,179],67:ee,80:Te,81:bt,82:171,116:at,117:It,118:At},{30:181,67:ee,80:Te,81:bt,82:171,116:at,117:It,118:At},{30:182,67:ee,80:Te,81:bt,82:171,116:at,117:It,118:At},{30:183,67:ee,80:Te,81:bt,82:171,116:at,117:It,118:At},{109:[1,184]},{30:185,67:ee,80:Te,81:bt,82:171,116:at,117:It,118:At},{30:186,65:[1,187],67:ee,80:Te,81:bt,82:171,116:at,117:It,118:At},{30:188,67:ee,80:Te,81:bt,82:171,116:at,117:It,118:At},{30:189,67:ee,80:Te,81:bt,82:171,116:at,117:It,118:At},{30:190,67:ee,80:Te,81:bt,82:171,116:at,117:It,118:At},t(ce,[2,182]),t(i,[2,20]),t(st,[2,25]),t(se,[2,46],{39:191,18:192,10:z,40:re}),t(Ae,[2,73],{10:[1,193]}),{10:[1,194]},{30:195,67:ee,80:Te,81:bt,82:171,116:at,117:It,118:At},{77:[1,196],79:197,116:rt,119:Xe},t(Ut,[2,79]),t(Ut,[2,81]),t(Ut,[2,82]),t(Ut,[2,168]),t(Ut,[2,169]),{76:198,79:120,80:Ye,81:Ge,116:rt,119:Xe},t(Ze,[2,84]),{8:V,9:U,10:Pe,11:J,12:Re,14:Ve,21:200,27:ke,29:[1,199],32:xe,44:H,60:ve,75:K,83:140,84:we,85:Ee,86:Ke,87:Be,88:De,89:nt,90:We,91:201,105:ut,109:vt,111:gt,114:mt,115:ft,116:Dt},t(Bt,[2,101]),t(Bt,[2,103]),t(Bt,[2,104]),t(Bt,[2,157]),t(Bt,[2,158]),t(Bt,[2,159]),t(Bt,[2,160]),t(Bt,[2,161]),t(Bt,[2,162]),t(Bt,[2,163]),t(Bt,[2,164]),t(Bt,[2,165]),t(Bt,[2,166]),t(Bt,[2,167]),t(Bt,[2,90]),t(Bt,[2,91]),t(Bt,[2,92]),t(Bt,[2,93]),t(Bt,[2,94]),t(Bt,[2,95]),t(Bt,[2,96]),t(Bt,[2,97]),t(Bt,[2,98]),t(Bt,[2,99]),t(Bt,[2,100]),{6:11,7:12,8:s,9:o,10:l,11:u,20:17,22:18,23:19,24:20,25:21,26:22,27:h,32:[1,202],33:24,34:f,36:d,38:p,42:28,43:38,44:m,45:39,47:40,60:g,84:y,85:v,86:x,87:k,88:_,89:T,102:S,105:R,106:A,109:I,111:P,113:41,114:O,115:C,116:N,121:B,122:F,123:M,124:$},{10:z,18:203},{44:[1,204]},t(He,[2,43]),{10:[1,205],44:m,60:g,89:T,102:S,105:R,106:A,109:I,111:P,113:112,114:O,115:C,116:N},{10:[1,206]},{10:[1,207],106:[1,208]},t(Kt,[2,128]),{10:[1,209],44:m,60:g,89:T,102:S,105:R,106:A,109:I,111:P,113:112,114:O,115:C,116:N},{10:[1,210],44:m,60:g,89:T,102:S,105:R,106:A,109:I,111:P,113:112,114:O,115:C,116:N},{80:[1,211]},t(j,[2,109],{10:[1,212]}),t(j,[2,111],{10:[1,213]}),{80:[1,214]},t(Je,[2,184]),{80:[1,215],98:[1,216]},t(He,[2,55],{113:112,44:m,60:g,89:T,102:S,105:R,106:A,109:I,111:P,114:O,115:C,116:N}),{31:[1,217],67:ee,82:218,116:at,117:It,118:At},t(vr,[2,86]),t(vr,[2,88]),t(vr,[2,89]),t(vr,[2,153]),t(vr,[2,154]),t(vr,[2,155]),t(vr,[2,156]),{49:[1,219],67:ee,82:218,116:at,117:It,118:At},{30:220,67:ee,80:Te,81:bt,82:171,116:at,117:It,118:At},{51:[1,221],67:ee,82:218,116:at,117:It,118:At},{53:[1,222],67:ee,82:218,116:at,117:It,118:At},{55:[1,223],67:ee,82:218,116:at,117:It,118:At},{57:[1,224],67:ee,82:218,116:at,117:It,118:At},{60:[1,225]},{64:[1,226],67:ee,82:218,116:at,117:It,118:At},{66:[1,227],67:ee,82:218,116:at,117:It,118:At},{30:228,67:ee,80:Te,81:bt,82:171,116:at,117:It,118:At},{31:[1,229],67:ee,82:218,116:at,117:It,118:At},{67:ee,69:[1,230],71:[1,231],82:218,116:at,117:It,118:At},{67:ee,69:[1,233],71:[1,232],82:218,116:at,117:It,118:At},t(se,[2,45],{18:155,10:z,40:W}),t(se,[2,47],{44:yt}),t(Ae,[2,75]),t(Ae,[2,74]),{62:[1,234],67:ee,82:218,116:at,117:It,118:At},t(Ae,[2,77]),t(Ut,[2,80]),{77:[1,235],79:197,116:rt,119:Xe},{30:236,67:ee,80:Te,81:bt,82:171,116:at,117:It,118:At},t(ht,a,{5:237}),t(Bt,[2,102]),t(q,[2,35]),{43:238,44:m,45:39,47:40,60:g,89:T,102:S,105:R,106:A,109:I,111:P,113:41,114:O,115:C,116:N},{10:z,18:239},{10:Me,60:kr,84:Ue,92:240,105:Bn,107:241,108:242,109:un,110:da,111:ra,112:nr},{10:Me,60:kr,84:Ue,92:251,104:[1,252],105:Bn,107:241,108:242,109:un,110:da,111:ra,112:nr},{10:Me,60:kr,84:Ue,92:253,104:[1,254],105:Bn,107:241,108:242,109:un,110:da,111:ra,112:nr},{105:[1,255]},{10:Me,60:kr,84:Ue,92:256,105:Bn,107:241,108:242,109:un,110:da,111:ra,112:nr},{44:m,47:257,60:g,89:T,102:S,105:R,106:A,109:I,111:P,113:41,114:O,115:C,116:N},t(j,[2,108]),{80:[1,258]},{80:[1,259],98:[1,260]},t(j,[2,116]),t(j,[2,118],{10:[1,261]}),t(j,[2,119]),t(de,[2,56]),t(vr,[2,87]),t(de,[2,57]),{51:[1,262],67:ee,82:218,116:at,117:It,118:At},t(de,[2,64]),t(de,[2,59]),t(de,[2,60]),t(de,[2,61]),{109:[1,263]},t(de,[2,63]),t(de,[2,65]),{66:[1,264],67:ee,82:218,116:at,117:It,118:At},t(de,[2,67]),t(de,[2,68]),t(de,[2,70]),t(de,[2,69]),t(de,[2,71]),t([10,44,60,89,102,105,106,109,111,114,115,116],[2,85]),t(Ae,[2,78]),{31:[1,265],67:ee,82:218,116:at,117:It,118:At},{6:11,7:12,8:s,9:o,10:l,11:u,20:17,22:18,23:19,24:20,25:21,26:22,27:h,32:[1,266],33:24,34:f,36:d,38:p,42:28,43:38,44:m,45:39,47:40,60:g,84:y,85:v,86:x,87:k,88:_,89:T,102:S,105:R,106:A,109:I,111:P,113:41,114:O,115:C,116:N,121:B,122:F,123:M,124:$},t(He,[2,53]),{43:267,44:m,45:39,47:40,60:g,89:T,102:S,105:R,106:A,109:I,111:P,113:41,114:O,115:C,116:N},t(j,[2,121],{106:zs}),t(na,[2,130],{108:269,10:Me,60:kr,84:Ue,105:Bn,109:un,110:da,111:ra,112:nr}),t(Oi,[2,132]),t(Oi,[2,134]),t(Oi,[2,135]),t(Oi,[2,136]),t(Oi,[2,137]),t(Oi,[2,138]),t(Oi,[2,139]),t(Oi,[2,140]),t(Oi,[2,141]),t(j,[2,122],{106:zs}),{10:[1,270]},t(j,[2,123],{106:zs}),{10:[1,271]},t(Kt,[2,129]),t(j,[2,105],{106:zs}),t(j,[2,106],{113:112,44:m,60:g,89:T,102:S,105:R,106:A,109:I,111:P,114:O,115:C,116:N}),t(j,[2,110]),t(j,[2,112],{10:[1,272]}),t(j,[2,113]),{98:[1,273]},{51:[1,274]},{62:[1,275]},{66:[1,276]},{8:V,9:U,11:J,21:277},t(q,[2,34]),t(He,[2,52]),{10:Me,60:kr,84:Ue,105:Bn,107:278,108:242,109:un,110:da,111:ra,112:nr},t(Oi,[2,133]),{14:me,44:ge,60:ye,89:_e,101:279,105:ue,106:ie,109:le,111:oe,114:ne,115:pe,116:te,120:87},{14:me,44:ge,60:ye,89:_e,101:280,105:ue,106:ie,109:le,111:oe,114:ne,115:pe,116:te,120:87},{98:[1,281]},t(j,[2,120]),t(de,[2,58]),{30:282,67:ee,80:Te,81:bt,82:171,116:at,117:It,118:At},t(de,[2,66]),t(ht,a,{5:283}),t(na,[2,131],{108:269,10:Me,60:kr,84:Ue,105:Bn,109:un,110:da,111:ra,112:nr}),t(j,[2,126],{120:167,10:[1,284],14:me,44:ge,60:ye,89:_e,105:ue,106:ie,109:le,111:oe,114:ne,115:pe,116:te}),t(j,[2,127],{120:167,10:[1,285],14:me,44:ge,60:ye,89:_e,105:ue,106:ie,109:le,111:oe,114:ne,115:pe,116:te}),t(j,[2,114]),{31:[1,286],67:ee,82:218,116:at,117:It,118:At},{6:11,7:12,8:s,9:o,10:l,11:u,20:17,22:18,23:19,24:20,25:21,26:22,27:h,32:[1,287],33:24,34:f,36:d,38:p,42:28,43:38,44:m,45:39,47:40,60:g,84:y,85:v,86:x,87:k,88:_,89:T,102:S,105:R,106:A,109:I,111:P,113:41,114:O,115:C,116:N,121:B,122:F,123:M,124:$},{10:Me,60:kr,84:Ue,92:288,105:Bn,107:241,108:242,109:un,110:da,111:ra,112:nr},{10:Me,60:kr,84:Ue,92:289,105:Bn,107:241,108:242,109:un,110:da,111:ra,112:nr},t(de,[2,62]),t(q,[2,33]),t(j,[2,124],{106:zs}),t(j,[2,125],{106:zs})],defaultActions:{},parseError:b(function(Ct,$t){if($t.recoverable)this.trace(Ct);else{var Xt=new Error(Ct);throw Xt.hash=$t,Xt}},"parseError"),parse:b(function(Ct){var $t=this,Xt=[0],kt=[],jr=[null],Le=[],qn=this.table,Oe="",gi=0,Fu=0,ia=0,Rf=2,Cg=1,uh=Le.slice.call(arguments,1),Wi=Object.create(this.lexer),Xl={yy:{}};for(var Ic in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Ic)&&(Xl.yy[Ic]=this.yy[Ic]);Wi.setInput(Ct,Xl.yy),Xl.yy.lexer=Wi,Xl.yy.parser=this,typeof Wi.yylloc>"u"&&(Wi.yylloc={});var _t=Wi.yylloc;Le.push(_t);var Go=Wi.options&&Wi.options.ranges;typeof Xl.yy.parseError=="function"?this.parseError=Xl.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Nt(no){Xt.length=Xt.length-2*no,jr.length=jr.length-no,Le.length=Le.length-no}b(Nt,"popStack");function Ne(){var no;return no=kt.pop()||Wi.lex()||Cg,typeof no!="number"&&(no instanceof Array&&(kt=no,no=kt.pop()),no=$t.symbols_[no]||no),no}b(Ne,"lex");for(var et,Tt,Zt,Ot,Er,kn,jn={},Ia,Kn,Vr,Un;;){if(Zt=Xt[Xt.length-1],this.defaultActions[Zt]?Ot=this.defaultActions[Zt]:((et===null||typeof et>"u")&&(et=Ne()),Ot=qn[Zt]&&qn[Zt][et]),typeof Ot>"u"||!Ot.length||!Ot[0]){var xl="";Un=[];for(Ia in qn[Zt])this.terminals_[Ia]&&Ia>Rf&&Un.push("'"+this.terminals_[Ia]+"'");Wi.showPosition?xl="Parse error on line "+(gi+1)+`: +`+Wi.showPosition()+` +Expecting `+Un.join(", ")+", got '"+(this.terminals_[et]||et)+"'":xl="Parse error on line "+(gi+1)+": Unexpected "+(et==Cg?"end of input":"'"+(this.terminals_[et]||et)+"'"),this.parseError(xl,{text:Wi.match,token:this.terminals_[et]||et,line:Wi.yylineno,loc:_t,expected:Un})}if(Ot[0]instanceof Array&&Ot.length>1)throw new Error("Parse Error: multiple actions possible at state: "+Zt+", token: "+et);switch(Ot[0]){case 1:Xt.push(et),jr.push(Wi.yytext),Le.push(Wi.yylloc),Xt.push(Ot[1]),et=null,Tt?(et=Tt,Tt=null):(Fu=Wi.yyleng,Oe=Wi.yytext,gi=Wi.yylineno,_t=Wi.yylloc,ia>0&&ia--);break;case 2:if(Kn=this.productions_[Ot[1]][1],jn.$=jr[jr.length-Kn],jn._$={first_line:Le[Le.length-(Kn||1)].first_line,last_line:Le[Le.length-1].last_line,first_column:Le[Le.length-(Kn||1)].first_column,last_column:Le[Le.length-1].last_column},Go&&(jn._$.range=[Le[Le.length-(Kn||1)].range[0],Le[Le.length-1].range[1]]),kn=this.performAction.apply(jn,[Oe,Fu,gi,Xl.yy,Ot[1],jr,Le].concat(uh)),typeof kn<"u")return kn;Kn&&(Xt=Xt.slice(0,-1*Kn*2),jr=jr.slice(0,-1*Kn),Le=Le.slice(0,-1*Kn)),Xt.push(this.productions_[Ot[1]][0]),jr.push(jn.$),Le.push(jn._$),Vr=qn[Xt[Xt.length-2]][Xt[Xt.length-1]],Xt.push(Vr);break;case 3:return!0}}return!0},"parse")},vl=(function(){var cn={EOF:1,parseError:b(function($t,Xt){if(this.yy.parser)this.yy.parser.parseError($t,Xt);else throw new Error($t)},"parseError"),setInput:b(function(Ct,$t){return this.yy=$t||this.yy||{},this._input=Ct,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:b(function(){var Ct=this._input[0];this.yytext+=Ct,this.yyleng++,this.offset++,this.match+=Ct,this.matched+=Ct;var $t=Ct.match(/(?:\r\n?|\n).*/g);return $t?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),Ct},"input"),unput:b(function(Ct){var $t=Ct.length,Xt=Ct.split(/(?:\r\n?|\n)/g);this._input=Ct+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-$t),this.offset-=$t;var kt=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),Xt.length-1&&(this.yylineno-=Xt.length-1);var jr=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:Xt?(Xt.length===kt.length?this.yylloc.first_column:0)+kt[kt.length-Xt.length].length-Xt[0].length:this.yylloc.first_column-$t},this.options.ranges&&(this.yylloc.range=[jr[0],jr[0]+this.yyleng-$t]),this.yyleng=this.yytext.length,this},"unput"),more:b(function(){return this._more=!0,this},"more"),reject:b(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). +`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:b(function(Ct){this.unput(this.match.slice(Ct))},"less"),pastInput:b(function(){var Ct=this.matched.substr(0,this.matched.length-this.match.length);return(Ct.length>20?"...":"")+Ct.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:b(function(){var Ct=this.match;return Ct.length<20&&(Ct+=this._input.substr(0,20-Ct.length)),(Ct.substr(0,20)+(Ct.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:b(function(){var Ct=this.pastInput(),$t=new Array(Ct.length+1).join("-");return Ct+this.upcomingInput()+` +`+$t+"^"},"showPosition"),test_match:b(function(Ct,$t){var Xt,kt,jr;if(this.options.backtrack_lexer&&(jr={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(jr.yylloc.range=this.yylloc.range.slice(0))),kt=Ct[0].match(/(?:\r\n?|\n).*/g),kt&&(this.yylineno+=kt.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:kt?kt[kt.length-1].length-kt[kt.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+Ct[0].length},this.yytext+=Ct[0],this.match+=Ct[0],this.matches=Ct,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(Ct[0].length),this.matched+=Ct[0],Xt=this.performAction.call(this,this.yy,this,$t,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),Xt)return Xt;if(this._backtrack){for(var Le in jr)this[Le]=jr[Le];return!1}return!1},"test_match"),next:b(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var Ct,$t,Xt,kt;this._more||(this.yytext="",this.match="");for(var jr=this._currentRules(),Le=0;Le$t[0].length)){if($t=Xt,kt=Le,this.options.backtrack_lexer){if(Ct=this.test_match(Xt,jr[Le]),Ct!==!1)return Ct;if(this._backtrack){$t=!1;continue}else return!1}else if(!this.options.flex)break}return $t?(Ct=this.test_match($t,jr[kt]),Ct!==!1?Ct:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. +`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:b(function(){var $t=this.next();return $t||this.lex()},"lex"),begin:b(function($t){this.conditionStack.push($t)},"begin"),popState:b(function(){var $t=this.conditionStack.length-1;return $t>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:b(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:b(function($t){return $t=this.conditionStack.length-1-Math.abs($t||0),$t>=0?this.conditionStack[$t]:"INITIAL"},"topState"),pushState:b(function($t){this.begin($t)},"pushState"),stateStackSize:b(function(){return this.conditionStack.length},"stateStackSize"),options:{},performAction:b(function($t,Xt,kt,jr){var Le=jr;switch(kt){case 0:return this.begin("acc_title"),34;break;case 1:return this.popState(),"acc_title_value";break;case 2:return this.begin("acc_descr"),36;break;case 3:return this.popState(),"acc_descr_value";break;case 4:this.begin("acc_descr_multiline");break;case 5:this.popState();break;case 6:return"acc_descr_multiline_value";case 7:return this.pushState("shapeData"),Xt.yytext="",40;break;case 8:return this.pushState("shapeDataStr"),40;break;case 9:return this.popState(),40;break;case 10:let qn=/\n\s*/g;return Xt.yytext=Xt.yytext.replace(qn,"
    "),40;break;case 11:return 40;case 12:this.popState();break;case 13:this.begin("callbackname");break;case 14:this.popState();break;case 15:this.popState(),this.begin("callbackargs");break;case 16:return 95;case 17:this.popState();break;case 18:return 96;case 19:return"MD_STR";case 20:this.popState();break;case 21:this.begin("md_string");break;case 22:return"STR";case 23:this.popState();break;case 24:this.pushState("string");break;case 25:return 84;case 26:return 102;case 27:return 85;case 28:return 104;case 29:return 86;case 30:return 87;case 31:return 97;case 32:this.begin("click");break;case 33:this.popState();break;case 34:return 88;case 35:return $t.lex.firstGraph()&&this.begin("dir"),12;break;case 36:return $t.lex.firstGraph()&&this.begin("dir"),12;break;case 37:return $t.lex.firstGraph()&&this.begin("dir"),12;break;case 38:return 27;case 39:return 32;case 40:return 98;case 41:return 98;case 42:return 98;case 43:return 98;case 44:return this.popState(),13;break;case 45:return this.popState(),14;break;case 46:return this.popState(),14;break;case 47:return this.popState(),14;break;case 48:return this.popState(),14;break;case 49:return this.popState(),14;break;case 50:return this.popState(),14;break;case 51:return this.popState(),14;break;case 52:return this.popState(),14;break;case 53:return this.popState(),14;break;case 54:return this.popState(),14;break;case 55:return 121;case 56:return 122;case 57:return 123;case 58:return 124;case 59:return 78;case 60:return 105;case 61:return 111;case 62:return 46;case 63:return 60;case 64:return 44;case 65:return 8;case 66:return 106;case 67:return 115;case 68:return this.popState(),77;break;case 69:return this.pushState("edgeText"),75;break;case 70:return 119;case 71:return this.popState(),77;break;case 72:return this.pushState("thickEdgeText"),75;break;case 73:return 119;case 74:return this.popState(),77;break;case 75:return this.pushState("dottedEdgeText"),75;break;case 76:return 119;case 77:return 77;case 78:return this.popState(),53;break;case 79:return"TEXT";case 80:return this.pushState("ellipseText"),52;break;case 81:return this.popState(),55;break;case 82:return this.pushState("text"),54;break;case 83:return this.popState(),57;break;case 84:return this.pushState("text"),56;break;case 85:return 58;case 86:return this.pushState("text"),67;break;case 87:return this.popState(),64;break;case 88:return this.pushState("text"),63;break;case 89:return this.popState(),49;break;case 90:return this.pushState("text"),48;break;case 91:return this.popState(),69;break;case 92:return this.popState(),71;break;case 93:return 117;case 94:return this.pushState("trapText"),68;break;case 95:return this.pushState("trapText"),70;break;case 96:return 118;case 97:return 67;case 98:return 90;case 99:return"SEP";case 100:return 89;case 101:return 115;case 102:return 111;case 103:return 44;case 104:return 109;case 105:return 114;case 106:return 116;case 107:return this.popState(),62;break;case 108:return this.pushState("text"),62;break;case 109:return this.popState(),51;break;case 110:return this.pushState("text"),50;break;case 111:return this.popState(),31;break;case 112:return this.pushState("text"),29;break;case 113:return this.popState(),66;break;case 114:return this.pushState("text"),65;break;case 115:return"TEXT";case 116:return"QUOTE";case 117:return 9;case 118:return 10;case 119:return 11}},"anonymous"),rules:[/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?:@\{)/,/^(?:["])/,/^(?:["])/,/^(?:[^\"]+)/,/^(?:[^}^"]+)/,/^(?:\})/,/^(?:call[\s]+)/,/^(?:\([\s]*\))/,/^(?:\()/,/^(?:[^(]*)/,/^(?:\))/,/^(?:[^)]*)/,/^(?:[^`"]+)/,/^(?:[`]["])/,/^(?:["][`])/,/^(?:[^"]+)/,/^(?:["])/,/^(?:["])/,/^(?:style\b)/,/^(?:default\b)/,/^(?:linkStyle\b)/,/^(?:interpolate\b)/,/^(?:classDef\b)/,/^(?:class\b)/,/^(?:href[\s])/,/^(?:click[\s]+)/,/^(?:[\s\n])/,/^(?:[^\s\n]*)/,/^(?:flowchart-elk\b)/,/^(?:graph\b)/,/^(?:flowchart\b)/,/^(?:subgraph\b)/,/^(?:end\b\s*)/,/^(?:_self\b)/,/^(?:_blank\b)/,/^(?:_parent\b)/,/^(?:_top\b)/,/^(?:(\r?\n)*\s*\n)/,/^(?:\s*LR\b)/,/^(?:\s*RL\b)/,/^(?:\s*TB\b)/,/^(?:\s*BT\b)/,/^(?:\s*TD\b)/,/^(?:\s*BR\b)/,/^(?:\s*<)/,/^(?:\s*>)/,/^(?:\s*\^)/,/^(?:\s*v\b)/,/^(?:.*direction\s+TB[^\n]*)/,/^(?:.*direction\s+BT[^\n]*)/,/^(?:.*direction\s+RL[^\n]*)/,/^(?:.*direction\s+LR[^\n]*)/,/^(?:[^\s\"]+@(?=[^\{\"]))/,/^(?:[0-9]+)/,/^(?:#)/,/^(?::::)/,/^(?::)/,/^(?:&)/,/^(?:;)/,/^(?:,)/,/^(?:\*)/,/^(?:\s*[xo<]?--+[-xo>]\s*)/,/^(?:\s*[xo<]?--\s*)/,/^(?:[^-]|-(?!-)+)/,/^(?:\s*[xo<]?==+[=xo>]\s*)/,/^(?:\s*[xo<]?==\s*)/,/^(?:[^=]|=(?!))/,/^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/,/^(?:\s*[xo<]?-\.\s*)/,/^(?:[^\.]|\.(?!))/,/^(?:\s*~~[\~]+\s*)/,/^(?:[-/\)][\)])/,/^(?:[^\(\)\[\]\{\}]|!\)+)/,/^(?:\(-)/,/^(?:\]\))/,/^(?:\(\[)/,/^(?:\]\])/,/^(?:\[\[)/,/^(?:\[\|)/,/^(?:>)/,/^(?:\)\])/,/^(?:\[\()/,/^(?:\)\)\))/,/^(?:\(\(\()/,/^(?:[\\(?=\])][\]])/,/^(?:\/(?=\])\])/,/^(?:\/(?!\])|\\(?!\])|[^\\\[\]\(\)\{\}\/]+)/,/^(?:\[\/)/,/^(?:\[\\)/,/^(?:<)/,/^(?:>)/,/^(?:\^)/,/^(?:\\\|)/,/^(?:v\b)/,/^(?:\*)/,/^(?:#)/,/^(?:&)/,/^(?:([A-Za-z0-9!"\#$%&'*+\.`?\\_\/]|-(?=[^\>\-\.])|(?!))+)/,/^(?:-)/,/^(?:[\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6]|[\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377]|[\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5]|[\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA]|[\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE]|[\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA]|[\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0]|[\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977]|[\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2]|[\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A]|[\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39]|[\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8]|[\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C]|[\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C]|[\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99]|[\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0]|[\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D]|[\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3]|[\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10]|[\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1]|[\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81]|[\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3]|[\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6]|[\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A]|[\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081]|[\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D]|[\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0]|[\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310]|[\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C]|[\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711]|[\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7]|[\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C]|[\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16]|[\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF]|[\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC]|[\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D]|[\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D]|[\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3]|[\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F]|[\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128]|[\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184]|[\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3]|[\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6]|[\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE]|[\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C]|[\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D]|[\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC]|[\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B]|[\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788]|[\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805]|[\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB]|[\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28]|[\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5]|[\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4]|[\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E]|[\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D]|[\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36]|[\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D]|[\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC]|[\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF]|[\uFFD2-\uFFD7\uFFDA-\uFFDC])/,/^(?:\|)/,/^(?:\|)/,/^(?:\))/,/^(?:\()/,/^(?:\])/,/^(?:\[)/,/^(?:(\}))/,/^(?:\{)/,/^(?:[^\[\]\(\)\{\}\|\"]+)/,/^(?:")/,/^(?:(\r?\n)+)/,/^(?:\s)/,/^(?:$)/],conditions:{shapeDataEndBracket:{rules:[21,24,77,80,82,84,88,90,94,95,108,110,112,114],inclusive:!1},shapeDataStr:{rules:[9,10,21,24,77,80,82,84,88,90,94,95,108,110,112,114],inclusive:!1},shapeData:{rules:[8,11,12,21,24,77,80,82,84,88,90,94,95,108,110,112,114],inclusive:!1},callbackargs:{rules:[17,18,21,24,77,80,82,84,88,90,94,95,108,110,112,114],inclusive:!1},callbackname:{rules:[14,15,16,21,24,77,80,82,84,88,90,94,95,108,110,112,114],inclusive:!1},href:{rules:[21,24,77,80,82,84,88,90,94,95,108,110,112,114],inclusive:!1},click:{rules:[21,24,33,34,77,80,82,84,88,90,94,95,108,110,112,114],inclusive:!1},dottedEdgeText:{rules:[21,24,74,76,77,80,82,84,88,90,94,95,108,110,112,114],inclusive:!1},thickEdgeText:{rules:[21,24,71,73,77,80,82,84,88,90,94,95,108,110,112,114],inclusive:!1},edgeText:{rules:[21,24,68,70,77,80,82,84,88,90,94,95,108,110,112,114],inclusive:!1},trapText:{rules:[21,24,77,80,82,84,88,90,91,92,93,94,95,108,110,112,114],inclusive:!1},ellipseText:{rules:[21,24,77,78,79,80,82,84,88,90,94,95,108,110,112,114],inclusive:!1},text:{rules:[21,24,77,80,81,82,83,84,87,88,89,90,94,95,107,108,109,110,111,112,113,114,115],inclusive:!1},vertex:{rules:[21,24,77,80,82,84,88,90,94,95,108,110,112,114],inclusive:!1},dir:{rules:[21,24,44,45,46,47,48,49,50,51,52,53,54,77,80,82,84,88,90,94,95,108,110,112,114],inclusive:!1},acc_descr_multiline:{rules:[5,6,21,24,77,80,82,84,88,90,94,95,108,110,112,114],inclusive:!1},acc_descr:{rules:[3,21,24,77,80,82,84,88,90,94,95,108,110,112,114],inclusive:!1},acc_title:{rules:[1,21,24,77,80,82,84,88,90,94,95,108,110,112,114],inclusive:!1},md_string:{rules:[19,20,21,24,77,80,82,84,88,90,94,95,108,110,112,114],inclusive:!1},string:{rules:[21,22,23,24,77,80,82,84,88,90,94,95,108,110,112,114],inclusive:!1},INITIAL:{rules:[0,2,4,7,13,21,24,25,26,27,28,29,30,31,32,35,36,37,38,39,40,41,42,43,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,71,72,74,75,77,80,82,84,85,86,88,90,94,95,96,97,98,99,100,101,102,103,104,105,106,108,110,112,114,116,117,118,119],inclusive:!0}}};return cn})();Pi.lexer=vl;function Ti(){this.yy={}}return b(Ti,"Parser"),Ti.prototype=Pi,Pi.Parser=Ti,new Ti})();c$.parser=c$;Cye=c$,_ye=Object.assign({},Cye);_ye.parse=t=>{let e=t.replace(/}\s*\n/g,`} +`);return Cye.parse(e)};Eot=_ye,Sot=b((t,e)=>{let r=x1,n=r(t,"r"),i=r(t,"g"),a=r(t,"b");return uo(n,i,a,e)},"fade"),Cot=b(t=>`.label { font-family: ${t.fontFamily}; color: ${t.nodeTextColor||t.textColor}; } @@ -566,7 +822,7 @@ Expecting `+Aa.join(", ")+", got '"+(this.terminals_[Pe]||Pe)+"'":$L="Parse erro /* For html labels only */ .labelBkg { - background-color: ${Xrt(t.edgeLabelBackground,.5)}; + background-color: ${Sot(t.edgeLabelBackground,.5)}; // background-color: } @@ -625,12 +881,12 @@ Expecting `+Aa.join(", ")+", got '"+(this.terminals_[Pe]||Pe)+"'":$L="Parse erro } text-align: center; } -`,"getStyles"),Krt=jrt,Zrt={parser:Yrt,get db(){return new qrt},renderer:Wrt,styles:Krt,init:x(t=>{t.flowchart||(t.flowchart={}),t.layout&&Vb({layout:t.layout}),t.flowchart.arrowMarkerAbsolute=t.arrowMarkerAbsolute,Vb({flowchart:{arrowMarkerAbsolute:t.arrowMarkerAbsolute}})},"init")}});var nge={};lr(nge,{diagram:()=>ant});var JB,Qrt,dv,Jrt,rge,ent,tnt,rnt,nnt,ant,age=A(()=>{wc();su();au();sl();Fo();eo();Mo();Fi();ln();ur();cr();Lo();JB=(function(){var t=x(function(K,X,ae,W){for(ae=ae||{},W=K.length;W--;ae[K[W]]=X);return ae},"o"),e=[6,8,10,22,24,26,28,33,34,35,36,37,40,43,44,50],r=[1,10],n=[1,11],a=[1,12],i=[1,13],s=[1,20],o=[1,21],l=[1,22],u=[1,23],h=[1,24],f=[1,19],d=[1,25],p=[1,26],m=[1,18],g=[1,33],v=[1,34],y=[1,35],b=[1,36],w=[1,37],C=[6,8,10,13,15,17,20,21,22,24,26,28,33,34,35,36,37,40,43,44,50,63,64,65,66,67],k=[1,42],E=[1,43],_=[1,52],S=[40,50,68,69],L=[1,63],M=[1,61],D=[1,58],T=[1,62],I=[1,64],N=[6,8,10,13,17,22,24,26,28,33,34,35,36,37,40,41,42,43,44,48,49,50,63,64,65,66,67],O=[63,64,65,66,67],R=[1,81],P=[1,80],B=[1,78],F=[1,79],G=[6,10,42,47],z=[6,10,13,41,42,47,48,49],H=[1,89],Q=[1,88],Y=[1,87],ie=[19,56],se=[1,98],oe=[1,97],pe=[19,56,58,60],J={trace:x(function(){},"trace"),yy:{},symbols_:{error:2,start:3,ER_DIAGRAM:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NEWLINE:10,entityName:11,relSpec:12,COLON:13,role:14,STYLE_SEPARATOR:15,idList:16,BLOCK_START:17,attributes:18,BLOCK_STOP:19,SQS:20,SQE:21,title:22,title_value:23,acc_title:24,acc_title_value:25,acc_descr:26,acc_descr_value:27,acc_descr_multiline_value:28,direction:29,classDefStatement:30,classStatement:31,styleStatement:32,direction_tb:33,direction_bt:34,direction_rl:35,direction_lr:36,CLASSDEF:37,stylesOpt:38,separator:39,UNICODE_TEXT:40,STYLE_TEXT:41,COMMA:42,CLASS:43,STYLE:44,style:45,styleComponent:46,SEMI:47,NUM:48,BRKT:49,ENTITY_NAME:50,attribute:51,attributeType:52,attributeName:53,attributeKeyTypeList:54,attributeComment:55,ATTRIBUTE_WORD:56,attributeKeyType:57,",":58,ATTRIBUTE_KEY:59,COMMENT:60,cardinality:61,relType:62,ZERO_OR_ONE:63,ZERO_OR_MORE:64,ONE_OR_MORE:65,ONLY_ONE:66,MD_PARENT:67,NON_IDENTIFYING:68,IDENTIFYING:69,WORD:70,$accept:0,$end:1},terminals_:{2:"error",4:"ER_DIAGRAM",6:"EOF",8:"SPACE",10:"NEWLINE",13:"COLON",15:"STYLE_SEPARATOR",17:"BLOCK_START",19:"BLOCK_STOP",20:"SQS",21:"SQE",22:"title",23:"title_value",24:"acc_title",25:"acc_title_value",26:"acc_descr",27:"acc_descr_value",28:"acc_descr_multiline_value",33:"direction_tb",34:"direction_bt",35:"direction_rl",36:"direction_lr",37:"CLASSDEF",40:"UNICODE_TEXT",41:"STYLE_TEXT",42:"COMMA",43:"CLASS",44:"STYLE",47:"SEMI",48:"NUM",49:"BRKT",50:"ENTITY_NAME",56:"ATTRIBUTE_WORD",58:",",59:"ATTRIBUTE_KEY",60:"COMMENT",63:"ZERO_OR_ONE",64:"ZERO_OR_MORE",65:"ONE_OR_MORE",66:"ONLY_ONE",67:"MD_PARENT",68:"NON_IDENTIFYING",69:"IDENTIFYING",70:"WORD"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[9,5],[9,9],[9,7],[9,7],[9,4],[9,6],[9,3],[9,5],[9,1],[9,3],[9,7],[9,9],[9,6],[9,8],[9,4],[9,6],[9,2],[9,2],[9,2],[9,1],[9,1],[9,1],[9,1],[9,1],[29,1],[29,1],[29,1],[29,1],[30,4],[16,1],[16,1],[16,3],[16,3],[31,3],[32,4],[38,1],[38,3],[45,1],[45,2],[39,1],[39,1],[39,1],[46,1],[46,1],[46,1],[46,1],[11,1],[11,1],[18,1],[18,2],[51,2],[51,3],[51,3],[51,4],[52,1],[53,1],[54,1],[54,3],[57,1],[55,1],[12,3],[61,1],[61,1],[61,1],[61,1],[61,1],[62,1],[62,1],[14,1],[14,1],[14,1]],performAction:x(function(X,ae,W,Se,ne,ee,$e){var me=ee.length-1;switch(ne){case 1:break;case 2:this.$=[];break;case 3:ee[me-1].push(ee[me]),this.$=ee[me-1];break;case 4:case 5:this.$=ee[me];break;case 6:case 7:this.$=[];break;case 8:Se.addEntity(ee[me-4]),Se.addEntity(ee[me-2]),Se.addRelationship(ee[me-4],ee[me],ee[me-2],ee[me-3]);break;case 9:Se.addEntity(ee[me-8]),Se.addEntity(ee[me-4]),Se.addRelationship(ee[me-8],ee[me],ee[me-4],ee[me-5]),Se.setClass([ee[me-8]],ee[me-6]),Se.setClass([ee[me-4]],ee[me-2]);break;case 10:Se.addEntity(ee[me-6]),Se.addEntity(ee[me-2]),Se.addRelationship(ee[me-6],ee[me],ee[me-2],ee[me-3]),Se.setClass([ee[me-6]],ee[me-4]);break;case 11:Se.addEntity(ee[me-6]),Se.addEntity(ee[me-4]),Se.addRelationship(ee[me-6],ee[me],ee[me-4],ee[me-5]),Se.setClass([ee[me-4]],ee[me-2]);break;case 12:Se.addEntity(ee[me-3]),Se.addAttributes(ee[me-3],ee[me-1]);break;case 13:Se.addEntity(ee[me-5]),Se.addAttributes(ee[me-5],ee[me-1]),Se.setClass([ee[me-5]],ee[me-3]);break;case 14:Se.addEntity(ee[me-2]);break;case 15:Se.addEntity(ee[me-4]),Se.setClass([ee[me-4]],ee[me-2]);break;case 16:Se.addEntity(ee[me]);break;case 17:Se.addEntity(ee[me-2]),Se.setClass([ee[me-2]],ee[me]);break;case 18:Se.addEntity(ee[me-6],ee[me-4]),Se.addAttributes(ee[me-6],ee[me-1]);break;case 19:Se.addEntity(ee[me-8],ee[me-6]),Se.addAttributes(ee[me-8],ee[me-1]),Se.setClass([ee[me-8]],ee[me-3]);break;case 20:Se.addEntity(ee[me-5],ee[me-3]);break;case 21:Se.addEntity(ee[me-7],ee[me-5]),Se.setClass([ee[me-7]],ee[me-2]);break;case 22:Se.addEntity(ee[me-3],ee[me-1]);break;case 23:Se.addEntity(ee[me-5],ee[me-3]),Se.setClass([ee[me-5]],ee[me]);break;case 24:case 25:this.$=ee[me].trim(),Se.setAccTitle(this.$);break;case 26:case 27:this.$=ee[me].trim(),Se.setAccDescription(this.$);break;case 32:Se.setDirection("TB");break;case 33:Se.setDirection("BT");break;case 34:Se.setDirection("RL");break;case 35:Se.setDirection("LR");break;case 36:this.$=ee[me-3],Se.addClass(ee[me-2],ee[me-1]);break;case 37:case 38:case 56:case 64:this.$=[ee[me]];break;case 39:case 40:this.$=ee[me-2].concat([ee[me]]);break;case 41:this.$=ee[me-2],Se.setClass(ee[me-1],ee[me]);break;case 42:this.$=ee[me-3],Se.addCssStyles(ee[me-2],ee[me-1]);break;case 43:this.$=[ee[me]];break;case 44:ee[me-2].push(ee[me]),this.$=ee[me-2];break;case 46:this.$=ee[me-1]+ee[me];break;case 54:case 76:case 77:this.$=ee[me].replace(/"/g,"");break;case 55:case 78:this.$=ee[me];break;case 57:ee[me].push(ee[me-1]),this.$=ee[me];break;case 58:this.$={type:ee[me-1],name:ee[me]};break;case 59:this.$={type:ee[me-2],name:ee[me-1],keys:ee[me]};break;case 60:this.$={type:ee[me-2],name:ee[me-1],comment:ee[me]};break;case 61:this.$={type:ee[me-3],name:ee[me-2],keys:ee[me-1],comment:ee[me]};break;case 62:case 63:case 66:this.$=ee[me];break;case 65:ee[me-2].push(ee[me]),this.$=ee[me-2];break;case 67:this.$=ee[me].replace(/"/g,"");break;case 68:this.$={cardA:ee[me],relType:ee[me-1],cardB:ee[me-2]};break;case 69:this.$=Se.Cardinality.ZERO_OR_ONE;break;case 70:this.$=Se.Cardinality.ZERO_OR_MORE;break;case 71:this.$=Se.Cardinality.ONE_OR_MORE;break;case 72:this.$=Se.Cardinality.ONLY_ONE;break;case 73:this.$=Se.Cardinality.MD_PARENT;break;case 74:this.$=Se.Identification.NON_IDENTIFYING;break;case 75:this.$=Se.Identification.IDENTIFYING;break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},t(e,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:9,22:r,24:n,26:a,28:i,29:14,30:15,31:16,32:17,33:s,34:o,35:l,36:u,37:h,40:f,43:d,44:p,50:m},t(e,[2,7],{1:[2,1]}),t(e,[2,3]),{9:27,11:9,22:r,24:n,26:a,28:i,29:14,30:15,31:16,32:17,33:s,34:o,35:l,36:u,37:h,40:f,43:d,44:p,50:m},t(e,[2,5]),t(e,[2,6]),t(e,[2,16],{12:28,61:32,15:[1,29],17:[1,30],20:[1,31],63:g,64:v,65:y,66:b,67:w}),{23:[1,38]},{25:[1,39]},{27:[1,40]},t(e,[2,27]),t(e,[2,28]),t(e,[2,29]),t(e,[2,30]),t(e,[2,31]),t(C,[2,54]),t(C,[2,55]),t(e,[2,32]),t(e,[2,33]),t(e,[2,34]),t(e,[2,35]),{16:41,40:k,41:E},{16:44,40:k,41:E},{16:45,40:k,41:E},t(e,[2,4]),{11:46,40:f,50:m},{16:47,40:k,41:E},{18:48,19:[1,49],51:50,52:51,56:_},{11:53,40:f,50:m},{62:54,68:[1,55],69:[1,56]},t(S,[2,69]),t(S,[2,70]),t(S,[2,71]),t(S,[2,72]),t(S,[2,73]),t(e,[2,24]),t(e,[2,25]),t(e,[2,26]),{13:L,38:57,41:M,42:D,45:59,46:60,48:T,49:I},t(N,[2,37]),t(N,[2,38]),{16:65,40:k,41:E,42:D},{13:L,38:66,41:M,42:D,45:59,46:60,48:T,49:I},{13:[1,67],15:[1,68]},t(e,[2,17],{61:32,12:69,17:[1,70],42:D,63:g,64:v,65:y,66:b,67:w}),{19:[1,71]},t(e,[2,14]),{18:72,19:[2,56],51:50,52:51,56:_},{53:73,56:[1,74]},{56:[2,62]},{21:[1,75]},{61:76,63:g,64:v,65:y,66:b,67:w},t(O,[2,74]),t(O,[2,75]),{6:R,10:P,39:77,42:B,47:F},{40:[1,82],41:[1,83]},t(G,[2,43],{46:84,13:L,41:M,48:T,49:I}),t(z,[2,45]),t(z,[2,50]),t(z,[2,51]),t(z,[2,52]),t(z,[2,53]),t(e,[2,41],{42:D}),{6:R,10:P,39:85,42:B,47:F},{14:86,40:H,50:Q,70:Y},{16:90,40:k,41:E},{11:91,40:f,50:m},{18:92,19:[1,93],51:50,52:51,56:_},t(e,[2,12]),{19:[2,57]},t(ie,[2,58],{54:94,55:95,57:96,59:se,60:oe}),t([19,56,59,60],[2,63]),t(e,[2,22],{15:[1,100],17:[1,99]}),t([40,50],[2,68]),t(e,[2,36]),{13:L,41:M,45:101,46:60,48:T,49:I},t(e,[2,47]),t(e,[2,48]),t(e,[2,49]),t(N,[2,39]),t(N,[2,40]),t(z,[2,46]),t(e,[2,42]),t(e,[2,8]),t(e,[2,76]),t(e,[2,77]),t(e,[2,78]),{13:[1,102],42:D},{13:[1,104],15:[1,103]},{19:[1,105]},t(e,[2,15]),t(ie,[2,59],{55:106,58:[1,107],60:oe}),t(ie,[2,60]),t(pe,[2,64]),t(ie,[2,67]),t(pe,[2,66]),{18:108,19:[1,109],51:50,52:51,56:_},{16:110,40:k,41:E},t(G,[2,44],{46:84,13:L,41:M,48:T,49:I}),{14:111,40:H,50:Q,70:Y},{16:112,40:k,41:E},{14:113,40:H,50:Q,70:Y},t(e,[2,13]),t(ie,[2,61]),{57:114,59:se},{19:[1,115]},t(e,[2,20]),t(e,[2,23],{17:[1,116],42:D}),t(e,[2,11]),{13:[1,117],42:D},t(e,[2,10]),t(pe,[2,65]),t(e,[2,18]),{18:118,19:[1,119],51:50,52:51,56:_},{14:120,40:H,50:Q,70:Y},{19:[1,121]},t(e,[2,21]),t(e,[2,9]),t(e,[2,19])],defaultActions:{52:[2,62],72:[2,57]},parseError:x(function(X,ae){if(ae.recoverable)this.trace(X);else{var W=new Error(X);throw W.hash=ae,W}},"parseError"),parse:x(function(X){var ae=this,W=[0],Se=[],ne=[null],ee=[],$e=this.table,me="",Ie=0,Ue=0,Fe=0,Ae=2,Me=1,ke=ee.slice.call(arguments,1),ve=Object.create(this.lexer),_e={yy:{}};for(var fe in this.yy)Object.prototype.hasOwnProperty.call(this.yy,fe)&&(_e.yy[fe]=this.yy[fe]);ve.setInput(X,_e.yy),_e.yy.lexer=ve,_e.yy.parser=this,typeof ve.yylloc>"u"&&(ve.yylloc={});var ue=ve.yylloc;ee.push(ue);var $=ve.options&&ve.options.ranges;typeof _e.yy.parseError=="function"?this.parseError=_e.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function le(ot){W.length=W.length-2*ot,ne.length=ne.length-ot,ee.length=ee.length-ot}x(le,"popStack");function V(){var ot;return ot=Se.pop()||ve.lex()||Me,typeof ot!="number"&&(ot instanceof Array&&(Se=ot,ot=Se.pop()),ot=ae.symbols_[ot]||ot),ot}x(V,"lex");for(var he,de,Ne,we,ye,Be,Le={},qe,Ke,Ye,Xe;;){if(Ne=W[W.length-1],this.defaultActions[Ne]?we=this.defaultActions[Ne]:((he===null||typeof he>"u")&&(he=V()),we=$e[Ne]&&$e[Ne][he]),typeof we>"u"||!we.length||!we[0]){var Ve="";Xe=[];for(qe in $e[Ne])this.terminals_[qe]&&qe>Ae&&Xe.push("'"+this.terminals_[qe]+"'");ve.showPosition?Ve="Parse error on line "+(Ie+1)+`: -`+ve.showPosition()+` -Expecting `+Xe.join(", ")+", got '"+(this.terminals_[he]||he)+"'":Ve="Parse error on line "+(Ie+1)+": Unexpected "+(he==Me?"end of input":"'"+(this.terminals_[he]||he)+"'"),this.parseError(Ve,{text:ve.match,token:this.terminals_[he]||he,line:ve.yylineno,loc:ue,expected:Xe})}if(we[0]instanceof Array&&we.length>1)throw new Error("Parse Error: multiple actions possible at state: "+Ne+", token: "+he);switch(we[0]){case 1:W.push(he),ne.push(ve.yytext),ee.push(ve.yylloc),W.push(we[1]),he=null,de?(he=de,de=null):(Ue=ve.yyleng,me=ve.yytext,Ie=ve.yylineno,ue=ve.yylloc,Fe>0&&Fe--);break;case 2:if(Ke=this.productions_[we[1]][1],Le.$=ne[ne.length-Ke],Le._$={first_line:ee[ee.length-(Ke||1)].first_line,last_line:ee[ee.length-1].last_line,first_column:ee[ee.length-(Ke||1)].first_column,last_column:ee[ee.length-1].last_column},$&&(Le._$.range=[ee[ee.length-(Ke||1)].range[0],ee[ee.length-1].range[1]]),Be=this.performAction.apply(Le,[me,Ue,Ie,_e.yy,we[1],ne,ee].concat(ke)),typeof Be<"u")return Be;Ke&&(W=W.slice(0,-1*Ke*2),ne=ne.slice(0,-1*Ke),ee=ee.slice(0,-1*Ke)),W.push(this.productions_[we[1]][0]),ne.push(Le.$),ee.push(Le._$),Ye=$e[W[W.length-2]][W[W.length-1]],W.push(Ye);break;case 3:return!0}}return!0},"parse")},j=(function(){var K={EOF:1,parseError:x(function(ae,W){if(this.yy.parser)this.yy.parser.parseError(ae,W);else throw new Error(ae)},"parseError"),setInput:x(function(X,ae){return this.yy=ae||this.yy||{},this._input=X,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:x(function(){var X=this._input[0];this.yytext+=X,this.yyleng++,this.offset++,this.match+=X,this.matched+=X;var ae=X.match(/(?:\r\n?|\n).*/g);return ae?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),X},"input"),unput:x(function(X){var ae=X.length,W=X.split(/(?:\r\n?|\n)/g);this._input=X+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-ae),this.offset-=ae;var Se=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),W.length-1&&(this.yylineno-=W.length-1);var ne=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:W?(W.length===Se.length?this.yylloc.first_column:0)+Se[Se.length-W.length].length-W[0].length:this.yylloc.first_column-ae},this.options.ranges&&(this.yylloc.range=[ne[0],ne[0]+this.yyleng-ae]),this.yyleng=this.yytext.length,this},"unput"),more:x(function(){return this._more=!0,this},"more"),reject:x(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). -`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:x(function(X){this.unput(this.match.slice(X))},"less"),pastInput:x(function(){var X=this.matched.substr(0,this.matched.length-this.match.length);return(X.length>20?"...":"")+X.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:x(function(){var X=this.match;return X.length<20&&(X+=this._input.substr(0,20-X.length)),(X.substr(0,20)+(X.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:x(function(){var X=this.pastInput(),ae=new Array(X.length+1).join("-");return X+this.upcomingInput()+` -`+ae+"^"},"showPosition"),test_match:x(function(X,ae){var W,Se,ne;if(this.options.backtrack_lexer&&(ne={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(ne.yylloc.range=this.yylloc.range.slice(0))),Se=X[0].match(/(?:\r\n?|\n).*/g),Se&&(this.yylineno+=Se.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:Se?Se[Se.length-1].length-Se[Se.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+X[0].length},this.yytext+=X[0],this.match+=X[0],this.matches=X,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(X[0].length),this.matched+=X[0],W=this.performAction.call(this,this.yy,this,ae,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),W)return W;if(this._backtrack){for(var ee in ne)this[ee]=ne[ee];return!1}return!1},"test_match"),next:x(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var X,ae,W,Se;this._more||(this.yytext="",this.match="");for(var ne=this._currentRules(),ee=0;eeae[0].length)){if(ae=W,Se=ee,this.options.backtrack_lexer){if(X=this.test_match(W,ne[ee]),X!==!1)return X;if(this._backtrack){ae=!1;continue}else return!1}else if(!this.options.flex)break}return ae?(X=this.test_match(ae,ne[Se]),X!==!1?X:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. -`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:x(function(){var ae=this.next();return ae||this.lex()},"lex"),begin:x(function(ae){this.conditionStack.push(ae)},"begin"),popState:x(function(){var ae=this.conditionStack.length-1;return ae>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:x(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:x(function(ae){return ae=this.conditionStack.length-1-Math.abs(ae||0),ae>=0?this.conditionStack[ae]:"INITIAL"},"topState"),pushState:x(function(ae){this.begin(ae)},"pushState"),stateStackSize:x(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:x(function(ae,W,Se,ne){var ee=ne;switch(Se){case 0:return this.begin("acc_title"),24;break;case 1:return this.popState(),"acc_title_value";break;case 2:return this.begin("acc_descr"),26;break;case 3:return this.popState(),"acc_descr_value";break;case 4:this.begin("acc_descr_multiline");break;case 5:this.popState();break;case 6:return"acc_descr_multiline_value";case 7:return 33;case 8:return 34;case 9:return 35;case 10:return 36;case 11:return 10;case 12:break;case 13:return 8;case 14:return 50;case 15:return 70;case 16:return 4;case 17:return this.begin("block"),17;break;case 18:return 49;case 19:return 49;case 20:return 42;case 21:return 15;case 22:return 13;case 23:break;case 24:return 59;case 25:return 56;case 26:return 56;case 27:return 60;case 28:break;case 29:return this.popState(),19;break;case 30:return W.yytext[0];case 31:return 20;case 32:return 21;case 33:return this.begin("style"),44;break;case 34:return this.popState(),10;break;case 35:break;case 36:return 13;case 37:return 42;case 38:return 49;case 39:return this.begin("style"),37;break;case 40:return 43;case 41:return 63;case 42:return 65;case 43:return 65;case 44:return 65;case 45:return 63;case 46:return 63;case 47:return 64;case 48:return 64;case 49:return 64;case 50:return 64;case 51:return 64;case 52:return 65;case 53:return 64;case 54:return 65;case 55:return 66;case 56:return 66;case 57:return 66;case 58:return 66;case 59:return 63;case 60:return 64;case 61:return 65;case 62:return 67;case 63:return 68;case 64:return 69;case 65:return 69;case 66:return 68;case 67:return 68;case 68:return 68;case 69:return 41;case 70:return 47;case 71:return 40;case 72:return 48;case 73:return W.yytext[0];case 74:return 6}},"anonymous"),rules:[/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:.*direction\s+TB[^\n]*)/i,/^(?:.*direction\s+BT[^\n]*)/i,/^(?:.*direction\s+RL[^\n]*)/i,/^(?:.*direction\s+LR[^\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:[\s]+)/i,/^(?:"[^"%\r\n\v\b\\]+")/i,/^(?:"[^"]*")/i,/^(?:erDiagram\b)/i,/^(?:\{)/i,/^(?:#)/i,/^(?:#)/i,/^(?:,)/i,/^(?::::)/i,/^(?::)/i,/^(?:\s+)/i,/^(?:\b((?:PK)|(?:FK)|(?:UK))\b)/i,/^(?:([^\s]*)[~].*[~]([^\s]*))/i,/^(?:([\*A-Za-z_\u00C0-\uFFFF][A-Za-z0-9\-\_\[\]\(\)\u00C0-\uFFFF\*]*))/i,/^(?:"[^"]*")/i,/^(?:[\n]+)/i,/^(?:\})/i,/^(?:.)/i,/^(?:\[)/i,/^(?:\])/i,/^(?:style\b)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?::)/i,/^(?:,)/i,/^(?:#)/i,/^(?:classDef\b)/i,/^(?:class\b)/i,/^(?:one or zero\b)/i,/^(?:one or more\b)/i,/^(?:one or many\b)/i,/^(?:1\+)/i,/^(?:\|o\b)/i,/^(?:zero or one\b)/i,/^(?:zero or more\b)/i,/^(?:zero or many\b)/i,/^(?:0\+)/i,/^(?:\}o\b)/i,/^(?:many\(0\))/i,/^(?:many\(1\))/i,/^(?:many\b)/i,/^(?:\}\|)/i,/^(?:one\b)/i,/^(?:only one\b)/i,/^(?:1\b)/i,/^(?:\|\|)/i,/^(?:o\|)/i,/^(?:o\{)/i,/^(?:\|\{)/i,/^(?:\s*u\b)/i,/^(?:\.\.)/i,/^(?:--)/i,/^(?:to\b)/i,/^(?:optionally to\b)/i,/^(?:\.-)/i,/^(?:-\.)/i,/^(?:([^\x00-\x7F]|\w|-|\*)+)/i,/^(?:;)/i,/^(?:([^\x00-\x7F]|\w|-|\*)+)/i,/^(?:[0-9])/i,/^(?:.)/i,/^(?:$)/i],conditions:{style:{rules:[34,35,36,37,38,69,70],inclusive:!1},acc_descr_multiline:{rules:[5,6],inclusive:!1},acc_descr:{rules:[3],inclusive:!1},acc_title:{rules:[1],inclusive:!1},block:{rules:[23,24,25,26,27,28,29,30],inclusive:!1},INITIAL:{rules:[0,2,4,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,31,32,33,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,71,72,73,74],inclusive:!0}}};return K})();J.lexer=j;function Z(){this.yy={}}return x(Z,"Parser"),Z.prototype=J,J.Parser=Z,new Z})();JB.parser=JB;Qrt=JB,Jrt=(dv=class{constructor(){this.entities=new Map,this.relationships=[],this.classes=new Map,this.direction="TB",this.Cardinality={ZERO_OR_ONE:"ZERO_OR_ONE",ZERO_OR_MORE:"ZERO_OR_MORE",ONE_OR_MORE:"ONE_OR_MORE",ONLY_ONE:"ONLY_ONE",MD_PARENT:"MD_PARENT"},this.Identification={NON_IDENTIFYING:"NON_IDENTIFYING",IDENTIFYING:"IDENTIFYING"},this.setAccTitle=Sr,this.getAccTitle=_r,this.setAccDescription=Ar,this.getAccDescription=Lr,this.setDiagramTitle=Fr,this.getDiagramTitle=Rr,this.getConfig=x(()=>Te().er,"getConfig"),this.clear(),this.addEntity=this.addEntity.bind(this),this.addAttributes=this.addAttributes.bind(this),this.addRelationship=this.addRelationship.bind(this),this.setDirection=this.setDirection.bind(this),this.addCssStyles=this.addCssStyles.bind(this),this.addClass=this.addClass.bind(this),this.setClass=this.setClass.bind(this),this.setAccTitle=this.setAccTitle.bind(this),this.setAccDescription=this.setAccDescription.bind(this)}addEntity(e,r=""){return this.entities.has(e)?!this.entities.get(e)?.alias&&r&&(this.entities.get(e).alias=r,te.info(`Add alias '${r}' to entity '${e}'`)):(this.entities.set(e,{id:`entity-${e}-${this.entities.size}`,label:e,attributes:[],alias:r,shape:"erBox",look:Te().look??"default",cssClasses:"default",cssStyles:[]}),te.info("Added new entity :",e)),this.entities.get(e)}getEntity(e){return this.entities.get(e)}getEntities(){return this.entities}getClasses(){return this.classes}addAttributes(e,r){let n=this.addEntity(e),a;for(a=r.length-1;a>=0;a--)r[a].keys||(r[a].keys=[]),r[a].comment||(r[a].comment=""),n.attributes.push(r[a]),te.debug("Added attribute ",r[a].name)}addRelationship(e,r,n,a){let i=this.entities.get(e),s=this.entities.get(n);if(!i||!s)return;let o={entityA:i.id,roleA:r,entityB:s.id,relSpec:a};this.relationships.push(o),te.debug("Added new relationship :",o)}getRelationships(){return this.relationships}getDirection(){return this.direction}setDirection(e){this.direction=e}getCompiledStyles(e){let r=[];for(let n of e){let a=this.classes.get(n);a?.styles&&(r=[...r,...a.styles??[]].map(i=>i.trim())),a?.textStyles&&(r=[...r,...a.textStyles??[]].map(i=>i.trim()))}return r}addCssStyles(e,r){for(let n of e){let a=this.entities.get(n);if(!r||!a)return;for(let i of r)a.cssStyles.push(i)}}addClass(e,r){e.forEach(n=>{let a=this.classes.get(n);a===void 0&&(a={id:n,styles:[],textStyles:[]},this.classes.set(n,a)),r&&r.forEach(function(i){if(/color/.exec(i)){let s=i.replace("fill","bgFill");a.textStyles.push(s)}a.styles.push(i)})})}setClass(e,r){for(let n of e){let a=this.entities.get(n);if(a)for(let i of r)a.cssClasses+=" "+i}}clear(){this.entities=new Map,this.classes=new Map,this.relationships=[],Cr()}getData(){let e=[],r=[],n=Te();for(let i of this.entities.keys()){let s=this.entities.get(i);s&&(s.cssCompiledStyles=this.getCompiledStyles(s.cssClasses.split(" ")),e.push(s))}let a=0;for(let i of this.relationships){let s={id:vd(i.entityA,i.entityB,{prefix:"id",counter:a++}),type:"normal",curve:"basis",start:i.entityA,end:i.entityB,label:i.roleA,labelpos:"c",thickness:"normal",classes:"relationshipLine",arrowTypeStart:i.relSpec.cardB.toLowerCase(),arrowTypeEnd:i.relSpec.cardA.toLowerCase(),pattern:i.relSpec.relType=="IDENTIFYING"?"solid":"dashed",look:n.look};r.push(s)}return{nodes:e,edges:r,other:{},config:n,direction:"TB"}}},x(dv,"ErDB"),dv),rge={};dp(rge,{draw:()=>ent});ent=x(async function(t,e,r,n){te.info("REF0:"),te.info("Drawing er diagram (unified)",e);let{securityLevel:a,er:i,layout:s}=Te(),o=n.db.getData(),l=xc(e,a);o.type=n.type,o.layoutAlgorithm=Rd(s),o.config.flowchart.nodeSpacing=i?.nodeSpacing||140,o.config.flowchart.rankSpacing=i?.rankSpacing||80,o.direction=n.db.getDirection(),o.markers=["only_one","zero_or_one","one_or_more","zero_or_more"],o.diagramId=e,await pc(o,l),o.layoutAlgorithm==="elk"&&l.select(".edges").lower();let u=l.selectAll('[id*="-background"]');Array.from(u).length>0&&u.each(function(){let f=We(this),p=f.attr("id").replace("-background",""),m=l.select(`#${CSS.escape(p)}`);if(!m.empty()){let g=m.attr("transform");f.attr("transform",g)}});let h=8;Wt.insertTitle(l,"erDiagramTitleText",i?.titleTopMargin??25,n.db.getDiagramTitle()),bc(l,h,"erDiagram",i?.useMaxWidth??!0)},"draw"),tnt=x((t,e)=>{let r=op,n=r(t,"r"),a=r(t,"g"),i=r(t,"b");return ms(n,a,i,e)},"fade"),rnt=x(t=>` +`,"getStyles"),_ot=Cot,Aot={parser:Eot,get db(){return new bot},renderer:Tot,styles:_ot,init:b(t=>{t.flowchart||(t.flowchart={}),t.layout&&o3({layout:t.layout}),t.flowchart.arrowMarkerAbsolute=t.arrowMarkerAbsolute,o3({flowchart:{arrowMarkerAbsolute:t.arrowMarkerAbsolute}})},"init")}});var Lye={};Mr(Lye,{diagram:()=>Oot});var h$,Lot,Cy,Rot,Aye,Dot,Iot,Mot,Not,Oot,Rye=D(()=>{E0();ac();nc();iu();Il();Wo();Al();As();Hn();Nr();Or();Cl();h$=(function(){var t=b(function(oe,ne,pe,te){for(pe=pe||{},te=oe.length;te--;pe[oe[te]]=ne);return pe},"o"),e=[6,8,10,22,24,26,28,33,34,35,36,37,40,43,44,50],r=[1,10],n=[1,11],i=[1,12],a=[1,13],s=[1,20],o=[1,21],l=[1,22],u=[1,23],h=[1,24],f=[1,19],d=[1,25],p=[1,26],m=[1,18],g=[1,33],y=[1,34],v=[1,35],x=[1,36],k=[1,37],_=[6,8,10,13,15,17,20,21,22,24,26,28,33,34,35,36,37,40,43,44,50,63,64,65,66,67],T=[1,42],S=[1,43],R=[1,52],A=[40,50,68,69],I=[1,63],P=[1,61],O=[1,58],C=[1,62],N=[1,64],B=[6,8,10,13,17,22,24,26,28,33,34,35,36,37,40,41,42,43,44,48,49,50,63,64,65,66,67],F=[63,64,65,66,67],M=[1,81],$=[1,80],z=[1,78],q=[1,79],V=[6,10,42,47],U=[6,10,13,41,42,47,48,49],J=[1,89],se=[1,88],re=[1,87],me=[19,56],ge=[1,98],ye=[1,97],_e=[19,56,58,60],ue={trace:b(function(){},"trace"),yy:{},symbols_:{error:2,start:3,ER_DIAGRAM:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NEWLINE:10,entityName:11,relSpec:12,COLON:13,role:14,STYLE_SEPARATOR:15,idList:16,BLOCK_START:17,attributes:18,BLOCK_STOP:19,SQS:20,SQE:21,title:22,title_value:23,acc_title:24,acc_title_value:25,acc_descr:26,acc_descr_value:27,acc_descr_multiline_value:28,direction:29,classDefStatement:30,classStatement:31,styleStatement:32,direction_tb:33,direction_bt:34,direction_rl:35,direction_lr:36,CLASSDEF:37,stylesOpt:38,separator:39,UNICODE_TEXT:40,STYLE_TEXT:41,COMMA:42,CLASS:43,STYLE:44,style:45,styleComponent:46,SEMI:47,NUM:48,BRKT:49,ENTITY_NAME:50,attribute:51,attributeType:52,attributeName:53,attributeKeyTypeList:54,attributeComment:55,ATTRIBUTE_WORD:56,attributeKeyType:57,",":58,ATTRIBUTE_KEY:59,COMMENT:60,cardinality:61,relType:62,ZERO_OR_ONE:63,ZERO_OR_MORE:64,ONE_OR_MORE:65,ONLY_ONE:66,MD_PARENT:67,NON_IDENTIFYING:68,IDENTIFYING:69,WORD:70,$accept:0,$end:1},terminals_:{2:"error",4:"ER_DIAGRAM",6:"EOF",8:"SPACE",10:"NEWLINE",13:"COLON",15:"STYLE_SEPARATOR",17:"BLOCK_START",19:"BLOCK_STOP",20:"SQS",21:"SQE",22:"title",23:"title_value",24:"acc_title",25:"acc_title_value",26:"acc_descr",27:"acc_descr_value",28:"acc_descr_multiline_value",33:"direction_tb",34:"direction_bt",35:"direction_rl",36:"direction_lr",37:"CLASSDEF",40:"UNICODE_TEXT",41:"STYLE_TEXT",42:"COMMA",43:"CLASS",44:"STYLE",47:"SEMI",48:"NUM",49:"BRKT",50:"ENTITY_NAME",56:"ATTRIBUTE_WORD",58:",",59:"ATTRIBUTE_KEY",60:"COMMENT",63:"ZERO_OR_ONE",64:"ZERO_OR_MORE",65:"ONE_OR_MORE",66:"ONLY_ONE",67:"MD_PARENT",68:"NON_IDENTIFYING",69:"IDENTIFYING",70:"WORD"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[9,5],[9,9],[9,7],[9,7],[9,4],[9,6],[9,3],[9,5],[9,1],[9,3],[9,7],[9,9],[9,6],[9,8],[9,4],[9,6],[9,2],[9,2],[9,2],[9,1],[9,1],[9,1],[9,1],[9,1],[29,1],[29,1],[29,1],[29,1],[30,4],[16,1],[16,1],[16,3],[16,3],[31,3],[32,4],[38,1],[38,3],[45,1],[45,2],[39,1],[39,1],[39,1],[46,1],[46,1],[46,1],[46,1],[11,1],[11,1],[18,1],[18,2],[51,2],[51,3],[51,3],[51,4],[52,1],[53,1],[54,1],[54,3],[57,1],[55,1],[12,3],[61,1],[61,1],[61,1],[61,1],[61,1],[62,1],[62,1],[14,1],[14,1],[14,1]],performAction:b(function(ne,pe,te,He,de,ce,st){var Ae=ce.length-1;switch(de){case 1:break;case 2:this.$=[];break;case 3:ce[Ae-1].push(ce[Ae]),this.$=ce[Ae-1];break;case 4:case 5:this.$=ce[Ae];break;case 6:case 7:this.$=[];break;case 8:He.addEntity(ce[Ae-4]),He.addEntity(ce[Ae-2]),He.addRelationship(ce[Ae-4],ce[Ae],ce[Ae-2],ce[Ae-3]);break;case 9:He.addEntity(ce[Ae-8]),He.addEntity(ce[Ae-4]),He.addRelationship(ce[Ae-8],ce[Ae],ce[Ae-4],ce[Ae-5]),He.setClass([ce[Ae-8]],ce[Ae-6]),He.setClass([ce[Ae-4]],ce[Ae-2]);break;case 10:He.addEntity(ce[Ae-6]),He.addEntity(ce[Ae-2]),He.addRelationship(ce[Ae-6],ce[Ae],ce[Ae-2],ce[Ae-3]),He.setClass([ce[Ae-6]],ce[Ae-4]);break;case 11:He.addEntity(ce[Ae-6]),He.addEntity(ce[Ae-4]),He.addRelationship(ce[Ae-6],ce[Ae],ce[Ae-4],ce[Ae-5]),He.setClass([ce[Ae-4]],ce[Ae-2]);break;case 12:He.addEntity(ce[Ae-3]),He.addAttributes(ce[Ae-3],ce[Ae-1]);break;case 13:He.addEntity(ce[Ae-5]),He.addAttributes(ce[Ae-5],ce[Ae-1]),He.setClass([ce[Ae-5]],ce[Ae-3]);break;case 14:He.addEntity(ce[Ae-2]);break;case 15:He.addEntity(ce[Ae-4]),He.setClass([ce[Ae-4]],ce[Ae-2]);break;case 16:He.addEntity(ce[Ae]);break;case 17:He.addEntity(ce[Ae-2]),He.setClass([ce[Ae-2]],ce[Ae]);break;case 18:He.addEntity(ce[Ae-6],ce[Ae-4]),He.addAttributes(ce[Ae-6],ce[Ae-1]);break;case 19:He.addEntity(ce[Ae-8],ce[Ae-6]),He.addAttributes(ce[Ae-8],ce[Ae-1]),He.setClass([ce[Ae-8]],ce[Ae-3]);break;case 20:He.addEntity(ce[Ae-5],ce[Ae-3]);break;case 21:He.addEntity(ce[Ae-7],ce[Ae-5]),He.setClass([ce[Ae-7]],ce[Ae-2]);break;case 22:He.addEntity(ce[Ae-3],ce[Ae-1]);break;case 23:He.addEntity(ce[Ae-5],ce[Ae-3]),He.setClass([ce[Ae-5]],ce[Ae]);break;case 24:case 25:this.$=ce[Ae].trim(),He.setAccTitle(this.$);break;case 26:case 27:this.$=ce[Ae].trim(),He.setAccDescription(this.$);break;case 32:He.setDirection("TB");break;case 33:He.setDirection("BT");break;case 34:He.setDirection("RL");break;case 35:He.setDirection("LR");break;case 36:this.$=ce[Ae-3],He.addClass(ce[Ae-2],ce[Ae-1]);break;case 37:case 38:case 56:case 64:this.$=[ce[Ae]];break;case 39:case 40:this.$=ce[Ae-2].concat([ce[Ae]]);break;case 41:this.$=ce[Ae-2],He.setClass(ce[Ae-1],ce[Ae]);break;case 42:this.$=ce[Ae-3],He.addCssStyles(ce[Ae-2],ce[Ae-1]);break;case 43:this.$=[ce[Ae]];break;case 44:ce[Ae-2].push(ce[Ae]),this.$=ce[Ae-2];break;case 46:this.$=ce[Ae-1]+ce[Ae];break;case 54:case 76:case 77:this.$=ce[Ae].replace(/"/g,"");break;case 55:case 78:this.$=ce[Ae];break;case 57:ce[Ae].push(ce[Ae-1]),this.$=ce[Ae];break;case 58:this.$={type:ce[Ae-1],name:ce[Ae]};break;case 59:this.$={type:ce[Ae-2],name:ce[Ae-1],keys:ce[Ae]};break;case 60:this.$={type:ce[Ae-2],name:ce[Ae-1],comment:ce[Ae]};break;case 61:this.$={type:ce[Ae-3],name:ce[Ae-2],keys:ce[Ae-1],comment:ce[Ae]};break;case 62:case 63:case 66:this.$=ce[Ae];break;case 65:ce[Ae-2].push(ce[Ae]),this.$=ce[Ae-2];break;case 67:this.$=ce[Ae].replace(/"/g,"");break;case 68:this.$={cardA:ce[Ae],relType:ce[Ae-1],cardB:ce[Ae-2]};break;case 69:this.$=He.Cardinality.ZERO_OR_ONE;break;case 70:this.$=He.Cardinality.ZERO_OR_MORE;break;case 71:this.$=He.Cardinality.ONE_OR_MORE;break;case 72:this.$=He.Cardinality.ONLY_ONE;break;case 73:this.$=He.Cardinality.MD_PARENT;break;case 74:this.$=He.Identification.NON_IDENTIFYING;break;case 75:this.$=He.Identification.IDENTIFYING;break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},t(e,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:9,22:r,24:n,26:i,28:a,29:14,30:15,31:16,32:17,33:s,34:o,35:l,36:u,37:h,40:f,43:d,44:p,50:m},t(e,[2,7],{1:[2,1]}),t(e,[2,3]),{9:27,11:9,22:r,24:n,26:i,28:a,29:14,30:15,31:16,32:17,33:s,34:o,35:l,36:u,37:h,40:f,43:d,44:p,50:m},t(e,[2,5]),t(e,[2,6]),t(e,[2,16],{12:28,61:32,15:[1,29],17:[1,30],20:[1,31],63:g,64:y,65:v,66:x,67:k}),{23:[1,38]},{25:[1,39]},{27:[1,40]},t(e,[2,27]),t(e,[2,28]),t(e,[2,29]),t(e,[2,30]),t(e,[2,31]),t(_,[2,54]),t(_,[2,55]),t(e,[2,32]),t(e,[2,33]),t(e,[2,34]),t(e,[2,35]),{16:41,40:T,41:S},{16:44,40:T,41:S},{16:45,40:T,41:S},t(e,[2,4]),{11:46,40:f,50:m},{16:47,40:T,41:S},{18:48,19:[1,49],51:50,52:51,56:R},{11:53,40:f,50:m},{62:54,68:[1,55],69:[1,56]},t(A,[2,69]),t(A,[2,70]),t(A,[2,71]),t(A,[2,72]),t(A,[2,73]),t(e,[2,24]),t(e,[2,25]),t(e,[2,26]),{13:I,38:57,41:P,42:O,45:59,46:60,48:C,49:N},t(B,[2,37]),t(B,[2,38]),{16:65,40:T,41:S,42:O},{13:I,38:66,41:P,42:O,45:59,46:60,48:C,49:N},{13:[1,67],15:[1,68]},t(e,[2,17],{61:32,12:69,17:[1,70],42:O,63:g,64:y,65:v,66:x,67:k}),{19:[1,71]},t(e,[2,14]),{18:72,19:[2,56],51:50,52:51,56:R},{53:73,56:[1,74]},{56:[2,62]},{21:[1,75]},{61:76,63:g,64:y,65:v,66:x,67:k},t(F,[2,74]),t(F,[2,75]),{6:M,10:$,39:77,42:z,47:q},{40:[1,82],41:[1,83]},t(V,[2,43],{46:84,13:I,41:P,48:C,49:N}),t(U,[2,45]),t(U,[2,50]),t(U,[2,51]),t(U,[2,52]),t(U,[2,53]),t(e,[2,41],{42:O}),{6:M,10:$,39:85,42:z,47:q},{14:86,40:J,50:se,70:re},{16:90,40:T,41:S},{11:91,40:f,50:m},{18:92,19:[1,93],51:50,52:51,56:R},t(e,[2,12]),{19:[2,57]},t(me,[2,58],{54:94,55:95,57:96,59:ge,60:ye}),t([19,56,59,60],[2,63]),t(e,[2,22],{15:[1,100],17:[1,99]}),t([40,50],[2,68]),t(e,[2,36]),{13:I,41:P,45:101,46:60,48:C,49:N},t(e,[2,47]),t(e,[2,48]),t(e,[2,49]),t(B,[2,39]),t(B,[2,40]),t(U,[2,46]),t(e,[2,42]),t(e,[2,8]),t(e,[2,76]),t(e,[2,77]),t(e,[2,78]),{13:[1,102],42:O},{13:[1,104],15:[1,103]},{19:[1,105]},t(e,[2,15]),t(me,[2,59],{55:106,58:[1,107],60:ye}),t(me,[2,60]),t(_e,[2,64]),t(me,[2,67]),t(_e,[2,66]),{18:108,19:[1,109],51:50,52:51,56:R},{16:110,40:T,41:S},t(V,[2,44],{46:84,13:I,41:P,48:C,49:N}),{14:111,40:J,50:se,70:re},{16:112,40:T,41:S},{14:113,40:J,50:se,70:re},t(e,[2,13]),t(me,[2,61]),{57:114,59:ge},{19:[1,115]},t(e,[2,20]),t(e,[2,23],{17:[1,116],42:O}),t(e,[2,11]),{13:[1,117],42:O},t(e,[2,10]),t(_e,[2,65]),t(e,[2,18]),{18:118,19:[1,119],51:50,52:51,56:R},{14:120,40:J,50:se,70:re},{19:[1,121]},t(e,[2,21]),t(e,[2,9]),t(e,[2,19])],defaultActions:{52:[2,62],72:[2,57]},parseError:b(function(ne,pe){if(pe.recoverable)this.trace(ne);else{var te=new Error(ne);throw te.hash=pe,te}},"parseError"),parse:b(function(ne){var pe=this,te=[0],He=[],de=[null],ce=[],st=this.table,Ae="",Ye=0,Ge=0,rt=0,Xe=2,Ze=1,Pe=ce.slice.call(arguments,1),Re=Object.create(this.lexer),Ve={yy:{}};for(var ke in this.yy)Object.prototype.hasOwnProperty.call(this.yy,ke)&&(Ve.yy[ke]=this.yy[ke]);Re.setInput(ne,Ve.yy),Ve.yy.lexer=Re,Ve.yy.parser=this,typeof Re.yylloc>"u"&&(Re.yylloc={});var xe=Re.yylloc;ce.push(xe);var H=Re.options&&Re.options.ranges;typeof Ve.yy.parseError=="function"?this.parseError=Ve.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function ve(Dt){te.length=te.length-2*Dt,de.length=de.length-Dt,ce.length=ce.length-Dt}b(ve,"popStack");function K(){var Dt;return Dt=He.pop()||Re.lex()||Ze,typeof Dt!="number"&&(Dt instanceof Array&&(He=Dt,Dt=He.pop()),Dt=pe.symbols_[Dt]||Dt),Dt}b(K,"lex");for(var we,Ee,Ke,Be,De,nt,We={},ut,vt,gt,mt;;){if(Ke=te[te.length-1],this.defaultActions[Ke]?Be=this.defaultActions[Ke]:((we===null||typeof we>"u")&&(we=K()),Be=st[Ke]&&st[Ke][we]),typeof Be>"u"||!Be.length||!Be[0]){var ft="";mt=[];for(ut in st[Ke])this.terminals_[ut]&&ut>Xe&&mt.push("'"+this.terminals_[ut]+"'");Re.showPosition?ft="Parse error on line "+(Ye+1)+`: +`+Re.showPosition()+` +Expecting `+mt.join(", ")+", got '"+(this.terminals_[we]||we)+"'":ft="Parse error on line "+(Ye+1)+": Unexpected "+(we==Ze?"end of input":"'"+(this.terminals_[we]||we)+"'"),this.parseError(ft,{text:Re.match,token:this.terminals_[we]||we,line:Re.yylineno,loc:xe,expected:mt})}if(Be[0]instanceof Array&&Be.length>1)throw new Error("Parse Error: multiple actions possible at state: "+Ke+", token: "+we);switch(Be[0]){case 1:te.push(we),de.push(Re.yytext),ce.push(Re.yylloc),te.push(Be[1]),we=null,Ee?(we=Ee,Ee=null):(Ge=Re.yyleng,Ae=Re.yytext,Ye=Re.yylineno,xe=Re.yylloc,rt>0&&rt--);break;case 2:if(vt=this.productions_[Be[1]][1],We.$=de[de.length-vt],We._$={first_line:ce[ce.length-(vt||1)].first_line,last_line:ce[ce.length-1].last_line,first_column:ce[ce.length-(vt||1)].first_column,last_column:ce[ce.length-1].last_column},H&&(We._$.range=[ce[ce.length-(vt||1)].range[0],ce[ce.length-1].range[1]]),nt=this.performAction.apply(We,[Ae,Ge,Ye,Ve.yy,Be[1],de,ce].concat(Pe)),typeof nt<"u")return nt;vt&&(te=te.slice(0,-1*vt*2),de=de.slice(0,-1*vt),ce=ce.slice(0,-1*vt)),te.push(this.productions_[Be[1]][0]),de.push(We.$),ce.push(We._$),gt=st[te[te.length-2]][te[te.length-1]],te.push(gt);break;case 3:return!0}}return!0},"parse")},ie=(function(){var oe={EOF:1,parseError:b(function(pe,te){if(this.yy.parser)this.yy.parser.parseError(pe,te);else throw new Error(pe)},"parseError"),setInput:b(function(ne,pe){return this.yy=pe||this.yy||{},this._input=ne,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:b(function(){var ne=this._input[0];this.yytext+=ne,this.yyleng++,this.offset++,this.match+=ne,this.matched+=ne;var pe=ne.match(/(?:\r\n?|\n).*/g);return pe?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),ne},"input"),unput:b(function(ne){var pe=ne.length,te=ne.split(/(?:\r\n?|\n)/g);this._input=ne+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-pe),this.offset-=pe;var He=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),te.length-1&&(this.yylineno-=te.length-1);var de=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:te?(te.length===He.length?this.yylloc.first_column:0)+He[He.length-te.length].length-te[0].length:this.yylloc.first_column-pe},this.options.ranges&&(this.yylloc.range=[de[0],de[0]+this.yyleng-pe]),this.yyleng=this.yytext.length,this},"unput"),more:b(function(){return this._more=!0,this},"more"),reject:b(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). +`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:b(function(ne){this.unput(this.match.slice(ne))},"less"),pastInput:b(function(){var ne=this.matched.substr(0,this.matched.length-this.match.length);return(ne.length>20?"...":"")+ne.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:b(function(){var ne=this.match;return ne.length<20&&(ne+=this._input.substr(0,20-ne.length)),(ne.substr(0,20)+(ne.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:b(function(){var ne=this.pastInput(),pe=new Array(ne.length+1).join("-");return ne+this.upcomingInput()+` +`+pe+"^"},"showPosition"),test_match:b(function(ne,pe){var te,He,de;if(this.options.backtrack_lexer&&(de={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(de.yylloc.range=this.yylloc.range.slice(0))),He=ne[0].match(/(?:\r\n?|\n).*/g),He&&(this.yylineno+=He.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:He?He[He.length-1].length-He[He.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+ne[0].length},this.yytext+=ne[0],this.match+=ne[0],this.matches=ne,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(ne[0].length),this.matched+=ne[0],te=this.performAction.call(this,this.yy,this,pe,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),te)return te;if(this._backtrack){for(var ce in de)this[ce]=de[ce];return!1}return!1},"test_match"),next:b(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var ne,pe,te,He;this._more||(this.yytext="",this.match="");for(var de=this._currentRules(),ce=0;cepe[0].length)){if(pe=te,He=ce,this.options.backtrack_lexer){if(ne=this.test_match(te,de[ce]),ne!==!1)return ne;if(this._backtrack){pe=!1;continue}else return!1}else if(!this.options.flex)break}return pe?(ne=this.test_match(pe,de[He]),ne!==!1?ne:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. +`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:b(function(){var pe=this.next();return pe||this.lex()},"lex"),begin:b(function(pe){this.conditionStack.push(pe)},"begin"),popState:b(function(){var pe=this.conditionStack.length-1;return pe>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:b(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:b(function(pe){return pe=this.conditionStack.length-1-Math.abs(pe||0),pe>=0?this.conditionStack[pe]:"INITIAL"},"topState"),pushState:b(function(pe){this.begin(pe)},"pushState"),stateStackSize:b(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:b(function(pe,te,He,de){var ce=de;switch(He){case 0:return this.begin("acc_title"),24;break;case 1:return this.popState(),"acc_title_value";break;case 2:return this.begin("acc_descr"),26;break;case 3:return this.popState(),"acc_descr_value";break;case 4:this.begin("acc_descr_multiline");break;case 5:this.popState();break;case 6:return"acc_descr_multiline_value";case 7:return 33;case 8:return 34;case 9:return 35;case 10:return 36;case 11:return 10;case 12:break;case 13:return 8;case 14:return 50;case 15:return 70;case 16:return 4;case 17:return this.begin("block"),17;break;case 18:return 49;case 19:return 49;case 20:return 42;case 21:return 15;case 22:return 13;case 23:break;case 24:return 59;case 25:return 56;case 26:return 56;case 27:return 60;case 28:break;case 29:return this.popState(),19;break;case 30:return te.yytext[0];case 31:return 20;case 32:return 21;case 33:return this.begin("style"),44;break;case 34:return this.popState(),10;break;case 35:break;case 36:return 13;case 37:return 42;case 38:return 49;case 39:return this.begin("style"),37;break;case 40:return 43;case 41:return 63;case 42:return 65;case 43:return 65;case 44:return 65;case 45:return 63;case 46:return 63;case 47:return 64;case 48:return 64;case 49:return 64;case 50:return 64;case 51:return 64;case 52:return 65;case 53:return 64;case 54:return 65;case 55:return 66;case 56:return 66;case 57:return 66;case 58:return 66;case 59:return 63;case 60:return 64;case 61:return 65;case 62:return 67;case 63:return 68;case 64:return 69;case 65:return 69;case 66:return 68;case 67:return 68;case 68:return 68;case 69:return 41;case 70:return 47;case 71:return 40;case 72:return 48;case 73:return te.yytext[0];case 74:return 6}},"anonymous"),rules:[/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:.*direction\s+TB[^\n]*)/i,/^(?:.*direction\s+BT[^\n]*)/i,/^(?:.*direction\s+RL[^\n]*)/i,/^(?:.*direction\s+LR[^\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:[\s]+)/i,/^(?:"[^"%\r\n\v\b\\]+")/i,/^(?:"[^"]*")/i,/^(?:erDiagram\b)/i,/^(?:\{)/i,/^(?:#)/i,/^(?:#)/i,/^(?:,)/i,/^(?::::)/i,/^(?::)/i,/^(?:\s+)/i,/^(?:\b((?:PK)|(?:FK)|(?:UK))\b)/i,/^(?:([^\s]*)[~].*[~]([^\s]*))/i,/^(?:([\*A-Za-z_\u00C0-\uFFFF][A-Za-z0-9\-\_\[\]\(\)\u00C0-\uFFFF\*]*))/i,/^(?:"[^"]*")/i,/^(?:[\n]+)/i,/^(?:\})/i,/^(?:.)/i,/^(?:\[)/i,/^(?:\])/i,/^(?:style\b)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?::)/i,/^(?:,)/i,/^(?:#)/i,/^(?:classDef\b)/i,/^(?:class\b)/i,/^(?:one or zero\b)/i,/^(?:one or more\b)/i,/^(?:one or many\b)/i,/^(?:1\+)/i,/^(?:\|o\b)/i,/^(?:zero or one\b)/i,/^(?:zero or more\b)/i,/^(?:zero or many\b)/i,/^(?:0\+)/i,/^(?:\}o\b)/i,/^(?:many\(0\))/i,/^(?:many\(1\))/i,/^(?:many\b)/i,/^(?:\}\|)/i,/^(?:one\b)/i,/^(?:only one\b)/i,/^(?:1\b)/i,/^(?:\|\|)/i,/^(?:o\|)/i,/^(?:o\{)/i,/^(?:\|\{)/i,/^(?:\s*u\b)/i,/^(?:\.\.)/i,/^(?:--)/i,/^(?:to\b)/i,/^(?:optionally to\b)/i,/^(?:\.-)/i,/^(?:-\.)/i,/^(?:([^\x00-\x7F]|\w|-|\*)+)/i,/^(?:;)/i,/^(?:([^\x00-\x7F]|\w|-|\*)+)/i,/^(?:[0-9])/i,/^(?:.)/i,/^(?:$)/i],conditions:{style:{rules:[34,35,36,37,38,69,70],inclusive:!1},acc_descr_multiline:{rules:[5,6],inclusive:!1},acc_descr:{rules:[3],inclusive:!1},acc_title:{rules:[1],inclusive:!1},block:{rules:[23,24,25,26,27,28,29,30],inclusive:!1},INITIAL:{rules:[0,2,4,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,31,32,33,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,71,72,73,74],inclusive:!0}}};return oe})();ue.lexer=ie;function le(){this.yy={}}return b(le,"Parser"),le.prototype=ue,ue.Parser=le,new le})();h$.parser=h$;Lot=h$,Rot=(Cy=class{constructor(){this.entities=new Map,this.relationships=[],this.classes=new Map,this.direction="TB",this.Cardinality={ZERO_OR_ONE:"ZERO_OR_ONE",ZERO_OR_MORE:"ZERO_OR_MORE",ONE_OR_MORE:"ONE_OR_MORE",ONLY_ONE:"ONLY_ONE",MD_PARENT:"MD_PARENT"},this.Identification={NON_IDENTIFYING:"NON_IDENTIFYING",IDENTIFYING:"IDENTIFYING"},this.setAccTitle=en,this.getAccTitle=tn,this.setAccDescription=rn,this.getAccDescription=nn,this.setDiagramTitle=pn,this.getDiagramTitle=an,this.getConfig=b(()=>Fe().er,"getConfig"),this.clear(),this.addEntity=this.addEntity.bind(this),this.addAttributes=this.addAttributes.bind(this),this.addRelationship=this.addRelationship.bind(this),this.setDirection=this.setDirection.bind(this),this.addCssStyles=this.addCssStyles.bind(this),this.addClass=this.addClass.bind(this),this.setClass=this.setClass.bind(this),this.setAccTitle=this.setAccTitle.bind(this),this.setAccDescription=this.setAccDescription.bind(this)}addEntity(e,r=""){return this.entities.has(e)?!this.entities.get(e)?.alias&&r&&(this.entities.get(e).alias=r,he.info(`Add alias '${r}' to entity '${e}'`)):(this.entities.set(e,{id:`entity-${e}-${this.entities.size}`,label:e,attributes:[],alias:r,shape:"erBox",look:Fe().look??"default",cssClasses:"default",cssStyles:[]}),he.info("Added new entity :",e)),this.entities.get(e)}getEntity(e){return this.entities.get(e)}getEntities(){return this.entities}getClasses(){return this.classes}addAttributes(e,r){let n=this.addEntity(e),i;for(i=r.length-1;i>=0;i--)r[i].keys||(r[i].keys=[]),r[i].comment||(r[i].comment=""),n.attributes.push(r[i]),he.debug("Added attribute ",r[i].name)}addRelationship(e,r,n,i){let a=this.entities.get(e),s=this.entities.get(n);if(!a||!s)return;let o={entityA:a.id,roleA:r,entityB:s.id,relSpec:i};this.relationships.push(o),he.debug("Added new relationship :",o)}getRelationships(){return this.relationships}getDirection(){return this.direction}setDirection(e){this.direction=e}getCompiledStyles(e){let r=[];for(let n of e){let i=this.classes.get(n);i?.styles&&(r=[...r,...i.styles??[]].map(a=>a.trim())),i?.textStyles&&(r=[...r,...i.textStyles??[]].map(a=>a.trim()))}return r}addCssStyles(e,r){for(let n of e){let i=this.entities.get(n);if(!r||!i)return;for(let a of r)i.cssStyles.push(a)}}addClass(e,r){e.forEach(n=>{let i=this.classes.get(n);i===void 0&&(i={id:n,styles:[],textStyles:[]},this.classes.set(n,i)),r&&r.forEach(function(a){if(/color/.exec(a)){let s=a.replace("fill","bgFill");i.textStyles.push(s)}i.styles.push(a)})})}setClass(e,r){for(let n of e){let i=this.entities.get(n);if(i)for(let a of r)i.cssClasses+=" "+a}}clear(){this.entities=new Map,this.classes=new Map,this.relationships=[],Jr()}getData(){let e=[],r=[],n=Fe();for(let a of this.entities.keys()){let s=this.entities.get(a);s&&(s.cssCompiledStyles=this.getCompiledStyles(s.cssClasses.split(" ")),e.push(s))}let i=0;for(let a of this.relationships){let s={id:Sd(a.entityA,a.entityB,{prefix:"id",counter:i++}),type:"normal",curve:"basis",start:a.entityA,end:a.entityB,label:a.roleA,labelpos:"c",thickness:"normal",classes:"relationshipLine",arrowTypeStart:a.relSpec.cardB.toLowerCase(),arrowTypeEnd:a.relSpec.cardA.toLowerCase(),pattern:a.relSpec.relType=="IDENTIFYING"?"solid":"dashed",look:n.look};r.push(s)}return{nodes:e,edges:r,other:{},config:n,direction:"TB"}}},b(Cy,"ErDB"),Cy),Aye={};k1(Aye,{draw:()=>Dot});Dot=b(async function(t,e,r,n){he.info("REF0:"),he.info("Drawing er diagram (unified)",e);let{securityLevel:i,er:a,layout:s}=Fe(),o=n.db.getData(),l=k0(e,i);o.type=n.type,o.layoutAlgorithm=Fd(s),o.config.flowchart.nodeSpacing=a?.nodeSpacing||140,o.config.flowchart.rankSpacing=a?.rankSpacing||80,o.direction=n.db.getDirection(),o.markers=["only_one","zero_or_one","one_or_more","zero_or_more"],o.diagramId=e,await y0(o,l),o.layoutAlgorithm==="elk"&&l.select(".edges").lower();let u=l.selectAll('[id*="-background"]');Array.from(u).length>0&&u.each(function(){let f=dt(this),p=f.attr("id").replace("-background",""),m=l.select(`#${CSS.escape(p)}`);if(!m.empty()){let g=m.attr("transform");f.attr("transform",g)}});let h=8;gr.insertTitle(l,"erDiagramTitleText",a?.titleTopMargin??25,n.db.getDiagramTitle()),T0(l,h,"erDiagram",a?.useMaxWidth??!0)},"draw"),Iot=b((t,e)=>{let r=x1,n=r(t,"r"),i=r(t,"g"),a=r(t,"b");return uo(n,i,a,e)},"fade"),Mot=b(t=>` .entityBox { fill: ${t.mainBkg}; stroke: ${t.nodeBorder}; @@ -646,7 +902,7 @@ Expecting `+Xe.join(", ")+", got '"+(this.terminals_[he]||he)+"'":Ve="Parse erro } .labelBkg { - background-color: ${tnt(t.tertiaryColor,.5)}; + background-color: ${Iot(t.tertiaryColor,.5)}; } .edgeLabel .label { @@ -684,148 +940,148 @@ Expecting `+Xe.join(", ")+", got '"+(this.terminals_[he]||he)+"'":Ve="Parse erro stroke: ${t.lineColor} !important; stroke-width: 1; } -`,"getStyles"),nnt=rnt,ant={parser:Qrt,get db(){return new Jrt},renderer:rge,styles:nnt}});function uu(t,e){t.accDescr&&e.setAccDescription?.(t.accDescr),t.accTitle&&e.setAccTitle?.(t.accTitle),t.title&&e.setDiagramTitle?.(t.title)}var pv=A(()=>{ur();x(uu,"populateCommonDb")});var mv,gv,w_=A(()=>{ur();gv=(mv=class{constructor(e){this.init=e,this.records=this.init()}reset(){this.records=this.init()}},x(mv,"ImperativeState"),mv)});function na(t){return typeof t=="object"&&t!==null&&typeof t.$type=="string"}function Ui(t){return typeof t=="object"&&t!==null&&typeof t.$refText=="string"}function eF(t){return typeof t=="object"&&t!==null&&typeof t.name=="string"&&typeof t.type=="string"&&typeof t.path=="string"}function lm(t){return typeof t=="object"&&t!==null&&na(t.container)&&Ui(t.reference)&&typeof t.message=="string"}function cu(t){return typeof t=="object"&&t!==null&&Array.isArray(t.content)}function Od(t){return typeof t=="object"&&t!==null&&typeof t.tokenType=="object"}function z3(t){return cu(t)&&typeof t.fullText=="string"}var om,hu=A(()=>{om=class{constructor(){this.subtypes={},this.allSubtypes={}}isInstance(e,r){return na(e)&&this.isSubtype(e.$type,r)}isSubtype(e,r){if(e===r)return!0;let n=this.subtypes[e];n||(n=this.subtypes[e]={});let a=n[r];if(a!==void 0)return a;{let i=this.computeIsSubtype(e,r);return n[r]=i,i}}getAllSubTypes(e){let r=this.allSubtypes[e];if(r)return r;{let n=this.getAllTypes(),a=[];for(let i of n)this.isSubtype(i,e)&&a.push(i);return this.allSubtypes[e]=a,a}}}});function int(t){return typeof t=="string"?t:typeof t>"u"?"undefined":typeof t.toString=="function"?t.toString():Object.prototype.toString.call(t)}function k_(t){return!!t&&typeof t[Symbol.iterator]=="function"}function Kr(...t){if(t.length===1){let e=t[0];if(e instanceof Vo)return e;if(k_(e))return new Vo(()=>e[Symbol.iterator](),r=>r.next());if(typeof e.length=="number")return new Vo(()=>({index:0}),r=>r.index1?new Vo(()=>({collIndex:0,arrIndex:0}),e=>{do{if(e.iterator){let r=e.iterator.next();if(!r.done)return r;e.iterator=void 0}if(e.array){if(e.arrIndex{Vo=class t{constructor(e,r){this.startFn=e,this.nextFn=r}iterator(){let e={state:this.startFn(),next:()=>this.nextFn(e.state),[Symbol.iterator]:()=>e};return e}[Symbol.iterator](){return this.iterator()}isEmpty(){return!!this.iterator().next().done}count(){let e=this.iterator(),r=0,n=e.next();for(;!n.done;)r++,n=e.next();return r}toArray(){let e=[],r=this.iterator(),n;do n=r.next(),n.value!==void 0&&e.push(n.value);while(!n.done);return e}toSet(){return new Set(this)}toMap(e,r){let n=this.map(a=>[e?e(a):a,r?r(a):a]);return new Map(n)}toString(){return this.join()}concat(e){return new t(()=>({first:this.startFn(),firstDone:!1,iterator:e[Symbol.iterator]()}),r=>{let n;if(!r.firstDone){do if(n=this.nextFn(r.first),!n.done)return n;while(!n.done);r.firstDone=!0}do if(n=r.iterator.next(),!n.done)return n;while(!n.done);return as})}join(e=","){let r=this.iterator(),n="",a,i=!1;do a=r.next(),a.done||(i&&(n+=e),n+=int(a.value)),i=!0;while(!a.done);return n}indexOf(e,r=0){let n=this.iterator(),a=0,i=n.next();for(;!i.done;){if(a>=r&&i.value===e)return a;i=n.next(),a++}return-1}every(e){let r=this.iterator(),n=r.next();for(;!n.done;){if(!e(n.value))return!1;n=r.next()}return!0}some(e){let r=this.iterator(),n=r.next();for(;!n.done;){if(e(n.value))return!0;n=r.next()}return!1}forEach(e){let r=this.iterator(),n=0,a=r.next();for(;!a.done;)e(a.value,n),a=r.next(),n++}map(e){return new t(this.startFn,r=>{let{done:n,value:a}=this.nextFn(r);return n?as:{done:!1,value:e(a)}})}filter(e){return new t(this.startFn,r=>{let n;do if(n=this.nextFn(r),!n.done&&e(n.value))return n;while(!n.done);return as})}nonNullable(){return this.filter(e=>e!=null)}reduce(e,r){let n=this.iterator(),a=r,i=n.next();for(;!i.done;)a===void 0?a=i.value:a=e(a,i.value),i=n.next();return a}reduceRight(e,r){return this.recursiveReduce(this.iterator(),e,r)}recursiveReduce(e,r,n){let a=e.next();if(a.done)return n;let i=this.recursiveReduce(e,r,n);return i===void 0?a.value:r(i,a.value)}find(e){let r=this.iterator(),n=r.next();for(;!n.done;){if(e(n.value))return n.value;n=r.next()}}findIndex(e){let r=this.iterator(),n=0,a=r.next();for(;!a.done;){if(e(a.value))return n;a=r.next(),n++}return-1}includes(e){let r=this.iterator(),n=r.next();for(;!n.done;){if(n.value===e)return!0;n=r.next()}return!1}flatMap(e){return new t(()=>({this:this.startFn()}),r=>{do{if(r.iterator){let i=r.iterator.next();if(i.done)r.iterator=void 0;else return i}let{done:n,value:a}=this.nextFn(r.this);if(!n){let i=e(a);if(k_(i))r.iterator=i[Symbol.iterator]();else return{done:!1,value:i}}}while(r.iterator);return as})}flat(e){if(e===void 0&&(e=1),e<=0)return this;let r=e>1?this.flat(e-1):this;return new t(()=>({this:r.startFn()}),n=>{do{if(n.iterator){let s=n.iterator.next();if(s.done)n.iterator=void 0;else return s}let{done:a,value:i}=r.nextFn(n.this);if(!a)if(k_(i))n.iterator=i[Symbol.iterator]();else return{done:!1,value:i}}while(n.iterator);return as})}head(){let r=this.iterator().next();if(!r.done)return r.value}tail(e=1){return new t(()=>{let r=this.startFn();for(let n=0;n({size:0,state:this.startFn()}),r=>(r.size++,r.size>e?as:this.nextFn(r.state)))}distinct(e){return new t(()=>({set:new Set,internalState:this.startFn()}),r=>{let n;do if(n=this.nextFn(r.internalState),!n.done){let a=e?e(n.value):n.value;if(!r.set.has(a))return r.set.add(a),n}while(!n.done);return as})}exclude(e,r){let n=new Set;for(let a of e){let i=r?r(a):a;n.add(i)}return this.filter(a=>{let i=r?r(a):a;return!n.has(i)})}};$3=new Vo(()=>{},()=>as),as=Object.freeze({done:!0,value:void 0});kc=class extends Vo{constructor(e,r,n){super(()=>({iterators:n?.includeRoot?[[e][Symbol.iterator]()]:[r(e)[Symbol.iterator]()],pruned:!1}),a=>{for(a.pruned&&(a.iterators.pop(),a.pruned=!1);a.iterators.length>0;){let s=a.iterators[a.iterators.length-1].next();if(s.done)a.iterators.pop();else return a.iterators.push(r(s.value)[Symbol.iterator]()),s}return as})}iterator(){let e={state:this.startFn(),next:()=>this.nextFn(e.state),prune:()=>{e.state.pruned=!0},[Symbol.iterator]:()=>e};return e}};(function(t){function e(i){return i.reduce((s,o)=>s+o,0)}t.sum=e;function r(i){return i.reduce((s,o)=>s*o,0)}t.product=r;function n(i){return i.reduce((s,o)=>Math.min(s,o))}t.min=n;function a(i){return i.reduce((s,o)=>Math.max(s,o))}t.max=a})(vv||(vv={}))});var E_={};lr(E_,{DefaultNameRegexp:()=>T_,RangeComparison:()=>Tc,compareRange:()=>sge,findCommentNode:()=>aF,findDeclarationNodeAtOffset:()=>ont,findLeafNodeAtOffset:()=>iF,findLeafNodeBeforeOffset:()=>oge,flattenCst:()=>snt,getInteriorNodes:()=>cnt,getNextNode:()=>lnt,getPreviousNode:()=>uge,getStartlineNode:()=>unt,inRange:()=>nF,isChildNode:()=>rF,isCommentNode:()=>tF,streamCst:()=>um,toDocumentSegment:()=>cm,tokenToRange:()=>yv});function um(t){return new kc(t,e=>cu(e)?e.content:[],{includeRoot:!0})}function snt(t){return um(t).filter(Od)}function rF(t,e){for(;t.container;)if(t=t.container,t===e)return!0;return!1}function yv(t){return{start:{character:t.startColumn-1,line:t.startLine-1},end:{character:t.endColumn,line:t.endLine-1}}}function cm(t){if(!t)return;let{offset:e,end:r,range:n}=t;return{range:n,offset:e,end:r,length:r-e}}function sge(t,e){if(t.end.linee.end.line||t.start.line===e.end.line&&t.start.character>=e.end.character)return Tc.After;let r=t.start.line>e.start.line||t.start.line===e.start.line&&t.start.character>=e.start.character,n=t.end.lineTc.After}function ont(t,e,r=T_){if(t){if(e>0){let n=e-t.offset,a=t.text.charAt(n);r.test(a)||e--}return iF(t,e)}}function aF(t,e){if(t){let r=uge(t,!0);if(r&&tF(r,e))return r;if(z3(t)){let n=t.content.findIndex(a=>!a.hidden);for(let a=n-1;a>=0;a--){let i=t.content[a];if(tF(i,e))return i}}}}function tF(t,e){return Od(t)&&e.includes(t.tokenType.name)}function iF(t,e){if(Od(t))return t;if(cu(t)){let r=lge(t,e,!1);if(r)return iF(r,e)}}function oge(t,e){if(Od(t))return t;if(cu(t)){let r=lge(t,e,!0);if(r)return oge(r,e)}}function lge(t,e,r){let n=0,a=t.content.length-1,i;for(;n<=a;){let s=Math.floor((n+a)/2),o=t.content[s];if(o.offset<=e&&o.end>e)return o;o.end<=e?(i=r?o:void 0,n=s+1):a=s-1}return i}function uge(t,e=!0){for(;t.container;){let r=t.container,n=r.content.indexOf(t);for(;n>0;){n--;let a=r.content[n];if(e||!a.hidden)return a}t=r}}function lnt(t,e=!0){for(;t.container;){let r=t.container,n=r.content.indexOf(t),a=r.content.length-1;for(;n{hu();ho();(function(t){t[t.Before=0]="Before",t[t.After=1]="After",t[t.OverlapFront=2]="OverlapFront",t[t.OverlapBack=3]="OverlapBack",t[t.Inside=4]="Inside",t[t.Outside=5]="Outside"})(Tc||(Tc={}));T_=/^[\w\p{L}]$/u});function Ec(t){throw new Error("Error! The input value was not handled.")}var hm,C_=A(()=>{hm=class extends Error{constructor(e,r){super(e?`${r} at ${e.range.start.line}:${e.range.start.character}`:r)}}});var j3={};lr(j3,{AbstractElement:()=>wv,AbstractRule:()=>xv,AbstractType:()=>bv,Action:()=>$v,Alternatives:()=>Gv,ArrayLiteral:()=>kv,ArrayType:()=>Tv,Assignment:()=>Uv,BooleanLiteral:()=>Ev,CharacterRange:()=>qv,Condition:()=>G3,Conjunction:()=>Cv,CrossReference:()=>Vv,Disjunction:()=>Sv,EndOfFile:()=>Hv,Grammar:()=>_v,GrammarImport:()=>q3,Group:()=>Wv,InferredType:()=>Av,Interface:()=>Lv,Keyword:()=>Yv,LangiumGrammarAstReflection:()=>ny,LangiumGrammarTerminals:()=>fnt,NamedArgument:()=>V3,NegatedToken:()=>Xv,Negation:()=>Rv,NumberLiteral:()=>Iv,Parameter:()=>Dv,ParameterReference:()=>Nv,ParserRule:()=>Mv,ReferenceType:()=>Ov,RegexToken:()=>jv,ReturnType:()=>H3,RuleCall:()=>Kv,SimpleType:()=>Pv,StringLiteral:()=>Bv,TerminalAlternatives:()=>Zv,TerminalGroup:()=>Qv,TerminalRule:()=>fm,TerminalRuleCall:()=>Jv,Type:()=>Fv,TypeAttribute:()=>W3,TypeDefinition:()=>S_,UnionType:()=>zv,UnorderedGroup:()=>ey,UntilToken:()=>ty,ValueLiteral:()=>U3,Wildcard:()=>ry,isAbstractElement:()=>Y3,isAbstractRule:()=>dnt,isAbstractType:()=>pnt,isAction:()=>Yh,isAlternatives:()=>R_,isArrayLiteral:()=>xnt,isArrayType:()=>sF,isAssignment:()=>du,isBooleanLiteral:()=>oF,isCharacterRange:()=>mF,isCondition:()=>mnt,isConjunction:()=>lF,isCrossReference:()=>dm,isDisjunction:()=>uF,isEndOfFile:()=>gF,isFeatureName:()=>gnt,isGrammar:()=>bnt,isGrammarImport:()=>wnt,isGroup:()=>Pd,isInferredType:()=>__,isInterface:()=>A_,isKeyword:()=>bl,isNamedArgument:()=>knt,isNegatedToken:()=>vF,isNegation:()=>cF,isNumberLiteral:()=>Tnt,isParameter:()=>Ent,isParameterReference:()=>hF,isParserRule:()=>is,isPrimitiveType:()=>cge,isReferenceType:()=>fF,isRegexToken:()=>yF,isReturnType:()=>dF,isRuleCall:()=>pu,isSimpleType:()=>L_,isStringLiteral:()=>Cnt,isTerminalAlternatives:()=>xF,isTerminalGroup:()=>bF,isTerminalRule:()=>Ho,isTerminalRuleCall:()=>I_,isType:()=>X3,isTypeAttribute:()=>Snt,isTypeDefinition:()=>vnt,isUnionType:()=>pF,isUnorderedGroup:()=>D_,isUntilToken:()=>wF,isValueLiteral:()=>ynt,isWildcard:()=>kF,reflection:()=>nr});function dnt(t){return nr.isInstance(t,xv)}function pnt(t){return nr.isInstance(t,bv)}function mnt(t){return nr.isInstance(t,G3)}function gnt(t){return cge(t)||t==="current"||t==="entry"||t==="extends"||t==="false"||t==="fragment"||t==="grammar"||t==="hidden"||t==="import"||t==="interface"||t==="returns"||t==="terminal"||t==="true"||t==="type"||t==="infer"||t==="infers"||t==="with"||typeof t=="string"&&/\^?[_a-zA-Z][\w_]*/.test(t)}function cge(t){return t==="string"||t==="number"||t==="boolean"||t==="Date"||t==="bigint"}function vnt(t){return nr.isInstance(t,S_)}function ynt(t){return nr.isInstance(t,U3)}function Y3(t){return nr.isInstance(t,wv)}function xnt(t){return nr.isInstance(t,kv)}function sF(t){return nr.isInstance(t,Tv)}function oF(t){return nr.isInstance(t,Ev)}function lF(t){return nr.isInstance(t,Cv)}function uF(t){return nr.isInstance(t,Sv)}function bnt(t){return nr.isInstance(t,_v)}function wnt(t){return nr.isInstance(t,q3)}function __(t){return nr.isInstance(t,Av)}function A_(t){return nr.isInstance(t,Lv)}function knt(t){return nr.isInstance(t,V3)}function cF(t){return nr.isInstance(t,Rv)}function Tnt(t){return nr.isInstance(t,Iv)}function Ent(t){return nr.isInstance(t,Dv)}function hF(t){return nr.isInstance(t,Nv)}function is(t){return nr.isInstance(t,Mv)}function fF(t){return nr.isInstance(t,Ov)}function dF(t){return nr.isInstance(t,H3)}function L_(t){return nr.isInstance(t,Pv)}function Cnt(t){return nr.isInstance(t,Bv)}function Ho(t){return nr.isInstance(t,fm)}function X3(t){return nr.isInstance(t,Fv)}function Snt(t){return nr.isInstance(t,W3)}function pF(t){return nr.isInstance(t,zv)}function Yh(t){return nr.isInstance(t,$v)}function R_(t){return nr.isInstance(t,Gv)}function du(t){return nr.isInstance(t,Uv)}function mF(t){return nr.isInstance(t,qv)}function dm(t){return nr.isInstance(t,Vv)}function gF(t){return nr.isInstance(t,Hv)}function Pd(t){return nr.isInstance(t,Wv)}function bl(t){return nr.isInstance(t,Yv)}function vF(t){return nr.isInstance(t,Xv)}function yF(t){return nr.isInstance(t,jv)}function pu(t){return nr.isInstance(t,Kv)}function xF(t){return nr.isInstance(t,Zv)}function bF(t){return nr.isInstance(t,Qv)}function I_(t){return nr.isInstance(t,Jv)}function D_(t){return nr.isInstance(t,ey)}function wF(t){return nr.isInstance(t,ty)}function kF(t){return nr.isInstance(t,ry)}var fnt,xv,bv,G3,S_,U3,wv,kv,Tv,Ev,Cv,Sv,_v,q3,Av,Lv,V3,Rv,Iv,Dv,Nv,Mv,Ov,H3,Pv,Bv,fm,Fv,W3,zv,$v,Gv,Uv,qv,Vv,Hv,Wv,Yv,Xv,jv,Kv,Zv,Qv,Jv,ey,ty,ry,ny,nr,Cc=A(()=>{hu();fnt={ID:/\^?[_a-zA-Z][\w_]*/,STRING:/"(\\.|[^"\\])*"|'(\\.|[^'\\])*'/,NUMBER:/NaN|-?((\d*\.\d+|\d+)([Ee][+-]?\d+)?|Infinity)/,RegexLiteral:/\/(?![*+?])(?:[^\r\n\[/\\]|\\.|\[(?:[^\r\n\]\\]|\\.)*\])+\/[a-z]*/,WS:/\s+/,ML_COMMENT:/\/\*[\s\S]*?\*\//,SL_COMMENT:/\/\/[^\n\r]*/},xv="AbstractRule";bv="AbstractType";G3="Condition";S_="TypeDefinition";U3="ValueLiteral";wv="AbstractElement";kv="ArrayLiteral";Tv="ArrayType";Ev="BooleanLiteral";Cv="Conjunction";Sv="Disjunction";_v="Grammar";q3="GrammarImport";Av="InferredType";Lv="Interface";V3="NamedArgument";Rv="Negation";Iv="NumberLiteral";Dv="Parameter";Nv="ParameterReference";Mv="ParserRule";Ov="ReferenceType";H3="ReturnType";Pv="SimpleType";Bv="StringLiteral";fm="TerminalRule";Fv="Type";W3="TypeAttribute";zv="UnionType";$v="Action";Gv="Alternatives";Uv="Assignment";qv="CharacterRange";Vv="CrossReference";Hv="EndOfFile";Wv="Group";Yv="Keyword";Xv="NegatedToken";jv="RegexToken";Kv="RuleCall";Zv="TerminalAlternatives";Qv="TerminalGroup";Jv="TerminalRuleCall";ey="UnorderedGroup";ty="UntilToken";ry="Wildcard";ny=class extends om{getAllTypes(){return[wv,xv,bv,$v,Gv,kv,Tv,Uv,Ev,qv,G3,Cv,Vv,Sv,Hv,_v,q3,Wv,Av,Lv,Yv,V3,Xv,Rv,Iv,Dv,Nv,Mv,Ov,jv,H3,Kv,Pv,Bv,Zv,Qv,fm,Jv,Fv,W3,S_,zv,ey,ty,U3,ry]}computeIsSubtype(e,r){switch(e){case $v:case Gv:case Uv:case qv:case Vv:case Hv:case Wv:case Yv:case Xv:case jv:case Kv:case Zv:case Qv:case Jv:case ey:case ty:case ry:return this.isSubtype(wv,r);case kv:case Iv:case Bv:return this.isSubtype(U3,r);case Tv:case Ov:case Pv:case zv:return this.isSubtype(S_,r);case Ev:return this.isSubtype(G3,r)||this.isSubtype(U3,r);case Cv:case Sv:case Rv:case Nv:return this.isSubtype(G3,r);case Av:case Lv:case Fv:return this.isSubtype(bv,r);case Mv:return this.isSubtype(xv,r)||this.isSubtype(bv,r);case fm:return this.isSubtype(xv,r);default:return!1}}getReferenceType(e){let r=`${e.container.$type}:${e.property}`;switch(r){case"Action:type":case"CrossReference:type":case"Interface:superTypes":case"ParserRule:returnType":case"SimpleType:typeRef":return bv;case"Grammar:hiddenTokens":case"ParserRule:hiddenTokens":case"RuleCall:rule":return xv;case"Grammar:usedGrammars":return _v;case"NamedArgument:parameter":case"ParameterReference:parameter":return Dv;case"TerminalRuleCall:rule":return fm;default:throw new Error(`${r} is not a valid reference id.`)}}getTypeMetaData(e){switch(e){case wv:return{name:wv,properties:[{name:"cardinality"},{name:"lookahead"}]};case kv:return{name:kv,properties:[{name:"elements",defaultValue:[]}]};case Tv:return{name:Tv,properties:[{name:"elementType"}]};case Ev:return{name:Ev,properties:[{name:"true",defaultValue:!1}]};case Cv:return{name:Cv,properties:[{name:"left"},{name:"right"}]};case Sv:return{name:Sv,properties:[{name:"left"},{name:"right"}]};case _v:return{name:_v,properties:[{name:"definesHiddenTokens",defaultValue:!1},{name:"hiddenTokens",defaultValue:[]},{name:"imports",defaultValue:[]},{name:"interfaces",defaultValue:[]},{name:"isDeclared",defaultValue:!1},{name:"name"},{name:"rules",defaultValue:[]},{name:"types",defaultValue:[]},{name:"usedGrammars",defaultValue:[]}]};case q3:return{name:q3,properties:[{name:"path"}]};case Av:return{name:Av,properties:[{name:"name"}]};case Lv:return{name:Lv,properties:[{name:"attributes",defaultValue:[]},{name:"name"},{name:"superTypes",defaultValue:[]}]};case V3:return{name:V3,properties:[{name:"calledByName",defaultValue:!1},{name:"parameter"},{name:"value"}]};case Rv:return{name:Rv,properties:[{name:"value"}]};case Iv:return{name:Iv,properties:[{name:"value"}]};case Dv:return{name:Dv,properties:[{name:"name"}]};case Nv:return{name:Nv,properties:[{name:"parameter"}]};case Mv:return{name:Mv,properties:[{name:"dataType"},{name:"definesHiddenTokens",defaultValue:!1},{name:"definition"},{name:"entry",defaultValue:!1},{name:"fragment",defaultValue:!1},{name:"hiddenTokens",defaultValue:[]},{name:"inferredType"},{name:"name"},{name:"parameters",defaultValue:[]},{name:"returnType"},{name:"wildcard",defaultValue:!1}]};case Ov:return{name:Ov,properties:[{name:"referenceType"}]};case H3:return{name:H3,properties:[{name:"name"}]};case Pv:return{name:Pv,properties:[{name:"primitiveType"},{name:"stringType"},{name:"typeRef"}]};case Bv:return{name:Bv,properties:[{name:"value"}]};case fm:return{name:fm,properties:[{name:"definition"},{name:"fragment",defaultValue:!1},{name:"hidden",defaultValue:!1},{name:"name"},{name:"type"}]};case Fv:return{name:Fv,properties:[{name:"name"},{name:"type"}]};case W3:return{name:W3,properties:[{name:"defaultValue"},{name:"isOptional",defaultValue:!1},{name:"name"},{name:"type"}]};case zv:return{name:zv,properties:[{name:"types",defaultValue:[]}]};case $v:return{name:$v,properties:[{name:"cardinality"},{name:"feature"},{name:"inferredType"},{name:"lookahead"},{name:"operator"},{name:"type"}]};case Gv:return{name:Gv,properties:[{name:"cardinality"},{name:"elements",defaultValue:[]},{name:"lookahead"}]};case Uv:return{name:Uv,properties:[{name:"cardinality"},{name:"feature"},{name:"lookahead"},{name:"operator"},{name:"terminal"}]};case qv:return{name:qv,properties:[{name:"cardinality"},{name:"left"},{name:"lookahead"},{name:"right"}]};case Vv:return{name:Vv,properties:[{name:"cardinality"},{name:"deprecatedSyntax",defaultValue:!1},{name:"lookahead"},{name:"terminal"},{name:"type"}]};case Hv:return{name:Hv,properties:[{name:"cardinality"},{name:"lookahead"}]};case Wv:return{name:Wv,properties:[{name:"cardinality"},{name:"elements",defaultValue:[]},{name:"guardCondition"},{name:"lookahead"}]};case Yv:return{name:Yv,properties:[{name:"cardinality"},{name:"lookahead"},{name:"value"}]};case Xv:return{name:Xv,properties:[{name:"cardinality"},{name:"lookahead"},{name:"terminal"}]};case jv:return{name:jv,properties:[{name:"cardinality"},{name:"lookahead"},{name:"regex"}]};case Kv:return{name:Kv,properties:[{name:"arguments",defaultValue:[]},{name:"cardinality"},{name:"lookahead"},{name:"rule"}]};case Zv:return{name:Zv,properties:[{name:"cardinality"},{name:"elements",defaultValue:[]},{name:"lookahead"}]};case Qv:return{name:Qv,properties:[{name:"cardinality"},{name:"elements",defaultValue:[]},{name:"lookahead"}]};case Jv:return{name:Jv,properties:[{name:"cardinality"},{name:"lookahead"},{name:"rule"}]};case ey:return{name:ey,properties:[{name:"cardinality"},{name:"elements",defaultValue:[]},{name:"lookahead"}]};case ty:return{name:ty,properties:[{name:"cardinality"},{name:"lookahead"},{name:"terminal"}]};case ry:return{name:ry,properties:[{name:"cardinality"},{name:"lookahead"}]};default:return{name:e,properties:[]}}}},nr=new ny});var M_={};lr(M_,{assignMandatoryProperties:()=>CF,copyAstNode:()=>EF,findLocalReferences:()=>Ant,findRootNode:()=>K3,getContainerOfType:()=>pm,getDocument:()=>ss,hasContainerOfType:()=>_nt,linkContentToContainer:()=>N_,streamAllContents:()=>Sc,streamAst:()=>wl,streamContents:()=>Z3,streamReferences:()=>ay});function N_(t){for(let[e,r]of Object.entries(t))e.startsWith("$")||(Array.isArray(r)?r.forEach((n,a)=>{na(n)&&(n.$container=t,n.$containerProperty=e,n.$containerIndex=a)}):na(r)&&(r.$container=t,r.$containerProperty=e))}function pm(t,e){let r=t;for(;r;){if(e(r))return r;r=r.$container}}function _nt(t,e){let r=t;for(;r;){if(e(r))return!0;r=r.$container}return!1}function ss(t){let r=K3(t).$document;if(!r)throw new Error("AST node has no document.");return r}function K3(t){for(;t.$container;)t=t.$container;return t}function Z3(t,e){if(!t)throw new Error("Node must be an AstNode.");let r=e?.range;return new Vo(()=>({keys:Object.keys(t),keyIndex:0,arrayIndex:0}),n=>{for(;n.keyIndexZ3(r,e))}function wl(t,e){if(t){if(e?.range&&!TF(t,e.range))return new kc(t,()=>[])}else throw new Error("Root node must be an AstNode.");return new kc(t,r=>Z3(r,e),{includeRoot:!0})}function TF(t,e){var r;if(!e)return!0;let n=(r=t.$cstNode)===null||r===void 0?void 0:r.range;return n?nF(n,e):!1}function ay(t){return new Vo(()=>({keys:Object.keys(t),keyIndex:0,arrayIndex:0}),e=>{for(;e.keyIndex{ay(n).forEach(a=>{a.reference.ref===t&&r.push(a.reference)})}),Kr(r)}function CF(t,e){let r=t.getTypeMetaData(e.$type),n=e;for(let a of r.properties)a.defaultValue!==void 0&&n[a.name]===void 0&&(n[a.name]=hge(a.defaultValue))}function hge(t){return Array.isArray(t)?[...t.map(hge)]:t}function EF(t,e){let r={$type:t.$type};for(let[n,a]of Object.entries(t))if(!n.startsWith("$"))if(na(a))r[n]=EF(a,e);else if(Ui(a))r[n]=e(r,n,a.$refNode,a.$refText);else if(Array.isArray(a)){let i=[];for(let s of a)na(s)?i.push(EF(s,e)):Ui(s)?i.push(e(r,n,s.$refNode,s.$refText)):i.push(s);r[n]=i}else r[n]=a;return N_(r),r}var _s=A(()=>{hu();ho();fu()});function Zt(t){return t.charCodeAt(0)}function O_(t,e){Array.isArray(t)?t.forEach(function(r){e.push(r)}):e.push(t)}function iy(t,e){if(t[e]===!0)throw"duplicate flag "+e;let r=t[e];t[e]=!0}function mm(t){if(t===void 0)throw Error("Internal Error - Should never get here!");return!0}function Q3(){throw Error("Internal Error - Should never get here!")}function SF(t){return t.type==="Character"}var _F=A(()=>{});var J3,e5,AF,fge=A(()=>{_F();J3=[];for(let t=Zt("0");t<=Zt("9");t++)J3.push(t);e5=[Zt("_")].concat(J3);for(let t=Zt("a");t<=Zt("z");t++)e5.push(t);for(let t=Zt("A");t<=Zt("Z");t++)e5.push(t);AF=[Zt(" "),Zt("\f"),Zt(` -`),Zt("\r"),Zt(" "),Zt("\v"),Zt(" "),Zt("\xA0"),Zt("\u1680"),Zt("\u2000"),Zt("\u2001"),Zt("\u2002"),Zt("\u2003"),Zt("\u2004"),Zt("\u2005"),Zt("\u2006"),Zt("\u2007"),Zt("\u2008"),Zt("\u2009"),Zt("\u200A"),Zt("\u2028"),Zt("\u2029"),Zt("\u202F"),Zt("\u205F"),Zt("\u3000"),Zt("\uFEFF")]});var Lnt,P_,Rnt,gm,dge=A(()=>{_F();fge();Lnt=/[0-9a-fA-F]/,P_=/[0-9]/,Rnt=/[1-9]/,gm=class{constructor(){this.idx=0,this.input="",this.groupIdx=0}saveState(){return{idx:this.idx,input:this.input,groupIdx:this.groupIdx}}restoreState(e){this.idx=e.idx,this.input=e.input,this.groupIdx=e.groupIdx}pattern(e){this.idx=0,this.input=e,this.groupIdx=0,this.consumeChar("/");let r=this.disjunction();this.consumeChar("/");let n={type:"Flags",loc:{begin:this.idx,end:e.length},global:!1,ignoreCase:!1,multiLine:!1,unicode:!1,sticky:!1};for(;this.isRegExpFlag();)switch(this.popChar()){case"g":iy(n,"global");break;case"i":iy(n,"ignoreCase");break;case"m":iy(n,"multiLine");break;case"u":iy(n,"unicode");break;case"y":iy(n,"sticky");break}if(this.idx!==this.input.length)throw Error("Redundant input: "+this.input.substring(this.idx));return{type:"Pattern",flags:n,value:r,loc:this.loc(0)}}disjunction(){let e=[],r=this.idx;for(e.push(this.alternative());this.peekChar()==="|";)this.consumeChar("|"),e.push(this.alternative());return{type:"Disjunction",value:e,loc:this.loc(r)}}alternative(){let e=[],r=this.idx;for(;this.isTerm();)e.push(this.term());return{type:"Alternative",value:e,loc:this.loc(r)}}term(){return this.isAssertion()?this.assertion():this.atom()}assertion(){let e=this.idx;switch(this.popChar()){case"^":return{type:"StartAnchor",loc:this.loc(e)};case"$":return{type:"EndAnchor",loc:this.loc(e)};case"\\":switch(this.popChar()){case"b":return{type:"WordBoundary",loc:this.loc(e)};case"B":return{type:"NonWordBoundary",loc:this.loc(e)}}throw Error("Invalid Assertion Escape");case"(":this.consumeChar("?");let r;switch(this.popChar()){case"=":r="Lookahead";break;case"!":r="NegativeLookahead";break}mm(r);let n=this.disjunction();return this.consumeChar(")"),{type:r,value:n,loc:this.loc(e)}}return Q3()}quantifier(e=!1){let r,n=this.idx;switch(this.popChar()){case"*":r={atLeast:0,atMost:1/0};break;case"+":r={atLeast:1,atMost:1/0};break;case"?":r={atLeast:0,atMost:1};break;case"{":let a=this.integerIncludingZero();switch(this.popChar()){case"}":r={atLeast:a,atMost:a};break;case",":let i;this.isDigit()?(i=this.integerIncludingZero(),r={atLeast:a,atMost:i}):r={atLeast:a,atMost:1/0},this.consumeChar("}");break}if(e===!0&&r===void 0)return;mm(r);break}if(!(e===!0&&r===void 0)&&mm(r))return this.peekChar(0)==="?"?(this.consumeChar("?"),r.greedy=!1):r.greedy=!0,r.type="Quantifier",r.loc=this.loc(n),r}atom(){let e,r=this.idx;switch(this.peekChar()){case".":e=this.dotAll();break;case"\\":e=this.atomEscape();break;case"[":e=this.characterClass();break;case"(":e=this.group();break}return e===void 0&&this.isPatternCharacter()&&(e=this.patternCharacter()),mm(e)?(e.loc=this.loc(r),this.isQuantifier()&&(e.quantifier=this.quantifier()),e):Q3()}dotAll(){return this.consumeChar("."),{type:"Set",complement:!0,value:[Zt(` -`),Zt("\r"),Zt("\u2028"),Zt("\u2029")]}}atomEscape(){switch(this.consumeChar("\\"),this.peekChar()){case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":return this.decimalEscapeAtom();case"d":case"D":case"s":case"S":case"w":case"W":return this.characterClassEscape();case"f":case"n":case"r":case"t":case"v":return this.controlEscapeAtom();case"c":return this.controlLetterEscapeAtom();case"0":return this.nulCharacterAtom();case"x":return this.hexEscapeSequenceAtom();case"u":return this.regExpUnicodeEscapeSequenceAtom();default:return this.identityEscapeAtom()}}decimalEscapeAtom(){return{type:"GroupBackReference",value:this.positiveInteger()}}characterClassEscape(){let e,r=!1;switch(this.popChar()){case"d":e=J3;break;case"D":e=J3,r=!0;break;case"s":e=AF;break;case"S":e=AF,r=!0;break;case"w":e=e5;break;case"W":e=e5,r=!0;break}return mm(e)?{type:"Set",value:e,complement:r}:Q3()}controlEscapeAtom(){let e;switch(this.popChar()){case"f":e=Zt("\f");break;case"n":e=Zt(` -`);break;case"r":e=Zt("\r");break;case"t":e=Zt(" ");break;case"v":e=Zt("\v");break}return mm(e)?{type:"Character",value:e}:Q3()}controlLetterEscapeAtom(){this.consumeChar("c");let e=this.popChar();if(/[a-zA-Z]/.test(e)===!1)throw Error("Invalid ");return{type:"Character",value:e.toUpperCase().charCodeAt(0)-64}}nulCharacterAtom(){return this.consumeChar("0"),{type:"Character",value:Zt("\0")}}hexEscapeSequenceAtom(){return this.consumeChar("x"),this.parseHexDigits(2)}regExpUnicodeEscapeSequenceAtom(){return this.consumeChar("u"),this.parseHexDigits(4)}identityEscapeAtom(){let e=this.popChar();return{type:"Character",value:Zt(e)}}classPatternCharacterAtom(){switch(this.peekChar()){case` -`:case"\r":case"\u2028":case"\u2029":case"\\":case"]":throw Error("TBD");default:let e=this.popChar();return{type:"Character",value:Zt(e)}}}characterClass(){let e=[],r=!1;for(this.consumeChar("["),this.peekChar(0)==="^"&&(this.consumeChar("^"),r=!0);this.isClassAtom();){let n=this.classAtom(),a=n.type==="Character";if(SF(n)&&this.isRangeDash()){this.consumeChar("-");let i=this.classAtom(),s=i.type==="Character";if(SF(i)){if(i.value{Nr();b(lc,"populateCommonDb")});var Ay,Ly,tC=D(()=>{Nr();Ly=(Ay=class{constructor(e){this.init=e,this.records=this.init()}reset(){this.records=this.init()}},b(Ay,"ImperativeState"),Ay)});function qi(t){return typeof t=="object"&&t!==null&&typeof t.$type=="string"}function Is(t){return typeof t=="object"&&t!==null&&typeof t.$refText=="string"}function f$(t){return typeof t=="object"&&t!==null&&typeof t.name=="string"&&typeof t.type=="string"&&typeof t.path=="string"}function ym(t){return typeof t=="object"&&t!==null&&qi(t.container)&&Is(t.reference)&&typeof t.message=="string"}function uc(t){return typeof t=="object"&&t!==null&&Array.isArray(t.content)}function Ud(t){return typeof t=="object"&&t!==null&&typeof t.tokenType=="object"}function r6(t){return uc(t)&&typeof t.fullText=="string"}var gm,cc=D(()=>{gm=class{constructor(){this.subtypes={},this.allSubtypes={}}isInstance(e,r){return qi(e)&&this.isSubtype(e.$type,r)}isSubtype(e,r){if(e===r)return!0;let n=this.subtypes[e];n||(n=this.subtypes[e]={});let i=n[r];if(i!==void 0)return i;{let a=this.computeIsSubtype(e,r);return n[r]=a,a}}getAllSubTypes(e){let r=this.allSubtypes[e];if(r)return r;{let n=this.getAllTypes(),i=[];for(let a of n)this.isSubtype(a,e)&&i.push(a);return this.allSubtypes[e]=i,i}}}});function Pot(t){return typeof t=="string"?t:typeof t>"u"?"undefined":typeof t.toString=="function"?t.toString():Object.prototype.toString.call(t)}function rC(t){return!!t&&typeof t[Symbol.iterator]=="function"}function An(...t){if(t.length===1){let e=t[0];if(e instanceof Fl)return e;if(rC(e))return new Fl(()=>e[Symbol.iterator](),r=>r.next());if(typeof e.length=="number")return new Fl(()=>({index:0}),r=>r.index1?new Fl(()=>({collIndex:0,arrIndex:0}),e=>{do{if(e.iterator){let r=e.iterator.next();if(!r.done)return r;e.iterator=void 0}if(e.array){if(e.arrIndex{Fl=class t{constructor(e,r){this.startFn=e,this.nextFn=r}iterator(){let e={state:this.startFn(),next:()=>this.nextFn(e.state),[Symbol.iterator]:()=>e};return e}[Symbol.iterator](){return this.iterator()}isEmpty(){return!!this.iterator().next().done}count(){let e=this.iterator(),r=0,n=e.next();for(;!n.done;)r++,n=e.next();return r}toArray(){let e=[],r=this.iterator(),n;do n=r.next(),n.value!==void 0&&e.push(n.value);while(!n.done);return e}toSet(){return new Set(this)}toMap(e,r){let n=this.map(i=>[e?e(i):i,r?r(i):i]);return new Map(n)}toString(){return this.join()}concat(e){return new t(()=>({first:this.startFn(),firstDone:!1,iterator:e[Symbol.iterator]()}),r=>{let n;if(!r.firstDone){do if(n=this.nextFn(r.first),!n.done)return n;while(!n.done);r.firstDone=!0}do if(n=r.iterator.next(),!n.done)return n;while(!n.done);return Ws})}join(e=","){let r=this.iterator(),n="",i,a=!1;do i=r.next(),i.done||(a&&(n+=e),n+=Pot(i.value)),a=!0;while(!i.done);return n}indexOf(e,r=0){let n=this.iterator(),i=0,a=n.next();for(;!a.done;){if(i>=r&&a.value===e)return i;a=n.next(),i++}return-1}every(e){let r=this.iterator(),n=r.next();for(;!n.done;){if(!e(n.value))return!1;n=r.next()}return!0}some(e){let r=this.iterator(),n=r.next();for(;!n.done;){if(e(n.value))return!0;n=r.next()}return!1}forEach(e){let r=this.iterator(),n=0,i=r.next();for(;!i.done;)e(i.value,n),i=r.next(),n++}map(e){return new t(this.startFn,r=>{let{done:n,value:i}=this.nextFn(r);return n?Ws:{done:!1,value:e(i)}})}filter(e){return new t(this.startFn,r=>{let n;do if(n=this.nextFn(r),!n.done&&e(n.value))return n;while(!n.done);return Ws})}nonNullable(){return this.filter(e=>e!=null)}reduce(e,r){let n=this.iterator(),i=r,a=n.next();for(;!a.done;)i===void 0?i=a.value:i=e(i,a.value),a=n.next();return i}reduceRight(e,r){return this.recursiveReduce(this.iterator(),e,r)}recursiveReduce(e,r,n){let i=e.next();if(i.done)return n;let a=this.recursiveReduce(e,r,n);return a===void 0?i.value:r(a,i.value)}find(e){let r=this.iterator(),n=r.next();for(;!n.done;){if(e(n.value))return n.value;n=r.next()}}findIndex(e){let r=this.iterator(),n=0,i=r.next();for(;!i.done;){if(e(i.value))return n;i=r.next(),n++}return-1}includes(e){let r=this.iterator(),n=r.next();for(;!n.done;){if(n.value===e)return!0;n=r.next()}return!1}flatMap(e){return new t(()=>({this:this.startFn()}),r=>{do{if(r.iterator){let a=r.iterator.next();if(a.done)r.iterator=void 0;else return a}let{done:n,value:i}=this.nextFn(r.this);if(!n){let a=e(i);if(rC(a))r.iterator=a[Symbol.iterator]();else return{done:!1,value:a}}}while(r.iterator);return Ws})}flat(e){if(e===void 0&&(e=1),e<=0)return this;let r=e>1?this.flat(e-1):this;return new t(()=>({this:r.startFn()}),n=>{do{if(n.iterator){let s=n.iterator.next();if(s.done)n.iterator=void 0;else return s}let{done:i,value:a}=r.nextFn(n.this);if(!i)if(rC(a))n.iterator=a[Symbol.iterator]();else return{done:!1,value:a}}while(n.iterator);return Ws})}head(){let r=this.iterator().next();if(!r.done)return r.value}tail(e=1){return new t(()=>{let r=this.startFn();for(let n=0;n({size:0,state:this.startFn()}),r=>(r.size++,r.size>e?Ws:this.nextFn(r.state)))}distinct(e){return new t(()=>({set:new Set,internalState:this.startFn()}),r=>{let n;do if(n=this.nextFn(r.internalState),!n.done){let i=e?e(n.value):n.value;if(!r.set.has(i))return r.set.add(i),n}while(!n.done);return Ws})}exclude(e,r){let n=new Set;for(let i of e){let a=r?r(i):i;n.add(a)}return this.filter(i=>{let a=r?r(i):i;return!n.has(a)})}};n6=new Fl(()=>{},()=>Ws),Ws=Object.freeze({done:!0,value:void 0});S0=class extends Fl{constructor(e,r,n){super(()=>({iterators:n?.includeRoot?[[e][Symbol.iterator]()]:[r(e)[Symbol.iterator]()],pruned:!1}),i=>{for(i.pruned&&(i.iterators.pop(),i.pruned=!1);i.iterators.length>0;){let s=i.iterators[i.iterators.length-1].next();if(s.done)i.iterators.pop();else return i.iterators.push(r(s.value)[Symbol.iterator]()),s}return Ws})}iterator(){let e={state:this.startFn(),next:()=>this.nextFn(e.state),prune:()=>{e.state.pruned=!0},[Symbol.iterator]:()=>e};return e}};(function(t){function e(a){return a.reduce((s,o)=>s+o,0)}t.sum=e;function r(a){return a.reduce((s,o)=>s*o,0)}t.product=r;function n(a){return a.reduce((s,o)=>Math.min(s,o))}t.min=n;function i(a){return a.reduce((s,o)=>Math.max(s,o))}t.max=i})(Ry||(Ry={}))});var iC={};Mr(iC,{DefaultNameRegexp:()=>nC,RangeComparison:()=>C0,compareRange:()=>Iye,findCommentNode:()=>g$,findDeclarationNodeAtOffset:()=>Fot,findLeafNodeAtOffset:()=>y$,findLeafNodeBeforeOffset:()=>Mye,flattenCst:()=>Bot,getInteriorNodes:()=>Got,getNextNode:()=>zot,getPreviousNode:()=>Oye,getStartlineNode:()=>$ot,inRange:()=>m$,isChildNode:()=>p$,isCommentNode:()=>d$,streamCst:()=>vm,toDocumentSegment:()=>xm,tokenToRange:()=>Dy});function vm(t){return new S0(t,e=>uc(e)?e.content:[],{includeRoot:!0})}function Bot(t){return vm(t).filter(Ud)}function p$(t,e){for(;t.container;)if(t=t.container,t===e)return!0;return!1}function Dy(t){return{start:{character:t.startColumn-1,line:t.startLine-1},end:{character:t.endColumn,line:t.endLine-1}}}function xm(t){if(!t)return;let{offset:e,end:r,range:n}=t;return{range:n,offset:e,end:r,length:r-e}}function Iye(t,e){if(t.end.linee.end.line||t.start.line===e.end.line&&t.start.character>=e.end.character)return C0.After;let r=t.start.line>e.start.line||t.start.line===e.start.line&&t.start.character>=e.start.character,n=t.end.lineC0.After}function Fot(t,e,r=nC){if(t){if(e>0){let n=e-t.offset,i=t.text.charAt(n);r.test(i)||e--}return y$(t,e)}}function g$(t,e){if(t){let r=Oye(t,!0);if(r&&d$(r,e))return r;if(r6(t)){let n=t.content.findIndex(i=>!i.hidden);for(let i=n-1;i>=0;i--){let a=t.content[i];if(d$(a,e))return a}}}}function d$(t,e){return Ud(t)&&e.includes(t.tokenType.name)}function y$(t,e){if(Ud(t))return t;if(uc(t)){let r=Nye(t,e,!1);if(r)return y$(r,e)}}function Mye(t,e){if(Ud(t))return t;if(uc(t)){let r=Nye(t,e,!0);if(r)return Mye(r,e)}}function Nye(t,e,r){let n=0,i=t.content.length-1,a;for(;n<=i;){let s=Math.floor((n+i)/2),o=t.content[s];if(o.offset<=e&&o.end>e)return o;o.end<=e?(a=r?o:void 0,n=s+1):i=s-1}return a}function Oye(t,e=!0){for(;t.container;){let r=t.container,n=r.content.indexOf(t);for(;n>0;){n--;let i=r.content[n];if(e||!i.hidden)return i}t=r}}function zot(t,e=!0){for(;t.container;){let r=t.container,n=r.content.indexOf(t),i=r.content.length-1;for(;n{cc();nl();(function(t){t[t.Before=0]="Before",t[t.After=1]="After",t[t.OverlapFront=2]="OverlapFront",t[t.OverlapBack=3]="OverlapBack",t[t.Inside=4]="Inside",t[t.Outside=5]="Outside"})(C0||(C0={}));nC=/^[\w\p{L}]$/u});function _0(t){throw new Error("Error! The input value was not handled.")}var bm,aC=D(()=>{bm=class extends Error{constructor(e,r){super(e?`${r} at ${e.range.start.line}:${e.range.start.character}`:r)}}});var f6={};Mr(f6,{AbstractElement:()=>Ny,AbstractRule:()=>Iy,AbstractType:()=>My,Action:()=>Jy,Alternatives:()=>ev,ArrayLiteral:()=>Oy,ArrayType:()=>Py,Assignment:()=>tv,BooleanLiteral:()=>By,CharacterRange:()=>rv,Condition:()=>i6,Conjunction:()=>Fy,CrossReference:()=>nv,Disjunction:()=>zy,EndOfFile:()=>iv,Grammar:()=>$y,GrammarImport:()=>s6,Group:()=>av,InferredType:()=>Gy,Interface:()=>qy,Keyword:()=>sv,LangiumGrammarAstReflection:()=>gv,LangiumGrammarTerminals:()=>Uot,NamedArgument:()=>o6,NegatedToken:()=>ov,Negation:()=>Uy,NumberLiteral:()=>Hy,Parameter:()=>Vy,ParameterReference:()=>Wy,ParserRule:()=>Yy,ReferenceType:()=>Xy,RegexToken:()=>lv,ReturnType:()=>l6,RuleCall:()=>uv,SimpleType:()=>jy,StringLiteral:()=>Ky,TerminalAlternatives:()=>cv,TerminalGroup:()=>hv,TerminalRule:()=>wm,TerminalRuleCall:()=>fv,Type:()=>Zy,TypeAttribute:()=>u6,TypeDefinition:()=>sC,UnionType:()=>Qy,UnorderedGroup:()=>dv,UntilToken:()=>pv,ValueLiteral:()=>a6,Wildcard:()=>mv,isAbstractElement:()=>c6,isAbstractRule:()=>Hot,isAbstractType:()=>Vot,isAction:()=>Qh,isAlternatives:()=>cC,isArrayLiteral:()=>Kot,isArrayType:()=>v$,isAssignment:()=>fc,isBooleanLiteral:()=>x$,isCharacterRange:()=>_$,isCondition:()=>Wot,isConjunction:()=>b$,isCrossReference:()=>km,isDisjunction:()=>w$,isEndOfFile:()=>A$,isFeatureName:()=>Yot,isGrammar:()=>Zot,isGrammarImport:()=>Qot,isGroup:()=>Hd,isInferredType:()=>oC,isInterface:()=>lC,isKeyword:()=>vu,isNamedArgument:()=>Jot,isNegatedToken:()=>L$,isNegation:()=>k$,isNumberLiteral:()=>elt,isParameter:()=>tlt,isParameterReference:()=>T$,isParserRule:()=>Ys,isPrimitiveType:()=>Pye,isReferenceType:()=>E$,isRegexToken:()=>R$,isReturnType:()=>S$,isRuleCall:()=>dc,isSimpleType:()=>uC,isStringLiteral:()=>rlt,isTerminalAlternatives:()=>D$,isTerminalGroup:()=>I$,isTerminalRule:()=>zl,isTerminalRuleCall:()=>hC,isType:()=>h6,isTypeAttribute:()=>nlt,isTypeDefinition:()=>Xot,isUnionType:()=>C$,isUnorderedGroup:()=>fC,isUntilToken:()=>M$,isValueLiteral:()=>jot,isWildcard:()=>N$,reflection:()=>Ar});function Hot(t){return Ar.isInstance(t,Iy)}function Vot(t){return Ar.isInstance(t,My)}function Wot(t){return Ar.isInstance(t,i6)}function Yot(t){return Pye(t)||t==="current"||t==="entry"||t==="extends"||t==="false"||t==="fragment"||t==="grammar"||t==="hidden"||t==="import"||t==="interface"||t==="returns"||t==="terminal"||t==="true"||t==="type"||t==="infer"||t==="infers"||t==="with"||typeof t=="string"&&/\^?[_a-zA-Z][\w_]*/.test(t)}function Pye(t){return t==="string"||t==="number"||t==="boolean"||t==="Date"||t==="bigint"}function Xot(t){return Ar.isInstance(t,sC)}function jot(t){return Ar.isInstance(t,a6)}function c6(t){return Ar.isInstance(t,Ny)}function Kot(t){return Ar.isInstance(t,Oy)}function v$(t){return Ar.isInstance(t,Py)}function x$(t){return Ar.isInstance(t,By)}function b$(t){return Ar.isInstance(t,Fy)}function w$(t){return Ar.isInstance(t,zy)}function Zot(t){return Ar.isInstance(t,$y)}function Qot(t){return Ar.isInstance(t,s6)}function oC(t){return Ar.isInstance(t,Gy)}function lC(t){return Ar.isInstance(t,qy)}function Jot(t){return Ar.isInstance(t,o6)}function k$(t){return Ar.isInstance(t,Uy)}function elt(t){return Ar.isInstance(t,Hy)}function tlt(t){return Ar.isInstance(t,Vy)}function T$(t){return Ar.isInstance(t,Wy)}function Ys(t){return Ar.isInstance(t,Yy)}function E$(t){return Ar.isInstance(t,Xy)}function S$(t){return Ar.isInstance(t,l6)}function uC(t){return Ar.isInstance(t,jy)}function rlt(t){return Ar.isInstance(t,Ky)}function zl(t){return Ar.isInstance(t,wm)}function h6(t){return Ar.isInstance(t,Zy)}function nlt(t){return Ar.isInstance(t,u6)}function C$(t){return Ar.isInstance(t,Qy)}function Qh(t){return Ar.isInstance(t,Jy)}function cC(t){return Ar.isInstance(t,ev)}function fc(t){return Ar.isInstance(t,tv)}function _$(t){return Ar.isInstance(t,rv)}function km(t){return Ar.isInstance(t,nv)}function A$(t){return Ar.isInstance(t,iv)}function Hd(t){return Ar.isInstance(t,av)}function vu(t){return Ar.isInstance(t,sv)}function L$(t){return Ar.isInstance(t,ov)}function R$(t){return Ar.isInstance(t,lv)}function dc(t){return Ar.isInstance(t,uv)}function D$(t){return Ar.isInstance(t,cv)}function I$(t){return Ar.isInstance(t,hv)}function hC(t){return Ar.isInstance(t,fv)}function fC(t){return Ar.isInstance(t,dv)}function M$(t){return Ar.isInstance(t,pv)}function N$(t){return Ar.isInstance(t,mv)}var Uot,Iy,My,i6,sC,a6,Ny,Oy,Py,By,Fy,zy,$y,s6,Gy,qy,o6,Uy,Hy,Vy,Wy,Yy,Xy,l6,jy,Ky,wm,Zy,u6,Qy,Jy,ev,tv,rv,nv,iv,av,sv,ov,lv,uv,cv,hv,fv,dv,pv,mv,gv,Ar,A0=D(()=>{cc();Uot={ID:/\^?[_a-zA-Z][\w_]*/,STRING:/"(\\.|[^"\\])*"|'(\\.|[^'\\])*'/,NUMBER:/NaN|-?((\d*\.\d+|\d+)([Ee][+-]?\d+)?|Infinity)/,RegexLiteral:/\/(?![*+?])(?:[^\r\n\[/\\]|\\.|\[(?:[^\r\n\]\\]|\\.)*\])+\/[a-z]*/,WS:/\s+/,ML_COMMENT:/\/\*[\s\S]*?\*\//,SL_COMMENT:/\/\/[^\n\r]*/},Iy="AbstractRule";My="AbstractType";i6="Condition";sC="TypeDefinition";a6="ValueLiteral";Ny="AbstractElement";Oy="ArrayLiteral";Py="ArrayType";By="BooleanLiteral";Fy="Conjunction";zy="Disjunction";$y="Grammar";s6="GrammarImport";Gy="InferredType";qy="Interface";o6="NamedArgument";Uy="Negation";Hy="NumberLiteral";Vy="Parameter";Wy="ParameterReference";Yy="ParserRule";Xy="ReferenceType";l6="ReturnType";jy="SimpleType";Ky="StringLiteral";wm="TerminalRule";Zy="Type";u6="TypeAttribute";Qy="UnionType";Jy="Action";ev="Alternatives";tv="Assignment";rv="CharacterRange";nv="CrossReference";iv="EndOfFile";av="Group";sv="Keyword";ov="NegatedToken";lv="RegexToken";uv="RuleCall";cv="TerminalAlternatives";hv="TerminalGroup";fv="TerminalRuleCall";dv="UnorderedGroup";pv="UntilToken";mv="Wildcard";gv=class extends gm{getAllTypes(){return[Ny,Iy,My,Jy,ev,Oy,Py,tv,By,rv,i6,Fy,nv,zy,iv,$y,s6,av,Gy,qy,sv,o6,ov,Uy,Hy,Vy,Wy,Yy,Xy,lv,l6,uv,jy,Ky,cv,hv,wm,fv,Zy,u6,sC,Qy,dv,pv,a6,mv]}computeIsSubtype(e,r){switch(e){case Jy:case ev:case tv:case rv:case nv:case iv:case av:case sv:case ov:case lv:case uv:case cv:case hv:case fv:case dv:case pv:case mv:return this.isSubtype(Ny,r);case Oy:case Hy:case Ky:return this.isSubtype(a6,r);case Py:case Xy:case jy:case Qy:return this.isSubtype(sC,r);case By:return this.isSubtype(i6,r)||this.isSubtype(a6,r);case Fy:case zy:case Uy:case Wy:return this.isSubtype(i6,r);case Gy:case qy:case Zy:return this.isSubtype(My,r);case Yy:return this.isSubtype(Iy,r)||this.isSubtype(My,r);case wm:return this.isSubtype(Iy,r);default:return!1}}getReferenceType(e){let r=`${e.container.$type}:${e.property}`;switch(r){case"Action:type":case"CrossReference:type":case"Interface:superTypes":case"ParserRule:returnType":case"SimpleType:typeRef":return My;case"Grammar:hiddenTokens":case"ParserRule:hiddenTokens":case"RuleCall:rule":return Iy;case"Grammar:usedGrammars":return $y;case"NamedArgument:parameter":case"ParameterReference:parameter":return Vy;case"TerminalRuleCall:rule":return wm;default:throw new Error(`${r} is not a valid reference id.`)}}getTypeMetaData(e){switch(e){case Ny:return{name:Ny,properties:[{name:"cardinality"},{name:"lookahead"}]};case Oy:return{name:Oy,properties:[{name:"elements",defaultValue:[]}]};case Py:return{name:Py,properties:[{name:"elementType"}]};case By:return{name:By,properties:[{name:"true",defaultValue:!1}]};case Fy:return{name:Fy,properties:[{name:"left"},{name:"right"}]};case zy:return{name:zy,properties:[{name:"left"},{name:"right"}]};case $y:return{name:$y,properties:[{name:"definesHiddenTokens",defaultValue:!1},{name:"hiddenTokens",defaultValue:[]},{name:"imports",defaultValue:[]},{name:"interfaces",defaultValue:[]},{name:"isDeclared",defaultValue:!1},{name:"name"},{name:"rules",defaultValue:[]},{name:"types",defaultValue:[]},{name:"usedGrammars",defaultValue:[]}]};case s6:return{name:s6,properties:[{name:"path"}]};case Gy:return{name:Gy,properties:[{name:"name"}]};case qy:return{name:qy,properties:[{name:"attributes",defaultValue:[]},{name:"name"},{name:"superTypes",defaultValue:[]}]};case o6:return{name:o6,properties:[{name:"calledByName",defaultValue:!1},{name:"parameter"},{name:"value"}]};case Uy:return{name:Uy,properties:[{name:"value"}]};case Hy:return{name:Hy,properties:[{name:"value"}]};case Vy:return{name:Vy,properties:[{name:"name"}]};case Wy:return{name:Wy,properties:[{name:"parameter"}]};case Yy:return{name:Yy,properties:[{name:"dataType"},{name:"definesHiddenTokens",defaultValue:!1},{name:"definition"},{name:"entry",defaultValue:!1},{name:"fragment",defaultValue:!1},{name:"hiddenTokens",defaultValue:[]},{name:"inferredType"},{name:"name"},{name:"parameters",defaultValue:[]},{name:"returnType"},{name:"wildcard",defaultValue:!1}]};case Xy:return{name:Xy,properties:[{name:"referenceType"}]};case l6:return{name:l6,properties:[{name:"name"}]};case jy:return{name:jy,properties:[{name:"primitiveType"},{name:"stringType"},{name:"typeRef"}]};case Ky:return{name:Ky,properties:[{name:"value"}]};case wm:return{name:wm,properties:[{name:"definition"},{name:"fragment",defaultValue:!1},{name:"hidden",defaultValue:!1},{name:"name"},{name:"type"}]};case Zy:return{name:Zy,properties:[{name:"name"},{name:"type"}]};case u6:return{name:u6,properties:[{name:"defaultValue"},{name:"isOptional",defaultValue:!1},{name:"name"},{name:"type"}]};case Qy:return{name:Qy,properties:[{name:"types",defaultValue:[]}]};case Jy:return{name:Jy,properties:[{name:"cardinality"},{name:"feature"},{name:"inferredType"},{name:"lookahead"},{name:"operator"},{name:"type"}]};case ev:return{name:ev,properties:[{name:"cardinality"},{name:"elements",defaultValue:[]},{name:"lookahead"}]};case tv:return{name:tv,properties:[{name:"cardinality"},{name:"feature"},{name:"lookahead"},{name:"operator"},{name:"terminal"}]};case rv:return{name:rv,properties:[{name:"cardinality"},{name:"left"},{name:"lookahead"},{name:"right"}]};case nv:return{name:nv,properties:[{name:"cardinality"},{name:"deprecatedSyntax",defaultValue:!1},{name:"lookahead"},{name:"terminal"},{name:"type"}]};case iv:return{name:iv,properties:[{name:"cardinality"},{name:"lookahead"}]};case av:return{name:av,properties:[{name:"cardinality"},{name:"elements",defaultValue:[]},{name:"guardCondition"},{name:"lookahead"}]};case sv:return{name:sv,properties:[{name:"cardinality"},{name:"lookahead"},{name:"value"}]};case ov:return{name:ov,properties:[{name:"cardinality"},{name:"lookahead"},{name:"terminal"}]};case lv:return{name:lv,properties:[{name:"cardinality"},{name:"lookahead"},{name:"regex"}]};case uv:return{name:uv,properties:[{name:"arguments",defaultValue:[]},{name:"cardinality"},{name:"lookahead"},{name:"rule"}]};case cv:return{name:cv,properties:[{name:"cardinality"},{name:"elements",defaultValue:[]},{name:"lookahead"}]};case hv:return{name:hv,properties:[{name:"cardinality"},{name:"elements",defaultValue:[]},{name:"lookahead"}]};case fv:return{name:fv,properties:[{name:"cardinality"},{name:"lookahead"},{name:"rule"}]};case dv:return{name:dv,properties:[{name:"cardinality"},{name:"elements",defaultValue:[]},{name:"lookahead"}]};case pv:return{name:pv,properties:[{name:"cardinality"},{name:"lookahead"},{name:"terminal"}]};case mv:return{name:mv,properties:[{name:"cardinality"},{name:"lookahead"}]};default:return{name:e,properties:[]}}}},Ar=new gv});var pC={};Mr(pC,{assignMandatoryProperties:()=>B$,copyAstNode:()=>P$,findLocalReferences:()=>alt,findRootNode:()=>d6,getContainerOfType:()=>Tm,getDocument:()=>Xs,hasContainerOfType:()=>ilt,linkContentToContainer:()=>dC,streamAllContents:()=>L0,streamAst:()=>xu,streamContents:()=>p6,streamReferences:()=>yv});function dC(t){for(let[e,r]of Object.entries(t))e.startsWith("$")||(Array.isArray(r)?r.forEach((n,i)=>{qi(n)&&(n.$container=t,n.$containerProperty=e,n.$containerIndex=i)}):qi(r)&&(r.$container=t,r.$containerProperty=e))}function Tm(t,e){let r=t;for(;r;){if(e(r))return r;r=r.$container}}function ilt(t,e){let r=t;for(;r;){if(e(r))return!0;r=r.$container}return!1}function Xs(t){let r=d6(t).$document;if(!r)throw new Error("AST node has no document.");return r}function d6(t){for(;t.$container;)t=t.$container;return t}function p6(t,e){if(!t)throw new Error("Node must be an AstNode.");let r=e?.range;return new Fl(()=>({keys:Object.keys(t),keyIndex:0,arrayIndex:0}),n=>{for(;n.keyIndexp6(r,e))}function xu(t,e){if(t){if(e?.range&&!O$(t,e.range))return new S0(t,()=>[])}else throw new Error("Root node must be an AstNode.");return new S0(t,r=>p6(r,e),{includeRoot:!0})}function O$(t,e){var r;if(!e)return!0;let n=(r=t.$cstNode)===null||r===void 0?void 0:r.range;return n?m$(n,e):!1}function yv(t){return new Fl(()=>({keys:Object.keys(t),keyIndex:0,arrayIndex:0}),e=>{for(;e.keyIndex{yv(n).forEach(i=>{i.reference.ref===t&&r.push(i.reference)})}),An(r)}function B$(t,e){let r=t.getTypeMetaData(e.$type),n=e;for(let i of r.properties)i.defaultValue!==void 0&&n[i.name]===void 0&&(n[i.name]=Bye(i.defaultValue))}function Bye(t){return Array.isArray(t)?[...t.map(Bye)]:t}function P$(t,e){let r={$type:t.$type};for(let[n,i]of Object.entries(t))if(!n.startsWith("$"))if(qi(i))r[n]=P$(i,e);else if(Is(i))r[n]=e(r,n,i.$refNode,i.$refText);else if(Array.isArray(i)){let a=[];for(let s of i)qi(s)?a.push(P$(s,e)):Is(s)?a.push(e(r,n,s.$refNode,s.$refText)):a.push(s);r[n]=a}else r[n]=i;return dC(r),r}var vo=D(()=>{cc();nl();hc()});function Tr(t){return t.charCodeAt(0)}function mC(t,e){Array.isArray(t)?t.forEach(function(r){e.push(r)}):e.push(t)}function vv(t,e){if(t[e]===!0)throw"duplicate flag "+e;let r=t[e];t[e]=!0}function Em(t){if(t===void 0)throw Error("Internal Error - Should never get here!");return!0}function m6(){throw Error("Internal Error - Should never get here!")}function F$(t){return t.type==="Character"}var z$=D(()=>{});var g6,y6,$$,Fye=D(()=>{z$();g6=[];for(let t=Tr("0");t<=Tr("9");t++)g6.push(t);y6=[Tr("_")].concat(g6);for(let t=Tr("a");t<=Tr("z");t++)y6.push(t);for(let t=Tr("A");t<=Tr("Z");t++)y6.push(t);$$=[Tr(" "),Tr("\f"),Tr(` +`),Tr("\r"),Tr(" "),Tr("\v"),Tr(" "),Tr("\xA0"),Tr("\u1680"),Tr("\u2000"),Tr("\u2001"),Tr("\u2002"),Tr("\u2003"),Tr("\u2004"),Tr("\u2005"),Tr("\u2006"),Tr("\u2007"),Tr("\u2008"),Tr("\u2009"),Tr("\u200A"),Tr("\u2028"),Tr("\u2029"),Tr("\u202F"),Tr("\u205F"),Tr("\u3000"),Tr("\uFEFF")]});var slt,gC,olt,Sm,zye=D(()=>{z$();Fye();slt=/[0-9a-fA-F]/,gC=/[0-9]/,olt=/[1-9]/,Sm=class{constructor(){this.idx=0,this.input="",this.groupIdx=0}saveState(){return{idx:this.idx,input:this.input,groupIdx:this.groupIdx}}restoreState(e){this.idx=e.idx,this.input=e.input,this.groupIdx=e.groupIdx}pattern(e){this.idx=0,this.input=e,this.groupIdx=0,this.consumeChar("/");let r=this.disjunction();this.consumeChar("/");let n={type:"Flags",loc:{begin:this.idx,end:e.length},global:!1,ignoreCase:!1,multiLine:!1,unicode:!1,sticky:!1};for(;this.isRegExpFlag();)switch(this.popChar()){case"g":vv(n,"global");break;case"i":vv(n,"ignoreCase");break;case"m":vv(n,"multiLine");break;case"u":vv(n,"unicode");break;case"y":vv(n,"sticky");break}if(this.idx!==this.input.length)throw Error("Redundant input: "+this.input.substring(this.idx));return{type:"Pattern",flags:n,value:r,loc:this.loc(0)}}disjunction(){let e=[],r=this.idx;for(e.push(this.alternative());this.peekChar()==="|";)this.consumeChar("|"),e.push(this.alternative());return{type:"Disjunction",value:e,loc:this.loc(r)}}alternative(){let e=[],r=this.idx;for(;this.isTerm();)e.push(this.term());return{type:"Alternative",value:e,loc:this.loc(r)}}term(){return this.isAssertion()?this.assertion():this.atom()}assertion(){let e=this.idx;switch(this.popChar()){case"^":return{type:"StartAnchor",loc:this.loc(e)};case"$":return{type:"EndAnchor",loc:this.loc(e)};case"\\":switch(this.popChar()){case"b":return{type:"WordBoundary",loc:this.loc(e)};case"B":return{type:"NonWordBoundary",loc:this.loc(e)}}throw Error("Invalid Assertion Escape");case"(":this.consumeChar("?");let r;switch(this.popChar()){case"=":r="Lookahead";break;case"!":r="NegativeLookahead";break}Em(r);let n=this.disjunction();return this.consumeChar(")"),{type:r,value:n,loc:this.loc(e)}}return m6()}quantifier(e=!1){let r,n=this.idx;switch(this.popChar()){case"*":r={atLeast:0,atMost:1/0};break;case"+":r={atLeast:1,atMost:1/0};break;case"?":r={atLeast:0,atMost:1};break;case"{":let i=this.integerIncludingZero();switch(this.popChar()){case"}":r={atLeast:i,atMost:i};break;case",":let a;this.isDigit()?(a=this.integerIncludingZero(),r={atLeast:i,atMost:a}):r={atLeast:i,atMost:1/0},this.consumeChar("}");break}if(e===!0&&r===void 0)return;Em(r);break}if(!(e===!0&&r===void 0)&&Em(r))return this.peekChar(0)==="?"?(this.consumeChar("?"),r.greedy=!1):r.greedy=!0,r.type="Quantifier",r.loc=this.loc(n),r}atom(){let e,r=this.idx;switch(this.peekChar()){case".":e=this.dotAll();break;case"\\":e=this.atomEscape();break;case"[":e=this.characterClass();break;case"(":e=this.group();break}return e===void 0&&this.isPatternCharacter()&&(e=this.patternCharacter()),Em(e)?(e.loc=this.loc(r),this.isQuantifier()&&(e.quantifier=this.quantifier()),e):m6()}dotAll(){return this.consumeChar("."),{type:"Set",complement:!0,value:[Tr(` +`),Tr("\r"),Tr("\u2028"),Tr("\u2029")]}}atomEscape(){switch(this.consumeChar("\\"),this.peekChar()){case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":return this.decimalEscapeAtom();case"d":case"D":case"s":case"S":case"w":case"W":return this.characterClassEscape();case"f":case"n":case"r":case"t":case"v":return this.controlEscapeAtom();case"c":return this.controlLetterEscapeAtom();case"0":return this.nulCharacterAtom();case"x":return this.hexEscapeSequenceAtom();case"u":return this.regExpUnicodeEscapeSequenceAtom();default:return this.identityEscapeAtom()}}decimalEscapeAtom(){return{type:"GroupBackReference",value:this.positiveInteger()}}characterClassEscape(){let e,r=!1;switch(this.popChar()){case"d":e=g6;break;case"D":e=g6,r=!0;break;case"s":e=$$;break;case"S":e=$$,r=!0;break;case"w":e=y6;break;case"W":e=y6,r=!0;break}return Em(e)?{type:"Set",value:e,complement:r}:m6()}controlEscapeAtom(){let e;switch(this.popChar()){case"f":e=Tr("\f");break;case"n":e=Tr(` +`);break;case"r":e=Tr("\r");break;case"t":e=Tr(" ");break;case"v":e=Tr("\v");break}return Em(e)?{type:"Character",value:e}:m6()}controlLetterEscapeAtom(){this.consumeChar("c");let e=this.popChar();if(/[a-zA-Z]/.test(e)===!1)throw Error("Invalid ");return{type:"Character",value:e.toUpperCase().charCodeAt(0)-64}}nulCharacterAtom(){return this.consumeChar("0"),{type:"Character",value:Tr("\0")}}hexEscapeSequenceAtom(){return this.consumeChar("x"),this.parseHexDigits(2)}regExpUnicodeEscapeSequenceAtom(){return this.consumeChar("u"),this.parseHexDigits(4)}identityEscapeAtom(){let e=this.popChar();return{type:"Character",value:Tr(e)}}classPatternCharacterAtom(){switch(this.peekChar()){case` +`:case"\r":case"\u2028":case"\u2029":case"\\":case"]":throw Error("TBD");default:let e=this.popChar();return{type:"Character",value:Tr(e)}}}characterClass(){let e=[],r=!1;for(this.consumeChar("["),this.peekChar(0)==="^"&&(this.consumeChar("^"),r=!0);this.isClassAtom();){let n=this.classAtom(),i=n.type==="Character";if(F$(n)&&this.isRangeDash()){this.consumeChar("-");let a=this.classAtom(),s=a.type==="Character";if(F$(a)){if(a.value=this.input.length)throw Error("Unexpected end of input");this.idx++}loc(e){return{begin:e,end:this.idx}}}});var _c,pge=A(()=>{_c=class{visitChildren(e){for(let r in e){let n=e[r];e.hasOwnProperty(r)&&(n.type!==void 0?this.visit(n):Array.isArray(n)&&n.forEach(a=>{this.visit(a)},this))}}visit(e){switch(e.type){case"Pattern":this.visitPattern(e);break;case"Flags":this.visitFlags(e);break;case"Disjunction":this.visitDisjunction(e);break;case"Alternative":this.visitAlternative(e);break;case"StartAnchor":this.visitStartAnchor(e);break;case"EndAnchor":this.visitEndAnchor(e);break;case"WordBoundary":this.visitWordBoundary(e);break;case"NonWordBoundary":this.visitNonWordBoundary(e);break;case"Lookahead":this.visitLookahead(e);break;case"NegativeLookahead":this.visitNegativeLookahead(e);break;case"Character":this.visitCharacter(e);break;case"Set":this.visitSet(e);break;case"Group":this.visitGroup(e);break;case"GroupBackReference":this.visitGroupBackReference(e);break;case"Quantifier":this.visitQuantifier(e);break}this.visitChildren(e)}visitPattern(e){}visitFlags(e){}visitDisjunction(e){}visitAlternative(e){}visitStartAnchor(e){}visitEndAnchor(e){}visitWordBoundary(e){}visitNonWordBoundary(e){}visitLookahead(e){}visitNegativeLookahead(e){}visitCharacter(e){}visitSet(e){}visitGroup(e){}visitGroupBackReference(e){}visitQuantifier(e){}}});var t5=A(()=>{dge();pge()});var B_={};lr(B_,{NEWLINE_REGEXP:()=>RF,escapeRegExp:()=>ym,getCaseInsensitivePattern:()=>DF,getTerminalParts:()=>Int,isMultilineComment:()=>IF,isWhitespace:()=>sy,partialMatches:()=>NF,partialRegExp:()=>vge,whitespaceCharacters:()=>gge});function Int(t){try{typeof t!="string"&&(t=t.source),t=`/${t}/`;let e=mge.pattern(t),r=[];for(let n of e.value.value)vm.reset(t),vm.visit(n),r.push({start:vm.startRegexp,end:vm.endRegex});return r}catch{return[]}}function IF(t){try{return typeof t=="string"&&(t=new RegExp(t)),t=t.toString(),vm.reset(t),vm.visit(mge.pattern(t)),vm.multiline}catch{return!1}}function sy(t){let e=typeof t=="string"?new RegExp(t):t;return gge.some(r=>e.test(r))}function ym(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function DF(t){return Array.prototype.map.call(t,e=>/\w/.test(e)?`[${e.toLowerCase()}${e.toUpperCase()}]`:ym(e)).join("")}function NF(t,e){let r=vge(t),n=e.match(r);return!!n&&n[0].length>0}function vge(t){typeof t=="string"&&(t=new RegExp(t));let e=t,r=t.source,n=0;function a(){let i="",s;function o(u){i+=r.substr(n,u),n+=u}function l(u){i+="(?:"+r.substr(n,u)+"|$)",n+=u}for(;n",n)-n+1);break;default:l(2);break}break;case"[":s=/\[(?:\\.|.)*?\]/g,s.lastIndex=n,s=s.exec(r)||[],l(s[0].length);break;case"|":case"^":case"$":case"*":case"+":case"?":o(1);break;case"{":s=/\{\d+,?\d*\}/g,s.lastIndex=n,s=s.exec(r),s?o(s[0].length):l(1);break;case"(":if(r[n+1]==="?")switch(r[n+2]){case":":i+="(?:",n+=3,i+=a()+"|$)";break;case"=":i+="(?=",n+=3,i+=a()+")";break;case"!":s=n,n+=3,a(),i+=r.substr(s,n-s);break;case"<":switch(r[n+3]){case"=":case"!":s=n,n+=4,a(),i+=r.substr(s,n-s);break;default:o(r.indexOf(">",n)-n+1),i+=a()+"|$)";break}break}else o(1),i+=a()+"|$)";break;case")":return++n,i;default:l(1);break}return i}return new RegExp(a(),t.flags)}var RF,mge,LF,vm,gge,oy=A(()=>{t5();RF=/\r?\n/gm,mge=new gm,LF=class extends _c{constructor(){super(...arguments),this.isStarting=!0,this.endRegexpStack=[],this.multiline=!1}get endRegex(){return this.endRegexpStack.join("")}reset(e){this.multiline=!1,this.regex=e,this.startRegexp="",this.isStarting=!0,this.endRegexpStack=[]}visitGroup(e){e.quantifier&&(this.isStarting=!1,this.endRegexpStack=[])}visitCharacter(e){let r=String.fromCharCode(e.value);if(!this.multiline&&r===` -`&&(this.multiline=!0),e.quantifier)this.isStarting=!1,this.endRegexpStack=[];else{let n=ym(r);this.endRegexpStack.push(n),this.isStarting&&(this.startRegexp+=n)}}visitSet(e){if(!this.multiline){let r=this.regex.substring(e.loc.begin,e.loc.end),n=new RegExp(r);this.multiline=!!` -`.match(n)}if(e.quantifier)this.isStarting=!1,this.endRegexpStack=[];else{let r=this.regex.substring(e.loc.begin,e.loc.end);this.endRegexpStack.push(r),this.isStarting&&(this.startRegexp+=r)}}visitChildren(e){e.type==="Group"&&e.quantifier||super.visitChildren(e)}},vm=new LF;gge=`\f -\r \v \xA0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u2028\u2029\u202F\u205F\u3000\uFEFF`.split("")});var z_={};lr(z_,{findAssignment:()=>UF,findNameAssignment:()=>F_,findNodeForKeyword:()=>$F,findNodeForProperty:()=>n5,findNodesForKeyword:()=>Dnt,findNodesForKeywordInternal:()=>GF,findNodesForProperty:()=>FF,getActionAtElement:()=>kge,getActionType:()=>Ege,getAllReachableRules:()=>r5,getCrossReferenceTerminal:()=>PF,getEntryRule:()=>yge,getExplicitRuleType:()=>ly,getHiddenRules:()=>xge,getRuleType:()=>qF,getRuleTypeName:()=>Bnt,getTypeName:()=>i5,isArrayCardinality:()=>Mnt,isArrayOperator:()=>Ont,isCommentTerminal:()=>BF,isDataType:()=>Pnt,isDataTypeRule:()=>a5,isOptionalCardinality:()=>Nnt,terminalRegex:()=>uy});function yge(t){return t.rules.find(e=>is(e)&&e.entry)}function xge(t){return t.rules.filter(e=>Ho(e)&&e.hidden)}function r5(t,e){let r=new Set,n=yge(t);if(!n)return new Set(t.rules);let a=[n].concat(xge(t));for(let s of a)bge(s,r,e);let i=new Set;for(let s of t.rules)(r.has(s.name)||Ho(s)&&s.hidden)&&i.add(s);return i}function bge(t,e,r){e.add(t.name),Sc(t).forEach(n=>{if(pu(n)||r&&I_(n)){let a=n.rule.ref;a&&!e.has(a.name)&&bge(a,e,r)}})}function PF(t){if(t.terminal)return t.terminal;if(t.type.ref){let e=F_(t.type.ref);return e?.terminal}}function BF(t){return t.hidden&&!sy(uy(t))}function FF(t,e){return!t||!e?[]:zF(t,e,t.astNode,!0)}function n5(t,e,r){if(!t||!e)return;let n=zF(t,e,t.astNode,!0);if(n.length!==0)return r!==void 0?r=Math.max(0,Math.min(r,n.length-1)):r=0,n[r]}function zF(t,e,r,n){if(!n){let a=pm(t.grammarSource,du);if(a&&a.feature===e)return[t]}return cu(t)&&t.astNode===r?t.content.flatMap(a=>zF(a,e,r,!1)):[]}function Dnt(t,e){return t?GF(t,e,t?.astNode):[]}function $F(t,e,r){if(!t)return;let n=GF(t,e,t?.astNode);if(n.length!==0)return r!==void 0?r=Math.max(0,Math.min(r,n.length-1)):r=0,n[r]}function GF(t,e,r){if(t.astNode!==r)return[];if(bl(t.grammarSource)&&t.grammarSource.value===e)return[t];let n=um(t).iterator(),a,i=[];do if(a=n.next(),!a.done){let s=a.value;s.astNode===r?bl(s.grammarSource)&&s.grammarSource.value===e&&i.push(s):n.prune()}while(!a.done);return i}function UF(t){var e;let r=t.astNode;for(;r===((e=t.container)===null||e===void 0?void 0:e.astNode);){let n=pm(t.grammarSource,du);if(n)return n;t=t.container}}function F_(t){let e=t;return __(e)&&(Yh(e.$container)?e=e.$container.$container:is(e.$container)?e=e.$container:Ec(e.$container)),wge(t,e,new Map)}function wge(t,e,r){var n;function a(i,s){let o;return pm(i,du)||(o=wge(s,s,r)),r.set(t,o),o}if(r.has(t))return r.get(t);r.set(t,void 0);for(let i of Sc(e)){if(du(i)&&i.feature.toLowerCase()==="name")return r.set(t,i),i;if(pu(i)&&is(i.rule.ref))return a(i,i.rule.ref);if(L_(i)&&(!((n=i.typeRef)===null||n===void 0)&&n.ref))return a(i,i.typeRef.ref)}}function kge(t){let e=t.$container;if(Pd(e)){let r=e.elements,n=r.indexOf(t);for(let a=n-1;a>=0;a--){let i=r[a];if(Yh(i))return i;{let s=Sc(r[a]).find(Yh);if(s)return s}}}if(Y3(e))return kge(e)}function Nnt(t,e){return t==="?"||t==="*"||Pd(e)&&!!e.guardCondition}function Mnt(t){return t==="*"||t==="+"}function Ont(t){return t==="+="}function a5(t){return Tge(t,new Set)}function Tge(t,e){if(e.has(t))return!0;e.add(t);for(let r of Sc(t))if(pu(r)){if(!r.rule.ref||is(r.rule.ref)&&!Tge(r.rule.ref,e))return!1}else{if(du(r))return!1;if(Yh(r))return!1}return!!t.definition}function Pnt(t){return OF(t.type,new Set)}function OF(t,e){if(e.has(t))return!0;if(e.add(t),sF(t))return!1;if(fF(t))return!1;if(pF(t))return t.types.every(r=>OF(r,e));if(L_(t)){if(t.primitiveType!==void 0)return!0;if(t.stringType!==void 0)return!0;if(t.typeRef!==void 0){let r=t.typeRef.ref;return X3(r)?OF(r.type,e):!1}else return!1}else return!1}function ly(t){if(t.inferredType)return t.inferredType.name;if(t.dataType)return t.dataType;if(t.returnType){let e=t.returnType.ref;if(e){if(is(e))return e.name;if(A_(e)||X3(e))return e.name}}}function i5(t){var e;if(is(t))return a5(t)?t.name:(e=ly(t))!==null&&e!==void 0?e:t.name;if(A_(t)||X3(t)||dF(t))return t.name;if(Yh(t)){let r=Ege(t);if(r)return r}else if(__(t))return t.name;throw new Error("Cannot get name of Unknown Type")}function Ege(t){var e;if(t.inferredType)return t.inferredType.name;if(!((e=t.type)===null||e===void 0)&&e.ref)return i5(t.type.ref)}function Bnt(t){var e,r,n;return Ho(t)?(r=(e=t.type)===null||e===void 0?void 0:e.name)!==null&&r!==void 0?r:"string":a5(t)?t.name:(n=ly(t))!==null&&n!==void 0?n:t.name}function qF(t){var e,r,n;return Ho(t)?(r=(e=t.type)===null||e===void 0?void 0:e.name)!==null&&r!==void 0?r:"string":(n=ly(t))!==null&&n!==void 0?n:t.name}function uy(t){let e={s:!1,i:!1,u:!1},r=cy(t.definition,e),n=Object.entries(e).filter(([,a])=>a).map(([a])=>a).join("");return new RegExp(r,n)}function cy(t,e){if(xF(t))return Fnt(t);if(bF(t))return znt(t);if(mF(t))return Unt(t);if(I_(t)){let r=t.rule.ref;if(!r)throw new Error("Missing rule reference.");return Xh(cy(r.definition),{cardinality:t.cardinality,lookahead:t.lookahead})}else{if(vF(t))return Gnt(t);if(wF(t))return $nt(t);if(yF(t)){let r=t.regex.lastIndexOf("/"),n=t.regex.substring(1,r),a=t.regex.substring(r+1);return e&&(e.i=a.includes("i"),e.s=a.includes("s"),e.u=a.includes("u")),Xh(n,{cardinality:t.cardinality,lookahead:t.lookahead,wrap:!1})}else{if(kF(t))return Xh(VF,{cardinality:t.cardinality,lookahead:t.lookahead});throw new Error(`Invalid terminal element: ${t?.$type}`)}}}function Fnt(t){return Xh(t.elements.map(e=>cy(e)).join("|"),{cardinality:t.cardinality,lookahead:t.lookahead})}function znt(t){return Xh(t.elements.map(e=>cy(e)).join(""),{cardinality:t.cardinality,lookahead:t.lookahead})}function $nt(t){return Xh(`${VF}*?${cy(t.terminal)}`,{cardinality:t.cardinality,lookahead:t.lookahead})}function Gnt(t){return Xh(`(?!${cy(t.terminal)})${VF}*?`,{cardinality:t.cardinality,lookahead:t.lookahead})}function Unt(t){return t.right?Xh(`[${MF(t.left)}-${MF(t.right)}]`,{cardinality:t.cardinality,lookahead:t.lookahead,wrap:!1}):Xh(MF(t.left),{cardinality:t.cardinality,lookahead:t.lookahead,wrap:!1})}function MF(t){return ym(t.value)}function Xh(t,e){var r;return(e.wrap!==!1||e.lookahead)&&(t=`(${(r=e.lookahead)!==null&&r!==void 0?r:""}${t})`),e.cardinality?`${t}${e.cardinality}`:t}var VF,mu=A(()=>{C_();Cc();hu();_s();fu();oy();VF=/[\s\S]/.source});function HF(t){let e=[],r=t.Grammar;for(let n of r.rules)Ho(n)&&BF(n)&&IF(uy(n))&&e.push(n.name);return{multilineCommentRules:e,nameRegexp:T_}}var WF=A(()=>{fu();mu();oy();Cc()});var YF=A(()=>{});var qnt,$_,XF=A(()=>{qnt=typeof global=="object"&&global&&global.Object===Object&&global,$_=qnt});var Vnt,Hnt,Ma,gu=A(()=>{XF();Vnt=typeof self=="object"&&self&&self.Object===Object&&self,Hnt=$_||Vnt||Function("return this")(),Ma=Hnt});var Wnt,xi,xm=A(()=>{gu();Wnt=Ma.Symbol,xi=Wnt});function jnt(t){var e=Ynt.call(t,s5),r=t[s5];try{t[s5]=void 0;var n=!0}catch{}var a=Xnt.call(t);return n&&(e?t[s5]=r:delete t[s5]),a}var Cge,Ynt,Xnt,s5,Sge,_ge=A(()=>{xm();Cge=Object.prototype,Ynt=Cge.hasOwnProperty,Xnt=Cge.toString,s5=xi?xi.toStringTag:void 0;Sge=jnt});function Qnt(t){return Znt.call(t)}var Knt,Znt,Age,Lge=A(()=>{Knt=Object.prototype,Znt=Knt.toString;Age=Qnt});function tat(t){return t==null?t===void 0?eat:Jnt:Rge&&Rge in Object(t)?Sge(t):Age(t)}var Jnt,eat,Rge,As,Bd=A(()=>{xm();_ge();Lge();Jnt="[object Null]",eat="[object Undefined]",Rge=xi?xi.toStringTag:void 0;As=tat});function rat(t){return t!=null&&typeof t=="object"}var ba,vu=A(()=>{ba=rat});function aat(t){return typeof t=="symbol"||ba(t)&&As(t)==nat}var nat,Fd,o5=A(()=>{Bd();vu();nat="[object Symbol]";Fd=aat});function iat(t,e){for(var r=-1,n=t==null?0:t.length,a=Array(n);++r{Ac=iat});var sat,Bt,fa=A(()=>{sat=Array.isArray,Bt=sat});function Nge(t){if(typeof t=="string")return t;if(Bt(t))return Ac(t,Nge)+"";if(Fd(t))return Dge?Dge.call(t):"";var e=t+"";return e=="0"&&1/t==-oat?"-0":e}var oat,Ige,Dge,Mge,Oge=A(()=>{xm();hy();fa();o5();oat=1/0,Ige=xi?xi.prototype:void 0,Dge=Ige?Ige.toString:void 0;Mge=Nge});function uat(t){for(var e=t.length;e--&&lat.test(t.charAt(e)););return e}var lat,Pge,Bge=A(()=>{lat=/\s/;Pge=uat});function hat(t){return t&&t.slice(0,Pge(t)+1).replace(cat,"")}var cat,Fge,zge=A(()=>{Bge();cat=/^\s+/;Fge=hat});function fat(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}var aa,yu=A(()=>{aa=fat});function vat(t){if(typeof t=="number")return t;if(Fd(t))return $ge;if(aa(t)){var e=typeof t.valueOf=="function"?t.valueOf():t;t=aa(e)?e+"":e}if(typeof t!="string")return t===0?t:+t;t=Fge(t);var r=pat.test(t);return r||mat.test(t)?gat(t.slice(2),r?2:8):dat.test(t)?$ge:+t}var $ge,dat,pat,mat,gat,Gge,Uge=A(()=>{zge();yu();o5();$ge=NaN,dat=/^[-+]0x[0-9a-f]+$/i,pat=/^0b[01]+$/i,mat=/^0o[0-7]+$/i,gat=parseInt;Gge=vat});function xat(t){if(!t)return t===0?t:0;if(t=Gge(t),t===qge||t===-qge){var e=t<0?-1:1;return e*yat}return t===t?t:0}var qge,yat,Vge,Hge=A(()=>{Uge();qge=1/0,yat=17976931348623157e292;Vge=xat});function bat(t){var e=Vge(t),r=e%1;return e===e?r?e-r:e:0}var Lc,fy=A(()=>{Hge();Lc=bat});function wat(t){return t}var kl,dy=A(()=>{kl=wat});function Sat(t){if(!aa(t))return!1;var e=As(t);return e==Tat||e==Eat||e==kat||e==Cat}var kat,Tat,Eat,Cat,Ls,G_=A(()=>{Bd();yu();kat="[object AsyncFunction]",Tat="[object Function]",Eat="[object GeneratorFunction]",Cat="[object Proxy]";Ls=Sat});var _at,U_,Wge=A(()=>{gu();_at=Ma["__core-js_shared__"],U_=_at});function Aat(t){return!!Yge&&Yge in t}var Yge,Xge,jge=A(()=>{Wge();Yge=(function(){var t=/[^.]+$/.exec(U_&&U_.keys&&U_.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""})();Xge=Aat});function Iat(t){if(t!=null){try{return Rat.call(t)}catch{}try{return t+""}catch{}}return""}var Lat,Rat,jh,jF=A(()=>{Lat=Function.prototype,Rat=Lat.toString;jh=Iat});function zat(t){if(!aa(t)||Xge(t))return!1;var e=Ls(t)?Fat:Nat;return e.test(jh(t))}var Dat,Nat,Mat,Oat,Pat,Bat,Fat,Kge,Zge=A(()=>{G_();jge();yu();jF();Dat=/[\\^$.*+?()[\]{}|]/g,Nat=/^\[object .+?Constructor\]$/,Mat=Function.prototype,Oat=Object.prototype,Pat=Mat.toString,Bat=Oat.hasOwnProperty,Fat=RegExp("^"+Pat.call(Bat).replace(Dat,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");Kge=zat});function $at(t,e){return t?.[e]}var Qge,Jge=A(()=>{Qge=$at});function Gat(t,e){var r=Qge(t,e);return Kge(r)?r:void 0}var fo,zd=A(()=>{Zge();Jge();fo=Gat});var Uat,q_,e1e=A(()=>{zd();gu();Uat=fo(Ma,"WeakMap"),q_=Uat});var t1e,qat,r1e,n1e=A(()=>{yu();t1e=Object.create,qat=(function(){function t(){}return function(e){if(!aa(e))return{};if(t1e)return t1e(e);t.prototype=e;var r=new t;return t.prototype=void 0,r}})(),r1e=qat});function Vat(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 a1e,i1e=A(()=>{a1e=Vat});function Hat(){}var ia,KF=A(()=>{ia=Hat});function Wat(t,e){var r=-1,n=t.length;for(e||(e=Array(n));++r{s1e=Wat});function Kat(t){var e=0,r=0;return function(){var n=jat(),a=Xat-(n-r);if(r=n,a>0){if(++e>=Yat)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}var Yat,Xat,jat,l1e,u1e=A(()=>{Yat=800,Xat=16,jat=Date.now;l1e=Kat});function Zat(t){return function(){return t}}var c1e,h1e=A(()=>{c1e=Zat});var Qat,py,ZF=A(()=>{zd();Qat=(function(){try{var t=fo(Object,"defineProperty");return t({},"",{}),t}catch{}})(),py=Qat});var Jat,f1e,d1e=A(()=>{h1e();ZF();dy();Jat=py?function(t,e){return py(t,"toString",{configurable:!0,enumerable:!1,value:c1e(e),writable:!0})}:kl,f1e=Jat});var eit,p1e,m1e=A(()=>{d1e();u1e();eit=l1e(f1e),p1e=eit});function tit(t,e){for(var r=-1,n=t==null?0:t.length;++r{V_=tit});function rit(t,e,r,n){for(var a=t.length,i=r+(n?1:-1);n?i--:++i{H_=rit});function nit(t){return t!==t}var g1e,v1e=A(()=>{g1e=nit});function ait(t,e,r){for(var n=r-1,a=t.length;++n{y1e=ait});function iit(t,e,r){return e===e?y1e(t,e,r):H_(t,g1e,r)}var my,W_=A(()=>{JF();v1e();x1e();my=iit});function sit(t,e){var r=t==null?0:t.length;return!!r&&my(t,e,0)>-1}var Y_,ez=A(()=>{W_();Y_=sit});function uit(t,e){var r=typeof t;return e=e??oit,!!e&&(r=="number"||r!="symbol"&&lit.test(t))&&t>-1&&t%1==0&&t{oit=9007199254740991,lit=/^(?:0|[1-9]\d*)$/;$d=uit});function cit(t,e,r){e=="__proto__"&&py?py(t,e,{configurable:!0,enumerable:!0,value:r,writable:!0}):t[e]=r}var gy,X_=A(()=>{ZF();gy=cit});function hit(t,e){return t===e||t!==t&&e!==e}var Rc,vy=A(()=>{Rc=hit});function pit(t,e,r){var n=t[e];(!(dit.call(t,e)&&Rc(n,r))||r===void 0&&!(e in t))&&gy(t,e,r)}var fit,dit,Gd,u5=A(()=>{X_();vy();fit=Object.prototype,dit=fit.hasOwnProperty;Gd=pit});function mit(t,e,r,n){var a=!r;r||(r={});for(var i=-1,s=e.length;++i{u5();X_();Ic=mit});function git(t,e,r){return e=b1e(e===void 0?t.length-1:e,0),function(){for(var n=arguments,a=-1,i=b1e(n.length-e,0),s=Array(i);++a{i1e();b1e=Math.max;w1e=git});function vit(t,e){return p1e(w1e(t,e,kl),t+"")}var xy,j_=A(()=>{dy();k1e();m1e();xy=vit});function xit(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=yit}var yit,by,K_=A(()=>{yit=9007199254740991;by=xit});function bit(t){return t!=null&&by(t.length)&&!Ls(t)}var Oa,xu=A(()=>{G_();K_();Oa=bit});function wit(t,e,r){if(!aa(r))return!1;var n=typeof e;return(n=="number"?Oa(r)&&$d(e,r.length):n=="string"&&e in r)?Rc(r[e],t):!1}var Ud,c5=A(()=>{vy();xu();l5();yu();Ud=wit});function kit(t){return xy(function(e,r){var n=-1,a=r.length,i=a>1?r[a-1]:void 0,s=a>2?r[2]:void 0;for(i=t.length>3&&typeof i=="function"?(a--,i):void 0,s&&Ud(r[0],r[1],s)&&(i=a<3?void 0:i,a=1),e=Object(e);++n{j_();c5();T1e=kit});function Eit(t){var e=t&&t.constructor,r=typeof e=="function"&&e.prototype||Tit;return t===r}var Tit,Dc,wy=A(()=>{Tit=Object.prototype;Dc=Eit});function Cit(t,e){for(var r=-1,n=Array(t);++r{C1e=Cit});function _it(t){return ba(t)&&As(t)==Sit}var Sit,tz,_1e=A(()=>{Bd();vu();Sit="[object Arguments]";tz=_it});var A1e,Ait,Lit,Rit,qd,h5=A(()=>{_1e();vu();A1e=Object.prototype,Ait=A1e.hasOwnProperty,Lit=A1e.propertyIsEnumerable,Rit=tz((function(){return arguments})())?tz:function(t){return ba(t)&&Ait.call(t,"callee")&&!Lit.call(t,"callee")},qd=Rit});function Iit(){return!1}var L1e,R1e=A(()=>{L1e=Iit});var N1e,I1e,Dit,D1e,Nit,Mit,Kh,f5=A(()=>{gu();R1e();N1e=typeof exports=="object"&&exports&&!exports.nodeType&&exports,I1e=N1e&&typeof module=="object"&&module&&!module.nodeType&&module,Dit=I1e&&I1e.exports===N1e,D1e=Dit?Ma.Buffer:void 0,Nit=D1e?D1e.isBuffer:void 0,Mit=Nit||L1e,Kh=Mit});function ist(t){return ba(t)&&by(t.length)&&!!Pn[As(t)]}var Oit,Pit,Bit,Fit,zit,$it,Git,Uit,qit,Vit,Hit,Wit,Yit,Xit,jit,Kit,Zit,Qit,Jit,est,tst,rst,nst,ast,Pn,M1e,O1e=A(()=>{Bd();K_();vu();Oit="[object Arguments]",Pit="[object Array]",Bit="[object Boolean]",Fit="[object Date]",zit="[object Error]",$it="[object Function]",Git="[object Map]",Uit="[object Number]",qit="[object Object]",Vit="[object RegExp]",Hit="[object Set]",Wit="[object String]",Yit="[object WeakMap]",Xit="[object ArrayBuffer]",jit="[object DataView]",Kit="[object Float32Array]",Zit="[object Float64Array]",Qit="[object Int8Array]",Jit="[object Int16Array]",est="[object Int32Array]",tst="[object Uint8Array]",rst="[object Uint8ClampedArray]",nst="[object Uint16Array]",ast="[object Uint32Array]",Pn={};Pn[Kit]=Pn[Zit]=Pn[Qit]=Pn[Jit]=Pn[est]=Pn[tst]=Pn[rst]=Pn[nst]=Pn[ast]=!0;Pn[Oit]=Pn[Pit]=Pn[Xit]=Pn[Bit]=Pn[jit]=Pn[Fit]=Pn[zit]=Pn[$it]=Pn[Git]=Pn[Uit]=Pn[qit]=Pn[Vit]=Pn[Hit]=Pn[Wit]=Pn[Yit]=!1;M1e=ist});function sst(t){return function(e){return t(e)}}var Nc,ky=A(()=>{Nc=sst});var P1e,d5,ost,rz,lst,Tl,p5=A(()=>{XF();P1e=typeof exports=="object"&&exports&&!exports.nodeType&&exports,d5=P1e&&typeof module=="object"&&module&&!module.nodeType&&module,ost=d5&&d5.exports===P1e,rz=ost&&$_.process,lst=(function(){try{var t=d5&&d5.require&&d5.require("util").types;return t||rz&&rz.binding&&rz.binding("util")}catch{}})(),Tl=lst});var B1e,ust,Ty,Z_=A(()=>{O1e();ky();p5();B1e=Tl&&Tl.isTypedArray,ust=B1e?Nc(B1e):M1e,Ty=ust});function fst(t,e){var r=Bt(t),n=!r&&qd(t),a=!r&&!n&&Kh(t),i=!r&&!n&&!a&&Ty(t),s=r||n||a||i,o=s?C1e(t.length,String):[],l=o.length;for(var u in t)(e||hst.call(t,u))&&!(s&&(u=="length"||a&&(u=="offset"||u=="parent")||i&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||$d(u,l)))&&o.push(u);return o}var cst,hst,Q_,nz=A(()=>{S1e();h5();fa();f5();l5();Z_();cst=Object.prototype,hst=cst.hasOwnProperty;Q_=fst});function dst(t,e){return function(r){return t(e(r))}}var J_,az=A(()=>{J_=dst});var pst,F1e,z1e=A(()=>{az();pst=J_(Object.keys,Object),F1e=pst});function vst(t){if(!Dc(t))return F1e(t);var e=[];for(var r in Object(t))gst.call(t,r)&&r!="constructor"&&e.push(r);return e}var mst,gst,e8,iz=A(()=>{wy();z1e();mst=Object.prototype,gst=mst.hasOwnProperty;e8=vst});function yst(t){return Oa(t)?Q_(t):e8(t)}var Sn,Mc=A(()=>{nz();iz();xu();Sn=yst});var xst,bst,wst,Ey,$1e=A(()=>{u5();yy();E1e();xu();wy();Mc();xst=Object.prototype,bst=xst.hasOwnProperty,wst=T1e(function(t,e){if(Dc(e)||Oa(e)){Ic(e,Sn(e),t);return}for(var r in e)bst.call(e,r)&&Gd(t,r,e[r])}),Ey=wst});function kst(t){var e=[];if(t!=null)for(var r in Object(t))e.push(r);return e}var G1e,U1e=A(()=>{G1e=kst});function Cst(t){if(!aa(t))return G1e(t);var e=Dc(t),r=[];for(var n in t)n=="constructor"&&(e||!Est.call(t,n))||r.push(n);return r}var Tst,Est,q1e,V1e=A(()=>{yu();wy();U1e();Tst=Object.prototype,Est=Tst.hasOwnProperty;q1e=Cst});function Sst(t){return Oa(t)?Q_(t,!0):q1e(t)}var Vd,m5=A(()=>{nz();V1e();xu();Vd=Sst});function Lst(t,e){if(Bt(t))return!1;var r=typeof t;return r=="number"||r=="symbol"||r=="boolean"||t==null||Fd(t)?!0:Ast.test(t)||!_st.test(t)||e!=null&&t in Object(e)}var _st,Ast,Cy,t8=A(()=>{fa();o5();_st=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Ast=/^\w*$/;Cy=Lst});var Rst,Zh,g5=A(()=>{zd();Rst=fo(Object,"create"),Zh=Rst});function Ist(){this.__data__=Zh?Zh(null):{},this.size=0}var H1e,W1e=A(()=>{g5();H1e=Ist});function Dst(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}var Y1e,X1e=A(()=>{Y1e=Dst});function Pst(t){var e=this.__data__;if(Zh){var r=e[t];return r===Nst?void 0:r}return Ost.call(e,t)?e[t]:void 0}var Nst,Mst,Ost,j1e,K1e=A(()=>{g5();Nst="__lodash_hash_undefined__",Mst=Object.prototype,Ost=Mst.hasOwnProperty;j1e=Pst});function zst(t){var e=this.__data__;return Zh?e[t]!==void 0:Fst.call(e,t)}var Bst,Fst,Z1e,Q1e=A(()=>{g5();Bst=Object.prototype,Fst=Bst.hasOwnProperty;Z1e=zst});function Gst(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=Zh&&e===void 0?$st:e,this}var $st,J1e,eve=A(()=>{g5();$st="__lodash_hash_undefined__";J1e=Gst});function Sy(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e{W1e();X1e();K1e();Q1e();eve();Sy.prototype.clear=H1e;Sy.prototype.delete=Y1e;Sy.prototype.get=j1e;Sy.prototype.has=Z1e;Sy.prototype.set=J1e;sz=Sy});function Ust(){this.__data__=[],this.size=0}var rve,nve=A(()=>{rve=Ust});function qst(t,e){for(var r=t.length;r--;)if(Rc(t[r][0],e))return r;return-1}var Hd,v5=A(()=>{vy();Hd=qst});function Wst(t){var e=this.__data__,r=Hd(e,t);if(r<0)return!1;var n=e.length-1;return r==n?e.pop():Hst.call(e,r,1),--this.size,!0}var Vst,Hst,ave,ive=A(()=>{v5();Vst=Array.prototype,Hst=Vst.splice;ave=Wst});function Yst(t){var e=this.__data__,r=Hd(e,t);return r<0?void 0:e[r][1]}var sve,ove=A(()=>{v5();sve=Yst});function Xst(t){return Hd(this.__data__,t)>-1}var lve,uve=A(()=>{v5();lve=Xst});function jst(t,e){var r=this.__data__,n=Hd(r,t);return n<0?(++this.size,r.push([t,e])):r[n][1]=e,this}var cve,hve=A(()=>{v5();cve=jst});function _y(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e{nve();ive();ove();uve();hve();_y.prototype.clear=rve;_y.prototype.delete=ave;_y.prototype.get=sve;_y.prototype.has=lve;_y.prototype.set=cve;Wd=_y});var Kst,Yd,r8=A(()=>{zd();gu();Kst=fo(Ma,"Map"),Yd=Kst});function Zst(){this.size=0,this.__data__={hash:new sz,map:new(Yd||Wd),string:new sz}}var fve,dve=A(()=>{tve();y5();r8();fve=Zst});function Qst(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}var pve,mve=A(()=>{pve=Qst});function Jst(t,e){var r=t.__data__;return pve(e)?r[typeof e=="string"?"string":"hash"]:r.map}var Xd,x5=A(()=>{mve();Xd=Jst});function eot(t){var e=Xd(this,t).delete(t);return this.size-=e?1:0,e}var gve,vve=A(()=>{x5();gve=eot});function tot(t){return Xd(this,t).get(t)}var yve,xve=A(()=>{x5();yve=tot});function rot(t){return Xd(this,t).has(t)}var bve,wve=A(()=>{x5();bve=rot});function not(t,e){var r=Xd(this,t),n=r.size;return r.set(t,e),this.size+=r.size==n?0:1,this}var kve,Tve=A(()=>{x5();kve=not});function Ay(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e{dve();vve();xve();wve();Tve();Ay.prototype.clear=fve;Ay.prototype.delete=gve;Ay.prototype.get=yve;Ay.prototype.has=bve;Ay.prototype.set=kve;bm=Ay});function oz(t,e){if(typeof t!="function"||e!=null&&typeof e!="function")throw new TypeError(aot);var r=function(){var n=arguments,a=e?e.apply(this,n):n[0],i=r.cache;if(i.has(a))return i.get(a);var s=t.apply(this,n);return r.cache=i.set(a,s)||i,s};return r.cache=new(oz.Cache||bm),r}var aot,Eve,Cve=A(()=>{n8();aot="Expected a function";oz.Cache=bm;Eve=oz});function sot(t){var e=Eve(t,function(n){return r.size===iot&&r.clear(),n}),r=e.cache;return e}var iot,Sve,_ve=A(()=>{Cve();iot=500;Sve=sot});var oot,lot,uot,Ave,Lve=A(()=>{_ve();oot=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,lot=/\\(\\)?/g,uot=Sve(function(t){var e=[];return t.charCodeAt(0)===46&&e.push(""),t.replace(oot,function(r,n,a,i){e.push(a?i.replace(lot,"$1"):n||r)}),e}),Ave=uot});function cot(t){return t==null?"":Mge(t)}var Rve,Ive=A(()=>{Oge();Rve=cot});function hot(t,e){return Bt(t)?t:Cy(t,e)?[t]:Ave(Rve(t))}var jd,b5=A(()=>{fa();t8();Lve();Ive();jd=hot});function dot(t){if(typeof t=="string"||Fd(t))return t;var e=t+"";return e=="0"&&1/t==-fot?"-0":e}var fot,Oc,Ly=A(()=>{o5();fot=1/0;Oc=dot});function pot(t,e){e=jd(e,t);for(var r=0,n=e.length;t!=null&&r{b5();Ly();Ry=pot});function mot(t,e,r){var n=t==null?void 0:Ry(t,e);return n===void 0?r:n}var Dve,Nve=A(()=>{a8();Dve=mot});function got(t,e){for(var r=-1,n=e.length,a=t.length;++r{Iy=got});function vot(t){return Bt(t)||qd(t)||!!(Mve&&t&&t[Mve])}var Mve,Ove,Pve=A(()=>{xm();h5();fa();Mve=xi?xi.isConcatSpreadable:void 0;Ove=vot});function Bve(t,e,r,n,a){var i=-1,s=t.length;for(r||(r=Ove),a||(a=[]);++i0&&r(o)?e>1?Bve(o,e-1,r,n,a):Iy(a,o):n||(a[a.length]=o)}return a}var Dy,s8=A(()=>{i8();Pve();Dy=Bve});function yot(t){var e=t==null?0:t.length;return e?Dy(t,1):[]}var ja,Fve=A(()=>{s8();ja=yot});var xot,o8,lz=A(()=>{az();xot=J_(Object.getPrototypeOf,Object),o8=xot});function bot(t,e,r){var n=-1,a=t.length;e<0&&(e=-e>a?0:a+e),r=r>a?a:r,r<0&&(r+=a),a=e>r?0:r-e>>>0,e>>>=0;for(var i=Array(a);++n{l8=bot});function wot(t,e,r,n){var a=-1,i=t==null?0:t.length;for(n&&i&&(r=t[++a]);++a{zve=wot});function kot(){this.__data__=new Wd,this.size=0}var Gve,Uve=A(()=>{y5();Gve=kot});function Tot(t){var e=this.__data__,r=e.delete(t);return this.size=e.size,r}var qve,Vve=A(()=>{qve=Tot});function Eot(t){return this.__data__.get(t)}var Hve,Wve=A(()=>{Hve=Eot});function Cot(t){return this.__data__.has(t)}var Yve,Xve=A(()=>{Yve=Cot});function _ot(t,e){var r=this.__data__;if(r instanceof Wd){var n=r.__data__;if(!Yd||n.length{y5();r8();n8();Sot=200;jve=_ot});function Ny(t){var e=this.__data__=new Wd(t);this.size=e.size}var Kd,u8=A(()=>{y5();Uve();Vve();Wve();Xve();Kve();Ny.prototype.clear=Gve;Ny.prototype.delete=qve;Ny.prototype.get=Hve;Ny.prototype.has=Yve;Ny.prototype.set=jve;Kd=Ny});function Aot(t,e){return t&&Ic(e,Sn(e),t)}var Zve,Qve=A(()=>{yy();Mc();Zve=Aot});function Lot(t,e){return t&&Ic(e,Vd(e),t)}var Jve,eye=A(()=>{yy();m5();Jve=Lot});function Iot(t,e){if(e)return t.slice();var r=t.length,n=nye?nye(r):new t.constructor(r);return t.copy(n),n}var aye,tye,Rot,rye,nye,iye,sye=A(()=>{gu();aye=typeof exports=="object"&&exports&&!exports.nodeType&&exports,tye=aye&&typeof module=="object"&&module&&!module.nodeType&&module,Rot=tye&&tye.exports===aye,rye=Rot?Ma.Buffer:void 0,nye=rye?rye.allocUnsafe:void 0;iye=Iot});function Dot(t,e){for(var r=-1,n=t==null?0:t.length,a=0,i=[];++r{My=Dot});function Not(){return[]}var h8,cz=A(()=>{h8=Not});var Mot,Oot,oye,Pot,Oy,f8=A(()=>{c8();cz();Mot=Object.prototype,Oot=Mot.propertyIsEnumerable,oye=Object.getOwnPropertySymbols,Pot=oye?function(t){return t==null?[]:(t=Object(t),My(oye(t),function(e){return Oot.call(t,e)}))}:h8,Oy=Pot});function Bot(t,e){return Ic(t,Oy(t),e)}var lye,uye=A(()=>{yy();f8();lye=Bot});var Fot,zot,d8,hz=A(()=>{i8();lz();f8();cz();Fot=Object.getOwnPropertySymbols,zot=Fot?function(t){for(var e=[];t;)Iy(e,Oy(t)),t=o8(t);return e}:h8,d8=zot});function $ot(t,e){return Ic(t,d8(t),e)}var cye,hye=A(()=>{yy();hz();cye=$ot});function Got(t,e,r){var n=e(t);return Bt(t)?n:Iy(n,r(t))}var p8,fz=A(()=>{i8();fa();p8=Got});function Uot(t){return p8(t,Sn,Oy)}var w5,dz=A(()=>{fz();f8();Mc();w5=Uot});function qot(t){return p8(t,Vd,d8)}var m8,pz=A(()=>{fz();hz();m5();m8=qot});var Vot,g8,fye=A(()=>{zd();gu();Vot=fo(Ma,"DataView"),g8=Vot});var Hot,v8,dye=A(()=>{zd();gu();Hot=fo(Ma,"Promise"),v8=Hot});var Wot,Zd,mz=A(()=>{zd();gu();Wot=fo(Ma,"Set"),Zd=Wot});var pye,Yot,mye,gye,vye,yye,Xot,jot,Kot,Zot,Qot,wm,bu,Py=A(()=>{fye();r8();dye();mz();e1e();Bd();jF();pye="[object Map]",Yot="[object Object]",mye="[object Promise]",gye="[object Set]",vye="[object WeakMap]",yye="[object DataView]",Xot=jh(g8),jot=jh(Yd),Kot=jh(v8),Zot=jh(Zd),Qot=jh(q_),wm=As;(g8&&wm(new g8(new ArrayBuffer(1)))!=yye||Yd&&wm(new Yd)!=pye||v8&&wm(v8.resolve())!=mye||Zd&&wm(new Zd)!=gye||q_&&wm(new q_)!=vye)&&(wm=function(t){var e=As(t),r=e==Yot?t.constructor:void 0,n=r?jh(r):"";if(n)switch(n){case Xot:return yye;case jot:return pye;case Kot:return mye;case Zot:return gye;case Qot:return vye}return e});bu=wm});function tlt(t){var e=t.length,r=new t.constructor(e);return e&&typeof t[0]=="string"&&elt.call(t,"index")&&(r.index=t.index,r.input=t.input),r}var Jot,elt,xye,bye=A(()=>{Jot=Object.prototype,elt=Jot.hasOwnProperty;xye=tlt});var rlt,By,gz=A(()=>{gu();rlt=Ma.Uint8Array,By=rlt});function nlt(t){var e=new t.constructor(t.byteLength);return new By(e).set(new By(t)),e}var Fy,y8=A(()=>{gz();Fy=nlt});function alt(t,e){var r=e?Fy(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.byteLength)}var wye,kye=A(()=>{y8();wye=alt});function slt(t){var e=new t.constructor(t.source,ilt.exec(t));return e.lastIndex=t.lastIndex,e}var ilt,Tye,Eye=A(()=>{ilt=/\w*$/;Tye=slt});function olt(t){return Sye?Object(Sye.call(t)):{}}var Cye,Sye,_ye,Aye=A(()=>{xm();Cye=xi?xi.prototype:void 0,Sye=Cye?Cye.valueOf:void 0;_ye=olt});function llt(t,e){var r=e?Fy(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.length)}var Lye,Rye=A(()=>{y8();Lye=llt});function Alt(t,e,r){var n=t.constructor;switch(e){case vlt:return Fy(t);case ult:case clt:return new n(+t);case ylt:return wye(t,r);case xlt:case blt:case wlt:case klt:case Tlt:case Elt:case Clt:case Slt:case _lt:return Lye(t,r);case hlt:return new n;case flt:case mlt:return new n(t);case dlt:return Tye(t);case plt:return new n;case glt:return _ye(t)}}var ult,clt,hlt,flt,dlt,plt,mlt,glt,vlt,ylt,xlt,blt,wlt,klt,Tlt,Elt,Clt,Slt,_lt,Iye,Dye=A(()=>{y8();kye();Eye();Aye();Rye();ult="[object Boolean]",clt="[object Date]",hlt="[object Map]",flt="[object Number]",dlt="[object RegExp]",plt="[object Set]",mlt="[object String]",glt="[object Symbol]",vlt="[object ArrayBuffer]",ylt="[object DataView]",xlt="[object Float32Array]",blt="[object Float64Array]",wlt="[object Int8Array]",klt="[object Int16Array]",Tlt="[object Int32Array]",Elt="[object Uint8Array]",Clt="[object Uint8ClampedArray]",Slt="[object Uint16Array]",_lt="[object Uint32Array]";Iye=Alt});function Llt(t){return typeof t.constructor=="function"&&!Dc(t)?r1e(o8(t)):{}}var Nye,Mye=A(()=>{n1e();lz();wy();Nye=Llt});function Ilt(t){return ba(t)&&bu(t)==Rlt}var Rlt,Oye,Pye=A(()=>{Py();vu();Rlt="[object Map]";Oye=Ilt});var Bye,Dlt,Fye,zye=A(()=>{Pye();ky();p5();Bye=Tl&&Tl.isMap,Dlt=Bye?Nc(Bye):Oye,Fye=Dlt});function Mlt(t){return ba(t)&&bu(t)==Nlt}var Nlt,$ye,Gye=A(()=>{Py();vu();Nlt="[object Set]";$ye=Mlt});var Uye,Olt,qye,Vye=A(()=>{Gye();ky();p5();Uye=Tl&&Tl.isSet,Olt=Uye?Nc(Uye):$ye,qye=Olt});function x8(t,e,r,n,a,i){var s,o=e&Plt,l=e&Blt,u=e&Flt;if(r&&(s=a?r(t,n,a,i):r(t)),s!==void 0)return s;if(!aa(t))return t;var h=Bt(t);if(h){if(s=xye(t),!o)return s1e(t,s)}else{var f=bu(t),d=f==Wye||f==qlt;if(Kh(t))return iye(t,o);if(f==Yye||f==Hye||d&&!a){if(s=l||d?{}:Nye(t),!o)return l?cye(t,Jve(s,t)):lye(t,Zve(s,t))}else{if(!_n[f])return a?t:{};s=Iye(t,f,o)}}i||(i=new Kd);var p=i.get(t);if(p)return p;i.set(t,s),qye(t)?t.forEach(function(v){s.add(x8(v,e,r,v,t,i))}):Fye(t)&&t.forEach(function(v,y){s.set(y,x8(v,e,r,y,t,i))});var m=u?l?m8:w5:l?Vd:Sn,g=h?void 0:m(t);return V_(g||t,function(v,y){g&&(y=v,v=t[y]),Gd(s,y,x8(v,e,r,y,t,i))}),s}var Plt,Blt,Flt,Hye,zlt,$lt,Glt,Ult,Wye,qlt,Vlt,Hlt,Yye,Wlt,Ylt,Xlt,jlt,Klt,Zlt,Qlt,Jlt,eut,tut,rut,nut,aut,iut,sut,out,_n,Xye,jye=A(()=>{u8();QF();u5();Qve();eye();sye();o1e();uye();hye();dz();pz();Py();bye();Dye();Mye();fa();f5();zye();yu();Vye();Mc();m5();Plt=1,Blt=2,Flt=4,Hye="[object Arguments]",zlt="[object Array]",$lt="[object Boolean]",Glt="[object Date]",Ult="[object Error]",Wye="[object Function]",qlt="[object GeneratorFunction]",Vlt="[object Map]",Hlt="[object Number]",Yye="[object Object]",Wlt="[object RegExp]",Ylt="[object Set]",Xlt="[object String]",jlt="[object Symbol]",Klt="[object WeakMap]",Zlt="[object ArrayBuffer]",Qlt="[object DataView]",Jlt="[object Float32Array]",eut="[object Float64Array]",tut="[object Int8Array]",rut="[object Int16Array]",nut="[object Int32Array]",aut="[object Uint8Array]",iut="[object Uint8ClampedArray]",sut="[object Uint16Array]",out="[object Uint32Array]",_n={};_n[Hye]=_n[zlt]=_n[Zlt]=_n[Qlt]=_n[$lt]=_n[Glt]=_n[Jlt]=_n[eut]=_n[tut]=_n[rut]=_n[nut]=_n[Vlt]=_n[Hlt]=_n[Yye]=_n[Wlt]=_n[Ylt]=_n[Xlt]=_n[jlt]=_n[aut]=_n[iut]=_n[sut]=_n[out]=!0;_n[Ult]=_n[Wye]=_n[Klt]=!1;Xye=x8});function uut(t){return Xye(t,lut)}var lut,An,Kye=A(()=>{jye();lut=4;An=uut});function cut(t){for(var e=-1,r=t==null?0:t.length,n=0,a=[];++e{Pc=cut});function fut(t){return this.__data__.set(t,hut),this}var hut,Qye,Jye=A(()=>{hut="__lodash_hash_undefined__";Qye=fut});function dut(t){return this.__data__.has(t)}var e2e,t2e=A(()=>{e2e=dut});function b8(t){var e=-1,r=t==null?0:t.length;for(this.__data__=new bm;++e{n8();Jye();t2e();b8.prototype.add=b8.prototype.push=Qye;b8.prototype.has=e2e;zy=b8});function put(t,e){for(var r=-1,n=t==null?0:t.length;++r{k8=put});function mut(t,e){return t.has(e)}var $y,T8=A(()=>{$y=mut});function yut(t,e,r,n,a,i){var s=r&gut,o=t.length,l=e.length;if(o!=l&&!(s&&l>o))return!1;var u=i.get(t),h=i.get(e);if(u&&h)return u==e&&h==t;var f=-1,d=!0,p=r&vut?new zy:void 0;for(i.set(t,e),i.set(e,t);++f{w8();vz();T8();gut=1,vut=2;E8=yut});function xut(t){var e=-1,r=Array(t.size);return t.forEach(function(n,a){r[++e]=[a,n]}),r}var r2e,n2e=A(()=>{r2e=xut});function but(t){var e=-1,r=Array(t.size);return t.forEach(function(n){r[++e]=n}),r}var Gy,C8=A(()=>{Gy=but});function Mut(t,e,r,n,a,i,s){switch(r){case Nut:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case Dut:return!(t.byteLength!=e.byteLength||!i(new By(t),new By(e)));case Tut:case Eut:case _ut:return Rc(+t,+e);case Cut:return t.name==e.name&&t.message==e.message;case Aut:case Rut:return t==e+"";case Sut:var o=r2e;case Lut:var l=n&wut;if(o||(o=Gy),t.size!=e.size&&!l)return!1;var u=s.get(t);if(u)return u==e;n|=kut,s.set(t,e);var h=E8(o(t),o(e),n,a,i,s);return s.delete(t),h;case Iut:if(xz)return xz.call(t)==xz.call(e)}return!1}var wut,kut,Tut,Eut,Cut,Sut,_ut,Aut,Lut,Rut,Iut,Dut,Nut,a2e,xz,i2e,s2e=A(()=>{xm();gz();vy();yz();n2e();C8();wut=1,kut=2,Tut="[object Boolean]",Eut="[object Date]",Cut="[object Error]",Sut="[object Map]",_ut="[object Number]",Aut="[object RegExp]",Lut="[object Set]",Rut="[object String]",Iut="[object Symbol]",Dut="[object ArrayBuffer]",Nut="[object DataView]",a2e=xi?xi.prototype:void 0,xz=a2e?a2e.valueOf:void 0;i2e=Mut});function Fut(t,e,r,n,a,i){var s=r&Out,o=w5(t),l=o.length,u=w5(e),h=u.length;if(l!=h&&!s)return!1;for(var f=l;f--;){var d=o[f];if(!(s?d in e:But.call(e,d)))return!1}var p=i.get(t),m=i.get(e);if(p&&m)return p==e&&m==t;var g=!0;i.set(t,e),i.set(e,t);for(var v=s;++f{dz();Out=1,Put=Object.prototype,But=Put.hasOwnProperty;o2e=Fut});function Gut(t,e,r,n,a,i){var s=Bt(t),o=Bt(e),l=s?c2e:bu(t),u=o?c2e:bu(e);l=l==u2e?S8:l,u=u==u2e?S8:u;var h=l==S8,f=u==S8,d=l==u;if(d&&Kh(t)){if(!Kh(e))return!1;s=!0,h=!1}if(d&&!h)return i||(i=new Kd),s||Ty(t)?E8(t,e,r,n,a,i):i2e(t,e,l,r,n,a,i);if(!(r&zut)){var p=h&&h2e.call(t,"__wrapped__"),m=f&&h2e.call(e,"__wrapped__");if(p||m){var g=p?t.value():t,v=m?e.value():e;return i||(i=new Kd),a(g,v,r,n,i)}}return d?(i||(i=new Kd),o2e(t,e,r,n,a,i)):!1}var zut,u2e,c2e,S8,$ut,h2e,f2e,d2e=A(()=>{u8();yz();s2e();l2e();Py();fa();f5();Z_();zut=1,u2e="[object Arguments]",c2e="[object Array]",S8="[object Object]",$ut=Object.prototype,h2e=$ut.hasOwnProperty;f2e=Gut});function p2e(t,e,r,n,a){return t===e?!0:t==null||e==null||!ba(t)&&!ba(e)?t!==t&&e!==e:f2e(t,e,r,n,p2e,a)}var _8,bz=A(()=>{d2e();vu();_8=p2e});function Vut(t,e,r,n){var a=r.length,i=a,s=!n;if(t==null)return!i;for(t=Object(t);a--;){var o=r[a];if(s&&o[2]?o[1]!==t[o[0]]:!(o[0]in t))return!1}for(;++a{u8();bz();Uut=1,qut=2;m2e=Vut});function Hut(t){return t===t&&!aa(t)}var A8,wz=A(()=>{yu();A8=Hut});function Wut(t){for(var e=Sn(t),r=e.length;r--;){var n=e[r],a=t[n];e[r]=[n,a,A8(a)]}return e}var v2e,y2e=A(()=>{wz();Mc();v2e=Wut});function Yut(t,e){return function(r){return r==null?!1:r[t]===e&&(e!==void 0||t in Object(r))}}var L8,kz=A(()=>{L8=Yut});function Xut(t){var e=v2e(t);return e.length==1&&e[0][2]?L8(e[0][0],e[0][1]):function(r){return r===t||m2e(r,t,e)}}var x2e,b2e=A(()=>{g2e();y2e();kz();x2e=Xut});function jut(t,e){return t!=null&&e in Object(t)}var w2e,k2e=A(()=>{w2e=jut});function Kut(t,e,r){e=jd(e,t);for(var n=-1,a=e.length,i=!1;++n{b5();h5();fa();l5();K_();Ly();R8=Kut});function Zut(t,e){return t!=null&&R8(t,e,w2e)}var T2e,E2e=A(()=>{k2e();Tz();T2e=Zut});function ect(t,e){return Cy(t)&&A8(e)?L8(Oc(t),e):function(r){var n=Dve(r,t);return n===void 0&&n===e?T2e(r,t):_8(e,n,Qut|Jut)}}var Qut,Jut,C2e,S2e=A(()=>{bz();Nve();E2e();t8();wz();kz();Ly();Qut=1,Jut=2;C2e=ect});function tct(t){return function(e){return e?.[t]}}var _2e,A2e=A(()=>{_2e=tct});function rct(t){return function(e){return Ry(e,t)}}var L2e,R2e=A(()=>{a8();L2e=rct});function nct(t){return Cy(t)?_2e(Oc(t)):L2e(t)}var I2e,D2e=A(()=>{A2e();R2e();t8();Ly();I2e=nct});function act(t){return typeof t=="function"?t:t==null?kl:typeof t=="object"?Bt(t)?C2e(t[0],t[1]):x2e(t):I2e(t)}var Pa,wu=A(()=>{b2e();S2e();dy();fa();D2e();Pa=act});function ict(t,e,r,n){for(var a=-1,i=t==null?0:t.length;++a{N2e=ict});function sct(t){return function(e,r,n){for(var a=-1,i=Object(e),s=n(e),o=s.length;o--;){var l=s[t?o:++a];if(r(i[l],l,i)===!1)break}return e}}var O2e,P2e=A(()=>{O2e=sct});var oct,B2e,F2e=A(()=>{P2e();oct=O2e(),B2e=oct});function lct(t,e){return t&&B2e(t,e,Sn)}var z2e,$2e=A(()=>{F2e();Mc();z2e=lct});function uct(t,e){return function(r,n){if(r==null)return r;if(!Oa(r))return t(r,n);for(var a=r.length,i=e?a:-1,s=Object(r);(e?i--:++i{xu();G2e=uct});var cct,po,Qd=A(()=>{$2e();U2e();cct=G2e(z2e),po=cct});function hct(t,e,r,n){return po(t,function(a,i,s){e(n,a,r(a),s)}),n}var q2e,V2e=A(()=>{Qd();q2e=hct});function fct(t,e){return function(r,n){var a=Bt(r)?N2e:q2e,i=e?e():{};return a(r,t,Pa(n,2),i)}}var H2e,W2e=A(()=>{M2e();V2e();wu();fa();H2e=fct});var Y2e,dct,pct,Uy,X2e=A(()=>{j_();vy();c5();m5();Y2e=Object.prototype,dct=Y2e.hasOwnProperty,pct=xy(function(t,e){t=Object(t);var r=-1,n=e.length,a=n>2?e[2]:void 0;for(a&&Ud(e[0],e[1],a)&&(n=1);++r{xu();vu();Ez=mct});function gct(t,e,r){for(var n=-1,a=t==null?0:t.length;++n{I8=gct});function yct(t,e,r,n){var a=-1,i=Y_,s=!0,o=t.length,l=[],u=e.length;if(!o)return l;r&&(e=Ac(e,Nc(r))),n?(i=I8,s=!1):e.length>=vct&&(i=$y,s=!1,e=new zy(e));e:for(;++a{w8();ez();Cz();hy();ky();T8();vct=200;K2e=yct});var xct,Jd,Q2e=A(()=>{Z2e();s8();j_();j2e();xct=xy(function(t,e){return Ez(t)?K2e(t,Dy(e,1,Ez,!0)):[]}),Jd=xct});function bct(t){var e=t==null?0:t.length;return e?t[e-1]:void 0}var Bc,J2e=A(()=>{Bc=bct});function wct(t,e,r){var n=t==null?0:t.length;return n?(e=r||e===void 0?1:Lc(e),l8(t,e<0?0:e,n)):[]}var wa,exe=A(()=>{uz();fy();wa=wct});function kct(t,e,r){var n=t==null?0:t.length;return n?(e=r||e===void 0?1:Lc(e),e=n-e,l8(t,0,e<0?0:e)):[]}var Qh,txe=A(()=>{uz();fy();Qh=kct});function Tct(t){return typeof t=="function"?t:kl}var rxe,nxe=A(()=>{dy();rxe=Tct});function Ect(t,e){var r=Bt(t)?V_:po;return r(t,rxe(e))}var Nt,axe=A(()=>{QF();Qd();nxe();fa();Nt=Ect});function Cct(t,e){for(var r=-1,n=t==null?0:t.length;++r{ixe=Cct});function Sct(t,e){var r=!0;return po(t,function(n,a,i){return r=!!e(n,a,i),r}),r}var oxe,lxe=A(()=>{Qd();oxe=Sct});function _ct(t,e,r){var n=Bt(t)?ixe:oxe;return r&&Ud(t,e,r)&&(e=void 0),n(t,Pa(e,3))}var mo,uxe=A(()=>{sxe();lxe();wu();fa();c5();mo=_ct});function Act(t,e){var r=[];return po(t,function(n,a,i){e(n,a,i)&&r.push(n)}),r}var D8,Sz=A(()=>{Qd();D8=Act});function Lct(t,e){var r=Bt(t)?My:D8;return r(t,Pa(e,3))}var os,cxe=A(()=>{c8();Sz();wu();fa();os=Lct});function Rct(t){return function(e,r,n){var a=Object(e);if(!Oa(e)){var i=Pa(r,3);e=Sn(e),r=function(o){return i(a[o],o,a)}}var s=t(e,r,n);return s>-1?a[i?e[s]:s]:void 0}}var hxe,fxe=A(()=>{wu();xu();Mc();hxe=Rct});function Dct(t,e,r){var n=t==null?0:t.length;if(!n)return-1;var a=r==null?0:Lc(r);return a<0&&(a=Ict(n+a,0)),H_(t,Pa(e,3),a)}var Ict,dxe,pxe=A(()=>{JF();wu();fy();Ict=Math.max;dxe=Dct});var Nct,Fc,mxe=A(()=>{fxe();pxe();Nct=hxe(dxe),Fc=Nct});function Mct(t){return t&&t.length?t[0]:void 0}var bi,gxe=A(()=>{bi=Mct});var vxe=A(()=>{gxe()});function Oct(t,e){var r=-1,n=Oa(t)?Array(t.length):[];return po(t,function(a,i,s){n[++r]=e(a,i,s)}),n}var yxe,xxe=A(()=>{Qd();xu();yxe=Oct});function Pct(t,e){var r=Bt(t)?Ac:yxe;return r(t,Pa(e,3))}var Rt,_z=A(()=>{hy();wu();xxe();fa();Rt=Pct});function Bct(t,e){return Dy(Rt(t,e),1)}var Rs,bxe=A(()=>{s8();_z();Rs=Bct});var Fct,zct,$ct,Az,wxe=A(()=>{X_();W2e();Fct=Object.prototype,zct=Fct.hasOwnProperty,$ct=H2e(function(t,e,r){zct.call(t,r)?t[r].push(e):gy(t,r,[e])}),Az=$ct});function qct(t,e){return t!=null&&Uct.call(t,e)}var Gct,Uct,kxe,Txe=A(()=>{Gct=Object.prototype,Uct=Gct.hasOwnProperty;kxe=qct});function Vct(t,e){return t!=null&&R8(t,e,kxe)}var Mt,Exe=A(()=>{Txe();Tz();Mt=Vct});function Wct(t){return typeof t=="string"||!Bt(t)&&ba(t)&&As(t)==Hct}var Hct,Is,Lz=A(()=>{Bd();fa();vu();Hct="[object String]";Is=Wct});function Yct(t,e){return Ac(e,function(r){return t[r]})}var Cxe,Sxe=A(()=>{hy();Cxe=Yct});function Xct(t){return t==null?[]:Cxe(t,Sn(t))}var cn,Rz=A(()=>{Sxe();Mc();cn=Xct});function Kct(t,e,r,n){t=Oa(t)?t:cn(t),r=r&&!n?Lc(r):0;var a=t.length;return r<0&&(r=jct(a+r,0)),Is(t)?r<=a&&t.indexOf(e,r)>-1:!!a&&my(t,e,r)>-1}var jct,da,_xe=A(()=>{W_();xu();Lz();fy();Rz();jct=Math.max;da=Kct});function Qct(t,e,r){var n=t==null?0:t.length;if(!n)return-1;var a=r==null?0:Lc(r);return a<0&&(a=Zct(n+a,0)),my(t,e,a)}var Zct,N8,Axe=A(()=>{W_();fy();Zct=Math.max;N8=Qct});function nht(t){if(t==null)return!0;if(Oa(t)&&(Bt(t)||typeof t=="string"||typeof t.splice=="function"||Kh(t)||Ty(t)||qd(t)))return!t.length;var e=bu(t);if(e==Jct||e==eht)return!t.size;if(Dc(t))return!e8(t).length;for(var r in t)if(rht.call(t,r))return!1;return!0}var Jct,eht,tht,rht,kr,Lxe=A(()=>{iz();Py();h5();fa();xu();f5();wy();Z_();Jct="[object Map]",eht="[object Set]",tht=Object.prototype,rht=tht.hasOwnProperty;kr=nht});function iht(t){return ba(t)&&As(t)==aht}var aht,Rxe,Ixe=A(()=>{Bd();vu();aht="[object RegExp]";Rxe=iht});var Dxe,sht,zc,Nxe=A(()=>{Ixe();ky();p5();Dxe=Tl&&Tl.isRegExp,sht=Dxe?Nc(Dxe):Rxe,zc=sht});function oht(t){return t===void 0}var ls,Mxe=A(()=>{ls=oht});function uht(t){if(typeof t!="function")throw new TypeError(lht);return function(){var e=arguments;switch(e.length){case 0:return!t.call(this);case 1:return!t.call(this,e[0]);case 2:return!t.call(this,e[0],e[1]);case 3:return!t.call(this,e[0],e[1],e[2])}return!t.apply(this,e)}}var lht,Oxe,Pxe=A(()=>{lht="Expected a function";Oxe=uht});function cht(t,e,r,n){if(!aa(t))return t;e=jd(e,t);for(var a=-1,i=e.length,s=i-1,o=t;o!=null&&++a{u5();b5();l5();yu();Ly();Bxe=cht});function hht(t,e,r){for(var n=-1,a=e.length,i={};++n{a8();Fxe();b5();zxe=hht});function fht(t,e){if(t==null)return{};var r=Ac(m8(t),function(n){return[n]});return e=Pa(e),zxe(t,r,function(n,a){return e(n,a[0])})}var Iz,Gxe=A(()=>{hy();wu();$xe();pz();Iz=fht});function dht(t,e,r,n,a){return a(t,function(i,s,o){r=n?(n=!1,i):e(r,i,s,o)}),r}var Uxe,qxe=A(()=>{Uxe=dht});function pht(t,e,r){var n=Bt(t)?zve:Uxe,a=arguments.length<3;return n(t,Pa(e,4),r,a,po)}var Ba,Vxe=A(()=>{$ve();Qd();wu();qxe();fa();Ba=pht});function mht(t,e){var r=Bt(t)?My:D8;return r(t,Oxe(Pa(e,3)))}var e0,Hxe=A(()=>{c8();Sz();wu();fa();Pxe();e0=mht});function ght(t,e){var r;return po(t,function(n,a,i){return r=e(n,a,i),!r}),!!r}var Wxe,Yxe=A(()=>{Qd();Wxe=ght});function vht(t,e,r){var n=Bt(t)?k8:Wxe;return r&&Ud(t,e,r)&&(e=void 0),n(t,Pa(e,3))}var Dz,Xxe=A(()=>{vz();wu();Yxe();fa();c5();Dz=vht});var yht,xht,jxe,Kxe=A(()=>{mz();KF();C8();yht=1/0,xht=Zd&&1/Gy(new Zd([,-0]))[1]==yht?function(t){return new Zd(t)}:ia,jxe=xht});function wht(t,e,r){var n=-1,a=Y_,i=t.length,s=!0,o=[],l=o;if(r)s=!1,a=I8;else if(i>=bht){var u=e?null:jxe(t);if(u)return Gy(u);s=!1,a=$y,l=new zy}else l=e?[]:o;e:for(;++n{w8();ez();Cz();T8();Kxe();C8();bht=200;Zxe=wht});function kht(t){return t&&t.length?Zxe(t):[]}var qy,Jxe=A(()=>{Qxe();qy=kht});var hn=A(()=>{$1e();Kye();Zye();X2e();Q2e();exe();txe();uxe();cxe();mxe();vxe();bxe();Fve();axe();wxe();Exe();dy();_xe();Axe();fa();Lxe();G_();yu();Nxe();Lz();Mxe();Mc();J2e();_z();KF();Gxe();Vxe();Hxe();Xxe();Jxe();Rz();});function Vy(t){console&&console.error&&console.error(`Error: ${t}`)}function k5(t){console&&console.warn&&console.warn(`Warning: ${t}`)}var ebe=A(()=>{});function T5(t){let e=new Date().getTime(),r=t();return{time:new Date().getTime()-e,value:r}}var tbe=A(()=>{});function E5(t){function e(){}e.prototype=t;let r=new e;function n(){return typeof r.bar}return n(),n(),t;(0,eval)(t)}var rbe=A(()=>{});var Hy=A(()=>{ebe();tbe();rbe()});var Tht,M8,Nz=A(()=>{Tht=typeof global=="object"&&global&&global.Object===Object&&global,M8=Tht});var Eht,Cht,wi,$c=A(()=>{Nz();Eht=typeof self=="object"&&self&&self.Object===Object&&self,Cht=M8||Eht||Function("return this")(),wi=Cht});var Sht,El,C5=A(()=>{$c();Sht=wi.Symbol,El=Sht});function Lht(t){var e=_ht.call(t,S5),r=t[S5];try{t[S5]=void 0;var n=!0}catch{}var a=Aht.call(t);return n&&(e?t[S5]=r:delete t[S5]),a}var nbe,_ht,Aht,S5,abe,ibe=A(()=>{C5();nbe=Object.prototype,_ht=nbe.hasOwnProperty,Aht=nbe.toString,S5=El?El.toStringTag:void 0;abe=Lht});function Dht(t){return Iht.call(t)}var Rht,Iht,sbe,obe=A(()=>{Rht=Object.prototype,Iht=Rht.toString;sbe=Dht});function Oht(t){return t==null?t===void 0?Mht:Nht:lbe&&lbe in Object(t)?abe(t):sbe(t)}var Nht,Mht,lbe,Ds,t0=A(()=>{C5();ibe();obe();Nht="[object Null]",Mht="[object Undefined]",lbe=El?El.toStringTag:void 0;Ds=Oht});function Pht(t){return t!=null&&typeof t=="object"}var Ns,r0=A(()=>{Ns=Pht});function Fht(t){return typeof t=="symbol"||Ns(t)&&Ds(t)==Bht}var Bht,n0,_5=A(()=>{t0();r0();Bht="[object Symbol]";n0=Fht});function zht(t,e){for(var r=-1,n=t==null?0:t.length,a=Array(n);++r{a0=zht});var $ht,yn,go=A(()=>{$ht=Array.isArray,yn=$ht});function hbe(t){if(typeof t=="string")return t;if(yn(t))return a0(t,hbe)+"";if(n0(t))return cbe?cbe.call(t):"";var e=t+"";return e=="0"&&1/t==-Ght?"-0":e}var Ght,ube,cbe,fbe,dbe=A(()=>{C5();A5();go();_5();Ght=1/0,ube=El?El.prototype:void 0,cbe=ube?ube.toString:void 0;fbe=hbe});function qht(t){for(var e=t.length;e--&&Uht.test(t.charAt(e)););return e}var Uht,pbe,mbe=A(()=>{Uht=/\s/;pbe=qht});function Hht(t){return t&&t.slice(0,pbe(t)+1).replace(Vht,"")}var Vht,gbe,vbe=A(()=>{mbe();Vht=/^\s+/;gbe=Hht});function Wht(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}var us,i0=A(()=>{us=Wht});function Zht(t){if(typeof t=="number")return t;if(n0(t))return ybe;if(us(t)){var e=typeof t.valueOf=="function"?t.valueOf():t;t=us(e)?e+"":e}if(typeof t!="string")return t===0?t:+t;t=gbe(t);var r=Xht.test(t);return r||jht.test(t)?Kht(t.slice(2),r?2:8):Yht.test(t)?ybe:+t}var ybe,Yht,Xht,jht,Kht,xbe,bbe=A(()=>{vbe();i0();_5();ybe=NaN,Yht=/^[-+]0x[0-9a-f]+$/i,Xht=/^0b[01]+$/i,jht=/^0o[0-7]+$/i,Kht=parseInt;xbe=Zht});function Jht(t){if(!t)return t===0?t:0;if(t=xbe(t),t===wbe||t===-wbe){var e=t<0?-1:1;return e*Qht}return t===t?t:0}var wbe,Qht,kbe,Tbe=A(()=>{bbe();wbe=1/0,Qht=17976931348623157e292;kbe=Jht});function eft(t){var e=kbe(t),r=e%1;return e===e?r?e-r:e:0}var Ebe,Cbe=A(()=>{Tbe();Ebe=eft});function tft(t){return t}var s0,L5=A(()=>{s0=tft});function sft(t){if(!us(t))return!1;var e=Ds(t);return e==nft||e==aft||e==rft||e==ift}var rft,nft,aft,ift,O8,Mz=A(()=>{t0();i0();rft="[object AsyncFunction]",nft="[object Function]",aft="[object GeneratorFunction]",ift="[object Proxy]";O8=sft});var oft,P8,Sbe=A(()=>{$c();oft=wi["__core-js_shared__"],P8=oft});function lft(t){return!!_be&&_be in t}var _be,Abe,Lbe=A(()=>{Sbe();_be=(function(){var t=/[^.]+$/.exec(P8&&P8.keys&&P8.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""})();Abe=lft});function hft(t){if(t!=null){try{return cft.call(t)}catch{}try{return t+""}catch{}}return""}var uft,cft,Jh,Oz=A(()=>{uft=Function.prototype,cft=uft.toString;Jh=hft});function xft(t){if(!us(t)||Abe(t))return!1;var e=O8(t)?yft:dft;return e.test(Jh(t))}var fft,dft,pft,mft,gft,vft,yft,Rbe,Ibe=A(()=>{Mz();Lbe();i0();Oz();fft=/[\\^$.*+?()[\]{}|]/g,dft=/^\[object .+?Constructor\]$/,pft=Function.prototype,mft=Object.prototype,gft=pft.toString,vft=mft.hasOwnProperty,yft=RegExp("^"+gft.call(vft).replace(fft,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");Rbe=xft});function bft(t,e){return t?.[e]}var Dbe,Nbe=A(()=>{Dbe=bft});function wft(t,e){var r=Dbe(t,e);return Rbe(r)?r:void 0}var vo,o0=A(()=>{Ibe();Nbe();vo=wft});var kft,B8,Mbe=A(()=>{o0();$c();kft=vo(wi,"WeakMap"),B8=kft});function Tft(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 Obe,Pbe=A(()=>{Obe=Tft});function _ft(t){var e=0,r=0;return function(){var n=Sft(),a=Cft-(n-r);if(r=n,a>0){if(++e>=Eft)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}var Eft,Cft,Sft,Bbe,Fbe=A(()=>{Eft=800,Cft=16,Sft=Date.now;Bbe=_ft});function Aft(t){return function(){return t}}var zbe,$be=A(()=>{zbe=Aft});var Lft,Wy,Pz=A(()=>{o0();Lft=(function(){try{var t=vo(Object,"defineProperty");return t({},"",{}),t}catch{}})(),Wy=Lft});var Rft,Gbe,Ube=A(()=>{$be();Pz();L5();Rft=Wy?function(t,e){return Wy(t,"toString",{configurable:!0,enumerable:!1,value:zbe(e),writable:!0})}:s0,Gbe=Rft});var Ift,qbe,Vbe=A(()=>{Ube();Fbe();Ift=Bbe(Gbe),qbe=Ift});function Dft(t,e){for(var r=-1,n=t==null?0:t.length;++r{Hbe=Dft});function Nft(t,e,r,n){for(var a=t.length,i=r+(n?1:-1);n?i--:++i{Ybe=Nft});function Mft(t){return t!==t}var jbe,Kbe=A(()=>{jbe=Mft});function Oft(t,e,r){for(var n=r-1,a=t.length;++n{Zbe=Oft});function Pft(t,e,r){return e===e?Zbe(t,e,r):Ybe(t,jbe,r)}var Jbe,e4e=A(()=>{Xbe();Kbe();Qbe();Jbe=Pft});function zft(t,e){var r=typeof t;return e=e??Bft,!!e&&(r=="number"||r!="symbol"&&Fft.test(t))&&t>-1&&t%1==0&&t{Bft=9007199254740991,Fft=/^(?:0|[1-9]\d*)$/;l0=zft});function $ft(t,e,r){e=="__proto__"&&Wy?Wy(t,e,{configurable:!0,enumerable:!0,value:r,writable:!0}):t[e]=r}var F8,Bz=A(()=>{Pz();F8=$ft});function Gft(t,e){return t===e||t!==t&&e!==e}var u0,I5=A(()=>{u0=Gft});function Vft(t,e,r){var n=t[e];(!(qft.call(t,e)&&u0(n,r))||r===void 0&&!(e in t))&&F8(t,e,r)}var Uft,qft,Yy,z8=A(()=>{Bz();I5();Uft=Object.prototype,qft=Uft.hasOwnProperty;Yy=Vft});function Hft(t,e,r,n){var a=!r;r||(r={});for(var i=-1,s=e.length;++i{z8();Bz();t4e=Hft});function Wft(t,e,r){return e=n4e(e===void 0?t.length-1:e,0),function(){for(var n=arguments,a=-1,i=n4e(n.length-e,0),s=Array(i);++a{Pbe();n4e=Math.max;a4e=Wft});function Yft(t,e){return qbe(a4e(t,e,s0),t+"")}var s4e,o4e=A(()=>{L5();i4e();Vbe();s4e=Yft});function jft(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=Xft}var Xft,Xy,$8=A(()=>{Xft=9007199254740991;Xy=jft});function Kft(t){return t!=null&&Xy(t.length)&&!O8(t)}var yo,c0=A(()=>{Mz();$8();yo=Kft});function Zft(t,e,r){if(!us(r))return!1;var n=typeof e;return(n=="number"?yo(r)&&l0(e,r.length):n=="string"&&e in r)?u0(r[e],t):!1}var jy,G8=A(()=>{I5();c0();R5();i0();jy=Zft});function Qft(t){return s4e(function(e,r){var n=-1,a=r.length,i=a>1?r[a-1]:void 0,s=a>2?r[2]:void 0;for(i=t.length>3&&typeof i=="function"?(a--,i):void 0,s&&jy(r[0],r[1],s)&&(i=a<3?void 0:i,a=1),e=Object(e);++n{o4e();G8();l4e=Qft});function edt(t){var e=t&&t.constructor,r=typeof e=="function"&&e.prototype||Jft;return t===r}var Jft,Ky,U8=A(()=>{Jft=Object.prototype;Ky=edt});function tdt(t,e){for(var r=-1,n=Array(t);++r{c4e=tdt});function ndt(t){return Ns(t)&&Ds(t)==rdt}var rdt,Fz,f4e=A(()=>{t0();r0();rdt="[object Arguments]";Fz=ndt});var d4e,adt,idt,sdt,q8,zz=A(()=>{f4e();r0();d4e=Object.prototype,adt=d4e.hasOwnProperty,idt=d4e.propertyIsEnumerable,sdt=Fz((function(){return arguments})())?Fz:function(t){return Ns(t)&&adt.call(t,"callee")&&!idt.call(t,"callee")},q8=sdt});function odt(){return!1}var p4e,m4e=A(()=>{p4e=odt});var y4e,g4e,ldt,v4e,udt,cdt,D5,$z=A(()=>{$c();m4e();y4e=typeof exports=="object"&&exports&&!exports.nodeType&&exports,g4e=y4e&&typeof module=="object"&&module&&!module.nodeType&&module,ldt=g4e&&g4e.exports===y4e,v4e=ldt?wi.Buffer:void 0,udt=v4e?v4e.isBuffer:void 0,cdt=udt||p4e,D5=cdt});function Odt(t){return Ns(t)&&Xy(t.length)&&!!Bn[Ds(t)]}var hdt,fdt,ddt,pdt,mdt,gdt,vdt,ydt,xdt,bdt,wdt,kdt,Tdt,Edt,Cdt,Sdt,_dt,Adt,Ldt,Rdt,Idt,Ddt,Ndt,Mdt,Bn,x4e,b4e=A(()=>{t0();$8();r0();hdt="[object Arguments]",fdt="[object Array]",ddt="[object Boolean]",pdt="[object Date]",mdt="[object Error]",gdt="[object Function]",vdt="[object Map]",ydt="[object Number]",xdt="[object Object]",bdt="[object RegExp]",wdt="[object Set]",kdt="[object String]",Tdt="[object WeakMap]",Edt="[object ArrayBuffer]",Cdt="[object DataView]",Sdt="[object Float32Array]",_dt="[object Float64Array]",Adt="[object Int8Array]",Ldt="[object Int16Array]",Rdt="[object Int32Array]",Idt="[object Uint8Array]",Ddt="[object Uint8ClampedArray]",Ndt="[object Uint16Array]",Mdt="[object Uint32Array]",Bn={};Bn[Sdt]=Bn[_dt]=Bn[Adt]=Bn[Ldt]=Bn[Rdt]=Bn[Idt]=Bn[Ddt]=Bn[Ndt]=Bn[Mdt]=!0;Bn[hdt]=Bn[fdt]=Bn[Edt]=Bn[ddt]=Bn[Cdt]=Bn[pdt]=Bn[mdt]=Bn[gdt]=Bn[vdt]=Bn[ydt]=Bn[xdt]=Bn[bdt]=Bn[wdt]=Bn[kdt]=Bn[Tdt]=!1;x4e=Odt});function Pdt(t){return function(e){return t(e)}}var V8,Gz=A(()=>{V8=Pdt});var w4e,N5,Bdt,Uz,Fdt,Zy,qz=A(()=>{Nz();w4e=typeof exports=="object"&&exports&&!exports.nodeType&&exports,N5=w4e&&typeof module=="object"&&module&&!module.nodeType&&module,Bdt=N5&&N5.exports===w4e,Uz=Bdt&&M8.process,Fdt=(function(){try{var t=N5&&N5.require&&N5.require("util").types;return t||Uz&&Uz.binding&&Uz.binding("util")}catch{}})(),Zy=Fdt});var k4e,zdt,H8,Vz=A(()=>{b4e();Gz();qz();k4e=Zy&&Zy.isTypedArray,zdt=k4e?V8(k4e):x4e,H8=zdt});function Udt(t,e){var r=yn(t),n=!r&&q8(t),a=!r&&!n&&D5(t),i=!r&&!n&&!a&&H8(t),s=r||n||a||i,o=s?c4e(t.length,String):[],l=o.length;for(var u in t)(e||Gdt.call(t,u))&&!(s&&(u=="length"||a&&(u=="offset"||u=="parent")||i&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||l0(u,l)))&&o.push(u);return o}var $dt,Gdt,W8,Hz=A(()=>{h4e();zz();go();$z();R5();Vz();$dt=Object.prototype,Gdt=$dt.hasOwnProperty;W8=Udt});function qdt(t,e){return function(r){return t(e(r))}}var Y8,Wz=A(()=>{Y8=qdt});var Vdt,T4e,E4e=A(()=>{Wz();Vdt=Y8(Object.keys,Object),T4e=Vdt});function Ydt(t){if(!Ky(t))return T4e(t);var e=[];for(var r in Object(t))Wdt.call(t,r)&&r!="constructor"&&e.push(r);return e}var Hdt,Wdt,C4e,S4e=A(()=>{U8();E4e();Hdt=Object.prototype,Wdt=Hdt.hasOwnProperty;C4e=Ydt});function Xdt(t){return yo(t)?W8(t):C4e(t)}var Gc,Qy=A(()=>{Hz();S4e();c0();Gc=Xdt});var jdt,Kdt,Zdt,Cl,_4e=A(()=>{z8();r4e();u4e();c0();U8();Qy();jdt=Object.prototype,Kdt=jdt.hasOwnProperty,Zdt=l4e(function(t,e){if(Ky(e)||yo(e)){t4e(e,Gc(e),t);return}for(var r in e)Kdt.call(e,r)&&Yy(t,r,e[r])}),Cl=Zdt});function Qdt(t){var e=[];if(t!=null)for(var r in Object(t))e.push(r);return e}var A4e,L4e=A(()=>{A4e=Qdt});function t0t(t){if(!us(t))return A4e(t);var e=Ky(t),r=[];for(var n in t)n=="constructor"&&(e||!e0t.call(t,n))||r.push(n);return r}var Jdt,e0t,R4e,I4e=A(()=>{i0();U8();L4e();Jdt=Object.prototype,e0t=Jdt.hasOwnProperty;R4e=t0t});function r0t(t){return yo(t)?W8(t,!0):R4e(t)}var D4e,N4e=A(()=>{Hz();I4e();c0();D4e=r0t});function i0t(t,e){if(yn(t))return!1;var r=typeof t;return r=="number"||r=="symbol"||r=="boolean"||t==null||n0(t)?!0:a0t.test(t)||!n0t.test(t)||e!=null&&t in Object(e)}var n0t,a0t,Jy,X8=A(()=>{go();_5();n0t=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,a0t=/^\w*$/;Jy=i0t});var s0t,ef,M5=A(()=>{o0();s0t=vo(Object,"create"),ef=s0t});function o0t(){this.__data__=ef?ef(null):{},this.size=0}var M4e,O4e=A(()=>{M5();M4e=o0t});function l0t(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}var P4e,B4e=A(()=>{P4e=l0t});function f0t(t){var e=this.__data__;if(ef){var r=e[t];return r===u0t?void 0:r}return h0t.call(e,t)?e[t]:void 0}var u0t,c0t,h0t,F4e,z4e=A(()=>{M5();u0t="__lodash_hash_undefined__",c0t=Object.prototype,h0t=c0t.hasOwnProperty;F4e=f0t});function m0t(t){var e=this.__data__;return ef?e[t]!==void 0:p0t.call(e,t)}var d0t,p0t,$4e,G4e=A(()=>{M5();d0t=Object.prototype,p0t=d0t.hasOwnProperty;$4e=m0t});function v0t(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=ef&&e===void 0?g0t:e,this}var g0t,U4e,q4e=A(()=>{M5();g0t="__lodash_hash_undefined__";U4e=v0t});function e2(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e{O4e();B4e();z4e();G4e();q4e();e2.prototype.clear=M4e;e2.prototype.delete=P4e;e2.prototype.get=F4e;e2.prototype.has=$4e;e2.prototype.set=U4e;Yz=e2});function y0t(){this.__data__=[],this.size=0}var H4e,W4e=A(()=>{H4e=y0t});function x0t(t,e){for(var r=t.length;r--;)if(u0(t[r][0],e))return r;return-1}var h0,O5=A(()=>{I5();h0=x0t});function k0t(t){var e=this.__data__,r=h0(e,t);if(r<0)return!1;var n=e.length-1;return r==n?e.pop():w0t.call(e,r,1),--this.size,!0}var b0t,w0t,Y4e,X4e=A(()=>{O5();b0t=Array.prototype,w0t=b0t.splice;Y4e=k0t});function T0t(t){var e=this.__data__,r=h0(e,t);return r<0?void 0:e[r][1]}var j4e,K4e=A(()=>{O5();j4e=T0t});function E0t(t){return h0(this.__data__,t)>-1}var Z4e,Q4e=A(()=>{O5();Z4e=E0t});function C0t(t,e){var r=this.__data__,n=h0(r,t);return n<0?(++this.size,r.push([t,e])):r[n][1]=e,this}var J4e,e3e=A(()=>{O5();J4e=C0t});function t2(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e{W4e();X4e();K4e();Q4e();e3e();t2.prototype.clear=H4e;t2.prototype.delete=Y4e;t2.prototype.get=j4e;t2.prototype.has=Z4e;t2.prototype.set=J4e;f0=t2});var S0t,d0,j8=A(()=>{o0();$c();S0t=vo(wi,"Map"),d0=S0t});function _0t(){this.size=0,this.__data__={hash:new Yz,map:new(d0||f0),string:new Yz}}var t3e,r3e=A(()=>{V4e();P5();j8();t3e=_0t});function A0t(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}var n3e,a3e=A(()=>{n3e=A0t});function L0t(t,e){var r=t.__data__;return n3e(e)?r[typeof e=="string"?"string":"hash"]:r.map}var p0,B5=A(()=>{a3e();p0=L0t});function R0t(t){var e=p0(this,t).delete(t);return this.size-=e?1:0,e}var i3e,s3e=A(()=>{B5();i3e=R0t});function I0t(t){return p0(this,t).get(t)}var o3e,l3e=A(()=>{B5();o3e=I0t});function D0t(t){return p0(this,t).has(t)}var u3e,c3e=A(()=>{B5();u3e=D0t});function N0t(t,e){var r=p0(this,t),n=r.size;return r.set(t,e),this.size+=r.size==n?0:1,this}var h3e,f3e=A(()=>{B5();h3e=N0t});function r2(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e{r3e();s3e();l3e();c3e();f3e();r2.prototype.clear=t3e;r2.prototype.delete=i3e;r2.prototype.get=o3e;r2.prototype.has=u3e;r2.prototype.set=h3e;km=r2});function Xz(t,e){if(typeof t!="function"||e!=null&&typeof e!="function")throw new TypeError(M0t);var r=function(){var n=arguments,a=e?e.apply(this,n):n[0],i=r.cache;if(i.has(a))return i.get(a);var s=t.apply(this,n);return r.cache=i.set(a,s)||i,s};return r.cache=new(Xz.Cache||km),r}var M0t,d3e,p3e=A(()=>{K8();M0t="Expected a function";Xz.Cache=km;d3e=Xz});function P0t(t){var e=d3e(t,function(n){return r.size===O0t&&r.clear(),n}),r=e.cache;return e}var O0t,m3e,g3e=A(()=>{p3e();O0t=500;m3e=P0t});var B0t,F0t,z0t,v3e,y3e=A(()=>{g3e();B0t=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,F0t=/\\(\\)?/g,z0t=m3e(function(t){var e=[];return t.charCodeAt(0)===46&&e.push(""),t.replace(B0t,function(r,n,a,i){e.push(a?i.replace(F0t,"$1"):n||r)}),e}),v3e=z0t});function $0t(t){return t==null?"":fbe(t)}var x3e,b3e=A(()=>{dbe();x3e=$0t});function G0t(t,e){return yn(t)?t:Jy(t,e)?[t]:v3e(x3e(t))}var m0,F5=A(()=>{go();X8();y3e();b3e();m0=G0t});function q0t(t){if(typeof t=="string"||n0(t))return t;var e=t+"";return e=="0"&&1/t==-U0t?"-0":e}var U0t,Uc,n2=A(()=>{_5();U0t=1/0;Uc=q0t});function V0t(t,e){e=m0(e,t);for(var r=0,n=e.length;t!=null&&r{F5();n2();a2=V0t});function H0t(t,e,r){var n=t==null?void 0:a2(t,e);return n===void 0?r:n}var w3e,k3e=A(()=>{Z8();w3e=H0t});function W0t(t,e){for(var r=-1,n=e.length,a=t.length;++r{Q8=W0t});var Y0t,T3e,E3e=A(()=>{Wz();Y0t=Y8(Object.getPrototypeOf,Object),T3e=Y0t});function X0t(){this.__data__=new f0,this.size=0}var C3e,S3e=A(()=>{P5();C3e=X0t});function j0t(t){var e=this.__data__,r=e.delete(t);return this.size=e.size,r}var _3e,A3e=A(()=>{_3e=j0t});function K0t(t){return this.__data__.get(t)}var L3e,R3e=A(()=>{L3e=K0t});function Z0t(t){return this.__data__.has(t)}var I3e,D3e=A(()=>{I3e=Z0t});function J0t(t,e){var r=this.__data__;if(r instanceof f0){var n=r.__data__;if(!d0||n.length{P5();j8();K8();Q0t=200;N3e=J0t});function i2(t){var e=this.__data__=new f0(t);this.size=e.size}var s2,Kz=A(()=>{P5();S3e();A3e();R3e();D3e();M3e();i2.prototype.clear=C3e;i2.prototype.delete=_3e;i2.prototype.get=L3e;i2.prototype.has=I3e;i2.prototype.set=N3e;s2=i2});function ept(t,e){for(var r=-1,n=t==null?0:t.length,a=0,i=[];++r{O3e=ept});function tpt(){return[]}var J8,Zz=A(()=>{J8=tpt});var rpt,npt,B3e,apt,e7,Qz=A(()=>{P3e();Zz();rpt=Object.prototype,npt=rpt.propertyIsEnumerable,B3e=Object.getOwnPropertySymbols,apt=B3e?function(t){return t==null?[]:(t=Object(t),O3e(B3e(t),function(e){return npt.call(t,e)}))}:J8,e7=apt});var ipt,spt,F3e,z3e=A(()=>{jz();E3e();Qz();Zz();ipt=Object.getOwnPropertySymbols,spt=ipt?function(t){for(var e=[];t;)Q8(e,e7(t)),t=T3e(t);return e}:J8,F3e=spt});function opt(t,e,r){var n=e(t);return yn(t)?n:Q8(n,r(t))}var t7,Jz=A(()=>{jz();go();t7=opt});function lpt(t){return t7(t,Gc,e7)}var e$,$3e=A(()=>{Jz();Qz();Qy();e$=lpt});function upt(t){return t7(t,D4e,F3e)}var G3e,U3e=A(()=>{Jz();z3e();N4e();G3e=upt});var cpt,r7,q3e=A(()=>{o0();$c();cpt=vo(wi,"DataView"),r7=cpt});var hpt,n7,V3e=A(()=>{o0();$c();hpt=vo(wi,"Promise"),n7=hpt});var fpt,a7,H3e=A(()=>{o0();$c();fpt=vo(wi,"Set"),a7=fpt});var W3e,dpt,Y3e,X3e,j3e,K3e,ppt,mpt,gpt,vpt,ypt,Tm,t$,Z3e=A(()=>{q3e();j8();V3e();H3e();Mbe();t0();Oz();W3e="[object Map]",dpt="[object Object]",Y3e="[object Promise]",X3e="[object Set]",j3e="[object WeakMap]",K3e="[object DataView]",ppt=Jh(r7),mpt=Jh(d0),gpt=Jh(n7),vpt=Jh(a7),ypt=Jh(B8),Tm=Ds;(r7&&Tm(new r7(new ArrayBuffer(1)))!=K3e||d0&&Tm(new d0)!=W3e||n7&&Tm(n7.resolve())!=Y3e||a7&&Tm(new a7)!=X3e||B8&&Tm(new B8)!=j3e)&&(Tm=function(t){var e=Ds(t),r=e==dpt?t.constructor:void 0,n=r?Jh(r):"";if(n)switch(n){case ppt:return K3e;case mpt:return W3e;case gpt:return Y3e;case vpt:return X3e;case ypt:return j3e}return e});t$=Tm});var xpt,r$,Q3e=A(()=>{$c();xpt=wi.Uint8Array,r$=xpt});function wpt(t){return this.__data__.set(t,bpt),this}var bpt,J3e,e5e=A(()=>{bpt="__lodash_hash_undefined__";J3e=wpt});function kpt(t){return this.__data__.has(t)}var t5e,r5e=A(()=>{t5e=kpt});function i7(t){var e=-1,r=t==null?0:t.length;for(this.__data__=new km;++e{K8();e5e();r5e();i7.prototype.add=i7.prototype.push=J3e;i7.prototype.has=t5e;n5e=i7});function Tpt(t,e){for(var r=-1,n=t==null?0:t.length;++r{s7=Tpt});function Ept(t,e){return t.has(e)}var i5e,s5e=A(()=>{i5e=Ept});function _pt(t,e,r,n,a,i){var s=r&Cpt,o=t.length,l=e.length;if(o!=l&&!(s&&l>o))return!1;var u=i.get(t),h=i.get(e);if(u&&h)return u==e&&h==t;var f=-1,d=!0,p=r&Spt?new n5e:void 0;for(i.set(t,e),i.set(e,t);++f{a5e();n$();s5e();Cpt=1,Spt=2;o7=_pt});function Apt(t){var e=-1,r=Array(t.size);return t.forEach(function(n,a){r[++e]=[a,n]}),r}var o5e,l5e=A(()=>{o5e=Apt});function Lpt(t){var e=-1,r=Array(t.size);return t.forEach(function(n){r[++e]=n}),r}var u5e,c5e=A(()=>{u5e=Lpt});function qpt(t,e,r,n,a,i,s){switch(r){case Upt:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case Gpt:return!(t.byteLength!=e.byteLength||!i(new r$(t),new r$(e)));case Dpt:case Npt:case Ppt:return u0(+t,+e);case Mpt:return t.name==e.name&&t.message==e.message;case Bpt:case zpt:return t==e+"";case Opt:var o=o5e;case Fpt:var l=n&Rpt;if(o||(o=u5e),t.size!=e.size&&!l)return!1;var u=s.get(t);if(u)return u==e;n|=Ipt,s.set(t,e);var h=o7(o(t),o(e),n,a,i,s);return s.delete(t),h;case $pt:if(i$)return i$.call(t)==i$.call(e)}return!1}var Rpt,Ipt,Dpt,Npt,Mpt,Opt,Ppt,Bpt,Fpt,zpt,$pt,Gpt,Upt,h5e,i$,f5e,d5e=A(()=>{C5();Q3e();I5();a$();l5e();c5e();Rpt=1,Ipt=2,Dpt="[object Boolean]",Npt="[object Date]",Mpt="[object Error]",Opt="[object Map]",Ppt="[object Number]",Bpt="[object RegExp]",Fpt="[object Set]",zpt="[object String]",$pt="[object Symbol]",Gpt="[object ArrayBuffer]",Upt="[object DataView]",h5e=El?El.prototype:void 0,i$=h5e?h5e.valueOf:void 0;f5e=qpt});function Ypt(t,e,r,n,a,i){var s=r&Vpt,o=e$(t),l=o.length,u=e$(e),h=u.length;if(l!=h&&!s)return!1;for(var f=l;f--;){var d=o[f];if(!(s?d in e:Wpt.call(e,d)))return!1}var p=i.get(t),m=i.get(e);if(p&&m)return p==e&&m==t;var g=!0;i.set(t,e),i.set(e,t);for(var v=s;++f{$3e();Vpt=1,Hpt=Object.prototype,Wpt=Hpt.hasOwnProperty;p5e=Ypt});function Kpt(t,e,r,n,a,i){var s=yn(t),o=yn(e),l=s?v5e:t$(t),u=o?v5e:t$(e);l=l==g5e?l7:l,u=u==g5e?l7:u;var h=l==l7,f=u==l7,d=l==u;if(d&&D5(t)){if(!D5(e))return!1;s=!0,h=!1}if(d&&!h)return i||(i=new s2),s||H8(t)?o7(t,e,r,n,a,i):f5e(t,e,l,r,n,a,i);if(!(r&Xpt)){var p=h&&y5e.call(t,"__wrapped__"),m=f&&y5e.call(e,"__wrapped__");if(p||m){var g=p?t.value():t,v=m?e.value():e;return i||(i=new s2),a(g,v,r,n,i)}}return d?(i||(i=new s2),p5e(t,e,r,n,a,i)):!1}var Xpt,g5e,v5e,l7,jpt,y5e,x5e,b5e=A(()=>{Kz();a$();d5e();m5e();Z3e();go();$z();Vz();Xpt=1,g5e="[object Arguments]",v5e="[object Array]",l7="[object Object]",jpt=Object.prototype,y5e=jpt.hasOwnProperty;x5e=Kpt});function w5e(t,e,r,n,a){return t===e?!0:t==null||e==null||!Ns(t)&&!Ns(e)?t!==t&&e!==e:x5e(t,e,r,n,w5e,a)}var u7,s$=A(()=>{b5e();r0();u7=w5e});function Jpt(t,e,r,n){var a=r.length,i=a,s=!n;if(t==null)return!i;for(t=Object(t);a--;){var o=r[a];if(s&&o[2]?o[1]!==t[o[0]]:!(o[0]in t))return!1}for(;++a{Kz();s$();Zpt=1,Qpt=2;k5e=Jpt});function emt(t){return t===t&&!us(t)}var c7,o$=A(()=>{i0();c7=emt});function tmt(t){for(var e=Gc(t),r=e.length;r--;){var n=e[r],a=t[n];e[r]=[n,a,c7(a)]}return e}var E5e,C5e=A(()=>{o$();Qy();E5e=tmt});function rmt(t,e){return function(r){return r==null?!1:r[t]===e&&(e!==void 0||t in Object(r))}}var h7,l$=A(()=>{h7=rmt});function nmt(t){var e=E5e(t);return e.length==1&&e[0][2]?h7(e[0][0],e[0][1]):function(r){return r===t||k5e(r,t,e)}}var S5e,_5e=A(()=>{T5e();C5e();l$();S5e=nmt});function amt(t,e){return t!=null&&e in Object(t)}var A5e,L5e=A(()=>{A5e=amt});function imt(t,e,r){e=m0(e,t);for(var n=-1,a=e.length,i=!1;++n{F5();zz();go();R5();$8();n2();R5e=imt});function smt(t,e){return t!=null&&R5e(t,e,A5e)}var D5e,N5e=A(()=>{L5e();I5e();D5e=smt});function umt(t,e){return Jy(t)&&c7(e)?h7(Uc(t),e):function(r){var n=w3e(r,t);return n===void 0&&n===e?D5e(r,t):u7(e,n,omt|lmt)}}var omt,lmt,M5e,O5e=A(()=>{s$();k3e();N5e();X8();o$();l$();n2();omt=1,lmt=2;M5e=umt});function cmt(t){return function(e){return e?.[t]}}var P5e,B5e=A(()=>{P5e=cmt});function hmt(t){return function(e){return a2(e,t)}}var F5e,z5e=A(()=>{Z8();F5e=hmt});function fmt(t){return Jy(t)?P5e(Uc(t)):F5e(t)}var $5e,G5e=A(()=>{B5e();z5e();X8();n2();$5e=fmt});function dmt(t){return typeof t=="function"?t:t==null?s0:typeof t=="object"?yn(t)?M5e(t[0],t[1]):S5e(t):$5e(t)}var g0,z5=A(()=>{_5e();O5e();L5();go();G5e();g0=dmt});function pmt(t){return function(e,r,n){for(var a=-1,i=Object(e),s=n(e),o=s.length;o--;){var l=s[t?o:++a];if(r(i[l],l,i)===!1)break}return e}}var U5e,q5e=A(()=>{U5e=pmt});var mmt,V5e,H5e=A(()=>{q5e();mmt=U5e(),V5e=mmt});function gmt(t,e){return t&&V5e(t,e,Gc)}var W5e,Y5e=A(()=>{H5e();Qy();W5e=gmt});function vmt(t,e){return function(r,n){if(r==null)return r;if(!yo(r))return t(r,n);for(var a=r.length,i=e?a:-1,s=Object(r);(e?i--:++i{c0();X5e=vmt});var ymt,v0,$5=A(()=>{Y5e();j5e();ymt=X5e(W5e),v0=ymt});function xmt(t){return typeof t=="function"?t:s0}var K5e,Z5e=A(()=>{L5();K5e=xmt});function bmt(t,e){var r=yn(t)?Hbe:v0;return r(t,K5e(e))}var u$,Q5e=A(()=>{Wbe();$5();Z5e();go();u$=bmt});function wmt(t,e){for(var r=-1,n=t==null?0:t.length;++r{J5e=wmt});function kmt(t,e){var r=!0;return v0(t,function(n,a,i){return r=!!e(n,a,i),r}),r}var twe,rwe=A(()=>{$5();twe=kmt});function Tmt(t,e,r){var n=yn(t)?J5e:twe;return r&&jy(t,e,r)&&(e=void 0),n(t,g0(e,3))}var c$,nwe=A(()=>{ewe();rwe();z5();go();G8();c$=Tmt});function Emt(t,e){var r=-1,n=yo(t)?Array(t.length):[];return v0(t,function(a,i,s){n[++r]=e(a,i,s)}),n}var awe,iwe=A(()=>{$5();c0();awe=Emt});function Cmt(t,e){var r=yn(t)?a0:awe;return r(t,g0(e,3))}var f7,swe=A(()=>{A5();z5();iwe();go();f7=Cmt});function _mt(t){return typeof t=="string"||!yn(t)&&Ns(t)&&Ds(t)==Smt}var Smt,Em,h$=A(()=>{t0();go();r0();Smt="[object String]";Em=_mt});function Amt(t,e){return a0(e,function(r){return t[r]})}var owe,lwe=A(()=>{A5();owe=Amt});function Lmt(t){return t==null?[]:owe(t,Gc(t))}var uwe,cwe=A(()=>{lwe();Qy();uwe=Lmt});function Imt(t,e,r,n){t=yo(t)?t:uwe(t),r=r&&!n?Ebe(r):0;var a=t.length;return r<0&&(r=Rmt(a+r,0)),Em(t)?r<=a&&t.indexOf(e,r)>-1:!!a&&Jbe(t,e,r)>-1}var Rmt,f$,hwe=A(()=>{e4e();c0();h$();Cbe();cwe();Rmt=Math.max;f$=Imt});function Nmt(t){return Ns(t)&&Ds(t)==Dmt}var Dmt,fwe,dwe=A(()=>{t0();r0();Dmt="[object RegExp]";fwe=Nmt});var pwe,Mmt,d$,mwe=A(()=>{dwe();Gz();qz();pwe=Zy&&Zy.isRegExp,Mmt=pwe?V8(pwe):fwe,d$=Mmt});function Omt(t,e,r,n){if(!us(t))return t;e=m0(e,t);for(var a=-1,i=e.length,s=i-1,o=t;o!=null&&++a{z8();F5();R5();i0();n2();gwe=Omt});function Pmt(t,e,r){for(var n=-1,a=e.length,i={};++n{Z8();vwe();F5();ywe=Pmt});function Bmt(t,e){if(t==null)return{};var r=a0(G3e(t),function(n){return[n]});return e=g0(e),ywe(t,r,function(n,a){return e(n,a[0])})}var Sl,bwe=A(()=>{A5();z5();xwe();U3e();Sl=Bmt});function Fmt(t,e){var r;return v0(t,function(n,a,i){return r=e(n,a,i),!r}),!!r}var wwe,kwe=A(()=>{$5();wwe=Fmt});function zmt(t,e,r){var n=yn(t)?s7:wwe;return r&&jy(t,e,r)&&(e=void 0),n(t,g0(e,3))}var p$,Twe=A(()=>{n$();z5();kwe();go();G8();p$=zmt});var m$=A(()=>{_4e();nwe();Q5e();hwe();mwe();h$();swe();bwe();Twe();});function $mt(t){return Gmt(t)?t.LABEL:t.name}function Gmt(t){return Em(t.LABEL)&&t.LABEL!==""}function d7(t){return f7(t,o2)}function o2(t){function e(r){return f7(r,o2)}if(t instanceof en){let r={type:"NonTerminal",name:t.nonTerminalName,idx:t.idx};return Em(t.label)&&(r.label=t.label),r}else{if(t instanceof Ln)return{type:"Alternative",definition:e(t.definition)};if(t instanceof tn)return{type:"Option",idx:t.idx,definition:e(t.definition)};if(t instanceof Rn)return{type:"RepetitionMandatory",idx:t.idx,definition:e(t.definition)};if(t instanceof In)return{type:"RepetitionMandatoryWithSeparator",idx:t.idx,separator:o2(new vr({terminalType:t.separator})),definition:e(t.definition)};if(t instanceof xn)return{type:"RepetitionWithSeparator",idx:t.idx,separator:o2(new vr({terminalType:t.separator})),definition:e(t.definition)};if(t instanceof Ir)return{type:"Repetition",idx:t.idx,definition:e(t.definition)};if(t instanceof bn)return{type:"Alternation",idx:t.idx,definition:e(t.definition)};if(t instanceof vr){let r={type:"Terminal",name:t.terminalType.name,label:$mt(t.terminalType),idx:t.idx};Em(t.label)&&(r.terminalLabel=t.label);let n=t.terminalType.PATTERN;return t.terminalType.PATTERN&&(r.pattern=d$(n)?n.source:n),r}else{if(t instanceof Ms)return{type:"Rule",name:t.name,orgText:t.orgText,definition:e(t.definition)};throw Error("non exhaustive match")}}}var Wo,en,Ms,Ln,tn,Rn,In,Ir,xn,bn,vr,p7=A(()=>{m$();Wo=class{get definition(){return this._definition}set definition(e){this._definition=e}constructor(e){this._definition=e}accept(e){e.visit(this),u$(this.definition,r=>{r.accept(e)})}},en=class extends Wo{constructor(e){super([]),this.idx=1,Cl(this,Sl(e,r=>r!==void 0))}set definition(e){}get definition(){return this.referencedRule!==void 0?this.referencedRule.definition:[]}accept(e){e.visit(this)}},Ms=class extends Wo{constructor(e){super(e.definition),this.orgText="",Cl(this,Sl(e,r=>r!==void 0))}},Ln=class extends Wo{constructor(e){super(e.definition),this.ignoreAmbiguities=!1,Cl(this,Sl(e,r=>r!==void 0))}},tn=class extends Wo{constructor(e){super(e.definition),this.idx=1,Cl(this,Sl(e,r=>r!==void 0))}},Rn=class extends Wo{constructor(e){super(e.definition),this.idx=1,Cl(this,Sl(e,r=>r!==void 0))}},In=class extends Wo{constructor(e){super(e.definition),this.idx=1,Cl(this,Sl(e,r=>r!==void 0))}},Ir=class extends Wo{constructor(e){super(e.definition),this.idx=1,Cl(this,Sl(e,r=>r!==void 0))}},xn=class extends Wo{constructor(e){super(e.definition),this.idx=1,Cl(this,Sl(e,r=>r!==void 0))}},bn=class extends Wo{get definition(){return this._definition}set definition(e){this._definition=e}constructor(e){super(e.definition),this.idx=1,this.ignoreAmbiguities=!1,this.hasPredicates=!1,Cl(this,Sl(e,r=>r!==void 0))}},vr=class{constructor(e){this.idx=1,Cl(this,Sl(e,r=>r!==void 0))}accept(e){e.visit(this)}}});var Os,Ewe=A(()=>{p7();Os=class{visit(e){let r=e;switch(r.constructor){case en:return this.visitNonTerminal(r);case Ln:return this.visitAlternative(r);case tn:return this.visitOption(r);case Rn:return this.visitRepetitionMandatory(r);case In:return this.visitRepetitionMandatoryWithSeparator(r);case xn:return this.visitRepetitionWithSeparator(r);case Ir:return this.visitRepetition(r);case bn:return this.visitAlternation(r);case vr:return this.visitTerminal(r);case Ms:return this.visitRule(r);default:throw Error("non exhaustive match")}}visitNonTerminal(e){}visitAlternative(e){}visitOption(e){}visitRepetition(e){}visitRepetitionMandatory(e){}visitRepetitionMandatoryWithSeparator(e){}visitRepetitionWithSeparator(e){}visitAlternation(e){}visitTerminal(e){}visitRule(e){}}});function g$(t){return t instanceof Ln||t instanceof tn||t instanceof Ir||t instanceof Rn||t instanceof In||t instanceof xn||t instanceof vr||t instanceof Ms}function Cm(t,e=[]){return t instanceof tn||t instanceof Ir||t instanceof xn?!0:t instanceof bn?p$(t.definition,n=>Cm(n,e)):t instanceof en&&f$(e,t)?!1:t instanceof Wo?(t instanceof en&&e.push(t),c$(t.definition,n=>Cm(n,e))):!1}function v$(t){return t instanceof bn}function xo(t){if(t instanceof en)return"SUBRULE";if(t instanceof tn)return"OPTION";if(t instanceof bn)return"OR";if(t instanceof Rn)return"AT_LEAST_ONE";if(t instanceof In)return"AT_LEAST_ONE_SEP";if(t instanceof xn)return"MANY_SEP";if(t instanceof Ir)return"MANY";if(t instanceof vr)return"CONSUME";throw Error("non exhaustive match")}var Cwe=A(()=>{m$();p7()});var Ps=A(()=>{p7();Ewe();Cwe()});function Swe(t,e,r){return[new tn({definition:[new vr({terminalType:t.separator})].concat(t.definition)})].concat(e,r)}var tf,m7=A(()=>{hn();Ps();tf=class{walk(e,r=[]){Nt(e.definition,(n,a)=>{let i=wa(e.definition,a+1);if(n instanceof en)this.walkProdRef(n,i,r);else if(n instanceof vr)this.walkTerminal(n,i,r);else if(n instanceof Ln)this.walkFlat(n,i,r);else if(n instanceof tn)this.walkOption(n,i,r);else if(n instanceof Rn)this.walkAtLeastOne(n,i,r);else if(n instanceof In)this.walkAtLeastOneSep(n,i,r);else if(n instanceof xn)this.walkManySep(n,i,r);else if(n instanceof Ir)this.walkMany(n,i,r);else if(n instanceof bn)this.walkOr(n,i,r);else throw Error("non exhaustive match")})}walkTerminal(e,r,n){}walkProdRef(e,r,n){}walkFlat(e,r,n){let a=r.concat(n);this.walk(e,a)}walkOption(e,r,n){let a=r.concat(n);this.walk(e,a)}walkAtLeastOne(e,r,n){let a=[new tn({definition:e.definition})].concat(r,n);this.walk(e,a)}walkAtLeastOneSep(e,r,n){let a=Swe(e,r,n);this.walk(e,a)}walkMany(e,r,n){let a=[new tn({definition:e.definition})].concat(r,n);this.walk(e,a)}walkManySep(e,r,n){let a=Swe(e,r,n);this.walk(e,a)}walkOr(e,r,n){let a=r.concat(n);Nt(e.definition,i=>{let s=new Ln({definition:[i]});this.walk(s,a)})}}});function Sm(t){if(t instanceof en)return Sm(t.referencedRule);if(t instanceof vr)return Vmt(t);if(g$(t))return Umt(t);if(v$(t))return qmt(t);throw Error("non exhaustive match")}function Umt(t){let e=[],r=t.definition,n=0,a=r.length>n,i,s=!0;for(;a&&s;)i=r[n],s=Cm(i),e=e.concat(Sm(i)),n=n+1,a=r.length>n;return qy(e)}function qmt(t){let e=Rt(t.definition,r=>Sm(r));return qy(ja(e))}function Vmt(t){return[t.terminalType]}var y$=A(()=>{hn();Ps()});var g7,x$=A(()=>{g7="_~IN~_"});function _we(t){let e={};return Nt(t,r=>{let n=new b$(r).startWalking();Ey(e,n)}),e}function Hmt(t,e){return t.name+e+g7}var b$,Awe=A(()=>{m7();y$();hn();x$();Ps();b$=class extends tf{constructor(e){super(),this.topProd=e,this.follows={}}startWalking(){return this.walk(this.topProd),this.follows}walkTerminal(e,r,n){}walkProdRef(e,r,n){let a=Hmt(e.referencedRule,e.idx)+this.topProd.name,i=r.concat(n),s=new Ln({definition:i}),o=Sm(s);this.follows[a]=o}}});function l2(t){let e=t.toString();if(v7.hasOwnProperty(e))return v7[e];{let r=Wmt.pattern(e);return v7[e]=r,r}}function Lwe(){v7={}}var v7,Wmt,y7=A(()=>{t5();v7={},Wmt=new gm});function Dwe(t,e=!1){try{let r=l2(t);return w$(r.value,{},r.flags.ignoreCase)}catch(r){if(r.message===Iwe)e&&k5(`${G5} Unable to optimize: < ${t.toString()} > +`:case"\r":case"\u2028":case"\u2029":return!1;default:return!0}}parseHexDigits(e){let r="";for(let i=0;i=this.input.length)throw Error("Unexpected end of input");this.idx++}loc(e){return{begin:e,end:this.idx}}}});var R0,$ye=D(()=>{R0=class{visitChildren(e){for(let r in e){let n=e[r];e.hasOwnProperty(r)&&(n.type!==void 0?this.visit(n):Array.isArray(n)&&n.forEach(i=>{this.visit(i)},this))}}visit(e){switch(e.type){case"Pattern":this.visitPattern(e);break;case"Flags":this.visitFlags(e);break;case"Disjunction":this.visitDisjunction(e);break;case"Alternative":this.visitAlternative(e);break;case"StartAnchor":this.visitStartAnchor(e);break;case"EndAnchor":this.visitEndAnchor(e);break;case"WordBoundary":this.visitWordBoundary(e);break;case"NonWordBoundary":this.visitNonWordBoundary(e);break;case"Lookahead":this.visitLookahead(e);break;case"NegativeLookahead":this.visitNegativeLookahead(e);break;case"Character":this.visitCharacter(e);break;case"Set":this.visitSet(e);break;case"Group":this.visitGroup(e);break;case"GroupBackReference":this.visitGroupBackReference(e);break;case"Quantifier":this.visitQuantifier(e);break}this.visitChildren(e)}visitPattern(e){}visitFlags(e){}visitDisjunction(e){}visitAlternative(e){}visitStartAnchor(e){}visitEndAnchor(e){}visitWordBoundary(e){}visitNonWordBoundary(e){}visitLookahead(e){}visitNegativeLookahead(e){}visitCharacter(e){}visitSet(e){}visitGroup(e){}visitGroupBackReference(e){}visitQuantifier(e){}}});var v6=D(()=>{zye();$ye()});var yC={};Mr(yC,{NEWLINE_REGEXP:()=>q$,escapeRegExp:()=>_m,getCaseInsensitivePattern:()=>H$,getTerminalParts:()=>llt,isMultilineComment:()=>U$,isWhitespace:()=>xv,partialMatches:()=>V$,partialRegExp:()=>Uye,whitespaceCharacters:()=>qye});function llt(t){try{typeof t!="string"&&(t=t.source),t=`/${t}/`;let e=Gye.pattern(t),r=[];for(let n of e.value.value)Cm.reset(t),Cm.visit(n),r.push({start:Cm.startRegexp,end:Cm.endRegex});return r}catch{return[]}}function U$(t){try{return typeof t=="string"&&(t=new RegExp(t)),t=t.toString(),Cm.reset(t),Cm.visit(Gye.pattern(t)),Cm.multiline}catch{return!1}}function xv(t){let e=typeof t=="string"?new RegExp(t):t;return qye.some(r=>e.test(r))}function _m(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function H$(t){return Array.prototype.map.call(t,e=>/\w/.test(e)?`[${e.toLowerCase()}${e.toUpperCase()}]`:_m(e)).join("")}function V$(t,e){let r=Uye(t),n=e.match(r);return!!n&&n[0].length>0}function Uye(t){typeof t=="string"&&(t=new RegExp(t));let e=t,r=t.source,n=0;function i(){let a="",s;function o(u){a+=r.substr(n,u),n+=u}function l(u){a+="(?:"+r.substr(n,u)+"|$)",n+=u}for(;n",n)-n+1);break;default:l(2);break}break;case"[":s=/\[(?:\\.|.)*?\]/g,s.lastIndex=n,s=s.exec(r)||[],l(s[0].length);break;case"|":case"^":case"$":case"*":case"+":case"?":o(1);break;case"{":s=/\{\d+,?\d*\}/g,s.lastIndex=n,s=s.exec(r),s?o(s[0].length):l(1);break;case"(":if(r[n+1]==="?")switch(r[n+2]){case":":a+="(?:",n+=3,a+=i()+"|$)";break;case"=":a+="(?=",n+=3,a+=i()+")";break;case"!":s=n,n+=3,i(),a+=r.substr(s,n-s);break;case"<":switch(r[n+3]){case"=":case"!":s=n,n+=4,i(),a+=r.substr(s,n-s);break;default:o(r.indexOf(">",n)-n+1),a+=i()+"|$)";break}break}else o(1),a+=i()+"|$)";break;case")":return++n,a;default:l(1);break}return a}return new RegExp(i(),t.flags)}var q$,Gye,G$,Cm,qye,bv=D(()=>{v6();q$=/\r?\n/gm,Gye=new Sm,G$=class extends R0{constructor(){super(...arguments),this.isStarting=!0,this.endRegexpStack=[],this.multiline=!1}get endRegex(){return this.endRegexpStack.join("")}reset(e){this.multiline=!1,this.regex=e,this.startRegexp="",this.isStarting=!0,this.endRegexpStack=[]}visitGroup(e){e.quantifier&&(this.isStarting=!1,this.endRegexpStack=[])}visitCharacter(e){let r=String.fromCharCode(e.value);if(!this.multiline&&r===` +`&&(this.multiline=!0),e.quantifier)this.isStarting=!1,this.endRegexpStack=[];else{let n=_m(r);this.endRegexpStack.push(n),this.isStarting&&(this.startRegexp+=n)}}visitSet(e){if(!this.multiline){let r=this.regex.substring(e.loc.begin,e.loc.end),n=new RegExp(r);this.multiline=!!` +`.match(n)}if(e.quantifier)this.isStarting=!1,this.endRegexpStack=[];else{let r=this.regex.substring(e.loc.begin,e.loc.end);this.endRegexpStack.push(r),this.isStarting&&(this.startRegexp+=r)}}visitChildren(e){e.type==="Group"&&e.quantifier||super.visitChildren(e)}},Cm=new G$;qye=`\f +\r \v \xA0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u2028\u2029\u202F\u205F\u3000\uFEFF`.split("")});var xC={};Mr(xC,{findAssignment:()=>eG,findNameAssignment:()=>vC,findNodeForKeyword:()=>Q$,findNodeForProperty:()=>b6,findNodesForKeyword:()=>ult,findNodesForKeywordInternal:()=>J$,findNodesForProperty:()=>K$,getActionAtElement:()=>Xye,getActionType:()=>Kye,getAllReachableRules:()=>x6,getCrossReferenceTerminal:()=>X$,getEntryRule:()=>Hye,getExplicitRuleType:()=>wv,getHiddenRules:()=>Vye,getRuleType:()=>tG,getRuleTypeName:()=>plt,getTypeName:()=>k6,isArrayCardinality:()=>hlt,isArrayOperator:()=>flt,isCommentTerminal:()=>j$,isDataType:()=>dlt,isDataTypeRule:()=>w6,isOptionalCardinality:()=>clt,terminalRegex:()=>kv});function Hye(t){return t.rules.find(e=>Ys(e)&&e.entry)}function Vye(t){return t.rules.filter(e=>zl(e)&&e.hidden)}function x6(t,e){let r=new Set,n=Hye(t);if(!n)return new Set(t.rules);let i=[n].concat(Vye(t));for(let s of i)Wye(s,r,e);let a=new Set;for(let s of t.rules)(r.has(s.name)||zl(s)&&s.hidden)&&a.add(s);return a}function Wye(t,e,r){e.add(t.name),L0(t).forEach(n=>{if(dc(n)||r&&hC(n)){let i=n.rule.ref;i&&!e.has(i.name)&&Wye(i,e,r)}})}function X$(t){if(t.terminal)return t.terminal;if(t.type.ref){let e=vC(t.type.ref);return e?.terminal}}function j$(t){return t.hidden&&!xv(kv(t))}function K$(t,e){return!t||!e?[]:Z$(t,e,t.astNode,!0)}function b6(t,e,r){if(!t||!e)return;let n=Z$(t,e,t.astNode,!0);if(n.length!==0)return r!==void 0?r=Math.max(0,Math.min(r,n.length-1)):r=0,n[r]}function Z$(t,e,r,n){if(!n){let i=Tm(t.grammarSource,fc);if(i&&i.feature===e)return[t]}return uc(t)&&t.astNode===r?t.content.flatMap(i=>Z$(i,e,r,!1)):[]}function ult(t,e){return t?J$(t,e,t?.astNode):[]}function Q$(t,e,r){if(!t)return;let n=J$(t,e,t?.astNode);if(n.length!==0)return r!==void 0?r=Math.max(0,Math.min(r,n.length-1)):r=0,n[r]}function J$(t,e,r){if(t.astNode!==r)return[];if(vu(t.grammarSource)&&t.grammarSource.value===e)return[t];let n=vm(t).iterator(),i,a=[];do if(i=n.next(),!i.done){let s=i.value;s.astNode===r?vu(s.grammarSource)&&s.grammarSource.value===e&&a.push(s):n.prune()}while(!i.done);return a}function eG(t){var e;let r=t.astNode;for(;r===((e=t.container)===null||e===void 0?void 0:e.astNode);){let n=Tm(t.grammarSource,fc);if(n)return n;t=t.container}}function vC(t){let e=t;return oC(e)&&(Qh(e.$container)?e=e.$container.$container:Ys(e.$container)?e=e.$container:_0(e.$container)),Yye(t,e,new Map)}function Yye(t,e,r){var n;function i(a,s){let o;return Tm(a,fc)||(o=Yye(s,s,r)),r.set(t,o),o}if(r.has(t))return r.get(t);r.set(t,void 0);for(let a of L0(e)){if(fc(a)&&a.feature.toLowerCase()==="name")return r.set(t,a),a;if(dc(a)&&Ys(a.rule.ref))return i(a,a.rule.ref);if(uC(a)&&(!((n=a.typeRef)===null||n===void 0)&&n.ref))return i(a,a.typeRef.ref)}}function Xye(t){let e=t.$container;if(Hd(e)){let r=e.elements,n=r.indexOf(t);for(let i=n-1;i>=0;i--){let a=r[i];if(Qh(a))return a;{let s=L0(r[i]).find(Qh);if(s)return s}}}if(c6(e))return Xye(e)}function clt(t,e){return t==="?"||t==="*"||Hd(e)&&!!e.guardCondition}function hlt(t){return t==="*"||t==="+"}function flt(t){return t==="+="}function w6(t){return jye(t,new Set)}function jye(t,e){if(e.has(t))return!0;e.add(t);for(let r of L0(t))if(dc(r)){if(!r.rule.ref||Ys(r.rule.ref)&&!jye(r.rule.ref,e))return!1}else{if(fc(r))return!1;if(Qh(r))return!1}return!!t.definition}function dlt(t){return Y$(t.type,new Set)}function Y$(t,e){if(e.has(t))return!0;if(e.add(t),v$(t))return!1;if(E$(t))return!1;if(C$(t))return t.types.every(r=>Y$(r,e));if(uC(t)){if(t.primitiveType!==void 0)return!0;if(t.stringType!==void 0)return!0;if(t.typeRef!==void 0){let r=t.typeRef.ref;return h6(r)?Y$(r.type,e):!1}else return!1}else return!1}function wv(t){if(t.inferredType)return t.inferredType.name;if(t.dataType)return t.dataType;if(t.returnType){let e=t.returnType.ref;if(e){if(Ys(e))return e.name;if(lC(e)||h6(e))return e.name}}}function k6(t){var e;if(Ys(t))return w6(t)?t.name:(e=wv(t))!==null&&e!==void 0?e:t.name;if(lC(t)||h6(t)||S$(t))return t.name;if(Qh(t)){let r=Kye(t);if(r)return r}else if(oC(t))return t.name;throw new Error("Cannot get name of Unknown Type")}function Kye(t){var e;if(t.inferredType)return t.inferredType.name;if(!((e=t.type)===null||e===void 0)&&e.ref)return k6(t.type.ref)}function plt(t){var e,r,n;return zl(t)?(r=(e=t.type)===null||e===void 0?void 0:e.name)!==null&&r!==void 0?r:"string":w6(t)?t.name:(n=wv(t))!==null&&n!==void 0?n:t.name}function tG(t){var e,r,n;return zl(t)?(r=(e=t.type)===null||e===void 0?void 0:e.name)!==null&&r!==void 0?r:"string":(n=wv(t))!==null&&n!==void 0?n:t.name}function kv(t){let e={s:!1,i:!1,u:!1},r=Tv(t.definition,e),n=Object.entries(e).filter(([,i])=>i).map(([i])=>i).join("");return new RegExp(r,n)}function Tv(t,e){if(D$(t))return mlt(t);if(I$(t))return glt(t);if(_$(t))return xlt(t);if(hC(t)){let r=t.rule.ref;if(!r)throw new Error("Missing rule reference.");return Jh(Tv(r.definition),{cardinality:t.cardinality,lookahead:t.lookahead})}else{if(L$(t))return vlt(t);if(M$(t))return ylt(t);if(R$(t)){let r=t.regex.lastIndexOf("/"),n=t.regex.substring(1,r),i=t.regex.substring(r+1);return e&&(e.i=i.includes("i"),e.s=i.includes("s"),e.u=i.includes("u")),Jh(n,{cardinality:t.cardinality,lookahead:t.lookahead,wrap:!1})}else{if(N$(t))return Jh(rG,{cardinality:t.cardinality,lookahead:t.lookahead});throw new Error(`Invalid terminal element: ${t?.$type}`)}}}function mlt(t){return Jh(t.elements.map(e=>Tv(e)).join("|"),{cardinality:t.cardinality,lookahead:t.lookahead})}function glt(t){return Jh(t.elements.map(e=>Tv(e)).join(""),{cardinality:t.cardinality,lookahead:t.lookahead})}function ylt(t){return Jh(`${rG}*?${Tv(t.terminal)}`,{cardinality:t.cardinality,lookahead:t.lookahead})}function vlt(t){return Jh(`(?!${Tv(t.terminal)})${rG}*?`,{cardinality:t.cardinality,lookahead:t.lookahead})}function xlt(t){return t.right?Jh(`[${W$(t.left)}-${W$(t.right)}]`,{cardinality:t.cardinality,lookahead:t.lookahead,wrap:!1}):Jh(W$(t.left),{cardinality:t.cardinality,lookahead:t.lookahead,wrap:!1})}function W$(t){return _m(t.value)}function Jh(t,e){var r;return(e.wrap!==!1||e.lookahead)&&(t=`(${(r=e.lookahead)!==null&&r!==void 0?r:""}${t})`),e.cardinality?`${t}${e.cardinality}`:t}var rG,pc=D(()=>{aC();A0();cc();vo();hc();bv();rG=/[\s\S]/.source});function nG(t){let e=[],r=t.Grammar;for(let n of r.rules)zl(n)&&j$(n)&&U$(kv(n))&&e.push(n.name);return{multilineCommentRules:e,nameRegexp:nC}}var iG=D(()=>{hc();pc();bv();A0()});var aG=D(()=>{});var blt,bC,sG=D(()=>{blt=typeof global=="object"&&global&&global.Object===Object&&global,bC=blt});var wlt,klt,Sa,mc=D(()=>{sG();wlt=typeof self=="object"&&self&&self.Object===Object&&self,klt=bC||wlt||Function("return this")(),Sa=klt});var Tlt,hs,Am=D(()=>{mc();Tlt=Sa.Symbol,hs=Tlt});function Clt(t){var e=Elt.call(t,T6),r=t[T6];try{t[T6]=void 0;var n=!0}catch{}var i=Slt.call(t);return n&&(e?t[T6]=r:delete t[T6]),i}var Zye,Elt,Slt,T6,Qye,Jye=D(()=>{Am();Zye=Object.prototype,Elt=Zye.hasOwnProperty,Slt=Zye.toString,T6=hs?hs.toStringTag:void 0;Qye=Clt});function Llt(t){return Alt.call(t)}var _lt,Alt,eve,tve=D(()=>{_lt=Object.prototype,Alt=_lt.toString;eve=Llt});function Ilt(t){return t==null?t===void 0?Dlt:Rlt:rve&&rve in Object(t)?Qye(t):eve(t)}var Rlt,Dlt,rve,xo,Vd=D(()=>{Am();Jye();tve();Rlt="[object Null]",Dlt="[object Undefined]",rve=hs?hs.toStringTag:void 0;xo=Ilt});function Mlt(t){return t!=null&&typeof t=="object"}var la,gc=D(()=>{la=Mlt});function Olt(t){return typeof t=="symbol"||la(t)&&xo(t)==Nlt}var Nlt,Wd,E6=D(()=>{Vd();gc();Nlt="[object Symbol]";Wd=Olt});function Plt(t,e){for(var r=-1,n=t==null?0:t.length,i=Array(n);++r{D0=Plt});var Blt,lr,Zi=D(()=>{Blt=Array.isArray,lr=Blt});function ave(t){if(typeof t=="string")return t;if(lr(t))return D0(t,ave)+"";if(Wd(t))return ive?ive.call(t):"";var e=t+"";return e=="0"&&1/t==-Flt?"-0":e}var Flt,nve,ive,sve,ove=D(()=>{Am();Ev();Zi();E6();Flt=1/0,nve=hs?hs.prototype:void 0,ive=nve?nve.toString:void 0;sve=ave});function $lt(t){for(var e=t.length;e--&&zlt.test(t.charAt(e)););return e}var zlt,lve,uve=D(()=>{zlt=/\s/;lve=$lt});function qlt(t){return t&&t.slice(0,lve(t)+1).replace(Glt,"")}var Glt,cve,hve=D(()=>{uve();Glt=/^\s+/;cve=qlt});function Ult(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}var Ui,yc=D(()=>{Ui=Ult});function Xlt(t){if(typeof t=="number")return t;if(Wd(t))return fve;if(Ui(t)){var e=typeof t.valueOf=="function"?t.valueOf():t;t=Ui(e)?e+"":e}if(typeof t!="string")return t===0?t:+t;t=cve(t);var r=Vlt.test(t);return r||Wlt.test(t)?Ylt(t.slice(2),r?2:8):Hlt.test(t)?fve:+t}var fve,Hlt,Vlt,Wlt,Ylt,dve,pve=D(()=>{hve();yc();E6();fve=NaN,Hlt=/^[-+]0x[0-9a-f]+$/i,Vlt=/^0b[01]+$/i,Wlt=/^0o[0-7]+$/i,Ylt=parseInt;dve=Xlt});function Klt(t){if(!t)return t===0?t:0;if(t=dve(t),t===mve||t===-mve){var e=t<0?-1:1;return e*jlt}return t===t?t:0}var mve,jlt,gve,yve=D(()=>{pve();mve=1/0,jlt=17976931348623157e292;gve=Klt});function Zlt(t){var e=gve(t),r=e%1;return e===e?r?e-r:e:0}var I0,Sv=D(()=>{yve();I0=Zlt});function Qlt(t){return t}var bu,Cv=D(()=>{bu=Qlt});function nut(t){if(!Ui(t))return!1;var e=xo(t);return e==eut||e==tut||e==Jlt||e==rut}var Jlt,eut,tut,rut,bo,wC=D(()=>{Vd();yc();Jlt="[object AsyncFunction]",eut="[object Function]",tut="[object GeneratorFunction]",rut="[object Proxy]";bo=nut});var iut,kC,vve=D(()=>{mc();iut=Sa["__core-js_shared__"],kC=iut});function aut(t){return!!xve&&xve in t}var xve,bve,wve=D(()=>{vve();xve=(function(){var t=/[^.]+$/.exec(kC&&kC.keys&&kC.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""})();bve=aut});function lut(t){if(t!=null){try{return out.call(t)}catch{}try{return t+""}catch{}}return""}var sut,out,ef,oG=D(()=>{sut=Function.prototype,out=sut.toString;ef=lut});function gut(t){if(!Ui(t)||bve(t))return!1;var e=bo(t)?mut:cut;return e.test(ef(t))}var uut,cut,hut,fut,dut,put,mut,kve,Tve=D(()=>{wC();wve();yc();oG();uut=/[\\^$.*+?()[\]{}|]/g,cut=/^\[object .+?Constructor\]$/,hut=Function.prototype,fut=Object.prototype,dut=hut.toString,put=fut.hasOwnProperty,mut=RegExp("^"+dut.call(put).replace(uut,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");kve=gut});function yut(t,e){return t?.[e]}var Eve,Sve=D(()=>{Eve=yut});function vut(t,e){var r=Eve(t,e);return kve(r)?r:void 0}var il,Yd=D(()=>{Tve();Sve();il=vut});var xut,TC,Cve=D(()=>{Yd();mc();xut=il(Sa,"WeakMap"),TC=xut});var _ve,but,Ave,Lve=D(()=>{yc();_ve=Object.create,but=(function(){function t(){}return function(e){if(!Ui(e))return{};if(_ve)return _ve(e);t.prototype=e;var r=new t;return t.prototype=void 0,r}})(),Ave=but});function wut(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 Rve,Dve=D(()=>{Rve=wut});function kut(){}var Hi,lG=D(()=>{Hi=kut});function Tut(t,e){var r=-1,n=t.length;for(e||(e=Array(n));++r{Ive=Tut});function _ut(t){var e=0,r=0;return function(){var n=Cut(),i=Sut-(n-r);if(r=n,i>0){if(++e>=Eut)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}var Eut,Sut,Cut,Nve,Ove=D(()=>{Eut=800,Sut=16,Cut=Date.now;Nve=_ut});function Aut(t){return function(){return t}}var Pve,Bve=D(()=>{Pve=Aut});var Lut,_v,uG=D(()=>{Yd();Lut=(function(){try{var t=il(Object,"defineProperty");return t({},"",{}),t}catch{}})(),_v=Lut});var Rut,Fve,zve=D(()=>{Bve();uG();Cv();Rut=_v?function(t,e){return _v(t,"toString",{configurable:!0,enumerable:!1,value:Pve(e),writable:!0})}:bu,Fve=Rut});var Dut,$ve,Gve=D(()=>{zve();Ove();Dut=Nve(Fve),$ve=Dut});function Iut(t,e){for(var r=-1,n=t==null?0:t.length;++r{EC=Iut});function Mut(t,e,r,n){for(var i=t.length,a=r+(n?1:-1);n?a--:++a{SC=Mut});function Nut(t){return t!==t}var qve,Uve=D(()=>{qve=Nut});function Out(t,e,r){for(var n=r-1,i=t.length;++n{Hve=Out});function Put(t,e,r){return e===e?Hve(t,e,r):SC(t,qve,r)}var Av,CC=D(()=>{hG();Uve();Vve();Av=Put});function But(t,e){var r=t==null?0:t.length;return!!r&&Av(t,e,0)>-1}var _C,fG=D(()=>{CC();_C=But});function $ut(t,e){var r=typeof t;return e=e??Fut,!!e&&(r=="number"||r!="symbol"&&zut.test(t))&&t>-1&&t%1==0&&t{Fut=9007199254740991,zut=/^(?:0|[1-9]\d*)$/;Xd=$ut});function Gut(t,e,r){e=="__proto__"&&_v?_v(t,e,{configurable:!0,enumerable:!0,value:r,writable:!0}):t[e]=r}var Lv,AC=D(()=>{uG();Lv=Gut});function qut(t,e){return t===e||t!==t&&e!==e}var M0,Rv=D(()=>{M0=qut});function Vut(t,e,r){var n=t[e];(!(Hut.call(t,e)&&M0(n,r))||r===void 0&&!(e in t))&&Lv(t,e,r)}var Uut,Hut,jd,C6=D(()=>{AC();Rv();Uut=Object.prototype,Hut=Uut.hasOwnProperty;jd=Vut});function Wut(t,e,r,n){var i=!r;r||(r={});for(var a=-1,s=e.length;++a{C6();AC();N0=Wut});function Yut(t,e,r){return e=Wve(e===void 0?t.length-1:e,0),function(){for(var n=arguments,i=-1,a=Wve(n.length-e,0),s=Array(a);++i{Dve();Wve=Math.max;Yve=Yut});function Xut(t,e){return $ve(Yve(t,e,bu),t+"")}var Iv,LC=D(()=>{Cv();Xve();Gve();Iv=Xut});function Kut(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=jut}var jut,Mv,RC=D(()=>{jut=9007199254740991;Mv=Kut});function Zut(t){return t!=null&&Mv(t.length)&&!bo(t)}var Ca,vc=D(()=>{wC();RC();Ca=Zut});function Qut(t,e,r){if(!Ui(r))return!1;var n=typeof e;return(n=="number"?Ca(r)&&Xd(e,r.length):n=="string"&&e in r)?M0(r[e],t):!1}var Kd,_6=D(()=>{Rv();vc();S6();yc();Kd=Qut});function Jut(t){return Iv(function(e,r){var n=-1,i=r.length,a=i>1?r[i-1]:void 0,s=i>2?r[2]:void 0;for(a=t.length>3&&typeof a=="function"?(i--,a):void 0,s&&Kd(r[0],r[1],s)&&(a=i<3?void 0:a,i=1),e=Object(e);++n{LC();_6();jve=Jut});function tct(t){var e=t&&t.constructor,r=typeof e=="function"&&e.prototype||ect;return t===r}var ect,O0,Nv=D(()=>{ect=Object.prototype;O0=tct});function rct(t,e){for(var r=-1,n=Array(t);++r{Zve=rct});function ict(t){return la(t)&&xo(t)==nct}var nct,dG,Jve=D(()=>{Vd();gc();nct="[object Arguments]";dG=ict});var exe,act,sct,oct,Zd,A6=D(()=>{Jve();gc();exe=Object.prototype,act=exe.hasOwnProperty,sct=exe.propertyIsEnumerable,oct=dG((function(){return arguments})())?dG:function(t){return la(t)&&act.call(t,"callee")&&!sct.call(t,"callee")},Zd=oct});function lct(){return!1}var txe,rxe=D(()=>{txe=lct});var axe,nxe,uct,ixe,cct,hct,tf,L6=D(()=>{mc();rxe();axe=typeof exports=="object"&&exports&&!exports.nodeType&&exports,nxe=axe&&typeof module=="object"&&module&&!module.nodeType&&module,uct=nxe&&nxe.exports===axe,ixe=uct?Sa.Buffer:void 0,cct=ixe?ixe.isBuffer:void 0,hct=cct||txe,tf=hct});function Pct(t){return la(t)&&Mv(t.length)&&!!bi[xo(t)]}var fct,dct,pct,mct,gct,yct,vct,xct,bct,wct,kct,Tct,Ect,Sct,Cct,_ct,Act,Lct,Rct,Dct,Ict,Mct,Nct,Oct,bi,sxe,oxe=D(()=>{Vd();RC();gc();fct="[object Arguments]",dct="[object Array]",pct="[object Boolean]",mct="[object Date]",gct="[object Error]",yct="[object Function]",vct="[object Map]",xct="[object Number]",bct="[object Object]",wct="[object RegExp]",kct="[object Set]",Tct="[object String]",Ect="[object WeakMap]",Sct="[object ArrayBuffer]",Cct="[object DataView]",_ct="[object Float32Array]",Act="[object Float64Array]",Lct="[object Int8Array]",Rct="[object Int16Array]",Dct="[object Int32Array]",Ict="[object Uint8Array]",Mct="[object Uint8ClampedArray]",Nct="[object Uint16Array]",Oct="[object Uint32Array]",bi={};bi[_ct]=bi[Act]=bi[Lct]=bi[Rct]=bi[Dct]=bi[Ict]=bi[Mct]=bi[Nct]=bi[Oct]=!0;bi[fct]=bi[dct]=bi[Sct]=bi[pct]=bi[Cct]=bi[mct]=bi[gct]=bi[yct]=bi[vct]=bi[xct]=bi[bct]=bi[wct]=bi[kct]=bi[Tct]=bi[Ect]=!1;sxe=Pct});function Bct(t){return function(e){return t(e)}}var P0,Ov=D(()=>{P0=Bct});var lxe,R6,Fct,pG,zct,wu,D6=D(()=>{sG();lxe=typeof exports=="object"&&exports&&!exports.nodeType&&exports,R6=lxe&&typeof module=="object"&&module&&!module.nodeType&&module,Fct=R6&&R6.exports===lxe,pG=Fct&&bC.process,zct=(function(){try{var t=R6&&R6.require&&R6.require("util").types;return t||pG&&pG.binding&&pG.binding("util")}catch{}})(),wu=zct});var uxe,$ct,Pv,DC=D(()=>{oxe();Ov();D6();uxe=wu&&wu.isTypedArray,$ct=uxe?P0(uxe):sxe,Pv=$ct});function Uct(t,e){var r=lr(t),n=!r&&Zd(t),i=!r&&!n&&tf(t),a=!r&&!n&&!i&&Pv(t),s=r||n||i||a,o=s?Zve(t.length,String):[],l=o.length;for(var u in t)(e||qct.call(t,u))&&!(s&&(u=="length"||i&&(u=="offset"||u=="parent")||a&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||Xd(u,l)))&&o.push(u);return o}var Gct,qct,IC,mG=D(()=>{Qve();A6();Zi();L6();S6();DC();Gct=Object.prototype,qct=Gct.hasOwnProperty;IC=Uct});function Hct(t,e){return function(r){return t(e(r))}}var MC,gG=D(()=>{MC=Hct});var Vct,cxe,hxe=D(()=>{gG();Vct=MC(Object.keys,Object),cxe=Vct});function Xct(t){if(!O0(t))return cxe(t);var e=[];for(var r in Object(t))Yct.call(t,r)&&r!="constructor"&&e.push(r);return e}var Wct,Yct,NC,yG=D(()=>{Nv();hxe();Wct=Object.prototype,Yct=Wct.hasOwnProperty;NC=Xct});function jct(t){return Ca(t)?IC(t):NC(t)}var li,B0=D(()=>{mG();yG();vc();li=jct});var Kct,Zct,Qct,Bv,fxe=D(()=>{C6();Dv();Kve();vc();Nv();B0();Kct=Object.prototype,Zct=Kct.hasOwnProperty,Qct=jve(function(t,e){if(O0(e)||Ca(e)){N0(e,li(e),t);return}for(var r in e)Zct.call(e,r)&&jd(t,r,e[r])}),Bv=Qct});function Jct(t){var e=[];if(t!=null)for(var r in Object(t))e.push(r);return e}var dxe,pxe=D(()=>{dxe=Jct});function r0t(t){if(!Ui(t))return dxe(t);var e=O0(t),r=[];for(var n in t)n=="constructor"&&(e||!t0t.call(t,n))||r.push(n);return r}var e0t,t0t,mxe,gxe=D(()=>{yc();Nv();pxe();e0t=Object.prototype,t0t=e0t.hasOwnProperty;mxe=r0t});function n0t(t){return Ca(t)?IC(t,!0):mxe(t)}var Qd,I6=D(()=>{mG();gxe();vc();Qd=n0t});function s0t(t,e){if(lr(t))return!1;var r=typeof t;return r=="number"||r=="symbol"||r=="boolean"||t==null||Wd(t)?!0:a0t.test(t)||!i0t.test(t)||e!=null&&t in Object(e)}var i0t,a0t,Fv,OC=D(()=>{Zi();E6();i0t=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,a0t=/^\w*$/;Fv=s0t});var o0t,rf,M6=D(()=>{Yd();o0t=il(Object,"create"),rf=o0t});function l0t(){this.__data__=rf?rf(null):{},this.size=0}var yxe,vxe=D(()=>{M6();yxe=l0t});function u0t(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}var xxe,bxe=D(()=>{xxe=u0t});function d0t(t){var e=this.__data__;if(rf){var r=e[t];return r===c0t?void 0:r}return f0t.call(e,t)?e[t]:void 0}var c0t,h0t,f0t,wxe,kxe=D(()=>{M6();c0t="__lodash_hash_undefined__",h0t=Object.prototype,f0t=h0t.hasOwnProperty;wxe=d0t});function g0t(t){var e=this.__data__;return rf?e[t]!==void 0:m0t.call(e,t)}var p0t,m0t,Txe,Exe=D(()=>{M6();p0t=Object.prototype,m0t=p0t.hasOwnProperty;Txe=g0t});function v0t(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=rf&&e===void 0?y0t:e,this}var y0t,Sxe,Cxe=D(()=>{M6();y0t="__lodash_hash_undefined__";Sxe=v0t});function zv(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e{vxe();bxe();kxe();Exe();Cxe();zv.prototype.clear=yxe;zv.prototype.delete=xxe;zv.prototype.get=wxe;zv.prototype.has=Txe;zv.prototype.set=Sxe;vG=zv});function x0t(){this.__data__=[],this.size=0}var Axe,Lxe=D(()=>{Axe=x0t});function b0t(t,e){for(var r=t.length;r--;)if(M0(t[r][0],e))return r;return-1}var Jd,N6=D(()=>{Rv();Jd=b0t});function T0t(t){var e=this.__data__,r=Jd(e,t);if(r<0)return!1;var n=e.length-1;return r==n?e.pop():k0t.call(e,r,1),--this.size,!0}var w0t,k0t,Rxe,Dxe=D(()=>{N6();w0t=Array.prototype,k0t=w0t.splice;Rxe=T0t});function E0t(t){var e=this.__data__,r=Jd(e,t);return r<0?void 0:e[r][1]}var Ixe,Mxe=D(()=>{N6();Ixe=E0t});function S0t(t){return Jd(this.__data__,t)>-1}var Nxe,Oxe=D(()=>{N6();Nxe=S0t});function C0t(t,e){var r=this.__data__,n=Jd(r,t);return n<0?(++this.size,r.push([t,e])):r[n][1]=e,this}var Pxe,Bxe=D(()=>{N6();Pxe=C0t});function $v(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e{Lxe();Dxe();Mxe();Oxe();Bxe();$v.prototype.clear=Axe;$v.prototype.delete=Rxe;$v.prototype.get=Ixe;$v.prototype.has=Nxe;$v.prototype.set=Pxe;ep=$v});var _0t,tp,PC=D(()=>{Yd();mc();_0t=il(Sa,"Map"),tp=_0t});function A0t(){this.size=0,this.__data__={hash:new vG,map:new(tp||ep),string:new vG}}var Fxe,zxe=D(()=>{_xe();O6();PC();Fxe=A0t});function L0t(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}var $xe,Gxe=D(()=>{$xe=L0t});function R0t(t,e){var r=t.__data__;return $xe(e)?r[typeof e=="string"?"string":"hash"]:r.map}var rp,P6=D(()=>{Gxe();rp=R0t});function D0t(t){var e=rp(this,t).delete(t);return this.size-=e?1:0,e}var qxe,Uxe=D(()=>{P6();qxe=D0t});function I0t(t){return rp(this,t).get(t)}var Hxe,Vxe=D(()=>{P6();Hxe=I0t});function M0t(t){return rp(this,t).has(t)}var Wxe,Yxe=D(()=>{P6();Wxe=M0t});function N0t(t,e){var r=rp(this,t),n=r.size;return r.set(t,e),this.size+=r.size==n?0:1,this}var Xxe,jxe=D(()=>{P6();Xxe=N0t});function Gv(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e{zxe();Uxe();Vxe();Yxe();jxe();Gv.prototype.clear=Fxe;Gv.prototype.delete=qxe;Gv.prototype.get=Hxe;Gv.prototype.has=Wxe;Gv.prototype.set=Xxe;Lm=Gv});function xG(t,e){if(typeof t!="function"||e!=null&&typeof e!="function")throw new TypeError(O0t);var r=function(){var n=arguments,i=e?e.apply(this,n):n[0],a=r.cache;if(a.has(i))return a.get(i);var s=t.apply(this,n);return r.cache=a.set(i,s)||a,s};return r.cache=new(xG.Cache||Lm),r}var O0t,Kxe,Zxe=D(()=>{BC();O0t="Expected a function";xG.Cache=Lm;Kxe=xG});function B0t(t){var e=Kxe(t,function(n){return r.size===P0t&&r.clear(),n}),r=e.cache;return e}var P0t,Qxe,Jxe=D(()=>{Zxe();P0t=500;Qxe=B0t});var F0t,z0t,$0t,e4e,t4e=D(()=>{Jxe();F0t=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,z0t=/\\(\\)?/g,$0t=Qxe(function(t){var e=[];return t.charCodeAt(0)===46&&e.push(""),t.replace(F0t,function(r,n,i,a){e.push(i?a.replace(z0t,"$1"):n||r)}),e}),e4e=$0t});function G0t(t){return t==null?"":sve(t)}var r4e,n4e=D(()=>{ove();r4e=G0t});function q0t(t,e){return lr(t)?t:Fv(t,e)?[t]:e4e(r4e(t))}var np,B6=D(()=>{Zi();OC();t4e();n4e();np=q0t});function H0t(t){if(typeof t=="string"||Wd(t))return t;var e=t+"";return e=="0"&&1/t==-U0t?"-0":e}var U0t,F0,qv=D(()=>{E6();U0t=1/0;F0=H0t});function V0t(t,e){e=np(e,t);for(var r=0,n=e.length;t!=null&&r{B6();qv();Uv=V0t});function W0t(t,e,r){var n=t==null?void 0:Uv(t,e);return n===void 0?r:n}var i4e,a4e=D(()=>{FC();i4e=W0t});function Y0t(t,e){for(var r=-1,n=e.length,i=t.length;++r{Hv=Y0t});function X0t(t){return lr(t)||Zd(t)||!!(s4e&&t&&t[s4e])}var s4e,o4e,l4e=D(()=>{Am();A6();Zi();s4e=hs?hs.isConcatSpreadable:void 0;o4e=X0t});function u4e(t,e,r,n,i){var a=-1,s=t.length;for(r||(r=o4e),i||(i=[]);++a0&&r(o)?e>1?u4e(o,e-1,r,n,i):Hv(i,o):n||(i[i.length]=o)}return i}var Vv,$C=D(()=>{zC();l4e();Vv=u4e});function j0t(t){var e=t==null?0:t.length;return e?Vv(t,1):[]}var Ua,c4e=D(()=>{$C();Ua=j0t});var K0t,GC,bG=D(()=>{gG();K0t=MC(Object.getPrototypeOf,Object),GC=K0t});function Z0t(t,e,r){var n=-1,i=t.length;e<0&&(e=-e>i?0:i+e),r=r>i?i:r,r<0&&(r+=i),i=e>r?0:r-e>>>0,e>>>=0;for(var a=Array(i);++n{qC=Z0t});function Q0t(t,e,r,n){var i=-1,a=t==null?0:t.length;for(n&&a&&(r=t[++i]);++i{h4e=Q0t});function J0t(){this.__data__=new ep,this.size=0}var d4e,p4e=D(()=>{O6();d4e=J0t});function eht(t){var e=this.__data__,r=e.delete(t);return this.size=e.size,r}var m4e,g4e=D(()=>{m4e=eht});function tht(t){return this.__data__.get(t)}var y4e,v4e=D(()=>{y4e=tht});function rht(t){return this.__data__.has(t)}var x4e,b4e=D(()=>{x4e=rht});function iht(t,e){var r=this.__data__;if(r instanceof ep){var n=r.__data__;if(!tp||n.length{O6();PC();BC();nht=200;w4e=iht});function Wv(t){var e=this.__data__=new ep(t);this.size=e.size}var ip,UC=D(()=>{O6();p4e();g4e();v4e();b4e();k4e();Wv.prototype.clear=d4e;Wv.prototype.delete=m4e;Wv.prototype.get=y4e;Wv.prototype.has=x4e;Wv.prototype.set=w4e;ip=Wv});function aht(t,e){return t&&N0(e,li(e),t)}var T4e,E4e=D(()=>{Dv();B0();T4e=aht});function sht(t,e){return t&&N0(e,Qd(e),t)}var S4e,C4e=D(()=>{Dv();I6();S4e=sht});function lht(t,e){if(e)return t.slice();var r=t.length,n=L4e?L4e(r):new t.constructor(r);return t.copy(n),n}var R4e,_4e,oht,A4e,L4e,D4e,I4e=D(()=>{mc();R4e=typeof exports=="object"&&exports&&!exports.nodeType&&exports,_4e=R4e&&typeof module=="object"&&module&&!module.nodeType&&module,oht=_4e&&_4e.exports===R4e,A4e=oht?Sa.Buffer:void 0,L4e=A4e?A4e.allocUnsafe:void 0;D4e=lht});function uht(t,e){for(var r=-1,n=t==null?0:t.length,i=0,a=[];++r{Yv=uht});function cht(){return[]}var VC,kG=D(()=>{VC=cht});var hht,fht,M4e,dht,Xv,WC=D(()=>{HC();kG();hht=Object.prototype,fht=hht.propertyIsEnumerable,M4e=Object.getOwnPropertySymbols,dht=M4e?function(t){return t==null?[]:(t=Object(t),Yv(M4e(t),function(e){return fht.call(t,e)}))}:VC,Xv=dht});function pht(t,e){return N0(t,Xv(t),e)}var N4e,O4e=D(()=>{Dv();WC();N4e=pht});var mht,ght,YC,TG=D(()=>{zC();bG();WC();kG();mht=Object.getOwnPropertySymbols,ght=mht?function(t){for(var e=[];t;)Hv(e,Xv(t)),t=GC(t);return e}:VC,YC=ght});function yht(t,e){return N0(t,YC(t),e)}var P4e,B4e=D(()=>{Dv();TG();P4e=yht});function vht(t,e,r){var n=e(t);return lr(t)?n:Hv(n,r(t))}var XC,EG=D(()=>{zC();Zi();XC=vht});function xht(t){return XC(t,li,Xv)}var F6,SG=D(()=>{EG();WC();B0();F6=xht});function bht(t){return XC(t,Qd,YC)}var jC,CG=D(()=>{EG();TG();I6();jC=bht});var wht,KC,F4e=D(()=>{Yd();mc();wht=il(Sa,"DataView"),KC=wht});var kht,ZC,z4e=D(()=>{Yd();mc();kht=il(Sa,"Promise"),ZC=kht});var Tht,ap,_G=D(()=>{Yd();mc();Tht=il(Sa,"Set"),ap=Tht});var $4e,Eht,G4e,q4e,U4e,H4e,Sht,Cht,_ht,Aht,Lht,Rm,xc,jv=D(()=>{F4e();PC();z4e();_G();Cve();Vd();oG();$4e="[object Map]",Eht="[object Object]",G4e="[object Promise]",q4e="[object Set]",U4e="[object WeakMap]",H4e="[object DataView]",Sht=ef(KC),Cht=ef(tp),_ht=ef(ZC),Aht=ef(ap),Lht=ef(TC),Rm=xo;(KC&&Rm(new KC(new ArrayBuffer(1)))!=H4e||tp&&Rm(new tp)!=$4e||ZC&&Rm(ZC.resolve())!=G4e||ap&&Rm(new ap)!=q4e||TC&&Rm(new TC)!=U4e)&&(Rm=function(t){var e=xo(t),r=e==Eht?t.constructor:void 0,n=r?ef(r):"";if(n)switch(n){case Sht:return H4e;case Cht:return $4e;case _ht:return G4e;case Aht:return q4e;case Lht:return U4e}return e});xc=Rm});function Iht(t){var e=t.length,r=new t.constructor(e);return e&&typeof t[0]=="string"&&Dht.call(t,"index")&&(r.index=t.index,r.input=t.input),r}var Rht,Dht,V4e,W4e=D(()=>{Rht=Object.prototype,Dht=Rht.hasOwnProperty;V4e=Iht});var Mht,Kv,AG=D(()=>{mc();Mht=Sa.Uint8Array,Kv=Mht});function Nht(t){var e=new t.constructor(t.byteLength);return new Kv(e).set(new Kv(t)),e}var Zv,QC=D(()=>{AG();Zv=Nht});function Oht(t,e){var r=e?Zv(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.byteLength)}var Y4e,X4e=D(()=>{QC();Y4e=Oht});function Bht(t){var e=new t.constructor(t.source,Pht.exec(t));return e.lastIndex=t.lastIndex,e}var Pht,j4e,K4e=D(()=>{Pht=/\w*$/;j4e=Bht});function Fht(t){return Q4e?Object(Q4e.call(t)):{}}var Z4e,Q4e,J4e,ebe=D(()=>{Am();Z4e=hs?hs.prototype:void 0,Q4e=Z4e?Z4e.valueOf:void 0;J4e=Fht});function zht(t,e){var r=e?Zv(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.length)}var tbe,rbe=D(()=>{QC();tbe=zht});function aft(t,e,r){var n=t.constructor;switch(e){case Xht:return Zv(t);case $ht:case Ght:return new n(+t);case jht:return Y4e(t,r);case Kht:case Zht:case Qht:case Jht:case eft:case tft:case rft:case nft:case ift:return tbe(t,r);case qht:return new n;case Uht:case Wht:return new n(t);case Hht:return j4e(t);case Vht:return new n;case Yht:return J4e(t)}}var $ht,Ght,qht,Uht,Hht,Vht,Wht,Yht,Xht,jht,Kht,Zht,Qht,Jht,eft,tft,rft,nft,ift,nbe,ibe=D(()=>{QC();X4e();K4e();ebe();rbe();$ht="[object Boolean]",Ght="[object Date]",qht="[object Map]",Uht="[object Number]",Hht="[object RegExp]",Vht="[object Set]",Wht="[object String]",Yht="[object Symbol]",Xht="[object ArrayBuffer]",jht="[object DataView]",Kht="[object Float32Array]",Zht="[object Float64Array]",Qht="[object Int8Array]",Jht="[object Int16Array]",eft="[object Int32Array]",tft="[object Uint8Array]",rft="[object Uint8ClampedArray]",nft="[object Uint16Array]",ift="[object Uint32Array]";nbe=aft});function sft(t){return typeof t.constructor=="function"&&!O0(t)?Ave(GC(t)):{}}var abe,sbe=D(()=>{Lve();bG();Nv();abe=sft});function lft(t){return la(t)&&xc(t)==oft}var oft,obe,lbe=D(()=>{jv();gc();oft="[object Map]";obe=lft});var ube,uft,cbe,hbe=D(()=>{lbe();Ov();D6();ube=wu&&wu.isMap,uft=ube?P0(ube):obe,cbe=uft});function hft(t){return la(t)&&xc(t)==cft}var cft,fbe,dbe=D(()=>{jv();gc();cft="[object Set]";fbe=hft});var pbe,fft,mbe,gbe=D(()=>{dbe();Ov();D6();pbe=wu&&wu.isSet,fft=pbe?P0(pbe):fbe,mbe=fft});function JC(t,e,r,n,i,a){var s,o=e&dft,l=e&pft,u=e&mft;if(r&&(s=i?r(t,n,i,a):r(t)),s!==void 0)return s;if(!Ui(t))return t;var h=lr(t);if(h){if(s=V4e(t),!o)return Ive(t,s)}else{var f=xc(t),d=f==vbe||f==bft;if(tf(t))return D4e(t,o);if(f==xbe||f==ybe||d&&!i){if(s=l||d?{}:abe(t),!o)return l?P4e(t,S4e(s,t)):N4e(t,T4e(s,t))}else{if(!ui[f])return i?t:{};s=nbe(t,f,o)}}a||(a=new ip);var p=a.get(t);if(p)return p;a.set(t,s),mbe(t)?t.forEach(function(y){s.add(JC(y,e,r,y,t,a))}):cbe(t)&&t.forEach(function(y,v){s.set(v,JC(y,e,r,v,t,a))});var m=u?l?jC:F6:l?Qd:li,g=h?void 0:m(t);return EC(g||t,function(y,v){g&&(v=y,y=t[v]),jd(s,v,JC(y,e,r,v,t,a))}),s}var dft,pft,mft,ybe,gft,yft,vft,xft,vbe,bft,wft,kft,xbe,Tft,Eft,Sft,Cft,_ft,Aft,Lft,Rft,Dft,Ift,Mft,Nft,Oft,Pft,Bft,Fft,ui,bbe,wbe=D(()=>{UC();cG();C6();E4e();C4e();I4e();Mve();O4e();B4e();SG();CG();jv();W4e();ibe();sbe();Zi();L6();hbe();yc();gbe();B0();I6();dft=1,pft=2,mft=4,ybe="[object Arguments]",gft="[object Array]",yft="[object Boolean]",vft="[object Date]",xft="[object Error]",vbe="[object Function]",bft="[object GeneratorFunction]",wft="[object Map]",kft="[object Number]",xbe="[object Object]",Tft="[object RegExp]",Eft="[object Set]",Sft="[object String]",Cft="[object Symbol]",_ft="[object WeakMap]",Aft="[object ArrayBuffer]",Lft="[object DataView]",Rft="[object Float32Array]",Dft="[object Float64Array]",Ift="[object Int8Array]",Mft="[object Int16Array]",Nft="[object Int32Array]",Oft="[object Uint8Array]",Pft="[object Uint8ClampedArray]",Bft="[object Uint16Array]",Fft="[object Uint32Array]",ui={};ui[ybe]=ui[gft]=ui[Aft]=ui[Lft]=ui[yft]=ui[vft]=ui[Rft]=ui[Dft]=ui[Ift]=ui[Mft]=ui[Nft]=ui[wft]=ui[kft]=ui[xbe]=ui[Tft]=ui[Eft]=ui[Sft]=ui[Cft]=ui[Oft]=ui[Pft]=ui[Bft]=ui[Fft]=!0;ui[xft]=ui[vbe]=ui[_ft]=!1;bbe=JC});function $ft(t){return bbe(t,zft)}var zft,ci,kbe=D(()=>{wbe();zft=4;ci=$ft});function Gft(t){for(var e=-1,r=t==null?0:t.length,n=0,i=[];++e{z0=Gft});function Uft(t){return this.__data__.set(t,qft),this}var qft,Ebe,Sbe=D(()=>{qft="__lodash_hash_undefined__";Ebe=Uft});function Hft(t){return this.__data__.has(t)}var Cbe,_be=D(()=>{Cbe=Hft});function e_(t){var e=-1,r=t==null?0:t.length;for(this.__data__=new Lm;++e{BC();Sbe();_be();e_.prototype.add=e_.prototype.push=Ebe;e_.prototype.has=Cbe;Qv=e_});function Vft(t,e){for(var r=-1,n=t==null?0:t.length;++r{r_=Vft});function Wft(t,e){return t.has(e)}var Jv,n_=D(()=>{Jv=Wft});function jft(t,e,r,n,i,a){var s=r&Yft,o=t.length,l=e.length;if(o!=l&&!(s&&l>o))return!1;var u=a.get(t),h=a.get(e);if(u&&h)return u==e&&h==t;var f=-1,d=!0,p=r&Xft?new Qv:void 0;for(a.set(t,e),a.set(e,t);++f{t_();LG();n_();Yft=1,Xft=2;i_=jft});function Kft(t){var e=-1,r=Array(t.size);return t.forEach(function(n,i){r[++e]=[i,n]}),r}var Abe,Lbe=D(()=>{Abe=Kft});function Zft(t){var e=-1,r=Array(t.size);return t.forEach(function(n){r[++e]=n}),r}var ex,a_=D(()=>{ex=Zft});function hdt(t,e,r,n,i,a,s){switch(r){case cdt:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case udt:return!(t.byteLength!=e.byteLength||!a(new Kv(t),new Kv(e)));case edt:case tdt:case idt:return M0(+t,+e);case rdt:return t.name==e.name&&t.message==e.message;case adt:case odt:return t==e+"";case ndt:var o=Abe;case sdt:var l=n&Qft;if(o||(o=ex),t.size!=e.size&&!l)return!1;var u=s.get(t);if(u)return u==e;n|=Jft,s.set(t,e);var h=i_(o(t),o(e),n,i,a,s);return s.delete(t),h;case ldt:if(DG)return DG.call(t)==DG.call(e)}return!1}var Qft,Jft,edt,tdt,rdt,ndt,idt,adt,sdt,odt,ldt,udt,cdt,Rbe,DG,Dbe,Ibe=D(()=>{Am();AG();Rv();RG();Lbe();a_();Qft=1,Jft=2,edt="[object Boolean]",tdt="[object Date]",rdt="[object Error]",ndt="[object Map]",idt="[object Number]",adt="[object RegExp]",sdt="[object Set]",odt="[object String]",ldt="[object Symbol]",udt="[object ArrayBuffer]",cdt="[object DataView]",Rbe=hs?hs.prototype:void 0,DG=Rbe?Rbe.valueOf:void 0;Dbe=hdt});function mdt(t,e,r,n,i,a){var s=r&fdt,o=F6(t),l=o.length,u=F6(e),h=u.length;if(l!=h&&!s)return!1;for(var f=l;f--;){var d=o[f];if(!(s?d in e:pdt.call(e,d)))return!1}var p=a.get(t),m=a.get(e);if(p&&m)return p==e&&m==t;var g=!0;a.set(t,e),a.set(e,t);for(var y=s;++f{SG();fdt=1,ddt=Object.prototype,pdt=ddt.hasOwnProperty;Mbe=mdt});function vdt(t,e,r,n,i,a){var s=lr(t),o=lr(e),l=s?Pbe:xc(t),u=o?Pbe:xc(e);l=l==Obe?s_:l,u=u==Obe?s_:u;var h=l==s_,f=u==s_,d=l==u;if(d&&tf(t)){if(!tf(e))return!1;s=!0,h=!1}if(d&&!h)return a||(a=new ip),s||Pv(t)?i_(t,e,r,n,i,a):Dbe(t,e,l,r,n,i,a);if(!(r&gdt)){var p=h&&Bbe.call(t,"__wrapped__"),m=f&&Bbe.call(e,"__wrapped__");if(p||m){var g=p?t.value():t,y=m?e.value():e;return a||(a=new ip),i(g,y,r,n,a)}}return d?(a||(a=new ip),Mbe(t,e,r,n,i,a)):!1}var gdt,Obe,Pbe,s_,ydt,Bbe,Fbe,zbe=D(()=>{UC();RG();Ibe();Nbe();jv();Zi();L6();DC();gdt=1,Obe="[object Arguments]",Pbe="[object Array]",s_="[object Object]",ydt=Object.prototype,Bbe=ydt.hasOwnProperty;Fbe=vdt});function $be(t,e,r,n,i){return t===e?!0:t==null||e==null||!la(t)&&!la(e)?t!==t&&e!==e:Fbe(t,e,r,n,$be,i)}var o_,IG=D(()=>{zbe();gc();o_=$be});function wdt(t,e,r,n){var i=r.length,a=i,s=!n;if(t==null)return!a;for(t=Object(t);i--;){var o=r[i];if(s&&o[2]?o[1]!==t[o[0]]:!(o[0]in t))return!1}for(;++i{UC();IG();xdt=1,bdt=2;Gbe=wdt});function kdt(t){return t===t&&!Ui(t)}var l_,MG=D(()=>{yc();l_=kdt});function Tdt(t){for(var e=li(t),r=e.length;r--;){var n=e[r],i=t[n];e[r]=[n,i,l_(i)]}return e}var Ube,Hbe=D(()=>{MG();B0();Ube=Tdt});function Edt(t,e){return function(r){return r==null?!1:r[t]===e&&(e!==void 0||t in Object(r))}}var u_,NG=D(()=>{u_=Edt});function Sdt(t){var e=Ube(t);return e.length==1&&e[0][2]?u_(e[0][0],e[0][1]):function(r){return r===t||Gbe(r,t,e)}}var Vbe,Wbe=D(()=>{qbe();Hbe();NG();Vbe=Sdt});function Cdt(t,e){return t!=null&&e in Object(t)}var Ybe,Xbe=D(()=>{Ybe=Cdt});function _dt(t,e,r){e=np(e,t);for(var n=-1,i=e.length,a=!1;++n{B6();A6();Zi();S6();RC();qv();c_=_dt});function Adt(t,e){return t!=null&&c_(t,e,Ybe)}var jbe,Kbe=D(()=>{Xbe();OG();jbe=Adt});function Ddt(t,e){return Fv(t)&&l_(e)?u_(F0(t),e):function(r){var n=i4e(r,t);return n===void 0&&n===e?jbe(r,t):o_(e,n,Ldt|Rdt)}}var Ldt,Rdt,Zbe,Qbe=D(()=>{IG();a4e();Kbe();OC();MG();NG();qv();Ldt=1,Rdt=2;Zbe=Ddt});function Idt(t){return function(e){return e?.[t]}}var Jbe,e3e=D(()=>{Jbe=Idt});function Mdt(t){return function(e){return Uv(e,t)}}var t3e,r3e=D(()=>{FC();t3e=Mdt});function Ndt(t){return Fv(t)?Jbe(F0(t)):t3e(t)}var n3e,i3e=D(()=>{e3e();r3e();OC();qv();n3e=Ndt});function Odt(t){return typeof t=="function"?t:t==null?bu:typeof t=="object"?lr(t)?Zbe(t[0],t[1]):Vbe(t):n3e(t)}var _a,bc=D(()=>{Wbe();Qbe();Cv();Zi();i3e();_a=Odt});function Pdt(t,e,r,n){for(var i=-1,a=t==null?0:t.length;++i{a3e=Pdt});function Bdt(t){return function(e,r,n){for(var i=-1,a=Object(e),s=n(e),o=s.length;o--;){var l=s[t?o:++i];if(r(a[l],l,a)===!1)break}return e}}var o3e,l3e=D(()=>{o3e=Bdt});var Fdt,u3e,c3e=D(()=>{l3e();Fdt=o3e(),u3e=Fdt});function zdt(t,e){return t&&u3e(t,e,li)}var h3e,f3e=D(()=>{c3e();B0();h3e=zdt});function $dt(t,e){return function(r,n){if(r==null)return r;if(!Ca(r))return t(r,n);for(var i=r.length,a=e?i:-1,s=Object(r);(e?a--:++a{vc();d3e=$dt});var Gdt,al,sp=D(()=>{f3e();p3e();Gdt=d3e(h3e),al=Gdt});function qdt(t,e,r,n){return al(t,function(i,a,s){e(n,i,r(i),s)}),n}var m3e,g3e=D(()=>{sp();m3e=qdt});function Udt(t,e){return function(r,n){var i=lr(r)?a3e:m3e,a=e?e():{};return i(r,t,_a(n,2),a)}}var y3e,v3e=D(()=>{s3e();g3e();bc();Zi();y3e=Udt});var x3e,Hdt,Vdt,tx,b3e=D(()=>{LC();Rv();_6();I6();x3e=Object.prototype,Hdt=x3e.hasOwnProperty,Vdt=Iv(function(t,e){t=Object(t);var r=-1,n=e.length,i=n>2?e[2]:void 0;for(i&&Kd(e[0],e[1],i)&&(n=1);++r{vc();gc();PG=Wdt});function Ydt(t,e,r){for(var n=-1,i=t==null?0:t.length;++n{h_=Ydt});function jdt(t,e,r,n){var i=-1,a=_C,s=!0,o=t.length,l=[],u=e.length;if(!o)return l;r&&(e=D0(e,P0(r))),n?(a=h_,s=!1):e.length>=Xdt&&(a=Jv,s=!1,e=new Qv(e));e:for(;++i{t_();fG();BG();Ev();Ov();n_();Xdt=200;k3e=jdt});var Kdt,op,E3e=D(()=>{T3e();$C();LC();w3e();Kdt=Iv(function(t,e){return PG(t)?k3e(t,Vv(e,1,PG,!0)):[]}),op=Kdt});function Zdt(t){var e=t==null?0:t.length;return e?t[e-1]:void 0}var $0,S3e=D(()=>{$0=Zdt});function Qdt(t,e,r){var n=t==null?0:t.length;return n?(e=r||e===void 0?1:I0(e),qC(t,e<0?0:e,n)):[]}var ua,C3e=D(()=>{wG();Sv();ua=Qdt});function Jdt(t,e,r){var n=t==null?0:t.length;return n?(e=r||e===void 0?1:I0(e),e=n-e,qC(t,0,e<0?0:e)):[]}var nf,_3e=D(()=>{wG();Sv();nf=Jdt});function ept(t){return typeof t=="function"?t:bu}var A3e,L3e=D(()=>{Cv();A3e=ept});function tpt(t,e){var r=lr(t)?EC:al;return r(t,A3e(e))}var ar,R3e=D(()=>{cG();sp();L3e();Zi();ar=tpt});function rpt(t,e){for(var r=-1,n=t==null?0:t.length;++r{D3e=rpt});function npt(t,e){var r=!0;return al(t,function(n,i,a){return r=!!e(n,i,a),r}),r}var M3e,N3e=D(()=>{sp();M3e=npt});function ipt(t,e,r){var n=lr(t)?D3e:M3e;return r&&Kd(t,e,r)&&(e=void 0),n(t,_a(e,3))}var sl,O3e=D(()=>{I3e();N3e();bc();Zi();_6();sl=ipt});function apt(t,e){var r=[];return al(t,function(n,i,a){e(n,i,a)&&r.push(n)}),r}var f_,FG=D(()=>{sp();f_=apt});function spt(t,e){var r=lr(t)?Yv:f_;return r(t,_a(e,3))}var js,P3e=D(()=>{HC();FG();bc();Zi();js=spt});function opt(t){return function(e,r,n){var i=Object(e);if(!Ca(e)){var a=_a(r,3);e=li(e),r=function(o){return a(i[o],o,i)}}var s=t(e,r,n);return s>-1?i[a?e[s]:s]:void 0}}var B3e,F3e=D(()=>{bc();vc();B0();B3e=opt});function upt(t,e,r){var n=t==null?0:t.length;if(!n)return-1;var i=r==null?0:I0(r);return i<0&&(i=lpt(n+i,0)),SC(t,_a(e,3),i)}var lpt,z3e,$3e=D(()=>{hG();bc();Sv();lpt=Math.max;z3e=upt});var cpt,G0,G3e=D(()=>{F3e();$3e();cpt=B3e(z3e),G0=cpt});function hpt(t){return t&&t.length?t[0]:void 0}var fs,q3e=D(()=>{fs=hpt});var U3e=D(()=>{q3e()});function fpt(t,e){var r=-1,n=Ca(t)?Array(t.length):[];return al(t,function(i,a,s){n[++r]=e(i,a,s)}),n}var H3e,V3e=D(()=>{sp();vc();H3e=fpt});function dpt(t,e){var r=lr(t)?D0:H3e;return r(t,_a(e,3))}var rr,zG=D(()=>{Ev();bc();V3e();Zi();rr=dpt});function ppt(t,e){return Vv(rr(t,e),1)}var wo,W3e=D(()=>{$C();zG();wo=ppt});var mpt,gpt,ypt,$G,Y3e=D(()=>{AC();v3e();mpt=Object.prototype,gpt=mpt.hasOwnProperty,ypt=y3e(function(t,e,r){gpt.call(t,r)?t[r].push(e):Lv(t,r,[e])}),$G=ypt});function bpt(t,e){return t!=null&&xpt.call(t,e)}var vpt,xpt,X3e,j3e=D(()=>{vpt=Object.prototype,xpt=vpt.hasOwnProperty;X3e=bpt});function wpt(t,e){return t!=null&&c_(t,e,X3e)}var sr,K3e=D(()=>{j3e();OG();sr=wpt});function Tpt(t){return typeof t=="string"||!lr(t)&&la(t)&&xo(t)==kpt}var kpt,ko,GG=D(()=>{Vd();Zi();gc();kpt="[object String]";ko=Tpt});function Ept(t,e){return D0(e,function(r){return t[r]})}var Z3e,Q3e=D(()=>{Ev();Z3e=Ept});function Spt(t){return t==null?[]:Z3e(t,li(t))}var Wn,qG=D(()=>{Q3e();B0();Wn=Spt});function _pt(t,e,r,n){t=Ca(t)?t:Wn(t),r=r&&!n?I0(r):0;var i=t.length;return r<0&&(r=Cpt(i+r,0)),ko(t)?r<=i&&t.indexOf(e,r)>-1:!!i&&Av(t,e,r)>-1}var Cpt,Qi,J3e=D(()=>{CC();vc();GG();Sv();qG();Cpt=Math.max;Qi=_pt});function Lpt(t,e,r){var n=t==null?0:t.length;if(!n)return-1;var i=r==null?0:I0(r);return i<0&&(i=Apt(n+i,0)),Av(t,e,i)}var Apt,d_,e5e=D(()=>{CC();Sv();Apt=Math.max;d_=Lpt});function Npt(t){if(t==null)return!0;if(Ca(t)&&(lr(t)||typeof t=="string"||typeof t.splice=="function"||tf(t)||Pv(t)||Zd(t)))return!t.length;var e=xc(t);if(e==Rpt||e==Dpt)return!t.size;if(O0(t))return!NC(t).length;for(var r in t)if(Mpt.call(t,r))return!1;return!0}var Rpt,Dpt,Ipt,Mpt,Xr,t5e=D(()=>{yG();jv();A6();Zi();vc();L6();Nv();DC();Rpt="[object Map]",Dpt="[object Set]",Ipt=Object.prototype,Mpt=Ipt.hasOwnProperty;Xr=Npt});function Ppt(t){return la(t)&&xo(t)==Opt}var Opt,r5e,n5e=D(()=>{Vd();gc();Opt="[object RegExp]";r5e=Ppt});var i5e,Bpt,q0,a5e=D(()=>{n5e();Ov();D6();i5e=wu&&wu.isRegExp,Bpt=i5e?P0(i5e):r5e,q0=Bpt});function Fpt(t){return t===void 0}var Ks,s5e=D(()=>{Ks=Fpt});function $pt(t){if(typeof t!="function")throw new TypeError(zpt);return function(){var e=arguments;switch(e.length){case 0:return!t.call(this);case 1:return!t.call(this,e[0]);case 2:return!t.call(this,e[0],e[1]);case 3:return!t.call(this,e[0],e[1],e[2])}return!t.apply(this,e)}}var zpt,o5e,l5e=D(()=>{zpt="Expected a function";o5e=$pt});function Gpt(t,e,r,n){if(!Ui(t))return t;e=np(e,t);for(var i=-1,a=e.length,s=a-1,o=t;o!=null&&++i{C6();B6();S6();yc();qv();u5e=Gpt});function qpt(t,e,r){for(var n=-1,i=e.length,a={};++n{FC();c5e();B6();h5e=qpt});function Upt(t,e){if(t==null)return{};var r=D0(jC(t),function(n){return[n]});return e=_a(e),h5e(t,r,function(n,i){return e(n,i[0])})}var UG,d5e=D(()=>{Ev();bc();f5e();CG();UG=Upt});function Hpt(t,e,r,n,i){return i(t,function(a,s,o){r=n?(n=!1,a):e(r,a,s,o)}),r}var p5e,m5e=D(()=>{p5e=Hpt});function Vpt(t,e,r){var n=lr(t)?h4e:p5e,i=arguments.length<3;return n(t,_a(e,4),r,i,al)}var Aa,g5e=D(()=>{f4e();sp();bc();m5e();Zi();Aa=Vpt});function Wpt(t,e){var r=lr(t)?Yv:f_;return r(t,o5e(_a(e,3)))}var lp,y5e=D(()=>{HC();FG();bc();Zi();l5e();lp=Wpt});function Ypt(t,e){var r;return al(t,function(n,i,a){return r=e(n,i,a),!r}),!!r}var v5e,x5e=D(()=>{sp();v5e=Ypt});function Xpt(t,e,r){var n=lr(t)?r_:v5e;return r&&Kd(t,e,r)&&(e=void 0),n(t,_a(e,3))}var HG,b5e=D(()=>{LG();bc();x5e();Zi();_6();HG=Xpt});var jpt,Kpt,w5e,k5e=D(()=>{_G();lG();a_();jpt=1/0,Kpt=ap&&1/ex(new ap([,-0]))[1]==jpt?function(t){return new ap(t)}:Hi,w5e=Kpt});function Qpt(t,e,r){var n=-1,i=_C,a=t.length,s=!0,o=[],l=o;if(r)s=!1,i=h_;else if(a>=Zpt){var u=e?null:w5e(t);if(u)return ex(u);s=!1,i=Jv,l=new Qv}else l=e?[]:o;e:for(;++n{t_();fG();BG();n_();k5e();a_();Zpt=200;T5e=Qpt});function Jpt(t){return t&&t.length?T5e(t):[]}var rx,S5e=D(()=>{E5e();rx=Jpt});var Yn=D(()=>{fxe();kbe();Tbe();b3e();E3e();C3e();_3e();O3e();P3e();G3e();U3e();W3e();c4e();R3e();Y3e();K3e();Cv();J3e();e5e();Zi();t5e();wC();yc();a5e();GG();s5e();B0();S3e();zG();lG();d5e();g5e();y5e();b5e();S5e();qG();});function nx(t){console&&console.error&&console.error(`Error: ${t}`)}function z6(t){console&&console.warn&&console.warn(`Warning: ${t}`)}var C5e=D(()=>{});function $6(t){let e=new Date().getTime(),r=t();return{time:new Date().getTime()-e,value:r}}var _5e=D(()=>{});function G6(t){function e(){}e.prototype=t;let r=new e;function n(){return typeof r.bar}return n(),n(),t;(0,eval)(t)}var A5e=D(()=>{});var ix=D(()=>{C5e();_5e();A5e()});var e1t,p_,VG=D(()=>{e1t=typeof global=="object"&&global&&global.Object===Object&&global,p_=e1t});var t1t,r1t,ds,U0=D(()=>{VG();t1t=typeof self=="object"&&self&&self.Object===Object&&self,r1t=p_||t1t||Function("return this")(),ds=r1t});var n1t,ku,q6=D(()=>{U0();n1t=ds.Symbol,ku=n1t});function s1t(t){var e=i1t.call(t,U6),r=t[U6];try{t[U6]=void 0;var n=!0}catch{}var i=a1t.call(t);return n&&(e?t[U6]=r:delete t[U6]),i}var L5e,i1t,a1t,U6,R5e,D5e=D(()=>{q6();L5e=Object.prototype,i1t=L5e.hasOwnProperty,a1t=L5e.toString,U6=ku?ku.toStringTag:void 0;R5e=s1t});function u1t(t){return l1t.call(t)}var o1t,l1t,I5e,M5e=D(()=>{o1t=Object.prototype,l1t=o1t.toString;I5e=u1t});function f1t(t){return t==null?t===void 0?h1t:c1t:N5e&&N5e in Object(t)?R5e(t):I5e(t)}var c1t,h1t,N5e,To,up=D(()=>{q6();D5e();M5e();c1t="[object Null]",h1t="[object Undefined]",N5e=ku?ku.toStringTag:void 0;To=f1t});function d1t(t){return t!=null&&typeof t=="object"}var Eo,cp=D(()=>{Eo=d1t});function m1t(t){return typeof t=="symbol"||Eo(t)&&To(t)==p1t}var p1t,hp,H6=D(()=>{up();cp();p1t="[object Symbol]";hp=m1t});function g1t(t,e){for(var r=-1,n=t==null?0:t.length,i=Array(n);++r{fp=g1t});var y1t,ri,ol=D(()=>{y1t=Array.isArray,ri=y1t});function B5e(t){if(typeof t=="string")return t;if(ri(t))return fp(t,B5e)+"";if(hp(t))return P5e?P5e.call(t):"";var e=t+"";return e=="0"&&1/t==-v1t?"-0":e}var v1t,O5e,P5e,F5e,z5e=D(()=>{q6();V6();ol();H6();v1t=1/0,O5e=ku?ku.prototype:void 0,P5e=O5e?O5e.toString:void 0;F5e=B5e});function b1t(t){for(var e=t.length;e--&&x1t.test(t.charAt(e)););return e}var x1t,$5e,G5e=D(()=>{x1t=/\s/;$5e=b1t});function k1t(t){return t&&t.slice(0,$5e(t)+1).replace(w1t,"")}var w1t,q5e,U5e=D(()=>{G5e();w1t=/^\s+/;q5e=k1t});function T1t(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}var Zs,dp=D(()=>{Zs=T1t});function A1t(t){if(typeof t=="number")return t;if(hp(t))return H5e;if(Zs(t)){var e=typeof t.valueOf=="function"?t.valueOf():t;t=Zs(e)?e+"":e}if(typeof t!="string")return t===0?t:+t;t=q5e(t);var r=S1t.test(t);return r||C1t.test(t)?_1t(t.slice(2),r?2:8):E1t.test(t)?H5e:+t}var H5e,E1t,S1t,C1t,_1t,V5e,W5e=D(()=>{U5e();dp();H6();H5e=NaN,E1t=/^[-+]0x[0-9a-f]+$/i,S1t=/^0b[01]+$/i,C1t=/^0o[0-7]+$/i,_1t=parseInt;V5e=A1t});function R1t(t){if(!t)return t===0?t:0;if(t=V5e(t),t===Y5e||t===-Y5e){var e=t<0?-1:1;return e*L1t}return t===t?t:0}var Y5e,L1t,X5e,j5e=D(()=>{W5e();Y5e=1/0,L1t=17976931348623157e292;X5e=R1t});function D1t(t){var e=X5e(t),r=e%1;return e===e?r?e-r:e:0}var K5e,Z5e=D(()=>{j5e();K5e=D1t});function I1t(t){return t}var pp,W6=D(()=>{pp=I1t});function B1t(t){if(!Zs(t))return!1;var e=To(t);return e==N1t||e==O1t||e==M1t||e==P1t}var M1t,N1t,O1t,P1t,m_,WG=D(()=>{up();dp();M1t="[object AsyncFunction]",N1t="[object Function]",O1t="[object GeneratorFunction]",P1t="[object Proxy]";m_=B1t});var F1t,g_,Q5e=D(()=>{U0();F1t=ds["__core-js_shared__"],g_=F1t});function z1t(t){return!!J5e&&J5e in t}var J5e,e6e,t6e=D(()=>{Q5e();J5e=(function(){var t=/[^.]+$/.exec(g_&&g_.keys&&g_.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""})();e6e=z1t});function q1t(t){if(t!=null){try{return G1t.call(t)}catch{}try{return t+""}catch{}}return""}var $1t,G1t,af,YG=D(()=>{$1t=Function.prototype,G1t=$1t.toString;af=q1t});function K1t(t){if(!Zs(t)||e6e(t))return!1;var e=m_(t)?j1t:H1t;return e.test(af(t))}var U1t,H1t,V1t,W1t,Y1t,X1t,j1t,r6e,n6e=D(()=>{WG();t6e();dp();YG();U1t=/[\\^$.*+?()[\]{}|]/g,H1t=/^\[object .+?Constructor\]$/,V1t=Function.prototype,W1t=Object.prototype,Y1t=V1t.toString,X1t=W1t.hasOwnProperty,j1t=RegExp("^"+Y1t.call(X1t).replace(U1t,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");r6e=K1t});function Z1t(t,e){return t?.[e]}var i6e,a6e=D(()=>{i6e=Z1t});function Q1t(t,e){var r=i6e(t,e);return r6e(r)?r:void 0}var ll,mp=D(()=>{n6e();a6e();ll=Q1t});var J1t,y_,s6e=D(()=>{mp();U0();J1t=ll(ds,"WeakMap"),y_=J1t});function emt(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 o6e,l6e=D(()=>{o6e=emt});function imt(t){var e=0,r=0;return function(){var n=nmt(),i=rmt-(n-r);if(r=n,i>0){if(++e>=tmt)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}var tmt,rmt,nmt,u6e,c6e=D(()=>{tmt=800,rmt=16,nmt=Date.now;u6e=imt});function amt(t){return function(){return t}}var h6e,f6e=D(()=>{h6e=amt});var smt,ax,XG=D(()=>{mp();smt=(function(){try{var t=ll(Object,"defineProperty");return t({},"",{}),t}catch{}})(),ax=smt});var omt,d6e,p6e=D(()=>{f6e();XG();W6();omt=ax?function(t,e){return ax(t,"toString",{configurable:!0,enumerable:!1,value:h6e(e),writable:!0})}:pp,d6e=omt});var lmt,m6e,g6e=D(()=>{p6e();c6e();lmt=u6e(d6e),m6e=lmt});function umt(t,e){for(var r=-1,n=t==null?0:t.length;++r{y6e=umt});function cmt(t,e,r,n){for(var i=t.length,a=r+(n?1:-1);n?a--:++a{x6e=cmt});function hmt(t){return t!==t}var w6e,k6e=D(()=>{w6e=hmt});function fmt(t,e,r){for(var n=r-1,i=t.length;++n{T6e=fmt});function dmt(t,e,r){return e===e?T6e(t,e,r):x6e(t,w6e,r)}var S6e,C6e=D(()=>{b6e();k6e();E6e();S6e=dmt});function gmt(t,e){var r=typeof t;return e=e??pmt,!!e&&(r=="number"||r!="symbol"&&mmt.test(t))&&t>-1&&t%1==0&&t{pmt=9007199254740991,mmt=/^(?:0|[1-9]\d*)$/;gp=gmt});function ymt(t,e,r){e=="__proto__"&&ax?ax(t,e,{configurable:!0,enumerable:!0,value:r,writable:!0}):t[e]=r}var v_,jG=D(()=>{XG();v_=ymt});function vmt(t,e){return t===e||t!==t&&e!==e}var yp,X6=D(()=>{yp=vmt});function wmt(t,e,r){var n=t[e];(!(bmt.call(t,e)&&yp(n,r))||r===void 0&&!(e in t))&&v_(t,e,r)}var xmt,bmt,sx,x_=D(()=>{jG();X6();xmt=Object.prototype,bmt=xmt.hasOwnProperty;sx=wmt});function kmt(t,e,r,n){var i=!r;r||(r={});for(var a=-1,s=e.length;++a{x_();jG();_6e=kmt});function Tmt(t,e,r){return e=L6e(e===void 0?t.length-1:e,0),function(){for(var n=arguments,i=-1,a=L6e(n.length-e,0),s=Array(a);++i{l6e();L6e=Math.max;R6e=Tmt});function Emt(t,e){return m6e(R6e(t,e,pp),t+"")}var I6e,M6e=D(()=>{W6();D6e();g6e();I6e=Emt});function Cmt(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=Smt}var Smt,ox,b_=D(()=>{Smt=9007199254740991;ox=Cmt});function _mt(t){return t!=null&&ox(t.length)&&!m_(t)}var ul,vp=D(()=>{WG();b_();ul=_mt});function Amt(t,e,r){if(!Zs(r))return!1;var n=typeof e;return(n=="number"?ul(r)&&gp(e,r.length):n=="string"&&e in r)?yp(r[e],t):!1}var lx,w_=D(()=>{X6();vp();Y6();dp();lx=Amt});function Lmt(t){return I6e(function(e,r){var n=-1,i=r.length,a=i>1?r[i-1]:void 0,s=i>2?r[2]:void 0;for(a=t.length>3&&typeof a=="function"?(i--,a):void 0,s&&lx(r[0],r[1],s)&&(a=i<3?void 0:a,i=1),e=Object(e);++n{M6e();w_();N6e=Lmt});function Dmt(t){var e=t&&t.constructor,r=typeof e=="function"&&e.prototype||Rmt;return t===r}var Rmt,ux,k_=D(()=>{Rmt=Object.prototype;ux=Dmt});function Imt(t,e){for(var r=-1,n=Array(t);++r{P6e=Imt});function Nmt(t){return Eo(t)&&To(t)==Mmt}var Mmt,KG,F6e=D(()=>{up();cp();Mmt="[object Arguments]";KG=Nmt});var z6e,Omt,Pmt,Bmt,T_,ZG=D(()=>{F6e();cp();z6e=Object.prototype,Omt=z6e.hasOwnProperty,Pmt=z6e.propertyIsEnumerable,Bmt=KG((function(){return arguments})())?KG:function(t){return Eo(t)&&Omt.call(t,"callee")&&!Pmt.call(t,"callee")},T_=Bmt});function Fmt(){return!1}var $6e,G6e=D(()=>{$6e=Fmt});var H6e,q6e,zmt,U6e,$mt,Gmt,j6,QG=D(()=>{U0();G6e();H6e=typeof exports=="object"&&exports&&!exports.nodeType&&exports,q6e=H6e&&typeof module=="object"&&module&&!module.nodeType&&module,zmt=q6e&&q6e.exports===H6e,U6e=zmt?ds.Buffer:void 0,$mt=U6e?U6e.isBuffer:void 0,Gmt=$mt||$6e,j6=Gmt});function fgt(t){return Eo(t)&&ox(t.length)&&!!wi[To(t)]}var qmt,Umt,Hmt,Vmt,Wmt,Ymt,Xmt,jmt,Kmt,Zmt,Qmt,Jmt,egt,tgt,rgt,ngt,igt,agt,sgt,ogt,lgt,ugt,cgt,hgt,wi,V6e,W6e=D(()=>{up();b_();cp();qmt="[object Arguments]",Umt="[object Array]",Hmt="[object Boolean]",Vmt="[object Date]",Wmt="[object Error]",Ymt="[object Function]",Xmt="[object Map]",jmt="[object Number]",Kmt="[object Object]",Zmt="[object RegExp]",Qmt="[object Set]",Jmt="[object String]",egt="[object WeakMap]",tgt="[object ArrayBuffer]",rgt="[object DataView]",ngt="[object Float32Array]",igt="[object Float64Array]",agt="[object Int8Array]",sgt="[object Int16Array]",ogt="[object Int32Array]",lgt="[object Uint8Array]",ugt="[object Uint8ClampedArray]",cgt="[object Uint16Array]",hgt="[object Uint32Array]",wi={};wi[ngt]=wi[igt]=wi[agt]=wi[sgt]=wi[ogt]=wi[lgt]=wi[ugt]=wi[cgt]=wi[hgt]=!0;wi[qmt]=wi[Umt]=wi[tgt]=wi[Hmt]=wi[rgt]=wi[Vmt]=wi[Wmt]=wi[Ymt]=wi[Xmt]=wi[jmt]=wi[Kmt]=wi[Zmt]=wi[Qmt]=wi[Jmt]=wi[egt]=!1;V6e=fgt});function dgt(t){return function(e){return t(e)}}var E_,JG=D(()=>{E_=dgt});var Y6e,K6,pgt,eq,mgt,cx,tq=D(()=>{VG();Y6e=typeof exports=="object"&&exports&&!exports.nodeType&&exports,K6=Y6e&&typeof module=="object"&&module&&!module.nodeType&&module,pgt=K6&&K6.exports===Y6e,eq=pgt&&p_.process,mgt=(function(){try{var t=K6&&K6.require&&K6.require("util").types;return t||eq&&eq.binding&&eq.binding("util")}catch{}})(),cx=mgt});var X6e,ggt,S_,rq=D(()=>{W6e();JG();tq();X6e=cx&&cx.isTypedArray,ggt=X6e?E_(X6e):V6e,S_=ggt});function xgt(t,e){var r=ri(t),n=!r&&T_(t),i=!r&&!n&&j6(t),a=!r&&!n&&!i&&S_(t),s=r||n||i||a,o=s?P6e(t.length,String):[],l=o.length;for(var u in t)(e||vgt.call(t,u))&&!(s&&(u=="length"||i&&(u=="offset"||u=="parent")||a&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||gp(u,l)))&&o.push(u);return o}var ygt,vgt,C_,nq=D(()=>{B6e();ZG();ol();QG();Y6();rq();ygt=Object.prototype,vgt=ygt.hasOwnProperty;C_=xgt});function bgt(t,e){return function(r){return t(e(r))}}var __,iq=D(()=>{__=bgt});var wgt,j6e,K6e=D(()=>{iq();wgt=__(Object.keys,Object),j6e=wgt});function Egt(t){if(!ux(t))return j6e(t);var e=[];for(var r in Object(t))Tgt.call(t,r)&&r!="constructor"&&e.push(r);return e}var kgt,Tgt,Z6e,Q6e=D(()=>{k_();K6e();kgt=Object.prototype,Tgt=kgt.hasOwnProperty;Z6e=Egt});function Sgt(t){return ul(t)?C_(t):Z6e(t)}var H0,hx=D(()=>{nq();Q6e();vp();H0=Sgt});var Cgt,_gt,Agt,Tu,J6e=D(()=>{x_();A6e();O6e();vp();k_();hx();Cgt=Object.prototype,_gt=Cgt.hasOwnProperty,Agt=N6e(function(t,e){if(ux(e)||ul(e)){_6e(e,H0(e),t);return}for(var r in e)_gt.call(e,r)&&sx(t,r,e[r])}),Tu=Agt});function Lgt(t){var e=[];if(t!=null)for(var r in Object(t))e.push(r);return e}var e7e,t7e=D(()=>{e7e=Lgt});function Igt(t){if(!Zs(t))return e7e(t);var e=ux(t),r=[];for(var n in t)n=="constructor"&&(e||!Dgt.call(t,n))||r.push(n);return r}var Rgt,Dgt,r7e,n7e=D(()=>{dp();k_();t7e();Rgt=Object.prototype,Dgt=Rgt.hasOwnProperty;r7e=Igt});function Mgt(t){return ul(t)?C_(t,!0):r7e(t)}var i7e,a7e=D(()=>{nq();n7e();vp();i7e=Mgt});function Pgt(t,e){if(ri(t))return!1;var r=typeof t;return r=="number"||r=="symbol"||r=="boolean"||t==null||hp(t)?!0:Ogt.test(t)||!Ngt.test(t)||e!=null&&t in Object(e)}var Ngt,Ogt,fx,A_=D(()=>{ol();H6();Ngt=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Ogt=/^\w*$/;fx=Pgt});var Bgt,sf,Z6=D(()=>{mp();Bgt=ll(Object,"create"),sf=Bgt});function Fgt(){this.__data__=sf?sf(null):{},this.size=0}var s7e,o7e=D(()=>{Z6();s7e=Fgt});function zgt(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}var l7e,u7e=D(()=>{l7e=zgt});function Ugt(t){var e=this.__data__;if(sf){var r=e[t];return r===$gt?void 0:r}return qgt.call(e,t)?e[t]:void 0}var $gt,Ggt,qgt,c7e,h7e=D(()=>{Z6();$gt="__lodash_hash_undefined__",Ggt=Object.prototype,qgt=Ggt.hasOwnProperty;c7e=Ugt});function Wgt(t){var e=this.__data__;return sf?e[t]!==void 0:Vgt.call(e,t)}var Hgt,Vgt,f7e,d7e=D(()=>{Z6();Hgt=Object.prototype,Vgt=Hgt.hasOwnProperty;f7e=Wgt});function Xgt(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=sf&&e===void 0?Ygt:e,this}var Ygt,p7e,m7e=D(()=>{Z6();Ygt="__lodash_hash_undefined__";p7e=Xgt});function dx(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e{o7e();u7e();h7e();d7e();m7e();dx.prototype.clear=s7e;dx.prototype.delete=l7e;dx.prototype.get=c7e;dx.prototype.has=f7e;dx.prototype.set=p7e;aq=dx});function jgt(){this.__data__=[],this.size=0}var y7e,v7e=D(()=>{y7e=jgt});function Kgt(t,e){for(var r=t.length;r--;)if(yp(t[r][0],e))return r;return-1}var xp,Q6=D(()=>{X6();xp=Kgt});function Jgt(t){var e=this.__data__,r=xp(e,t);if(r<0)return!1;var n=e.length-1;return r==n?e.pop():Qgt.call(e,r,1),--this.size,!0}var Zgt,Qgt,x7e,b7e=D(()=>{Q6();Zgt=Array.prototype,Qgt=Zgt.splice;x7e=Jgt});function e2t(t){var e=this.__data__,r=xp(e,t);return r<0?void 0:e[r][1]}var w7e,k7e=D(()=>{Q6();w7e=e2t});function t2t(t){return xp(this.__data__,t)>-1}var T7e,E7e=D(()=>{Q6();T7e=t2t});function r2t(t,e){var r=this.__data__,n=xp(r,t);return n<0?(++this.size,r.push([t,e])):r[n][1]=e,this}var S7e,C7e=D(()=>{Q6();S7e=r2t});function px(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e{v7e();b7e();k7e();E7e();C7e();px.prototype.clear=y7e;px.prototype.delete=x7e;px.prototype.get=w7e;px.prototype.has=T7e;px.prototype.set=S7e;bp=px});var n2t,wp,L_=D(()=>{mp();U0();n2t=ll(ds,"Map"),wp=n2t});function i2t(){this.size=0,this.__data__={hash:new aq,map:new(wp||bp),string:new aq}}var _7e,A7e=D(()=>{g7e();J6();L_();_7e=i2t});function a2t(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}var L7e,R7e=D(()=>{L7e=a2t});function s2t(t,e){var r=t.__data__;return L7e(e)?r[typeof e=="string"?"string":"hash"]:r.map}var kp,e7=D(()=>{R7e();kp=s2t});function o2t(t){var e=kp(this,t).delete(t);return this.size-=e?1:0,e}var D7e,I7e=D(()=>{e7();D7e=o2t});function l2t(t){return kp(this,t).get(t)}var M7e,N7e=D(()=>{e7();M7e=l2t});function u2t(t){return kp(this,t).has(t)}var O7e,P7e=D(()=>{e7();O7e=u2t});function c2t(t,e){var r=kp(this,t),n=r.size;return r.set(t,e),this.size+=r.size==n?0:1,this}var B7e,F7e=D(()=>{e7();B7e=c2t});function mx(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e{A7e();I7e();N7e();P7e();F7e();mx.prototype.clear=_7e;mx.prototype.delete=D7e;mx.prototype.get=M7e;mx.prototype.has=O7e;mx.prototype.set=B7e;Dm=mx});function sq(t,e){if(typeof t!="function"||e!=null&&typeof e!="function")throw new TypeError(h2t);var r=function(){var n=arguments,i=e?e.apply(this,n):n[0],a=r.cache;if(a.has(i))return a.get(i);var s=t.apply(this,n);return r.cache=a.set(i,s)||a,s};return r.cache=new(sq.Cache||Dm),r}var h2t,z7e,$7e=D(()=>{R_();h2t="Expected a function";sq.Cache=Dm;z7e=sq});function d2t(t){var e=z7e(t,function(n){return r.size===f2t&&r.clear(),n}),r=e.cache;return e}var f2t,G7e,q7e=D(()=>{$7e();f2t=500;G7e=d2t});var p2t,m2t,g2t,U7e,H7e=D(()=>{q7e();p2t=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,m2t=/\\(\\)?/g,g2t=G7e(function(t){var e=[];return t.charCodeAt(0)===46&&e.push(""),t.replace(p2t,function(r,n,i,a){e.push(i?a.replace(m2t,"$1"):n||r)}),e}),U7e=g2t});function y2t(t){return t==null?"":F5e(t)}var V7e,W7e=D(()=>{z5e();V7e=y2t});function v2t(t,e){return ri(t)?t:fx(t,e)?[t]:U7e(V7e(t))}var Tp,t7=D(()=>{ol();A_();H7e();W7e();Tp=v2t});function b2t(t){if(typeof t=="string"||hp(t))return t;var e=t+"";return e=="0"&&1/t==-x2t?"-0":e}var x2t,V0,gx=D(()=>{H6();x2t=1/0;V0=b2t});function w2t(t,e){e=Tp(e,t);for(var r=0,n=e.length;t!=null&&r{t7();gx();yx=w2t});function k2t(t,e,r){var n=t==null?void 0:yx(t,e);return n===void 0?r:n}var Y7e,X7e=D(()=>{D_();Y7e=k2t});function T2t(t,e){for(var r=-1,n=e.length,i=t.length;++r{I_=T2t});var E2t,j7e,K7e=D(()=>{iq();E2t=__(Object.getPrototypeOf,Object),j7e=E2t});function S2t(){this.__data__=new bp,this.size=0}var Z7e,Q7e=D(()=>{J6();Z7e=S2t});function C2t(t){var e=this.__data__,r=e.delete(t);return this.size=e.size,r}var J7e,e8e=D(()=>{J7e=C2t});function _2t(t){return this.__data__.get(t)}var t8e,r8e=D(()=>{t8e=_2t});function A2t(t){return this.__data__.has(t)}var n8e,i8e=D(()=>{n8e=A2t});function R2t(t,e){var r=this.__data__;if(r instanceof bp){var n=r.__data__;if(!wp||n.length{J6();L_();R_();L2t=200;a8e=R2t});function vx(t){var e=this.__data__=new bp(t);this.size=e.size}var xx,lq=D(()=>{J6();Q7e();e8e();r8e();i8e();s8e();vx.prototype.clear=Z7e;vx.prototype.delete=J7e;vx.prototype.get=t8e;vx.prototype.has=n8e;vx.prototype.set=a8e;xx=vx});function D2t(t,e){for(var r=-1,n=t==null?0:t.length,i=0,a=[];++r{o8e=D2t});function I2t(){return[]}var M_,uq=D(()=>{M_=I2t});var M2t,N2t,u8e,O2t,N_,cq=D(()=>{l8e();uq();M2t=Object.prototype,N2t=M2t.propertyIsEnumerable,u8e=Object.getOwnPropertySymbols,O2t=u8e?function(t){return t==null?[]:(t=Object(t),o8e(u8e(t),function(e){return N2t.call(t,e)}))}:M_,N_=O2t});var P2t,B2t,c8e,h8e=D(()=>{oq();K7e();cq();uq();P2t=Object.getOwnPropertySymbols,B2t=P2t?function(t){for(var e=[];t;)I_(e,N_(t)),t=j7e(t);return e}:M_,c8e=B2t});function F2t(t,e,r){var n=e(t);return ri(t)?n:I_(n,r(t))}var O_,hq=D(()=>{oq();ol();O_=F2t});function z2t(t){return O_(t,H0,N_)}var fq,f8e=D(()=>{hq();cq();hx();fq=z2t});function $2t(t){return O_(t,i7e,c8e)}var d8e,p8e=D(()=>{hq();h8e();a7e();d8e=$2t});var G2t,P_,m8e=D(()=>{mp();U0();G2t=ll(ds,"DataView"),P_=G2t});var q2t,B_,g8e=D(()=>{mp();U0();q2t=ll(ds,"Promise"),B_=q2t});var U2t,F_,y8e=D(()=>{mp();U0();U2t=ll(ds,"Set"),F_=U2t});var v8e,H2t,x8e,b8e,w8e,k8e,V2t,W2t,Y2t,X2t,j2t,Im,dq,T8e=D(()=>{m8e();L_();g8e();y8e();s6e();up();YG();v8e="[object Map]",H2t="[object Object]",x8e="[object Promise]",b8e="[object Set]",w8e="[object WeakMap]",k8e="[object DataView]",V2t=af(P_),W2t=af(wp),Y2t=af(B_),X2t=af(F_),j2t=af(y_),Im=To;(P_&&Im(new P_(new ArrayBuffer(1)))!=k8e||wp&&Im(new wp)!=v8e||B_&&Im(B_.resolve())!=x8e||F_&&Im(new F_)!=b8e||y_&&Im(new y_)!=w8e)&&(Im=function(t){var e=To(t),r=e==H2t?t.constructor:void 0,n=r?af(r):"";if(n)switch(n){case V2t:return k8e;case W2t:return v8e;case Y2t:return x8e;case X2t:return b8e;case j2t:return w8e}return e});dq=Im});var K2t,pq,E8e=D(()=>{U0();K2t=ds.Uint8Array,pq=K2t});function Q2t(t){return this.__data__.set(t,Z2t),this}var Z2t,S8e,C8e=D(()=>{Z2t="__lodash_hash_undefined__";S8e=Q2t});function J2t(t){return this.__data__.has(t)}var _8e,A8e=D(()=>{_8e=J2t});function z_(t){var e=-1,r=t==null?0:t.length;for(this.__data__=new Dm;++e{R_();C8e();A8e();z_.prototype.add=z_.prototype.push=S8e;z_.prototype.has=_8e;L8e=z_});function eyt(t,e){for(var r=-1,n=t==null?0:t.length;++r{$_=eyt});function tyt(t,e){return t.has(e)}var D8e,I8e=D(()=>{D8e=tyt});function iyt(t,e,r,n,i,a){var s=r&ryt,o=t.length,l=e.length;if(o!=l&&!(s&&l>o))return!1;var u=a.get(t),h=a.get(e);if(u&&h)return u==e&&h==t;var f=-1,d=!0,p=r&nyt?new L8e:void 0;for(a.set(t,e),a.set(e,t);++f{R8e();mq();I8e();ryt=1,nyt=2;G_=iyt});function ayt(t){var e=-1,r=Array(t.size);return t.forEach(function(n,i){r[++e]=[i,n]}),r}var M8e,N8e=D(()=>{M8e=ayt});function syt(t){var e=-1,r=Array(t.size);return t.forEach(function(n){r[++e]=n}),r}var O8e,P8e=D(()=>{O8e=syt});function byt(t,e,r,n,i,a,s){switch(r){case xyt:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case vyt:return!(t.byteLength!=e.byteLength||!a(new pq(t),new pq(e)));case uyt:case cyt:case dyt:return yp(+t,+e);case hyt:return t.name==e.name&&t.message==e.message;case pyt:case gyt:return t==e+"";case fyt:var o=M8e;case myt:var l=n&oyt;if(o||(o=O8e),t.size!=e.size&&!l)return!1;var u=s.get(t);if(u)return u==e;n|=lyt,s.set(t,e);var h=G_(o(t),o(e),n,i,a,s);return s.delete(t),h;case yyt:if(yq)return yq.call(t)==yq.call(e)}return!1}var oyt,lyt,uyt,cyt,hyt,fyt,dyt,pyt,myt,gyt,yyt,vyt,xyt,B8e,yq,F8e,z8e=D(()=>{q6();E8e();X6();gq();N8e();P8e();oyt=1,lyt=2,uyt="[object Boolean]",cyt="[object Date]",hyt="[object Error]",fyt="[object Map]",dyt="[object Number]",pyt="[object RegExp]",myt="[object Set]",gyt="[object String]",yyt="[object Symbol]",vyt="[object ArrayBuffer]",xyt="[object DataView]",B8e=ku?ku.prototype:void 0,yq=B8e?B8e.valueOf:void 0;F8e=byt});function Eyt(t,e,r,n,i,a){var s=r&wyt,o=fq(t),l=o.length,u=fq(e),h=u.length;if(l!=h&&!s)return!1;for(var f=l;f--;){var d=o[f];if(!(s?d in e:Tyt.call(e,d)))return!1}var p=a.get(t),m=a.get(e);if(p&&m)return p==e&&m==t;var g=!0;a.set(t,e),a.set(e,t);for(var y=s;++f{f8e();wyt=1,kyt=Object.prototype,Tyt=kyt.hasOwnProperty;$8e=Eyt});function _yt(t,e,r,n,i,a){var s=ri(t),o=ri(e),l=s?U8e:dq(t),u=o?U8e:dq(e);l=l==q8e?q_:l,u=u==q8e?q_:u;var h=l==q_,f=u==q_,d=l==u;if(d&&j6(t)){if(!j6(e))return!1;s=!0,h=!1}if(d&&!h)return a||(a=new xx),s||S_(t)?G_(t,e,r,n,i,a):F8e(t,e,l,r,n,i,a);if(!(r&Syt)){var p=h&&H8e.call(t,"__wrapped__"),m=f&&H8e.call(e,"__wrapped__");if(p||m){var g=p?t.value():t,y=m?e.value():e;return a||(a=new xx),i(g,y,r,n,a)}}return d?(a||(a=new xx),$8e(t,e,r,n,i,a)):!1}var Syt,q8e,U8e,q_,Cyt,H8e,V8e,W8e=D(()=>{lq();gq();z8e();G8e();T8e();ol();QG();rq();Syt=1,q8e="[object Arguments]",U8e="[object Array]",q_="[object Object]",Cyt=Object.prototype,H8e=Cyt.hasOwnProperty;V8e=_yt});function Y8e(t,e,r,n,i){return t===e?!0:t==null||e==null||!Eo(t)&&!Eo(e)?t!==t&&e!==e:V8e(t,e,r,n,Y8e,i)}var U_,vq=D(()=>{W8e();cp();U_=Y8e});function Ryt(t,e,r,n){var i=r.length,a=i,s=!n;if(t==null)return!a;for(t=Object(t);i--;){var o=r[i];if(s&&o[2]?o[1]!==t[o[0]]:!(o[0]in t))return!1}for(;++i{lq();vq();Ayt=1,Lyt=2;X8e=Ryt});function Dyt(t){return t===t&&!Zs(t)}var H_,xq=D(()=>{dp();H_=Dyt});function Iyt(t){for(var e=H0(t),r=e.length;r--;){var n=e[r],i=t[n];e[r]=[n,i,H_(i)]}return e}var K8e,Z8e=D(()=>{xq();hx();K8e=Iyt});function Myt(t,e){return function(r){return r==null?!1:r[t]===e&&(e!==void 0||t in Object(r))}}var V_,bq=D(()=>{V_=Myt});function Nyt(t){var e=K8e(t);return e.length==1&&e[0][2]?V_(e[0][0],e[0][1]):function(r){return r===t||X8e(r,t,e)}}var Q8e,J8e=D(()=>{j8e();Z8e();bq();Q8e=Nyt});function Oyt(t,e){return t!=null&&e in Object(t)}var ewe,twe=D(()=>{ewe=Oyt});function Pyt(t,e,r){e=Tp(e,t);for(var n=-1,i=e.length,a=!1;++n{t7();ZG();ol();Y6();b_();gx();rwe=Pyt});function Byt(t,e){return t!=null&&rwe(t,e,ewe)}var iwe,awe=D(()=>{twe();nwe();iwe=Byt});function $yt(t,e){return fx(t)&&H_(e)?V_(V0(t),e):function(r){var n=Y7e(r,t);return n===void 0&&n===e?iwe(r,t):U_(e,n,Fyt|zyt)}}var Fyt,zyt,swe,owe=D(()=>{vq();X7e();awe();A_();xq();bq();gx();Fyt=1,zyt=2;swe=$yt});function Gyt(t){return function(e){return e?.[t]}}var lwe,uwe=D(()=>{lwe=Gyt});function qyt(t){return function(e){return yx(e,t)}}var cwe,hwe=D(()=>{D_();cwe=qyt});function Uyt(t){return fx(t)?lwe(V0(t)):cwe(t)}var fwe,dwe=D(()=>{uwe();hwe();A_();gx();fwe=Uyt});function Hyt(t){return typeof t=="function"?t:t==null?pp:typeof t=="object"?ri(t)?swe(t[0],t[1]):Q8e(t):fwe(t)}var Ep,r7=D(()=>{J8e();owe();W6();ol();dwe();Ep=Hyt});function Vyt(t){return function(e,r,n){for(var i=-1,a=Object(e),s=n(e),o=s.length;o--;){var l=s[t?o:++i];if(r(a[l],l,a)===!1)break}return e}}var pwe,mwe=D(()=>{pwe=Vyt});var Wyt,gwe,ywe=D(()=>{mwe();Wyt=pwe(),gwe=Wyt});function Yyt(t,e){return t&&gwe(t,e,H0)}var vwe,xwe=D(()=>{ywe();hx();vwe=Yyt});function Xyt(t,e){return function(r,n){if(r==null)return r;if(!ul(r))return t(r,n);for(var i=r.length,a=e?i:-1,s=Object(r);(e?a--:++a{vp();bwe=Xyt});var jyt,Sp,n7=D(()=>{xwe();wwe();jyt=bwe(vwe),Sp=jyt});function Kyt(t){return typeof t=="function"?t:pp}var kwe,Twe=D(()=>{W6();kwe=Kyt});function Zyt(t,e){var r=ri(t)?y6e:Sp;return r(t,kwe(e))}var wq,Ewe=D(()=>{v6e();n7();Twe();ol();wq=Zyt});function Qyt(t,e){for(var r=-1,n=t==null?0:t.length;++r{Swe=Qyt});function Jyt(t,e){var r=!0;return Sp(t,function(n,i,a){return r=!!e(n,i,a),r}),r}var _we,Awe=D(()=>{n7();_we=Jyt});function evt(t,e,r){var n=ri(t)?Swe:_we;return r&&lx(t,e,r)&&(e=void 0),n(t,Ep(e,3))}var kq,Lwe=D(()=>{Cwe();Awe();r7();ol();w_();kq=evt});function tvt(t,e){var r=-1,n=ul(t)?Array(t.length):[];return Sp(t,function(i,a,s){n[++r]=e(i,a,s)}),n}var Rwe,Dwe=D(()=>{n7();vp();Rwe=tvt});function rvt(t,e){var r=ri(t)?fp:Rwe;return r(t,Ep(e,3))}var W_,Iwe=D(()=>{V6();r7();Dwe();ol();W_=rvt});function ivt(t){return typeof t=="string"||!ri(t)&&Eo(t)&&To(t)==nvt}var nvt,Mm,Tq=D(()=>{up();ol();cp();nvt="[object String]";Mm=ivt});function avt(t,e){return fp(e,function(r){return t[r]})}var Mwe,Nwe=D(()=>{V6();Mwe=avt});function svt(t){return t==null?[]:Mwe(t,H0(t))}var Owe,Pwe=D(()=>{Nwe();hx();Owe=svt});function lvt(t,e,r,n){t=ul(t)?t:Owe(t),r=r&&!n?K5e(r):0;var i=t.length;return r<0&&(r=ovt(i+r,0)),Mm(t)?r<=i&&t.indexOf(e,r)>-1:!!i&&S6e(t,e,r)>-1}var ovt,Eq,Bwe=D(()=>{C6e();vp();Tq();Z5e();Pwe();ovt=Math.max;Eq=lvt});function cvt(t){return Eo(t)&&To(t)==uvt}var uvt,Fwe,zwe=D(()=>{up();cp();uvt="[object RegExp]";Fwe=cvt});var $we,hvt,Sq,Gwe=D(()=>{zwe();JG();tq();$we=cx&&cx.isRegExp,hvt=$we?E_($we):Fwe,Sq=hvt});function fvt(t,e,r,n){if(!Zs(t))return t;e=Tp(e,t);for(var i=-1,a=e.length,s=a-1,o=t;o!=null&&++i{x_();t7();Y6();dp();gx();qwe=fvt});function dvt(t,e,r){for(var n=-1,i=e.length,a={};++n{D_();Uwe();t7();Hwe=dvt});function pvt(t,e){if(t==null)return{};var r=fp(d8e(t),function(n){return[n]});return e=Ep(e),Hwe(t,r,function(n,i){return e(n,i[0])})}var Eu,Wwe=D(()=>{V6();r7();Vwe();p8e();Eu=pvt});function mvt(t,e){var r;return Sp(t,function(n,i,a){return r=e(n,i,a),!r}),!!r}var Ywe,Xwe=D(()=>{n7();Ywe=mvt});function gvt(t,e,r){var n=ri(t)?$_:Ywe;return r&&lx(t,e,r)&&(e=void 0),n(t,Ep(e,3))}var Cq,jwe=D(()=>{mq();r7();Xwe();ol();w_();Cq=gvt});var _q=D(()=>{J6e();Lwe();Ewe();Bwe();Gwe();Tq();Iwe();Wwe();jwe();});function yvt(t){return vvt(t)?t.LABEL:t.name}function vvt(t){return Mm(t.LABEL)&&t.LABEL!==""}function Y_(t){return W_(t,bx)}function bx(t){function e(r){return W_(r,bx)}if(t instanceof Mn){let r={type:"NonTerminal",name:t.nonTerminalName,idx:t.idx};return Mm(t.label)&&(r.label=t.label),r}else{if(t instanceof hi)return{type:"Alternative",definition:e(t.definition)};if(t instanceof Nn)return{type:"Option",idx:t.idx,definition:e(t.definition)};if(t instanceof fi)return{type:"RepetitionMandatory",idx:t.idx,definition:e(t.definition)};if(t instanceof di)return{type:"RepetitionMandatoryWithSeparator",idx:t.idx,separator:bx(new Ur({terminalType:t.separator})),definition:e(t.definition)};if(t instanceof ni)return{type:"RepetitionWithSeparator",idx:t.idx,separator:bx(new Ur({terminalType:t.separator})),definition:e(t.definition)};if(t instanceof sn)return{type:"Repetition",idx:t.idx,definition:e(t.definition)};if(t instanceof ii)return{type:"Alternation",idx:t.idx,definition:e(t.definition)};if(t instanceof Ur){let r={type:"Terminal",name:t.terminalType.name,label:yvt(t.terminalType),idx:t.idx};Mm(t.label)&&(r.terminalLabel=t.label);let n=t.terminalType.PATTERN;return t.terminalType.PATTERN&&(r.pattern=Sq(n)?n.source:n),r}else{if(t instanceof So)return{type:"Rule",name:t.name,orgText:t.orgText,definition:e(t.definition)};throw Error("non exhaustive match")}}}var $l,Mn,So,hi,Nn,fi,di,sn,ni,ii,Ur,X_=D(()=>{_q();$l=class{get definition(){return this._definition}set definition(e){this._definition=e}constructor(e){this._definition=e}accept(e){e.visit(this),wq(this.definition,r=>{r.accept(e)})}},Mn=class extends $l{constructor(e){super([]),this.idx=1,Tu(this,Eu(e,r=>r!==void 0))}set definition(e){}get definition(){return this.referencedRule!==void 0?this.referencedRule.definition:[]}accept(e){e.visit(this)}},So=class extends $l{constructor(e){super(e.definition),this.orgText="",Tu(this,Eu(e,r=>r!==void 0))}},hi=class extends $l{constructor(e){super(e.definition),this.ignoreAmbiguities=!1,Tu(this,Eu(e,r=>r!==void 0))}},Nn=class extends $l{constructor(e){super(e.definition),this.idx=1,Tu(this,Eu(e,r=>r!==void 0))}},fi=class extends $l{constructor(e){super(e.definition),this.idx=1,Tu(this,Eu(e,r=>r!==void 0))}},di=class extends $l{constructor(e){super(e.definition),this.idx=1,Tu(this,Eu(e,r=>r!==void 0))}},sn=class extends $l{constructor(e){super(e.definition),this.idx=1,Tu(this,Eu(e,r=>r!==void 0))}},ni=class extends $l{constructor(e){super(e.definition),this.idx=1,Tu(this,Eu(e,r=>r!==void 0))}},ii=class extends $l{get definition(){return this._definition}set definition(e){this._definition=e}constructor(e){super(e.definition),this.idx=1,this.ignoreAmbiguities=!1,this.hasPredicates=!1,Tu(this,Eu(e,r=>r!==void 0))}},Ur=class{constructor(e){this.idx=1,Tu(this,Eu(e,r=>r!==void 0))}accept(e){e.visit(this)}}});var Co,Kwe=D(()=>{X_();Co=class{visit(e){let r=e;switch(r.constructor){case Mn:return this.visitNonTerminal(r);case hi:return this.visitAlternative(r);case Nn:return this.visitOption(r);case fi:return this.visitRepetitionMandatory(r);case di:return this.visitRepetitionMandatoryWithSeparator(r);case ni:return this.visitRepetitionWithSeparator(r);case sn:return this.visitRepetition(r);case ii:return this.visitAlternation(r);case Ur:return this.visitTerminal(r);case So:return this.visitRule(r);default:throw Error("non exhaustive match")}}visitNonTerminal(e){}visitAlternative(e){}visitOption(e){}visitRepetition(e){}visitRepetitionMandatory(e){}visitRepetitionMandatoryWithSeparator(e){}visitRepetitionWithSeparator(e){}visitAlternation(e){}visitTerminal(e){}visitRule(e){}}});function Aq(t){return t instanceof hi||t instanceof Nn||t instanceof sn||t instanceof fi||t instanceof di||t instanceof ni||t instanceof Ur||t instanceof So}function Nm(t,e=[]){return t instanceof Nn||t instanceof sn||t instanceof ni?!0:t instanceof ii?Cq(t.definition,n=>Nm(n,e)):t instanceof Mn&&Eq(e,t)?!1:t instanceof $l?(t instanceof Mn&&e.push(t),kq(t.definition,n=>Nm(n,e))):!1}function Lq(t){return t instanceof ii}function cl(t){if(t instanceof Mn)return"SUBRULE";if(t instanceof Nn)return"OPTION";if(t instanceof ii)return"OR";if(t instanceof fi)return"AT_LEAST_ONE";if(t instanceof di)return"AT_LEAST_ONE_SEP";if(t instanceof ni)return"MANY_SEP";if(t instanceof sn)return"MANY";if(t instanceof Ur)return"CONSUME";throw Error("non exhaustive match")}var Zwe=D(()=>{_q();X_()});var _o=D(()=>{X_();Kwe();Zwe()});function Qwe(t,e,r){return[new Nn({definition:[new Ur({terminalType:t.separator})].concat(t.definition)})].concat(e,r)}var of,j_=D(()=>{Yn();_o();of=class{walk(e,r=[]){ar(e.definition,(n,i)=>{let a=ua(e.definition,i+1);if(n instanceof Mn)this.walkProdRef(n,a,r);else if(n instanceof Ur)this.walkTerminal(n,a,r);else if(n instanceof hi)this.walkFlat(n,a,r);else if(n instanceof Nn)this.walkOption(n,a,r);else if(n instanceof fi)this.walkAtLeastOne(n,a,r);else if(n instanceof di)this.walkAtLeastOneSep(n,a,r);else if(n instanceof ni)this.walkManySep(n,a,r);else if(n instanceof sn)this.walkMany(n,a,r);else if(n instanceof ii)this.walkOr(n,a,r);else throw Error("non exhaustive match")})}walkTerminal(e,r,n){}walkProdRef(e,r,n){}walkFlat(e,r,n){let i=r.concat(n);this.walk(e,i)}walkOption(e,r,n){let i=r.concat(n);this.walk(e,i)}walkAtLeastOne(e,r,n){let i=[new Nn({definition:e.definition})].concat(r,n);this.walk(e,i)}walkAtLeastOneSep(e,r,n){let i=Qwe(e,r,n);this.walk(e,i)}walkMany(e,r,n){let i=[new Nn({definition:e.definition})].concat(r,n);this.walk(e,i)}walkManySep(e,r,n){let i=Qwe(e,r,n);this.walk(e,i)}walkOr(e,r,n){let i=r.concat(n);ar(e.definition,a=>{let s=new hi({definition:[a]});this.walk(s,i)})}}});function Om(t){if(t instanceof Mn)return Om(t.referencedRule);if(t instanceof Ur)return wvt(t);if(Aq(t))return xvt(t);if(Lq(t))return bvt(t);throw Error("non exhaustive match")}function xvt(t){let e=[],r=t.definition,n=0,i=r.length>n,a,s=!0;for(;i&&s;)a=r[n],s=Nm(a),e=e.concat(Om(a)),n=n+1,i=r.length>n;return rx(e)}function bvt(t){let e=rr(t.definition,r=>Om(r));return rx(Ua(e))}function wvt(t){return[t.terminalType]}var Rq=D(()=>{Yn();_o()});var K_,Dq=D(()=>{K_="_~IN~_"});function Jwe(t){let e={};return ar(t,r=>{let n=new Iq(r).startWalking();Bv(e,n)}),e}function kvt(t,e){return t.name+e+K_}var Iq,eke=D(()=>{j_();Rq();Yn();Dq();_o();Iq=class extends of{constructor(e){super(),this.topProd=e,this.follows={}}startWalking(){return this.walk(this.topProd),this.follows}walkTerminal(e,r,n){}walkProdRef(e,r,n){let i=kvt(e.referencedRule,e.idx)+this.topProd.name,a=r.concat(n),s=new hi({definition:a}),o=Om(s);this.follows[i]=o}}});function wx(t){let e=t.toString();if(Z_.hasOwnProperty(e))return Z_[e];{let r=Tvt.pattern(e);return Z_[e]=r,r}}function tke(){Z_={}}var Z_,Tvt,Q_=D(()=>{v6();Z_={},Tvt=new Sm});function ike(t,e=!1){try{let r=wx(t);return Mq(r.value,{},r.flags.ignoreCase)}catch(r){if(r.message===nke)e&&z6(`${i7} Unable to optimize: < ${t.toString()} > Complement Sets cannot be automatically optimized. This will disable the lexer's first char optimizations. See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#COMPLEMENT for details.`);else{let n="";e&&(n=` This will disable the lexer's first char optimizations. - See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#REGEXP_PARSING for details.`),Vy(`${G5} + See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#REGEXP_PARSING for details.`),nx(`${i7} Failed parsing: < ${t.toString()} > Using the @chevrotain/regexp-to-ast library - Please open an issue at: https://github.com/chevrotain/chevrotain/issues`+n)}}return[]}function w$(t,e,r){switch(t.type){case"Disjunction":for(let a=0;a{if(typeof l=="number")x7(l,e,r);else{let u=l;if(r===!0)for(let h=u.from;h<=u.to;h++)x7(h,e,r);else{for(let h=u.from;h<=u.to&&h=u2){let h=u.from>=u2?u.from:u2,f=u.to,d=qc(h),p=qc(f);for(let m=d;m<=p;m++)e[m]=m}}}});break;case"Group":w$(s.value,e,r);break;default:throw Error("Non Exhaustive Match")}let o=s.quantifier!==void 0&&s.quantifier.atLeast===0;if(s.type==="Group"&&k$(s)===!1||s.type!=="Group"&&o===!1)break}break;default:throw Error("non exhaustive match!")}return cn(e)}function x7(t,e,r){let n=qc(t);e[n]=n,r===!0&&Ymt(t,e)}function Ymt(t,e){let r=String.fromCharCode(t),n=r.toUpperCase();if(n!==r){let a=qc(n.charCodeAt(0));e[a]=a}else{let a=r.toLowerCase();if(a!==r){let i=qc(a.charCodeAt(0));e[i]=i}}}function Rwe(t,e){return Fc(t.value,r=>{if(typeof r=="number")return da(e,r);{let n=r;return Fc(e,a=>n.from<=a&&a<=n.to)!==void 0}})}function k$(t){let e=t.quantifier;return e&&e.atLeast===0?!0:t.value?Bt(t.value)?mo(t.value,k$):k$(t.value):!1}function b7(t,e){if(e instanceof RegExp){let r=l2(e),n=new T$(t);return n.visit(r),n.found}else return Fc(e,r=>da(t,r.charCodeAt(0)))!==void 0}var Iwe,G5,T$,Nwe=A(()=>{t5();hn();Hy();y7();E$();Iwe="Complement Sets are not supported for first char optimization",G5=`Unable to use "first char" lexer optimizations: -`;T$=class extends _c{constructor(e){super(),this.targetCharCodes=e,this.found=!1}visitChildren(e){if(this.found!==!0){switch(e.type){case"Lookahead":this.visitLookahead(e);return;case"NegativeLookahead":this.visitNegativeLookahead(e);return}super.visitChildren(e)}}visitCharacter(e){da(this.targetCharCodes,e.value)&&(this.found=!0)}visitSet(e){e.complement?Rwe(e,this.targetCharCodes)===void 0&&(this.found=!0):Rwe(e,this.targetCharCodes)!==void 0&&(this.found=!0)}}});function Pwe(t,e){e=Uy(e,{useSticky:S$,debug:!1,safeMode:!1,positionTracking:"full",lineTerminatorCharacters:["\r",` -`],tracer:(b,w)=>w()});let r=e.tracer;r("initCharCodeToOptimizedIndexMap",()=>{hgt()});let n;r("Reject Lexer.NA",()=>{n=e0(t,b=>b[_m]===Wn.NA)});let a=!1,i;r("Transform Patterns",()=>{a=!1,i=Rt(n,b=>{let w=b[_m];if(zc(w)){let C=w.source;return C.length===1&&C!=="^"&&C!=="$"&&C!=="."&&!w.ignoreCase?C:C.length===2&&C[0]==="\\"&&!da(["d","D","s","S","t","r","n","t","0","c","b","B","f","v","w","W"],C[1])?C[1]:e.useSticky?Owe(w):Mwe(w)}else{if(Ls(w))return a=!0,{exec:w};if(typeof w=="object")return a=!0,w;if(typeof w=="string"){if(w.length===1)return w;{let C=w.replace(/[\\^$.*+?()[\]{}|]/g,"\\$&"),k=new RegExp(C);return e.useSticky?Owe(k):Mwe(k)}}else throw Error("non exhaustive match")}})});let s,o,l,u,h;r("misc mapping",()=>{s=Rt(n,b=>b.tokenTypeIdx),o=Rt(n,b=>{let w=b.GROUP;if(w!==Wn.SKIPPED){if(Is(w))return w;if(ls(w))return!1;throw Error("non exhaustive match")}}),l=Rt(n,b=>{let w=b.LONGER_ALT;if(w)return Bt(w)?Rt(w,k=>N8(n,k)):[N8(n,w)]}),u=Rt(n,b=>b.PUSH_MODE),h=Rt(n,b=>Mt(b,"POP_MODE"))});let f;r("Line Terminator Handling",()=>{let b=Vwe(e.lineTerminatorCharacters);f=Rt(n,w=>!1),e.positionTracking!=="onlyOffset"&&(f=Rt(n,w=>Mt(w,"LINE_BREAKS")?!!w.LINE_BREAKS:qwe(w,b)===!1&&b7(b,w.PATTERN)))});let d,p,m,g;r("Misc Mapping #2",()=>{d=Rt(n,Gwe),p=Rt(i,ugt),m=Ba(n,(b,w)=>{let C=w.GROUP;return Is(C)&&C!==Wn.SKIPPED&&(b[C]=[]),b},{}),g=Rt(i,(b,w)=>({pattern:i[w],longerAlt:l[w],canLineTerminator:f[w],isCustom:d[w],short:p[w],group:o[w],push:u[w],pop:h[w],tokenTypeIdx:s[w],tokenType:n[w]}))});let v=!0,y=[];return e.safeMode||r("First Char Optimization",()=>{y=Ba(n,(b,w,C)=>{if(typeof w.PATTERN=="string"){let k=w.PATTERN.charCodeAt(0),E=qc(k);C$(b,E,g[C])}else if(Bt(w.START_CHARS_HINT)){let k;Nt(w.START_CHARS_HINT,E=>{let _=typeof E=="string"?E.charCodeAt(0):E,S=qc(_);k!==S&&(k=S,C$(b,S,g[C]))})}else if(zc(w.PATTERN))if(w.PATTERN.unicode)v=!1,e.ensureOptimizations&&Vy(`${G5} Unable to analyze < ${w.PATTERN.toString()} > pattern. + Please open an issue at: https://github.com/chevrotain/chevrotain/issues`+n)}}return[]}function Mq(t,e,r){switch(t.type){case"Disjunction":for(let i=0;i{if(typeof l=="number")J_(l,e,r);else{let u=l;if(r===!0)for(let h=u.from;h<=u.to;h++)J_(h,e,r);else{for(let h=u.from;h<=u.to&&h=kx){let h=u.from>=kx?u.from:kx,f=u.to,d=W0(h),p=W0(f);for(let m=d;m<=p;m++)e[m]=m}}}});break;case"Group":Mq(s.value,e,r);break;default:throw Error("Non Exhaustive Match")}let o=s.quantifier!==void 0&&s.quantifier.atLeast===0;if(s.type==="Group"&&Nq(s)===!1||s.type!=="Group"&&o===!1)break}break;default:throw Error("non exhaustive match!")}return Wn(e)}function J_(t,e,r){let n=W0(t);e[n]=n,r===!0&&Evt(t,e)}function Evt(t,e){let r=String.fromCharCode(t),n=r.toUpperCase();if(n!==r){let i=W0(n.charCodeAt(0));e[i]=i}else{let i=r.toLowerCase();if(i!==r){let a=W0(i.charCodeAt(0));e[a]=a}}}function rke(t,e){return G0(t.value,r=>{if(typeof r=="number")return Qi(e,r);{let n=r;return G0(e,i=>n.from<=i&&i<=n.to)!==void 0}})}function Nq(t){let e=t.quantifier;return e&&e.atLeast===0?!0:t.value?lr(t.value)?sl(t.value,Nq):Nq(t.value):!1}function eA(t,e){if(e instanceof RegExp){let r=wx(e),n=new Oq(t);return n.visit(r),n.found}else return G0(e,r=>Qi(t,r.charCodeAt(0)))!==void 0}var nke,i7,Oq,ake=D(()=>{v6();Yn();ix();Q_();Pq();nke="Complement Sets are not supported for first char optimization",i7=`Unable to use "first char" lexer optimizations: +`;Oq=class extends R0{constructor(e){super(),this.targetCharCodes=e,this.found=!1}visitChildren(e){if(this.found!==!0){switch(e.type){case"Lookahead":this.visitLookahead(e);return;case"NegativeLookahead":this.visitNegativeLookahead(e);return}super.visitChildren(e)}}visitCharacter(e){Qi(this.targetCharCodes,e.value)&&(this.found=!0)}visitSet(e){e.complement?rke(e,this.targetCharCodes)===void 0&&(this.found=!0):rke(e,this.targetCharCodes)!==void 0&&(this.found=!0)}}});function lke(t,e){e=tx(e,{useSticky:Fq,debug:!1,safeMode:!1,positionTracking:"full",lineTerminatorCharacters:["\r",` +`],tracer:(x,k)=>k()});let r=e.tracer;r("initCharCodeToOptimizedIndexMap",()=>{qvt()});let n;r("Reject Lexer.NA",()=>{n=lp(t,x=>x[Pm]===Ri.NA)});let i=!1,a;r("Transform Patterns",()=>{i=!1,a=rr(n,x=>{let k=x[Pm];if(q0(k)){let _=k.source;return _.length===1&&_!=="^"&&_!=="$"&&_!=="."&&!k.ignoreCase?_:_.length===2&&_[0]==="\\"&&!Qi(["d","D","s","S","t","r","n","t","0","c","b","B","f","v","w","W"],_[1])?_[1]:e.useSticky?oke(k):ske(k)}else{if(bo(k))return i=!0,{exec:k};if(typeof k=="object")return i=!0,k;if(typeof k=="string"){if(k.length===1)return k;{let _=k.replace(/[\\^$.*+?()[\]{}|]/g,"\\$&"),T=new RegExp(_);return e.useSticky?oke(T):ske(T)}}else throw Error("non exhaustive match")}})});let s,o,l,u,h;r("misc mapping",()=>{s=rr(n,x=>x.tokenTypeIdx),o=rr(n,x=>{let k=x.GROUP;if(k!==Ri.SKIPPED){if(ko(k))return k;if(Ks(k))return!1;throw Error("non exhaustive match")}}),l=rr(n,x=>{let k=x.LONGER_ALT;if(k)return lr(k)?rr(k,T=>d_(n,T)):[d_(n,k)]}),u=rr(n,x=>x.PUSH_MODE),h=rr(n,x=>sr(x,"POP_MODE"))});let f;r("Line Terminator Handling",()=>{let x=gke(e.lineTerminatorCharacters);f=rr(n,k=>!1),e.positionTracking!=="onlyOffset"&&(f=rr(n,k=>sr(k,"LINE_BREAKS")?!!k.LINE_BREAKS:mke(k,x)===!1&&eA(x,k.PATTERN)))});let d,p,m,g;r("Misc Mapping #2",()=>{d=rr(n,dke),p=rr(a,$vt),m=Aa(n,(x,k)=>{let _=k.GROUP;return ko(_)&&_!==Ri.SKIPPED&&(x[_]=[]),x},{}),g=rr(a,(x,k)=>({pattern:a[k],longerAlt:l[k],canLineTerminator:f[k],isCustom:d[k],short:p[k],group:o[k],push:u[k],pop:h[k],tokenTypeIdx:s[k],tokenType:n[k]}))});let y=!0,v=[];return e.safeMode||r("First Char Optimization",()=>{v=Aa(n,(x,k,_)=>{if(typeof k.PATTERN=="string"){let T=k.PATTERN.charCodeAt(0),S=W0(T);Bq(x,S,g[_])}else if(lr(k.START_CHARS_HINT)){let T;ar(k.START_CHARS_HINT,S=>{let R=typeof S=="string"?S.charCodeAt(0):S,A=W0(R);T!==A&&(T=A,Bq(x,A,g[_]))})}else if(q0(k.PATTERN))if(k.PATTERN.unicode)y=!1,e.ensureOptimizations&&nx(`${i7} Unable to analyze < ${k.PATTERN.toString()} > pattern. The regexp unicode flag is not currently supported by the regexp-to-ast library. This will disable the lexer's first char optimizations. - For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#UNICODE_OPTIMIZE`);else{let k=Dwe(w.PATTERN,e.ensureOptimizations);kr(k)&&(v=!1),Nt(k,E=>{C$(b,E,g[C])})}else e.ensureOptimizations&&Vy(`${G5} TokenType: <${w.name}> is using a custom token pattern without providing parameter. + For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#UNICODE_OPTIMIZE`);else{let T=ike(k.PATTERN,e.ensureOptimizations);Xr(T)&&(y=!1),ar(T,S=>{Bq(x,S,g[_])})}else e.ensureOptimizations&&nx(`${i7} TokenType: <${k.name}> is using a custom token pattern without providing parameter. This will disable the lexer's first char optimizations. - For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#CUSTOM_OPTIMIZE`),v=!1;return b},[])}),{emptyGroups:m,patternIdxToConfig:g,charCodeToPatternIdxToConfig:y,hasCustom:a,canBeOptimized:v}}function Bwe(t,e){let r=[],n=jmt(t);r=r.concat(n.errors);let a=Kmt(n.valid),i=a.valid;return r=r.concat(a.errors),r=r.concat(Xmt(i)),r=r.concat(agt(i)),r=r.concat(igt(i,e)),r=r.concat(sgt(i)),r}function Xmt(t){let e=[],r=os(t,n=>zc(n[_m]));return e=e.concat(Qmt(r)),e=e.concat(tgt(r)),e=e.concat(rgt(r)),e=e.concat(ngt(r)),e=e.concat(Jmt(r)),e}function jmt(t){let e=os(t,a=>!Mt(a,_m)),r=Rt(e,a=>({message:"Token Type: ->"+a.name+"<- missing static 'PATTERN' property",type:Hn.MISSING_PATTERN,tokenTypes:[a]})),n=Jd(t,e);return{errors:r,valid:n}}function Kmt(t){let e=os(t,a=>{let i=a[_m];return!zc(i)&&!Ls(i)&&!Mt(i,"exec")&&!Is(i)}),r=Rt(e,a=>({message:"Token Type: ->"+a.name+"<- static 'PATTERN' can only be a RegExp, a Function matching the {CustomPatternMatcherFunc} type or an Object matching the {ICustomPattern} interface.",type:Hn.INVALID_PATTERN,tokenTypes:[a]})),n=Jd(t,e);return{errors:r,valid:n}}function Qmt(t){class e extends _c{constructor(){super(...arguments),this.found=!1}visitEndAnchor(i){this.found=!0}}let r=os(t,a=>{let i=a.PATTERN;try{let s=l2(i),o=new e;return o.visit(s),o.found}catch{return Zmt.test(i.source)}});return Rt(r,a=>({message:`Unexpected RegExp Anchor Error: - Token Type: ->`+a.name+`<- static 'PATTERN' cannot contain end of input anchor '$' - See chevrotain.io/docs/guide/resolving_lexer_errors.html#ANCHORS for details.`,type:Hn.EOI_ANCHOR_FOUND,tokenTypes:[a]}))}function Jmt(t){let e=os(t,n=>n.PATTERN.test(""));return Rt(e,n=>({message:"Token Type: ->"+n.name+"<- static 'PATTERN' must not match an empty string",type:Hn.EMPTY_MATCH_PATTERN,tokenTypes:[n]}))}function tgt(t){class e extends _c{constructor(){super(...arguments),this.found=!1}visitStartAnchor(i){this.found=!0}}let r=os(t,a=>{let i=a.PATTERN;try{let s=l2(i),o=new e;return o.visit(s),o.found}catch{return egt.test(i.source)}});return Rt(r,a=>({message:`Unexpected RegExp Anchor Error: - Token Type: ->`+a.name+`<- static 'PATTERN' cannot contain start of input anchor '^' - See https://chevrotain.io/docs/guide/resolving_lexer_errors.html#ANCHORS for details.`,type:Hn.SOI_ANCHOR_FOUND,tokenTypes:[a]}))}function rgt(t){let e=os(t,n=>{let a=n[_m];return a instanceof RegExp&&(a.multiline||a.global)});return Rt(e,n=>({message:"Token Type: ->"+n.name+"<- static 'PATTERN' may NOT contain global('g') or multiline('m')",type:Hn.UNSUPPORTED_FLAGS_FOUND,tokenTypes:[n]}))}function ngt(t){let e=[],r=Rt(t,i=>Ba(t,(s,o)=>(i.PATTERN.source===o.PATTERN.source&&!da(e,o)&&o.PATTERN!==Wn.NA&&(e.push(o),s.push(o)),s),[]));r=Pc(r);let n=os(r,i=>i.length>1);return Rt(n,i=>{let s=Rt(i,l=>l.name);return{message:`The same RegExp pattern ->${bi(i).PATTERN}<-has been used in all of the following Token Types: ${s.join(", ")} <-`,type:Hn.DUPLICATE_PATTERNS_FOUND,tokenTypes:i}})}function agt(t){let e=os(t,n=>{if(!Mt(n,"GROUP"))return!1;let a=n.GROUP;return a!==Wn.SKIPPED&&a!==Wn.NA&&!Is(a)});return Rt(e,n=>({message:"Token Type: ->"+n.name+"<- static 'GROUP' can only be Lexer.SKIPPED/Lexer.NA/A String",type:Hn.INVALID_GROUP_TYPE_FOUND,tokenTypes:[n]}))}function igt(t,e){let r=os(t,a=>a.PUSH_MODE!==void 0&&!da(e,a.PUSH_MODE));return Rt(r,a=>({message:`Token Type: ->${a.name}<- static 'PUSH_MODE' value cannot refer to a Lexer Mode ->${a.PUSH_MODE}<-which does not exist`,type:Hn.PUSH_MODE_DOES_NOT_EXIST,tokenTypes:[a]}))}function sgt(t){let e=[],r=Ba(t,(n,a,i)=>{let s=a.PATTERN;return s===Wn.NA||(Is(s)?n.push({str:s,idx:i,tokenType:a}):zc(s)&&lgt(s)&&n.push({str:s.source,idx:i,tokenType:a})),n},[]);return Nt(t,(n,a)=>{Nt(r,({str:i,idx:s,tokenType:o})=>{if(a${o.name}<- can never be matched. + For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#CUSTOM_OPTIMIZE`),y=!1;return x},[])}),{emptyGroups:m,patternIdxToConfig:g,charCodeToPatternIdxToConfig:v,hasCustom:i,canBeOptimized:y}}function uke(t,e){let r=[],n=Cvt(t);r=r.concat(n.errors);let i=_vt(n.valid),a=i.valid;return r=r.concat(i.errors),r=r.concat(Svt(a)),r=r.concat(Ovt(a)),r=r.concat(Pvt(a,e)),r=r.concat(Bvt(a)),r}function Svt(t){let e=[],r=js(t,n=>q0(n[Pm]));return e=e.concat(Lvt(r)),e=e.concat(Ivt(r)),e=e.concat(Mvt(r)),e=e.concat(Nvt(r)),e=e.concat(Rvt(r)),e}function Cvt(t){let e=js(t,i=>!sr(i,Pm)),r=rr(e,i=>({message:"Token Type: ->"+i.name+"<- missing static 'PATTERN' property",type:Li.MISSING_PATTERN,tokenTypes:[i]})),n=op(t,e);return{errors:r,valid:n}}function _vt(t){let e=js(t,i=>{let a=i[Pm];return!q0(a)&&!bo(a)&&!sr(a,"exec")&&!ko(a)}),r=rr(e,i=>({message:"Token Type: ->"+i.name+"<- static 'PATTERN' can only be a RegExp, a Function matching the {CustomPatternMatcherFunc} type or an Object matching the {ICustomPattern} interface.",type:Li.INVALID_PATTERN,tokenTypes:[i]})),n=op(t,e);return{errors:r,valid:n}}function Lvt(t){class e extends R0{constructor(){super(...arguments),this.found=!1}visitEndAnchor(a){this.found=!0}}let r=js(t,i=>{let a=i.PATTERN;try{let s=wx(a),o=new e;return o.visit(s),o.found}catch{return Avt.test(a.source)}});return rr(r,i=>({message:`Unexpected RegExp Anchor Error: + Token Type: ->`+i.name+`<- static 'PATTERN' cannot contain end of input anchor '$' + See chevrotain.io/docs/guide/resolving_lexer_errors.html#ANCHORS for details.`,type:Li.EOI_ANCHOR_FOUND,tokenTypes:[i]}))}function Rvt(t){let e=js(t,n=>n.PATTERN.test(""));return rr(e,n=>({message:"Token Type: ->"+n.name+"<- static 'PATTERN' must not match an empty string",type:Li.EMPTY_MATCH_PATTERN,tokenTypes:[n]}))}function Ivt(t){class e extends R0{constructor(){super(...arguments),this.found=!1}visitStartAnchor(a){this.found=!0}}let r=js(t,i=>{let a=i.PATTERN;try{let s=wx(a),o=new e;return o.visit(s),o.found}catch{return Dvt.test(a.source)}});return rr(r,i=>({message:`Unexpected RegExp Anchor Error: + Token Type: ->`+i.name+`<- static 'PATTERN' cannot contain start of input anchor '^' + See https://chevrotain.io/docs/guide/resolving_lexer_errors.html#ANCHORS for details.`,type:Li.SOI_ANCHOR_FOUND,tokenTypes:[i]}))}function Mvt(t){let e=js(t,n=>{let i=n[Pm];return i instanceof RegExp&&(i.multiline||i.global)});return rr(e,n=>({message:"Token Type: ->"+n.name+"<- static 'PATTERN' may NOT contain global('g') or multiline('m')",type:Li.UNSUPPORTED_FLAGS_FOUND,tokenTypes:[n]}))}function Nvt(t){let e=[],r=rr(t,a=>Aa(t,(s,o)=>(a.PATTERN.source===o.PATTERN.source&&!Qi(e,o)&&o.PATTERN!==Ri.NA&&(e.push(o),s.push(o)),s),[]));r=z0(r);let n=js(r,a=>a.length>1);return rr(n,a=>{let s=rr(a,l=>l.name);return{message:`The same RegExp pattern ->${fs(a).PATTERN}<-has been used in all of the following Token Types: ${s.join(", ")} <-`,type:Li.DUPLICATE_PATTERNS_FOUND,tokenTypes:a}})}function Ovt(t){let e=js(t,n=>{if(!sr(n,"GROUP"))return!1;let i=n.GROUP;return i!==Ri.SKIPPED&&i!==Ri.NA&&!ko(i)});return rr(e,n=>({message:"Token Type: ->"+n.name+"<- static 'GROUP' can only be Lexer.SKIPPED/Lexer.NA/A String",type:Li.INVALID_GROUP_TYPE_FOUND,tokenTypes:[n]}))}function Pvt(t,e){let r=js(t,i=>i.PUSH_MODE!==void 0&&!Qi(e,i.PUSH_MODE));return rr(r,i=>({message:`Token Type: ->${i.name}<- static 'PUSH_MODE' value cannot refer to a Lexer Mode ->${i.PUSH_MODE}<-which does not exist`,type:Li.PUSH_MODE_DOES_NOT_EXIST,tokenTypes:[i]}))}function Bvt(t){let e=[],r=Aa(t,(n,i,a)=>{let s=i.PATTERN;return s===Ri.NA||(ko(s)?n.push({str:s,idx:a,tokenType:i}):q0(s)&&zvt(s)&&n.push({str:s.source,idx:a,tokenType:i})),n},[]);return ar(t,(n,i)=>{ar(r,({str:a,idx:s,tokenType:o})=>{if(i${o.name}<- can never be matched. Because it appears AFTER the Token Type ->${n.name}<-in the lexer's definition. -See https://chevrotain.io/docs/guide/resolving_lexer_errors.html#UNREACHABLE`;e.push({message:l,type:Hn.UNREACHABLE_PATTERN,tokenTypes:[n,o]})}})}),e}function ogt(t,e){if(zc(e)){let r=e.exec(t);return r!==null&&r.index===0}else{if(Ls(e))return e(t,0,[],{});if(Mt(e,"exec"))return e.exec(t,0,[],{});if(typeof e=="string")return e===t;throw Error("non exhaustive match")}}function lgt(t){return Fc([".","\\","[","]","|","^","$","(",")","?","*","+","{"],r=>t.source.indexOf(r)!==-1)===void 0}function Mwe(t){let e=t.ignoreCase?"i":"";return new RegExp(`^(?:${t.source})`,e)}function Owe(t){let e=t.ignoreCase?"iy":"y";return new RegExp(`${t.source}`,e)}function Fwe(t,e,r){let n=[];return Mt(t,c2)||n.push({message:"A MultiMode Lexer cannot be initialized without a <"+c2+`> property in its definition -`,type:Hn.MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE}),Mt(t,w7)||n.push({message:"A MultiMode Lexer cannot be initialized without a <"+w7+`> property in its definition -`,type:Hn.MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY}),Mt(t,w7)&&Mt(t,c2)&&!Mt(t.modes,t.defaultMode)&&n.push({message:`A MultiMode Lexer cannot be initialized with a ${c2}: <${t.defaultMode}>which does not exist -`,type:Hn.MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST}),Mt(t,w7)&&Nt(t.modes,(a,i)=>{Nt(a,(s,o)=>{if(ls(s))n.push({message:`A Lexer cannot be initialized using an undefined Token Type. Mode:<${i}> at index: <${o}> -`,type:Hn.LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED});else if(Mt(s,"LONGER_ALT")){let l=Bt(s.LONGER_ALT)?s.LONGER_ALT:[s.LONGER_ALT];Nt(l,u=>{!ls(u)&&!da(a,u)&&n.push({message:`A MultiMode Lexer cannot be initialized with a longer_alt <${u.name}> on token <${s.name}> outside of mode <${i}> -`,type:Hn.MULTI_MODE_LEXER_LONGER_ALT_NOT_IN_CURRENT_MODE})})}})}),n}function zwe(t,e,r){let n=[],a=!1,i=Pc(ja(cn(t.modes))),s=e0(i,l=>l[_m]===Wn.NA),o=Vwe(r);return e&&Nt(s,l=>{let u=qwe(l,o);if(u!==!1){let f={message:cgt(l,u),type:u.issue,tokenType:l};n.push(f)}else Mt(l,"LINE_BREAKS")?l.LINE_BREAKS===!0&&(a=!0):b7(o,l.PATTERN)&&(a=!0)}),e&&!a&&n.push({message:`Warning: No LINE_BREAKS Found. +See https://chevrotain.io/docs/guide/resolving_lexer_errors.html#UNREACHABLE`;e.push({message:l,type:Li.UNREACHABLE_PATTERN,tokenTypes:[n,o]})}})}),e}function Fvt(t,e){if(q0(e)){let r=e.exec(t);return r!==null&&r.index===0}else{if(bo(e))return e(t,0,[],{});if(sr(e,"exec"))return e.exec(t,0,[],{});if(typeof e=="string")return e===t;throw Error("non exhaustive match")}}function zvt(t){return G0([".","\\","[","]","|","^","$","(",")","?","*","+","{"],r=>t.source.indexOf(r)!==-1)===void 0}function ske(t){let e=t.ignoreCase?"i":"";return new RegExp(`^(?:${t.source})`,e)}function oke(t){let e=t.ignoreCase?"iy":"y";return new RegExp(`${t.source}`,e)}function cke(t,e,r){let n=[];return sr(t,Tx)||n.push({message:"A MultiMode Lexer cannot be initialized without a <"+Tx+`> property in its definition +`,type:Li.MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE}),sr(t,tA)||n.push({message:"A MultiMode Lexer cannot be initialized without a <"+tA+`> property in its definition +`,type:Li.MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY}),sr(t,tA)&&sr(t,Tx)&&!sr(t.modes,t.defaultMode)&&n.push({message:`A MultiMode Lexer cannot be initialized with a ${Tx}: <${t.defaultMode}>which does not exist +`,type:Li.MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST}),sr(t,tA)&&ar(t.modes,(i,a)=>{ar(i,(s,o)=>{if(Ks(s))n.push({message:`A Lexer cannot be initialized using an undefined Token Type. Mode:<${a}> at index: <${o}> +`,type:Li.LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED});else if(sr(s,"LONGER_ALT")){let l=lr(s.LONGER_ALT)?s.LONGER_ALT:[s.LONGER_ALT];ar(l,u=>{!Ks(u)&&!Qi(i,u)&&n.push({message:`A MultiMode Lexer cannot be initialized with a longer_alt <${u.name}> on token <${s.name}> outside of mode <${a}> +`,type:Li.MULTI_MODE_LEXER_LONGER_ALT_NOT_IN_CURRENT_MODE})})}})}),n}function hke(t,e,r){let n=[],i=!1,a=z0(Ua(Wn(t.modes))),s=lp(a,l=>l[Pm]===Ri.NA),o=gke(r);return e&&ar(s,l=>{let u=mke(l,o);if(u!==!1){let f={message:Gvt(l,u),type:u.issue,tokenType:l};n.push(f)}else sr(l,"LINE_BREAKS")?l.LINE_BREAKS===!0&&(i=!0):eA(o,l.PATTERN)&&(i=!0)}),e&&!i&&n.push({message:`Warning: No LINE_BREAKS Found. This Lexer has been defined to track line and column information, But none of the Token Types can be identified as matching a line terminator. - See https://chevrotain.io/docs/guide/resolving_lexer_errors.html#LINE_BREAKS - for details.`,type:Hn.NO_LINE_BREAKS_FLAGS}),n}function $we(t){let e={},r=Sn(t);return Nt(r,n=>{let a=t[n];if(Bt(a))e[n]=[];else throw Error("non exhaustive match")}),e}function Gwe(t){let e=t.PATTERN;if(zc(e))return!1;if(Ls(e))return!0;if(Mt(e,"exec"))return!0;if(Is(e))return!1;throw Error("non exhaustive match")}function ugt(t){return Is(t)&&t.length===1?t.charCodeAt(0):!1}function qwe(t,e){if(Mt(t,"LINE_BREAKS"))return!1;if(zc(t.PATTERN)){try{b7(e,t.PATTERN)}catch(r){return{issue:Hn.IDENTIFY_TERMINATOR,errMsg:r.message}}return!1}else{if(Is(t.PATTERN))return!1;if(Gwe(t))return{issue:Hn.CUSTOM_LINE_BREAK};throw Error("non exhaustive match")}}function cgt(t,e){if(e.issue===Hn.IDENTIFY_TERMINATOR)return`Warning: unable to identify line terminator usage in pattern. + See https://chevrotain.io/docs/guide/resolving_lexer_errors.html#LINE_BREAKS + for details.`,type:Li.NO_LINE_BREAKS_FLAGS}),n}function fke(t){let e={},r=li(t);return ar(r,n=>{let i=t[n];if(lr(i))e[n]=[];else throw Error("non exhaustive match")}),e}function dke(t){let e=t.PATTERN;if(q0(e))return!1;if(bo(e))return!0;if(sr(e,"exec"))return!0;if(ko(e))return!1;throw Error("non exhaustive match")}function $vt(t){return ko(t)&&t.length===1?t.charCodeAt(0):!1}function mke(t,e){if(sr(t,"LINE_BREAKS"))return!1;if(q0(t.PATTERN)){try{eA(e,t.PATTERN)}catch(r){return{issue:Li.IDENTIFY_TERMINATOR,errMsg:r.message}}return!1}else{if(ko(t.PATTERN))return!1;if(dke(t))return{issue:Li.CUSTOM_LINE_BREAK};throw Error("non exhaustive match")}}function Gvt(t,e){if(e.issue===Li.IDENTIFY_TERMINATOR)return`Warning: unable to identify line terminator usage in pattern. The problem is in the <${t.name}> Token Type Root cause: ${e.errMsg}. - For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#IDENTIFY_TERMINATOR`;if(e.issue===Hn.CUSTOM_LINE_BREAK)return`Warning: A Custom Token Pattern should specify the option. + For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#IDENTIFY_TERMINATOR`;if(e.issue===Li.CUSTOM_LINE_BREAK)return`Warning: A Custom Token Pattern should specify the option. The problem is in the <${t.name}> Token Type - For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#CUSTOM_LINE_BREAK`;throw Error("non exhaustive match")}function Vwe(t){return Rt(t,r=>Is(r)?r.charCodeAt(0):r)}function C$(t,e,r){t[e]===void 0?t[e]=[r]:t[e].push(r)}function qc(t){return t255?255+~~(t/255):t}}var _m,c2,w7,S$,Zmt,egt,Uwe,u2,k7,E$=A(()=>{t5();U5();hn();Hy();Nwe();y7();_m="PATTERN",c2="defaultMode",w7="modes",S$=typeof new RegExp("(?:)").sticky=="boolean";Zmt=/[^\\][$]/;egt=/[^\\[][\^]|^\^/;Uwe={test:function(t){let e=t.length;for(let r=this.lastIndex;r{r.isParent=r.categoryMatches.length>0})}function fgt(t){let e=An(t),r=t,n=!0;for(;n;){r=Pc(ja(Rt(r,i=>i.CATEGORIES)));let a=Jd(r,e);e=e.concat(a),kr(a)?n=!1:r=a}return e}function dgt(t){Nt(t,e=>{_$(e)||(Ywe[Hwe]=e,e.tokenTypeIdx=Hwe++),Wwe(e)&&!Bt(e.CATEGORIES)&&(e.CATEGORIES=[e.CATEGORIES]),Wwe(e)||(e.CATEGORIES=[]),ggt(e)||(e.categoryMatches=[]),vgt(e)||(e.categoryMatchesMap={})})}function pgt(t){Nt(t,e=>{e.categoryMatches=[],Nt(e.categoryMatchesMap,(r,n)=>{e.categoryMatches.push(Ywe[n].tokenTypeIdx)})})}function mgt(t){Nt(t,e=>{Xwe([],e)})}function Xwe(t,e){Nt(t,r=>{e.categoryMatchesMap[r.tokenTypeIdx]=!0}),Nt(e.CATEGORIES,r=>{let n=t.concat(e);da(n,r)||Xwe(n,r)})}function _$(t){return Mt(t,"tokenTypeIdx")}function Wwe(t){return Mt(t,"CATEGORIES")}function ggt(t){return Mt(t,"categoryMatches")}function vgt(t){return Mt(t,"categoryMatchesMap")}function jwe(t){return Mt(t,"tokenTypeIdx")}var Hwe,Ywe,Am=A(()=>{hn();Hwe=1,Ywe={}});var f2,A$=A(()=>{f2={buildUnableToPopLexerModeMessage(t){return`Unable to pop Lexer Mode after encountering Token ->${t.image}<- The Mode Stack is empty`},buildUnexpectedCharactersMessage(t,e,r,n,a){return`unexpected character: ->${t.charAt(e)}<- at offset: ${e}, skipped ${r} characters.`}}});var Hn,q5,Wn,U5=A(()=>{E$();hn();Hy();Am();A$();y7();(function(t){t[t.MISSING_PATTERN=0]="MISSING_PATTERN",t[t.INVALID_PATTERN=1]="INVALID_PATTERN",t[t.EOI_ANCHOR_FOUND=2]="EOI_ANCHOR_FOUND",t[t.UNSUPPORTED_FLAGS_FOUND=3]="UNSUPPORTED_FLAGS_FOUND",t[t.DUPLICATE_PATTERNS_FOUND=4]="DUPLICATE_PATTERNS_FOUND",t[t.INVALID_GROUP_TYPE_FOUND=5]="INVALID_GROUP_TYPE_FOUND",t[t.PUSH_MODE_DOES_NOT_EXIST=6]="PUSH_MODE_DOES_NOT_EXIST",t[t.MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE=7]="MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE",t[t.MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY=8]="MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY",t[t.MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST=9]="MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST",t[t.LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED=10]="LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED",t[t.SOI_ANCHOR_FOUND=11]="SOI_ANCHOR_FOUND",t[t.EMPTY_MATCH_PATTERN=12]="EMPTY_MATCH_PATTERN",t[t.NO_LINE_BREAKS_FLAGS=13]="NO_LINE_BREAKS_FLAGS",t[t.UNREACHABLE_PATTERN=14]="UNREACHABLE_PATTERN",t[t.IDENTIFY_TERMINATOR=15]="IDENTIFY_TERMINATOR",t[t.CUSTOM_LINE_BREAK=16]="CUSTOM_LINE_BREAK",t[t.MULTI_MODE_LEXER_LONGER_ALT_NOT_IN_CURRENT_MODE=17]="MULTI_MODE_LEXER_LONGER_ALT_NOT_IN_CURRENT_MODE"})(Hn||(Hn={}));q5={deferDefinitionErrorsHandling:!1,positionTracking:"full",lineTerminatorsPattern:/\n|\r\n?/g,lineTerminatorCharacters:[` -`,"\r"],ensureOptimizations:!1,safeMode:!1,errorMessageProvider:f2,traceInitPerf:!1,skipValidations:!1,recoveryEnabled:!0};Object.freeze(q5);Wn=class{constructor(e,r=q5){if(this.lexerDefinition=e,this.lexerDefinitionErrors=[],this.lexerDefinitionWarning=[],this.patternIdxToConfig={},this.charCodeToPatternIdxToConfig={},this.modes=[],this.emptyGroups={},this.trackStartLines=!0,this.trackEndLines=!0,this.hasCustom=!1,this.canModeBeOptimized={},this.TRACE_INIT=(a,i)=>{if(this.traceInitPerf===!0){this.traceInitIndent++;let s=new Array(this.traceInitIndent+1).join(" ");this.traceInitIndent <${a}>`);let{time:o,value:l}=T5(i),u=o>10?console.warn:console.log;return this.traceInitIndent time: ${o}ms`),this.traceInitIndent--,l}else return i()},typeof r=="boolean")throw Error(`The second argument to the Lexer constructor is now an ILexerConfig Object. -a boolean 2nd argument is no longer supported`);this.config=Ey({},q5,r);let n=this.config.traceInitPerf;n===!0?(this.traceInitMaxIdent=1/0,this.traceInitPerf=!0):typeof n=="number"&&(this.traceInitMaxIdent=n,this.traceInitPerf=!0),this.traceInitIndent=-1,this.TRACE_INIT("Lexer Constructor",()=>{let a,i=!0;this.TRACE_INIT("Lexer Config handling",()=>{if(this.config.lineTerminatorsPattern===q5.lineTerminatorsPattern)this.config.lineTerminatorsPattern=Uwe;else if(this.config.lineTerminatorCharacters===q5.lineTerminatorCharacters)throw Error(`Error: Missing property on the Lexer config. - For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#MISSING_LINE_TERM_CHARS`);if(r.safeMode&&r.ensureOptimizations)throw Error('"safeMode" and "ensureOptimizations" flags are mutually exclusive.');this.trackStartLines=/full|onlyStart/i.test(this.config.positionTracking),this.trackEndLines=/full/i.test(this.config.positionTracking),Bt(e)?a={modes:{defaultMode:An(e)},defaultMode:c2}:(i=!1,a=An(e))}),this.config.skipValidations===!1&&(this.TRACE_INIT("performRuntimeChecks",()=>{this.lexerDefinitionErrors=this.lexerDefinitionErrors.concat(Fwe(a,this.trackStartLines,this.config.lineTerminatorCharacters))}),this.TRACE_INIT("performWarningRuntimeChecks",()=>{this.lexerDefinitionWarning=this.lexerDefinitionWarning.concat(zwe(a,this.trackStartLines,this.config.lineTerminatorCharacters))})),a.modes=a.modes?a.modes:{},Nt(a.modes,(o,l)=>{a.modes[l]=e0(o,u=>ls(u))});let s=Sn(a.modes);if(Nt(a.modes,(o,l)=>{this.TRACE_INIT(`Mode: <${l}> processing`,()=>{if(this.modes.push(l),this.config.skipValidations===!1&&this.TRACE_INIT("validatePatterns",()=>{this.lexerDefinitionErrors=this.lexerDefinitionErrors.concat(Bwe(o,s))}),kr(this.lexerDefinitionErrors)){nf(o);let u;this.TRACE_INIT("analyzeTokenTypes",()=>{u=Pwe(o,{lineTerminatorCharacters:this.config.lineTerminatorCharacters,positionTracking:r.positionTracking,ensureOptimizations:r.ensureOptimizations,safeMode:r.safeMode,tracer:this.TRACE_INIT})}),this.patternIdxToConfig[l]=u.patternIdxToConfig,this.charCodeToPatternIdxToConfig[l]=u.charCodeToPatternIdxToConfig,this.emptyGroups=Ey({},this.emptyGroups,u.emptyGroups),this.hasCustom=u.hasCustom||this.hasCustom,this.canModeBeOptimized[l]=u.canBeOptimized}})}),this.defaultMode=a.defaultMode,!kr(this.lexerDefinitionErrors)&&!this.config.deferDefinitionErrorsHandling){let l=Rt(this.lexerDefinitionErrors,u=>u.message).join(`----------------------- + For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#CUSTOM_LINE_BREAK`;throw Error("non exhaustive match")}function gke(t){return rr(t,r=>ko(r)?r.charCodeAt(0):r)}function Bq(t,e,r){t[e]===void 0?t[e]=[r]:t[e].push(r)}function W0(t){return t255?255+~~(t/255):t}}var Pm,Tx,tA,Fq,Avt,Dvt,pke,kx,rA,Pq=D(()=>{v6();a7();Yn();ix();ake();Q_();Pm="PATTERN",Tx="defaultMode",tA="modes",Fq=typeof new RegExp("(?:)").sticky=="boolean";Avt=/[^\\][$]/;Dvt=/[^\\[][\^]|^\^/;pke={test:function(t){let e=t.length;for(let r=this.lastIndex;r{r.isParent=r.categoryMatches.length>0})}function Uvt(t){let e=ci(t),r=t,n=!0;for(;n;){r=z0(Ua(rr(r,a=>a.CATEGORIES)));let i=op(r,e);e=e.concat(i),Xr(i)?n=!1:r=i}return e}function Hvt(t){ar(t,e=>{zq(e)||(xke[yke]=e,e.tokenTypeIdx=yke++),vke(e)&&!lr(e.CATEGORIES)&&(e.CATEGORIES=[e.CATEGORIES]),vke(e)||(e.CATEGORIES=[]),Yvt(e)||(e.categoryMatches=[]),Xvt(e)||(e.categoryMatchesMap={})})}function Vvt(t){ar(t,e=>{e.categoryMatches=[],ar(e.categoryMatchesMap,(r,n)=>{e.categoryMatches.push(xke[n].tokenTypeIdx)})})}function Wvt(t){ar(t,e=>{bke([],e)})}function bke(t,e){ar(t,r=>{e.categoryMatchesMap[r.tokenTypeIdx]=!0}),ar(e.CATEGORIES,r=>{let n=t.concat(e);Qi(n,r)||bke(n,r)})}function zq(t){return sr(t,"tokenTypeIdx")}function vke(t){return sr(t,"CATEGORIES")}function Yvt(t){return sr(t,"categoryMatches")}function Xvt(t){return sr(t,"categoryMatchesMap")}function wke(t){return sr(t,"tokenTypeIdx")}var yke,xke,Bm=D(()=>{Yn();yke=1,xke={}});var Sx,$q=D(()=>{Sx={buildUnableToPopLexerModeMessage(t){return`Unable to pop Lexer Mode after encountering Token ->${t.image}<- The Mode Stack is empty`},buildUnexpectedCharactersMessage(t,e,r,n,i){return`unexpected character: ->${t.charAt(e)}<- at offset: ${e}, skipped ${r} characters.`}}});var Li,s7,Ri,a7=D(()=>{Pq();Yn();ix();Bm();$q();Q_();(function(t){t[t.MISSING_PATTERN=0]="MISSING_PATTERN",t[t.INVALID_PATTERN=1]="INVALID_PATTERN",t[t.EOI_ANCHOR_FOUND=2]="EOI_ANCHOR_FOUND",t[t.UNSUPPORTED_FLAGS_FOUND=3]="UNSUPPORTED_FLAGS_FOUND",t[t.DUPLICATE_PATTERNS_FOUND=4]="DUPLICATE_PATTERNS_FOUND",t[t.INVALID_GROUP_TYPE_FOUND=5]="INVALID_GROUP_TYPE_FOUND",t[t.PUSH_MODE_DOES_NOT_EXIST=6]="PUSH_MODE_DOES_NOT_EXIST",t[t.MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE=7]="MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE",t[t.MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY=8]="MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY",t[t.MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST=9]="MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST",t[t.LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED=10]="LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED",t[t.SOI_ANCHOR_FOUND=11]="SOI_ANCHOR_FOUND",t[t.EMPTY_MATCH_PATTERN=12]="EMPTY_MATCH_PATTERN",t[t.NO_LINE_BREAKS_FLAGS=13]="NO_LINE_BREAKS_FLAGS",t[t.UNREACHABLE_PATTERN=14]="UNREACHABLE_PATTERN",t[t.IDENTIFY_TERMINATOR=15]="IDENTIFY_TERMINATOR",t[t.CUSTOM_LINE_BREAK=16]="CUSTOM_LINE_BREAK",t[t.MULTI_MODE_LEXER_LONGER_ALT_NOT_IN_CURRENT_MODE=17]="MULTI_MODE_LEXER_LONGER_ALT_NOT_IN_CURRENT_MODE"})(Li||(Li={}));s7={deferDefinitionErrorsHandling:!1,positionTracking:"full",lineTerminatorsPattern:/\n|\r\n?/g,lineTerminatorCharacters:[` +`,"\r"],ensureOptimizations:!1,safeMode:!1,errorMessageProvider:Sx,traceInitPerf:!1,skipValidations:!1,recoveryEnabled:!0};Object.freeze(s7);Ri=class{constructor(e,r=s7){if(this.lexerDefinition=e,this.lexerDefinitionErrors=[],this.lexerDefinitionWarning=[],this.patternIdxToConfig={},this.charCodeToPatternIdxToConfig={},this.modes=[],this.emptyGroups={},this.trackStartLines=!0,this.trackEndLines=!0,this.hasCustom=!1,this.canModeBeOptimized={},this.TRACE_INIT=(i,a)=>{if(this.traceInitPerf===!0){this.traceInitIndent++;let s=new Array(this.traceInitIndent+1).join(" ");this.traceInitIndent <${i}>`);let{time:o,value:l}=$6(a),u=o>10?console.warn:console.log;return this.traceInitIndent time: ${o}ms`),this.traceInitIndent--,l}else return a()},typeof r=="boolean")throw Error(`The second argument to the Lexer constructor is now an ILexerConfig Object. +a boolean 2nd argument is no longer supported`);this.config=Bv({},s7,r);let n=this.config.traceInitPerf;n===!0?(this.traceInitMaxIdent=1/0,this.traceInitPerf=!0):typeof n=="number"&&(this.traceInitMaxIdent=n,this.traceInitPerf=!0),this.traceInitIndent=-1,this.TRACE_INIT("Lexer Constructor",()=>{let i,a=!0;this.TRACE_INIT("Lexer Config handling",()=>{if(this.config.lineTerminatorsPattern===s7.lineTerminatorsPattern)this.config.lineTerminatorsPattern=pke;else if(this.config.lineTerminatorCharacters===s7.lineTerminatorCharacters)throw Error(`Error: Missing property on the Lexer config. + For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#MISSING_LINE_TERM_CHARS`);if(r.safeMode&&r.ensureOptimizations)throw Error('"safeMode" and "ensureOptimizations" flags are mutually exclusive.');this.trackStartLines=/full|onlyStart/i.test(this.config.positionTracking),this.trackEndLines=/full/i.test(this.config.positionTracking),lr(e)?i={modes:{defaultMode:ci(e)},defaultMode:Tx}:(a=!1,i=ci(e))}),this.config.skipValidations===!1&&(this.TRACE_INIT("performRuntimeChecks",()=>{this.lexerDefinitionErrors=this.lexerDefinitionErrors.concat(cke(i,this.trackStartLines,this.config.lineTerminatorCharacters))}),this.TRACE_INIT("performWarningRuntimeChecks",()=>{this.lexerDefinitionWarning=this.lexerDefinitionWarning.concat(hke(i,this.trackStartLines,this.config.lineTerminatorCharacters))})),i.modes=i.modes?i.modes:{},ar(i.modes,(o,l)=>{i.modes[l]=lp(o,u=>Ks(u))});let s=li(i.modes);if(ar(i.modes,(o,l)=>{this.TRACE_INIT(`Mode: <${l}> processing`,()=>{if(this.modes.push(l),this.config.skipValidations===!1&&this.TRACE_INIT("validatePatterns",()=>{this.lexerDefinitionErrors=this.lexerDefinitionErrors.concat(uke(o,s))}),Xr(this.lexerDefinitionErrors)){uf(o);let u;this.TRACE_INIT("analyzeTokenTypes",()=>{u=lke(o,{lineTerminatorCharacters:this.config.lineTerminatorCharacters,positionTracking:r.positionTracking,ensureOptimizations:r.ensureOptimizations,safeMode:r.safeMode,tracer:this.TRACE_INIT})}),this.patternIdxToConfig[l]=u.patternIdxToConfig,this.charCodeToPatternIdxToConfig[l]=u.charCodeToPatternIdxToConfig,this.emptyGroups=Bv({},this.emptyGroups,u.emptyGroups),this.hasCustom=u.hasCustom||this.hasCustom,this.canModeBeOptimized[l]=u.canBeOptimized}})}),this.defaultMode=i.defaultMode,!Xr(this.lexerDefinitionErrors)&&!this.config.deferDefinitionErrorsHandling){let l=rr(this.lexerDefinitionErrors,u=>u.message).join(`----------------------- `);throw new Error(`Errors detected in definition of Lexer: -`+l)}Nt(this.lexerDefinitionWarning,o=>{k5(o.message)}),this.TRACE_INIT("Choosing sub-methods implementations",()=>{if(S$?(this.chopInput=kl,this.match=this.matchWithTest):(this.updateLastIndex=ia,this.match=this.matchWithExec),i&&(this.handleModes=ia),this.trackStartLines===!1&&(this.computeNewColumn=kl),this.trackEndLines===!1&&(this.updateTokenEndLineColumnLocation=ia),/full/i.test(this.config.positionTracking))this.createTokenInstance=this.createFullToken;else if(/onlyStart/i.test(this.config.positionTracking))this.createTokenInstance=this.createStartOnlyToken;else if(/onlyOffset/i.test(this.config.positionTracking))this.createTokenInstance=this.createOffsetOnlyToken;else throw Error(`Invalid config option: "${this.config.positionTracking}"`);this.hasCustom?(this.addToken=this.addTokenUsingPush,this.handlePayload=this.handlePayloadWithCustom):(this.addToken=this.addTokenUsingMemberAccess,this.handlePayload=this.handlePayloadNoCustom)}),this.TRACE_INIT("Failed Optimization Warnings",()=>{let o=Ba(this.canModeBeOptimized,(l,u,h)=>(u===!1&&l.push(h),l),[]);if(r.ensureOptimizations&&!kr(o))throw Error(`Lexer Modes: < ${o.join(", ")} > cannot be optimized. +`+l)}ar(this.lexerDefinitionWarning,o=>{z6(o.message)}),this.TRACE_INIT("Choosing sub-methods implementations",()=>{if(Fq?(this.chopInput=bu,this.match=this.matchWithTest):(this.updateLastIndex=Hi,this.match=this.matchWithExec),a&&(this.handleModes=Hi),this.trackStartLines===!1&&(this.computeNewColumn=bu),this.trackEndLines===!1&&(this.updateTokenEndLineColumnLocation=Hi),/full/i.test(this.config.positionTracking))this.createTokenInstance=this.createFullToken;else if(/onlyStart/i.test(this.config.positionTracking))this.createTokenInstance=this.createStartOnlyToken;else if(/onlyOffset/i.test(this.config.positionTracking))this.createTokenInstance=this.createOffsetOnlyToken;else throw Error(`Invalid config option: "${this.config.positionTracking}"`);this.hasCustom?(this.addToken=this.addTokenUsingPush,this.handlePayload=this.handlePayloadWithCustom):(this.addToken=this.addTokenUsingMemberAccess,this.handlePayload=this.handlePayloadNoCustom)}),this.TRACE_INIT("Failed Optimization Warnings",()=>{let o=Aa(this.canModeBeOptimized,(l,u,h)=>(u===!1&&l.push(h),l),[]);if(r.ensureOptimizations&&!Xr(o))throw Error(`Lexer Modes: < ${o.join(", ")} > cannot be optimized. Disable the "ensureOptimizations" lexer config flag to silently ignore this and run the lexer in an un-optimized mode. - Or inspect the console log for details on how to resolve these issues.`)}),this.TRACE_INIT("clearRegExpParserCache",()=>{Lwe()}),this.TRACE_INIT("toFastProperties",()=>{E5(this)})})}tokenize(e,r=this.defaultMode){if(!kr(this.lexerDefinitionErrors)){let a=Rt(this.lexerDefinitionErrors,i=>i.message).join(`----------------------- + Or inspect the console log for details on how to resolve these issues.`)}),this.TRACE_INIT("clearRegExpParserCache",()=>{tke()}),this.TRACE_INIT("toFastProperties",()=>{G6(this)})})}tokenize(e,r=this.defaultMode){if(!Xr(this.lexerDefinitionErrors)){let i=rr(this.lexerDefinitionErrors,a=>a.message).join(`----------------------- `);throw new Error(`Unable to Tokenize because Errors detected in definition of Lexer: -`+a)}return this.tokenizeInternal(e,r)}tokenizeInternal(e,r){let n,a,i,s,o,l,u,h,f,d,p,m,g,v,y,b,w=e,C=w.length,k=0,E=0,_=this.hasCustom?0:Math.floor(e.length/10),S=new Array(_),L=[],M=this.trackStartLines?1:void 0,D=this.trackStartLines?1:void 0,T=$we(this.emptyGroups),I=this.trackStartLines,N=this.config.lineTerminatorsPattern,O=0,R=[],P=[],B=[],F=[];Object.freeze(F);let G;function z(){return R}function H(oe){let pe=qc(oe),J=P[pe];return J===void 0?F:J}let Q=oe=>{if(B.length===1&&oe.tokenType.PUSH_MODE===void 0){let pe=this.config.errorMessageProvider.buildUnableToPopLexerModeMessage(oe);L.push({offset:oe.startOffset,line:oe.startLine,column:oe.startColumn,length:oe.image.length,message:pe})}else{B.pop();let pe=Bc(B);R=this.patternIdxToConfig[pe],P=this.charCodeToPatternIdxToConfig[pe],O=R.length;let J=this.canModeBeOptimized[pe]&&this.config.safeMode===!1;P&&J?G=H:G=z}};function Y(oe){B.push(oe),P=this.charCodeToPatternIdxToConfig[oe],R=this.patternIdxToConfig[oe],O=R.length,O=R.length;let pe=this.canModeBeOptimized[oe]&&this.config.safeMode===!1;P&&pe?G=H:G=z}Y.call(this,r);let ie,se=this.config.recoveryEnabled;for(;kl.length){l=s,u=h,ie=X;break}}}break}}if(l!==null){if(f=l.length,d=ie.group,d!==void 0&&(p=ie.tokenTypeIdx,m=this.createTokenInstance(l,k,p,ie.tokenType,M,D,f),this.handlePayload(m,u),d===!1?E=this.addToken(S,E,m):T[d].push(m)),e=this.chopInput(e,f),k=k+f,D=this.computeNewColumn(D,f),I===!0&&ie.canLineTerminator===!0){let j=0,Z,K;N.lastIndex=0;do Z=N.test(l),Z===!0&&(K=N.lastIndex-1,j++);while(Z===!0);j!==0&&(M=M+j,D=f-K,this.updateTokenEndLineColumnLocation(m,d,K,j,M,D,f))}this.handleModes(ie,Q,Y,m)}else{let j=k,Z=M,K=D,X=se===!1;for(;X===!1&&k{hn();U5();Am();ygt="parent",Kwe="categories",Zwe="label",Qwe="group",Jwe="push_mode",e6e="pop_mode",t6e="longer_alt",r6e="line_breaks",n6e="start_chars_hint";Yo=y0({name:"EOF",pattern:Wn.NA});nf([Yo])});var of,a6e,ku,d2=A(()=>{Lm();hn();Ps();of={buildMismatchTokenMessage({expected:t,actual:e,previous:r,ruleName:n}){return`Expecting ${L$(t)?`--> ${af(t)} <--`:`token of type --> ${t.name} <--`} but found --> '${e.image}' <--`},buildNotAllInputParsedMessage({firstRedundant:t,ruleName:e}){return"Redundant input, expecting EOF but found: "+t.image},buildNoViableAltMessage({expectedPathsPerAlt:t,actual:e,previous:r,customUserDescription:n,ruleName:a}){let i="Expecting: ",o=` -but found: '`+bi(e).image+"'";if(n)return i+n+o;{let l=Ba(t,(d,p)=>d.concat(p),[]),u=Rt(l,d=>`[${Rt(d,p=>af(p)).join(", ")}]`),f=`one of these possible Token sequences: -${Rt(u,(d,p)=>` ${p+1}. ${d}`).join(` -`)}`;return i+f+o}},buildEarlyExitMessage({expectedIterationPaths:t,actual:e,customUserDescription:r,ruleName:n}){let a="Expecting: ",s=` -but found: '`+bi(e).image+"'";if(r)return a+r+s;{let l=`expecting at least one iteration which starts with one of these possible Token sequences:: - <${Rt(t,u=>`[${Rt(u,h=>af(h)).join(",")}]`).join(" ,")}>`;return a+l+s}}};Object.freeze(of);a6e={buildRuleNotFoundError(t,e){return"Invalid grammar, reference to a rule which is not defined: ->"+e.nonTerminalName+`<- -inside top level rule: ->`+t.name+"<-"}},ku={buildDuplicateFoundError(t,e){function r(h){return h instanceof vr?h.terminalType.name:h instanceof en?h.nonTerminalName:""}let n=t.name,a=bi(e),i=a.idx,s=xo(a),o=r(a),l=i>0,u=`->${s}${l?i:""}<- ${o?`with argument: ->${o}<-`:""} - appears more than once (${e.length} times) in the top level rule: ->${n}<-. - For further details see: https://chevrotain.io/docs/FAQ.html#NUMERICAL_SUFFIXES +`+i)}return this.tokenizeInternal(e,r)}tokenizeInternal(e,r){let n,i,a,s,o,l,u,h,f,d,p,m,g,y,v,x,k=e,_=k.length,T=0,S=0,R=this.hasCustom?0:Math.floor(e.length/10),A=new Array(R),I=[],P=this.trackStartLines?1:void 0,O=this.trackStartLines?1:void 0,C=fke(this.emptyGroups),N=this.trackStartLines,B=this.config.lineTerminatorsPattern,F=0,M=[],$=[],z=[],q=[];Object.freeze(q);let V;function U(){return M}function J(ye){let _e=W0(ye),ue=$[_e];return ue===void 0?q:ue}let se=ye=>{if(z.length===1&&ye.tokenType.PUSH_MODE===void 0){let _e=this.config.errorMessageProvider.buildUnableToPopLexerModeMessage(ye);I.push({offset:ye.startOffset,line:ye.startLine,column:ye.startColumn,length:ye.image.length,message:_e})}else{z.pop();let _e=$0(z);M=this.patternIdxToConfig[_e],$=this.charCodeToPatternIdxToConfig[_e],F=M.length;let ue=this.canModeBeOptimized[_e]&&this.config.safeMode===!1;$&&ue?V=J:V=U}};function re(ye){z.push(ye),$=this.charCodeToPatternIdxToConfig[ye],M=this.patternIdxToConfig[ye],F=M.length,F=M.length;let _e=this.canModeBeOptimized[ye]&&this.config.safeMode===!1;$&&_e?V=J:V=U}re.call(this,r);let me,ge=this.config.recoveryEnabled;for(;T<_;){l=null;let ye=k.charCodeAt(T),_e=V(ye),ue=_e.length;for(n=0;nl.length){l=s,u=h,me=ne;break}}}break}}if(l!==null){if(f=l.length,d=me.group,d!==void 0&&(p=me.tokenTypeIdx,m=this.createTokenInstance(l,T,p,me.tokenType,P,O,f),this.handlePayload(m,u),d===!1?S=this.addToken(A,S,m):C[d].push(m)),e=this.chopInput(e,f),T=T+f,O=this.computeNewColumn(O,f),N===!0&&me.canLineTerminator===!0){let ie=0,le,oe;B.lastIndex=0;do le=B.test(l),le===!0&&(oe=B.lastIndex-1,ie++);while(le===!0);ie!==0&&(P=P+ie,O=f-oe,this.updateTokenEndLineColumnLocation(m,d,oe,ie,P,O,f))}this.handleModes(me,se,re,m)}else{let ie=T,le=P,oe=O,ne=ge===!1;for(;ne===!1&&T<_;)for(e=this.chopInput(e,1),T++,i=0;i{Yn();a7();Bm();jvt="parent",kke="categories",Tke="label",Eke="group",Ske="push_mode",Cke="pop_mode",_ke="longer_alt",Ake="line_breaks",Lke="start_chars_hint";Gl=Cp({name:"EOF",pattern:Ri.NA});uf([Gl])});var ff,Rke,wc,Cx=D(()=>{Fm();Yn();_o();ff={buildMismatchTokenMessage({expected:t,actual:e,previous:r,ruleName:n}){return`Expecting ${Gq(t)?`--> ${cf(t)} <--`:`token of type --> ${t.name} <--`} but found --> '${e.image}' <--`},buildNotAllInputParsedMessage({firstRedundant:t,ruleName:e}){return"Redundant input, expecting EOF but found: "+t.image},buildNoViableAltMessage({expectedPathsPerAlt:t,actual:e,previous:r,customUserDescription:n,ruleName:i}){let a="Expecting: ",o=` +but found: '`+fs(e).image+"'";if(n)return a+n+o;{let l=Aa(t,(d,p)=>d.concat(p),[]),u=rr(l,d=>`[${rr(d,p=>cf(p)).join(", ")}]`),f=`one of these possible Token sequences: +${rr(u,(d,p)=>` ${p+1}. ${d}`).join(` +`)}`;return a+f+o}},buildEarlyExitMessage({expectedIterationPaths:t,actual:e,customUserDescription:r,ruleName:n}){let i="Expecting: ",s=` +but found: '`+fs(e).image+"'";if(r)return i+r+s;{let l=`expecting at least one iteration which starts with one of these possible Token sequences:: + <${rr(t,u=>`[${rr(u,h=>cf(h)).join(",")}]`).join(" ,")}>`;return i+l+s}}};Object.freeze(ff);Rke={buildRuleNotFoundError(t,e){return"Invalid grammar, reference to a rule which is not defined: ->"+e.nonTerminalName+`<- +inside top level rule: ->`+t.name+"<-"}},wc={buildDuplicateFoundError(t,e){function r(h){return h instanceof Ur?h.terminalType.name:h instanceof Mn?h.nonTerminalName:""}let n=t.name,i=fs(e),a=i.idx,s=cl(i),o=r(i),l=a>0,u=`->${s}${l?a:""}<- ${o?`with argument: ->${o}<-`:""} + appears more than once (${e.length} times) in the top level rule: ->${n}<-. + For further details see: https://chevrotain.io/docs/FAQ.html#NUMERICAL_SUFFIXES `;return u=u.replace(/[ \t]+/g," "),u=u.replace(/\s\s+/g,` `),u},buildNamespaceConflictError(t){return`Namespace conflict found in grammar. The grammar has both a Terminal(Token) and a Non-Terminal(Rule) named: <${t.name}>. To resolve this make sure each Terminal and Non-Terminal names are unique This is easy to accomplish by using the convention that Terminal names start with an uppercase letter -and Non-Terminal names start with a lower case letter.`},buildAlternationPrefixAmbiguityError(t){let e=Rt(t.prefixPath,a=>af(a)).join(", "),r=t.alternation.idx===0?"":t.alternation.idx;return`Ambiguous alternatives: <${t.ambiguityIndices.join(" ,")}> due to common lookahead prefix +and Non-Terminal names start with a lower case letter.`},buildAlternationPrefixAmbiguityError(t){let e=rr(t.prefixPath,i=>cf(i)).join(", "),r=t.alternation.idx===0?"":t.alternation.idx;return`Ambiguous alternatives: <${t.ambiguityIndices.join(" ,")}> due to common lookahead prefix in inside <${t.topLevelRule.name}> Rule, <${e}> may appears as a prefix path in all these alternatives. See: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#COMMON_PREFIX -For Further details.`},buildAlternationAmbiguityError(t){let e=Rt(t.prefixPath,a=>af(a)).join(", "),r=t.alternation.idx===0?"":t.alternation.idx,n=`Ambiguous Alternatives Detected: <${t.ambiguityIndices.join(" ,")}> in inside <${t.topLevelRule.name}> Rule, +For Further details.`},buildAlternationAmbiguityError(t){let e=rr(t.prefixPath,i=>cf(i)).join(", "),r=t.alternation.idx===0?"":t.alternation.idx,n=`Ambiguous Alternatives Detected: <${t.ambiguityIndices.join(" ,")}> in inside <${t.topLevelRule.name}> Rule, <${e}> may appears as a prefix path in all these alternatives. `;return n=n+`See: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#AMBIGUOUS_ALTERNATIVES -For Further details.`,n},buildEmptyRepetitionError(t){let e=xo(t.repetition);return t.repetition.idx!==0&&(e+=t.repetition.idx),`The repetition <${e}> within Rule <${t.topLevelRule.name}> can never consume any tokens. +For Further details.`,n},buildEmptyRepetitionError(t){let e=cl(t.repetition);return t.repetition.idx!==0&&(e+=t.repetition.idx),`The repetition <${e}> within Rule <${t.topLevelRule.name}> can never consume any tokens. This could lead to an infinite loop.`},buildTokenNameError(t){return"deprecated"},buildEmptyAlternationError(t){return`Ambiguous empty alternative: <${t.emptyChoiceIdx+1}> in inside <${t.topLevelRule.name}> Rule. Only the last alternative may be an empty alternative.`},buildTooManyAlternativesError(t){return`An Alternation cannot have more than 256 alternatives: inside <${t.topLevelRule.name}> Rule. - has ${t.alternation.definition.length+1} alternatives.`},buildLeftRecursionError(t){let e=t.topLevelRule.name,r=Rt(t.leftRecursionPath,i=>i.name),n=`${e} --> ${r.concat([e]).join(" --> ")}`;return`Left Recursion found in grammar. + has ${t.alternation.definition.length+1} alternatives.`},buildLeftRecursionError(t){let e=t.topLevelRule.name,r=rr(t.leftRecursionPath,a=>a.name),n=`${e} --> ${r.concat([e]).join(" --> ")}`;return`Left Recursion found in grammar. rule: <${e}> can be invoked from itself (directly or indirectly) -without consuming any Tokens. The grammar path that causes this is: +without consuming any Tokens. The grammar path that causes this is: ${n} To fix this refactor your grammar to remove the left recursion. -see: https://en.wikipedia.org/wiki/LL_parser#Left_factoring.`},buildInvalidRuleNameError(t){return"deprecated"},buildDuplicateRuleNameError(t){let e;return t.topLevelRule instanceof Ms?e=t.topLevelRule.name:e=t.topLevelRule,`Duplicate definition, rule: ->${e}<- is already defined in the grammar: ->${t.grammarName}<-`}}});function i6e(t,e){let r=new R$(t,e);return r.resolveRefs(),r.errors}var R$,s6e=A(()=>{bo();hn();Ps();R$=class extends Os{constructor(e,r){super(),this.nameToTopRule=e,this.errMsgProvider=r,this.errors=[]}resolveRefs(){Nt(cn(this.nameToTopRule),e=>{this.currTopLevel=e,e.accept(this)})}visitNonTerminal(e){let r=this.nameToTopRule[e.nonTerminalName];if(r)e.referencedRule=r;else{let n=this.errMsgProvider.buildRuleNotFoundError(this.currTopLevel,e);this.errors.push({message:n,type:Ka.UNRESOLVED_SUBRULE_REF,ruleName:this.currTopLevel.name,unresolvedRefName:e.nonTerminalName})}}}});function S7(t,e,r=[]){r=An(r);let n=[],a=0;function i(o){return o.concat(wa(t,a+1))}function s(o){let l=S7(i(o),e,r);return n.concat(l)}for(;r.length{kr(l.definition)===!1&&(n=s(l.definition))}),n;if(o instanceof vr)r.push(o.terminalType);else throw Error("non exhaustive match")}a++}return n.push({partialPath:r,suffixDef:wa(t,a)}),n}function _7(t,e,r,n){let a="EXIT_NONE_TERMINAL",i=[a],s="EXIT_ALTERNATIVE",o=!1,l=e.length,u=l-n-1,h=[],f=[];for(f.push({idx:-1,def:t,ruleStack:[],occurrenceStack:[]});!kr(f);){let d=f.pop();if(d===s){o&&Bc(f).idx<=u&&f.pop();continue}let p=d.def,m=d.idx,g=d.ruleStack,v=d.occurrenceStack;if(kr(p))continue;let y=p[0];if(y===a){let b={idx:m,def:wa(p),ruleStack:Qh(g),occurrenceStack:Qh(v)};f.push(b)}else if(y instanceof vr)if(m=0;b--){let w=y.definition[b],C={idx:m,def:w.definition.concat(wa(p)),ruleStack:g,occurrenceStack:v};f.push(C),f.push(s)}else if(y instanceof Ln)f.push({idx:m,def:y.definition.concat(wa(p)),ruleStack:g,occurrenceStack:v});else if(y instanceof Ms)f.push(bgt(y,m,g,v));else throw Error("non exhaustive match")}return h}function bgt(t,e,r,n){let a=An(r);a.push(t.name);let i=An(n);return i.push(1),{idx:e,def:t.definition,ruleStack:a,occurrenceStack:i}}var I$,T7,p2,E7,H5,C7,W5,Y5=A(()=>{hn();y$();m7();Ps();I$=class extends tf{constructor(e,r){super(),this.topProd=e,this.path=r,this.possibleTokTypes=[],this.nextProductionName="",this.nextProductionOccurrence=0,this.found=!1,this.isAtEndOfPath=!1}startWalking(){if(this.found=!1,this.path.ruleStack[0]!==this.topProd.name)throw Error("The path does not start with the walker's top Rule!");return this.ruleStack=An(this.path.ruleStack).reverse(),this.occurrenceStack=An(this.path.occurrenceStack).reverse(),this.ruleStack.pop(),this.occurrenceStack.pop(),this.updateExpectedNext(),this.walk(this.topProd),this.possibleTokTypes}walk(e,r=[]){this.found||super.walk(e,r)}walkProdRef(e,r,n){if(e.referencedRule.name===this.nextProductionName&&e.idx===this.nextProductionOccurrence){let a=r.concat(n);this.updateExpectedNext(),this.walk(e.referencedRule,a)}}updateExpectedNext(){kr(this.ruleStack)?(this.nextProductionName="",this.nextProductionOccurrence=0,this.isAtEndOfPath=!0):(this.nextProductionName=this.ruleStack.pop(),this.nextProductionOccurrence=this.occurrenceStack.pop())}},T7=class extends I${constructor(e,r){super(e,r),this.path=r,this.nextTerminalName="",this.nextTerminalOccurrence=0,this.nextTerminalName=this.path.lastTok.name,this.nextTerminalOccurrence=this.path.lastTokOccurrence}walkTerminal(e,r,n){if(this.isAtEndOfPath&&e.terminalType.name===this.nextTerminalName&&e.idx===this.nextTerminalOccurrence&&!this.found){let a=r.concat(n),i=new Ln({definition:a});this.possibleTokTypes=Sm(i),this.found=!0}}},p2=class extends tf{constructor(e,r){super(),this.topRule=e,this.occurrence=r,this.result={token:void 0,occurrence:void 0,isEndOfRule:void 0}}startWalking(){return this.walk(this.topRule),this.result}},E7=class extends p2{walkMany(e,r,n){if(e.idx===this.occurrence){let a=bi(r.concat(n));this.result.isEndOfRule=a===void 0,a instanceof vr&&(this.result.token=a.terminalType,this.result.occurrence=a.idx)}else super.walkMany(e,r,n)}},H5=class extends p2{walkManySep(e,r,n){if(e.idx===this.occurrence){let a=bi(r.concat(n));this.result.isEndOfRule=a===void 0,a instanceof vr&&(this.result.token=a.terminalType,this.result.occurrence=a.idx)}else super.walkManySep(e,r,n)}},C7=class extends p2{walkAtLeastOne(e,r,n){if(e.idx===this.occurrence){let a=bi(r.concat(n));this.result.isEndOfRule=a===void 0,a instanceof vr&&(this.result.token=a.terminalType,this.result.occurrence=a.idx)}else super.walkAtLeastOne(e,r,n)}},W5=class extends p2{walkAtLeastOneSep(e,r,n){if(e.idx===this.occurrence){let a=bi(r.concat(n));this.result.isEndOfRule=a===void 0,a instanceof vr&&(this.result.token=a.terminalType,this.result.occurrence=a.idx)}else super.walkAtLeastOneSep(e,r,n)}}});function X5(t){if(t instanceof tn||t==="Option")return Yn.OPTION;if(t instanceof Ir||t==="Repetition")return Yn.REPETITION;if(t instanceof Rn||t==="RepetitionMandatory")return Yn.REPETITION_MANDATORY;if(t instanceof In||t==="RepetitionMandatoryWithSeparator")return Yn.REPETITION_MANDATORY_WITH_SEPARATOR;if(t instanceof xn||t==="RepetitionWithSeparator")return Yn.REPETITION_WITH_SEPARATOR;if(t instanceof bn||t==="Alternation")return Yn.ALTERNATION;throw Error("non exhaustive match")}function L7(t){let{occurrence:e,rule:r,prodType:n,maxLookahead:a}=t,i=X5(n);return i===Yn.ALTERNATION?m2(e,r,a):g2(e,r,i,a)}function l6e(t,e,r,n,a,i){let s=m2(t,e,r),o=p6e(s)?h2:rf;return i(s,n,o,a)}function u6e(t,e,r,n,a,i){let s=g2(t,e,a,r),o=p6e(s)?h2:rf;return i(s[0],o,n)}function c6e(t,e,r,n){let a=t.length,i=mo(t,s=>mo(s,o=>o.length===1));if(e)return function(s){let o=Rt(s,l=>l.GATE);for(let l=0;lja(l)),o=Ba(s,(l,u,h)=>(Nt(u,f=>{Mt(l,f.tokenTypeIdx)||(l[f.tokenTypeIdx]=h),Nt(f.categoryMatches,d=>{Mt(l,d)||(l[d]=h)})}),l),{});return function(){let l=this.LA(1);return o[l.tokenTypeIdx]}}else return function(){for(let s=0;si.length===1),a=t.length;if(n&&!r){let i=ja(t);if(i.length===1&&kr(i[0].categoryMatches)){let o=i[0].tokenTypeIdx;return function(){return this.LA(1).tokenTypeIdx===o}}else{let s=Ba(i,(o,l,u)=>(o[l.tokenTypeIdx]=!0,Nt(l.categoryMatches,h=>{o[h]=!0}),o),[]);return function(){let o=this.LA(1);return s[o.tokenTypeIdx]===!0}}}else return function(){e:for(let i=0;iS7([s],1)),n=o6e(r.length),a=Rt(r,s=>{let o={};return Nt(s,l=>{let u=D$(l.partialPath);Nt(u,h=>{o[h]=!0})}),o}),i=r;for(let s=1;s<=e;s++){let o=i;i=o6e(o.length);for(let l=0;l{let y=D$(v.partialPath);Nt(y,b=>{a[l][b]=!0})})}}}}return n}function m2(t,e,r,n){let a=new A7(t,Yn.ALTERNATION,n);return e.accept(a),f6e(a.result,r)}function g2(t,e,r,n){let a=new A7(t,r);e.accept(a);let i=a.result,o=new N$(e,t,r).startWalking(),l=new Ln({definition:i}),u=new Ln({definition:o});return f6e([l,u],n)}function R7(t,e){e:for(let r=0;r{let a=e[n];return r===a||a.categoryMatchesMap[r.tokenTypeIdx]})}function p6e(t){return mo(t,e=>mo(e,r=>mo(r,n=>kr(n.categoryMatches))))}var Yn,N$,A7,v2=A(()=>{hn();Y5();m7();Am();Ps();(function(t){t[t.OPTION=0]="OPTION",t[t.REPETITION=1]="REPETITION",t[t.REPETITION_MANDATORY=2]="REPETITION_MANDATORY",t[t.REPETITION_MANDATORY_WITH_SEPARATOR=3]="REPETITION_MANDATORY_WITH_SEPARATOR",t[t.REPETITION_WITH_SEPARATOR=4]="REPETITION_WITH_SEPARATOR",t[t.ALTERNATION=5]="ALTERNATION"})(Yn||(Yn={}));N$=class extends tf{constructor(e,r,n){super(),this.topProd=e,this.targetOccurrence=r,this.targetProdType=n}startWalking(){return this.walk(this.topProd),this.restDef}checkIsTarget(e,r,n,a){return e.idx===this.targetOccurrence&&this.targetProdType===r?(this.restDef=n.concat(a),!0):!1}walkOption(e,r,n){this.checkIsTarget(e,Yn.OPTION,r,n)||super.walkOption(e,r,n)}walkAtLeastOne(e,r,n){this.checkIsTarget(e,Yn.REPETITION_MANDATORY,r,n)||super.walkOption(e,r,n)}walkAtLeastOneSep(e,r,n){this.checkIsTarget(e,Yn.REPETITION_MANDATORY_WITH_SEPARATOR,r,n)||super.walkOption(e,r,n)}walkMany(e,r,n){this.checkIsTarget(e,Yn.REPETITION,r,n)||super.walkOption(e,r,n)}walkManySep(e,r,n){this.checkIsTarget(e,Yn.REPETITION_WITH_SEPARATOR,r,n)||super.walkOption(e,r,n)}},A7=class extends Os{constructor(e,r,n){super(),this.targetOccurrence=e,this.targetProdType=r,this.targetRef=n,this.result=[]}checkIsTarget(e,r){e.idx===this.targetOccurrence&&this.targetProdType===r&&(this.targetRef===void 0||e===this.targetRef)&&(this.result=e.definition)}visitOption(e){this.checkIsTarget(e,Yn.OPTION)}visitRepetition(e){this.checkIsTarget(e,Yn.REPETITION)}visitRepetitionMandatory(e){this.checkIsTarget(e,Yn.REPETITION_MANDATORY)}visitRepetitionMandatoryWithSeparator(e){this.checkIsTarget(e,Yn.REPETITION_MANDATORY_WITH_SEPARATOR)}visitRepetitionWithSeparator(e){this.checkIsTarget(e,Yn.REPETITION_WITH_SEPARATOR)}visitAlternation(e){this.checkIsTarget(e,Yn.ALTERNATION)}}});function m6e(t){let e=t.lookaheadStrategy.validate({rules:t.rules,tokenTypes:t.tokenTypes,grammarName:t.grammarName});return Rt(e,r=>Object.assign({type:Ka.CUSTOM_LOOKAHEAD_VALIDATION},r))}function g6e(t,e,r,n){let a=Rs(t,l=>kgt(l,r)),i=Agt(t,e,r),s=Rs(t,l=>Cgt(l,r)),o=Rs(t,l=>Egt(l,t,n,r));return a.concat(i,s,o)}function kgt(t,e){let r=new M$;t.accept(r);let n=r.allProductions,a=Az(n,Tgt),i=Iz(a,o=>o.length>1);return Rt(cn(i),o=>{let l=bi(o),u=e.buildDuplicateFoundError(t,o),h=xo(l),f={message:u,type:Ka.DUPLICATE_PRODUCTIONS,ruleName:t.name,dslName:h,occurrence:l.idx},d=v6e(l);return d&&(f.parameter=d),f})}function Tgt(t){return`${xo(t)}_#_${t.idx}_#_${v6e(t)}`}function v6e(t){return t instanceof vr?t.terminalType.name:t instanceof en?t.nonTerminalName:""}function Egt(t,e,r,n){let a=[];if(Ba(e,(s,o)=>o.name===t.name?s+1:s,0)>1){let s=n.buildDuplicateRuleNameError({topLevelRule:t,grammarName:r});a.push({message:s,type:Ka.DUPLICATE_RULE_NAME,ruleName:t.name})}return a}function y6e(t,e,r){let n=[],a;return da(e,t)||(a=`Invalid rule override, rule: ->${t}<- cannot be overridden in the grammar: ->${r}<-as it is not defined in any of the super grammars `,n.push({message:a,type:Ka.INVALID_RULE_OVERRIDE,ruleName:t})),n}function P$(t,e,r,n=[]){let a=[],i=I7(e.definition);if(kr(i))return[];{let s=t.name;da(i,t)&&a.push({message:r.buildLeftRecursionError({topLevelRule:t,leftRecursionPath:n}),type:Ka.LEFT_RECURSION,ruleName:s});let l=Jd(i,n.concat([t])),u=Rs(l,h=>{let f=An(n);return f.push(h),P$(t,h,r,f)});return a.concat(u)}}function I7(t){let e=[];if(kr(t))return e;let r=bi(t);if(r instanceof en)e.push(r.referencedRule);else if(r instanceof Ln||r instanceof tn||r instanceof Rn||r instanceof In||r instanceof xn||r instanceof Ir)e=e.concat(I7(r.definition));else if(r instanceof bn)e=ja(Rt(r.definition,i=>I7(i.definition)));else if(!(r instanceof vr))throw Error("non exhaustive match");let n=Cm(r),a=t.length>1;if(n&&a){let i=wa(t);return e.concat(I7(i))}else return e}function x6e(t,e){let r=new j5;t.accept(r);let n=r.alternations;return Rs(n,i=>{let s=Qh(i.definition);return Rs(s,(o,l)=>{let u=_7([o],[],rf,1);return kr(u)?[{message:e.buildEmptyAlternationError({topLevelRule:t,alternation:i,emptyChoiceIdx:l}),type:Ka.NONE_LAST_EMPTY_ALT,ruleName:t.name,occurrence:i.idx,alternative:l+1}]:[]})})}function b6e(t,e,r){let n=new j5;t.accept(n);let a=n.alternations;return a=e0(a,s=>s.ignoreAmbiguities===!0),Rs(a,s=>{let o=s.idx,l=s.maxLookahead||e,u=m2(o,t,l,s),h=Sgt(u,s,t,r),f=_gt(u,s,t,r);return h.concat(f)})}function Cgt(t,e){let r=new j5;t.accept(r);let n=r.alternations;return Rs(n,i=>i.definition.length>255?[{message:e.buildTooManyAlternativesError({topLevelRule:t,alternation:i}),type:Ka.TOO_MANY_ALTS,ruleName:t.name,occurrence:i.idx}]:[])}function w6e(t,e,r){let n=[];return Nt(t,a=>{let i=new O$;a.accept(i);let s=i.allProductions;Nt(s,o=>{let l=X5(o),u=o.maxLookahead||e,h=o.idx,d=g2(h,a,l,u)[0];if(kr(ja(d))){let p=r.buildEmptyRepetitionError({topLevelRule:a,repetition:o});n.push({message:p,type:Ka.NO_NON_EMPTY_LOOKAHEAD,ruleName:a.name})}})}),n}function Sgt(t,e,r,n){let a=[],i=Ba(t,(o,l,u)=>(e.definition[u].ignoreAmbiguities===!0||Nt(l,h=>{let f=[u];Nt(t,(d,p)=>{u!==p&&R7(d,h)&&e.definition[p].ignoreAmbiguities!==!0&&f.push(p)}),f.length>1&&!R7(a,h)&&(a.push(h),o.push({alts:f,path:h}))}),o),[]);return Rt(i,o=>{let l=Rt(o.alts,h=>h+1);return{message:n.buildAlternationAmbiguityError({topLevelRule:r,alternation:e,ambiguityIndices:l,prefixPath:o.path}),type:Ka.AMBIGUOUS_ALTS,ruleName:r.name,occurrence:e.idx,alternatives:o.alts}})}function _gt(t,e,r,n){let a=Ba(t,(s,o,l)=>{let u=Rt(o,h=>({idx:l,path:h}));return s.concat(u)},[]);return Pc(Rs(a,s=>{if(e.definition[s.idx].ignoreAmbiguities===!0)return[];let l=s.idx,u=s.path,h=os(a,d=>e.definition[d.idx].ignoreAmbiguities!==!0&&d.idx{let p=[d.idx+1,l+1],m=e.idx===0?"":e.idx;return{message:n.buildAlternationPrefixAmbiguityError({topLevelRule:r,alternation:e,ambiguityIndices:p,prefixPath:d.path}),type:Ka.AMBIGUOUS_PREFIX_ALTS,ruleName:r.name,occurrence:m,alternatives:p}})}))}function Agt(t,e,r){let n=[],a=Rt(e,i=>i.name);return Nt(t,i=>{let s=i.name;if(da(a,s)){let o=r.buildNamespaceConflictError(i);n.push({message:o,type:Ka.CONFLICT_TOKENS_RULES_NAMESPACE,ruleName:s})}}),n}var M$,j5,O$,K5=A(()=>{hn();bo();Ps();v2();Y5();Am();M$=class extends Os{constructor(){super(...arguments),this.allProductions=[]}visitNonTerminal(e){this.allProductions.push(e)}visitOption(e){this.allProductions.push(e)}visitRepetitionWithSeparator(e){this.allProductions.push(e)}visitRepetitionMandatory(e){this.allProductions.push(e)}visitRepetitionMandatoryWithSeparator(e){this.allProductions.push(e)}visitRepetition(e){this.allProductions.push(e)}visitAlternation(e){this.allProductions.push(e)}visitTerminal(e){this.allProductions.push(e)}};j5=class extends Os{constructor(){super(...arguments),this.alternations=[]}visitAlternation(e){this.alternations.push(e)}};O$=class extends Os{constructor(){super(...arguments),this.allProductions=[]}visitRepetitionWithSeparator(e){this.allProductions.push(e)}visitRepetitionMandatory(e){this.allProductions.push(e)}visitRepetitionMandatoryWithSeparator(e){this.allProductions.push(e)}visitRepetition(e){this.allProductions.push(e)}}});function k6e(t){let e=Uy(t,{errMsgProvider:a6e}),r={};return Nt(t.rules,n=>{r[n.name]=n}),i6e(r,e.errMsgProvider)}function T6e(t){return t=Uy(t,{errMsgProvider:ku}),g6e(t.rules,t.tokenTypes,t.errMsgProvider,t.grammarName)}var E6e=A(()=>{hn();s6e();K5();d2()});function x0(t){return da(L6e,t.name)}var C6e,S6e,_6e,A6e,L6e,y2,Rm,Z5,Q5,J5,x2=A(()=>{hn();C6e="MismatchedTokenException",S6e="NoViableAltException",_6e="EarlyExitException",A6e="NotAllInputParsedException",L6e=[C6e,S6e,_6e,A6e];Object.freeze(L6e);y2=class extends Error{constructor(e,r){super(e),this.token=r,this.resyncedTokens=[],Object.setPrototypeOf(this,new.target.prototype),Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)}},Rm=class extends y2{constructor(e,r,n){super(e,r),this.previousToken=n,this.name=C6e}},Z5=class extends y2{constructor(e,r,n){super(e,r),this.previousToken=n,this.name=S6e}},Q5=class extends y2{constructor(e,r){super(e,r),this.name=A6e}},J5=class extends y2{constructor(e,r,n){super(e,r),this.previousToken=n,this.name=_6e}}});function Lgt(t,e,r,n,a,i,s){let o=this.getKeyForAutomaticLookahead(n,a),l=this.firstAfterRepMap[o];if(l===void 0){let d=this.getCurrRuleFullName(),p=this.getGAstProductions()[d];l=new i(p,a).startWalking(),this.firstAfterRepMap[o]=l}let u=l.token,h=l.occurrence,f=l.isEndOfRule;this.RULE_STACK.length===1&&f&&u===void 0&&(u=Yo,h=1),!(u===void 0||h===void 0)&&this.shouldInRepetitionRecoveryBeTried(u,h,s)&&this.tryInRepetitionRecovery(t,e,r,u)}var B$,z$,F$,D7,$$=A(()=>{Lm();hn();x2();x$();bo();B$={},z$="InRuleRecoveryException",F$=class extends Error{constructor(e){super(e),this.name=z$}},D7=class{initRecoverable(e){this.firstAfterRepMap={},this.resyncFollows={},this.recoveryEnabled=Mt(e,"recoveryEnabled")?e.recoveryEnabled:Bs.recoveryEnabled,this.recoveryEnabled&&(this.attemptInRepetitionRecovery=Lgt)}getTokenToInsert(e){let r=sf(e,"",NaN,NaN,NaN,NaN,NaN,NaN);return r.isInsertedInRecovery=!0,r}canTokenTypeBeInsertedInRecovery(e){return!0}canTokenTypeBeDeletedInRecovery(e){return!0}tryInRepetitionRecovery(e,r,n,a){let i=this.findReSyncTokenType(),s=this.exportLexerState(),o=[],l=!1,u=this.LA(1),h=this.LA(1),f=()=>{let d=this.LA(0),p=this.errorMessageProvider.buildMismatchTokenMessage({expected:a,actual:u,previous:d,ruleName:this.getCurrRuleFullName()}),m=new Rm(p,u,this.LA(0));m.resyncedTokens=Qh(o),this.SAVE_ERROR(m)};for(;!l;)if(this.tokenMatcher(h,a)){f();return}else if(n.call(this)){f(),e.apply(this,r);return}else this.tokenMatcher(h,i)?l=!0:(h=this.SKIP_TOKEN(),this.addToResyncTokens(h,o));this.importLexerState(s)}shouldInRepetitionRecoveryBeTried(e,r,n){return!(n===!1||this.tokenMatcher(this.LA(1),e)||this.isBackTracking()||this.canPerformInRuleRecovery(e,this.getFollowsForInRuleRecovery(e,r)))}getFollowsForInRuleRecovery(e,r){let n=this.getCurrentGrammarPath(e,r);return this.getNextPossibleTokenTypes(n)}tryInRuleRecovery(e,r){if(this.canRecoverWithSingleTokenInsertion(e,r))return this.getTokenToInsert(e);if(this.canRecoverWithSingleTokenDeletion(e)){let n=this.SKIP_TOKEN();return this.consumeToken(),n}throw new F$("sad sad panda")}canPerformInRuleRecovery(e,r){return this.canRecoverWithSingleTokenInsertion(e,r)||this.canRecoverWithSingleTokenDeletion(e)}canRecoverWithSingleTokenInsertion(e,r){if(!this.canTokenTypeBeInsertedInRecovery(e)||kr(r))return!1;let n=this.LA(1);return Fc(r,i=>this.tokenMatcher(n,i))!==void 0}canRecoverWithSingleTokenDeletion(e){return this.canTokenTypeBeDeletedInRecovery(e)?this.tokenMatcher(this.LA(2),e):!1}isInCurrentRuleReSyncSet(e){let r=this.getCurrFollowKey(),n=this.getFollowSetFromFollowKey(r);return da(n,e)}findReSyncTokenType(){let e=this.flattenFollowSet(),r=this.LA(1),n=2;for(;;){let a=Fc(e,i=>V5(r,i));if(a!==void 0)return a;r=this.LA(n),n++}}getCurrFollowKey(){if(this.RULE_STACK.length===1)return B$;let e=this.getLastExplicitRuleShortName(),r=this.getLastExplicitRuleOccurrenceIndex(),n=this.getPreviousExplicitRuleShortName();return{ruleName:this.shortRuleNameToFullName(e),idxInCallingRule:r,inRule:this.shortRuleNameToFullName(n)}}buildFullFollowKeyStack(){let e=this.RULE_STACK,r=this.RULE_OCCURRENCE_STACK;return Rt(e,(n,a)=>a===0?B$:{ruleName:this.shortRuleNameToFullName(n),idxInCallingRule:r[a],inRule:this.shortRuleNameToFullName(e[a-1])})}flattenFollowSet(){let e=Rt(this.buildFullFollowKeyStack(),r=>this.getFollowSetFromFollowKey(r));return ja(e)}getFollowSetFromFollowKey(e){if(e===B$)return[Yo];let r=e.ruleName+e.idxInCallingRule+g7+e.inRule;return this.resyncFollows[r]}addToResyncTokens(e,r){return this.tokenMatcher(e,Yo)||r.push(e),r}reSyncTo(e){let r=[],n=this.LA(1);for(;this.tokenMatcher(n,e)===!1;)n=this.SKIP_TOKEN(),this.addToResyncTokens(n,r);return Qh(r)}attemptInRepetitionRecovery(e,r,n,a,i,s,o){}getCurrentGrammarPath(e,r){let n=this.getHumanReadableRuleStack(),a=An(this.RULE_OCCURRENCE_STACK);return{ruleStack:n,occurrenceStack:a,lastTok:e,lastTokOccurrence:r}}getHumanReadableRuleStack(){return Rt(this.RULE_STACK,e=>this.shortRuleNameToFullName(e))}}});function N7(t,e,r){return r|e|t}var M7=A(()=>{});var lf,G$=A(()=>{hn();d2();bo();K5();v2();lf=class{constructor(e){var r;this.maxLookahead=(r=e?.maxLookahead)!==null&&r!==void 0?r:Bs.maxLookahead}validate(e){let r=this.validateNoLeftRecursion(e.rules);if(kr(r)){let n=this.validateEmptyOrAlternatives(e.rules),a=this.validateAmbiguousAlternationAlternatives(e.rules,this.maxLookahead),i=this.validateSomeNonEmptyLookaheadPath(e.rules,this.maxLookahead);return[...r,...n,...a,...i]}return r}validateNoLeftRecursion(e){return Rs(e,r=>P$(r,r,ku))}validateEmptyOrAlternatives(e){return Rs(e,r=>x6e(r,ku))}validateAmbiguousAlternationAlternatives(e,r){return Rs(e,n=>b6e(n,r,ku))}validateSomeNonEmptyLookaheadPath(e,r){return w6e(e,r,ku)}buildLookaheadForAlternation(e){return l6e(e.prodOccurrence,e.rule,e.maxLookahead,e.hasPredicates,e.dynamicTokensEnabled,c6e)}buildLookaheadForOptional(e){return u6e(e.prodOccurrence,e.rule,e.maxLookahead,e.dynamicTokensEnabled,X5(e.prodType),h6e)}}});function Rgt(t){O7.reset(),t.accept(O7);let e=O7.dslMethods;return O7.reset(),e}var P7,U$,O7,R6e=A(()=>{hn();bo();M7();Ps();G$();P7=class{initLooksAhead(e){this.dynamicTokensEnabled=Mt(e,"dynamicTokensEnabled")?e.dynamicTokensEnabled:Bs.dynamicTokensEnabled,this.maxLookahead=Mt(e,"maxLookahead")?e.maxLookahead:Bs.maxLookahead,this.lookaheadStrategy=Mt(e,"lookaheadStrategy")?e.lookaheadStrategy:new lf({maxLookahead:this.maxLookahead}),this.lookAheadFuncsCache=new Map}preComputeLookaheadFunctions(e){Nt(e,r=>{this.TRACE_INIT(`${r.name} Rule Lookahead`,()=>{let{alternation:n,repetition:a,option:i,repetitionMandatory:s,repetitionMandatoryWithSeparator:o,repetitionWithSeparator:l}=Rgt(r);Nt(n,u=>{let h=u.idx===0?"":u.idx;this.TRACE_INIT(`${xo(u)}${h}`,()=>{let f=this.lookaheadStrategy.buildLookaheadForAlternation({prodOccurrence:u.idx,rule:r,maxLookahead:u.maxLookahead||this.maxLookahead,hasPredicates:u.hasPredicates,dynamicTokensEnabled:this.dynamicTokensEnabled}),d=N7(this.fullRuleNameToShort[r.name],256,u.idx);this.setLaFuncCache(d,f)})}),Nt(a,u=>{this.computeLookaheadFunc(r,u.idx,768,"Repetition",u.maxLookahead,xo(u))}),Nt(i,u=>{this.computeLookaheadFunc(r,u.idx,512,"Option",u.maxLookahead,xo(u))}),Nt(s,u=>{this.computeLookaheadFunc(r,u.idx,1024,"RepetitionMandatory",u.maxLookahead,xo(u))}),Nt(o,u=>{this.computeLookaheadFunc(r,u.idx,1536,"RepetitionMandatoryWithSeparator",u.maxLookahead,xo(u))}),Nt(l,u=>{this.computeLookaheadFunc(r,u.idx,1280,"RepetitionWithSeparator",u.maxLookahead,xo(u))})})})}computeLookaheadFunc(e,r,n,a,i,s){this.TRACE_INIT(`${s}${r===0?"":r}`,()=>{let o=this.lookaheadStrategy.buildLookaheadForOptional({prodOccurrence:r,rule:e,maxLookahead:i||this.maxLookahead,dynamicTokensEnabled:this.dynamicTokensEnabled,prodType:a}),l=N7(this.fullRuleNameToShort[e.name],n,r);this.setLaFuncCache(l,o)})}getKeyForAutomaticLookahead(e,r){let n=this.getLastExplicitRuleShortName();return N7(n,e,r)}getLaFuncFromCache(e){return this.lookAheadFuncsCache.get(e)}setLaFuncCache(e,r){this.lookAheadFuncsCache.set(e,r)}},U$=class extends Os{constructor(){super(...arguments),this.dslMethods={option:[],alternation:[],repetition:[],repetitionWithSeparator:[],repetitionMandatory:[],repetitionMandatoryWithSeparator:[]}}reset(){this.dslMethods={option:[],alternation:[],repetition:[],repetitionWithSeparator:[],repetitionMandatory:[],repetitionMandatoryWithSeparator:[]}}visitOption(e){this.dslMethods.option.push(e)}visitRepetitionWithSeparator(e){this.dslMethods.repetitionWithSeparator.push(e)}visitRepetitionMandatory(e){this.dslMethods.repetitionMandatory.push(e)}visitRepetitionMandatoryWithSeparator(e){this.dslMethods.repetitionMandatoryWithSeparator.push(e)}visitRepetition(e){this.dslMethods.repetition.push(e)}visitAlternation(e){this.dslMethods.alternation.push(e)}},O7=new U$});function H$(t,e){isNaN(t.startOffset)===!0?(t.startOffset=e.startOffset,t.endOffset=e.endOffset):t.endOffset{});function Y$(t,e){Object.defineProperty(t,Igt,{enumerable:!1,configurable:!0,writable:!1,value:e})}var Igt,M6e=A(()=>{Igt="name"});function Dgt(t,e){let r=Sn(t),n=r.length;for(let a=0;as.msg);throw Error(`Errors Detected in CST Visitor <${this.constructor.name}>: - ${i.join(` +see: https://en.wikipedia.org/wiki/LL_parser#Left_factoring.`},buildInvalidRuleNameError(t){return"deprecated"},buildDuplicateRuleNameError(t){let e;return t.topLevelRule instanceof So?e=t.topLevelRule.name:e=t.topLevelRule,`Duplicate definition, rule: ->${e}<- is already defined in the grammar: ->${t.grammarName}<-`}}});function Dke(t,e){let r=new qq(t,e);return r.resolveRefs(),r.errors}var qq,Ike=D(()=>{hl();Yn();_o();qq=class extends Co{constructor(e,r){super(),this.nameToTopRule=e,this.errMsgProvider=r,this.errors=[]}resolveRefs(){ar(Wn(this.nameToTopRule),e=>{this.currTopLevel=e,e.accept(this)})}visitNonTerminal(e){let r=this.nameToTopRule[e.nonTerminalName];if(r)e.referencedRule=r;else{let n=this.errMsgProvider.buildRuleNotFoundError(this.currTopLevel,e);this.errors.push({message:n,type:Ha.UNRESOLVED_SUBRULE_REF,ruleName:this.currTopLevel.name,unresolvedRefName:e.nonTerminalName})}}}});function sA(t,e,r=[]){r=ci(r);let n=[],i=0;function a(o){return o.concat(ua(t,i+1))}function s(o){let l=sA(a(o),e,r);return n.concat(l)}for(;r.length{Xr(l.definition)===!1&&(n=s(l.definition))}),n;if(o instanceof Ur)r.push(o.terminalType);else throw Error("non exhaustive match")}i++}return n.push({partialPath:r,suffixDef:ua(t,i)}),n}function oA(t,e,r,n){let i="EXIT_NONE_TERMINAL",a=[i],s="EXIT_ALTERNATIVE",o=!1,l=e.length,u=l-n-1,h=[],f=[];for(f.push({idx:-1,def:t,ruleStack:[],occurrenceStack:[]});!Xr(f);){let d=f.pop();if(d===s){o&&$0(f).idx<=u&&f.pop();continue}let p=d.def,m=d.idx,g=d.ruleStack,y=d.occurrenceStack;if(Xr(p))continue;let v=p[0];if(v===i){let x={idx:m,def:ua(p),ruleStack:nf(g),occurrenceStack:nf(y)};f.push(x)}else if(v instanceof Ur)if(m=0;x--){let k=v.definition[x],_={idx:m,def:k.definition.concat(ua(p)),ruleStack:g,occurrenceStack:y};f.push(_),f.push(s)}else if(v instanceof hi)f.push({idx:m,def:v.definition.concat(ua(p)),ruleStack:g,occurrenceStack:y});else if(v instanceof So)f.push(Zvt(v,m,g,y));else throw Error("non exhaustive match")}return h}function Zvt(t,e,r,n){let i=ci(r);i.push(t.name);let a=ci(n);return a.push(1),{idx:e,def:t.definition,ruleStack:i,occurrenceStack:a}}var Uq,nA,_x,iA,l7,aA,u7,c7=D(()=>{Yn();Rq();j_();_o();Uq=class extends of{constructor(e,r){super(),this.topProd=e,this.path=r,this.possibleTokTypes=[],this.nextProductionName="",this.nextProductionOccurrence=0,this.found=!1,this.isAtEndOfPath=!1}startWalking(){if(this.found=!1,this.path.ruleStack[0]!==this.topProd.name)throw Error("The path does not start with the walker's top Rule!");return this.ruleStack=ci(this.path.ruleStack).reverse(),this.occurrenceStack=ci(this.path.occurrenceStack).reverse(),this.ruleStack.pop(),this.occurrenceStack.pop(),this.updateExpectedNext(),this.walk(this.topProd),this.possibleTokTypes}walk(e,r=[]){this.found||super.walk(e,r)}walkProdRef(e,r,n){if(e.referencedRule.name===this.nextProductionName&&e.idx===this.nextProductionOccurrence){let i=r.concat(n);this.updateExpectedNext(),this.walk(e.referencedRule,i)}}updateExpectedNext(){Xr(this.ruleStack)?(this.nextProductionName="",this.nextProductionOccurrence=0,this.isAtEndOfPath=!0):(this.nextProductionName=this.ruleStack.pop(),this.nextProductionOccurrence=this.occurrenceStack.pop())}},nA=class extends Uq{constructor(e,r){super(e,r),this.path=r,this.nextTerminalName="",this.nextTerminalOccurrence=0,this.nextTerminalName=this.path.lastTok.name,this.nextTerminalOccurrence=this.path.lastTokOccurrence}walkTerminal(e,r,n){if(this.isAtEndOfPath&&e.terminalType.name===this.nextTerminalName&&e.idx===this.nextTerminalOccurrence&&!this.found){let i=r.concat(n),a=new hi({definition:i});this.possibleTokTypes=Om(a),this.found=!0}}},_x=class extends of{constructor(e,r){super(),this.topRule=e,this.occurrence=r,this.result={token:void 0,occurrence:void 0,isEndOfRule:void 0}}startWalking(){return this.walk(this.topRule),this.result}},iA=class extends _x{walkMany(e,r,n){if(e.idx===this.occurrence){let i=fs(r.concat(n));this.result.isEndOfRule=i===void 0,i instanceof Ur&&(this.result.token=i.terminalType,this.result.occurrence=i.idx)}else super.walkMany(e,r,n)}},l7=class extends _x{walkManySep(e,r,n){if(e.idx===this.occurrence){let i=fs(r.concat(n));this.result.isEndOfRule=i===void 0,i instanceof Ur&&(this.result.token=i.terminalType,this.result.occurrence=i.idx)}else super.walkManySep(e,r,n)}},aA=class extends _x{walkAtLeastOne(e,r,n){if(e.idx===this.occurrence){let i=fs(r.concat(n));this.result.isEndOfRule=i===void 0,i instanceof Ur&&(this.result.token=i.terminalType,this.result.occurrence=i.idx)}else super.walkAtLeastOne(e,r,n)}},u7=class extends _x{walkAtLeastOneSep(e,r,n){if(e.idx===this.occurrence){let i=fs(r.concat(n));this.result.isEndOfRule=i===void 0,i instanceof Ur&&(this.result.token=i.terminalType,this.result.occurrence=i.idx)}else super.walkAtLeastOneSep(e,r,n)}}});function h7(t){if(t instanceof Nn||t==="Option")return Di.OPTION;if(t instanceof sn||t==="Repetition")return Di.REPETITION;if(t instanceof fi||t==="RepetitionMandatory")return Di.REPETITION_MANDATORY;if(t instanceof di||t==="RepetitionMandatoryWithSeparator")return Di.REPETITION_MANDATORY_WITH_SEPARATOR;if(t instanceof ni||t==="RepetitionWithSeparator")return Di.REPETITION_WITH_SEPARATOR;if(t instanceof ii||t==="Alternation")return Di.ALTERNATION;throw Error("non exhaustive match")}function uA(t){let{occurrence:e,rule:r,prodType:n,maxLookahead:i}=t,a=h7(n);return a===Di.ALTERNATION?Ax(e,r,i):Lx(e,r,a,i)}function Nke(t,e,r,n,i,a){let s=Ax(t,e,r),o=$ke(s)?Ex:lf;return a(s,n,o,i)}function Oke(t,e,r,n,i,a){let s=Lx(t,e,i,r),o=$ke(s)?Ex:lf;return a(s[0],o,n)}function Pke(t,e,r,n){let i=t.length,a=sl(t,s=>sl(s,o=>o.length===1));if(e)return function(s){let o=rr(s,l=>l.GATE);for(let l=0;lUa(l)),o=Aa(s,(l,u,h)=>(ar(u,f=>{sr(l,f.tokenTypeIdx)||(l[f.tokenTypeIdx]=h),ar(f.categoryMatches,d=>{sr(l,d)||(l[d]=h)})}),l),{});return function(){let l=this.LA(1);return o[l.tokenTypeIdx]}}else return function(){for(let s=0;sa.length===1),i=t.length;if(n&&!r){let a=Ua(t);if(a.length===1&&Xr(a[0].categoryMatches)){let o=a[0].tokenTypeIdx;return function(){return this.LA(1).tokenTypeIdx===o}}else{let s=Aa(a,(o,l,u)=>(o[l.tokenTypeIdx]=!0,ar(l.categoryMatches,h=>{o[h]=!0}),o),[]);return function(){let o=this.LA(1);return s[o.tokenTypeIdx]===!0}}}else return function(){e:for(let a=0;asA([s],1)),n=Mke(r.length),i=rr(r,s=>{let o={};return ar(s,l=>{let u=Hq(l.partialPath);ar(u,h=>{o[h]=!0})}),o}),a=r;for(let s=1;s<=e;s++){let o=a;a=Mke(o.length);for(let l=0;l{let v=Hq(y.partialPath);ar(v,x=>{i[l][x]=!0})})}}}}return n}function Ax(t,e,r,n){let i=new lA(t,Di.ALTERNATION,n);return e.accept(i),Fke(i.result,r)}function Lx(t,e,r,n){let i=new lA(t,r);e.accept(i);let a=i.result,o=new Vq(e,t,r).startWalking(),l=new hi({definition:a}),u=new hi({definition:o});return Fke([l,u],n)}function cA(t,e){e:for(let r=0;r{let i=e[n];return r===i||i.categoryMatchesMap[r.tokenTypeIdx]})}function $ke(t){return sl(t,e=>sl(e,r=>sl(r,n=>Xr(n.categoryMatches))))}var Di,Vq,lA,Rx=D(()=>{Yn();c7();j_();Bm();_o();(function(t){t[t.OPTION=0]="OPTION",t[t.REPETITION=1]="REPETITION",t[t.REPETITION_MANDATORY=2]="REPETITION_MANDATORY",t[t.REPETITION_MANDATORY_WITH_SEPARATOR=3]="REPETITION_MANDATORY_WITH_SEPARATOR",t[t.REPETITION_WITH_SEPARATOR=4]="REPETITION_WITH_SEPARATOR",t[t.ALTERNATION=5]="ALTERNATION"})(Di||(Di={}));Vq=class extends of{constructor(e,r,n){super(),this.topProd=e,this.targetOccurrence=r,this.targetProdType=n}startWalking(){return this.walk(this.topProd),this.restDef}checkIsTarget(e,r,n,i){return e.idx===this.targetOccurrence&&this.targetProdType===r?(this.restDef=n.concat(i),!0):!1}walkOption(e,r,n){this.checkIsTarget(e,Di.OPTION,r,n)||super.walkOption(e,r,n)}walkAtLeastOne(e,r,n){this.checkIsTarget(e,Di.REPETITION_MANDATORY,r,n)||super.walkOption(e,r,n)}walkAtLeastOneSep(e,r,n){this.checkIsTarget(e,Di.REPETITION_MANDATORY_WITH_SEPARATOR,r,n)||super.walkOption(e,r,n)}walkMany(e,r,n){this.checkIsTarget(e,Di.REPETITION,r,n)||super.walkOption(e,r,n)}walkManySep(e,r,n){this.checkIsTarget(e,Di.REPETITION_WITH_SEPARATOR,r,n)||super.walkOption(e,r,n)}},lA=class extends Co{constructor(e,r,n){super(),this.targetOccurrence=e,this.targetProdType=r,this.targetRef=n,this.result=[]}checkIsTarget(e,r){e.idx===this.targetOccurrence&&this.targetProdType===r&&(this.targetRef===void 0||e===this.targetRef)&&(this.result=e.definition)}visitOption(e){this.checkIsTarget(e,Di.OPTION)}visitRepetition(e){this.checkIsTarget(e,Di.REPETITION)}visitRepetitionMandatory(e){this.checkIsTarget(e,Di.REPETITION_MANDATORY)}visitRepetitionMandatoryWithSeparator(e){this.checkIsTarget(e,Di.REPETITION_MANDATORY_WITH_SEPARATOR)}visitRepetitionWithSeparator(e){this.checkIsTarget(e,Di.REPETITION_WITH_SEPARATOR)}visitAlternation(e){this.checkIsTarget(e,Di.ALTERNATION)}}});function Gke(t){let e=t.lookaheadStrategy.validate({rules:t.rules,tokenTypes:t.tokenTypes,grammarName:t.grammarName});return rr(e,r=>Object.assign({type:Ha.CUSTOM_LOOKAHEAD_VALIDATION},r))}function qke(t,e,r,n){let i=wo(t,l=>Jvt(l,r)),a=axt(t,e,r),s=wo(t,l=>rxt(l,r)),o=wo(t,l=>txt(l,t,n,r));return i.concat(a,s,o)}function Jvt(t,e){let r=new Wq;t.accept(r);let n=r.allProductions,i=$G(n,ext),a=UG(i,o=>o.length>1);return rr(Wn(a),o=>{let l=fs(o),u=e.buildDuplicateFoundError(t,o),h=cl(l),f={message:u,type:Ha.DUPLICATE_PRODUCTIONS,ruleName:t.name,dslName:h,occurrence:l.idx},d=Uke(l);return d&&(f.parameter=d),f})}function ext(t){return`${cl(t)}_#_${t.idx}_#_${Uke(t)}`}function Uke(t){return t instanceof Ur?t.terminalType.name:t instanceof Mn?t.nonTerminalName:""}function txt(t,e,r,n){let i=[];if(Aa(e,(s,o)=>o.name===t.name?s+1:s,0)>1){let s=n.buildDuplicateRuleNameError({topLevelRule:t,grammarName:r});i.push({message:s,type:Ha.DUPLICATE_RULE_NAME,ruleName:t.name})}return i}function Hke(t,e,r){let n=[],i;return Qi(e,t)||(i=`Invalid rule override, rule: ->${t}<- cannot be overridden in the grammar: ->${r}<-as it is not defined in any of the super grammars `,n.push({message:i,type:Ha.INVALID_RULE_OVERRIDE,ruleName:t})),n}function Xq(t,e,r,n=[]){let i=[],a=hA(e.definition);if(Xr(a))return[];{let s=t.name;Qi(a,t)&&i.push({message:r.buildLeftRecursionError({topLevelRule:t,leftRecursionPath:n}),type:Ha.LEFT_RECURSION,ruleName:s});let l=op(a,n.concat([t])),u=wo(l,h=>{let f=ci(n);return f.push(h),Xq(t,h,r,f)});return i.concat(u)}}function hA(t){let e=[];if(Xr(t))return e;let r=fs(t);if(r instanceof Mn)e.push(r.referencedRule);else if(r instanceof hi||r instanceof Nn||r instanceof fi||r instanceof di||r instanceof ni||r instanceof sn)e=e.concat(hA(r.definition));else if(r instanceof ii)e=Ua(rr(r.definition,a=>hA(a.definition)));else if(!(r instanceof Ur))throw Error("non exhaustive match");let n=Nm(r),i=t.length>1;if(n&&i){let a=ua(t);return e.concat(hA(a))}else return e}function Vke(t,e){let r=new f7;t.accept(r);let n=r.alternations;return wo(n,a=>{let s=nf(a.definition);return wo(s,(o,l)=>{let u=oA([o],[],lf,1);return Xr(u)?[{message:e.buildEmptyAlternationError({topLevelRule:t,alternation:a,emptyChoiceIdx:l}),type:Ha.NONE_LAST_EMPTY_ALT,ruleName:t.name,occurrence:a.idx,alternative:l+1}]:[]})})}function Wke(t,e,r){let n=new f7;t.accept(n);let i=n.alternations;return i=lp(i,s=>s.ignoreAmbiguities===!0),wo(i,s=>{let o=s.idx,l=s.maxLookahead||e,u=Ax(o,t,l,s),h=nxt(u,s,t,r),f=ixt(u,s,t,r);return h.concat(f)})}function rxt(t,e){let r=new f7;t.accept(r);let n=r.alternations;return wo(n,a=>a.definition.length>255?[{message:e.buildTooManyAlternativesError({topLevelRule:t,alternation:a}),type:Ha.TOO_MANY_ALTS,ruleName:t.name,occurrence:a.idx}]:[])}function Yke(t,e,r){let n=[];return ar(t,i=>{let a=new Yq;i.accept(a);let s=a.allProductions;ar(s,o=>{let l=h7(o),u=o.maxLookahead||e,h=o.idx,d=Lx(h,i,l,u)[0];if(Xr(Ua(d))){let p=r.buildEmptyRepetitionError({topLevelRule:i,repetition:o});n.push({message:p,type:Ha.NO_NON_EMPTY_LOOKAHEAD,ruleName:i.name})}})}),n}function nxt(t,e,r,n){let i=[],a=Aa(t,(o,l,u)=>(e.definition[u].ignoreAmbiguities===!0||ar(l,h=>{let f=[u];ar(t,(d,p)=>{u!==p&&cA(d,h)&&e.definition[p].ignoreAmbiguities!==!0&&f.push(p)}),f.length>1&&!cA(i,h)&&(i.push(h),o.push({alts:f,path:h}))}),o),[]);return rr(a,o=>{let l=rr(o.alts,h=>h+1);return{message:n.buildAlternationAmbiguityError({topLevelRule:r,alternation:e,ambiguityIndices:l,prefixPath:o.path}),type:Ha.AMBIGUOUS_ALTS,ruleName:r.name,occurrence:e.idx,alternatives:o.alts}})}function ixt(t,e,r,n){let i=Aa(t,(s,o,l)=>{let u=rr(o,h=>({idx:l,path:h}));return s.concat(u)},[]);return z0(wo(i,s=>{if(e.definition[s.idx].ignoreAmbiguities===!0)return[];let l=s.idx,u=s.path,h=js(i,d=>e.definition[d.idx].ignoreAmbiguities!==!0&&d.idx{let p=[d.idx+1,l+1],m=e.idx===0?"":e.idx;return{message:n.buildAlternationPrefixAmbiguityError({topLevelRule:r,alternation:e,ambiguityIndices:p,prefixPath:d.path}),type:Ha.AMBIGUOUS_PREFIX_ALTS,ruleName:r.name,occurrence:m,alternatives:p}})}))}function axt(t,e,r){let n=[],i=rr(e,a=>a.name);return ar(t,a=>{let s=a.name;if(Qi(i,s)){let o=r.buildNamespaceConflictError(a);n.push({message:o,type:Ha.CONFLICT_TOKENS_RULES_NAMESPACE,ruleName:s})}}),n}var Wq,f7,Yq,d7=D(()=>{Yn();hl();_o();Rx();c7();Bm();Wq=class extends Co{constructor(){super(...arguments),this.allProductions=[]}visitNonTerminal(e){this.allProductions.push(e)}visitOption(e){this.allProductions.push(e)}visitRepetitionWithSeparator(e){this.allProductions.push(e)}visitRepetitionMandatory(e){this.allProductions.push(e)}visitRepetitionMandatoryWithSeparator(e){this.allProductions.push(e)}visitRepetition(e){this.allProductions.push(e)}visitAlternation(e){this.allProductions.push(e)}visitTerminal(e){this.allProductions.push(e)}};f7=class extends Co{constructor(){super(...arguments),this.alternations=[]}visitAlternation(e){this.alternations.push(e)}};Yq=class extends Co{constructor(){super(...arguments),this.allProductions=[]}visitRepetitionWithSeparator(e){this.allProductions.push(e)}visitRepetitionMandatory(e){this.allProductions.push(e)}visitRepetitionMandatoryWithSeparator(e){this.allProductions.push(e)}visitRepetition(e){this.allProductions.push(e)}}});function Xke(t){let e=tx(t,{errMsgProvider:Rke}),r={};return ar(t.rules,n=>{r[n.name]=n}),Dke(r,e.errMsgProvider)}function jke(t){return t=tx(t,{errMsgProvider:wc}),qke(t.rules,t.tokenTypes,t.errMsgProvider,t.grammarName)}var Kke=D(()=>{Yn();Ike();d7();Cx()});function _p(t){return Qi(tTe,t.name)}var Zke,Qke,Jke,eTe,tTe,Dx,zm,p7,m7,g7,Ix=D(()=>{Yn();Zke="MismatchedTokenException",Qke="NoViableAltException",Jke="EarlyExitException",eTe="NotAllInputParsedException",tTe=[Zke,Qke,Jke,eTe];Object.freeze(tTe);Dx=class extends Error{constructor(e,r){super(e),this.token=r,this.resyncedTokens=[],Object.setPrototypeOf(this,new.target.prototype),Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)}},zm=class extends Dx{constructor(e,r,n){super(e,r),this.previousToken=n,this.name=Zke}},p7=class extends Dx{constructor(e,r,n){super(e,r),this.previousToken=n,this.name=Qke}},m7=class extends Dx{constructor(e,r){super(e,r),this.name=eTe}},g7=class extends Dx{constructor(e,r,n){super(e,r),this.previousToken=n,this.name=Jke}}});function sxt(t,e,r,n,i,a,s){let o=this.getKeyForAutomaticLookahead(n,i),l=this.firstAfterRepMap[o];if(l===void 0){let d=this.getCurrRuleFullName(),p=this.getGAstProductions()[d];l=new a(p,i).startWalking(),this.firstAfterRepMap[o]=l}let u=l.token,h=l.occurrence,f=l.isEndOfRule;this.RULE_STACK.length===1&&f&&u===void 0&&(u=Gl,h=1),!(u===void 0||h===void 0)&&this.shouldInRepetitionRecoveryBeTried(u,h,s)&&this.tryInRepetitionRecovery(t,e,r,u)}var jq,Zq,Kq,fA,Qq=D(()=>{Fm();Yn();Ix();Dq();hl();jq={},Zq="InRuleRecoveryException",Kq=class extends Error{constructor(e){super(e),this.name=Zq}},fA=class{initRecoverable(e){this.firstAfterRepMap={},this.resyncFollows={},this.recoveryEnabled=sr(e,"recoveryEnabled")?e.recoveryEnabled:Ao.recoveryEnabled,this.recoveryEnabled&&(this.attemptInRepetitionRecovery=sxt)}getTokenToInsert(e){let r=hf(e,"",NaN,NaN,NaN,NaN,NaN,NaN);return r.isInsertedInRecovery=!0,r}canTokenTypeBeInsertedInRecovery(e){return!0}canTokenTypeBeDeletedInRecovery(e){return!0}tryInRepetitionRecovery(e,r,n,i){let a=this.findReSyncTokenType(),s=this.exportLexerState(),o=[],l=!1,u=this.LA(1),h=this.LA(1),f=()=>{let d=this.LA(0),p=this.errorMessageProvider.buildMismatchTokenMessage({expected:i,actual:u,previous:d,ruleName:this.getCurrRuleFullName()}),m=new zm(p,u,this.LA(0));m.resyncedTokens=nf(o),this.SAVE_ERROR(m)};for(;!l;)if(this.tokenMatcher(h,i)){f();return}else if(n.call(this)){f(),e.apply(this,r);return}else this.tokenMatcher(h,a)?l=!0:(h=this.SKIP_TOKEN(),this.addToResyncTokens(h,o));this.importLexerState(s)}shouldInRepetitionRecoveryBeTried(e,r,n){return!(n===!1||this.tokenMatcher(this.LA(1),e)||this.isBackTracking()||this.canPerformInRuleRecovery(e,this.getFollowsForInRuleRecovery(e,r)))}getFollowsForInRuleRecovery(e,r){let n=this.getCurrentGrammarPath(e,r);return this.getNextPossibleTokenTypes(n)}tryInRuleRecovery(e,r){if(this.canRecoverWithSingleTokenInsertion(e,r))return this.getTokenToInsert(e);if(this.canRecoverWithSingleTokenDeletion(e)){let n=this.SKIP_TOKEN();return this.consumeToken(),n}throw new Kq("sad sad panda")}canPerformInRuleRecovery(e,r){return this.canRecoverWithSingleTokenInsertion(e,r)||this.canRecoverWithSingleTokenDeletion(e)}canRecoverWithSingleTokenInsertion(e,r){if(!this.canTokenTypeBeInsertedInRecovery(e)||Xr(r))return!1;let n=this.LA(1);return G0(r,a=>this.tokenMatcher(n,a))!==void 0}canRecoverWithSingleTokenDeletion(e){return this.canTokenTypeBeDeletedInRecovery(e)?this.tokenMatcher(this.LA(2),e):!1}isInCurrentRuleReSyncSet(e){let r=this.getCurrFollowKey(),n=this.getFollowSetFromFollowKey(r);return Qi(n,e)}findReSyncTokenType(){let e=this.flattenFollowSet(),r=this.LA(1),n=2;for(;;){let i=G0(e,a=>o7(r,a));if(i!==void 0)return i;r=this.LA(n),n++}}getCurrFollowKey(){if(this.RULE_STACK.length===1)return jq;let e=this.getLastExplicitRuleShortName(),r=this.getLastExplicitRuleOccurrenceIndex(),n=this.getPreviousExplicitRuleShortName();return{ruleName:this.shortRuleNameToFullName(e),idxInCallingRule:r,inRule:this.shortRuleNameToFullName(n)}}buildFullFollowKeyStack(){let e=this.RULE_STACK,r=this.RULE_OCCURRENCE_STACK;return rr(e,(n,i)=>i===0?jq:{ruleName:this.shortRuleNameToFullName(n),idxInCallingRule:r[i],inRule:this.shortRuleNameToFullName(e[i-1])})}flattenFollowSet(){let e=rr(this.buildFullFollowKeyStack(),r=>this.getFollowSetFromFollowKey(r));return Ua(e)}getFollowSetFromFollowKey(e){if(e===jq)return[Gl];let r=e.ruleName+e.idxInCallingRule+K_+e.inRule;return this.resyncFollows[r]}addToResyncTokens(e,r){return this.tokenMatcher(e,Gl)||r.push(e),r}reSyncTo(e){let r=[],n=this.LA(1);for(;this.tokenMatcher(n,e)===!1;)n=this.SKIP_TOKEN(),this.addToResyncTokens(n,r);return nf(r)}attemptInRepetitionRecovery(e,r,n,i,a,s,o){}getCurrentGrammarPath(e,r){let n=this.getHumanReadableRuleStack(),i=ci(this.RULE_OCCURRENCE_STACK);return{ruleStack:n,occurrenceStack:i,lastTok:e,lastTokOccurrence:r}}getHumanReadableRuleStack(){return rr(this.RULE_STACK,e=>this.shortRuleNameToFullName(e))}}});function dA(t,e,r){return r|e|t}var pA=D(()=>{});var df,Jq=D(()=>{Yn();Cx();hl();d7();Rx();df=class{constructor(e){var r;this.maxLookahead=(r=e?.maxLookahead)!==null&&r!==void 0?r:Ao.maxLookahead}validate(e){let r=this.validateNoLeftRecursion(e.rules);if(Xr(r)){let n=this.validateEmptyOrAlternatives(e.rules),i=this.validateAmbiguousAlternationAlternatives(e.rules,this.maxLookahead),a=this.validateSomeNonEmptyLookaheadPath(e.rules,this.maxLookahead);return[...r,...n,...i,...a]}return r}validateNoLeftRecursion(e){return wo(e,r=>Xq(r,r,wc))}validateEmptyOrAlternatives(e){return wo(e,r=>Vke(r,wc))}validateAmbiguousAlternationAlternatives(e,r){return wo(e,n=>Wke(n,r,wc))}validateSomeNonEmptyLookaheadPath(e,r){return Yke(e,r,wc)}buildLookaheadForAlternation(e){return Nke(e.prodOccurrence,e.rule,e.maxLookahead,e.hasPredicates,e.dynamicTokensEnabled,Pke)}buildLookaheadForOptional(e){return Oke(e.prodOccurrence,e.rule,e.maxLookahead,e.dynamicTokensEnabled,h7(e.prodType),Bke)}}});function oxt(t){mA.reset(),t.accept(mA);let e=mA.dslMethods;return mA.reset(),e}var gA,eU,mA,rTe=D(()=>{Yn();hl();pA();_o();Jq();gA=class{initLooksAhead(e){this.dynamicTokensEnabled=sr(e,"dynamicTokensEnabled")?e.dynamicTokensEnabled:Ao.dynamicTokensEnabled,this.maxLookahead=sr(e,"maxLookahead")?e.maxLookahead:Ao.maxLookahead,this.lookaheadStrategy=sr(e,"lookaheadStrategy")?e.lookaheadStrategy:new df({maxLookahead:this.maxLookahead}),this.lookAheadFuncsCache=new Map}preComputeLookaheadFunctions(e){ar(e,r=>{this.TRACE_INIT(`${r.name} Rule Lookahead`,()=>{let{alternation:n,repetition:i,option:a,repetitionMandatory:s,repetitionMandatoryWithSeparator:o,repetitionWithSeparator:l}=oxt(r);ar(n,u=>{let h=u.idx===0?"":u.idx;this.TRACE_INIT(`${cl(u)}${h}`,()=>{let f=this.lookaheadStrategy.buildLookaheadForAlternation({prodOccurrence:u.idx,rule:r,maxLookahead:u.maxLookahead||this.maxLookahead,hasPredicates:u.hasPredicates,dynamicTokensEnabled:this.dynamicTokensEnabled}),d=dA(this.fullRuleNameToShort[r.name],256,u.idx);this.setLaFuncCache(d,f)})}),ar(i,u=>{this.computeLookaheadFunc(r,u.idx,768,"Repetition",u.maxLookahead,cl(u))}),ar(a,u=>{this.computeLookaheadFunc(r,u.idx,512,"Option",u.maxLookahead,cl(u))}),ar(s,u=>{this.computeLookaheadFunc(r,u.idx,1024,"RepetitionMandatory",u.maxLookahead,cl(u))}),ar(o,u=>{this.computeLookaheadFunc(r,u.idx,1536,"RepetitionMandatoryWithSeparator",u.maxLookahead,cl(u))}),ar(l,u=>{this.computeLookaheadFunc(r,u.idx,1280,"RepetitionWithSeparator",u.maxLookahead,cl(u))})})})}computeLookaheadFunc(e,r,n,i,a,s){this.TRACE_INIT(`${s}${r===0?"":r}`,()=>{let o=this.lookaheadStrategy.buildLookaheadForOptional({prodOccurrence:r,rule:e,maxLookahead:a||this.maxLookahead,dynamicTokensEnabled:this.dynamicTokensEnabled,prodType:i}),l=dA(this.fullRuleNameToShort[e.name],n,r);this.setLaFuncCache(l,o)})}getKeyForAutomaticLookahead(e,r){let n=this.getLastExplicitRuleShortName();return dA(n,e,r)}getLaFuncFromCache(e){return this.lookAheadFuncsCache.get(e)}setLaFuncCache(e,r){this.lookAheadFuncsCache.set(e,r)}},eU=class extends Co{constructor(){super(...arguments),this.dslMethods={option:[],alternation:[],repetition:[],repetitionWithSeparator:[],repetitionMandatory:[],repetitionMandatoryWithSeparator:[]}}reset(){this.dslMethods={option:[],alternation:[],repetition:[],repetitionWithSeparator:[],repetitionMandatory:[],repetitionMandatoryWithSeparator:[]}}visitOption(e){this.dslMethods.option.push(e)}visitRepetitionWithSeparator(e){this.dslMethods.repetitionWithSeparator.push(e)}visitRepetitionMandatory(e){this.dslMethods.repetitionMandatory.push(e)}visitRepetitionMandatoryWithSeparator(e){this.dslMethods.repetitionMandatoryWithSeparator.push(e)}visitRepetition(e){this.dslMethods.repetition.push(e)}visitAlternation(e){this.dslMethods.alternation.push(e)}},mA=new eU});function nU(t,e){isNaN(t.startOffset)===!0?(t.startOffset=e.startOffset,t.endOffset=e.endOffset):t.endOffset{});function aU(t,e){Object.defineProperty(t,lxt,{enumerable:!1,configurable:!0,writable:!1,value:e})}var lxt,sTe=D(()=>{lxt="name"});function uxt(t,e){let r=li(t),n=r.length;for(let i=0;is.msg);throw Error(`Errors Detected in CST Visitor <${this.constructor.name}>: + ${a.join(` `).replace(/\n/g,` - `)}`)}}};return r.prototype=n,r.prototype.constructor=r,r._RULE_NAMES=e,r}function P6e(t,e,r){let n=function(){};Y$(n,t+"BaseSemanticsWithDefaults");let a=Object.create(r.prototype);return Nt(e,i=>{a[i]=Dgt}),n.prototype=a,n.prototype.constructor=n,n}function Ngt(t,e){return Mgt(t,e)}function Mgt(t,e){let r=os(e,a=>Ls(t[a])===!1),n=Rt(r,a=>({msg:`Missing visitor method: <${a}> on ${t.constructor.name} CST Visitor.`,type:X$.MISSING_METHOD,methodName:a}));return Pc(n)}var X$,B6e=A(()=>{hn();M6e();(function(t){t[t.REDUNDANT_METHOD=0]="REDUNDANT_METHOD",t[t.MISSING_METHOD=1]="MISSING_METHOD"})(X$||(X$={}))});var $7,F6e=A(()=>{N6e();hn();B6e();bo();$7=class{initTreeBuilder(e){if(this.CST_STACK=[],this.outputCst=e.outputCst,this.nodeLocationTracking=Mt(e,"nodeLocationTracking")?e.nodeLocationTracking:Bs.nodeLocationTracking,!this.outputCst)this.cstInvocationStateUpdate=ia,this.cstFinallyStateUpdate=ia,this.cstPostTerminal=ia,this.cstPostNonTerminal=ia,this.cstPostRule=ia;else if(/full/i.test(this.nodeLocationTracking))this.recoveryEnabled?(this.setNodeLocationFromToken=W$,this.setNodeLocationFromNode=W$,this.cstPostRule=ia,this.setInitialNodeLocation=this.setInitialNodeLocationFullRecovery):(this.setNodeLocationFromToken=ia,this.setNodeLocationFromNode=ia,this.cstPostRule=this.cstPostRuleFull,this.setInitialNodeLocation=this.setInitialNodeLocationFullRegular);else if(/onlyOffset/i.test(this.nodeLocationTracking))this.recoveryEnabled?(this.setNodeLocationFromToken=H$,this.setNodeLocationFromNode=H$,this.cstPostRule=ia,this.setInitialNodeLocation=this.setInitialNodeLocationOnlyOffsetRecovery):(this.setNodeLocationFromToken=ia,this.setNodeLocationFromNode=ia,this.cstPostRule=this.cstPostRuleOnlyOffset,this.setInitialNodeLocation=this.setInitialNodeLocationOnlyOffsetRegular);else if(/none/i.test(this.nodeLocationTracking))this.setNodeLocationFromToken=ia,this.setNodeLocationFromNode=ia,this.cstPostRule=ia,this.setInitialNodeLocation=ia;else throw Error(`Invalid config option: "${e.nodeLocationTracking}"`)}setInitialNodeLocationOnlyOffsetRecovery(e){e.location={startOffset:NaN,endOffset:NaN}}setInitialNodeLocationOnlyOffsetRegular(e){e.location={startOffset:this.LA(1).startOffset,endOffset:NaN}}setInitialNodeLocationFullRecovery(e){e.location={startOffset:NaN,startLine:NaN,startColumn:NaN,endOffset:NaN,endLine:NaN,endColumn:NaN}}setInitialNodeLocationFullRegular(e){let r=this.LA(1);e.location={startOffset:r.startOffset,startLine:r.startLine,startColumn:r.startColumn,endOffset:NaN,endLine:NaN,endColumn:NaN}}cstInvocationStateUpdate(e){let r={name:e,children:Object.create(null)};this.setInitialNodeLocation(r),this.CST_STACK.push(r)}cstFinallyStateUpdate(){this.CST_STACK.pop()}cstPostRuleFull(e){let r=this.LA(0),n=e.location;n.startOffset<=r.startOffset?(n.endOffset=r.endOffset,n.endLine=r.endLine,n.endColumn=r.endColumn):(n.startOffset=NaN,n.startLine=NaN,n.startColumn=NaN)}cstPostRuleOnlyOffset(e){let r=this.LA(0),n=e.location;n.startOffset<=r.startOffset?n.endOffset=r.endOffset:n.startOffset=NaN}cstPostTerminal(e,r){let n=this.CST_STACK[this.CST_STACK.length-1];I6e(n,r,e),this.setNodeLocationFromToken(n.location,r)}cstPostNonTerminal(e,r){let n=this.CST_STACK[this.CST_STACK.length-1];D6e(n,r,e),this.setNodeLocationFromNode(n.location,e.location)}getBaseCstVisitorConstructor(){if(ls(this.baseCstVisitorConstructor)){let e=O6e(this.className,Sn(this.gastProductionsCache));return this.baseCstVisitorConstructor=e,e}return this.baseCstVisitorConstructor}getBaseCstVisitorConstructorWithDefaults(){if(ls(this.baseCstVisitorWithDefaultsConstructor)){let e=P6e(this.className,Sn(this.gastProductionsCache),this.getBaseCstVisitorConstructor());return this.baseCstVisitorWithDefaultsConstructor=e,e}return this.baseCstVisitorWithDefaultsConstructor}getLastExplicitRuleShortName(){let e=this.RULE_STACK;return e[e.length-1]}getPreviousExplicitRuleShortName(){let e=this.RULE_STACK;return e[e.length-2]}getLastExplicitRuleOccurrenceIndex(){let e=this.RULE_OCCURRENCE_STACK;return e[e.length-1]}}});var G7,z6e=A(()=>{bo();G7=class{initLexerAdapter(){this.tokVector=[],this.tokVectorLength=0,this.currIdx=-1}set input(e){if(this.selfAnalysisDone!==!0)throw Error("Missing invocation at the end of the Parser's constructor.");this.reset(),this.tokVector=e,this.tokVectorLength=e.length}get input(){return this.tokVector}SKIP_TOKEN(){return this.currIdx<=this.tokVector.length-2?(this.consumeToken(),this.LA(1)):b2}LA(e){let r=this.currIdx+e;return r<0||this.tokVectorLength<=r?b2:this.tokVector[r]}consumeToken(){this.currIdx++}exportLexerState(){return this.currIdx}importLexerState(e){this.currIdx=e}resetLexerState(){this.currIdx=-1}moveToTerminatedState(){this.currIdx=this.tokVector.length-1}getLexerPosition(){return this.exportLexerState()}}});var U7,$6e=A(()=>{hn();x2();bo();d2();K5();Ps();U7=class{ACTION(e){return e.call(this)}consume(e,r,n){return this.consumeInternal(r,e,n)}subrule(e,r,n){return this.subruleInternal(r,e,n)}option(e,r){return this.optionInternal(r,e)}or(e,r){return this.orInternal(r,e)}many(e,r){return this.manyInternal(e,r)}atLeastOne(e,r){return this.atLeastOneInternal(e,r)}CONSUME(e,r){return this.consumeInternal(e,0,r)}CONSUME1(e,r){return this.consumeInternal(e,1,r)}CONSUME2(e,r){return this.consumeInternal(e,2,r)}CONSUME3(e,r){return this.consumeInternal(e,3,r)}CONSUME4(e,r){return this.consumeInternal(e,4,r)}CONSUME5(e,r){return this.consumeInternal(e,5,r)}CONSUME6(e,r){return this.consumeInternal(e,6,r)}CONSUME7(e,r){return this.consumeInternal(e,7,r)}CONSUME8(e,r){return this.consumeInternal(e,8,r)}CONSUME9(e,r){return this.consumeInternal(e,9,r)}SUBRULE(e,r){return this.subruleInternal(e,0,r)}SUBRULE1(e,r){return this.subruleInternal(e,1,r)}SUBRULE2(e,r){return this.subruleInternal(e,2,r)}SUBRULE3(e,r){return this.subruleInternal(e,3,r)}SUBRULE4(e,r){return this.subruleInternal(e,4,r)}SUBRULE5(e,r){return this.subruleInternal(e,5,r)}SUBRULE6(e,r){return this.subruleInternal(e,6,r)}SUBRULE7(e,r){return this.subruleInternal(e,7,r)}SUBRULE8(e,r){return this.subruleInternal(e,8,r)}SUBRULE9(e,r){return this.subruleInternal(e,9,r)}OPTION(e){return this.optionInternal(e,0)}OPTION1(e){return this.optionInternal(e,1)}OPTION2(e){return this.optionInternal(e,2)}OPTION3(e){return this.optionInternal(e,3)}OPTION4(e){return this.optionInternal(e,4)}OPTION5(e){return this.optionInternal(e,5)}OPTION6(e){return this.optionInternal(e,6)}OPTION7(e){return this.optionInternal(e,7)}OPTION8(e){return this.optionInternal(e,8)}OPTION9(e){return this.optionInternal(e,9)}OR(e){return this.orInternal(e,0)}OR1(e){return this.orInternal(e,1)}OR2(e){return this.orInternal(e,2)}OR3(e){return this.orInternal(e,3)}OR4(e){return this.orInternal(e,4)}OR5(e){return this.orInternal(e,5)}OR6(e){return this.orInternal(e,6)}OR7(e){return this.orInternal(e,7)}OR8(e){return this.orInternal(e,8)}OR9(e){return this.orInternal(e,9)}MANY(e){this.manyInternal(0,e)}MANY1(e){this.manyInternal(1,e)}MANY2(e){this.manyInternal(2,e)}MANY3(e){this.manyInternal(3,e)}MANY4(e){this.manyInternal(4,e)}MANY5(e){this.manyInternal(5,e)}MANY6(e){this.manyInternal(6,e)}MANY7(e){this.manyInternal(7,e)}MANY8(e){this.manyInternal(8,e)}MANY9(e){this.manyInternal(9,e)}MANY_SEP(e){this.manySepFirstInternal(0,e)}MANY_SEP1(e){this.manySepFirstInternal(1,e)}MANY_SEP2(e){this.manySepFirstInternal(2,e)}MANY_SEP3(e){this.manySepFirstInternal(3,e)}MANY_SEP4(e){this.manySepFirstInternal(4,e)}MANY_SEP5(e){this.manySepFirstInternal(5,e)}MANY_SEP6(e){this.manySepFirstInternal(6,e)}MANY_SEP7(e){this.manySepFirstInternal(7,e)}MANY_SEP8(e){this.manySepFirstInternal(8,e)}MANY_SEP9(e){this.manySepFirstInternal(9,e)}AT_LEAST_ONE(e){this.atLeastOneInternal(0,e)}AT_LEAST_ONE1(e){return this.atLeastOneInternal(1,e)}AT_LEAST_ONE2(e){this.atLeastOneInternal(2,e)}AT_LEAST_ONE3(e){this.atLeastOneInternal(3,e)}AT_LEAST_ONE4(e){this.atLeastOneInternal(4,e)}AT_LEAST_ONE5(e){this.atLeastOneInternal(5,e)}AT_LEAST_ONE6(e){this.atLeastOneInternal(6,e)}AT_LEAST_ONE7(e){this.atLeastOneInternal(7,e)}AT_LEAST_ONE8(e){this.atLeastOneInternal(8,e)}AT_LEAST_ONE9(e){this.atLeastOneInternal(9,e)}AT_LEAST_ONE_SEP(e){this.atLeastOneSepFirstInternal(0,e)}AT_LEAST_ONE_SEP1(e){this.atLeastOneSepFirstInternal(1,e)}AT_LEAST_ONE_SEP2(e){this.atLeastOneSepFirstInternal(2,e)}AT_LEAST_ONE_SEP3(e){this.atLeastOneSepFirstInternal(3,e)}AT_LEAST_ONE_SEP4(e){this.atLeastOneSepFirstInternal(4,e)}AT_LEAST_ONE_SEP5(e){this.atLeastOneSepFirstInternal(5,e)}AT_LEAST_ONE_SEP6(e){this.atLeastOneSepFirstInternal(6,e)}AT_LEAST_ONE_SEP7(e){this.atLeastOneSepFirstInternal(7,e)}AT_LEAST_ONE_SEP8(e){this.atLeastOneSepFirstInternal(8,e)}AT_LEAST_ONE_SEP9(e){this.atLeastOneSepFirstInternal(9,e)}RULE(e,r,n=w2){if(da(this.definedRulesNames,e)){let s={message:ku.buildDuplicateRuleNameError({topLevelRule:e,grammarName:this.className}),type:Ka.DUPLICATE_RULE_NAME,ruleName:e};this.definitionErrors.push(s)}this.definedRulesNames.push(e);let a=this.defineRule(e,r,n);return this[e]=a,a}OVERRIDE_RULE(e,r,n=w2){let a=y6e(e,this.definedRulesNames,this.className);this.definitionErrors=this.definitionErrors.concat(a);let i=this.defineRule(e,r,n);return this[e]=i,i}BACKTRACK(e,r){return function(){this.isBackTrackingStack.push(1);let n=this.saveRecogState();try{return e.apply(this,r),!0}catch(a){if(x0(a))return!1;throw a}finally{this.reloadRecogState(n),this.isBackTrackingStack.pop()}}}getGAstProductions(){return this.gastProductionsCache}getSerializedGastProductions(){return d7(cn(this.gastProductionsCache))}}});var q7,G6e=A(()=>{hn();M7();x2();v2();Y5();bo();$$();Lm();Am();q7=class{initRecognizerEngine(e,r){if(this.className=this.constructor.name,this.shortRuleNameToFull={},this.fullRuleNameToShort={},this.ruleShortNameIdx=256,this.tokenMatcher=h2,this.subruleIdx=0,this.definedRulesNames=[],this.tokensMap={},this.isBackTrackingStack=[],this.RULE_STACK=[],this.RULE_OCCURRENCE_STACK=[],this.gastProductionsCache={},Mt(r,"serializedGrammar"))throw Error(`The Parser's configuration can no longer contain a property. + `)}`)}}};return r.prototype=n,r.prototype.constructor=r,r._RULE_NAMES=e,r}function lTe(t,e,r){let n=function(){};aU(n,t+"BaseSemanticsWithDefaults");let i=Object.create(r.prototype);return ar(e,a=>{i[a]=uxt}),n.prototype=i,n.prototype.constructor=n,n}function cxt(t,e){return hxt(t,e)}function hxt(t,e){let r=js(e,i=>bo(t[i])===!1),n=rr(r,i=>({msg:`Missing visitor method: <${i}> on ${t.constructor.name} CST Visitor.`,type:sU.MISSING_METHOD,methodName:i}));return z0(n)}var sU,uTe=D(()=>{Yn();sTe();(function(t){t[t.REDUNDANT_METHOD=0]="REDUNDANT_METHOD",t[t.MISSING_METHOD=1]="MISSING_METHOD"})(sU||(sU={}))});var bA,cTe=D(()=>{aTe();Yn();uTe();hl();bA=class{initTreeBuilder(e){if(this.CST_STACK=[],this.outputCst=e.outputCst,this.nodeLocationTracking=sr(e,"nodeLocationTracking")?e.nodeLocationTracking:Ao.nodeLocationTracking,!this.outputCst)this.cstInvocationStateUpdate=Hi,this.cstFinallyStateUpdate=Hi,this.cstPostTerminal=Hi,this.cstPostNonTerminal=Hi,this.cstPostRule=Hi;else if(/full/i.test(this.nodeLocationTracking))this.recoveryEnabled?(this.setNodeLocationFromToken=iU,this.setNodeLocationFromNode=iU,this.cstPostRule=Hi,this.setInitialNodeLocation=this.setInitialNodeLocationFullRecovery):(this.setNodeLocationFromToken=Hi,this.setNodeLocationFromNode=Hi,this.cstPostRule=this.cstPostRuleFull,this.setInitialNodeLocation=this.setInitialNodeLocationFullRegular);else if(/onlyOffset/i.test(this.nodeLocationTracking))this.recoveryEnabled?(this.setNodeLocationFromToken=nU,this.setNodeLocationFromNode=nU,this.cstPostRule=Hi,this.setInitialNodeLocation=this.setInitialNodeLocationOnlyOffsetRecovery):(this.setNodeLocationFromToken=Hi,this.setNodeLocationFromNode=Hi,this.cstPostRule=this.cstPostRuleOnlyOffset,this.setInitialNodeLocation=this.setInitialNodeLocationOnlyOffsetRegular);else if(/none/i.test(this.nodeLocationTracking))this.setNodeLocationFromToken=Hi,this.setNodeLocationFromNode=Hi,this.cstPostRule=Hi,this.setInitialNodeLocation=Hi;else throw Error(`Invalid config option: "${e.nodeLocationTracking}"`)}setInitialNodeLocationOnlyOffsetRecovery(e){e.location={startOffset:NaN,endOffset:NaN}}setInitialNodeLocationOnlyOffsetRegular(e){e.location={startOffset:this.LA(1).startOffset,endOffset:NaN}}setInitialNodeLocationFullRecovery(e){e.location={startOffset:NaN,startLine:NaN,startColumn:NaN,endOffset:NaN,endLine:NaN,endColumn:NaN}}setInitialNodeLocationFullRegular(e){let r=this.LA(1);e.location={startOffset:r.startOffset,startLine:r.startLine,startColumn:r.startColumn,endOffset:NaN,endLine:NaN,endColumn:NaN}}cstInvocationStateUpdate(e){let r={name:e,children:Object.create(null)};this.setInitialNodeLocation(r),this.CST_STACK.push(r)}cstFinallyStateUpdate(){this.CST_STACK.pop()}cstPostRuleFull(e){let r=this.LA(0),n=e.location;n.startOffset<=r.startOffset?(n.endOffset=r.endOffset,n.endLine=r.endLine,n.endColumn=r.endColumn):(n.startOffset=NaN,n.startLine=NaN,n.startColumn=NaN)}cstPostRuleOnlyOffset(e){let r=this.LA(0),n=e.location;n.startOffset<=r.startOffset?n.endOffset=r.endOffset:n.startOffset=NaN}cstPostTerminal(e,r){let n=this.CST_STACK[this.CST_STACK.length-1];nTe(n,r,e),this.setNodeLocationFromToken(n.location,r)}cstPostNonTerminal(e,r){let n=this.CST_STACK[this.CST_STACK.length-1];iTe(n,r,e),this.setNodeLocationFromNode(n.location,e.location)}getBaseCstVisitorConstructor(){if(Ks(this.baseCstVisitorConstructor)){let e=oTe(this.className,li(this.gastProductionsCache));return this.baseCstVisitorConstructor=e,e}return this.baseCstVisitorConstructor}getBaseCstVisitorConstructorWithDefaults(){if(Ks(this.baseCstVisitorWithDefaultsConstructor)){let e=lTe(this.className,li(this.gastProductionsCache),this.getBaseCstVisitorConstructor());return this.baseCstVisitorWithDefaultsConstructor=e,e}return this.baseCstVisitorWithDefaultsConstructor}getLastExplicitRuleShortName(){let e=this.RULE_STACK;return e[e.length-1]}getPreviousExplicitRuleShortName(){let e=this.RULE_STACK;return e[e.length-2]}getLastExplicitRuleOccurrenceIndex(){let e=this.RULE_OCCURRENCE_STACK;return e[e.length-1]}}});var wA,hTe=D(()=>{hl();wA=class{initLexerAdapter(){this.tokVector=[],this.tokVectorLength=0,this.currIdx=-1}set input(e){if(this.selfAnalysisDone!==!0)throw Error("Missing invocation at the end of the Parser's constructor.");this.reset(),this.tokVector=e,this.tokVectorLength=e.length}get input(){return this.tokVector}SKIP_TOKEN(){return this.currIdx<=this.tokVector.length-2?(this.consumeToken(),this.LA(1)):Mx}LA(e){let r=this.currIdx+e;return r<0||this.tokVectorLength<=r?Mx:this.tokVector[r]}consumeToken(){this.currIdx++}exportLexerState(){return this.currIdx}importLexerState(e){this.currIdx=e}resetLexerState(){this.currIdx=-1}moveToTerminatedState(){this.currIdx=this.tokVector.length-1}getLexerPosition(){return this.exportLexerState()}}});var kA,fTe=D(()=>{Yn();Ix();hl();Cx();d7();_o();kA=class{ACTION(e){return e.call(this)}consume(e,r,n){return this.consumeInternal(r,e,n)}subrule(e,r,n){return this.subruleInternal(r,e,n)}option(e,r){return this.optionInternal(r,e)}or(e,r){return this.orInternal(r,e)}many(e,r){return this.manyInternal(e,r)}atLeastOne(e,r){return this.atLeastOneInternal(e,r)}CONSUME(e,r){return this.consumeInternal(e,0,r)}CONSUME1(e,r){return this.consumeInternal(e,1,r)}CONSUME2(e,r){return this.consumeInternal(e,2,r)}CONSUME3(e,r){return this.consumeInternal(e,3,r)}CONSUME4(e,r){return this.consumeInternal(e,4,r)}CONSUME5(e,r){return this.consumeInternal(e,5,r)}CONSUME6(e,r){return this.consumeInternal(e,6,r)}CONSUME7(e,r){return this.consumeInternal(e,7,r)}CONSUME8(e,r){return this.consumeInternal(e,8,r)}CONSUME9(e,r){return this.consumeInternal(e,9,r)}SUBRULE(e,r){return this.subruleInternal(e,0,r)}SUBRULE1(e,r){return this.subruleInternal(e,1,r)}SUBRULE2(e,r){return this.subruleInternal(e,2,r)}SUBRULE3(e,r){return this.subruleInternal(e,3,r)}SUBRULE4(e,r){return this.subruleInternal(e,4,r)}SUBRULE5(e,r){return this.subruleInternal(e,5,r)}SUBRULE6(e,r){return this.subruleInternal(e,6,r)}SUBRULE7(e,r){return this.subruleInternal(e,7,r)}SUBRULE8(e,r){return this.subruleInternal(e,8,r)}SUBRULE9(e,r){return this.subruleInternal(e,9,r)}OPTION(e){return this.optionInternal(e,0)}OPTION1(e){return this.optionInternal(e,1)}OPTION2(e){return this.optionInternal(e,2)}OPTION3(e){return this.optionInternal(e,3)}OPTION4(e){return this.optionInternal(e,4)}OPTION5(e){return this.optionInternal(e,5)}OPTION6(e){return this.optionInternal(e,6)}OPTION7(e){return this.optionInternal(e,7)}OPTION8(e){return this.optionInternal(e,8)}OPTION9(e){return this.optionInternal(e,9)}OR(e){return this.orInternal(e,0)}OR1(e){return this.orInternal(e,1)}OR2(e){return this.orInternal(e,2)}OR3(e){return this.orInternal(e,3)}OR4(e){return this.orInternal(e,4)}OR5(e){return this.orInternal(e,5)}OR6(e){return this.orInternal(e,6)}OR7(e){return this.orInternal(e,7)}OR8(e){return this.orInternal(e,8)}OR9(e){return this.orInternal(e,9)}MANY(e){this.manyInternal(0,e)}MANY1(e){this.manyInternal(1,e)}MANY2(e){this.manyInternal(2,e)}MANY3(e){this.manyInternal(3,e)}MANY4(e){this.manyInternal(4,e)}MANY5(e){this.manyInternal(5,e)}MANY6(e){this.manyInternal(6,e)}MANY7(e){this.manyInternal(7,e)}MANY8(e){this.manyInternal(8,e)}MANY9(e){this.manyInternal(9,e)}MANY_SEP(e){this.manySepFirstInternal(0,e)}MANY_SEP1(e){this.manySepFirstInternal(1,e)}MANY_SEP2(e){this.manySepFirstInternal(2,e)}MANY_SEP3(e){this.manySepFirstInternal(3,e)}MANY_SEP4(e){this.manySepFirstInternal(4,e)}MANY_SEP5(e){this.manySepFirstInternal(5,e)}MANY_SEP6(e){this.manySepFirstInternal(6,e)}MANY_SEP7(e){this.manySepFirstInternal(7,e)}MANY_SEP8(e){this.manySepFirstInternal(8,e)}MANY_SEP9(e){this.manySepFirstInternal(9,e)}AT_LEAST_ONE(e){this.atLeastOneInternal(0,e)}AT_LEAST_ONE1(e){return this.atLeastOneInternal(1,e)}AT_LEAST_ONE2(e){this.atLeastOneInternal(2,e)}AT_LEAST_ONE3(e){this.atLeastOneInternal(3,e)}AT_LEAST_ONE4(e){this.atLeastOneInternal(4,e)}AT_LEAST_ONE5(e){this.atLeastOneInternal(5,e)}AT_LEAST_ONE6(e){this.atLeastOneInternal(6,e)}AT_LEAST_ONE7(e){this.atLeastOneInternal(7,e)}AT_LEAST_ONE8(e){this.atLeastOneInternal(8,e)}AT_LEAST_ONE9(e){this.atLeastOneInternal(9,e)}AT_LEAST_ONE_SEP(e){this.atLeastOneSepFirstInternal(0,e)}AT_LEAST_ONE_SEP1(e){this.atLeastOneSepFirstInternal(1,e)}AT_LEAST_ONE_SEP2(e){this.atLeastOneSepFirstInternal(2,e)}AT_LEAST_ONE_SEP3(e){this.atLeastOneSepFirstInternal(3,e)}AT_LEAST_ONE_SEP4(e){this.atLeastOneSepFirstInternal(4,e)}AT_LEAST_ONE_SEP5(e){this.atLeastOneSepFirstInternal(5,e)}AT_LEAST_ONE_SEP6(e){this.atLeastOneSepFirstInternal(6,e)}AT_LEAST_ONE_SEP7(e){this.atLeastOneSepFirstInternal(7,e)}AT_LEAST_ONE_SEP8(e){this.atLeastOneSepFirstInternal(8,e)}AT_LEAST_ONE_SEP9(e){this.atLeastOneSepFirstInternal(9,e)}RULE(e,r,n=Nx){if(Qi(this.definedRulesNames,e)){let s={message:wc.buildDuplicateRuleNameError({topLevelRule:e,grammarName:this.className}),type:Ha.DUPLICATE_RULE_NAME,ruleName:e};this.definitionErrors.push(s)}this.definedRulesNames.push(e);let i=this.defineRule(e,r,n);return this[e]=i,i}OVERRIDE_RULE(e,r,n=Nx){let i=Hke(e,this.definedRulesNames,this.className);this.definitionErrors=this.definitionErrors.concat(i);let a=this.defineRule(e,r,n);return this[e]=a,a}BACKTRACK(e,r){return function(){this.isBackTrackingStack.push(1);let n=this.saveRecogState();try{return e.apply(this,r),!0}catch(i){if(_p(i))return!1;throw i}finally{this.reloadRecogState(n),this.isBackTrackingStack.pop()}}}getGAstProductions(){return this.gastProductionsCache}getSerializedGastProductions(){return Y_(Wn(this.gastProductionsCache))}}});var TA,dTe=D(()=>{Yn();pA();Ix();Rx();c7();hl();Qq();Fm();Bm();TA=class{initRecognizerEngine(e,r){if(this.className=this.constructor.name,this.shortRuleNameToFull={},this.fullRuleNameToShort={},this.ruleShortNameIdx=256,this.tokenMatcher=Ex,this.subruleIdx=0,this.definedRulesNames=[],this.tokensMap={},this.isBackTrackingStack=[],this.RULE_STACK=[],this.RULE_OCCURRENCE_STACK=[],this.gastProductionsCache={},sr(r,"serializedGrammar"))throw Error(`The Parser's configuration can no longer contain a property. See: https://chevrotain.io/docs/changes/BREAKING_CHANGES.html#_6-0-0 - For Further details.`);if(Bt(e)){if(kr(e))throw Error(`A Token Vocabulary cannot be empty. + For Further details.`);if(lr(e)){if(Xr(e))throw Error(`A Token Vocabulary cannot be empty. Note that the first argument for the parser constructor is no longer a Token vector (since v4.0).`);if(typeof e[0].startOffset=="number")throw Error(`The Parser constructor no longer accepts a token vector as the first argument. See: https://chevrotain.io/docs/changes/BREAKING_CHANGES.html#_4-0-0 - For Further details.`)}if(Bt(e))this.tokensMap=Ba(e,(i,s)=>(i[s.name]=s,i),{});else if(Mt(e,"modes")&&mo(ja(cn(e.modes)),jwe)){let i=ja(cn(e.modes)),s=qy(i);this.tokensMap=Ba(s,(o,l)=>(o[l.name]=l,o),{})}else if(aa(e))this.tokensMap=An(e);else throw new Error(" argument must be An Array of Token constructors, A dictionary of Token constructors or an IMultiModeLexerDefinition");this.tokensMap.EOF=Yo;let n=Mt(e,"modes")?ja(cn(e.modes)):cn(e),a=mo(n,i=>kr(i.categoryMatches));this.tokenMatcher=a?h2:rf,nf(cn(this.tokensMap))}defineRule(e,r,n){if(this.selfAnalysisDone)throw Error(`Grammar rule <${e}> may not be defined after the 'performSelfAnalysis' method has been called' -Make sure that all grammar rule definitions are done before 'performSelfAnalysis' is called.`);let a=Mt(n,"resyncEnabled")?n.resyncEnabled:w2.resyncEnabled,i=Mt(n,"recoveryValueFunc")?n.recoveryValueFunc:w2.recoveryValueFunc,s=this.ruleShortNameIdx<<12;this.ruleShortNameIdx++,this.shortRuleNameToFull[s]=e,this.fullRuleNameToShort[e]=s;let o;return this.outputCst===!0?o=function(...h){try{this.ruleInvocationStateUpdate(s,e,this.subruleIdx),r.apply(this,h);let f=this.CST_STACK[this.CST_STACK.length-1];return this.cstPostRule(f),f}catch(f){return this.invokeRuleCatch(f,a,i)}finally{this.ruleFinallyStateUpdate()}}:o=function(...h){try{return this.ruleInvocationStateUpdate(s,e,this.subruleIdx),r.apply(this,h)}catch(f){return this.invokeRuleCatch(f,a,i)}finally{this.ruleFinallyStateUpdate()}},Object.assign(o,{ruleName:e,originalGrammarAction:r})}invokeRuleCatch(e,r,n){let a=this.RULE_STACK.length===1,i=r&&!this.isBackTracking()&&this.recoveryEnabled;if(x0(e)){let s=e;if(i){let o=this.findReSyncTokenType();if(this.isInCurrentRuleReSyncSet(o))if(s.resyncedTokens=this.reSyncTo(o),this.outputCst){let l=this.CST_STACK[this.CST_STACK.length-1];return l.recoveredNode=!0,l}else return n(e);else{if(this.outputCst){let l=this.CST_STACK[this.CST_STACK.length-1];l.recoveredNode=!0,s.partialCstResult=l}throw s}}else{if(a)return this.moveToTerminatedState(),n(e);throw s}}else throw e}optionInternal(e,r){let n=this.getKeyForAutomaticLookahead(512,r);return this.optionInternalLogic(e,r,n)}optionInternalLogic(e,r,n){let a=this.getLaFuncFromCache(n),i;if(typeof e!="function"){i=e.DEF;let s=e.GATE;if(s!==void 0){let o=a;a=()=>s.call(this)&&o.call(this)}}else i=e;if(a.call(this)===!0)return i.call(this)}atLeastOneInternal(e,r){let n=this.getKeyForAutomaticLookahead(1024,e);return this.atLeastOneInternalLogic(e,r,n)}atLeastOneInternalLogic(e,r,n){let a=this.getLaFuncFromCache(n),i;if(typeof r!="function"){i=r.DEF;let s=r.GATE;if(s!==void 0){let o=a;a=()=>s.call(this)&&o.call(this)}}else i=r;if(a.call(this)===!0){let s=this.doSingleRepetition(i);for(;a.call(this)===!0&&s===!0;)s=this.doSingleRepetition(i)}else throw this.raiseEarlyExitException(e,Yn.REPETITION_MANDATORY,r.ERR_MSG);this.attemptInRepetitionRecovery(this.atLeastOneInternal,[e,r],a,1024,e,C7)}atLeastOneSepFirstInternal(e,r){let n=this.getKeyForAutomaticLookahead(1536,e);this.atLeastOneSepFirstInternalLogic(e,r,n)}atLeastOneSepFirstInternalLogic(e,r,n){let a=r.DEF,i=r.SEP;if(this.getLaFuncFromCache(n).call(this)===!0){a.call(this);let o=()=>this.tokenMatcher(this.LA(1),i);for(;this.tokenMatcher(this.LA(1),i)===!0;)this.CONSUME(i),a.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[e,i,o,a,W5],o,1536,e,W5)}else throw this.raiseEarlyExitException(e,Yn.REPETITION_MANDATORY_WITH_SEPARATOR,r.ERR_MSG)}manyInternal(e,r){let n=this.getKeyForAutomaticLookahead(768,e);return this.manyInternalLogic(e,r,n)}manyInternalLogic(e,r,n){let a=this.getLaFuncFromCache(n),i;if(typeof r!="function"){i=r.DEF;let o=r.GATE;if(o!==void 0){let l=a;a=()=>o.call(this)&&l.call(this)}}else i=r;let s=!0;for(;a.call(this)===!0&&s===!0;)s=this.doSingleRepetition(i);this.attemptInRepetitionRecovery(this.manyInternal,[e,r],a,768,e,E7,s)}manySepFirstInternal(e,r){let n=this.getKeyForAutomaticLookahead(1280,e);this.manySepFirstInternalLogic(e,r,n)}manySepFirstInternalLogic(e,r,n){let a=r.DEF,i=r.SEP;if(this.getLaFuncFromCache(n).call(this)===!0){a.call(this);let o=()=>this.tokenMatcher(this.LA(1),i);for(;this.tokenMatcher(this.LA(1),i)===!0;)this.CONSUME(i),a.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[e,i,o,a,H5],o,1280,e,H5)}}repetitionSepSecondInternal(e,r,n,a,i){for(;n();)this.CONSUME(r),a.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[e,r,n,a,i],n,1536,e,i)}doSingleRepetition(e){let r=this.getLexerPosition();return e.call(this),this.getLexerPosition()>r}orInternal(e,r){let n=this.getKeyForAutomaticLookahead(256,r),a=Bt(e)?e:e.DEF,s=this.getLaFuncFromCache(n).call(this,a);if(s!==void 0)return a[s].ALT.call(this);this.raiseNoAltException(r,e.ERR_MSG)}ruleFinallyStateUpdate(){if(this.RULE_STACK.pop(),this.RULE_OCCURRENCE_STACK.pop(),this.cstFinallyStateUpdate(),this.RULE_STACK.length===0&&this.isAtEndOfInput()===!1){let e=this.LA(1),r=this.errorMessageProvider.buildNotAllInputParsedMessage({firstRedundant:e,ruleName:this.getCurrRuleFullName()});this.SAVE_ERROR(new Q5(r,e))}}subruleInternal(e,r,n){let a;try{let i=n!==void 0?n.ARGS:void 0;return this.subruleIdx=r,a=e.apply(this,i),this.cstPostNonTerminal(a,n!==void 0&&n.LABEL!==void 0?n.LABEL:e.ruleName),a}catch(i){throw this.subruleInternalError(i,n,e.ruleName)}}subruleInternalError(e,r,n){throw x0(e)&&e.partialCstResult!==void 0&&(this.cstPostNonTerminal(e.partialCstResult,r!==void 0&&r.LABEL!==void 0?r.LABEL:n),delete e.partialCstResult),e}consumeInternal(e,r,n){let a;try{let i=this.LA(1);this.tokenMatcher(i,e)===!0?(this.consumeToken(),a=i):this.consumeInternalError(e,i,n)}catch(i){a=this.consumeInternalRecovery(e,r,i)}return this.cstPostTerminal(n!==void 0&&n.LABEL!==void 0?n.LABEL:e.name,a),a}consumeInternalError(e,r,n){let a,i=this.LA(0);throw n!==void 0&&n.ERR_MSG?a=n.ERR_MSG:a=this.errorMessageProvider.buildMismatchTokenMessage({expected:e,actual:r,previous:i,ruleName:this.getCurrRuleFullName()}),this.SAVE_ERROR(new Rm(a,r,i))}consumeInternalRecovery(e,r,n){if(this.recoveryEnabled&&n.name==="MismatchedTokenException"&&!this.isBackTracking()){let a=this.getFollowsForInRuleRecovery(e,r);try{return this.tryInRuleRecovery(e,a)}catch(i){throw i.name===z$?n:i}}else throw n}saveRecogState(){let e=this.errors,r=An(this.RULE_STACK);return{errors:e,lexerState:this.exportLexerState(),RULE_STACK:r,CST_STACK:this.CST_STACK}}reloadRecogState(e){this.errors=e.errors,this.importLexerState(e.lexerState),this.RULE_STACK=e.RULE_STACK}ruleInvocationStateUpdate(e,r,n){this.RULE_OCCURRENCE_STACK.push(n),this.RULE_STACK.push(e),this.cstInvocationStateUpdate(r)}isBackTracking(){return this.isBackTrackingStack.length!==0}getCurrRuleFullName(){let e=this.getLastExplicitRuleShortName();return this.shortRuleNameToFull[e]}shortRuleNameToFullName(e){return this.shortRuleNameToFull[e]}isAtEndOfInput(){return this.tokenMatcher(this.LA(1),Yo)}reset(){this.resetLexerState(),this.subruleIdx=0,this.isBackTrackingStack=[],this.errors=[],this.RULE_STACK=[],this.CST_STACK=[],this.RULE_OCCURRENCE_STACK=[]}}});var V7,U6e=A(()=>{x2();hn();v2();bo();V7=class{initErrorHandler(e){this._errors=[],this.errorMessageProvider=Mt(e,"errorMessageProvider")?e.errorMessageProvider:Bs.errorMessageProvider}SAVE_ERROR(e){if(x0(e))return e.context={ruleStack:this.getHumanReadableRuleStack(),ruleOccurrenceStack:An(this.RULE_OCCURRENCE_STACK)},this._errors.push(e),e;throw Error("Trying to save an Error which is not a RecognitionException")}get errors(){return An(this._errors)}set errors(e){this._errors=e}raiseEarlyExitException(e,r,n){let a=this.getCurrRuleFullName(),i=this.getGAstProductions()[a],o=g2(e,i,r,this.maxLookahead)[0],l=[];for(let h=1;h<=this.maxLookahead;h++)l.push(this.LA(h));let u=this.errorMessageProvider.buildEarlyExitMessage({expectedIterationPaths:o,actual:l,previous:this.LA(0),customUserDescription:n,ruleName:a});throw this.SAVE_ERROR(new J5(u,this.LA(1),this.LA(0)))}raiseNoAltException(e,r){let n=this.getCurrRuleFullName(),a=this.getGAstProductions()[n],i=m2(e,a,this.maxLookahead),s=[];for(let u=1;u<=this.maxLookahead;u++)s.push(this.LA(u));let o=this.LA(0),l=this.errorMessageProvider.buildNoViableAltMessage({expectedPathsPerAlt:i,actual:s,previous:o,customUserDescription:r,ruleName:this.getCurrRuleFullName()});throw this.SAVE_ERROR(new Z5(l,this.LA(1),o))}}});var H7,q6e=A(()=>{Y5();hn();H7=class{initContentAssist(){}computeContentAssist(e,r){let n=this.gastProductionsCache[e];if(ls(n))throw Error(`Rule ->${e}<- does not exist in this grammar.`);return _7([n],r,this.tokenMatcher,this.maxLookahead)}getNextPossibleTokenTypes(e){let r=bi(e.ruleStack),a=this.getGAstProductions()[r];return new T7(a,e).startWalking()}}});function tw(t,e,r,n=!1){Y7(r);let a=Bc(this.recordingProdStack),i=Ls(e)?e:e.DEF,s=new t({definition:[],idx:r});return n&&(s.separator=e.SEP),Mt(e,"MAX_LOOKAHEAD")&&(s.maxLookahead=e.MAX_LOOKAHEAD),this.recordingProdStack.push(s),i.call(this),a.definition.push(s),this.recordingProdStack.pop(),X7}function Bgt(t,e){Y7(e);let r=Bc(this.recordingProdStack),n=Bt(t)===!1,a=n===!1?t:t.DEF,i=new bn({definition:[],idx:e,ignoreAmbiguities:n&&t.IGNORE_AMBIGUITIES===!0});Mt(t,"MAX_LOOKAHEAD")&&(i.maxLookahead=t.MAX_LOOKAHEAD);let s=Dz(a,o=>Ls(o.GATE));return i.hasPredicates=s,r.definition.push(i),Nt(a,o=>{let l=new Ln({definition:[]});i.definition.push(l),Mt(o,"IGNORE_AMBIGUITIES")?l.ignoreAmbiguities=o.IGNORE_AMBIGUITIES:Mt(o,"GATE")&&(l.ignoreAmbiguities=!0),this.recordingProdStack.push(l),o.ALT.call(this),this.recordingProdStack.pop()}),X7}function W6e(t){return t===0?"":`${t}`}function Y7(t){if(t<0||t>H6e){let e=new Error(`Invalid DSL Method idx value: <${t}> - Idx value must be a none negative value smaller than ${H6e+1}`);throw e.KNOWN_RECORDER_ERROR=!0,e}}var X7,V6e,H6e,Y6e,X6e,Pgt,W7,j6e=A(()=>{hn();Ps();U5();Am();Lm();bo();M7();X7={description:"This Object indicates the Parser is during Recording Phase"};Object.freeze(X7);V6e=!0,H6e=Math.pow(2,8)-1,Y6e=y0({name:"RECORDING_PHASE_TOKEN",pattern:Wn.NA});nf([Y6e]);X6e=sf(Y6e,`This IToken indicates the Parser is in Recording Phase - See: https://chevrotain.io/docs/guide/internals.html#grammar-recording for details`,-1,-1,-1,-1,-1,-1);Object.freeze(X6e);Pgt={name:`This CSTNode indicates the Parser is in Recording Phase - See: https://chevrotain.io/docs/guide/internals.html#grammar-recording for details`,children:{}},W7=class{initGastRecorder(e){this.recordingProdStack=[],this.RECORDING_PHASE=!1}enableRecording(){this.RECORDING_PHASE=!0,this.TRACE_INIT("Enable Recording",()=>{for(let e=0;e<10;e++){let r=e>0?e:"";this[`CONSUME${r}`]=function(n,a){return this.consumeInternalRecord(n,e,a)},this[`SUBRULE${r}`]=function(n,a){return this.subruleInternalRecord(n,e,a)},this[`OPTION${r}`]=function(n){return this.optionInternalRecord(n,e)},this[`OR${r}`]=function(n){return this.orInternalRecord(n,e)},this[`MANY${r}`]=function(n){this.manyInternalRecord(e,n)},this[`MANY_SEP${r}`]=function(n){this.manySepFirstInternalRecord(e,n)},this[`AT_LEAST_ONE${r}`]=function(n){this.atLeastOneInternalRecord(e,n)},this[`AT_LEAST_ONE_SEP${r}`]=function(n){this.atLeastOneSepFirstInternalRecord(e,n)}}this.consume=function(e,r,n){return this.consumeInternalRecord(r,e,n)},this.subrule=function(e,r,n){return this.subruleInternalRecord(r,e,n)},this.option=function(e,r){return this.optionInternalRecord(r,e)},this.or=function(e,r){return this.orInternalRecord(r,e)},this.many=function(e,r){this.manyInternalRecord(e,r)},this.atLeastOne=function(e,r){this.atLeastOneInternalRecord(e,r)},this.ACTION=this.ACTION_RECORD,this.BACKTRACK=this.BACKTRACK_RECORD,this.LA=this.LA_RECORD})}disableRecording(){this.RECORDING_PHASE=!1,this.TRACE_INIT("Deleting Recording methods",()=>{let e=this;for(let r=0;r<10;r++){let n=r>0?r:"";delete e[`CONSUME${n}`],delete e[`SUBRULE${n}`],delete e[`OPTION${n}`],delete e[`OR${n}`],delete e[`MANY${n}`],delete e[`MANY_SEP${n}`],delete e[`AT_LEAST_ONE${n}`],delete e[`AT_LEAST_ONE_SEP${n}`]}delete e.consume,delete e.subrule,delete e.option,delete e.or,delete e.many,delete e.atLeastOne,delete e.ACTION,delete e.BACKTRACK,delete e.LA})}ACTION_RECORD(e){}BACKTRACK_RECORD(e,r){return()=>!0}LA_RECORD(e){return b2}topLevelRuleRecord(e,r){try{let n=new Ms({definition:[],name:e});return n.name=e,this.recordingProdStack.push(n),r.call(this),this.recordingProdStack.pop(),n}catch(n){if(n.KNOWN_RECORDER_ERROR!==!0)try{n.message=n.message+` + For Further details.`)}if(lr(e))this.tokensMap=Aa(e,(a,s)=>(a[s.name]=s,a),{});else if(sr(e,"modes")&&sl(Ua(Wn(e.modes)),wke)){let a=Ua(Wn(e.modes)),s=rx(a);this.tokensMap=Aa(s,(o,l)=>(o[l.name]=l,o),{})}else if(Ui(e))this.tokensMap=ci(e);else throw new Error(" argument must be An Array of Token constructors, A dictionary of Token constructors or an IMultiModeLexerDefinition");this.tokensMap.EOF=Gl;let n=sr(e,"modes")?Ua(Wn(e.modes)):Wn(e),i=sl(n,a=>Xr(a.categoryMatches));this.tokenMatcher=i?Ex:lf,uf(Wn(this.tokensMap))}defineRule(e,r,n){if(this.selfAnalysisDone)throw Error(`Grammar rule <${e}> may not be defined after the 'performSelfAnalysis' method has been called' +Make sure that all grammar rule definitions are done before 'performSelfAnalysis' is called.`);let i=sr(n,"resyncEnabled")?n.resyncEnabled:Nx.resyncEnabled,a=sr(n,"recoveryValueFunc")?n.recoveryValueFunc:Nx.recoveryValueFunc,s=this.ruleShortNameIdx<<12;this.ruleShortNameIdx++,this.shortRuleNameToFull[s]=e,this.fullRuleNameToShort[e]=s;let o;return this.outputCst===!0?o=function(...h){try{this.ruleInvocationStateUpdate(s,e,this.subruleIdx),r.apply(this,h);let f=this.CST_STACK[this.CST_STACK.length-1];return this.cstPostRule(f),f}catch(f){return this.invokeRuleCatch(f,i,a)}finally{this.ruleFinallyStateUpdate()}}:o=function(...h){try{return this.ruleInvocationStateUpdate(s,e,this.subruleIdx),r.apply(this,h)}catch(f){return this.invokeRuleCatch(f,i,a)}finally{this.ruleFinallyStateUpdate()}},Object.assign(o,{ruleName:e,originalGrammarAction:r})}invokeRuleCatch(e,r,n){let i=this.RULE_STACK.length===1,a=r&&!this.isBackTracking()&&this.recoveryEnabled;if(_p(e)){let s=e;if(a){let o=this.findReSyncTokenType();if(this.isInCurrentRuleReSyncSet(o))if(s.resyncedTokens=this.reSyncTo(o),this.outputCst){let l=this.CST_STACK[this.CST_STACK.length-1];return l.recoveredNode=!0,l}else return n(e);else{if(this.outputCst){let l=this.CST_STACK[this.CST_STACK.length-1];l.recoveredNode=!0,s.partialCstResult=l}throw s}}else{if(i)return this.moveToTerminatedState(),n(e);throw s}}else throw e}optionInternal(e,r){let n=this.getKeyForAutomaticLookahead(512,r);return this.optionInternalLogic(e,r,n)}optionInternalLogic(e,r,n){let i=this.getLaFuncFromCache(n),a;if(typeof e!="function"){a=e.DEF;let s=e.GATE;if(s!==void 0){let o=i;i=()=>s.call(this)&&o.call(this)}}else a=e;if(i.call(this)===!0)return a.call(this)}atLeastOneInternal(e,r){let n=this.getKeyForAutomaticLookahead(1024,e);return this.atLeastOneInternalLogic(e,r,n)}atLeastOneInternalLogic(e,r,n){let i=this.getLaFuncFromCache(n),a;if(typeof r!="function"){a=r.DEF;let s=r.GATE;if(s!==void 0){let o=i;i=()=>s.call(this)&&o.call(this)}}else a=r;if(i.call(this)===!0){let s=this.doSingleRepetition(a);for(;i.call(this)===!0&&s===!0;)s=this.doSingleRepetition(a)}else throw this.raiseEarlyExitException(e,Di.REPETITION_MANDATORY,r.ERR_MSG);this.attemptInRepetitionRecovery(this.atLeastOneInternal,[e,r],i,1024,e,aA)}atLeastOneSepFirstInternal(e,r){let n=this.getKeyForAutomaticLookahead(1536,e);this.atLeastOneSepFirstInternalLogic(e,r,n)}atLeastOneSepFirstInternalLogic(e,r,n){let i=r.DEF,a=r.SEP;if(this.getLaFuncFromCache(n).call(this)===!0){i.call(this);let o=()=>this.tokenMatcher(this.LA(1),a);for(;this.tokenMatcher(this.LA(1),a)===!0;)this.CONSUME(a),i.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[e,a,o,i,u7],o,1536,e,u7)}else throw this.raiseEarlyExitException(e,Di.REPETITION_MANDATORY_WITH_SEPARATOR,r.ERR_MSG)}manyInternal(e,r){let n=this.getKeyForAutomaticLookahead(768,e);return this.manyInternalLogic(e,r,n)}manyInternalLogic(e,r,n){let i=this.getLaFuncFromCache(n),a;if(typeof r!="function"){a=r.DEF;let o=r.GATE;if(o!==void 0){let l=i;i=()=>o.call(this)&&l.call(this)}}else a=r;let s=!0;for(;i.call(this)===!0&&s===!0;)s=this.doSingleRepetition(a);this.attemptInRepetitionRecovery(this.manyInternal,[e,r],i,768,e,iA,s)}manySepFirstInternal(e,r){let n=this.getKeyForAutomaticLookahead(1280,e);this.manySepFirstInternalLogic(e,r,n)}manySepFirstInternalLogic(e,r,n){let i=r.DEF,a=r.SEP;if(this.getLaFuncFromCache(n).call(this)===!0){i.call(this);let o=()=>this.tokenMatcher(this.LA(1),a);for(;this.tokenMatcher(this.LA(1),a)===!0;)this.CONSUME(a),i.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[e,a,o,i,l7],o,1280,e,l7)}}repetitionSepSecondInternal(e,r,n,i,a){for(;n();)this.CONSUME(r),i.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[e,r,n,i,a],n,1536,e,a)}doSingleRepetition(e){let r=this.getLexerPosition();return e.call(this),this.getLexerPosition()>r}orInternal(e,r){let n=this.getKeyForAutomaticLookahead(256,r),i=lr(e)?e:e.DEF,s=this.getLaFuncFromCache(n).call(this,i);if(s!==void 0)return i[s].ALT.call(this);this.raiseNoAltException(r,e.ERR_MSG)}ruleFinallyStateUpdate(){if(this.RULE_STACK.pop(),this.RULE_OCCURRENCE_STACK.pop(),this.cstFinallyStateUpdate(),this.RULE_STACK.length===0&&this.isAtEndOfInput()===!1){let e=this.LA(1),r=this.errorMessageProvider.buildNotAllInputParsedMessage({firstRedundant:e,ruleName:this.getCurrRuleFullName()});this.SAVE_ERROR(new m7(r,e))}}subruleInternal(e,r,n){let i;try{let a=n!==void 0?n.ARGS:void 0;return this.subruleIdx=r,i=e.apply(this,a),this.cstPostNonTerminal(i,n!==void 0&&n.LABEL!==void 0?n.LABEL:e.ruleName),i}catch(a){throw this.subruleInternalError(a,n,e.ruleName)}}subruleInternalError(e,r,n){throw _p(e)&&e.partialCstResult!==void 0&&(this.cstPostNonTerminal(e.partialCstResult,r!==void 0&&r.LABEL!==void 0?r.LABEL:n),delete e.partialCstResult),e}consumeInternal(e,r,n){let i;try{let a=this.LA(1);this.tokenMatcher(a,e)===!0?(this.consumeToken(),i=a):this.consumeInternalError(e,a,n)}catch(a){i=this.consumeInternalRecovery(e,r,a)}return this.cstPostTerminal(n!==void 0&&n.LABEL!==void 0?n.LABEL:e.name,i),i}consumeInternalError(e,r,n){let i,a=this.LA(0);throw n!==void 0&&n.ERR_MSG?i=n.ERR_MSG:i=this.errorMessageProvider.buildMismatchTokenMessage({expected:e,actual:r,previous:a,ruleName:this.getCurrRuleFullName()}),this.SAVE_ERROR(new zm(i,r,a))}consumeInternalRecovery(e,r,n){if(this.recoveryEnabled&&n.name==="MismatchedTokenException"&&!this.isBackTracking()){let i=this.getFollowsForInRuleRecovery(e,r);try{return this.tryInRuleRecovery(e,i)}catch(a){throw a.name===Zq?n:a}}else throw n}saveRecogState(){let e=this.errors,r=ci(this.RULE_STACK);return{errors:e,lexerState:this.exportLexerState(),RULE_STACK:r,CST_STACK:this.CST_STACK}}reloadRecogState(e){this.errors=e.errors,this.importLexerState(e.lexerState),this.RULE_STACK=e.RULE_STACK}ruleInvocationStateUpdate(e,r,n){this.RULE_OCCURRENCE_STACK.push(n),this.RULE_STACK.push(e),this.cstInvocationStateUpdate(r)}isBackTracking(){return this.isBackTrackingStack.length!==0}getCurrRuleFullName(){let e=this.getLastExplicitRuleShortName();return this.shortRuleNameToFull[e]}shortRuleNameToFullName(e){return this.shortRuleNameToFull[e]}isAtEndOfInput(){return this.tokenMatcher(this.LA(1),Gl)}reset(){this.resetLexerState(),this.subruleIdx=0,this.isBackTrackingStack=[],this.errors=[],this.RULE_STACK=[],this.CST_STACK=[],this.RULE_OCCURRENCE_STACK=[]}}});var EA,pTe=D(()=>{Ix();Yn();Rx();hl();EA=class{initErrorHandler(e){this._errors=[],this.errorMessageProvider=sr(e,"errorMessageProvider")?e.errorMessageProvider:Ao.errorMessageProvider}SAVE_ERROR(e){if(_p(e))return e.context={ruleStack:this.getHumanReadableRuleStack(),ruleOccurrenceStack:ci(this.RULE_OCCURRENCE_STACK)},this._errors.push(e),e;throw Error("Trying to save an Error which is not a RecognitionException")}get errors(){return ci(this._errors)}set errors(e){this._errors=e}raiseEarlyExitException(e,r,n){let i=this.getCurrRuleFullName(),a=this.getGAstProductions()[i],o=Lx(e,a,r,this.maxLookahead)[0],l=[];for(let h=1;h<=this.maxLookahead;h++)l.push(this.LA(h));let u=this.errorMessageProvider.buildEarlyExitMessage({expectedIterationPaths:o,actual:l,previous:this.LA(0),customUserDescription:n,ruleName:i});throw this.SAVE_ERROR(new g7(u,this.LA(1),this.LA(0)))}raiseNoAltException(e,r){let n=this.getCurrRuleFullName(),i=this.getGAstProductions()[n],a=Ax(e,i,this.maxLookahead),s=[];for(let u=1;u<=this.maxLookahead;u++)s.push(this.LA(u));let o=this.LA(0),l=this.errorMessageProvider.buildNoViableAltMessage({expectedPathsPerAlt:a,actual:s,previous:o,customUserDescription:r,ruleName:this.getCurrRuleFullName()});throw this.SAVE_ERROR(new p7(l,this.LA(1),o))}}});var SA,mTe=D(()=>{c7();Yn();SA=class{initContentAssist(){}computeContentAssist(e,r){let n=this.gastProductionsCache[e];if(Ks(n))throw Error(`Rule ->${e}<- does not exist in this grammar.`);return oA([n],r,this.tokenMatcher,this.maxLookahead)}getNextPossibleTokenTypes(e){let r=fs(e.ruleStack),i=this.getGAstProductions()[r];return new nA(i,e).startWalking()}}});function v7(t,e,r,n=!1){_A(r);let i=$0(this.recordingProdStack),a=bo(e)?e:e.DEF,s=new t({definition:[],idx:r});return n&&(s.separator=e.SEP),sr(e,"MAX_LOOKAHEAD")&&(s.maxLookahead=e.MAX_LOOKAHEAD),this.recordingProdStack.push(s),a.call(this),i.definition.push(s),this.recordingProdStack.pop(),AA}function pxt(t,e){_A(e);let r=$0(this.recordingProdStack),n=lr(t)===!1,i=n===!1?t:t.DEF,a=new ii({definition:[],idx:e,ignoreAmbiguities:n&&t.IGNORE_AMBIGUITIES===!0});sr(t,"MAX_LOOKAHEAD")&&(a.maxLookahead=t.MAX_LOOKAHEAD);let s=HG(i,o=>bo(o.GATE));return a.hasPredicates=s,r.definition.push(a),ar(i,o=>{let l=new hi({definition:[]});a.definition.push(l),sr(o,"IGNORE_AMBIGUITIES")?l.ignoreAmbiguities=o.IGNORE_AMBIGUITIES:sr(o,"GATE")&&(l.ignoreAmbiguities=!0),this.recordingProdStack.push(l),o.ALT.call(this),this.recordingProdStack.pop()}),AA}function vTe(t){return t===0?"":`${t}`}function _A(t){if(t<0||t>yTe){let e=new Error(`Invalid DSL Method idx value: <${t}> + Idx value must be a none negative value smaller than ${yTe+1}`);throw e.KNOWN_RECORDER_ERROR=!0,e}}var AA,gTe,yTe,xTe,bTe,dxt,CA,wTe=D(()=>{Yn();_o();a7();Bm();Fm();hl();pA();AA={description:"This Object indicates the Parser is during Recording Phase"};Object.freeze(AA);gTe=!0,yTe=Math.pow(2,8)-1,xTe=Cp({name:"RECORDING_PHASE_TOKEN",pattern:Ri.NA});uf([xTe]);bTe=hf(xTe,`This IToken indicates the Parser is in Recording Phase + See: https://chevrotain.io/docs/guide/internals.html#grammar-recording for details`,-1,-1,-1,-1,-1,-1);Object.freeze(bTe);dxt={name:`This CSTNode indicates the Parser is in Recording Phase + See: https://chevrotain.io/docs/guide/internals.html#grammar-recording for details`,children:{}},CA=class{initGastRecorder(e){this.recordingProdStack=[],this.RECORDING_PHASE=!1}enableRecording(){this.RECORDING_PHASE=!0,this.TRACE_INIT("Enable Recording",()=>{for(let e=0;e<10;e++){let r=e>0?e:"";this[`CONSUME${r}`]=function(n,i){return this.consumeInternalRecord(n,e,i)},this[`SUBRULE${r}`]=function(n,i){return this.subruleInternalRecord(n,e,i)},this[`OPTION${r}`]=function(n){return this.optionInternalRecord(n,e)},this[`OR${r}`]=function(n){return this.orInternalRecord(n,e)},this[`MANY${r}`]=function(n){this.manyInternalRecord(e,n)},this[`MANY_SEP${r}`]=function(n){this.manySepFirstInternalRecord(e,n)},this[`AT_LEAST_ONE${r}`]=function(n){this.atLeastOneInternalRecord(e,n)},this[`AT_LEAST_ONE_SEP${r}`]=function(n){this.atLeastOneSepFirstInternalRecord(e,n)}}this.consume=function(e,r,n){return this.consumeInternalRecord(r,e,n)},this.subrule=function(e,r,n){return this.subruleInternalRecord(r,e,n)},this.option=function(e,r){return this.optionInternalRecord(r,e)},this.or=function(e,r){return this.orInternalRecord(r,e)},this.many=function(e,r){this.manyInternalRecord(e,r)},this.atLeastOne=function(e,r){this.atLeastOneInternalRecord(e,r)},this.ACTION=this.ACTION_RECORD,this.BACKTRACK=this.BACKTRACK_RECORD,this.LA=this.LA_RECORD})}disableRecording(){this.RECORDING_PHASE=!1,this.TRACE_INIT("Deleting Recording methods",()=>{let e=this;for(let r=0;r<10;r++){let n=r>0?r:"";delete e[`CONSUME${n}`],delete e[`SUBRULE${n}`],delete e[`OPTION${n}`],delete e[`OR${n}`],delete e[`MANY${n}`],delete e[`MANY_SEP${n}`],delete e[`AT_LEAST_ONE${n}`],delete e[`AT_LEAST_ONE_SEP${n}`]}delete e.consume,delete e.subrule,delete e.option,delete e.or,delete e.many,delete e.atLeastOne,delete e.ACTION,delete e.BACKTRACK,delete e.LA})}ACTION_RECORD(e){}BACKTRACK_RECORD(e,r){return()=>!0}LA_RECORD(e){return Mx}topLevelRuleRecord(e,r){try{let n=new So({definition:[],name:e});return n.name=e,this.recordingProdStack.push(n),r.call(this),this.recordingProdStack.pop(),n}catch(n){if(n.KNOWN_RECORDER_ERROR!==!0)try{n.message=n.message+` This error was thrown during the "grammar recording phase" For more info see: - https://chevrotain.io/docs/guide/internals.html#grammar-recording`}catch{throw n}throw n}}optionInternalRecord(e,r){return tw.call(this,tn,e,r)}atLeastOneInternalRecord(e,r){tw.call(this,Rn,r,e)}atLeastOneSepFirstInternalRecord(e,r){tw.call(this,In,r,e,V6e)}manyInternalRecord(e,r){tw.call(this,Ir,r,e)}manySepFirstInternalRecord(e,r){tw.call(this,xn,r,e,V6e)}orInternalRecord(e,r){return Bgt.call(this,e,r)}subruleInternalRecord(e,r,n){if(Y7(r),!e||Mt(e,"ruleName")===!1){let o=new Error(` argument is invalid expecting a Parser method reference but got: <${JSON.stringify(e)}> - inside top level rule: <${this.recordingProdStack[0].name}>`);throw o.KNOWN_RECORDER_ERROR=!0,o}let a=Bc(this.recordingProdStack),i=e.ruleName,s=new en({idx:r,nonTerminalName:i,label:n?.LABEL,referencedRule:void 0});return a.definition.push(s),this.outputCst?Pgt:X7}consumeInternalRecord(e,r,n){if(Y7(r),!_$(e)){let s=new Error(` argument is invalid expecting a TokenType reference but got: <${JSON.stringify(e)}> - inside top level rule: <${this.recordingProdStack[0].name}>`);throw s.KNOWN_RECORDER_ERROR=!0,s}let a=Bc(this.recordingProdStack),i=new vr({idx:r,terminalType:e,label:n?.LABEL});return a.definition.push(i),X6e}}});var j7,K6e=A(()=>{hn();Hy();bo();j7=class{initPerformanceTracer(e){if(Mt(e,"traceInitPerf")){let r=e.traceInitPerf,n=typeof r=="number";this.traceInitMaxIdent=n?r:1/0,this.traceInitPerf=n?r>0:r}else this.traceInitMaxIdent=0,this.traceInitPerf=Bs.traceInitPerf;this.traceInitIndent=-1}TRACE_INIT(e,r){if(this.traceInitPerf===!0){this.traceInitIndent++;let n=new Array(this.traceInitIndent+1).join(" ");this.traceInitIndent <${e}>`);let{time:a,value:i}=T5(r),s=a>10?console.warn:console.log;return this.traceInitIndent time: ${a}ms`),this.traceInitIndent--,i}else return r()}}});function Z6e(t,e){e.forEach(r=>{let n=r.prototype;Object.getOwnPropertyNames(n).forEach(a=>{if(a==="constructor")return;let i=Object.getOwnPropertyDescriptor(n,a);i&&(i.get||i.set)?Object.defineProperty(t.prototype,a,i):t.prototype[a]=r.prototype[a]})})}var Q6e=A(()=>{});function K7(t=void 0){return function(){return t}}var b2,Bs,w2,Ka,rw,nw,bo=A(()=>{hn();Hy();Awe();Lm();d2();E6e();$$();R6e();F6e();z6e();$6e();G6e();U6e();q6e();j6e();K6e();Q6e();K5();b2=sf(Yo,"",NaN,NaN,NaN,NaN,NaN,NaN);Object.freeze(b2);Bs=Object.freeze({recoveryEnabled:!1,maxLookahead:3,dynamicTokensEnabled:!1,outputCst:!0,errorMessageProvider:of,nodeLocationTracking:"none",traceInitPerf:!1,skipValidations:!1}),w2=Object.freeze({recoveryValueFunc:()=>{},resyncEnabled:!0});(function(t){t[t.INVALID_RULE_NAME=0]="INVALID_RULE_NAME",t[t.DUPLICATE_RULE_NAME=1]="DUPLICATE_RULE_NAME",t[t.INVALID_RULE_OVERRIDE=2]="INVALID_RULE_OVERRIDE",t[t.DUPLICATE_PRODUCTIONS=3]="DUPLICATE_PRODUCTIONS",t[t.UNRESOLVED_SUBRULE_REF=4]="UNRESOLVED_SUBRULE_REF",t[t.LEFT_RECURSION=5]="LEFT_RECURSION",t[t.NONE_LAST_EMPTY_ALT=6]="NONE_LAST_EMPTY_ALT",t[t.AMBIGUOUS_ALTS=7]="AMBIGUOUS_ALTS",t[t.CONFLICT_TOKENS_RULES_NAMESPACE=8]="CONFLICT_TOKENS_RULES_NAMESPACE",t[t.INVALID_TOKEN_NAME=9]="INVALID_TOKEN_NAME",t[t.NO_NON_EMPTY_LOOKAHEAD=10]="NO_NON_EMPTY_LOOKAHEAD",t[t.AMBIGUOUS_PREFIX_ALTS=11]="AMBIGUOUS_PREFIX_ALTS",t[t.TOO_MANY_ALTS=12]="TOO_MANY_ALTS",t[t.CUSTOM_LOOKAHEAD_VALIDATION=13]="CUSTOM_LOOKAHEAD_VALIDATION"})(Ka||(Ka={}));rw=class t{static performSelfAnalysis(e){throw Error("The **static** `performSelfAnalysis` method has been deprecated. \nUse the **instance** method with the same name instead.")}performSelfAnalysis(){this.TRACE_INIT("performSelfAnalysis",()=>{let e;this.selfAnalysisDone=!0;let r=this.className;this.TRACE_INIT("toFastProps",()=>{E5(this)}),this.TRACE_INIT("Grammar Recording",()=>{try{this.enableRecording(),Nt(this.definedRulesNames,a=>{let s=this[a].originalGrammarAction,o;this.TRACE_INIT(`${a} Rule`,()=>{o=this.topLevelRuleRecord(a,s)}),this.gastProductionsCache[a]=o})}finally{this.disableRecording()}});let n=[];if(this.TRACE_INIT("Grammar Resolving",()=>{n=k6e({rules:cn(this.gastProductionsCache)}),this.definitionErrors=this.definitionErrors.concat(n)}),this.TRACE_INIT("Grammar Validations",()=>{if(kr(n)&&this.skipValidations===!1){let a=T6e({rules:cn(this.gastProductionsCache),tokenTypes:cn(this.tokensMap),errMsgProvider:ku,grammarName:r}),i=m6e({lookaheadStrategy:this.lookaheadStrategy,rules:cn(this.gastProductionsCache),tokenTypes:cn(this.tokensMap),grammarName:r});this.definitionErrors=this.definitionErrors.concat(a,i)}}),kr(this.definitionErrors)&&(this.recoveryEnabled&&this.TRACE_INIT("computeAllProdsFollows",()=>{let a=_we(cn(this.gastProductionsCache));this.resyncFollows=a}),this.TRACE_INIT("ComputeLookaheadFunctions",()=>{var a,i;(i=(a=this.lookaheadStrategy).initialize)===null||i===void 0||i.call(a,{rules:cn(this.gastProductionsCache)}),this.preComputeLookaheadFunctions(cn(this.gastProductionsCache))})),!t.DEFER_DEFINITION_ERRORS_HANDLING&&!kr(this.definitionErrors))throw e=Rt(this.definitionErrors,a=>a.message),new Error(`Parser Definition Errors detected: + https://chevrotain.io/docs/guide/internals.html#grammar-recording`}catch{throw n}throw n}}optionInternalRecord(e,r){return v7.call(this,Nn,e,r)}atLeastOneInternalRecord(e,r){v7.call(this,fi,r,e)}atLeastOneSepFirstInternalRecord(e,r){v7.call(this,di,r,e,gTe)}manyInternalRecord(e,r){v7.call(this,sn,r,e)}manySepFirstInternalRecord(e,r){v7.call(this,ni,r,e,gTe)}orInternalRecord(e,r){return pxt.call(this,e,r)}subruleInternalRecord(e,r,n){if(_A(r),!e||sr(e,"ruleName")===!1){let o=new Error(` argument is invalid expecting a Parser method reference but got: <${JSON.stringify(e)}> + inside top level rule: <${this.recordingProdStack[0].name}>`);throw o.KNOWN_RECORDER_ERROR=!0,o}let i=$0(this.recordingProdStack),a=e.ruleName,s=new Mn({idx:r,nonTerminalName:a,label:n?.LABEL,referencedRule:void 0});return i.definition.push(s),this.outputCst?dxt:AA}consumeInternalRecord(e,r,n){if(_A(r),!zq(e)){let s=new Error(` argument is invalid expecting a TokenType reference but got: <${JSON.stringify(e)}> + inside top level rule: <${this.recordingProdStack[0].name}>`);throw s.KNOWN_RECORDER_ERROR=!0,s}let i=$0(this.recordingProdStack),a=new Ur({idx:r,terminalType:e,label:n?.LABEL});return i.definition.push(a),bTe}}});var LA,kTe=D(()=>{Yn();ix();hl();LA=class{initPerformanceTracer(e){if(sr(e,"traceInitPerf")){let r=e.traceInitPerf,n=typeof r=="number";this.traceInitMaxIdent=n?r:1/0,this.traceInitPerf=n?r>0:r}else this.traceInitMaxIdent=0,this.traceInitPerf=Ao.traceInitPerf;this.traceInitIndent=-1}TRACE_INIT(e,r){if(this.traceInitPerf===!0){this.traceInitIndent++;let n=new Array(this.traceInitIndent+1).join(" ");this.traceInitIndent <${e}>`);let{time:i,value:a}=$6(r),s=i>10?console.warn:console.log;return this.traceInitIndent time: ${i}ms`),this.traceInitIndent--,a}else return r()}}});function TTe(t,e){e.forEach(r=>{let n=r.prototype;Object.getOwnPropertyNames(n).forEach(i=>{if(i==="constructor")return;let a=Object.getOwnPropertyDescriptor(n,i);a&&(a.get||a.set)?Object.defineProperty(t.prototype,i,a):t.prototype[i]=r.prototype[i]})})}var ETe=D(()=>{});function RA(t=void 0){return function(){return t}}var Mx,Ao,Nx,Ha,x7,b7,hl=D(()=>{Yn();ix();eke();Fm();Cx();Kke();Qq();rTe();cTe();hTe();fTe();dTe();pTe();mTe();wTe();kTe();ETe();d7();Mx=hf(Gl,"",NaN,NaN,NaN,NaN,NaN,NaN);Object.freeze(Mx);Ao=Object.freeze({recoveryEnabled:!1,maxLookahead:3,dynamicTokensEnabled:!1,outputCst:!0,errorMessageProvider:ff,nodeLocationTracking:"none",traceInitPerf:!1,skipValidations:!1}),Nx=Object.freeze({recoveryValueFunc:()=>{},resyncEnabled:!0});(function(t){t[t.INVALID_RULE_NAME=0]="INVALID_RULE_NAME",t[t.DUPLICATE_RULE_NAME=1]="DUPLICATE_RULE_NAME",t[t.INVALID_RULE_OVERRIDE=2]="INVALID_RULE_OVERRIDE",t[t.DUPLICATE_PRODUCTIONS=3]="DUPLICATE_PRODUCTIONS",t[t.UNRESOLVED_SUBRULE_REF=4]="UNRESOLVED_SUBRULE_REF",t[t.LEFT_RECURSION=5]="LEFT_RECURSION",t[t.NONE_LAST_EMPTY_ALT=6]="NONE_LAST_EMPTY_ALT",t[t.AMBIGUOUS_ALTS=7]="AMBIGUOUS_ALTS",t[t.CONFLICT_TOKENS_RULES_NAMESPACE=8]="CONFLICT_TOKENS_RULES_NAMESPACE",t[t.INVALID_TOKEN_NAME=9]="INVALID_TOKEN_NAME",t[t.NO_NON_EMPTY_LOOKAHEAD=10]="NO_NON_EMPTY_LOOKAHEAD",t[t.AMBIGUOUS_PREFIX_ALTS=11]="AMBIGUOUS_PREFIX_ALTS",t[t.TOO_MANY_ALTS=12]="TOO_MANY_ALTS",t[t.CUSTOM_LOOKAHEAD_VALIDATION=13]="CUSTOM_LOOKAHEAD_VALIDATION"})(Ha||(Ha={}));x7=class t{static performSelfAnalysis(e){throw Error("The **static** `performSelfAnalysis` method has been deprecated. \nUse the **instance** method with the same name instead.")}performSelfAnalysis(){this.TRACE_INIT("performSelfAnalysis",()=>{let e;this.selfAnalysisDone=!0;let r=this.className;this.TRACE_INIT("toFastProps",()=>{G6(this)}),this.TRACE_INIT("Grammar Recording",()=>{try{this.enableRecording(),ar(this.definedRulesNames,i=>{let s=this[i].originalGrammarAction,o;this.TRACE_INIT(`${i} Rule`,()=>{o=this.topLevelRuleRecord(i,s)}),this.gastProductionsCache[i]=o})}finally{this.disableRecording()}});let n=[];if(this.TRACE_INIT("Grammar Resolving",()=>{n=Xke({rules:Wn(this.gastProductionsCache)}),this.definitionErrors=this.definitionErrors.concat(n)}),this.TRACE_INIT("Grammar Validations",()=>{if(Xr(n)&&this.skipValidations===!1){let i=jke({rules:Wn(this.gastProductionsCache),tokenTypes:Wn(this.tokensMap),errMsgProvider:wc,grammarName:r}),a=Gke({lookaheadStrategy:this.lookaheadStrategy,rules:Wn(this.gastProductionsCache),tokenTypes:Wn(this.tokensMap),grammarName:r});this.definitionErrors=this.definitionErrors.concat(i,a)}}),Xr(this.definitionErrors)&&(this.recoveryEnabled&&this.TRACE_INIT("computeAllProdsFollows",()=>{let i=Jwe(Wn(this.gastProductionsCache));this.resyncFollows=i}),this.TRACE_INIT("ComputeLookaheadFunctions",()=>{var i,a;(a=(i=this.lookaheadStrategy).initialize)===null||a===void 0||a.call(i,{rules:Wn(this.gastProductionsCache)}),this.preComputeLookaheadFunctions(Wn(this.gastProductionsCache))})),!t.DEFER_DEFINITION_ERRORS_HANDLING&&!Xr(this.definitionErrors))throw e=rr(this.definitionErrors,i=>i.message),new Error(`Parser Definition Errors detected: ${e.join(` ------------------------------- -`)}`)})}constructor(e,r){this.definitionErrors=[],this.selfAnalysisDone=!1;let n=this;if(n.initErrorHandler(r),n.initLexerAdapter(),n.initLooksAhead(r),n.initRecognizerEngine(e,r),n.initRecoverable(r),n.initTreeBuilder(r),n.initContentAssist(),n.initGastRecorder(r),n.initPerformanceTracer(r),Mt(r,"ignoredIssues"))throw new Error(`The IParserConfig property has been deprecated. +`)}`)})}constructor(e,r){this.definitionErrors=[],this.selfAnalysisDone=!1;let n=this;if(n.initErrorHandler(r),n.initLexerAdapter(),n.initLooksAhead(r),n.initRecognizerEngine(e,r),n.initRecoverable(r),n.initTreeBuilder(r),n.initContentAssist(),n.initGastRecorder(r),n.initPerformanceTracer(r),sr(r,"ignoredIssues"))throw new Error(`The IParserConfig property has been deprecated. Please use the flag on the relevant DSL method instead. See: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#IGNORING_AMBIGUITIES - For further details.`);this.skipValidations=Mt(r,"skipValidations")?r.skipValidations:Bs.skipValidations}};rw.DEFER_DEFINITION_ERRORS_HANDLING=!1;Z6e(rw,[D7,P7,$7,G7,q7,U7,V7,H7,W7,j7]);nw=class extends rw{constructor(e,r=Bs){let n=An(r);n.outputCst=!1,super(e,n)}}});var J6e=A(()=>{Ps()});var eke=A(()=>{});var tke=A(()=>{J6e();eke()});var rke=A(()=>{YF()});var b0=A(()=>{YF();bo();U5();Lm();v2();G$();d2();x2();A$();Ps();Ps();tke();rke()});function Im(t,e,r){return`${t.name}_${e}_${r}`}function ske(t){let e={decisionMap:{},decisionStates:[],ruleToStartState:new Map,ruleToStopState:new Map,states:[]};Vgt(e,t);let r=t.length;for(let n=0;noke(t,e,s));return C2(t,e,n,r,...a)}function Kgt(t,e,r){let n=ki(t,e,r,{type:w0});k0(t,n);let a=C2(t,e,n,r,Dm(t,e,r));return Zgt(t,e,r,a)}function Dm(t,e,r){let n=Gi(sr(r.definition,a=>oke(t,e,a)),a=>a!==void 0);return n.length===1?n[0]:n.length===0?void 0:Jgt(t,n)}function lke(t,e,r,n,a){let i=n.left,s=n.right,o=ki(t,e,r,{type:qgt});k0(t,o);let l=ki(t,e,r,{type:ike});return i.loopback=o,l.loopback=o,t.decisionMap[Im(e,a?"RepetitionMandatoryWithSeparator":"RepetitionMandatory",r.idx)]=o,Fa(s,o),a===void 0?(Fa(o,i),Fa(o,l)):(Fa(o,l),Fa(o,a.left),Fa(a.right,i)),{left:i,right:l}}function uke(t,e,r,n,a){let i=n.left,s=n.right,o=ki(t,e,r,{type:Ugt});k0(t,o);let l=ki(t,e,r,{type:ike}),u=ki(t,e,r,{type:Ggt});return o.loopback=u,l.loopback=u,Fa(o,i),Fa(o,l),Fa(s,u),a!==void 0?(Fa(u,l),Fa(u,a.left),Fa(a.right,i)):Fa(u,o),t.decisionMap[Im(e,a?"RepetitionWithSeparator":"Repetition",r.idx)]=o,{left:o,right:l}}function Zgt(t,e,r,n){let a=n.left,i=n.right;return Fa(a,i),t.decisionMap[Im(e,"Option",r.idx)]=a,n}function k0(t,e){return t.decisionStates.push(e),e.decision=t.decisionStates.length-1,e.decision}function C2(t,e,r,n,...a){let i=ki(t,e,n,{type:$gt,start:r});r.end=i;for(let o of a)o!==void 0?(Fa(r,o.left),Fa(o.right,i)):Fa(r,i);let s={left:r,right:i};return t.decisionMap[Im(e,Qgt(n),n.idx)]=r,s}function Qgt(t){if(t instanceof bn)return"Alternation";if(t instanceof tn)return"Option";if(t instanceof Ir)return"Repetition";if(t instanceof xn)return"RepetitionWithSeparator";if(t instanceof Rn)return"RepetitionMandatory";if(t instanceof In)return"RepetitionMandatoryWithSeparator";throw new Error("Invalid production type encountered")}function Jgt(t,e){let r=e.length;for(let i=0;i{av();tB();b0();w0=1,zgt=2,nke=4,ake=5,E2=7,$gt=8,Ggt=9,Ugt=10,qgt=11,ike=12,aw=class{constructor(e){this.target=e}isEpsilon(){return!1}},k2=class extends aw{constructor(e,r){super(e),this.tokenType=r}},iw=class extends aw{constructor(e){super(e)}isEpsilon(){return!0}},T2=class extends aw{constructor(e,r,n){super(e),this.rule=r,this.followState=n}isEpsilon(){return!0}}});function Q$(t,e=!0){return`${e?`a${t.alt}`:""}s${t.state.stateNumber}:${t.stack.map(r=>r.stateNumber.toString()).join("_")}`}var sw,S2,hke=A(()=>{av();sw={},S2=class{constructor(){this.map={},this.configs=[]}get size(){return this.configs.length}finalize(){this.map={}}add(e){let r=Q$(e);r in this.map||(this.map[r]=this.configs.length,this.configs.push(e))}get elements(){return this.configs}get alts(){return sr(this.configs,e=>e.alt)}get key(){let e="";for(let r in this.map)e+=r+":";return e}}});function n1t(t,e){let r={};return n=>{let a=n.toString(),i=r[a];return i!==void 0||(i={atnStartState:t,decision:e,states:{}},r[a]=i),i}}function dke(t,e=!0){let r=new Set;for(let n of t){let a=new Set;for(let i of n){if(i===void 0){if(e)break;return!1}let s=[i.tokenTypeIdx].concat(i.categoryMatches);for(let o of s)if(r.has(o)){if(!a.has(o))return!1}else r.add(o),a.add(o)}}return!0}function a1t(t){let e=t.decisionStates.length,r=Array(e);for(let n=0;naf(a)).join(", "),r=t.production.idx===0?"":t.production.idx,n=`Ambiguous Alternatives Detected: <${t.ambiguityIndices.join(", ")}> in <${u1t(t.production)}${r}> inside <${t.topLevelRule.name}> Rule, + For further details.`);this.skipValidations=sr(r,"skipValidations")?r.skipValidations:Ao.skipValidations}};x7.DEFER_DEFINITION_ERRORS_HANDLING=!1;TTe(x7,[fA,gA,bA,wA,TA,kA,EA,SA,CA,LA]);b7=class extends x7{constructor(e,r=Ao){let n=ci(r);n.outputCst=!1,super(e,n)}}});var STe=D(()=>{_o()});var CTe=D(()=>{});var _Te=D(()=>{STe();CTe()});var ATe=D(()=>{aG()});var Ap=D(()=>{aG();hl();a7();Fm();Rx();Jq();Cx();Ix();$q();_o();_o();_Te();ATe()});function $m(t,e,r){return`${t.name}_${e}_${r}`}function ITe(t){let e={decisionMap:{},decisionStates:[],ruleToStartState:new Map,ruleToStopState:new Map,states:[]};wxt(e,t);let r=t.length;for(let n=0;nMTe(t,e,s));return Fx(t,e,n,r,...i)}function _xt(t,e,r){let n=ps(t,e,r,{type:Lp});Rp(t,n);let i=Fx(t,e,n,r,Gm(t,e,r));return Axt(t,e,r,i)}function Gm(t,e,r){let n=Ds(Dr(r.definition,i=>MTe(t,e,i)),i=>i!==void 0);return n.length===1?n[0]:n.length===0?void 0:Rxt(t,n)}function NTe(t,e,r,n,i){let a=n.left,s=n.right,o=ps(t,e,r,{type:bxt});Rp(t,o);let l=ps(t,e,r,{type:DTe});return a.loopback=o,l.loopback=o,t.decisionMap[$m(e,i?"RepetitionMandatoryWithSeparator":"RepetitionMandatory",r.idx)]=o,La(s,o),i===void 0?(La(o,a),La(o,l)):(La(o,l),La(o,i.left),La(i.right,a)),{left:a,right:l}}function OTe(t,e,r,n,i){let a=n.left,s=n.right,o=ps(t,e,r,{type:xxt});Rp(t,o);let l=ps(t,e,r,{type:DTe}),u=ps(t,e,r,{type:vxt});return o.loopback=u,l.loopback=u,La(o,a),La(o,l),La(s,u),i!==void 0?(La(u,l),La(u,i.left),La(i.right,a)):La(u,o),t.decisionMap[$m(e,i?"RepetitionWithSeparator":"Repetition",r.idx)]=o,{left:o,right:l}}function Axt(t,e,r,n){let i=n.left,a=n.right;return La(i,a),t.decisionMap[$m(e,"Option",r.idx)]=i,n}function Rp(t,e){return t.decisionStates.push(e),e.decision=t.decisionStates.length-1,e.decision}function Fx(t,e,r,n,...i){let a=ps(t,e,n,{type:yxt,start:r});r.end=a;for(let o of i)o!==void 0?(La(r,o.left),La(o.right,a)):La(r,a);let s={left:r,right:a};return t.decisionMap[$m(e,Lxt(n),n.idx)]=r,s}function Lxt(t){if(t instanceof ii)return"Alternation";if(t instanceof Nn)return"Option";if(t instanceof sn)return"Repetition";if(t instanceof ni)return"RepetitionWithSeparator";if(t instanceof fi)return"RepetitionMandatory";if(t instanceof di)return"RepetitionMandatoryWithSeparator";throw new Error("Invalid production type encountered")}function Rxt(t,e){let r=e.length;for(let a=0;a{yy();dz();Ap();Lp=1,gxt=2,LTe=4,RTe=5,Bx=7,yxt=8,vxt=9,xxt=10,bxt=11,DTe=12,w7=class{constructor(e){this.target=e}isEpsilon(){return!1}},Ox=class extends w7{constructor(e,r){super(e),this.tokenType=r}},k7=class extends w7{constructor(e){super(e)}isEpsilon(){return!0}},Px=class extends w7{constructor(e,r,n){super(e),this.rule=r,this.followState=n}isEpsilon(){return!0}}});function cU(t,e=!0){return`${e?`a${t.alt}`:""}s${t.state.stateNumber}:${t.stack.map(r=>r.stateNumber.toString()).join("_")}`}var T7,zx,BTe=D(()=>{yy();T7={},zx=class{constructor(){this.map={},this.configs=[]}get size(){return this.configs.length}finalize(){this.map={}}add(e){let r=cU(e);r in this.map||(this.map[r]=this.configs.length,this.configs.push(e))}get elements(){return this.configs}get alts(){return Dr(this.configs,e=>e.alt)}get key(){let e="";for(let r in this.map)e+=r+":";return e}}});function Nxt(t,e){let r={};return n=>{let i=n.toString(),a=r[i];return a!==void 0||(a={atnStartState:t,decision:e,states:{}},r[i]=a),a}}function zTe(t,e=!0){let r=new Set;for(let n of t){let i=new Set;for(let a of n){if(a===void 0){if(e)break;return!1}let s=[a.tokenTypeIdx].concat(a.categoryMatches);for(let o of s)if(r.has(o)){if(!i.has(o))return!1}else r.add(o),i.add(o)}}return!0}function Oxt(t){let e=t.decisionStates.length,r=Array(e);for(let n=0;ncf(i)).join(", "),r=t.production.idx===0?"":t.production.idx,n=`Ambiguous Alternatives Detected: <${t.ambiguityIndices.join(", ")}> in <${$xt(t.production)}${r}> inside <${t.topLevelRule.name}> Rule, <${e}> may appears as a prefix path in all these alternatives. `;return n=n+`See: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#AMBIGUOUS_ALTERNATIVES -For Further details.`,n}function u1t(t){if(t instanceof en)return"SUBRULE";if(t instanceof tn)return"OPTION";if(t instanceof bn)return"OR";if(t instanceof Rn)return"AT_LEAST_ONE";if(t instanceof In)return"AT_LEAST_ONE_SEP";if(t instanceof xn)return"MANY_SEP";if(t instanceof Ir)return"MANY";if(t instanceof vr)return"CONSUME";throw Error("non exhaustive match")}function c1t(t,e,r){let n=Rde(e.configs.elements,i=>i.state.transitions),a=M0e(n.filter(i=>i instanceof k2).map(i=>i.tokenType),i=>i.tokenTypeIdx);return{actualToken:r,possibleTokenTypes:a,tokenPath:t}}function h1t(t,e){return t.edges[e.tokenTypeIdx]}function f1t(t,e,r){let n=new S2,a=[];for(let s of t.elements){if(r.is(s.alt)===!1)continue;if(s.state.type===E2){a.push(s);continue}let o=s.state.transitions.length;for(let l=0;l0&&!v1t(i))for(let s of a)i.add(s);return i}function d1t(t,e){if(t instanceof k2&&V5(e,t.tokenType))return t.target}function p1t(t,e){let r;for(let n of t.elements)if(e.is(n.alt)===!0){if(r===void 0)r=n.alt;else if(r!==n.alt)return}return r}function mke(t){return{configs:t,edges:{},isAcceptState:!1,prediction:-1}}function pke(t,e,r,n){return n=gke(t,n),e.edges[r.tokenTypeIdx]=n,n}function gke(t,e){if(e===sw)return e;let r=e.configs.key,n=t.states[r];return n!==void 0?n:(e.configs.finalize(),t.states[r]=e,e)}function m1t(t){let e=new S2,r=t.transitions.length;for(let n=0;n0){let a=[...t.stack],s={state:a.pop(),alt:t.alt,stack:a};Q7(s,e)}else e.add(t);return}r.epsilonOnlyTransitions||e.add(t);let n=r.transitions.length;for(let a=0;a1)return!0;return!1}function k1t(t){for(let e of Array.from(t.values()))if(Object.keys(e).length===1)return!0;return!1}var Z7,fke,ow,vke=A(()=>{b0();cke();hke();sB();Ide();O0e();av();dS();FS();$S();uB();Z7=class{constructor(){this.predicates=[]}is(e){return e>=this.predicates.length||this.predicates[e]}set(e,r){this.predicates[e]=r}toString(){let e="",r=this.predicates.length;for(let n=0;nconsole.log(n))}initialize(e){this.atn=ske(e.rules),this.dfas=a1t(this.atn)}validateAmbiguousAlternationAlternatives(){return[]}validateEmptyOrAlternatives(){return[]}buildLookaheadForAlternation(e){let{prodOccurrence:r,rule:n,hasPredicates:a,dynamicTokensEnabled:i}=e,s=this.dfas,o=this.logging,l=Im(n,"Alternation",r),h=this.atn.decisionMap[l].decision,f=sr(L7({maxLookahead:1,occurrence:r,prodType:"Alternation",rule:n}),d=>sr(d,p=>p[0]));if(dke(f,!1)&&!i){let d=Uo(f,(p,m,g)=>(Ge(m,v=>{v&&(p[v.tokenTypeIdx]=g,Ge(v.categoryMatches,y=>{p[y]=g}))}),p),{});return a?function(p){var m;let g=this.LA(1),v=d[g.tokenTypeIdx];if(p!==void 0&&v!==void 0){let y=(m=p[v])===null||m===void 0?void 0:m.GATE;if(y!==void 0&&y.call(this)===!1)return}return v}:function(){let p=this.LA(1);return d[p.tokenTypeIdx]}}else return a?function(d){let p=new Z7,m=d===void 0?0:d.length;for(let v=0;vsr(d,p=>p[0]));if(dke(f)&&f[0][0]&&!i){let d=f[0],p=uo(d);if(p.length===1&&Vh(p[0].categoryMatches)){let g=p[0].tokenTypeIdx;return function(){return this.LA(1).tokenTypeIdx===g}}else{let m=Uo(p,(g,v)=>(v!==void 0&&(g[v.tokenTypeIdx]=!0,Ge(v.categoryMatches,y=>{g[y]=!0})),g),{});return function(){let g=this.LA(1);return m[g.tokenTypeIdx]===!0}}}return function(){let d=J$.call(this,s,h,fke,o);return typeof d=="object"?!1:d===0}}}});var yke=A(()=>{vke()});var xke,eG,bke,J7,qr,Dr,eA,wke,tG,kke,Tke,Eke,Cke,rG,Ske,_ke,Ake,tA,_2,A2,nG,L2,Lke,aG,iG,sG,oG,lG,Rke,Ike,uG,Dke,cG,lw,Nke,Mke,Oke,Pke,Bke,Fke,zke,$ke,rA,Gke,Uke,qke,Vke,Hke,Wke,Yke,Xke,jke,Kke,Zke,nA,Qke,Jke,eTe,tTe,rTe,nTe,aTe,iTe,sTe,oTe,lTe,uTe,cTe,hG,fG,hTe,fTe,dTe,pTe,mTe,gTe,vTe,yTe,xTe,dG,ze,pG=A(()=>{"use strict";(function(t){function e(r){return typeof r=="string"}t.is=e})(xke||(xke={}));(function(t){function e(r){return typeof r=="string"}t.is=e})(eG||(eG={}));(function(t){t.MIN_VALUE=-2147483648,t.MAX_VALUE=2147483647;function e(r){return typeof r=="number"&&t.MIN_VALUE<=r&&r<=t.MAX_VALUE}t.is=e})(bke||(bke={}));(function(t){t.MIN_VALUE=0,t.MAX_VALUE=2147483647;function e(r){return typeof r=="number"&&t.MIN_VALUE<=r&&r<=t.MAX_VALUE}t.is=e})(J7||(J7={}));(function(t){function e(n,a){return n===Number.MAX_VALUE&&(n=J7.MAX_VALUE),a===Number.MAX_VALUE&&(a=J7.MAX_VALUE),{line:n,character:a}}t.create=e;function r(n){let a=n;return ze.objectLiteral(a)&&ze.uinteger(a.line)&&ze.uinteger(a.character)}t.is=r})(qr||(qr={}));(function(t){function e(n,a,i,s){if(ze.uinteger(n)&&ze.uinteger(a)&&ze.uinteger(i)&&ze.uinteger(s))return{start:qr.create(n,a),end:qr.create(i,s)};if(qr.is(n)&&qr.is(a))return{start:n,end:a};throw new Error(`Range#create called with invalid arguments[${n}, ${a}, ${i}, ${s}]`)}t.create=e;function r(n){let a=n;return ze.objectLiteral(a)&&qr.is(a.start)&&qr.is(a.end)}t.is=r})(Dr||(Dr={}));(function(t){function e(n,a){return{uri:n,range:a}}t.create=e;function r(n){let a=n;return ze.objectLiteral(a)&&Dr.is(a.range)&&(ze.string(a.uri)||ze.undefined(a.uri))}t.is=r})(eA||(eA={}));(function(t){function e(n,a,i,s){return{targetUri:n,targetRange:a,targetSelectionRange:i,originSelectionRange:s}}t.create=e;function r(n){let a=n;return ze.objectLiteral(a)&&Dr.is(a.targetRange)&&ze.string(a.targetUri)&&Dr.is(a.targetSelectionRange)&&(Dr.is(a.originSelectionRange)||ze.undefined(a.originSelectionRange))}t.is=r})(wke||(wke={}));(function(t){function e(n,a,i,s){return{red:n,green:a,blue:i,alpha:s}}t.create=e;function r(n){let a=n;return ze.objectLiteral(a)&&ze.numberRange(a.red,0,1)&&ze.numberRange(a.green,0,1)&&ze.numberRange(a.blue,0,1)&&ze.numberRange(a.alpha,0,1)}t.is=r})(tG||(tG={}));(function(t){function e(n,a){return{range:n,color:a}}t.create=e;function r(n){let a=n;return ze.objectLiteral(a)&&Dr.is(a.range)&&tG.is(a.color)}t.is=r})(kke||(kke={}));(function(t){function e(n,a,i){return{label:n,textEdit:a,additionalTextEdits:i}}t.create=e;function r(n){let a=n;return ze.objectLiteral(a)&&ze.string(a.label)&&(ze.undefined(a.textEdit)||A2.is(a))&&(ze.undefined(a.additionalTextEdits)||ze.typedArray(a.additionalTextEdits,A2.is))}t.is=r})(Tke||(Tke={}));(function(t){t.Comment="comment",t.Imports="imports",t.Region="region"})(Eke||(Eke={}));(function(t){function e(n,a,i,s,o,l){let u={startLine:n,endLine:a};return ze.defined(i)&&(u.startCharacter=i),ze.defined(s)&&(u.endCharacter=s),ze.defined(o)&&(u.kind=o),ze.defined(l)&&(u.collapsedText=l),u}t.create=e;function r(n){let a=n;return ze.objectLiteral(a)&&ze.uinteger(a.startLine)&&ze.uinteger(a.startLine)&&(ze.undefined(a.startCharacter)||ze.uinteger(a.startCharacter))&&(ze.undefined(a.endCharacter)||ze.uinteger(a.endCharacter))&&(ze.undefined(a.kind)||ze.string(a.kind))}t.is=r})(Cke||(Cke={}));(function(t){function e(n,a){return{location:n,message:a}}t.create=e;function r(n){let a=n;return ze.defined(a)&&eA.is(a.location)&&ze.string(a.message)}t.is=r})(rG||(rG={}));(function(t){t.Error=1,t.Warning=2,t.Information=3,t.Hint=4})(Ske||(Ske={}));(function(t){t.Unnecessary=1,t.Deprecated=2})(_ke||(_ke={}));(function(t){function e(r){let n=r;return ze.objectLiteral(n)&&ze.string(n.href)}t.is=e})(Ake||(Ake={}));(function(t){function e(n,a,i,s,o,l){let u={range:n,message:a};return ze.defined(i)&&(u.severity=i),ze.defined(s)&&(u.code=s),ze.defined(o)&&(u.source=o),ze.defined(l)&&(u.relatedInformation=l),u}t.create=e;function r(n){var a;let i=n;return ze.defined(i)&&Dr.is(i.range)&&ze.string(i.message)&&(ze.number(i.severity)||ze.undefined(i.severity))&&(ze.integer(i.code)||ze.string(i.code)||ze.undefined(i.code))&&(ze.undefined(i.codeDescription)||ze.string((a=i.codeDescription)===null||a===void 0?void 0:a.href))&&(ze.string(i.source)||ze.undefined(i.source))&&(ze.undefined(i.relatedInformation)||ze.typedArray(i.relatedInformation,rG.is))}t.is=r})(tA||(tA={}));(function(t){function e(n,a,...i){let s={title:n,command:a};return ze.defined(i)&&i.length>0&&(s.arguments=i),s}t.create=e;function r(n){let a=n;return ze.defined(a)&&ze.string(a.title)&&ze.string(a.command)}t.is=r})(_2||(_2={}));(function(t){function e(i,s){return{range:i,newText:s}}t.replace=e;function r(i,s){return{range:{start:i,end:i},newText:s}}t.insert=r;function n(i){return{range:i,newText:""}}t.del=n;function a(i){let s=i;return ze.objectLiteral(s)&&ze.string(s.newText)&&Dr.is(s.range)}t.is=a})(A2||(A2={}));(function(t){function e(n,a,i){let s={label:n};return a!==void 0&&(s.needsConfirmation=a),i!==void 0&&(s.description=i),s}t.create=e;function r(n){let a=n;return ze.objectLiteral(a)&&ze.string(a.label)&&(ze.boolean(a.needsConfirmation)||a.needsConfirmation===void 0)&&(ze.string(a.description)||a.description===void 0)}t.is=r})(nG||(nG={}));(function(t){function e(r){let n=r;return ze.string(n)}t.is=e})(L2||(L2={}));(function(t){function e(i,s,o){return{range:i,newText:s,annotationId:o}}t.replace=e;function r(i,s,o){return{range:{start:i,end:i},newText:s,annotationId:o}}t.insert=r;function n(i,s){return{range:i,newText:"",annotationId:s}}t.del=n;function a(i){let s=i;return A2.is(s)&&(nG.is(s.annotationId)||L2.is(s.annotationId))}t.is=a})(Lke||(Lke={}));(function(t){function e(n,a){return{textDocument:n,edits:a}}t.create=e;function r(n){let a=n;return ze.defined(a)&&uG.is(a.textDocument)&&Array.isArray(a.edits)}t.is=r})(aG||(aG={}));(function(t){function e(n,a,i){let s={kind:"create",uri:n};return a!==void 0&&(a.overwrite!==void 0||a.ignoreIfExists!==void 0)&&(s.options=a),i!==void 0&&(s.annotationId=i),s}t.create=e;function r(n){let a=n;return a&&a.kind==="create"&&ze.string(a.uri)&&(a.options===void 0||(a.options.overwrite===void 0||ze.boolean(a.options.overwrite))&&(a.options.ignoreIfExists===void 0||ze.boolean(a.options.ignoreIfExists)))&&(a.annotationId===void 0||L2.is(a.annotationId))}t.is=r})(iG||(iG={}));(function(t){function e(n,a,i,s){let o={kind:"rename",oldUri:n,newUri:a};return i!==void 0&&(i.overwrite!==void 0||i.ignoreIfExists!==void 0)&&(o.options=i),s!==void 0&&(o.annotationId=s),o}t.create=e;function r(n){let a=n;return a&&a.kind==="rename"&&ze.string(a.oldUri)&&ze.string(a.newUri)&&(a.options===void 0||(a.options.overwrite===void 0||ze.boolean(a.options.overwrite))&&(a.options.ignoreIfExists===void 0||ze.boolean(a.options.ignoreIfExists)))&&(a.annotationId===void 0||L2.is(a.annotationId))}t.is=r})(sG||(sG={}));(function(t){function e(n,a,i){let s={kind:"delete",uri:n};return a!==void 0&&(a.recursive!==void 0||a.ignoreIfNotExists!==void 0)&&(s.options=a),i!==void 0&&(s.annotationId=i),s}t.create=e;function r(n){let a=n;return a&&a.kind==="delete"&&ze.string(a.uri)&&(a.options===void 0||(a.options.recursive===void 0||ze.boolean(a.options.recursive))&&(a.options.ignoreIfNotExists===void 0||ze.boolean(a.options.ignoreIfNotExists)))&&(a.annotationId===void 0||L2.is(a.annotationId))}t.is=r})(oG||(oG={}));(function(t){function e(r){let n=r;return n&&(n.changes!==void 0||n.documentChanges!==void 0)&&(n.documentChanges===void 0||n.documentChanges.every(a=>ze.string(a.kind)?iG.is(a)||sG.is(a)||oG.is(a):aG.is(a)))}t.is=e})(lG||(lG={}));(function(t){function e(n){return{uri:n}}t.create=e;function r(n){let a=n;return ze.defined(a)&&ze.string(a.uri)}t.is=r})(Rke||(Rke={}));(function(t){function e(n,a){return{uri:n,version:a}}t.create=e;function r(n){let a=n;return ze.defined(a)&&ze.string(a.uri)&&ze.integer(a.version)}t.is=r})(Ike||(Ike={}));(function(t){function e(n,a){return{uri:n,version:a}}t.create=e;function r(n){let a=n;return ze.defined(a)&&ze.string(a.uri)&&(a.version===null||ze.integer(a.version))}t.is=r})(uG||(uG={}));(function(t){function e(n,a,i,s){return{uri:n,languageId:a,version:i,text:s}}t.create=e;function r(n){let a=n;return ze.defined(a)&&ze.string(a.uri)&&ze.string(a.languageId)&&ze.integer(a.version)&&ze.string(a.text)}t.is=r})(Dke||(Dke={}));(function(t){t.PlainText="plaintext",t.Markdown="markdown";function e(r){let n=r;return n===t.PlainText||n===t.Markdown}t.is=e})(cG||(cG={}));(function(t){function e(r){let n=r;return ze.objectLiteral(r)&&cG.is(n.kind)&&ze.string(n.value)}t.is=e})(lw||(lw={}));(function(t){t.Text=1,t.Method=2,t.Function=3,t.Constructor=4,t.Field=5,t.Variable=6,t.Class=7,t.Interface=8,t.Module=9,t.Property=10,t.Unit=11,t.Value=12,t.Enum=13,t.Keyword=14,t.Snippet=15,t.Color=16,t.File=17,t.Reference=18,t.Folder=19,t.EnumMember=20,t.Constant=21,t.Struct=22,t.Event=23,t.Operator=24,t.TypeParameter=25})(Nke||(Nke={}));(function(t){t.PlainText=1,t.Snippet=2})(Mke||(Mke={}));(function(t){t.Deprecated=1})(Oke||(Oke={}));(function(t){function e(n,a,i){return{newText:n,insert:a,replace:i}}t.create=e;function r(n){let a=n;return a&&ze.string(a.newText)&&Dr.is(a.insert)&&Dr.is(a.replace)}t.is=r})(Pke||(Pke={}));(function(t){t.asIs=1,t.adjustIndentation=2})(Bke||(Bke={}));(function(t){function e(r){let n=r;return n&&(ze.string(n.detail)||n.detail===void 0)&&(ze.string(n.description)||n.description===void 0)}t.is=e})(Fke||(Fke={}));(function(t){function e(r){return{label:r}}t.create=e})(zke||(zke={}));(function(t){function e(r,n){return{items:r||[],isIncomplete:!!n}}t.create=e})($ke||($ke={}));(function(t){function e(n){return n.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}t.fromPlainText=e;function r(n){let a=n;return ze.string(a)||ze.objectLiteral(a)&&ze.string(a.language)&&ze.string(a.value)}t.is=r})(rA||(rA={}));(function(t){function e(r){let n=r;return!!n&&ze.objectLiteral(n)&&(lw.is(n.contents)||rA.is(n.contents)||ze.typedArray(n.contents,rA.is))&&(r.range===void 0||Dr.is(r.range))}t.is=e})(Gke||(Gke={}));(function(t){function e(r,n){return n?{label:r,documentation:n}:{label:r}}t.create=e})(Uke||(Uke={}));(function(t){function e(r,n,...a){let i={label:r};return ze.defined(n)&&(i.documentation=n),ze.defined(a)?i.parameters=a:i.parameters=[],i}t.create=e})(qke||(qke={}));(function(t){t.Text=1,t.Read=2,t.Write=3})(Vke||(Vke={}));(function(t){function e(r,n){let a={range:r};return ze.number(n)&&(a.kind=n),a}t.create=e})(Hke||(Hke={}));(function(t){t.File=1,t.Module=2,t.Namespace=3,t.Package=4,t.Class=5,t.Method=6,t.Property=7,t.Field=8,t.Constructor=9,t.Enum=10,t.Interface=11,t.Function=12,t.Variable=13,t.Constant=14,t.String=15,t.Number=16,t.Boolean=17,t.Array=18,t.Object=19,t.Key=20,t.Null=21,t.EnumMember=22,t.Struct=23,t.Event=24,t.Operator=25,t.TypeParameter=26})(Wke||(Wke={}));(function(t){t.Deprecated=1})(Yke||(Yke={}));(function(t){function e(r,n,a,i,s){let o={name:r,kind:n,location:{uri:i,range:a}};return s&&(o.containerName=s),o}t.create=e})(Xke||(Xke={}));(function(t){function e(r,n,a,i){return i!==void 0?{name:r,kind:n,location:{uri:a,range:i}}:{name:r,kind:n,location:{uri:a}}}t.create=e})(jke||(jke={}));(function(t){function e(n,a,i,s,o,l){let u={name:n,detail:a,kind:i,range:s,selectionRange:o};return l!==void 0&&(u.children=l),u}t.create=e;function r(n){let a=n;return a&&ze.string(a.name)&&ze.number(a.kind)&&Dr.is(a.range)&&Dr.is(a.selectionRange)&&(a.detail===void 0||ze.string(a.detail))&&(a.deprecated===void 0||ze.boolean(a.deprecated))&&(a.children===void 0||Array.isArray(a.children))&&(a.tags===void 0||Array.isArray(a.tags))}t.is=r})(Kke||(Kke={}));(function(t){t.Empty="",t.QuickFix="quickfix",t.Refactor="refactor",t.RefactorExtract="refactor.extract",t.RefactorInline="refactor.inline",t.RefactorRewrite="refactor.rewrite",t.Source="source",t.SourceOrganizeImports="source.organizeImports",t.SourceFixAll="source.fixAll"})(Zke||(Zke={}));(function(t){t.Invoked=1,t.Automatic=2})(nA||(nA={}));(function(t){function e(n,a,i){let s={diagnostics:n};return a!=null&&(s.only=a),i!=null&&(s.triggerKind=i),s}t.create=e;function r(n){let a=n;return ze.defined(a)&&ze.typedArray(a.diagnostics,tA.is)&&(a.only===void 0||ze.typedArray(a.only,ze.string))&&(a.triggerKind===void 0||a.triggerKind===nA.Invoked||a.triggerKind===nA.Automatic)}t.is=r})(Qke||(Qke={}));(function(t){function e(n,a,i){let s={title:n},o=!0;return typeof a=="string"?(o=!1,s.kind=a):_2.is(a)?s.command=a:s.edit=a,o&&i!==void 0&&(s.kind=i),s}t.create=e;function r(n){let a=n;return a&&ze.string(a.title)&&(a.diagnostics===void 0||ze.typedArray(a.diagnostics,tA.is))&&(a.kind===void 0||ze.string(a.kind))&&(a.edit!==void 0||a.command!==void 0)&&(a.command===void 0||_2.is(a.command))&&(a.isPreferred===void 0||ze.boolean(a.isPreferred))&&(a.edit===void 0||lG.is(a.edit))}t.is=r})(Jke||(Jke={}));(function(t){function e(n,a){let i={range:n};return ze.defined(a)&&(i.data=a),i}t.create=e;function r(n){let a=n;return ze.defined(a)&&Dr.is(a.range)&&(ze.undefined(a.command)||_2.is(a.command))}t.is=r})(eTe||(eTe={}));(function(t){function e(n,a){return{tabSize:n,insertSpaces:a}}t.create=e;function r(n){let a=n;return ze.defined(a)&&ze.uinteger(a.tabSize)&&ze.boolean(a.insertSpaces)}t.is=r})(tTe||(tTe={}));(function(t){function e(n,a,i){return{range:n,target:a,data:i}}t.create=e;function r(n){let a=n;return ze.defined(a)&&Dr.is(a.range)&&(ze.undefined(a.target)||ze.string(a.target))}t.is=r})(rTe||(rTe={}));(function(t){function e(n,a){return{range:n,parent:a}}t.create=e;function r(n){let a=n;return ze.objectLiteral(a)&&Dr.is(a.range)&&(a.parent===void 0||t.is(a.parent))}t.is=r})(nTe||(nTe={}));(function(t){t.namespace="namespace",t.type="type",t.class="class",t.enum="enum",t.interface="interface",t.struct="struct",t.typeParameter="typeParameter",t.parameter="parameter",t.variable="variable",t.property="property",t.enumMember="enumMember",t.event="event",t.function="function",t.method="method",t.macro="macro",t.keyword="keyword",t.modifier="modifier",t.comment="comment",t.string="string",t.number="number",t.regexp="regexp",t.operator="operator",t.decorator="decorator"})(aTe||(aTe={}));(function(t){t.declaration="declaration",t.definition="definition",t.readonly="readonly",t.static="static",t.deprecated="deprecated",t.abstract="abstract",t.async="async",t.modification="modification",t.documentation="documentation",t.defaultLibrary="defaultLibrary"})(iTe||(iTe={}));(function(t){function e(r){let n=r;return ze.objectLiteral(n)&&(n.resultId===void 0||typeof n.resultId=="string")&&Array.isArray(n.data)&&(n.data.length===0||typeof n.data[0]=="number")}t.is=e})(sTe||(sTe={}));(function(t){function e(n,a){return{range:n,text:a}}t.create=e;function r(n){let a=n;return a!=null&&Dr.is(a.range)&&ze.string(a.text)}t.is=r})(oTe||(oTe={}));(function(t){function e(n,a,i){return{range:n,variableName:a,caseSensitiveLookup:i}}t.create=e;function r(n){let a=n;return a!=null&&Dr.is(a.range)&&ze.boolean(a.caseSensitiveLookup)&&(ze.string(a.variableName)||a.variableName===void 0)}t.is=r})(lTe||(lTe={}));(function(t){function e(n,a){return{range:n,expression:a}}t.create=e;function r(n){let a=n;return a!=null&&Dr.is(a.range)&&(ze.string(a.expression)||a.expression===void 0)}t.is=r})(uTe||(uTe={}));(function(t){function e(n,a){return{frameId:n,stoppedLocation:a}}t.create=e;function r(n){let a=n;return ze.defined(a)&&Dr.is(n.stoppedLocation)}t.is=r})(cTe||(cTe={}));(function(t){t.Type=1,t.Parameter=2;function e(r){return r===1||r===2}t.is=e})(hG||(hG={}));(function(t){function e(n){return{value:n}}t.create=e;function r(n){let a=n;return ze.objectLiteral(a)&&(a.tooltip===void 0||ze.string(a.tooltip)||lw.is(a.tooltip))&&(a.location===void 0||eA.is(a.location))&&(a.command===void 0||_2.is(a.command))}t.is=r})(fG||(fG={}));(function(t){function e(n,a,i){let s={position:n,label:a};return i!==void 0&&(s.kind=i),s}t.create=e;function r(n){let a=n;return ze.objectLiteral(a)&&qr.is(a.position)&&(ze.string(a.label)||ze.typedArray(a.label,fG.is))&&(a.kind===void 0||hG.is(a.kind))&&a.textEdits===void 0||ze.typedArray(a.textEdits,A2.is)&&(a.tooltip===void 0||ze.string(a.tooltip)||lw.is(a.tooltip))&&(a.paddingLeft===void 0||ze.boolean(a.paddingLeft))&&(a.paddingRight===void 0||ze.boolean(a.paddingRight))}t.is=r})(hTe||(hTe={}));(function(t){function e(r){return{kind:"snippet",value:r}}t.createSnippet=e})(fTe||(fTe={}));(function(t){function e(r,n,a,i){return{insertText:r,filterText:n,range:a,command:i}}t.create=e})(dTe||(dTe={}));(function(t){function e(r){return{items:r}}t.create=e})(pTe||(pTe={}));(function(t){t.Invoked=0,t.Automatic=1})(mTe||(mTe={}));(function(t){function e(r,n){return{range:r,text:n}}t.create=e})(gTe||(gTe={}));(function(t){function e(r,n){return{triggerKind:r,selectedCompletionInfo:n}}t.create=e})(vTe||(vTe={}));(function(t){function e(r){let n=r;return ze.objectLiteral(n)&&eG.is(n.uri)&&ze.string(n.name)}t.is=e})(yTe||(yTe={}));(function(t){function e(i,s,o,l){return new dG(i,s,o,l)}t.create=e;function r(i){let s=i;return!!(ze.defined(s)&&ze.string(s.uri)&&(ze.undefined(s.languageId)||ze.string(s.languageId))&&ze.uinteger(s.lineCount)&&ze.func(s.getText)&&ze.func(s.positionAt)&&ze.func(s.offsetAt))}t.is=r;function n(i,s){let o=i.getText(),l=a(s,(h,f)=>{let d=h.range.start.line-f.range.start.line;return d===0?h.range.start.character-f.range.start.character:d}),u=o.length;for(let h=l.length-1;h>=0;h--){let f=l[h],d=i.offsetAt(f.range.start),p=i.offsetAt(f.range.end);if(p<=u)o=o.substring(0,d)+f.newText+o.substring(p,o.length);else throw new Error("Overlapping edit");u=d}return o}t.applyEdits=n;function a(i,s){if(i.length<=1)return i;let o=i.length/2|0,l=i.slice(0,o),u=i.slice(o);a(l,s),a(u,s);let h=0,f=0,d=0;for(;h0&&e.push(r.length),this._lineOffsets=e}return this._lineOffsets}positionAt(e){e=Math.max(Math.min(e,this._content.length),0);let r=this.getLineOffsets(),n=0,a=r.length;if(a===0)return qr.create(0,e);for(;ne?a=s:n=s+1}let i=n-1;return qr.create(i,e-r[i])}offsetAt(e){let r=this.getLineOffsets();if(e.line>=r.length)return this._content.length;if(e.line<0)return 0;let n=r[e.line],a=e.line+1"u"}t.undefined=n;function a(p){return p===!0||p===!1}t.boolean=a;function i(p){return e.call(p)==="[object String]"}t.string=i;function s(p){return e.call(p)==="[object Number]"}t.number=s;function o(p,m,g){return e.call(p)==="[object Number]"&&m<=p&&p<=g}t.numberRange=o;function l(p){return e.call(p)==="[object Number]"&&-2147483648<=p&&p<=2147483647}t.integer=l;function u(p){return e.call(p)==="[object Number]"&&0<=p&&p<=2147483647}t.uinteger=u;function h(p){return e.call(p)==="[object Function]"}t.func=h;function f(p){return p!==null&&typeof p=="object"}t.objectLiteral=f;function d(p,m){return Array.isArray(p)&&p.every(m)}t.typedArray=d})(ze||(ze={}))});var uw,cw,Nm,Mm,mG,R2,aA=A(()=>{pG();fu();uw=class{constructor(){this.nodeStack=[]}get current(){var e;return(e=this.nodeStack[this.nodeStack.length-1])!==null&&e!==void 0?e:this.rootNode}buildRootNode(e){return this.rootNode=new R2(e),this.rootNode.root=this.rootNode,this.nodeStack=[this.rootNode],this.rootNode}buildCompositeNode(e){let r=new Mm;return r.grammarSource=e,r.root=this.rootNode,this.current.content.push(r),this.nodeStack.push(r),r}buildLeafNode(e,r){let n=new Nm(e.startOffset,e.image.length,yv(e),e.tokenType,!r);return n.grammarSource=r,n.root=this.rootNode,this.current.content.push(n),n}removeNode(e){let r=e.container;if(r){let n=r.content.indexOf(e);n>=0&&r.content.splice(n,1)}}addHiddenNodes(e){let r=[];for(let i of e){let s=new Nm(i.startOffset,i.image.length,yv(i),i.tokenType,!0);s.root=this.rootNode,r.push(s)}let n=this.current,a=!1;if(n.content.length>0){n.content.push(...r);return}for(;n.container;){let i=n.container.content.indexOf(n);if(i>0){n.container.content.splice(i,0,...r),a=!0;break}n=n.container}a||this.rootNode.content.unshift(...r)}construct(e){let r=this.current;typeof e.$type=="string"&&(this.current.astNode=e),e.$cstNode=r;let n=this.nodeStack.pop();n?.content.length===0&&this.removeNode(n)}},cw=class{get parent(){return this.container}get feature(){return this.grammarSource}get hidden(){return!1}get astNode(){var e,r;let n=typeof((e=this._astNode)===null||e===void 0?void 0:e.$type)=="string"?this._astNode:(r=this.container)===null||r===void 0?void 0:r.astNode;if(!n)throw new Error("This node has no associated AST element");return n}set astNode(e){this._astNode=e}get element(){return this.astNode}get text(){return this.root.fullText.substring(this.offset,this.end)}},Nm=class extends cw{get offset(){return this._offset}get length(){return this._length}get end(){return this._offset+this._length}get hidden(){return this._hidden}get tokenType(){return this._tokenType}get range(){return this._range}constructor(e,r,n,a,i=!1){super(),this._hidden=i,this._offset=e,this._tokenType=a,this._length=r,this._range=n}},Mm=class extends cw{constructor(){super(...arguments),this.content=new mG(this)}get children(){return this.content}get offset(){var e,r;return(r=(e=this.firstNonHiddenNode)===null||e===void 0?void 0:e.offset)!==null&&r!==void 0?r:0}get length(){return this.end-this.offset}get end(){var e,r;return(r=(e=this.lastNonHiddenNode)===null||e===void 0?void 0:e.end)!==null&&r!==void 0?r:0}get range(){let e=this.firstNonHiddenNode,r=this.lastNonHiddenNode;if(e&&r){if(this._rangeCache===void 0){let{range:n}=e,{range:a}=r;this._rangeCache={start:n.start,end:a.end.line=0;e--){let r=this.content[e];if(!r.hidden)return r}return this.content[this.content.length-1]}},mG=class t extends Array{constructor(e){super(),this.parent=e,Object.setPrototypeOf(this,t.prototype)}push(...e){return this.addParents(e),super.push(...e)}unshift(...e){return this.addParents(e),super.unshift(...e)}splice(e,r,...n){return this.addParents(n),super.splice(e,r,...n)}addParents(e){for(let r of e)r.container=this.parent}},R2=class extends Mm{get text(){return this._text.substring(this.offset,this.end)}get fullText(){return this._text}constructor(e){super(),this._text="",this._text=e??""}}});function gG(t){return t.$type===iA}var iA,bTe,wTe,hw,fw,sA,I2,dw,T1t,vG,pw=A(()=>{b0();yke();Cc();mu();_s();aA();iA=Symbol("Datatype");bTe="\u200B",wTe=t=>t.endsWith(bTe)?t:t+bTe,hw=class{constructor(e){this._unorderedGroups=new Map,this.allRules=new Map,this.lexer=e.parser.Lexer;let r=this.lexer.definition,n=e.LanguageMetaData.mode==="production";this.wrapper=new vG(r,Object.assign(Object.assign({},e.parser.ParserConfig),{skipValidations:n,errorMessageProvider:e.parser.ParserErrorMessageProvider}))}alternatives(e,r){this.wrapper.wrapOr(e,r)}optional(e,r){this.wrapper.wrapOption(e,r)}many(e,r){this.wrapper.wrapMany(e,r)}atLeastOne(e,r){this.wrapper.wrapAtLeastOne(e,r)}getRule(e){return this.allRules.get(e)}isRecording(){return this.wrapper.IS_RECORDING}get unorderedGroups(){return this._unorderedGroups}getRuleStack(){return this.wrapper.RULE_STACK}finalize(){this.wrapper.wrapSelfAnalysis()}},fw=class extends hw{get current(){return this.stack[this.stack.length-1]}constructor(e){super(e),this.nodeBuilder=new uw,this.stack=[],this.assignmentMap=new Map,this.linker=e.references.Linker,this.converter=e.parser.ValueConverter,this.astReflection=e.shared.AstReflection}rule(e,r){let n=this.computeRuleType(e),a=this.wrapper.DEFINE_RULE(wTe(e.name),this.startImplementation(n,r).bind(this));return this.allRules.set(e.name,a),e.entry&&(this.mainRule=a),a}computeRuleType(e){if(!e.fragment){if(a5(e))return iA;{let r=ly(e);return r??e.name}}}parse(e,r={}){this.nodeBuilder.buildRootNode(e);let n=this.lexerResult=this.lexer.tokenize(e);this.wrapper.input=n.tokens;let a=r.rule?this.allRules.get(r.rule):this.mainRule;if(!a)throw new Error(r.rule?`No rule found with name '${r.rule}'`:"No main rule available.");let i=a.call(this.wrapper,{});return this.nodeBuilder.addHiddenNodes(n.hidden),this.unorderedGroups.clear(),this.lexerResult=void 0,{value:i,lexerErrors:n.errors,lexerReport:n.report,parserErrors:this.wrapper.errors}}startImplementation(e,r){return n=>{let a=!this.isRecording()&&e!==void 0;if(a){let s={$type:e};this.stack.push(s),e===iA&&(s.value="")}let i;try{i=r(n)}catch{i=void 0}return i===void 0&&a&&(i=this.construct()),i}}extractHiddenTokens(e){let r=this.lexerResult.hidden;if(!r.length)return[];let n=e.startOffset;for(let a=0;an)return r.splice(0,a);return r.splice(0,r.length)}consume(e,r,n){let a=this.wrapper.wrapConsume(e,r);if(!this.isRecording()&&this.isValidToken(a)){let i=this.extractHiddenTokens(a);this.nodeBuilder.addHiddenNodes(i);let s=this.nodeBuilder.buildLeafNode(a,n),{assignment:o,isCrossRef:l}=this.getAssignment(n),u=this.current;if(o){let h=bl(n)?a.image:this.converter.convert(a.image,s);this.assign(o.operator,o.feature,h,s,l)}else if(gG(u)){let h=a.image;bl(n)||(h=this.converter.convert(h,s).toString()),u.value+=h}}}isValidToken(e){return!e.isInsertedInRecovery&&!isNaN(e.startOffset)&&typeof e.endOffset=="number"&&!isNaN(e.endOffset)}subrule(e,r,n,a,i){let s;!this.isRecording()&&!n&&(s=this.nodeBuilder.buildCompositeNode(a));let o=this.wrapper.wrapSubrule(e,r,i);!this.isRecording()&&s&&s.length>0&&this.performSubruleAssignment(o,a,s)}performSubruleAssignment(e,r,n){let{assignment:a,isCrossRef:i}=this.getAssignment(r);if(a)this.assign(a.operator,a.feature,e,n,i);else if(!a){let s=this.current;if(gG(s))s.value+=e.toString();else if(typeof e=="object"&&e){let l=this.assignWithoutOverride(e,s);this.stack.pop(),this.stack.push(l)}}}action(e,r){if(!this.isRecording()){let n=this.current;if(r.feature&&r.operator){n=this.construct(),this.nodeBuilder.removeNode(n.$cstNode),this.nodeBuilder.buildCompositeNode(r).content.push(n.$cstNode);let i={$type:e};this.stack.push(i),this.assign(r.operator,r.feature,n,n.$cstNode,!1)}else n.$type=e}}construct(){if(this.isRecording())return;let e=this.current;return N_(e),this.nodeBuilder.construct(e),this.stack.pop(),gG(e)?this.converter.convert(e.value,e.$cstNode):(CF(this.astReflection,e),e)}getAssignment(e){if(!this.assignmentMap.has(e)){let r=pm(e,du);this.assignmentMap.set(e,{assignment:r,isCrossRef:r?dm(r.terminal):!1})}return this.assignmentMap.get(e)}assign(e,r,n,a,i){let s=this.current,o;switch(i&&typeof n=="string"?o=this.linker.buildReference(s,r,a,n):o=n,e){case"=":{s[r]=o;break}case"?=":{s[r]=!0;break}case"+=":Array.isArray(s[r])||(s[r]=[]),s[r].push(o)}}assignWithoutOverride(e,r){for(let[a,i]of Object.entries(r)){let s=e[a];s===void 0?e[a]=i:Array.isArray(s)&&Array.isArray(i)&&(i.push(...s),e[a]=i)}let n=e.$cstNode;return n&&(n.astNode=void 0,e.$cstNode=void 0),e}get definitionErrors(){return this.wrapper.definitionErrors}},sA=class{buildMismatchTokenMessage(e){return of.buildMismatchTokenMessage(e)}buildNotAllInputParsedMessage(e){return of.buildNotAllInputParsedMessage(e)}buildNoViableAltMessage(e){return of.buildNoViableAltMessage(e)}buildEarlyExitMessage(e){return of.buildEarlyExitMessage(e)}},I2=class extends sA{buildMismatchTokenMessage({expected:e,actual:r}){return`Expecting ${e.LABEL?"`"+e.LABEL+"`":e.name.endsWith(":KW")?`keyword '${e.name.substring(0,e.name.length-3)}'`:`token of type '${e.name}'`} but found \`${r.image}\`.`}buildNotAllInputParsedMessage({firstRedundant:e}){return`Expecting end of file but found \`${e.image}\`.`}},dw=class extends hw{constructor(){super(...arguments),this.tokens=[],this.elementStack=[],this.lastElementStack=[],this.nextTokenIndex=0,this.stackSize=0}action(){}construct(){}parse(e){this.resetState();let r=this.lexer.tokenize(e,{mode:"partial"});return this.tokens=r.tokens,this.wrapper.input=[...this.tokens],this.mainRule.call(this.wrapper,{}),this.unorderedGroups.clear(),{tokens:this.tokens,elementStack:[...this.lastElementStack],tokenIndex:this.nextTokenIndex}}rule(e,r){let n=this.wrapper.DEFINE_RULE(wTe(e.name),this.startImplementation(r).bind(this));return this.allRules.set(e.name,n),e.entry&&(this.mainRule=n),n}resetState(){this.elementStack=[],this.lastElementStack=[],this.nextTokenIndex=0,this.stackSize=0}startImplementation(e){return r=>{let n=this.keepStackSize();try{e(r)}finally{this.resetStackSize(n)}}}removeUnexpectedElements(){this.elementStack.splice(this.stackSize)}keepStackSize(){let e=this.elementStack.length;return this.stackSize=e,e}resetStackSize(e){this.removeUnexpectedElements(),this.stackSize=e}consume(e,r,n){this.wrapper.wrapConsume(e,r),this.isRecording()||(this.lastElementStack=[...this.elementStack,n],this.nextTokenIndex=this.currIdx+1)}subrule(e,r,n,a,i){this.before(a),this.wrapper.wrapSubrule(e,r,i),this.after(a)}before(e){this.isRecording()||this.elementStack.push(e)}after(e){if(!this.isRecording()){let r=this.elementStack.lastIndexOf(e);r>=0&&this.elementStack.splice(r)}}get currIdx(){return this.wrapper.currIdx}},T1t={recoveryEnabled:!0,nodeLocationTracking:"full",skipValidations:!0,errorMessageProvider:new I2},vG=class extends nw{constructor(e,r){let n=r&&"maxLookahead"in r;super(e,Object.assign(Object.assign(Object.assign({},T1t),{lookaheadStrategy:n?new lf({maxLookahead:r.maxLookahead}):new ow({logging:r.skipValidations?()=>{}:void 0})}),r))}get IS_RECORDING(){return this.RECORDING_PHASE}DEFINE_RULE(e,r){return this.RULE(e,r)}wrapSelfAnalysis(){this.performSelfAnalysis()}wrapConsume(e,r){return this.consume(e,r)}wrapSubrule(e,r,n){return this.subrule(e,r,{ARGS:[n]})}wrapOr(e,r){this.or(e,r)}wrapOption(e,r){this.option(e,r)}wrapMany(e,r){this.many(e,r)}wrapAtLeastOne(e,r){this.atLeastOne(e,r)}}});function mw(t,e,r){return E1t({parser:e,tokens:r,ruleNames:new Map},t),e}function E1t(t,e){let r=r5(e,!1),n=Kr(e.rules).filter(is).filter(a=>r.has(a));for(let a of n){let i=Object.assign(Object.assign({},t),{consume:1,optional:1,subrule:1,many:1,or:1});t.parser.rule(a,Om(i,a.definition))}}function Om(t,e,r=!1){let n;if(bl(e))n=I1t(t,e);else if(Yh(e))n=C1t(t,e);else if(du(e))n=Om(t,e.terminal);else if(dm(e))n=kTe(t,e);else if(pu(e))n=S1t(t,e);else if(R_(e))n=A1t(t,e);else if(D_(e))n=L1t(t,e);else if(Pd(e))n=R1t(t,e);else if(gF(e)){let a=t.consume++;n=()=>t.parser.consume(a,Yo,e)}else throw new hm(e.$cstNode,`Unexpected element type: ${e.$type}`);return TTe(t,r?void 0:oA(e),n,e.cardinality)}function C1t(t,e){let r=i5(e);return()=>t.parser.action(r,e)}function S1t(t,e){let r=e.rule.ref;if(is(r)){let n=t.subrule++,a=r.fragment,i=e.arguments.length>0?_1t(r,e.arguments):()=>({});return s=>t.parser.subrule(n,ETe(t,r),a,e,i(s))}else if(Ho(r)){let n=t.consume++,a=yG(t,r.name);return()=>t.parser.consume(n,a,e)}else if(r)Ec(r);else throw new hm(e.$cstNode,`Undefined rule: ${e.rule.$refText}`)}function _1t(t,e){let r=e.map(n=>uf(n.value));return n=>{let a={};for(let i=0;ie(n)||r(n)}else if(lF(t)){let e=uf(t.left),r=uf(t.right);return n=>e(n)&&r(n)}else if(cF(t)){let e=uf(t.value);return r=>!e(r)}else if(hF(t)){let e=t.parameter.ref.name;return r=>r!==void 0&&r[e]===!0}else if(oF(t)){let e=!!t.true;return()=>e}Ec(t)}function A1t(t,e){if(e.elements.length===1)return Om(t,e.elements[0]);{let r=[];for(let a of e.elements){let i={ALT:Om(t,a,!0)},s=oA(a);s&&(i.GATE=uf(s)),r.push(i)}let n=t.or++;return a=>t.parser.alternatives(n,r.map(i=>{let s={ALT:()=>i.ALT(a)},o=i.GATE;return o&&(s.GATE=()=>o(a)),s}))}}function L1t(t,e){if(e.elements.length===1)return Om(t,e.elements[0]);let r=[];for(let o of e.elements){let l={ALT:Om(t,o,!0)},u=oA(o);u&&(l.GATE=uf(u)),r.push(l)}let n=t.or++,a=(o,l)=>{let u=l.getRuleStack().join("-");return`uGroup_${o}_${u}`},i=o=>t.parser.alternatives(n,r.map((l,u)=>{let h={ALT:()=>!0},f=t.parser;h.ALT=()=>{if(l.ALT(o),!f.isRecording()){let p=a(n,f);f.unorderedGroups.get(p)||f.unorderedGroups.set(p,[]);let m=f.unorderedGroups.get(p);typeof m?.[u]>"u"&&(m[u]=!0)}};let d=l.GATE;return d?h.GATE=()=>d(o):h.GATE=()=>{let p=f.unorderedGroups.get(a(n,f));return!p?.[u]},h})),s=TTe(t,oA(e),i,"*");return o=>{s(o),t.parser.isRecording()||t.parser.unorderedGroups.delete(a(n,t.parser))}}function R1t(t,e){let r=e.elements.map(n=>Om(t,n));return n=>r.forEach(a=>a(n))}function oA(t){if(Pd(t))return t.guardCondition}function kTe(t,e,r=e.terminal){if(r)if(pu(r)&&is(r.rule.ref)){let n=r.rule.ref,a=t.subrule++;return i=>t.parser.subrule(a,ETe(t,n),!1,e,i)}else if(pu(r)&&Ho(r.rule.ref)){let n=t.consume++,a=yG(t,r.rule.ref.name);return()=>t.parser.consume(n,a,e)}else if(bl(r)){let n=t.consume++,a=yG(t,r.value);return()=>t.parser.consume(n,a,e)}else throw new Error("Could not build cross reference parser");else{if(!e.type.ref)throw new Error("Could not resolve reference to type: "+e.type.$refText);let n=F_(e.type.ref),a=n?.terminal;if(!a)throw new Error("Could not find name assignment for type: "+i5(e.type.ref));return kTe(t,e,a)}}function I1t(t,e){let r=t.consume++,n=t.tokens[e.value];if(!n)throw new Error("Could not find token for keyword: "+e.value);return()=>t.parser.consume(r,n,e)}function TTe(t,e,r,n){let a=e&&uf(e);if(!n)if(a){let i=t.or++;return s=>t.parser.alternatives(i,[{ALT:()=>r(s),GATE:()=>a(s)},{ALT:K7(),GATE:()=>!a(s)}])}else return r;if(n==="*"){let i=t.many++;return s=>t.parser.many(i,{DEF:()=>r(s),GATE:a?()=>a(s):void 0})}else if(n==="+"){let i=t.many++;if(a){let s=t.or++;return o=>t.parser.alternatives(s,[{ALT:()=>t.parser.atLeastOne(i,{DEF:()=>r(o)}),GATE:()=>a(o)},{ALT:K7(),GATE:()=>!a(o)}])}else return s=>t.parser.atLeastOne(i,{DEF:()=>r(s)})}else if(n==="?"){let i=t.optional++;return s=>t.parser.optional(i,{DEF:()=>r(s),GATE:a?()=>a(s):void 0})}else Ec(n)}function ETe(t,e){let r=D1t(t,e),n=t.parser.getRule(r);if(!n)throw new Error(`Rule "${r}" not found."`);return n}function D1t(t,e){if(is(e))return e.name;if(t.ruleNames.has(e))return t.ruleNames.get(e);{let r=e,n=r.$container,a=e.$type;for(;!is(n);)(Pd(n)||R_(n)||D_(n))&&(a=n.elements.indexOf(r).toString()+":"+a),r=n,n=n.$container;return a=n.name+":"+a,t.ruleNames.set(e,a),a}}function yG(t,e){let r=t.tokens[e];if(!r)throw new Error(`Token "${e}" not found."`);return r}var lA=A(()=>{b0();Cc();C_();ho();mu()});function xG(t){let e=t.Grammar,r=t.parser.Lexer,n=new dw(t);return mw(e,n,r.definition),n.finalize(),n}var bG=A(()=>{pw();lA()});function wG(t){let e=CTe(t);return e.finalize(),e}function CTe(t){let e=t.Grammar,r=t.parser.Lexer,n=new fw(t);return mw(e,n,r.definition)}var kG=A(()=>{pw();lA()});var cf,uA=A(()=>{b0();Cc();_s();mu();oy();ho();cf=class{constructor(){this.diagnostics=[]}buildTokens(e,r){let n=Kr(r5(e,!1)),a=this.buildTerminalTokens(n),i=this.buildKeywordTokens(n,a,r);return a.forEach(s=>{let o=s.PATTERN;typeof o=="object"&&o&&"test"in o&&sy(o)?i.unshift(s):i.push(s)}),i}flushLexingReport(e){return{diagnostics:this.popDiagnostics()}}popDiagnostics(){let e=[...this.diagnostics];return this.diagnostics=[],e}buildTerminalTokens(e){return e.filter(Ho).filter(r=>!r.fragment).map(r=>this.buildTerminalToken(r)).toArray()}buildTerminalToken(e){let r=uy(e),n=this.requiresCustomPattern(r)?this.regexPatternFunction(r):r,a={name:e.name,PATTERN:n};return typeof n=="function"&&(a.LINE_BREAKS=!0),e.hidden&&(a.GROUP=sy(r)?Wn.SKIPPED:"hidden"),a}requiresCustomPattern(e){return e.flags.includes("u")||e.flags.includes("s")?!0:!!(e.source.includes("?<=")||e.source.includes("?(r.lastIndex=a,r.exec(n))}buildKeywordTokens(e,r,n){return e.filter(is).flatMap(a=>Sc(a).filter(bl)).distinct(a=>a.value).toArray().sort((a,i)=>i.value.length-a.value.length).map(a=>this.buildKeywordToken(a,r,!!n?.caseInsensitive))}buildKeywordToken(e,r,n){let a=this.buildKeywordPattern(e,n),i={name:e.value,PATTERN:a,LONGER_ALT:this.findLongerAlt(e,r)};return typeof a=="function"&&(i.LINE_BREAKS=!0),i}buildKeywordPattern(e,r){return r?new RegExp(DF(e.value)):e.value}findLongerAlt(e,r){return r.reduce((n,a)=>{let i=a?.PATTERN;return i?.source&&NF("^"+i.source+"$",e.value)&&n.push(a),n},[])}}});var Pm,Vc,TG=A(()=>{Cc();mu();Pm=class{convert(e,r){let n=r.grammarSource;if(dm(n)&&(n=PF(n)),pu(n)){let a=n.rule.ref;if(!a)throw new Error("This cst node was not parsed by a rule.");return this.runConverter(a,e,r)}return e}runConverter(e,r,n){var a;switch(e.name.toUpperCase()){case"INT":return Vc.convertInt(r);case"STRING":return Vc.convertString(r);case"ID":return Vc.convertID(r)}switch((a=qF(e))===null||a===void 0?void 0:a.toLowerCase()){case"number":return Vc.convertNumber(r);case"boolean":return Vc.convertBoolean(r);case"bigint":return Vc.convertBigint(r);case"date":return Vc.convertDate(r);default:return r}}};(function(t){function e(u){let h="";for(let f=1;f{"use strict";Object.defineProperty(SG,"__esModule",{value:!0});var EG;function CG(){if(EG===void 0)throw new Error("No runtime abstraction layer installed");return EG}(function(t){function e(r){if(r===void 0)throw new Error("No runtime abstraction layer provided");EG=r}t.install=e})(CG||(CG={}));SG.default=CG});var ATe=va(cs=>{"use strict";Object.defineProperty(cs,"__esModule",{value:!0});cs.stringArray=cs.array=cs.func=cs.error=cs.number=cs.string=cs.boolean=void 0;function N1t(t){return t===!0||t===!1}cs.boolean=N1t;function STe(t){return typeof t=="string"||t instanceof String}cs.string=STe;function M1t(t){return typeof t=="number"||t instanceof Number}cs.number=M1t;function O1t(t){return t instanceof Error}cs.error=O1t;function P1t(t){return typeof t=="function"}cs.func=P1t;function _Te(t){return Array.isArray(t)}cs.array=_Te;function B1t(t){return _Te(t)&&t.every(e=>STe(e))}cs.stringArray=B1t});var LG=va(D2=>{"use strict";Object.defineProperty(D2,"__esModule",{value:!0});D2.Emitter=D2.Event=void 0;var F1t=_G(),LTe;(function(t){let e={dispose(){}};t.None=function(){return e}})(LTe||(D2.Event=LTe={}));var AG=class{add(e,r=null,n){this._callbacks||(this._callbacks=[],this._contexts=[]),this._callbacks.push(e),this._contexts.push(r),Array.isArray(n)&&n.push({dispose:()=>this.remove(e,r)})}remove(e,r=null){if(!this._callbacks)return;let n=!1;for(let a=0,i=this._callbacks.length;a{this._callbacks||(this._callbacks=new AG),this._options&&this._options.onFirstListenerAdd&&this._callbacks.isEmpty()&&this._options.onFirstListenerAdd(this),this._callbacks.add(e,r);let a={dispose:()=>{this._callbacks&&(this._callbacks.remove(e,r),a.dispose=t._noop,this._options&&this._options.onLastListenerRemove&&this._callbacks.isEmpty()&&this._options.onLastListenerRemove(this))}};return Array.isArray(n)&&n.push(a),a}),this._event}fire(e){this._callbacks&&this._callbacks.invoke.call(this._callbacks,e)}dispose(){this._callbacks&&(this._callbacks.dispose(),this._callbacks=void 0)}};D2.Emitter=cA;cA._noop=function(){}});var RTe=va(N2=>{"use strict";Object.defineProperty(N2,"__esModule",{value:!0});N2.CancellationTokenSource=N2.CancellationToken=void 0;var z1t=_G(),$1t=ATe(),RG=LG(),hA;(function(t){t.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:RG.Event.None}),t.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:RG.Event.None});function e(r){let n=r;return n&&(n===t.None||n===t.Cancelled||$1t.boolean(n.isCancellationRequested)&&!!n.onCancellationRequested)}t.is=e})(hA||(N2.CancellationToken=hA={}));var G1t=Object.freeze(function(t,e){let r=(0,z1t.default)().timer.setTimeout(t.bind(e),0);return{dispose(){r.dispose()}}}),fA=class{constructor(){this._isCancelled=!1}cancel(){this._isCancelled||(this._isCancelled=!0,this._emitter&&(this._emitter.fire(void 0),this.dispose()))}get isCancellationRequested(){return this._isCancelled}get onCancellationRequested(){return this._isCancelled?G1t:(this._emitter||(this._emitter=new RG.Emitter),this._emitter.event)}dispose(){this._emitter&&(this._emitter.dispose(),this._emitter=void 0)}},IG=class{get token(){return this._token||(this._token=new fA),this._token}cancel(){this._token?this._token.cancel():this._token=hA.Cancelled}dispose(){this._token?this._token instanceof fA&&this._token.dispose():this._token=hA.None}};N2.CancellationTokenSource=IG});var hr={};var _l=A(()=>{br(hr,ii(RTe(),1))});function DG(){return new Promise(t=>{typeof setImmediate>"u"?setTimeout(t,0):setImmediate(t)})}function pA(){return dA=performance.now(),new hr.CancellationTokenSource}function DTe(t){ITe=t}function Wc(t){return t===Hc}async function ka(t){if(t===hr.CancellationToken.None)return;let e=performance.now();if(e-dA>=ITe&&(dA=e,await DG(),dA=performance.now()),t.isCancellationRequested)throw Hc}var dA,ITe,Hc,Fs,Al=A(()=>{_l();dA=0,ITe=10;Hc=Symbol("OperationCancelled");Fs=class{constructor(){this.promise=new Promise((e,r)=>{this.resolve=n=>(e(n),this),this.reject=n=>(r(n),this)})}}});function NG(t,e){if(t.length<=1)return t;let r=t.length/2|0,n=t.slice(0,r),a=t.slice(r);NG(n,e),NG(a,e);let i=0,s=0,o=0;for(;ir.line||e.line===r.line&&e.character>r.character?{start:r,end:e}:t}function U1t(t){let e=OTe(t.range);return e!==t.range?{newText:t.newText,range:e}:t}var mA,M2,PTe=A(()=>{"use strict";mA=class t{constructor(e,r,n,a){this._uri=e,this._languageId=r,this._version=n,this._content=a,this._lineOffsets=void 0}get uri(){return this._uri}get languageId(){return this._languageId}get version(){return this._version}getText(e){if(e){let r=this.offsetAt(e.start),n=this.offsetAt(e.end);return this._content.substring(r,n)}return this._content}update(e,r){for(let n of e)if(t.isIncremental(n)){let a=OTe(n.range),i=this.offsetAt(a.start),s=this.offsetAt(a.end);this._content=this._content.substring(0,i)+n.text+this._content.substring(s,this._content.length);let o=Math.max(a.start.line,0),l=Math.max(a.end.line,0),u=this._lineOffsets,h=NTe(n.text,!1,i);if(l-o===h.length)for(let d=0,p=h.length;de?a=s:n=s+1}let i=n-1;return e=this.ensureBeforeEOL(e,r[i]),{line:i,character:e-r[i]}}offsetAt(e){let r=this.getLineOffsets();if(e.line>=r.length)return this._content.length;if(e.line<0)return 0;let n=r[e.line];if(e.character<=0)return n;let a=e.line+1r&&MTe(this._content.charCodeAt(e-1));)e--;return e}get lineCount(){return this.getLineOffsets().length}static isIncremental(e){let r=e;return r!=null&&typeof r.text=="string"&&r.range!==void 0&&(r.rangeLength===void 0||typeof r.rangeLength=="number")}static isFull(e){let r=e;return r!=null&&typeof r.text=="string"&&r.range===void 0&&r.rangeLength===void 0}};(function(t){function e(a,i,s,o){return new mA(a,i,s,o)}t.create=e;function r(a,i,s){if(a instanceof mA)return a.update(i,s),a;throw new Error("TextDocument.update: document must be created by TextDocument.create")}t.update=r;function n(a,i){let s=a.getText(),o=NG(i.map(U1t),(h,f)=>{let d=h.range.start.line-f.range.start.line;return d===0?h.range.start.character-f.range.start.character:d}),l=0,u=[];for(let h of o){let f=a.offsetAt(h.range.start);if(fl&&u.push(s.substring(l,f)),h.newText.length&&u.push(h.newText),l=a.offsetAt(h.range.end)}return u.push(s.substr(l)),u.join("")}t.applyEdits=n})(M2||(M2={}))});var BTe,zs,O2,MG=A(()=>{(()=>{"use strict";var t={470:a=>{function i(l){if(typeof l!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(l))}function s(l,u){for(var h,f="",d=0,p=-1,m=0,g=0;g<=l.length;++g){if(g2){var v=f.lastIndexOf("/");if(v!==f.length-1){v===-1?(f="",d=0):d=(f=f.slice(0,v)).length-1-f.lastIndexOf("/"),p=g,m=0;continue}}else if(f.length===2||f.length===1){f="",d=0,p=g,m=0;continue}}u&&(f.length>0?f+="/..":f="..",d=2)}else f.length>0?f+="/"+l.slice(p+1,g):f=l.slice(p+1,g),d=g-p-1;p=g,m=0}else h===46&&m!==-1?++m:m=-1}return f}var o={resolve:function(){for(var l,u="",h=!1,f=arguments.length-1;f>=-1&&!h;f--){var d;f>=0?d=arguments[f]:(l===void 0&&(l=process.cwd()),d=l),i(d),d.length!==0&&(u=d+"/"+u,h=d.charCodeAt(0)===47)}return u=s(u,!h),h?u.length>0?"/"+u:"/":u.length>0?u:"."},normalize:function(l){if(i(l),l.length===0)return".";var u=l.charCodeAt(0)===47,h=l.charCodeAt(l.length-1)===47;return(l=s(l,!u)).length!==0||u||(l="."),l.length>0&&h&&(l+="/"),u?"/"+l:l},isAbsolute:function(l){return i(l),l.length>0&&l.charCodeAt(0)===47},join:function(){if(arguments.length===0)return".";for(var l,u=0;u0&&(l===void 0?l=h:l+="/"+h)}return l===void 0?".":o.normalize(l)},relative:function(l,u){if(i(l),i(u),l===u||(l=o.resolve(l))===(u=o.resolve(u)))return"";for(var h=1;hg){if(u.charCodeAt(p+y)===47)return u.slice(p+y+1);if(y===0)return u.slice(p+y)}else d>g&&(l.charCodeAt(h+y)===47?v=y:y===0&&(v=0));break}var b=l.charCodeAt(h+y);if(b!==u.charCodeAt(p+y))break;b===47&&(v=y)}var w="";for(y=h+v+1;y<=f;++y)y!==f&&l.charCodeAt(y)!==47||(w.length===0?w+="..":w+="/..");return w.length>0?w+u.slice(p+v):(p+=v,u.charCodeAt(p)===47&&++p,u.slice(p))},_makeLong:function(l){return l},dirname:function(l){if(i(l),l.length===0)return".";for(var u=l.charCodeAt(0),h=u===47,f=-1,d=!0,p=l.length-1;p>=1;--p)if((u=l.charCodeAt(p))===47){if(!d){f=p;break}}else d=!1;return f===-1?h?"/":".":h&&f===1?"//":l.slice(0,f)},basename:function(l,u){if(u!==void 0&&typeof u!="string")throw new TypeError('"ext" argument must be a string');i(l);var h,f=0,d=-1,p=!0;if(u!==void 0&&u.length>0&&u.length<=l.length){if(u.length===l.length&&u===l)return"";var m=u.length-1,g=-1;for(h=l.length-1;h>=0;--h){var v=l.charCodeAt(h);if(v===47){if(!p){f=h+1;break}}else g===-1&&(p=!1,g=h+1),m>=0&&(v===u.charCodeAt(m)?--m==-1&&(d=h):(m=-1,d=g))}return f===d?d=g:d===-1&&(d=l.length),l.slice(f,d)}for(h=l.length-1;h>=0;--h)if(l.charCodeAt(h)===47){if(!p){f=h+1;break}}else d===-1&&(p=!1,d=h+1);return d===-1?"":l.slice(f,d)},extname:function(l){i(l);for(var u=-1,h=0,f=-1,d=!0,p=0,m=l.length-1;m>=0;--m){var g=l.charCodeAt(m);if(g!==47)f===-1&&(d=!1,f=m+1),g===46?u===-1?u=m:p!==1&&(p=1):u!==-1&&(p=-1);else if(!d){h=m+1;break}}return u===-1||f===-1||p===0||p===1&&u===f-1&&u===h+1?"":l.slice(u,f)},format:function(l){if(l===null||typeof l!="object")throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof l);return(function(u,h){var f=h.dir||h.root,d=h.base||(h.name||"")+(h.ext||"");return f?f===h.root?f+d:f+"/"+d:d})(0,l)},parse:function(l){i(l);var u={root:"",dir:"",base:"",ext:"",name:""};if(l.length===0)return u;var h,f=l.charCodeAt(0),d=f===47;d?(u.root="/",h=1):h=0;for(var p=-1,m=0,g=-1,v=!0,y=l.length-1,b=0;y>=h;--y)if((f=l.charCodeAt(y))!==47)g===-1&&(v=!1,g=y+1),f===46?p===-1?p=y:b!==1&&(b=1):p!==-1&&(b=-1);else if(!v){m=y+1;break}return p===-1||g===-1||b===0||b===1&&p===g-1&&p===m+1?g!==-1&&(u.base=u.name=m===0&&d?l.slice(1,g):l.slice(m,g)):(m===0&&d?(u.name=l.slice(1,p),u.base=l.slice(1,g)):(u.name=l.slice(m,p),u.base=l.slice(m,g)),u.ext=l.slice(p,g)),m>0?u.dir=l.slice(0,m-1):d&&(u.dir="/"),u},sep:"/",delimiter:":",win32:null,posix:null};o.posix=o,a.exports=o}},e={};function r(a){var i=e[a];if(i!==void 0)return i.exports;var s=e[a]={exports:{}};return t[a](s,s.exports,r),s.exports}r.d=(a,i)=>{for(var s in i)r.o(i,s)&&!r.o(a,s)&&Object.defineProperty(a,s,{enumerable:!0,get:i[s]})},r.o=(a,i)=>Object.prototype.hasOwnProperty.call(a,i),r.r=a=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(a,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(a,"__esModule",{value:!0})};var n={};(()=>{let a;r.r(n),r.d(n,{URI:()=>d,Utils:()=>M}),typeof process=="object"?a=process.platform==="win32":typeof navigator=="object"&&(a=navigator.userAgent.indexOf("Windows")>=0);let i=/^\w[\w\d+.-]*$/,s=/^\//,o=/^\/\//;function l(D,T){if(!D.scheme&&T)throw new Error(`[UriError]: Scheme is missing: {scheme: "", authority: "${D.authority}", path: "${D.path}", query: "${D.query}", fragment: "${D.fragment}"}`);if(D.scheme&&!i.test(D.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(D.path){if(D.authority){if(!s.test(D.path))throw new Error('[UriError]: If a URI contains an authority component, then the path component must either be empty or begin with a slash ("/") character')}else if(o.test(D.path))throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")')}}let u="",h="/",f=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/;class d{static isUri(T){return T instanceof d||!!T&&typeof T.authority=="string"&&typeof T.fragment=="string"&&typeof T.path=="string"&&typeof T.query=="string"&&typeof T.scheme=="string"&&typeof T.fsPath=="string"&&typeof T.with=="function"&&typeof T.toString=="function"}scheme;authority;path;query;fragment;constructor(T,I,N,O,R,P=!1){typeof T=="object"?(this.scheme=T.scheme||u,this.authority=T.authority||u,this.path=T.path||u,this.query=T.query||u,this.fragment=T.fragment||u):(this.scheme=(function(B,F){return B||F?B:"file"})(T,P),this.authority=I||u,this.path=(function(B,F){switch(B){case"https":case"http":case"file":F?F[0]!==h&&(F=h+F):F=h}return F})(this.scheme,N||u),this.query=O||u,this.fragment=R||u,l(this,P))}get fsPath(){return b(this,!1)}with(T){if(!T)return this;let{scheme:I,authority:N,path:O,query:R,fragment:P}=T;return I===void 0?I=this.scheme:I===null&&(I=u),N===void 0?N=this.authority:N===null&&(N=u),O===void 0?O=this.path:O===null&&(O=u),R===void 0?R=this.query:R===null&&(R=u),P===void 0?P=this.fragment:P===null&&(P=u),I===this.scheme&&N===this.authority&&O===this.path&&R===this.query&&P===this.fragment?this:new m(I,N,O,R,P)}static parse(T,I=!1){let N=f.exec(T);return N?new m(N[2]||u,E(N[4]||u),E(N[5]||u),E(N[7]||u),E(N[9]||u),I):new m(u,u,u,u,u)}static file(T){let I=u;if(a&&(T=T.replace(/\\/g,h)),T[0]===h&&T[1]===h){let N=T.indexOf(h,2);N===-1?(I=T.substring(2),T=h):(I=T.substring(2,N),T=T.substring(N)||h)}return new m("file",I,T,u,u)}static from(T){let I=new m(T.scheme,T.authority,T.path,T.query,T.fragment);return l(I,!0),I}toString(T=!1){return w(this,T)}toJSON(){return this}static revive(T){if(T){if(T instanceof d)return T;{let I=new m(T);return I._formatted=T.external,I._fsPath=T._sep===p?T.fsPath:null,I}}return T}}let p=a?1:void 0;class m extends d{_formatted=null;_fsPath=null;get fsPath(){return this._fsPath||(this._fsPath=b(this,!1)),this._fsPath}toString(T=!1){return T?w(this,!0):(this._formatted||(this._formatted=w(this,!1)),this._formatted)}toJSON(){let T={$mid:1};return this._fsPath&&(T.fsPath=this._fsPath,T._sep=p),this._formatted&&(T.external=this._formatted),this.path&&(T.path=this.path),this.scheme&&(T.scheme=this.scheme),this.authority&&(T.authority=this.authority),this.query&&(T.query=this.query),this.fragment&&(T.fragment=this.fragment),T}}let g={58:"%3A",47:"%2F",63:"%3F",35:"%23",91:"%5B",93:"%5D",64:"%40",33:"%21",36:"%24",38:"%26",39:"%27",40:"%28",41:"%29",42:"%2A",43:"%2B",44:"%2C",59:"%3B",61:"%3D",32:"%20"};function v(D,T,I){let N,O=-1;for(let R=0;R=97&&P<=122||P>=65&&P<=90||P>=48&&P<=57||P===45||P===46||P===95||P===126||T&&P===47||I&&P===91||I&&P===93||I&&P===58)O!==-1&&(N+=encodeURIComponent(D.substring(O,R)),O=-1),N!==void 0&&(N+=D.charAt(R));else{N===void 0&&(N=D.substr(0,R));let B=g[P];B!==void 0?(O!==-1&&(N+=encodeURIComponent(D.substring(O,R)),O=-1),N+=B):O===-1&&(O=R)}}return O!==-1&&(N+=encodeURIComponent(D.substring(O))),N!==void 0?N:D}function y(D){let T;for(let I=0;I1&&D.scheme==="file"?`//${D.authority}${D.path}`:D.path.charCodeAt(0)===47&&(D.path.charCodeAt(1)>=65&&D.path.charCodeAt(1)<=90||D.path.charCodeAt(1)>=97&&D.path.charCodeAt(1)<=122)&&D.path.charCodeAt(2)===58?T?D.path.substr(1):D.path[1].toLowerCase()+D.path.substr(2):D.path,a&&(I=I.replace(/\//g,"\\")),I}function w(D,T){let I=T?y:v,N="",{scheme:O,authority:R,path:P,query:B,fragment:F}=D;if(O&&(N+=O,N+=":"),(R||O==="file")&&(N+=h,N+=h),R){let G=R.indexOf("@");if(G!==-1){let z=R.substr(0,G);R=R.substr(G+1),G=z.lastIndexOf(":"),G===-1?N+=I(z,!1,!1):(N+=I(z.substr(0,G),!1,!1),N+=":",N+=I(z.substr(G+1),!1,!0)),N+="@"}R=R.toLowerCase(),G=R.lastIndexOf(":"),G===-1?N+=I(R,!1,!0):(N+=I(R.substr(0,G),!1,!0),N+=R.substr(G))}if(P){if(P.length>=3&&P.charCodeAt(0)===47&&P.charCodeAt(2)===58){let G=P.charCodeAt(1);G>=65&&G<=90&&(P=`/${String.fromCharCode(G+32)}:${P.substr(3)}`)}else if(P.length>=2&&P.charCodeAt(1)===58){let G=P.charCodeAt(0);G>=65&&G<=90&&(P=`${String.fromCharCode(G+32)}:${P.substr(2)}`)}N+=I(P,!0,!1)}return B&&(N+="?",N+=I(B,!1,!1)),F&&(N+="#",N+=T?F:v(F,!1,!1)),N}function C(D){try{return decodeURIComponent(D)}catch{return D.length>3?D.substr(0,3)+C(D.substr(3)):D}}let k=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function E(D){return D.match(k)?D.replace(k,(T=>C(T))):D}var _=r(470);let S=_.posix||_,L="/";var M;(function(D){D.joinPath=function(T,...I){return T.with({path:S.join(T.path,...I)})},D.resolvePath=function(T,...I){let N=T.path,O=!1;N[0]!==L&&(N=L+N,O=!0);let R=S.resolve(N,...I);return O&&R[0]===L&&!T.authority&&(R=R.substring(1)),T.with({path:R})},D.dirname=function(T){if(T.path.length===0||T.path===L)return T;let I=S.dirname(T.path);return I.length===1&&I.charCodeAt(0)===46&&(I=""),T.with({path:I})},D.basename=function(T){return S.basename(T.path)},D.extname=function(T){return S.extname(T.path)}})(M||(M={}))})(),BTe=n})();({URI:zs,Utils:O2}=BTe)});var $s,Yc=A(()=>{MG();(function(t){t.basename=O2.basename,t.dirname=O2.dirname,t.extname=O2.extname,t.joinPath=O2.joinPath,t.resolvePath=O2.resolvePath;function e(a,i){return a?.toString()===i?.toString()}t.equals=e;function r(a,i){let s=typeof a=="string"?a:a.path,o=typeof i=="string"?i:i.path,l=s.split("/").filter(p=>p.length>0),u=o.split("/").filter(p=>p.length>0),h=0;for(;h{PTe();P2();_l();ho();Yc();(function(t){t[t.Changed=0]="Changed",t[t.Parsed=1]="Parsed",t[t.IndexedContent=2]="IndexedContent",t[t.ComputedScopes=3]="ComputedScopes",t[t.Linked=4]="Linked",t[t.IndexedReferences=5]="IndexedReferences",t[t.Validated=6]="Validated"})(wn||(wn={}));gw=class{constructor(e){this.serviceRegistry=e.ServiceRegistry,this.textDocuments=e.workspace.TextDocuments,this.fileSystemProvider=e.workspace.FileSystemProvider}async fromUri(e,r=hr.CancellationToken.None){let n=await this.fileSystemProvider.readFile(e);return this.createAsync(e,n,r)}fromTextDocument(e,r,n){return r=r??zs.parse(e.uri),hr.CancellationToken.is(n)?this.createAsync(r,e,n):this.create(r,e,n)}fromString(e,r,n){return hr.CancellationToken.is(n)?this.createAsync(r,e,n):this.create(r,e,n)}fromModel(e,r){return this.create(r,{$model:e})}create(e,r,n){if(typeof r=="string"){let a=this.parse(e,r,n);return this.createLangiumDocument(a,e,void 0,r)}else if("$model"in r){let a={value:r.$model,parserErrors:[],lexerErrors:[]};return this.createLangiumDocument(a,e)}else{let a=this.parse(e,r.getText(),n);return this.createLangiumDocument(a,e,r)}}async createAsync(e,r,n){if(typeof r=="string"){let a=await this.parseAsync(e,r,n);return this.createLangiumDocument(a,e,void 0,r)}else{let a=await this.parseAsync(e,r.getText(),n);return this.createLangiumDocument(a,e,r)}}createLangiumDocument(e,r,n,a){let i;if(n)i={parseResult:e,uri:r,state:wn.Parsed,references:[],textDocument:n};else{let s=this.createTextDocumentGetter(r,a);i={parseResult:e,uri:r,state:wn.Parsed,references:[],get textDocument(){return s()}}}return e.value.$document=i,i}async update(e,r){var n,a;let i=(n=e.parseResult.value.$cstNode)===null||n===void 0?void 0:n.root.fullText,s=(a=this.textDocuments)===null||a===void 0?void 0:a.get(e.uri.toString()),o=s?s.getText():await this.fileSystemProvider.readFile(e.uri);if(s)Object.defineProperty(e,"textDocument",{value:s});else{let l=this.createTextDocumentGetter(e.uri,o);Object.defineProperty(e,"textDocument",{get:l})}return i!==o&&(e.parseResult=await this.parseAsync(e.uri,o,r),e.parseResult.value.$document=e),e.state=wn.Parsed,e}parse(e,r,n){return this.serviceRegistry.getServices(e).parser.LangiumParser.parse(r,n)}parseAsync(e,r,n){return this.serviceRegistry.getServices(e).parser.AsyncParser.parse(r,n)}createTextDocumentGetter(e,r){let n=this.serviceRegistry,a;return()=>a??(a=M2.create(e.toString(),n.getServices(e).LanguageMetaData.languageId,0,r??""))}},vw=class{constructor(e){this.documentMap=new Map,this.langiumDocumentFactory=e.workspace.LangiumDocumentFactory,this.serviceRegistry=e.ServiceRegistry}get all(){return Kr(this.documentMap.values())}addDocument(e){let r=e.uri.toString();if(this.documentMap.has(r))throw new Error(`A document with the URI '${r}' is already present.`);this.documentMap.set(r,e)}getDocument(e){let r=e.toString();return this.documentMap.get(r)}async getOrCreateDocument(e,r){let n=this.getDocument(e);return n||(n=await this.langiumDocumentFactory.fromUri(e,r),this.addDocument(n),n)}createDocument(e,r,n){if(n)return this.langiumDocumentFactory.fromString(r,e,n).then(a=>(this.addDocument(a),a));{let a=this.langiumDocumentFactory.fromString(r,e);return this.addDocument(a),a}}hasDocument(e){return this.documentMap.has(e.toString())}invalidateDocument(e){let r=e.toString(),n=this.documentMap.get(r);return n&&(this.serviceRegistry.getServices(e).references.Linker.unlink(n),n.state=wn.Changed,n.precomputedScopes=void 0,n.diagnostics=void 0),n}deleteDocument(e){let r=e.toString(),n=this.documentMap.get(r);return n&&(n.state=wn.Changed,this.documentMap.delete(r)),n}}});var OG,yw,PG=A(()=>{_l();hu();_s();Al();P2();OG=Symbol("ref_resolving"),yw=class{constructor(e){this.reflection=e.shared.AstReflection,this.langiumDocuments=()=>e.shared.workspace.LangiumDocuments,this.scopeProvider=e.references.ScopeProvider,this.astNodeLocator=e.workspace.AstNodeLocator}async link(e,r=hr.CancellationToken.None){for(let n of wl(e.parseResult.value))await ka(r),ay(n).forEach(a=>this.doLink(a,e))}doLink(e,r){var n;let a=e.reference;if(a._ref===void 0){a._ref=OG;try{let i=this.getCandidate(e);if(lm(i))a._ref=i;else if(a._nodeDescription=i,this.langiumDocuments().hasDocument(i.documentUri)){let s=this.loadAstNode(i);a._ref=s??this.createLinkingError(e,i)}else a._ref=void 0}catch(i){console.error(`An error occurred while resolving reference to '${a.$refText}':`,i);let s=(n=i.message)!==null&&n!==void 0?n:String(i);a._ref=Object.assign(Object.assign({},e),{message:`An error occurred while resolving reference to '${a.$refText}': ${s}`})}r.references.push(a)}}unlink(e){for(let r of e.references)delete r._ref,delete r._nodeDescription;e.references=[]}getCandidate(e){let n=this.scopeProvider.getScope(e).getElement(e.reference.$refText);return n??this.createLinkingError(e)}buildReference(e,r,n,a){let i=this,s={$refNode:n,$refText:a,get ref(){var o;if(na(this._ref))return this._ref;if(eF(this._nodeDescription)){let l=i.loadAstNode(this._nodeDescription);this._ref=l??i.createLinkingError({reference:s,container:e,property:r},this._nodeDescription)}else if(this._ref===void 0){this._ref=OG;let l=K3(e).$document,u=i.getLinkedNode({reference:s,container:e,property:r});if(u.error&&l&&l.state{mu();xw=class{getName(e){if(FTe(e))return e.name}getNameNode(e){return n5(e.$cstNode,"name")}}});var bw,FG=A(()=>{mu();hu();_s();fu();ho();Yc();bw=class{constructor(e){this.nameProvider=e.references.NameProvider,this.index=e.shared.workspace.IndexManager,this.nodeLocator=e.workspace.AstNodeLocator}findDeclaration(e){if(e){let r=UF(e),n=e.astNode;if(r&&n){let a=n[r.feature];if(Ui(a))return a.ref;if(Array.isArray(a)){for(let i of a)if(Ui(i)&&i.$refNode&&i.$refNode.offset<=e.offset&&i.$refNode.end>=e.end)return i.ref}}if(n){let a=this.nameProvider.getNameNode(n);if(a&&(a===e||rF(e,a)))return n}}}findDeclarationNode(e){let r=this.findDeclaration(e);if(r?.$cstNode){let n=this.nameProvider.getNameNode(r);return n??r.$cstNode}}findReferences(e,r){let n=[];if(r.includeDeclaration){let i=this.getReferenceToSelf(e);i&&n.push(i)}let a=this.index.findAllReferences(e,this.nodeLocator.getAstNodePath(e));return r.documentUri&&(a=a.filter(i=>$s.equals(i.sourceUri,r.documentUri))),n.push(...a),Kr(n)}getReferenceToSelf(e){let r=this.nameProvider.getNameNode(e);if(r){let n=ss(e),a=this.nodeLocator.getAstNodePath(e);return{sourceUri:n.uri,sourcePath:a,targetUri:n.uri,targetPath:a,segment:cm(r),local:!0}}}}});var Tu,Bm,B2=A(()=>{ho();Tu=class{constructor(e){if(this.map=new Map,e)for(let[r,n]of e)this.add(r,n)}get size(){return vv.sum(Kr(this.map.values()).map(e=>e.length))}clear(){this.map.clear()}delete(e,r){if(r===void 0)return this.map.delete(e);{let n=this.map.get(e);if(n){let a=n.indexOf(r);if(a>=0)return n.length===1?this.map.delete(e):n.splice(a,1),!0}return!1}}get(e){var r;return(r=this.map.get(e))!==null&&r!==void 0?r:[]}has(e,r){if(r===void 0)return this.map.has(e);{let n=this.map.get(e);return n?n.indexOf(r)>=0:!1}}add(e,r){return this.map.has(e)?this.map.get(e).push(r):this.map.set(e,[r]),this}addAll(e,r){return this.map.has(e)?this.map.get(e).push(...r):this.map.set(e,Array.from(r)),this}forEach(e){this.map.forEach((r,n)=>r.forEach(a=>e(a,n,this)))}[Symbol.iterator](){return this.entries().iterator()}entries(){return Kr(this.map.entries()).flatMap(([e,r])=>r.map(n=>[e,n]))}keys(){return Kr(this.map.keys())}values(){return Kr(this.map.values()).flat()}entriesGroupedByKey(){return Kr(this.map.entries())}},Bm=class{get size(){return this.map.size}constructor(e){if(this.map=new Map,this.inverse=new Map,e)for(let[r,n]of e)this.set(r,n)}clear(){this.map.clear(),this.inverse.clear()}set(e,r){return this.map.set(e,r),this.inverse.set(r,e),this}get(e){return this.map.get(e)}getKey(e){return this.inverse.get(e)}delete(e){let r=this.map.get(e);return r!==void 0?(this.map.delete(e),this.inverse.delete(r),!0):!1}}});var ww,zG=A(()=>{_l();_s();B2();Al();ww=class{constructor(e){this.nameProvider=e.references.NameProvider,this.descriptions=e.workspace.AstNodeDescriptionProvider}async computeExports(e,r=hr.CancellationToken.None){return this.computeExportsForNode(e.parseResult.value,e,void 0,r)}async computeExportsForNode(e,r,n=Z3,a=hr.CancellationToken.None){let i=[];this.exportNode(e,i,r);for(let s of n(e))await ka(a),this.exportNode(s,i,r);return i}exportNode(e,r,n){let a=this.nameProvider.getName(e);a&&r.push(this.descriptions.createDescription(e,a,n))}async computeLocalScopes(e,r=hr.CancellationToken.None){let n=e.parseResult.value,a=new Tu;for(let i of Sc(n))await ka(r),this.processNode(i,e,a);return a}processNode(e,r,n){let a=e.$container;if(a){let i=this.nameProvider.getName(e);i&&n.add(a,this.descriptions.createDescription(e,i,r))}}}});var F2,kw,q1t,$G=A(()=>{ho();F2=class{constructor(e,r,n){var a;this.elements=e,this.outerScope=r,this.caseInsensitive=(a=n?.caseInsensitive)!==null&&a!==void 0?a:!1}getAllElements(){return this.outerScope?this.elements.concat(this.outerScope.getAllElements()):this.elements}getElement(e){let r=this.caseInsensitive?this.elements.find(n=>n.name.toLowerCase()===e.toLowerCase()):this.elements.find(n=>n.name===e);if(r)return r;if(this.outerScope)return this.outerScope.getElement(e)}},kw=class{constructor(e,r,n){var a;this.elements=new Map,this.caseInsensitive=(a=n?.caseInsensitive)!==null&&a!==void 0?a:!1;for(let i of e){let s=this.caseInsensitive?i.name.toLowerCase():i.name;this.elements.set(s,i)}this.outerScope=r}getElement(e){let r=this.caseInsensitive?e.toLowerCase():e,n=this.elements.get(r);if(n)return n;if(this.outerScope)return this.outerScope.getElement(e)}getAllElements(){let e=Kr(this.elements.values());return this.outerScope&&(e=e.concat(this.outerScope.getAllElements())),e}},q1t={getElement(){},getAllElements(){return $3}}});var z2,Tw,Fm,gA,$2,vA=A(()=>{z2=class{constructor(){this.toDispose=[],this.isDisposed=!1}onDispose(e){this.toDispose.push(e)}dispose(){this.throwIfDisposed(),this.clear(),this.isDisposed=!0,this.toDispose.forEach(e=>e.dispose())}throwIfDisposed(){if(this.isDisposed)throw new Error("This cache has already been disposed")}},Tw=class extends z2{constructor(){super(...arguments),this.cache=new Map}has(e){return this.throwIfDisposed(),this.cache.has(e)}set(e,r){this.throwIfDisposed(),this.cache.set(e,r)}get(e,r){if(this.throwIfDisposed(),this.cache.has(e))return this.cache.get(e);if(r){let n=r();return this.cache.set(e,n),n}else return}delete(e){return this.throwIfDisposed(),this.cache.delete(e)}clear(){this.throwIfDisposed(),this.cache.clear()}},Fm=class extends z2{constructor(e){super(),this.cache=new Map,this.converter=e??(r=>r)}has(e,r){return this.throwIfDisposed(),this.cacheForContext(e).has(r)}set(e,r,n){this.throwIfDisposed(),this.cacheForContext(e).set(r,n)}get(e,r,n){this.throwIfDisposed();let a=this.cacheForContext(e);if(a.has(r))return a.get(r);if(n){let i=n();return a.set(r,i),i}else return}delete(e,r){return this.throwIfDisposed(),this.cacheForContext(e).delete(r)}clear(e){if(this.throwIfDisposed(),e){let r=this.converter(e);this.cache.delete(r)}else this.cache.clear()}cacheForContext(e){let r=this.converter(e),n=this.cache.get(r);return n||(n=new Map,this.cache.set(r,n)),n}},gA=class extends Fm{constructor(e,r){super(n=>n.toString()),r?(this.toDispose.push(e.workspace.DocumentBuilder.onDocumentPhase(r,n=>{this.clear(n.uri.toString())})),this.toDispose.push(e.workspace.DocumentBuilder.onUpdate((n,a)=>{for(let i of a)this.clear(i)}))):this.toDispose.push(e.workspace.DocumentBuilder.onUpdate((n,a)=>{let i=n.concat(a);for(let s of i)this.clear(s)}))}},$2=class extends Tw{constructor(e,r){super(),r?(this.toDispose.push(e.workspace.DocumentBuilder.onBuildPhase(r,()=>{this.clear()})),this.toDispose.push(e.workspace.DocumentBuilder.onUpdate((n,a)=>{a.length>0&&this.clear()}))):this.toDispose.push(e.workspace.DocumentBuilder.onUpdate(()=>{this.clear()}))}}});var Ew,GG=A(()=>{$G();_s();ho();vA();Ew=class{constructor(e){this.reflection=e.shared.AstReflection,this.nameProvider=e.references.NameProvider,this.descriptions=e.workspace.AstNodeDescriptionProvider,this.indexManager=e.shared.workspace.IndexManager,this.globalScopeCache=new $2(e.shared)}getScope(e){let r=[],n=this.reflection.getReferenceType(e),a=ss(e.container).precomputedScopes;if(a){let s=e.container;do{let o=a.get(s);o.length>0&&r.push(Kr(o).filter(l=>this.reflection.isSubtype(l.type,n))),s=s.$container}while(s)}let i=this.getGlobalScope(n,e);for(let s=r.length-1;s>=0;s--)i=this.createScope(r[s],i);return i}createScope(e,r,n){return new F2(Kr(e),r,n)}createScopeForNodes(e,r,n){let a=Kr(e).map(i=>{let s=this.nameProvider.getName(i);if(s)return this.descriptions.createDescription(i,s)}).nonNullable();return new F2(a,r,n)}getGlobalScope(e,r){return this.globalScopeCache.get(e,()=>new kw(this.indexManager.allElements(e)))}}});function UG(t){return typeof t.$comment=="string"}function zTe(t){return typeof t=="object"&&!!t&&("$ref"in t||"$error"in t)}var Cw,yA=A(()=>{MG();hu();_s();mu();Cw=class{constructor(e){this.ignoreProperties=new Set(["$container","$containerProperty","$containerIndex","$document","$cstNode"]),this.langiumDocuments=e.shared.workspace.LangiumDocuments,this.astNodeLocator=e.workspace.AstNodeLocator,this.nameProvider=e.references.NameProvider,this.commentProvider=e.documentation.CommentProvider}serialize(e,r){let n=r??{},a=r?.replacer,i=(o,l)=>this.replacer(o,l,n),s=a?(o,l)=>a(o,l,i):i;try{return this.currentDocument=ss(e),JSON.stringify(e,s,r?.space)}finally{this.currentDocument=void 0}}deserialize(e,r){let n=r??{},a=JSON.parse(e);return this.linkNode(a,a,n),a}replacer(e,r,{refText:n,sourceText:a,textRegions:i,comments:s,uriConverter:o}){var l,u,h,f;if(!this.ignoreProperties.has(e))if(Ui(r)){let d=r.ref,p=n?r.$refText:void 0;if(d){let m=ss(d),g="";this.currentDocument&&this.currentDocument!==m&&(o?g=o(m.uri,r):g=m.uri.toString());let v=this.astNodeLocator.getAstNodePath(d);return{$ref:`${g}#${v}`,$refText:p}}else return{$error:(u=(l=r.error)===null||l===void 0?void 0:l.message)!==null&&u!==void 0?u:"Could not resolve reference",$refText:p}}else if(na(r)){let d;if(i&&(d=this.addAstNodeRegionWithAssignmentsTo(Object.assign({},r)),(!e||r.$document)&&d?.$textRegion&&(d.$textRegion.documentURI=(h=this.currentDocument)===null||h===void 0?void 0:h.uri.toString())),a&&!e&&(d??(d=Object.assign({},r)),d.$sourceText=(f=r.$cstNode)===null||f===void 0?void 0:f.text),s){d??(d=Object.assign({},r));let p=this.commentProvider.getComment(r);p&&(d.$comment=p.replace(/\r/g,""))}return d??r}else return r}addAstNodeRegionWithAssignmentsTo(e){let r=n=>({offset:n.offset,end:n.end,length:n.length,range:n.range});if(e.$cstNode){let n=e.$textRegion=r(e.$cstNode),a=n.assignments={};return Object.keys(e).filter(i=>!i.startsWith("$")).forEach(i=>{let s=FF(e.$cstNode,i).map(r);s.length!==0&&(a[i]=s)}),e}}linkNode(e,r,n,a,i,s){for(let[l,u]of Object.entries(e))if(Array.isArray(u))for(let h=0;h{Yc();Sw=class{get map(){return this.fileExtensionMap}constructor(e){this.languageIdMap=new Map,this.fileExtensionMap=new Map,this.textDocuments=e?.workspace.TextDocuments}register(e){let r=e.LanguageMetaData;for(let n of r.fileExtensions)this.fileExtensionMap.has(n)&&console.warn(`The file extension ${n} is used by multiple languages. It is now assigned to '${r.languageId}'.`),this.fileExtensionMap.set(n,e);this.languageIdMap.set(r.languageId,e),this.languageIdMap.size===1?this.singleton=e:this.singleton=void 0}getServices(e){var r,n;if(this.singleton!==void 0)return this.singleton;if(this.languageIdMap.size===0)throw new Error("The service registry is empty. Use `register` to register the services of a language.");let a=(n=(r=this.textDocuments)===null||r===void 0?void 0:r.get(e))===null||n===void 0?void 0:n.languageId;if(a!==void 0){let o=this.languageIdMap.get(a);if(o)return o}let i=$s.extname(e),s=this.fileExtensionMap.get(i);if(!s)throw a?new Error(`The service registry contains no services for the extension '${i}' for language '${a}'.`):new Error(`The service registry contains no services for the extension '${i}'.`);return s}hasServices(e){try{return this.getServices(e),!0}catch{return!1}}get all(){return Array.from(this.languageIdMap.values())}}});function zm(t){return{code:t}}var G2,_w,Aw=A(()=>{Ll();B2();Al();ho();(function(t){t.all=["fast","slow","built-in"]})(G2||(G2={}));_w=class{constructor(e){this.entries=new Tu,this.entriesBefore=[],this.entriesAfter=[],this.reflection=e.shared.AstReflection}register(e,r=this,n="fast"){if(n==="built-in")throw new Error("The 'built-in' category is reserved for lexer, parser, and linker errors.");for(let[a,i]of Object.entries(e)){let s=i;if(Array.isArray(s))for(let o of s){let l={check:this.wrapValidationException(o,r),category:n};this.addEntry(a,l)}else if(typeof s=="function"){let o={check:this.wrapValidationException(s,r),category:n};this.addEntry(a,o)}else Ec(s)}}wrapValidationException(e,r){return async(n,a,i)=>{await this.handleException(()=>e.call(r,n,a,i),"An error occurred during validation",a,n)}}async handleException(e,r,n,a){try{await e()}catch(i){if(Wc(i))throw i;console.error(`${r}:`,i),i instanceof Error&&i.stack&&console.error(i.stack);let s=i instanceof Error?i.message:String(i);n("error",`${r}: ${s}`,{node:a})}}addEntry(e,r){if(e==="AstNode"){this.entries.add("AstNode",r);return}for(let n of this.reflection.getAllSubTypes(e))this.entries.add(n,r)}getChecks(e,r){let n=Kr(this.entries.get(e)).concat(this.entries.get("AstNode"));return r&&(n=n.filter(a=>r.includes(a.category))),n.map(a=>a.check)}registerBeforeDocument(e,r=this){this.entriesBefore.push(this.wrapPreparationException(e,"An error occurred during set-up of the validation",r))}registerAfterDocument(e,r=this){this.entriesAfter.push(this.wrapPreparationException(e,"An error occurred during tear-down of the validation",r))}wrapPreparationException(e,r,n){return async(a,i,s,o)=>{await this.handleException(()=>e.call(n,a,i,s,o),r,i,a)}}get checksBefore(){return this.entriesBefore}get checksAfter(){return this.entriesAfter}}});function $Te(t){if(t.range)return t.range;let e;return typeof t.property=="string"?e=n5(t.node.$cstNode,t.property,t.index):typeof t.keyword=="string"&&(e=$F(t.node.$cstNode,t.keyword,t.index)),e??(e=t.node.$cstNode),e?e.range:{start:{line:0,character:0},end:{line:0,character:0}}}function xA(t){switch(t){case"error":return 1;case"warning":return 2;case"info":return 3;case"hint":return 4;default:throw new Error("Invalid diagnostic severity: "+t)}}function GTe(t){switch(t){case"error":return zm(Rl.LexingError);case"warning":return zm(Rl.LexingWarning);case"info":return zm(Rl.LexingInfo);case"hint":return zm(Rl.LexingHint);default:throw new Error("Invalid diagnostic severity: "+t)}}var Lw,Rl,VG=A(()=>{_l();mu();_s();fu();Al();Aw();Lw=class{constructor(e){this.validationRegistry=e.validation.ValidationRegistry,this.metadata=e.LanguageMetaData}async validateDocument(e,r={},n=hr.CancellationToken.None){let a=e.parseResult,i=[];if(await ka(n),(!r.categories||r.categories.includes("built-in"))&&(this.processLexingErrors(a,i,r),r.stopAfterLexingErrors&&i.some(s=>{var o;return((o=s.data)===null||o===void 0?void 0:o.code)===Rl.LexingError})||(this.processParsingErrors(a,i,r),r.stopAfterParsingErrors&&i.some(s=>{var o;return((o=s.data)===null||o===void 0?void 0:o.code)===Rl.ParsingError}))||(this.processLinkingErrors(e,i,r),r.stopAfterLinkingErrors&&i.some(s=>{var o;return((o=s.data)===null||o===void 0?void 0:o.code)===Rl.LinkingError}))))return i;try{i.push(...await this.validateAst(a.value,r,n))}catch(s){if(Wc(s))throw s;console.error("An error occurred during validation:",s)}return await ka(n),i}processLexingErrors(e,r,n){var a,i,s;let o=[...e.lexerErrors,...(i=(a=e.lexerReport)===null||a===void 0?void 0:a.diagnostics)!==null&&i!==void 0?i:[]];for(let l of o){let u=(s=l.severity)!==null&&s!==void 0?s:"error",h={severity:xA(u),range:{start:{line:l.line-1,character:l.column-1},end:{line:l.line-1,character:l.column+l.length-1}},message:l.message,data:GTe(u),source:this.getSource()};r.push(h)}}processParsingErrors(e,r,n){for(let a of e.parserErrors){let i;if(isNaN(a.token.startOffset)){if("previousToken"in a){let s=a.previousToken;if(isNaN(s.startOffset)){let o={line:0,character:0};i={start:o,end:o}}else{let o={line:s.endLine-1,character:s.endColumn};i={start:o,end:o}}}}else i=yv(a.token);if(i){let s={severity:xA("error"),range:i,message:a.message,data:zm(Rl.ParsingError),source:this.getSource()};r.push(s)}}}processLinkingErrors(e,r,n){for(let a of e.references){let i=a.error;if(i){let s={node:i.container,property:i.property,index:i.index,data:{code:Rl.LinkingError,containerType:i.container.$type,property:i.property,refText:i.reference.$refText}};r.push(this.toDiagnostic("error",i.message,s))}}}async validateAst(e,r,n=hr.CancellationToken.None){let a=[],i=(s,o,l)=>{a.push(this.toDiagnostic(s,o,l))};return await this.validateAstBefore(e,r,i,n),await this.validateAstNodes(e,r,i,n),await this.validateAstAfter(e,r,i,n),a}async validateAstBefore(e,r,n,a=hr.CancellationToken.None){var i;let s=this.validationRegistry.checksBefore;for(let o of s)await ka(a),await o(e,n,(i=r.categories)!==null&&i!==void 0?i:[],a)}async validateAstNodes(e,r,n,a=hr.CancellationToken.None){await Promise.all(wl(e).map(async i=>{await ka(a);let s=this.validationRegistry.getChecks(i.$type,r.categories);for(let o of s)await o(i,n,a)}))}async validateAstAfter(e,r,n,a=hr.CancellationToken.None){var i;let s=this.validationRegistry.checksAfter;for(let o of s)await ka(a),await o(e,n,(i=r.categories)!==null&&i!==void 0?i:[],a)}toDiagnostic(e,r,n){return{message:r,range:$Te(n),severity:xA(e),code:n.code,codeDescription:n.codeDescription,tags:n.tags,relatedInformation:n.relatedInformation,data:n.data,source:this.getSource()}}getSource(){return this.metadata.languageId}};(function(t){t.LexingError="lexing-error",t.LexingWarning="lexing-warning",t.LexingInfo="lexing-info",t.LexingHint="lexing-hint",t.ParsingError="parsing-error",t.LinkingError="linking-error"})(Rl||(Rl={}))});var Rw,Iw,HG=A(()=>{_l();hu();_s();fu();Al();Yc();Rw=class{constructor(e){this.astNodeLocator=e.workspace.AstNodeLocator,this.nameProvider=e.references.NameProvider}createDescription(e,r,n){let a=n??ss(e);r??(r=this.nameProvider.getName(e));let i=this.astNodeLocator.getAstNodePath(e);if(!r)throw new Error(`Node at path ${i} has no name.`);let s,o=()=>{var l;return s??(s=cm((l=this.nameProvider.getNameNode(e))!==null&&l!==void 0?l:e.$cstNode))};return{node:e,name:r,get nameSegment(){return o()},selectionSegment:cm(e.$cstNode),type:e.$type,documentUri:a.uri,path:i}}},Iw=class{constructor(e){this.nodeLocator=e.workspace.AstNodeLocator}async createDescriptions(e,r=hr.CancellationToken.None){let n=[],a=e.parseResult.value;for(let i of wl(a))await ka(r),ay(i).filter(s=>!lm(s)).forEach(s=>{let o=this.createDescription(s);o&&n.push(o)});return n}createDescription(e){let r=e.reference.$nodeDescription,n=e.reference.$refNode;if(!r||!n)return;let a=ss(e.container).uri;return{sourceUri:a,sourcePath:this.nodeLocator.getAstNodePath(e.container),targetUri:r.documentUri,targetPath:r.path,segment:cm(n),local:$s.equals(r.documentUri,a)}}}});var Dw,WG=A(()=>{Dw=class{constructor(){this.segmentSeparator="/",this.indexSeparator="@"}getAstNodePath(e){if(e.$container){let r=this.getAstNodePath(e.$container),n=this.getPathSegment(e);return r+this.segmentSeparator+n}return""}getPathSegment({$containerProperty:e,$containerIndex:r}){if(!e)throw new Error("Missing '$containerProperty' in AST node.");return r!==void 0?e+this.indexSeparator+r:e}getAstNode(e,r){return r.split(this.segmentSeparator).reduce((a,i)=>{if(!a||i.length===0)return a;let s=i.indexOf(this.indexSeparator);if(s>0){let o=i.substring(0,s),l=parseInt(i.substring(s+1)),u=a[o];return u?.[l]}return a[i]},e)}}});var Xn={};var bA=A(()=>{br(Xn,ii(LG(),1))});var Nw,YG=A(()=>{bA();Al();Nw=class{constructor(e){this._ready=new Fs,this.settings={},this.workspaceConfig=!1,this.onConfigurationSectionUpdateEmitter=new Xn.Emitter,this.serviceRegistry=e.ServiceRegistry}get ready(){return this._ready.promise}initialize(e){var r,n;this.workspaceConfig=(n=(r=e.capabilities.workspace)===null||r===void 0?void 0:r.configuration)!==null&&n!==void 0?n:!1}async initialized(e){if(this.workspaceConfig){if(e.register){let r=this.serviceRegistry.all;e.register({section:r.map(n=>this.toSectionName(n.LanguageMetaData.languageId))})}if(e.fetchConfiguration){let r=this.serviceRegistry.all.map(a=>({section:this.toSectionName(a.LanguageMetaData.languageId)})),n=await e.fetchConfiguration(r);r.forEach((a,i)=>{this.updateSectionConfiguration(a.section,n[i])})}}this._ready.resolve()}updateConfiguration(e){e.settings&&Object.keys(e.settings).forEach(r=>{let n=e.settings[r];this.updateSectionConfiguration(r,n),this.onConfigurationSectionUpdateEmitter.fire({section:r,configuration:n})})}updateSectionConfiguration(e,r){this.settings[e]=r}async getConfiguration(e,r){await this.ready;let n=this.toSectionName(e);if(this.settings[n])return this.settings[n][r]}toSectionName(e){return`${e}`}get onConfigurationSectionUpdate(){return this.onConfigurationSectionUpdateEmitter.event}}});var T0,XG=A(()=>{(function(t){function e(r){return{dispose:async()=>await r()}}t.create=e})(T0||(T0={}))});var Mw,jG=A(()=>{_l();XG();B2();Al();ho();Aw();P2();Mw=class{constructor(e){this.updateBuildOptions={validation:{categories:["built-in","fast"]}},this.updateListeners=[],this.buildPhaseListeners=new Tu,this.documentPhaseListeners=new Tu,this.buildState=new Map,this.documentBuildWaiters=new Map,this.currentState=wn.Changed,this.langiumDocuments=e.workspace.LangiumDocuments,this.langiumDocumentFactory=e.workspace.LangiumDocumentFactory,this.textDocuments=e.workspace.TextDocuments,this.indexManager=e.workspace.IndexManager,this.serviceRegistry=e.ServiceRegistry}async build(e,r={},n=hr.CancellationToken.None){var a,i;for(let s of e){let o=s.uri.toString();if(s.state===wn.Validated){if(typeof r.validation=="boolean"&&r.validation)s.state=wn.IndexedReferences,s.diagnostics=void 0,this.buildState.delete(o);else if(typeof r.validation=="object"){let l=this.buildState.get(o),u=(a=l?.result)===null||a===void 0?void 0:a.validationChecks;if(u){let f=((i=r.validation.categories)!==null&&i!==void 0?i:G2.all).filter(d=>!u.includes(d));f.length>0&&(this.buildState.set(o,{completed:!1,options:{validation:Object.assign(Object.assign({},r.validation),{categories:f})},result:l.result}),s.state=wn.IndexedReferences)}}}else this.buildState.delete(o)}this.currentState=wn.Changed,await this.emitUpdate(e.map(s=>s.uri),[]),await this.buildDocuments(e,r,n)}async update(e,r,n=hr.CancellationToken.None){this.currentState=wn.Changed;for(let s of r)this.langiumDocuments.deleteDocument(s),this.buildState.delete(s.toString()),this.indexManager.remove(s);for(let s of e){if(!this.langiumDocuments.invalidateDocument(s)){let l=this.langiumDocumentFactory.fromModel({$type:"INVALID"},s);l.state=wn.Changed,this.langiumDocuments.addDocument(l)}this.buildState.delete(s.toString())}let a=Kr(e).concat(r).map(s=>s.toString()).toSet();this.langiumDocuments.all.filter(s=>!a.has(s.uri.toString())&&this.shouldRelink(s,a)).forEach(s=>{this.serviceRegistry.getServices(s.uri).references.Linker.unlink(s),s.state=Math.min(s.state,wn.ComputedScopes),s.diagnostics=void 0}),await this.emitUpdate(e,r),await ka(n);let i=this.sortDocuments(this.langiumDocuments.all.filter(s=>{var o;return s.staten(e,r)))}sortDocuments(e){let r=0,n=e.length-1;for(;r=0&&!this.hasTextDocument(e[n]);)n--;rn.error!==void 0)?!0:this.indexManager.isAffected(e,r)}onUpdate(e){return this.updateListeners.push(e),T0.create(()=>{let r=this.updateListeners.indexOf(e);r>=0&&this.updateListeners.splice(r,1)})}async buildDocuments(e,r,n){this.prepareBuild(e,r),await this.runCancelable(e,wn.Parsed,n,i=>this.langiumDocumentFactory.update(i,n)),await this.runCancelable(e,wn.IndexedContent,n,i=>this.indexManager.updateContent(i,n)),await this.runCancelable(e,wn.ComputedScopes,n,async i=>{let s=this.serviceRegistry.getServices(i.uri).references.ScopeComputation;i.precomputedScopes=await s.computeLocalScopes(i,n)}),await this.runCancelable(e,wn.Linked,n,i=>this.serviceRegistry.getServices(i.uri).references.Linker.link(i,n)),await this.runCancelable(e,wn.IndexedReferences,n,i=>this.indexManager.updateReferences(i,n));let a=e.filter(i=>this.shouldValidate(i));await this.runCancelable(a,wn.Validated,n,i=>this.validate(i,n));for(let i of e){let s=this.buildState.get(i.uri.toString());s&&(s.completed=!0)}}prepareBuild(e,r){for(let n of e){let a=n.uri.toString(),i=this.buildState.get(a);(!i||i.completed)&&this.buildState.set(a,{completed:!1,options:r,result:i?.result})}}async runCancelable(e,r,n,a){let i=e.filter(o=>o.stateo.state===r);await this.notifyBuildPhase(s,r,n),this.currentState=r}onBuildPhase(e,r){return this.buildPhaseListeners.add(e,r),T0.create(()=>{this.buildPhaseListeners.delete(e,r)})}onDocumentPhase(e,r){return this.documentPhaseListeners.add(e,r),T0.create(()=>{this.documentPhaseListeners.delete(e,r)})}waitUntil(e,r,n){let a;if(r&&"path"in r?a=r:n=r,n??(n=hr.CancellationToken.None),a){let i=this.langiumDocuments.getDocument(a);if(i&&i.state>e)return Promise.resolve(a)}return this.currentState>=e?Promise.resolve(void 0):n.isCancellationRequested?Promise.reject(Hc):new Promise((i,s)=>{let o=this.onBuildPhase(e,()=>{if(o.dispose(),l.dispose(),a){let u=this.langiumDocuments.getDocument(a);i(u?.uri)}else i(void 0)}),l=n.onCancellationRequested(()=>{o.dispose(),l.dispose(),s(Hc)})})}async notifyDocumentPhase(e,r,n){let i=this.documentPhaseListeners.get(r).slice();for(let s of i)try{await s(e,n)}catch(o){if(!Wc(o))throw o}}async notifyBuildPhase(e,r,n){if(e.length===0)return;let i=this.buildPhaseListeners.get(r).slice();for(let s of i)await ka(n),await s(e,n)}shouldValidate(e){return!!this.getBuildOptions(e).validation}async validate(e,r){var n,a;let i=this.serviceRegistry.getServices(e.uri).validation.DocumentValidator,s=this.getBuildOptions(e).validation,o=typeof s=="object"?s:void 0,l=await i.validateDocument(e,o,r);e.diagnostics?e.diagnostics.push(...l):e.diagnostics=l;let u=this.buildState.get(e.uri.toString());if(u){(n=u.result)!==null&&n!==void 0||(u.result={});let h=(a=o?.categories)!==null&&a!==void 0?a:G2.all;u.result.validationChecks?u.result.validationChecks.push(...h):u.result.validationChecks=[...h]}}getBuildOptions(e){var r,n;return(n=(r=this.buildState.get(e.uri.toString()))===null||r===void 0?void 0:r.options)!==null&&n!==void 0?n:{}}}});var Ow,KG=A(()=>{_s();vA();_l();ho();Yc();Ow=class{constructor(e){this.symbolIndex=new Map,this.symbolByTypeIndex=new Fm,this.referenceIndex=new Map,this.documents=e.workspace.LangiumDocuments,this.serviceRegistry=e.ServiceRegistry,this.astReflection=e.AstReflection}findAllReferences(e,r){let n=ss(e).uri,a=[];return this.referenceIndex.forEach(i=>{i.forEach(s=>{$s.equals(s.targetUri,n)&&s.targetPath===r&&a.push(s)})}),Kr(a)}allElements(e,r){let n=Kr(this.symbolIndex.keys());return r&&(n=n.filter(a=>!r||r.has(a))),n.map(a=>this.getFileDescriptions(a,e)).flat()}getFileDescriptions(e,r){var n;return r?this.symbolByTypeIndex.get(e,r,()=>{var i;return((i=this.symbolIndex.get(e))!==null&&i!==void 0?i:[]).filter(o=>this.astReflection.isSubtype(o.type,r))}):(n=this.symbolIndex.get(e))!==null&&n!==void 0?n:[]}remove(e){let r=e.toString();this.symbolIndex.delete(r),this.symbolByTypeIndex.clear(r),this.referenceIndex.delete(r)}async updateContent(e,r=hr.CancellationToken.None){let a=await this.serviceRegistry.getServices(e.uri).references.ScopeComputation.computeExports(e,r),i=e.uri.toString();this.symbolIndex.set(i,a),this.symbolByTypeIndex.clear(i)}async updateReferences(e,r=hr.CancellationToken.None){let a=await this.serviceRegistry.getServices(e.uri).workspace.ReferenceDescriptionProvider.createDescriptions(e,r);this.referenceIndex.set(e.uri.toString(),a)}isAffected(e,r){let n=this.referenceIndex.get(e.uri.toString());return n?n.some(a=>!a.local&&r.has(a.targetUri.toString())):!1}}});var Pw,ZG=A(()=>{_l();Al();Yc();Pw=class{constructor(e){this.initialBuildOptions={},this._ready=new Fs,this.serviceRegistry=e.ServiceRegistry,this.langiumDocuments=e.workspace.LangiumDocuments,this.documentBuilder=e.workspace.DocumentBuilder,this.fileSystemProvider=e.workspace.FileSystemProvider,this.mutex=e.workspace.WorkspaceLock}get ready(){return this._ready.promise}get workspaceFolders(){return this.folders}initialize(e){var r;this.folders=(r=e.workspaceFolders)!==null&&r!==void 0?r:void 0}initialized(e){return this.mutex.write(r=>{var n;return this.initializeWorkspace((n=this.folders)!==null&&n!==void 0?n:[],r)})}async initializeWorkspace(e,r=hr.CancellationToken.None){let n=await this.performStartup(e);await ka(r),await this.documentBuilder.build(n,this.initialBuildOptions,r)}async performStartup(e){let r=this.serviceRegistry.all.flatMap(i=>i.LanguageMetaData.fileExtensions),n=[],a=i=>{n.push(i),this.langiumDocuments.hasDocument(i.uri)||this.langiumDocuments.addDocument(i)};return await this.loadAdditionalDocuments(e,a),await Promise.all(e.map(i=>[i,this.getRootFolder(i)]).map(async i=>this.traverseFolder(...i,r,a))),this._ready.resolve(),n}loadAdditionalDocuments(e,r){return Promise.resolve()}getRootFolder(e){return zs.parse(e.uri)}async traverseFolder(e,r,n,a){let i=await this.fileSystemProvider.readDirectory(r);await Promise.all(i.map(async s=>{if(this.includeEntry(e,s,n)){if(s.isDirectory)await this.traverseFolder(e,s.uri,n,a);else if(s.isFile){let o=await this.langiumDocuments.getOrCreateDocument(s.uri);a(o)}}}))}includeEntry(e,r,n){let a=$s.basename(r.uri);if(a.startsWith("."))return!1;if(r.isDirectory)return a!=="node_modules"&&a!=="out";if(r.isFile){let i=$s.extname(r.uri);return n.includes(i)}return!1}}});function kA(t){return Array.isArray(t)&&(t.length===0||"name"in t[0])}function JG(t){return t&&"modes"in t&&"defaultMode"in t}function QG(t){return!kA(t)&&!JG(t)}var Bw,wA,$m,TA=A(()=>{b0();Bw=class{buildUnexpectedCharactersMessage(e,r,n,a,i){return f2.buildUnexpectedCharactersMessage(e,r,n,a,i)}buildUnableToPopLexerModeMessage(e){return f2.buildUnableToPopLexerModeMessage(e)}},wA={mode:"full"},$m=class{constructor(e){this.errorMessageProvider=e.parser.LexerErrorMessageProvider,this.tokenBuilder=e.parser.TokenBuilder;let r=this.tokenBuilder.buildTokens(e.Grammar,{caseInsensitive:e.LanguageMetaData.caseInsensitive});this.tokenTypes=this.toTokenTypeDictionary(r);let n=QG(r)?Object.values(r):r,a=e.LanguageMetaData.mode==="production";this.chevrotainLexer=new Wn(n,{positionTracking:"full",skipValidations:a,errorMessageProvider:this.errorMessageProvider})}get definition(){return this.tokenTypes}tokenize(e,r=wA){var n,a,i;let s=this.chevrotainLexer.tokenize(e);return{tokens:s.tokens,errors:s.errors,hidden:(n=s.groups.hidden)!==null&&n!==void 0?n:[],report:(i=(a=this.tokenBuilder).flushLexingReport)===null||i===void 0?void 0:i.call(a,e)}}toTokenTypeDictionary(e){if(QG(e))return e;let r=JG(e)?Object.values(e.modes).flat():e,n={};return r.forEach(a=>n[a.name]=a),n}}});function rU(t,e,r){let n,a;typeof t=="string"?(a=e,n=r):(a=t.range.start,n=e),a||(a=qr.create(0,0));let i=VTe(t),s=aU(n),o=H1t({lines:i,position:a,options:s});return K1t({index:0,tokens:o,position:a})}function nU(t,e){let r=aU(e),n=VTe(t);if(n.length===0)return!1;let a=n[0],i=n[n.length-1],s=r.start,o=r.end;return!!s?.exec(a)&&!!o?.exec(i)}function VTe(t){let e="";return typeof t=="string"?e=t:e=t.text,e.split(RF)}function H1t(t){var e,r,n;let a=[],i=t.position.line,s=t.position.character;for(let o=0;o=h.length){if(a.length>0){let p=qr.create(i,s);a.push({type:"break",content:"",range:Dr.create(p,p)})}}else{UTe.lastIndex=f;let p=UTe.exec(h);if(p){let m=p[0],g=p[1],v=qr.create(i,s+f),y=qr.create(i,s+f+m.length);a.push({type:"tag",content:g,range:Dr.create(v,y)}),f+=m.length,f=tU(h,f)}if(f0&&a[a.length-1].type==="break"?a.slice(0,-1):a}function W1t(t,e,r,n){let a=[];if(t.length===0){let i=qr.create(r,n),s=qr.create(r,n+e.length);a.push({type:"text",content:e,range:Dr.create(i,s)})}else{let i=0;for(let o of t){let l=o.index,u=e.substring(i,l);u.length>0&&a.push({type:"text",content:e.substring(i,l),range:Dr.create(qr.create(r,i+n),qr.create(r,l+n))});let h=u.length+1,f=o[1];if(a.push({type:"inline-tag",content:f,range:Dr.create(qr.create(r,i+h+n),qr.create(r,i+h+f.length+n))}),h+=f.length,o.length===4){h+=o[2].length;let d=o[3];a.push({type:"text",content:d,range:Dr.create(qr.create(r,i+h+n),qr.create(r,i+h+d.length+n))})}else a.push({type:"text",content:"",range:Dr.create(qr.create(r,i+h+n),qr.create(r,i+h+n))});i=l+o[0].length}let s=e.substring(i);s.length>0&&a.push({type:"text",content:s,range:Dr.create(qr.create(r,i+n),qr.create(r,i+n+s.length))})}return a}function tU(t,e){let r=t.substring(e).match(Y1t);return r?e+r.index:t.length}function j1t(t){let e=t.match(X1t);if(e&&typeof e.index=="number")return e.index}function K1t(t){var e,r,n,a;let i=qr.create(t.position.line,t.position.character);if(t.tokens.length===0)return new EA([],Dr.create(i,i));let s=[];for(;t.index0){let l=tU(e,i);s=e.substring(l),e=e.substring(0,i)}return(t==="linkcode"||t==="link"&&r.link==="code")&&(s=`\`${s}\``),(a=(n=r.renderLink)===null||n===void 0?void 0:n.call(r,e,s))!==null&&a!==void 0?a:tvt(e,s)}}function tvt(t,e){try{return zs.parse(t,!0),`[${e}](${t})`}catch{return t}}function qTe(t){return t.endsWith(` +For Further details.`,n}function $xt(t){if(t instanceof Mn)return"SUBRULE";if(t instanceof Nn)return"OPTION";if(t instanceof ii)return"OR";if(t instanceof fi)return"AT_LEAST_ONE";if(t instanceof di)return"AT_LEAST_ONE_SEP";if(t instanceof ni)return"MANY_SEP";if(t instanceof sn)return"MANY";if(t instanceof Ur)return"CONSUME";throw Error("non exhaustive match")}function Gxt(t,e,r){let n=rme(e.configs.elements,a=>a.state.transitions),i=sge(n.filter(a=>a instanceof Ox).map(a=>a.tokenType),a=>a.tokenTypeIdx);return{actualToken:r,possibleTokenTypes:i,tokenPath:t}}function qxt(t,e){return t.edges[e.tokenTypeIdx]}function Uxt(t,e,r){let n=new zx,i=[];for(let s of t.elements){if(r.is(s.alt)===!1)continue;if(s.state.type===Bx){i.push(s);continue}let o=s.state.transitions.length;for(let l=0;l0&&!Xxt(a))for(let s of i)a.add(s);return a}function Hxt(t,e){if(t instanceof Ox&&o7(e,t.tokenType))return t.target}function Vxt(t,e){let r;for(let n of t.elements)if(e.is(n.alt)===!0){if(r===void 0)r=n.alt;else if(r!==n.alt)return}return r}function GTe(t){return{configs:t,edges:{},isAcceptState:!1,prediction:-1}}function $Te(t,e,r,n){return n=qTe(t,n),e.edges[r.tokenTypeIdx]=n,n}function qTe(t,e){if(e===T7)return e;let r=e.configs.key,n=t.states[r];return n!==void 0?n:(e.configs.finalize(),t.states[r]=e,e)}function Wxt(t){let e=new zx,r=t.transitions.length;for(let n=0;n0){let i=[...t.stack],s={state:i.pop(),alt:t.alt,stack:i};IA(s,e)}else e.add(t);return}r.epsilonOnlyTransitions||e.add(t);let n=r.transitions.length;for(let i=0;i1)return!0;return!1}function Jxt(t){for(let e of Array.from(t.values()))if(Object.keys(e).length===1)return!0;return!1}var DA,FTe,E7,UTe=D(()=>{Ap();PTe();BTe();vz();nme();oge();yy();YE();vS();bS();wz();DA=class{constructor(){this.predicates=[]}is(e){return e>=this.predicates.length||this.predicates[e]}set(e,r){this.predicates[e]=r}toString(){let e="",r=this.predicates.length;for(let n=0;nconsole.log(n))}initialize(e){this.atn=ITe(e.rules),this.dfas=Oxt(this.atn)}validateAmbiguousAlternationAlternatives(){return[]}validateEmptyOrAlternatives(){return[]}buildLookaheadForAlternation(e){let{prodOccurrence:r,rule:n,hasPredicates:i,dynamicTokensEnabled:a}=e,s=this.dfas,o=this.logging,l=$m(n,"Alternation",r),h=this.atn.decisionMap[l].decision,f=Dr(uA({maxLookahead:1,occurrence:r,prodType:"Alternation",rule:n}),d=>Dr(d,p=>p[0]));if(zTe(f,!1)&&!a){let d=Pl(f,(p,m,g)=>(lt(m,y=>{y&&(p[y.tokenTypeIdx]=g,lt(y.categoryMatches,v=>{p[v]=g}))}),p),{});return i?function(p){var m;let g=this.LA(1),y=d[g.tokenTypeIdx];if(p!==void 0&&y!==void 0){let v=(m=p[y])===null||m===void 0?void 0:m.GATE;if(v!==void 0&&v.call(this)===!1)return}return y}:function(){let p=this.LA(1);return d[p.tokenTypeIdx]}}else return i?function(d){let p=new DA,m=d===void 0?0:d.length;for(let y=0;yDr(d,p=>p[0]));if(zTe(f)&&f[0][0]&&!a){let d=f[0],p=tl(d);if(p.length===1&&jh(p[0].categoryMatches)){let g=p[0].tokenTypeIdx;return function(){return this.LA(1).tokenTypeIdx===g}}else{let m=Pl(p,(g,y)=>(y!==void 0&&(g[y.tokenTypeIdx]=!0,lt(y.categoryMatches,v=>{g[v]=!0})),g),{});return function(){let g=this.LA(1);return m[g.tokenTypeIdx]===!0}}}return function(){let d=hU.call(this,s,h,FTe,o);return typeof d=="object"?!1:d===0}}}});var HTe=D(()=>{UTe()});var VTe,fU,WTe,MA,bn,on,NA,YTe,dU,XTe,jTe,KTe,ZTe,pU,QTe,JTe,e9e,OA,$x,Gx,mU,qx,t9e,gU,yU,vU,xU,bU,r9e,n9e,wU,i9e,kU,S7,a9e,s9e,o9e,l9e,u9e,c9e,h9e,f9e,PA,d9e,p9e,m9e,g9e,y9e,v9e,x9e,b9e,w9e,k9e,T9e,BA,E9e,S9e,C9e,_9e,A9e,L9e,R9e,D9e,I9e,M9e,N9e,O9e,P9e,TU,EU,B9e,F9e,z9e,$9e,G9e,q9e,U9e,H9e,V9e,SU,ot,CU=D(()=>{"use strict";(function(t){function e(r){return typeof r=="string"}t.is=e})(VTe||(VTe={}));(function(t){function e(r){return typeof r=="string"}t.is=e})(fU||(fU={}));(function(t){t.MIN_VALUE=-2147483648,t.MAX_VALUE=2147483647;function e(r){return typeof r=="number"&&t.MIN_VALUE<=r&&r<=t.MAX_VALUE}t.is=e})(WTe||(WTe={}));(function(t){t.MIN_VALUE=0,t.MAX_VALUE=2147483647;function e(r){return typeof r=="number"&&t.MIN_VALUE<=r&&r<=t.MAX_VALUE}t.is=e})(MA||(MA={}));(function(t){function e(n,i){return n===Number.MAX_VALUE&&(n=MA.MAX_VALUE),i===Number.MAX_VALUE&&(i=MA.MAX_VALUE),{line:n,character:i}}t.create=e;function r(n){let i=n;return ot.objectLiteral(i)&&ot.uinteger(i.line)&&ot.uinteger(i.character)}t.is=r})(bn||(bn={}));(function(t){function e(n,i,a,s){if(ot.uinteger(n)&&ot.uinteger(i)&&ot.uinteger(a)&&ot.uinteger(s))return{start:bn.create(n,i),end:bn.create(a,s)};if(bn.is(n)&&bn.is(i))return{start:n,end:i};throw new Error(`Range#create called with invalid arguments[${n}, ${i}, ${a}, ${s}]`)}t.create=e;function r(n){let i=n;return ot.objectLiteral(i)&&bn.is(i.start)&&bn.is(i.end)}t.is=r})(on||(on={}));(function(t){function e(n,i){return{uri:n,range:i}}t.create=e;function r(n){let i=n;return ot.objectLiteral(i)&&on.is(i.range)&&(ot.string(i.uri)||ot.undefined(i.uri))}t.is=r})(NA||(NA={}));(function(t){function e(n,i,a,s){return{targetUri:n,targetRange:i,targetSelectionRange:a,originSelectionRange:s}}t.create=e;function r(n){let i=n;return ot.objectLiteral(i)&&on.is(i.targetRange)&&ot.string(i.targetUri)&&on.is(i.targetSelectionRange)&&(on.is(i.originSelectionRange)||ot.undefined(i.originSelectionRange))}t.is=r})(YTe||(YTe={}));(function(t){function e(n,i,a,s){return{red:n,green:i,blue:a,alpha:s}}t.create=e;function r(n){let i=n;return ot.objectLiteral(i)&&ot.numberRange(i.red,0,1)&&ot.numberRange(i.green,0,1)&&ot.numberRange(i.blue,0,1)&&ot.numberRange(i.alpha,0,1)}t.is=r})(dU||(dU={}));(function(t){function e(n,i){return{range:n,color:i}}t.create=e;function r(n){let i=n;return ot.objectLiteral(i)&&on.is(i.range)&&dU.is(i.color)}t.is=r})(XTe||(XTe={}));(function(t){function e(n,i,a){return{label:n,textEdit:i,additionalTextEdits:a}}t.create=e;function r(n){let i=n;return ot.objectLiteral(i)&&ot.string(i.label)&&(ot.undefined(i.textEdit)||Gx.is(i))&&(ot.undefined(i.additionalTextEdits)||ot.typedArray(i.additionalTextEdits,Gx.is))}t.is=r})(jTe||(jTe={}));(function(t){t.Comment="comment",t.Imports="imports",t.Region="region"})(KTe||(KTe={}));(function(t){function e(n,i,a,s,o,l){let u={startLine:n,endLine:i};return ot.defined(a)&&(u.startCharacter=a),ot.defined(s)&&(u.endCharacter=s),ot.defined(o)&&(u.kind=o),ot.defined(l)&&(u.collapsedText=l),u}t.create=e;function r(n){let i=n;return ot.objectLiteral(i)&&ot.uinteger(i.startLine)&&ot.uinteger(i.startLine)&&(ot.undefined(i.startCharacter)||ot.uinteger(i.startCharacter))&&(ot.undefined(i.endCharacter)||ot.uinteger(i.endCharacter))&&(ot.undefined(i.kind)||ot.string(i.kind))}t.is=r})(ZTe||(ZTe={}));(function(t){function e(n,i){return{location:n,message:i}}t.create=e;function r(n){let i=n;return ot.defined(i)&&NA.is(i.location)&&ot.string(i.message)}t.is=r})(pU||(pU={}));(function(t){t.Error=1,t.Warning=2,t.Information=3,t.Hint=4})(QTe||(QTe={}));(function(t){t.Unnecessary=1,t.Deprecated=2})(JTe||(JTe={}));(function(t){function e(r){let n=r;return ot.objectLiteral(n)&&ot.string(n.href)}t.is=e})(e9e||(e9e={}));(function(t){function e(n,i,a,s,o,l){let u={range:n,message:i};return ot.defined(a)&&(u.severity=a),ot.defined(s)&&(u.code=s),ot.defined(o)&&(u.source=o),ot.defined(l)&&(u.relatedInformation=l),u}t.create=e;function r(n){var i;let a=n;return ot.defined(a)&&on.is(a.range)&&ot.string(a.message)&&(ot.number(a.severity)||ot.undefined(a.severity))&&(ot.integer(a.code)||ot.string(a.code)||ot.undefined(a.code))&&(ot.undefined(a.codeDescription)||ot.string((i=a.codeDescription)===null||i===void 0?void 0:i.href))&&(ot.string(a.source)||ot.undefined(a.source))&&(ot.undefined(a.relatedInformation)||ot.typedArray(a.relatedInformation,pU.is))}t.is=r})(OA||(OA={}));(function(t){function e(n,i,...a){let s={title:n,command:i};return ot.defined(a)&&a.length>0&&(s.arguments=a),s}t.create=e;function r(n){let i=n;return ot.defined(i)&&ot.string(i.title)&&ot.string(i.command)}t.is=r})($x||($x={}));(function(t){function e(a,s){return{range:a,newText:s}}t.replace=e;function r(a,s){return{range:{start:a,end:a},newText:s}}t.insert=r;function n(a){return{range:a,newText:""}}t.del=n;function i(a){let s=a;return ot.objectLiteral(s)&&ot.string(s.newText)&&on.is(s.range)}t.is=i})(Gx||(Gx={}));(function(t){function e(n,i,a){let s={label:n};return i!==void 0&&(s.needsConfirmation=i),a!==void 0&&(s.description=a),s}t.create=e;function r(n){let i=n;return ot.objectLiteral(i)&&ot.string(i.label)&&(ot.boolean(i.needsConfirmation)||i.needsConfirmation===void 0)&&(ot.string(i.description)||i.description===void 0)}t.is=r})(mU||(mU={}));(function(t){function e(r){let n=r;return ot.string(n)}t.is=e})(qx||(qx={}));(function(t){function e(a,s,o){return{range:a,newText:s,annotationId:o}}t.replace=e;function r(a,s,o){return{range:{start:a,end:a},newText:s,annotationId:o}}t.insert=r;function n(a,s){return{range:a,newText:"",annotationId:s}}t.del=n;function i(a){let s=a;return Gx.is(s)&&(mU.is(s.annotationId)||qx.is(s.annotationId))}t.is=i})(t9e||(t9e={}));(function(t){function e(n,i){return{textDocument:n,edits:i}}t.create=e;function r(n){let i=n;return ot.defined(i)&&wU.is(i.textDocument)&&Array.isArray(i.edits)}t.is=r})(gU||(gU={}));(function(t){function e(n,i,a){let s={kind:"create",uri:n};return i!==void 0&&(i.overwrite!==void 0||i.ignoreIfExists!==void 0)&&(s.options=i),a!==void 0&&(s.annotationId=a),s}t.create=e;function r(n){let i=n;return i&&i.kind==="create"&&ot.string(i.uri)&&(i.options===void 0||(i.options.overwrite===void 0||ot.boolean(i.options.overwrite))&&(i.options.ignoreIfExists===void 0||ot.boolean(i.options.ignoreIfExists)))&&(i.annotationId===void 0||qx.is(i.annotationId))}t.is=r})(yU||(yU={}));(function(t){function e(n,i,a,s){let o={kind:"rename",oldUri:n,newUri:i};return a!==void 0&&(a.overwrite!==void 0||a.ignoreIfExists!==void 0)&&(o.options=a),s!==void 0&&(o.annotationId=s),o}t.create=e;function r(n){let i=n;return i&&i.kind==="rename"&&ot.string(i.oldUri)&&ot.string(i.newUri)&&(i.options===void 0||(i.options.overwrite===void 0||ot.boolean(i.options.overwrite))&&(i.options.ignoreIfExists===void 0||ot.boolean(i.options.ignoreIfExists)))&&(i.annotationId===void 0||qx.is(i.annotationId))}t.is=r})(vU||(vU={}));(function(t){function e(n,i,a){let s={kind:"delete",uri:n};return i!==void 0&&(i.recursive!==void 0||i.ignoreIfNotExists!==void 0)&&(s.options=i),a!==void 0&&(s.annotationId=a),s}t.create=e;function r(n){let i=n;return i&&i.kind==="delete"&&ot.string(i.uri)&&(i.options===void 0||(i.options.recursive===void 0||ot.boolean(i.options.recursive))&&(i.options.ignoreIfNotExists===void 0||ot.boolean(i.options.ignoreIfNotExists)))&&(i.annotationId===void 0||qx.is(i.annotationId))}t.is=r})(xU||(xU={}));(function(t){function e(r){let n=r;return n&&(n.changes!==void 0||n.documentChanges!==void 0)&&(n.documentChanges===void 0||n.documentChanges.every(i=>ot.string(i.kind)?yU.is(i)||vU.is(i)||xU.is(i):gU.is(i)))}t.is=e})(bU||(bU={}));(function(t){function e(n){return{uri:n}}t.create=e;function r(n){let i=n;return ot.defined(i)&&ot.string(i.uri)}t.is=r})(r9e||(r9e={}));(function(t){function e(n,i){return{uri:n,version:i}}t.create=e;function r(n){let i=n;return ot.defined(i)&&ot.string(i.uri)&&ot.integer(i.version)}t.is=r})(n9e||(n9e={}));(function(t){function e(n,i){return{uri:n,version:i}}t.create=e;function r(n){let i=n;return ot.defined(i)&&ot.string(i.uri)&&(i.version===null||ot.integer(i.version))}t.is=r})(wU||(wU={}));(function(t){function e(n,i,a,s){return{uri:n,languageId:i,version:a,text:s}}t.create=e;function r(n){let i=n;return ot.defined(i)&&ot.string(i.uri)&&ot.string(i.languageId)&&ot.integer(i.version)&&ot.string(i.text)}t.is=r})(i9e||(i9e={}));(function(t){t.PlainText="plaintext",t.Markdown="markdown";function e(r){let n=r;return n===t.PlainText||n===t.Markdown}t.is=e})(kU||(kU={}));(function(t){function e(r){let n=r;return ot.objectLiteral(r)&&kU.is(n.kind)&&ot.string(n.value)}t.is=e})(S7||(S7={}));(function(t){t.Text=1,t.Method=2,t.Function=3,t.Constructor=4,t.Field=5,t.Variable=6,t.Class=7,t.Interface=8,t.Module=9,t.Property=10,t.Unit=11,t.Value=12,t.Enum=13,t.Keyword=14,t.Snippet=15,t.Color=16,t.File=17,t.Reference=18,t.Folder=19,t.EnumMember=20,t.Constant=21,t.Struct=22,t.Event=23,t.Operator=24,t.TypeParameter=25})(a9e||(a9e={}));(function(t){t.PlainText=1,t.Snippet=2})(s9e||(s9e={}));(function(t){t.Deprecated=1})(o9e||(o9e={}));(function(t){function e(n,i,a){return{newText:n,insert:i,replace:a}}t.create=e;function r(n){let i=n;return i&&ot.string(i.newText)&&on.is(i.insert)&&on.is(i.replace)}t.is=r})(l9e||(l9e={}));(function(t){t.asIs=1,t.adjustIndentation=2})(u9e||(u9e={}));(function(t){function e(r){let n=r;return n&&(ot.string(n.detail)||n.detail===void 0)&&(ot.string(n.description)||n.description===void 0)}t.is=e})(c9e||(c9e={}));(function(t){function e(r){return{label:r}}t.create=e})(h9e||(h9e={}));(function(t){function e(r,n){return{items:r||[],isIncomplete:!!n}}t.create=e})(f9e||(f9e={}));(function(t){function e(n){return n.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}t.fromPlainText=e;function r(n){let i=n;return ot.string(i)||ot.objectLiteral(i)&&ot.string(i.language)&&ot.string(i.value)}t.is=r})(PA||(PA={}));(function(t){function e(r){let n=r;return!!n&&ot.objectLiteral(n)&&(S7.is(n.contents)||PA.is(n.contents)||ot.typedArray(n.contents,PA.is))&&(r.range===void 0||on.is(r.range))}t.is=e})(d9e||(d9e={}));(function(t){function e(r,n){return n?{label:r,documentation:n}:{label:r}}t.create=e})(p9e||(p9e={}));(function(t){function e(r,n,...i){let a={label:r};return ot.defined(n)&&(a.documentation=n),ot.defined(i)?a.parameters=i:a.parameters=[],a}t.create=e})(m9e||(m9e={}));(function(t){t.Text=1,t.Read=2,t.Write=3})(g9e||(g9e={}));(function(t){function e(r,n){let i={range:r};return ot.number(n)&&(i.kind=n),i}t.create=e})(y9e||(y9e={}));(function(t){t.File=1,t.Module=2,t.Namespace=3,t.Package=4,t.Class=5,t.Method=6,t.Property=7,t.Field=8,t.Constructor=9,t.Enum=10,t.Interface=11,t.Function=12,t.Variable=13,t.Constant=14,t.String=15,t.Number=16,t.Boolean=17,t.Array=18,t.Object=19,t.Key=20,t.Null=21,t.EnumMember=22,t.Struct=23,t.Event=24,t.Operator=25,t.TypeParameter=26})(v9e||(v9e={}));(function(t){t.Deprecated=1})(x9e||(x9e={}));(function(t){function e(r,n,i,a,s){let o={name:r,kind:n,location:{uri:a,range:i}};return s&&(o.containerName=s),o}t.create=e})(b9e||(b9e={}));(function(t){function e(r,n,i,a){return a!==void 0?{name:r,kind:n,location:{uri:i,range:a}}:{name:r,kind:n,location:{uri:i}}}t.create=e})(w9e||(w9e={}));(function(t){function e(n,i,a,s,o,l){let u={name:n,detail:i,kind:a,range:s,selectionRange:o};return l!==void 0&&(u.children=l),u}t.create=e;function r(n){let i=n;return i&&ot.string(i.name)&&ot.number(i.kind)&&on.is(i.range)&&on.is(i.selectionRange)&&(i.detail===void 0||ot.string(i.detail))&&(i.deprecated===void 0||ot.boolean(i.deprecated))&&(i.children===void 0||Array.isArray(i.children))&&(i.tags===void 0||Array.isArray(i.tags))}t.is=r})(k9e||(k9e={}));(function(t){t.Empty="",t.QuickFix="quickfix",t.Refactor="refactor",t.RefactorExtract="refactor.extract",t.RefactorInline="refactor.inline",t.RefactorRewrite="refactor.rewrite",t.Source="source",t.SourceOrganizeImports="source.organizeImports",t.SourceFixAll="source.fixAll"})(T9e||(T9e={}));(function(t){t.Invoked=1,t.Automatic=2})(BA||(BA={}));(function(t){function e(n,i,a){let s={diagnostics:n};return i!=null&&(s.only=i),a!=null&&(s.triggerKind=a),s}t.create=e;function r(n){let i=n;return ot.defined(i)&&ot.typedArray(i.diagnostics,OA.is)&&(i.only===void 0||ot.typedArray(i.only,ot.string))&&(i.triggerKind===void 0||i.triggerKind===BA.Invoked||i.triggerKind===BA.Automatic)}t.is=r})(E9e||(E9e={}));(function(t){function e(n,i,a){let s={title:n},o=!0;return typeof i=="string"?(o=!1,s.kind=i):$x.is(i)?s.command=i:s.edit=i,o&&a!==void 0&&(s.kind=a),s}t.create=e;function r(n){let i=n;return i&&ot.string(i.title)&&(i.diagnostics===void 0||ot.typedArray(i.diagnostics,OA.is))&&(i.kind===void 0||ot.string(i.kind))&&(i.edit!==void 0||i.command!==void 0)&&(i.command===void 0||$x.is(i.command))&&(i.isPreferred===void 0||ot.boolean(i.isPreferred))&&(i.edit===void 0||bU.is(i.edit))}t.is=r})(S9e||(S9e={}));(function(t){function e(n,i){let a={range:n};return ot.defined(i)&&(a.data=i),a}t.create=e;function r(n){let i=n;return ot.defined(i)&&on.is(i.range)&&(ot.undefined(i.command)||$x.is(i.command))}t.is=r})(C9e||(C9e={}));(function(t){function e(n,i){return{tabSize:n,insertSpaces:i}}t.create=e;function r(n){let i=n;return ot.defined(i)&&ot.uinteger(i.tabSize)&&ot.boolean(i.insertSpaces)}t.is=r})(_9e||(_9e={}));(function(t){function e(n,i,a){return{range:n,target:i,data:a}}t.create=e;function r(n){let i=n;return ot.defined(i)&&on.is(i.range)&&(ot.undefined(i.target)||ot.string(i.target))}t.is=r})(A9e||(A9e={}));(function(t){function e(n,i){return{range:n,parent:i}}t.create=e;function r(n){let i=n;return ot.objectLiteral(i)&&on.is(i.range)&&(i.parent===void 0||t.is(i.parent))}t.is=r})(L9e||(L9e={}));(function(t){t.namespace="namespace",t.type="type",t.class="class",t.enum="enum",t.interface="interface",t.struct="struct",t.typeParameter="typeParameter",t.parameter="parameter",t.variable="variable",t.property="property",t.enumMember="enumMember",t.event="event",t.function="function",t.method="method",t.macro="macro",t.keyword="keyword",t.modifier="modifier",t.comment="comment",t.string="string",t.number="number",t.regexp="regexp",t.operator="operator",t.decorator="decorator"})(R9e||(R9e={}));(function(t){t.declaration="declaration",t.definition="definition",t.readonly="readonly",t.static="static",t.deprecated="deprecated",t.abstract="abstract",t.async="async",t.modification="modification",t.documentation="documentation",t.defaultLibrary="defaultLibrary"})(D9e||(D9e={}));(function(t){function e(r){let n=r;return ot.objectLiteral(n)&&(n.resultId===void 0||typeof n.resultId=="string")&&Array.isArray(n.data)&&(n.data.length===0||typeof n.data[0]=="number")}t.is=e})(I9e||(I9e={}));(function(t){function e(n,i){return{range:n,text:i}}t.create=e;function r(n){let i=n;return i!=null&&on.is(i.range)&&ot.string(i.text)}t.is=r})(M9e||(M9e={}));(function(t){function e(n,i,a){return{range:n,variableName:i,caseSensitiveLookup:a}}t.create=e;function r(n){let i=n;return i!=null&&on.is(i.range)&&ot.boolean(i.caseSensitiveLookup)&&(ot.string(i.variableName)||i.variableName===void 0)}t.is=r})(N9e||(N9e={}));(function(t){function e(n,i){return{range:n,expression:i}}t.create=e;function r(n){let i=n;return i!=null&&on.is(i.range)&&(ot.string(i.expression)||i.expression===void 0)}t.is=r})(O9e||(O9e={}));(function(t){function e(n,i){return{frameId:n,stoppedLocation:i}}t.create=e;function r(n){let i=n;return ot.defined(i)&&on.is(n.stoppedLocation)}t.is=r})(P9e||(P9e={}));(function(t){t.Type=1,t.Parameter=2;function e(r){return r===1||r===2}t.is=e})(TU||(TU={}));(function(t){function e(n){return{value:n}}t.create=e;function r(n){let i=n;return ot.objectLiteral(i)&&(i.tooltip===void 0||ot.string(i.tooltip)||S7.is(i.tooltip))&&(i.location===void 0||NA.is(i.location))&&(i.command===void 0||$x.is(i.command))}t.is=r})(EU||(EU={}));(function(t){function e(n,i,a){let s={position:n,label:i};return a!==void 0&&(s.kind=a),s}t.create=e;function r(n){let i=n;return ot.objectLiteral(i)&&bn.is(i.position)&&(ot.string(i.label)||ot.typedArray(i.label,EU.is))&&(i.kind===void 0||TU.is(i.kind))&&i.textEdits===void 0||ot.typedArray(i.textEdits,Gx.is)&&(i.tooltip===void 0||ot.string(i.tooltip)||S7.is(i.tooltip))&&(i.paddingLeft===void 0||ot.boolean(i.paddingLeft))&&(i.paddingRight===void 0||ot.boolean(i.paddingRight))}t.is=r})(B9e||(B9e={}));(function(t){function e(r){return{kind:"snippet",value:r}}t.createSnippet=e})(F9e||(F9e={}));(function(t){function e(r,n,i,a){return{insertText:r,filterText:n,range:i,command:a}}t.create=e})(z9e||(z9e={}));(function(t){function e(r){return{items:r}}t.create=e})($9e||($9e={}));(function(t){t.Invoked=0,t.Automatic=1})(G9e||(G9e={}));(function(t){function e(r,n){return{range:r,text:n}}t.create=e})(q9e||(q9e={}));(function(t){function e(r,n){return{triggerKind:r,selectedCompletionInfo:n}}t.create=e})(U9e||(U9e={}));(function(t){function e(r){let n=r;return ot.objectLiteral(n)&&fU.is(n.uri)&&ot.string(n.name)}t.is=e})(H9e||(H9e={}));(function(t){function e(a,s,o,l){return new SU(a,s,o,l)}t.create=e;function r(a){let s=a;return!!(ot.defined(s)&&ot.string(s.uri)&&(ot.undefined(s.languageId)||ot.string(s.languageId))&&ot.uinteger(s.lineCount)&&ot.func(s.getText)&&ot.func(s.positionAt)&&ot.func(s.offsetAt))}t.is=r;function n(a,s){let o=a.getText(),l=i(s,(h,f)=>{let d=h.range.start.line-f.range.start.line;return d===0?h.range.start.character-f.range.start.character:d}),u=o.length;for(let h=l.length-1;h>=0;h--){let f=l[h],d=a.offsetAt(f.range.start),p=a.offsetAt(f.range.end);if(p<=u)o=o.substring(0,d)+f.newText+o.substring(p,o.length);else throw new Error("Overlapping edit");u=d}return o}t.applyEdits=n;function i(a,s){if(a.length<=1)return a;let o=a.length/2|0,l=a.slice(0,o),u=a.slice(o);i(l,s),i(u,s);let h=0,f=0,d=0;for(;h0&&e.push(r.length),this._lineOffsets=e}return this._lineOffsets}positionAt(e){e=Math.max(Math.min(e,this._content.length),0);let r=this.getLineOffsets(),n=0,i=r.length;if(i===0)return bn.create(0,e);for(;ne?i=s:n=s+1}let a=n-1;return bn.create(a,e-r[a])}offsetAt(e){let r=this.getLineOffsets();if(e.line>=r.length)return this._content.length;if(e.line<0)return 0;let n=r[e.line],i=e.line+1"u"}t.undefined=n;function i(p){return p===!0||p===!1}t.boolean=i;function a(p){return e.call(p)==="[object String]"}t.string=a;function s(p){return e.call(p)==="[object Number]"}t.number=s;function o(p,m,g){return e.call(p)==="[object Number]"&&m<=p&&p<=g}t.numberRange=o;function l(p){return e.call(p)==="[object Number]"&&-2147483648<=p&&p<=2147483647}t.integer=l;function u(p){return e.call(p)==="[object Number]"&&0<=p&&p<=2147483647}t.uinteger=u;function h(p){return e.call(p)==="[object Function]"}t.func=h;function f(p){return p!==null&&typeof p=="object"}t.objectLiteral=f;function d(p,m){return Array.isArray(p)&&p.every(m)}t.typedArray=d})(ot||(ot={}))});var C7,_7,qm,Um,_U,Ux,FA=D(()=>{CU();hc();C7=class{constructor(){this.nodeStack=[]}get current(){var e;return(e=this.nodeStack[this.nodeStack.length-1])!==null&&e!==void 0?e:this.rootNode}buildRootNode(e){return this.rootNode=new Ux(e),this.rootNode.root=this.rootNode,this.nodeStack=[this.rootNode],this.rootNode}buildCompositeNode(e){let r=new Um;return r.grammarSource=e,r.root=this.rootNode,this.current.content.push(r),this.nodeStack.push(r),r}buildLeafNode(e,r){let n=new qm(e.startOffset,e.image.length,Dy(e),e.tokenType,!r);return n.grammarSource=r,n.root=this.rootNode,this.current.content.push(n),n}removeNode(e){let r=e.container;if(r){let n=r.content.indexOf(e);n>=0&&r.content.splice(n,1)}}addHiddenNodes(e){let r=[];for(let a of e){let s=new qm(a.startOffset,a.image.length,Dy(a),a.tokenType,!0);s.root=this.rootNode,r.push(s)}let n=this.current,i=!1;if(n.content.length>0){n.content.push(...r);return}for(;n.container;){let a=n.container.content.indexOf(n);if(a>0){n.container.content.splice(a,0,...r),i=!0;break}n=n.container}i||this.rootNode.content.unshift(...r)}construct(e){let r=this.current;typeof e.$type=="string"&&(this.current.astNode=e),e.$cstNode=r;let n=this.nodeStack.pop();n?.content.length===0&&this.removeNode(n)}},_7=class{get parent(){return this.container}get feature(){return this.grammarSource}get hidden(){return!1}get astNode(){var e,r;let n=typeof((e=this._astNode)===null||e===void 0?void 0:e.$type)=="string"?this._astNode:(r=this.container)===null||r===void 0?void 0:r.astNode;if(!n)throw new Error("This node has no associated AST element");return n}set astNode(e){this._astNode=e}get element(){return this.astNode}get text(){return this.root.fullText.substring(this.offset,this.end)}},qm=class extends _7{get offset(){return this._offset}get length(){return this._length}get end(){return this._offset+this._length}get hidden(){return this._hidden}get tokenType(){return this._tokenType}get range(){return this._range}constructor(e,r,n,i,a=!1){super(),this._hidden=a,this._offset=e,this._tokenType=i,this._length=r,this._range=n}},Um=class extends _7{constructor(){super(...arguments),this.content=new _U(this)}get children(){return this.content}get offset(){var e,r;return(r=(e=this.firstNonHiddenNode)===null||e===void 0?void 0:e.offset)!==null&&r!==void 0?r:0}get length(){return this.end-this.offset}get end(){var e,r;return(r=(e=this.lastNonHiddenNode)===null||e===void 0?void 0:e.end)!==null&&r!==void 0?r:0}get range(){let e=this.firstNonHiddenNode,r=this.lastNonHiddenNode;if(e&&r){if(this._rangeCache===void 0){let{range:n}=e,{range:i}=r;this._rangeCache={start:n.start,end:i.end.line=0;e--){let r=this.content[e];if(!r.hidden)return r}return this.content[this.content.length-1]}},_U=class t extends Array{constructor(e){super(),this.parent=e,Object.setPrototypeOf(this,t.prototype)}push(...e){return this.addParents(e),super.push(...e)}unshift(...e){return this.addParents(e),super.unshift(...e)}splice(e,r,...n){return this.addParents(n),super.splice(e,r,...n)}addParents(e){for(let r of e)r.container=this.parent}},Ux=class extends Um{get text(){return this._text.substring(this.offset,this.end)}get fullText(){return this._text}constructor(e){super(),this._text="",this._text=e??""}}});function AU(t){return t.$type===zA}var zA,W9e,Y9e,A7,L7,$A,Hx,R7,e4t,LU,D7=D(()=>{Ap();HTe();A0();pc();vo();FA();zA=Symbol("Datatype");W9e="\u200B",Y9e=t=>t.endsWith(W9e)?t:t+W9e,A7=class{constructor(e){this._unorderedGroups=new Map,this.allRules=new Map,this.lexer=e.parser.Lexer;let r=this.lexer.definition,n=e.LanguageMetaData.mode==="production";this.wrapper=new LU(r,Object.assign(Object.assign({},e.parser.ParserConfig),{skipValidations:n,errorMessageProvider:e.parser.ParserErrorMessageProvider}))}alternatives(e,r){this.wrapper.wrapOr(e,r)}optional(e,r){this.wrapper.wrapOption(e,r)}many(e,r){this.wrapper.wrapMany(e,r)}atLeastOne(e,r){this.wrapper.wrapAtLeastOne(e,r)}getRule(e){return this.allRules.get(e)}isRecording(){return this.wrapper.IS_RECORDING}get unorderedGroups(){return this._unorderedGroups}getRuleStack(){return this.wrapper.RULE_STACK}finalize(){this.wrapper.wrapSelfAnalysis()}},L7=class extends A7{get current(){return this.stack[this.stack.length-1]}constructor(e){super(e),this.nodeBuilder=new C7,this.stack=[],this.assignmentMap=new Map,this.linker=e.references.Linker,this.converter=e.parser.ValueConverter,this.astReflection=e.shared.AstReflection}rule(e,r){let n=this.computeRuleType(e),i=this.wrapper.DEFINE_RULE(Y9e(e.name),this.startImplementation(n,r).bind(this));return this.allRules.set(e.name,i),e.entry&&(this.mainRule=i),i}computeRuleType(e){if(!e.fragment){if(w6(e))return zA;{let r=wv(e);return r??e.name}}}parse(e,r={}){this.nodeBuilder.buildRootNode(e);let n=this.lexerResult=this.lexer.tokenize(e);this.wrapper.input=n.tokens;let i=r.rule?this.allRules.get(r.rule):this.mainRule;if(!i)throw new Error(r.rule?`No rule found with name '${r.rule}'`:"No main rule available.");let a=i.call(this.wrapper,{});return this.nodeBuilder.addHiddenNodes(n.hidden),this.unorderedGroups.clear(),this.lexerResult=void 0,{value:a,lexerErrors:n.errors,lexerReport:n.report,parserErrors:this.wrapper.errors}}startImplementation(e,r){return n=>{let i=!this.isRecording()&&e!==void 0;if(i){let s={$type:e};this.stack.push(s),e===zA&&(s.value="")}let a;try{a=r(n)}catch{a=void 0}return a===void 0&&i&&(a=this.construct()),a}}extractHiddenTokens(e){let r=this.lexerResult.hidden;if(!r.length)return[];let n=e.startOffset;for(let i=0;in)return r.splice(0,i);return r.splice(0,r.length)}consume(e,r,n){let i=this.wrapper.wrapConsume(e,r);if(!this.isRecording()&&this.isValidToken(i)){let a=this.extractHiddenTokens(i);this.nodeBuilder.addHiddenNodes(a);let s=this.nodeBuilder.buildLeafNode(i,n),{assignment:o,isCrossRef:l}=this.getAssignment(n),u=this.current;if(o){let h=vu(n)?i.image:this.converter.convert(i.image,s);this.assign(o.operator,o.feature,h,s,l)}else if(AU(u)){let h=i.image;vu(n)||(h=this.converter.convert(h,s).toString()),u.value+=h}}}isValidToken(e){return!e.isInsertedInRecovery&&!isNaN(e.startOffset)&&typeof e.endOffset=="number"&&!isNaN(e.endOffset)}subrule(e,r,n,i,a){let s;!this.isRecording()&&!n&&(s=this.nodeBuilder.buildCompositeNode(i));let o=this.wrapper.wrapSubrule(e,r,a);!this.isRecording()&&s&&s.length>0&&this.performSubruleAssignment(o,i,s)}performSubruleAssignment(e,r,n){let{assignment:i,isCrossRef:a}=this.getAssignment(r);if(i)this.assign(i.operator,i.feature,e,n,a);else if(!i){let s=this.current;if(AU(s))s.value+=e.toString();else if(typeof e=="object"&&e){let l=this.assignWithoutOverride(e,s);this.stack.pop(),this.stack.push(l)}}}action(e,r){if(!this.isRecording()){let n=this.current;if(r.feature&&r.operator){n=this.construct(),this.nodeBuilder.removeNode(n.$cstNode),this.nodeBuilder.buildCompositeNode(r).content.push(n.$cstNode);let a={$type:e};this.stack.push(a),this.assign(r.operator,r.feature,n,n.$cstNode,!1)}else n.$type=e}}construct(){if(this.isRecording())return;let e=this.current;return dC(e),this.nodeBuilder.construct(e),this.stack.pop(),AU(e)?this.converter.convert(e.value,e.$cstNode):(B$(this.astReflection,e),e)}getAssignment(e){if(!this.assignmentMap.has(e)){let r=Tm(e,fc);this.assignmentMap.set(e,{assignment:r,isCrossRef:r?km(r.terminal):!1})}return this.assignmentMap.get(e)}assign(e,r,n,i,a){let s=this.current,o;switch(a&&typeof n=="string"?o=this.linker.buildReference(s,r,i,n):o=n,e){case"=":{s[r]=o;break}case"?=":{s[r]=!0;break}case"+=":Array.isArray(s[r])||(s[r]=[]),s[r].push(o)}}assignWithoutOverride(e,r){for(let[i,a]of Object.entries(r)){let s=e[i];s===void 0?e[i]=a:Array.isArray(s)&&Array.isArray(a)&&(a.push(...s),e[i]=a)}let n=e.$cstNode;return n&&(n.astNode=void 0,e.$cstNode=void 0),e}get definitionErrors(){return this.wrapper.definitionErrors}},$A=class{buildMismatchTokenMessage(e){return ff.buildMismatchTokenMessage(e)}buildNotAllInputParsedMessage(e){return ff.buildNotAllInputParsedMessage(e)}buildNoViableAltMessage(e){return ff.buildNoViableAltMessage(e)}buildEarlyExitMessage(e){return ff.buildEarlyExitMessage(e)}},Hx=class extends $A{buildMismatchTokenMessage({expected:e,actual:r}){return`Expecting ${e.LABEL?"`"+e.LABEL+"`":e.name.endsWith(":KW")?`keyword '${e.name.substring(0,e.name.length-3)}'`:`token of type '${e.name}'`} but found \`${r.image}\`.`}buildNotAllInputParsedMessage({firstRedundant:e}){return`Expecting end of file but found \`${e.image}\`.`}},R7=class extends A7{constructor(){super(...arguments),this.tokens=[],this.elementStack=[],this.lastElementStack=[],this.nextTokenIndex=0,this.stackSize=0}action(){}construct(){}parse(e){this.resetState();let r=this.lexer.tokenize(e,{mode:"partial"});return this.tokens=r.tokens,this.wrapper.input=[...this.tokens],this.mainRule.call(this.wrapper,{}),this.unorderedGroups.clear(),{tokens:this.tokens,elementStack:[...this.lastElementStack],tokenIndex:this.nextTokenIndex}}rule(e,r){let n=this.wrapper.DEFINE_RULE(Y9e(e.name),this.startImplementation(r).bind(this));return this.allRules.set(e.name,n),e.entry&&(this.mainRule=n),n}resetState(){this.elementStack=[],this.lastElementStack=[],this.nextTokenIndex=0,this.stackSize=0}startImplementation(e){return r=>{let n=this.keepStackSize();try{e(r)}finally{this.resetStackSize(n)}}}removeUnexpectedElements(){this.elementStack.splice(this.stackSize)}keepStackSize(){let e=this.elementStack.length;return this.stackSize=e,e}resetStackSize(e){this.removeUnexpectedElements(),this.stackSize=e}consume(e,r,n){this.wrapper.wrapConsume(e,r),this.isRecording()||(this.lastElementStack=[...this.elementStack,n],this.nextTokenIndex=this.currIdx+1)}subrule(e,r,n,i,a){this.before(i),this.wrapper.wrapSubrule(e,r,a),this.after(i)}before(e){this.isRecording()||this.elementStack.push(e)}after(e){if(!this.isRecording()){let r=this.elementStack.lastIndexOf(e);r>=0&&this.elementStack.splice(r)}}get currIdx(){return this.wrapper.currIdx}},e4t={recoveryEnabled:!0,nodeLocationTracking:"full",skipValidations:!0,errorMessageProvider:new Hx},LU=class extends b7{constructor(e,r){let n=r&&"maxLookahead"in r;super(e,Object.assign(Object.assign(Object.assign({},e4t),{lookaheadStrategy:n?new df({maxLookahead:r.maxLookahead}):new E7({logging:r.skipValidations?()=>{}:void 0})}),r))}get IS_RECORDING(){return this.RECORDING_PHASE}DEFINE_RULE(e,r){return this.RULE(e,r)}wrapSelfAnalysis(){this.performSelfAnalysis()}wrapConsume(e,r){return this.consume(e,r)}wrapSubrule(e,r,n){return this.subrule(e,r,{ARGS:[n]})}wrapOr(e,r){this.or(e,r)}wrapOption(e,r){this.option(e,r)}wrapMany(e,r){this.many(e,r)}wrapAtLeastOne(e,r){this.atLeastOne(e,r)}}});function I7(t,e,r){return t4t({parser:e,tokens:r,ruleNames:new Map},t),e}function t4t(t,e){let r=x6(e,!1),n=An(e.rules).filter(Ys).filter(i=>r.has(i));for(let i of n){let a=Object.assign(Object.assign({},t),{consume:1,optional:1,subrule:1,many:1,or:1});t.parser.rule(i,Hm(a,i.definition))}}function Hm(t,e,r=!1){let n;if(vu(e))n=l4t(t,e);else if(Qh(e))n=r4t(t,e);else if(fc(e))n=Hm(t,e.terminal);else if(km(e))n=X9e(t,e);else if(dc(e))n=n4t(t,e);else if(cC(e))n=a4t(t,e);else if(fC(e))n=s4t(t,e);else if(Hd(e))n=o4t(t,e);else if(A$(e)){let i=t.consume++;n=()=>t.parser.consume(i,Gl,e)}else throw new bm(e.$cstNode,`Unexpected element type: ${e.$type}`);return j9e(t,r?void 0:GA(e),n,e.cardinality)}function r4t(t,e){let r=k6(e);return()=>t.parser.action(r,e)}function n4t(t,e){let r=e.rule.ref;if(Ys(r)){let n=t.subrule++,i=r.fragment,a=e.arguments.length>0?i4t(r,e.arguments):()=>({});return s=>t.parser.subrule(n,K9e(t,r),i,e,a(s))}else if(zl(r)){let n=t.consume++,i=RU(t,r.name);return()=>t.parser.consume(n,i,e)}else if(r)_0(r);else throw new bm(e.$cstNode,`Undefined rule: ${e.rule.$refText}`)}function i4t(t,e){let r=e.map(n=>pf(n.value));return n=>{let i={};for(let a=0;ae(n)||r(n)}else if(b$(t)){let e=pf(t.left),r=pf(t.right);return n=>e(n)&&r(n)}else if(k$(t)){let e=pf(t.value);return r=>!e(r)}else if(T$(t)){let e=t.parameter.ref.name;return r=>r!==void 0&&r[e]===!0}else if(x$(t)){let e=!!t.true;return()=>e}_0(t)}function a4t(t,e){if(e.elements.length===1)return Hm(t,e.elements[0]);{let r=[];for(let i of e.elements){let a={ALT:Hm(t,i,!0)},s=GA(i);s&&(a.GATE=pf(s)),r.push(a)}let n=t.or++;return i=>t.parser.alternatives(n,r.map(a=>{let s={ALT:()=>a.ALT(i)},o=a.GATE;return o&&(s.GATE=()=>o(i)),s}))}}function s4t(t,e){if(e.elements.length===1)return Hm(t,e.elements[0]);let r=[];for(let o of e.elements){let l={ALT:Hm(t,o,!0)},u=GA(o);u&&(l.GATE=pf(u)),r.push(l)}let n=t.or++,i=(o,l)=>{let u=l.getRuleStack().join("-");return`uGroup_${o}_${u}`},a=o=>t.parser.alternatives(n,r.map((l,u)=>{let h={ALT:()=>!0},f=t.parser;h.ALT=()=>{if(l.ALT(o),!f.isRecording()){let p=i(n,f);f.unorderedGroups.get(p)||f.unorderedGroups.set(p,[]);let m=f.unorderedGroups.get(p);typeof m?.[u]>"u"&&(m[u]=!0)}};let d=l.GATE;return d?h.GATE=()=>d(o):h.GATE=()=>{let p=f.unorderedGroups.get(i(n,f));return!p?.[u]},h})),s=j9e(t,GA(e),a,"*");return o=>{s(o),t.parser.isRecording()||t.parser.unorderedGroups.delete(i(n,t.parser))}}function o4t(t,e){let r=e.elements.map(n=>Hm(t,n));return n=>r.forEach(i=>i(n))}function GA(t){if(Hd(t))return t.guardCondition}function X9e(t,e,r=e.terminal){if(r)if(dc(r)&&Ys(r.rule.ref)){let n=r.rule.ref,i=t.subrule++;return a=>t.parser.subrule(i,K9e(t,n),!1,e,a)}else if(dc(r)&&zl(r.rule.ref)){let n=t.consume++,i=RU(t,r.rule.ref.name);return()=>t.parser.consume(n,i,e)}else if(vu(r)){let n=t.consume++,i=RU(t,r.value);return()=>t.parser.consume(n,i,e)}else throw new Error("Could not build cross reference parser");else{if(!e.type.ref)throw new Error("Could not resolve reference to type: "+e.type.$refText);let n=vC(e.type.ref),i=n?.terminal;if(!i)throw new Error("Could not find name assignment for type: "+k6(e.type.ref));return X9e(t,e,i)}}function l4t(t,e){let r=t.consume++,n=t.tokens[e.value];if(!n)throw new Error("Could not find token for keyword: "+e.value);return()=>t.parser.consume(r,n,e)}function j9e(t,e,r,n){let i=e&&pf(e);if(!n)if(i){let a=t.or++;return s=>t.parser.alternatives(a,[{ALT:()=>r(s),GATE:()=>i(s)},{ALT:RA(),GATE:()=>!i(s)}])}else return r;if(n==="*"){let a=t.many++;return s=>t.parser.many(a,{DEF:()=>r(s),GATE:i?()=>i(s):void 0})}else if(n==="+"){let a=t.many++;if(i){let s=t.or++;return o=>t.parser.alternatives(s,[{ALT:()=>t.parser.atLeastOne(a,{DEF:()=>r(o)}),GATE:()=>i(o)},{ALT:RA(),GATE:()=>!i(o)}])}else return s=>t.parser.atLeastOne(a,{DEF:()=>r(s)})}else if(n==="?"){let a=t.optional++;return s=>t.parser.optional(a,{DEF:()=>r(s),GATE:i?()=>i(s):void 0})}else _0(n)}function K9e(t,e){let r=u4t(t,e),n=t.parser.getRule(r);if(!n)throw new Error(`Rule "${r}" not found."`);return n}function u4t(t,e){if(Ys(e))return e.name;if(t.ruleNames.has(e))return t.ruleNames.get(e);{let r=e,n=r.$container,i=e.$type;for(;!Ys(n);)(Hd(n)||cC(n)||fC(n))&&(i=n.elements.indexOf(r).toString()+":"+i),r=n,n=n.$container;return i=n.name+":"+i,t.ruleNames.set(e,i),i}}function RU(t,e){let r=t.tokens[e];if(!r)throw new Error(`Token "${e}" not found."`);return r}var qA=D(()=>{Ap();A0();aC();nl();pc()});function DU(t){let e=t.Grammar,r=t.parser.Lexer,n=new R7(t);return I7(e,n,r.definition),n.finalize(),n}var IU=D(()=>{D7();qA()});function MU(t){let e=Z9e(t);return e.finalize(),e}function Z9e(t){let e=t.Grammar,r=t.parser.Lexer,n=new L7(t);return I7(e,n,r.definition)}var NU=D(()=>{D7();qA()});var mf,UA=D(()=>{Ap();A0();vo();pc();bv();nl();mf=class{constructor(){this.diagnostics=[]}buildTokens(e,r){let n=An(x6(e,!1)),i=this.buildTerminalTokens(n),a=this.buildKeywordTokens(n,i,r);return i.forEach(s=>{let o=s.PATTERN;typeof o=="object"&&o&&"test"in o&&xv(o)?a.unshift(s):a.push(s)}),a}flushLexingReport(e){return{diagnostics:this.popDiagnostics()}}popDiagnostics(){let e=[...this.diagnostics];return this.diagnostics=[],e}buildTerminalTokens(e){return e.filter(zl).filter(r=>!r.fragment).map(r=>this.buildTerminalToken(r)).toArray()}buildTerminalToken(e){let r=kv(e),n=this.requiresCustomPattern(r)?this.regexPatternFunction(r):r,i={name:e.name,PATTERN:n};return typeof n=="function"&&(i.LINE_BREAKS=!0),e.hidden&&(i.GROUP=xv(r)?Ri.SKIPPED:"hidden"),i}requiresCustomPattern(e){return e.flags.includes("u")||e.flags.includes("s")?!0:!!(e.source.includes("?<=")||e.source.includes("?(r.lastIndex=i,r.exec(n))}buildKeywordTokens(e,r,n){return e.filter(Ys).flatMap(i=>L0(i).filter(vu)).distinct(i=>i.value).toArray().sort((i,a)=>a.value.length-i.value.length).map(i=>this.buildKeywordToken(i,r,!!n?.caseInsensitive))}buildKeywordToken(e,r,n){let i=this.buildKeywordPattern(e,n),a={name:e.value,PATTERN:i,LONGER_ALT:this.findLongerAlt(e,r)};return typeof i=="function"&&(a.LINE_BREAKS=!0),a}buildKeywordPattern(e,r){return r?new RegExp(H$(e.value)):e.value}findLongerAlt(e,r){return r.reduce((n,i)=>{let a=i?.PATTERN;return a?.source&&V$("^"+a.source+"$",e.value)&&n.push(i),n},[])}}});var Vm,Y0,OU=D(()=>{A0();pc();Vm=class{convert(e,r){let n=r.grammarSource;if(km(n)&&(n=X$(n)),dc(n)){let i=n.rule.ref;if(!i)throw new Error("This cst node was not parsed by a rule.");return this.runConverter(i,e,r)}return e}runConverter(e,r,n){var i;switch(e.name.toUpperCase()){case"INT":return Y0.convertInt(r);case"STRING":return Y0.convertString(r);case"ID":return Y0.convertID(r)}switch((i=tG(e))===null||i===void 0?void 0:i.toLowerCase()){case"number":return Y0.convertNumber(r);case"boolean":return Y0.convertBoolean(r);case"bigint":return Y0.convertBigint(r);case"date":return Y0.convertDate(r);default:return r}}};(function(t){function e(u){let h="";for(let f=1;f{"use strict";Object.defineProperty(FU,"__esModule",{value:!0});var PU;function BU(){if(PU===void 0)throw new Error("No runtime abstraction layer installed");return PU}(function(t){function e(r){if(r===void 0)throw new Error("No runtime abstraction layer provided");PU=r}t.install=e})(BU||(BU={}));FU.default=BU});var eEe=Bi(Qs=>{"use strict";Object.defineProperty(Qs,"__esModule",{value:!0});Qs.stringArray=Qs.array=Qs.func=Qs.error=Qs.number=Qs.string=Qs.boolean=void 0;function c4t(t){return t===!0||t===!1}Qs.boolean=c4t;function Q9e(t){return typeof t=="string"||t instanceof String}Qs.string=Q9e;function h4t(t){return typeof t=="number"||t instanceof Number}Qs.number=h4t;function f4t(t){return t instanceof Error}Qs.error=f4t;function d4t(t){return typeof t=="function"}Qs.func=d4t;function J9e(t){return Array.isArray(t)}Qs.array=J9e;function p4t(t){return J9e(t)&&t.every(e=>Q9e(e))}Qs.stringArray=p4t});var GU=Bi(Vx=>{"use strict";Object.defineProperty(Vx,"__esModule",{value:!0});Vx.Emitter=Vx.Event=void 0;var m4t=zU(),tEe;(function(t){let e={dispose(){}};t.None=function(){return e}})(tEe||(Vx.Event=tEe={}));var $U=class{add(e,r=null,n){this._callbacks||(this._callbacks=[],this._contexts=[]),this._callbacks.push(e),this._contexts.push(r),Array.isArray(n)&&n.push({dispose:()=>this.remove(e,r)})}remove(e,r=null){if(!this._callbacks)return;let n=!1;for(let i=0,a=this._callbacks.length;i{this._callbacks||(this._callbacks=new $U),this._options&&this._options.onFirstListenerAdd&&this._callbacks.isEmpty()&&this._options.onFirstListenerAdd(this),this._callbacks.add(e,r);let i={dispose:()=>{this._callbacks&&(this._callbacks.remove(e,r),i.dispose=t._noop,this._options&&this._options.onLastListenerRemove&&this._callbacks.isEmpty()&&this._options.onLastListenerRemove(this))}};return Array.isArray(n)&&n.push(i),i}),this._event}fire(e){this._callbacks&&this._callbacks.invoke.call(this._callbacks,e)}dispose(){this._callbacks&&(this._callbacks.dispose(),this._callbacks=void 0)}};Vx.Emitter=HA;HA._noop=function(){}});var rEe=Bi(Wx=>{"use strict";Object.defineProperty(Wx,"__esModule",{value:!0});Wx.CancellationTokenSource=Wx.CancellationToken=void 0;var g4t=zU(),y4t=eEe(),qU=GU(),VA;(function(t){t.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:qU.Event.None}),t.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:qU.Event.None});function e(r){let n=r;return n&&(n===t.None||n===t.Cancelled||y4t.boolean(n.isCancellationRequested)&&!!n.onCancellationRequested)}t.is=e})(VA||(Wx.CancellationToken=VA={}));var v4t=Object.freeze(function(t,e){let r=(0,g4t.default)().timer.setTimeout(t.bind(e),0);return{dispose(){r.dispose()}}}),WA=class{constructor(){this._isCancelled=!1}cancel(){this._isCancelled||(this._isCancelled=!0,this._emitter&&(this._emitter.fire(void 0),this.dispose()))}get isCancellationRequested(){return this._isCancelled}get onCancellationRequested(){return this._isCancelled?v4t:(this._emitter||(this._emitter=new qU.Emitter),this._emitter.event)}dispose(){this._emitter&&(this._emitter.dispose(),this._emitter=void 0)}},UU=class{get token(){return this._token||(this._token=new WA),this._token}cancel(){this._token?this._token.cancel():this._token=VA.Cancelled}dispose(){this._token?this._token instanceof WA&&this._token.dispose():this._token=VA.None}};Wx.CancellationTokenSource=UU});var Pr={};var Su=D(()=>{Wr(Pr,Na(rEe(),1))});function HU(){return new Promise(t=>{typeof setImmediate>"u"?setTimeout(t,0):setImmediate(t)})}function XA(){return YA=performance.now(),new Pr.CancellationTokenSource}function iEe(t){nEe=t}function j0(t){return t===X0}async function ca(t){if(t===Pr.CancellationToken.None)return;let e=performance.now();if(e-YA>=nEe&&(YA=e,await HU(),YA=performance.now()),t.isCancellationRequested)throw X0}var YA,nEe,X0,Lo,Cu=D(()=>{Su();YA=0,nEe=10;X0=Symbol("OperationCancelled");Lo=class{constructor(){this.promise=new Promise((e,r)=>{this.resolve=n=>(e(n),this),this.reject=n=>(r(n),this)})}}});function VU(t,e){if(t.length<=1)return t;let r=t.length/2|0,n=t.slice(0,r),i=t.slice(r);VU(n,e),VU(i,e);let a=0,s=0,o=0;for(;ar.line||e.line===r.line&&e.character>r.character?{start:r,end:e}:t}function x4t(t){let e=oEe(t.range);return e!==t.range?{newText:t.newText,range:e}:t}var jA,Yx,lEe=D(()=>{"use strict";jA=class t{constructor(e,r,n,i){this._uri=e,this._languageId=r,this._version=n,this._content=i,this._lineOffsets=void 0}get uri(){return this._uri}get languageId(){return this._languageId}get version(){return this._version}getText(e){if(e){let r=this.offsetAt(e.start),n=this.offsetAt(e.end);return this._content.substring(r,n)}return this._content}update(e,r){for(let n of e)if(t.isIncremental(n)){let i=oEe(n.range),a=this.offsetAt(i.start),s=this.offsetAt(i.end);this._content=this._content.substring(0,a)+n.text+this._content.substring(s,this._content.length);let o=Math.max(i.start.line,0),l=Math.max(i.end.line,0),u=this._lineOffsets,h=aEe(n.text,!1,a);if(l-o===h.length)for(let d=0,p=h.length;de?i=s:n=s+1}let a=n-1;return e=this.ensureBeforeEOL(e,r[a]),{line:a,character:e-r[a]}}offsetAt(e){let r=this.getLineOffsets();if(e.line>=r.length)return this._content.length;if(e.line<0)return 0;let n=r[e.line];if(e.character<=0)return n;let i=e.line+1r&&sEe(this._content.charCodeAt(e-1));)e--;return e}get lineCount(){return this.getLineOffsets().length}static isIncremental(e){let r=e;return r!=null&&typeof r.text=="string"&&r.range!==void 0&&(r.rangeLength===void 0||typeof r.rangeLength=="number")}static isFull(e){let r=e;return r!=null&&typeof r.text=="string"&&r.range===void 0&&r.rangeLength===void 0}};(function(t){function e(i,a,s,o){return new jA(i,a,s,o)}t.create=e;function r(i,a,s){if(i instanceof jA)return i.update(a,s),i;throw new Error("TextDocument.update: document must be created by TextDocument.create")}t.update=r;function n(i,a){let s=i.getText(),o=VU(a.map(x4t),(h,f)=>{let d=h.range.start.line-f.range.start.line;return d===0?h.range.start.character-f.range.start.character:d}),l=0,u=[];for(let h of o){let f=i.offsetAt(h.range.start);if(fl&&u.push(s.substring(l,f)),h.newText.length&&u.push(h.newText),l=i.offsetAt(h.range.end)}return u.push(s.substr(l)),u.join("")}t.applyEdits=n})(Yx||(Yx={}))});var uEe,Ro,Xx,WU=D(()=>{(()=>{"use strict";var t={470:i=>{function a(l){if(typeof l!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(l))}function s(l,u){for(var h,f="",d=0,p=-1,m=0,g=0;g<=l.length;++g){if(g2){var y=f.lastIndexOf("/");if(y!==f.length-1){y===-1?(f="",d=0):d=(f=f.slice(0,y)).length-1-f.lastIndexOf("/"),p=g,m=0;continue}}else if(f.length===2||f.length===1){f="",d=0,p=g,m=0;continue}}u&&(f.length>0?f+="/..":f="..",d=2)}else f.length>0?f+="/"+l.slice(p+1,g):f=l.slice(p+1,g),d=g-p-1;p=g,m=0}else h===46&&m!==-1?++m:m=-1}return f}var o={resolve:function(){for(var l,u="",h=!1,f=arguments.length-1;f>=-1&&!h;f--){var d;f>=0?d=arguments[f]:(l===void 0&&(l=process.cwd()),d=l),a(d),d.length!==0&&(u=d+"/"+u,h=d.charCodeAt(0)===47)}return u=s(u,!h),h?u.length>0?"/"+u:"/":u.length>0?u:"."},normalize:function(l){if(a(l),l.length===0)return".";var u=l.charCodeAt(0)===47,h=l.charCodeAt(l.length-1)===47;return(l=s(l,!u)).length!==0||u||(l="."),l.length>0&&h&&(l+="/"),u?"/"+l:l},isAbsolute:function(l){return a(l),l.length>0&&l.charCodeAt(0)===47},join:function(){if(arguments.length===0)return".";for(var l,u=0;u0&&(l===void 0?l=h:l+="/"+h)}return l===void 0?".":o.normalize(l)},relative:function(l,u){if(a(l),a(u),l===u||(l=o.resolve(l))===(u=o.resolve(u)))return"";for(var h=1;hg){if(u.charCodeAt(p+v)===47)return u.slice(p+v+1);if(v===0)return u.slice(p+v)}else d>g&&(l.charCodeAt(h+v)===47?y=v:v===0&&(y=0));break}var x=l.charCodeAt(h+v);if(x!==u.charCodeAt(p+v))break;x===47&&(y=v)}var k="";for(v=h+y+1;v<=f;++v)v!==f&&l.charCodeAt(v)!==47||(k.length===0?k+="..":k+="/..");return k.length>0?k+u.slice(p+y):(p+=y,u.charCodeAt(p)===47&&++p,u.slice(p))},_makeLong:function(l){return l},dirname:function(l){if(a(l),l.length===0)return".";for(var u=l.charCodeAt(0),h=u===47,f=-1,d=!0,p=l.length-1;p>=1;--p)if((u=l.charCodeAt(p))===47){if(!d){f=p;break}}else d=!1;return f===-1?h?"/":".":h&&f===1?"//":l.slice(0,f)},basename:function(l,u){if(u!==void 0&&typeof u!="string")throw new TypeError('"ext" argument must be a string');a(l);var h,f=0,d=-1,p=!0;if(u!==void 0&&u.length>0&&u.length<=l.length){if(u.length===l.length&&u===l)return"";var m=u.length-1,g=-1;for(h=l.length-1;h>=0;--h){var y=l.charCodeAt(h);if(y===47){if(!p){f=h+1;break}}else g===-1&&(p=!1,g=h+1),m>=0&&(y===u.charCodeAt(m)?--m==-1&&(d=h):(m=-1,d=g))}return f===d?d=g:d===-1&&(d=l.length),l.slice(f,d)}for(h=l.length-1;h>=0;--h)if(l.charCodeAt(h)===47){if(!p){f=h+1;break}}else d===-1&&(p=!1,d=h+1);return d===-1?"":l.slice(f,d)},extname:function(l){a(l);for(var u=-1,h=0,f=-1,d=!0,p=0,m=l.length-1;m>=0;--m){var g=l.charCodeAt(m);if(g!==47)f===-1&&(d=!1,f=m+1),g===46?u===-1?u=m:p!==1&&(p=1):u!==-1&&(p=-1);else if(!d){h=m+1;break}}return u===-1||f===-1||p===0||p===1&&u===f-1&&u===h+1?"":l.slice(u,f)},format:function(l){if(l===null||typeof l!="object")throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof l);return(function(u,h){var f=h.dir||h.root,d=h.base||(h.name||"")+(h.ext||"");return f?f===h.root?f+d:f+"/"+d:d})(0,l)},parse:function(l){a(l);var u={root:"",dir:"",base:"",ext:"",name:""};if(l.length===0)return u;var h,f=l.charCodeAt(0),d=f===47;d?(u.root="/",h=1):h=0;for(var p=-1,m=0,g=-1,y=!0,v=l.length-1,x=0;v>=h;--v)if((f=l.charCodeAt(v))!==47)g===-1&&(y=!1,g=v+1),f===46?p===-1?p=v:x!==1&&(x=1):p!==-1&&(x=-1);else if(!y){m=v+1;break}return p===-1||g===-1||x===0||x===1&&p===g-1&&p===m+1?g!==-1&&(u.base=u.name=m===0&&d?l.slice(1,g):l.slice(m,g)):(m===0&&d?(u.name=l.slice(1,p),u.base=l.slice(1,g)):(u.name=l.slice(m,p),u.base=l.slice(m,g)),u.ext=l.slice(p,g)),m>0?u.dir=l.slice(0,m-1):d&&(u.dir="/"),u},sep:"/",delimiter:":",win32:null,posix:null};o.posix=o,i.exports=o}},e={};function r(i){var a=e[i];if(a!==void 0)return a.exports;var s=e[i]={exports:{}};return t[i](s,s.exports,r),s.exports}r.d=(i,a)=>{for(var s in a)r.o(a,s)&&!r.o(i,s)&&Object.defineProperty(i,s,{enumerable:!0,get:a[s]})},r.o=(i,a)=>Object.prototype.hasOwnProperty.call(i,a),r.r=i=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(i,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(i,"__esModule",{value:!0})};var n={};(()=>{let i;r.r(n),r.d(n,{URI:()=>d,Utils:()=>P}),typeof process=="object"?i=process.platform==="win32":typeof navigator=="object"&&(i=navigator.userAgent.indexOf("Windows")>=0);let a=/^\w[\w\d+.-]*$/,s=/^\//,o=/^\/\//;function l(O,C){if(!O.scheme&&C)throw new Error(`[UriError]: Scheme is missing: {scheme: "", authority: "${O.authority}", path: "${O.path}", query: "${O.query}", fragment: "${O.fragment}"}`);if(O.scheme&&!a.test(O.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(O.path){if(O.authority){if(!s.test(O.path))throw new Error('[UriError]: If a URI contains an authority component, then the path component must either be empty or begin with a slash ("/") character')}else if(o.test(O.path))throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")')}}let u="",h="/",f=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/;class d{static isUri(C){return C instanceof d||!!C&&typeof C.authority=="string"&&typeof C.fragment=="string"&&typeof C.path=="string"&&typeof C.query=="string"&&typeof C.scheme=="string"&&typeof C.fsPath=="string"&&typeof C.with=="function"&&typeof C.toString=="function"}scheme;authority;path;query;fragment;constructor(C,N,B,F,M,$=!1){typeof C=="object"?(this.scheme=C.scheme||u,this.authority=C.authority||u,this.path=C.path||u,this.query=C.query||u,this.fragment=C.fragment||u):(this.scheme=(function(z,q){return z||q?z:"file"})(C,$),this.authority=N||u,this.path=(function(z,q){switch(z){case"https":case"http":case"file":q?q[0]!==h&&(q=h+q):q=h}return q})(this.scheme,B||u),this.query=F||u,this.fragment=M||u,l(this,$))}get fsPath(){return x(this,!1)}with(C){if(!C)return this;let{scheme:N,authority:B,path:F,query:M,fragment:$}=C;return N===void 0?N=this.scheme:N===null&&(N=u),B===void 0?B=this.authority:B===null&&(B=u),F===void 0?F=this.path:F===null&&(F=u),M===void 0?M=this.query:M===null&&(M=u),$===void 0?$=this.fragment:$===null&&($=u),N===this.scheme&&B===this.authority&&F===this.path&&M===this.query&&$===this.fragment?this:new m(N,B,F,M,$)}static parse(C,N=!1){let B=f.exec(C);return B?new m(B[2]||u,S(B[4]||u),S(B[5]||u),S(B[7]||u),S(B[9]||u),N):new m(u,u,u,u,u)}static file(C){let N=u;if(i&&(C=C.replace(/\\/g,h)),C[0]===h&&C[1]===h){let B=C.indexOf(h,2);B===-1?(N=C.substring(2),C=h):(N=C.substring(2,B),C=C.substring(B)||h)}return new m("file",N,C,u,u)}static from(C){let N=new m(C.scheme,C.authority,C.path,C.query,C.fragment);return l(N,!0),N}toString(C=!1){return k(this,C)}toJSON(){return this}static revive(C){if(C){if(C instanceof d)return C;{let N=new m(C);return N._formatted=C.external,N._fsPath=C._sep===p?C.fsPath:null,N}}return C}}let p=i?1:void 0;class m extends d{_formatted=null;_fsPath=null;get fsPath(){return this._fsPath||(this._fsPath=x(this,!1)),this._fsPath}toString(C=!1){return C?k(this,!0):(this._formatted||(this._formatted=k(this,!1)),this._formatted)}toJSON(){let C={$mid:1};return this._fsPath&&(C.fsPath=this._fsPath,C._sep=p),this._formatted&&(C.external=this._formatted),this.path&&(C.path=this.path),this.scheme&&(C.scheme=this.scheme),this.authority&&(C.authority=this.authority),this.query&&(C.query=this.query),this.fragment&&(C.fragment=this.fragment),C}}let g={58:"%3A",47:"%2F",63:"%3F",35:"%23",91:"%5B",93:"%5D",64:"%40",33:"%21",36:"%24",38:"%26",39:"%27",40:"%28",41:"%29",42:"%2A",43:"%2B",44:"%2C",59:"%3B",61:"%3D",32:"%20"};function y(O,C,N){let B,F=-1;for(let M=0;M=97&&$<=122||$>=65&&$<=90||$>=48&&$<=57||$===45||$===46||$===95||$===126||C&&$===47||N&&$===91||N&&$===93||N&&$===58)F!==-1&&(B+=encodeURIComponent(O.substring(F,M)),F=-1),B!==void 0&&(B+=O.charAt(M));else{B===void 0&&(B=O.substr(0,M));let z=g[$];z!==void 0?(F!==-1&&(B+=encodeURIComponent(O.substring(F,M)),F=-1),B+=z):F===-1&&(F=M)}}return F!==-1&&(B+=encodeURIComponent(O.substring(F))),B!==void 0?B:O}function v(O){let C;for(let N=0;N1&&O.scheme==="file"?`//${O.authority}${O.path}`:O.path.charCodeAt(0)===47&&(O.path.charCodeAt(1)>=65&&O.path.charCodeAt(1)<=90||O.path.charCodeAt(1)>=97&&O.path.charCodeAt(1)<=122)&&O.path.charCodeAt(2)===58?C?O.path.substr(1):O.path[1].toLowerCase()+O.path.substr(2):O.path,i&&(N=N.replace(/\//g,"\\")),N}function k(O,C){let N=C?v:y,B="",{scheme:F,authority:M,path:$,query:z,fragment:q}=O;if(F&&(B+=F,B+=":"),(M||F==="file")&&(B+=h,B+=h),M){let V=M.indexOf("@");if(V!==-1){let U=M.substr(0,V);M=M.substr(V+1),V=U.lastIndexOf(":"),V===-1?B+=N(U,!1,!1):(B+=N(U.substr(0,V),!1,!1),B+=":",B+=N(U.substr(V+1),!1,!0)),B+="@"}M=M.toLowerCase(),V=M.lastIndexOf(":"),V===-1?B+=N(M,!1,!0):(B+=N(M.substr(0,V),!1,!0),B+=M.substr(V))}if($){if($.length>=3&&$.charCodeAt(0)===47&&$.charCodeAt(2)===58){let V=$.charCodeAt(1);V>=65&&V<=90&&($=`/${String.fromCharCode(V+32)}:${$.substr(3)}`)}else if($.length>=2&&$.charCodeAt(1)===58){let V=$.charCodeAt(0);V>=65&&V<=90&&($=`${String.fromCharCode(V+32)}:${$.substr(2)}`)}B+=N($,!0,!1)}return z&&(B+="?",B+=N(z,!1,!1)),q&&(B+="#",B+=C?q:y(q,!1,!1)),B}function _(O){try{return decodeURIComponent(O)}catch{return O.length>3?O.substr(0,3)+_(O.substr(3)):O}}let T=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function S(O){return O.match(T)?O.replace(T,(C=>_(C))):O}var R=r(470);let A=R.posix||R,I="/";var P;(function(O){O.joinPath=function(C,...N){return C.with({path:A.join(C.path,...N)})},O.resolvePath=function(C,...N){let B=C.path,F=!1;B[0]!==I&&(B=I+B,F=!0);let M=A.resolve(B,...N);return F&&M[0]===I&&!C.authority&&(M=M.substring(1)),C.with({path:M})},O.dirname=function(C){if(C.path.length===0||C.path===I)return C;let N=A.dirname(C.path);return N.length===1&&N.charCodeAt(0)===46&&(N=""),C.with({path:N})},O.basename=function(C){return A.basename(C.path)},O.extname=function(C){return A.extname(C.path)}})(P||(P={}))})(),uEe=n})();({URI:Ro,Utils:Xx}=uEe)});var Do,K0=D(()=>{WU();(function(t){t.basename=Xx.basename,t.dirname=Xx.dirname,t.extname=Xx.extname,t.joinPath=Xx.joinPath,t.resolvePath=Xx.resolvePath;function e(i,a){return i?.toString()===a?.toString()}t.equals=e;function r(i,a){let s=typeof i=="string"?i:i.path,o=typeof a=="string"?a:a.path,l=s.split("/").filter(p=>p.length>0),u=o.split("/").filter(p=>p.length>0),h=0;for(;h{lEe();jx();Su();nl();K0();(function(t){t[t.Changed=0]="Changed",t[t.Parsed=1]="Parsed",t[t.IndexedContent=2]="IndexedContent",t[t.ComputedScopes=3]="ComputedScopes",t[t.Linked=4]="Linked",t[t.IndexedReferences=5]="IndexedReferences",t[t.Validated=6]="Validated"})(ai||(ai={}));M7=class{constructor(e){this.serviceRegistry=e.ServiceRegistry,this.textDocuments=e.workspace.TextDocuments,this.fileSystemProvider=e.workspace.FileSystemProvider}async fromUri(e,r=Pr.CancellationToken.None){let n=await this.fileSystemProvider.readFile(e);return this.createAsync(e,n,r)}fromTextDocument(e,r,n){return r=r??Ro.parse(e.uri),Pr.CancellationToken.is(n)?this.createAsync(r,e,n):this.create(r,e,n)}fromString(e,r,n){return Pr.CancellationToken.is(n)?this.createAsync(r,e,n):this.create(r,e,n)}fromModel(e,r){return this.create(r,{$model:e})}create(e,r,n){if(typeof r=="string"){let i=this.parse(e,r,n);return this.createLangiumDocument(i,e,void 0,r)}else if("$model"in r){let i={value:r.$model,parserErrors:[],lexerErrors:[]};return this.createLangiumDocument(i,e)}else{let i=this.parse(e,r.getText(),n);return this.createLangiumDocument(i,e,r)}}async createAsync(e,r,n){if(typeof r=="string"){let i=await this.parseAsync(e,r,n);return this.createLangiumDocument(i,e,void 0,r)}else{let i=await this.parseAsync(e,r.getText(),n);return this.createLangiumDocument(i,e,r)}}createLangiumDocument(e,r,n,i){let a;if(n)a={parseResult:e,uri:r,state:ai.Parsed,references:[],textDocument:n};else{let s=this.createTextDocumentGetter(r,i);a={parseResult:e,uri:r,state:ai.Parsed,references:[],get textDocument(){return s()}}}return e.value.$document=a,a}async update(e,r){var n,i;let a=(n=e.parseResult.value.$cstNode)===null||n===void 0?void 0:n.root.fullText,s=(i=this.textDocuments)===null||i===void 0?void 0:i.get(e.uri.toString()),o=s?s.getText():await this.fileSystemProvider.readFile(e.uri);if(s)Object.defineProperty(e,"textDocument",{value:s});else{let l=this.createTextDocumentGetter(e.uri,o);Object.defineProperty(e,"textDocument",{get:l})}return a!==o&&(e.parseResult=await this.parseAsync(e.uri,o,r),e.parseResult.value.$document=e),e.state=ai.Parsed,e}parse(e,r,n){return this.serviceRegistry.getServices(e).parser.LangiumParser.parse(r,n)}parseAsync(e,r,n){return this.serviceRegistry.getServices(e).parser.AsyncParser.parse(r,n)}createTextDocumentGetter(e,r){let n=this.serviceRegistry,i;return()=>i??(i=Yx.create(e.toString(),n.getServices(e).LanguageMetaData.languageId,0,r??""))}},N7=class{constructor(e){this.documentMap=new Map,this.langiumDocumentFactory=e.workspace.LangiumDocumentFactory,this.serviceRegistry=e.ServiceRegistry}get all(){return An(this.documentMap.values())}addDocument(e){let r=e.uri.toString();if(this.documentMap.has(r))throw new Error(`A document with the URI '${r}' is already present.`);this.documentMap.set(r,e)}getDocument(e){let r=e.toString();return this.documentMap.get(r)}async getOrCreateDocument(e,r){let n=this.getDocument(e);return n||(n=await this.langiumDocumentFactory.fromUri(e,r),this.addDocument(n),n)}createDocument(e,r,n){if(n)return this.langiumDocumentFactory.fromString(r,e,n).then(i=>(this.addDocument(i),i));{let i=this.langiumDocumentFactory.fromString(r,e);return this.addDocument(i),i}}hasDocument(e){return this.documentMap.has(e.toString())}invalidateDocument(e){let r=e.toString(),n=this.documentMap.get(r);return n&&(this.serviceRegistry.getServices(e).references.Linker.unlink(n),n.state=ai.Changed,n.precomputedScopes=void 0,n.diagnostics=void 0),n}deleteDocument(e){let r=e.toString(),n=this.documentMap.get(r);return n&&(n.state=ai.Changed,this.documentMap.delete(r)),n}}});var YU,O7,XU=D(()=>{Su();cc();vo();Cu();jx();YU=Symbol("ref_resolving"),O7=class{constructor(e){this.reflection=e.shared.AstReflection,this.langiumDocuments=()=>e.shared.workspace.LangiumDocuments,this.scopeProvider=e.references.ScopeProvider,this.astNodeLocator=e.workspace.AstNodeLocator}async link(e,r=Pr.CancellationToken.None){for(let n of xu(e.parseResult.value))await ca(r),yv(n).forEach(i=>this.doLink(i,e))}doLink(e,r){var n;let i=e.reference;if(i._ref===void 0){i._ref=YU;try{let a=this.getCandidate(e);if(ym(a))i._ref=a;else if(i._nodeDescription=a,this.langiumDocuments().hasDocument(a.documentUri)){let s=this.loadAstNode(a);i._ref=s??this.createLinkingError(e,a)}else i._ref=void 0}catch(a){console.error(`An error occurred while resolving reference to '${i.$refText}':`,a);let s=(n=a.message)!==null&&n!==void 0?n:String(a);i._ref=Object.assign(Object.assign({},e),{message:`An error occurred while resolving reference to '${i.$refText}': ${s}`})}r.references.push(i)}}unlink(e){for(let r of e.references)delete r._ref,delete r._nodeDescription;e.references=[]}getCandidate(e){let n=this.scopeProvider.getScope(e).getElement(e.reference.$refText);return n??this.createLinkingError(e)}buildReference(e,r,n,i){let a=this,s={$refNode:n,$refText:i,get ref(){var o;if(qi(this._ref))return this._ref;if(f$(this._nodeDescription)){let l=a.loadAstNode(this._nodeDescription);this._ref=l??a.createLinkingError({reference:s,container:e,property:r},this._nodeDescription)}else if(this._ref===void 0){this._ref=YU;let l=d6(e).$document,u=a.getLinkedNode({reference:s,container:e,property:r});if(u.error&&l&&l.state{pc();P7=class{getName(e){if(cEe(e))return e.name}getNameNode(e){return b6(e.$cstNode,"name")}}});var B7,KU=D(()=>{pc();cc();vo();hc();nl();K0();B7=class{constructor(e){this.nameProvider=e.references.NameProvider,this.index=e.shared.workspace.IndexManager,this.nodeLocator=e.workspace.AstNodeLocator}findDeclaration(e){if(e){let r=eG(e),n=e.astNode;if(r&&n){let i=n[r.feature];if(Is(i))return i.ref;if(Array.isArray(i)){for(let a of i)if(Is(a)&&a.$refNode&&a.$refNode.offset<=e.offset&&a.$refNode.end>=e.end)return a.ref}}if(n){let i=this.nameProvider.getNameNode(n);if(i&&(i===e||p$(e,i)))return n}}}findDeclarationNode(e){let r=this.findDeclaration(e);if(r?.$cstNode){let n=this.nameProvider.getNameNode(r);return n??r.$cstNode}}findReferences(e,r){let n=[];if(r.includeDeclaration){let a=this.getReferenceToSelf(e);a&&n.push(a)}let i=this.index.findAllReferences(e,this.nodeLocator.getAstNodePath(e));return r.documentUri&&(i=i.filter(a=>Do.equals(a.sourceUri,r.documentUri))),n.push(...i),An(n)}getReferenceToSelf(e){let r=this.nameProvider.getNameNode(e);if(r){let n=Xs(e),i=this.nodeLocator.getAstNodePath(e);return{sourceUri:n.uri,sourcePath:i,targetUri:n.uri,targetPath:i,segment:xm(r),local:!0}}}}});var kc,Wm,Kx=D(()=>{nl();kc=class{constructor(e){if(this.map=new Map,e)for(let[r,n]of e)this.add(r,n)}get size(){return Ry.sum(An(this.map.values()).map(e=>e.length))}clear(){this.map.clear()}delete(e,r){if(r===void 0)return this.map.delete(e);{let n=this.map.get(e);if(n){let i=n.indexOf(r);if(i>=0)return n.length===1?this.map.delete(e):n.splice(i,1),!0}return!1}}get(e){var r;return(r=this.map.get(e))!==null&&r!==void 0?r:[]}has(e,r){if(r===void 0)return this.map.has(e);{let n=this.map.get(e);return n?n.indexOf(r)>=0:!1}}add(e,r){return this.map.has(e)?this.map.get(e).push(r):this.map.set(e,[r]),this}addAll(e,r){return this.map.has(e)?this.map.get(e).push(...r):this.map.set(e,Array.from(r)),this}forEach(e){this.map.forEach((r,n)=>r.forEach(i=>e(i,n,this)))}[Symbol.iterator](){return this.entries().iterator()}entries(){return An(this.map.entries()).flatMap(([e,r])=>r.map(n=>[e,n]))}keys(){return An(this.map.keys())}values(){return An(this.map.values()).flat()}entriesGroupedByKey(){return An(this.map.entries())}},Wm=class{get size(){return this.map.size}constructor(e){if(this.map=new Map,this.inverse=new Map,e)for(let[r,n]of e)this.set(r,n)}clear(){this.map.clear(),this.inverse.clear()}set(e,r){return this.map.set(e,r),this.inverse.set(r,e),this}get(e){return this.map.get(e)}getKey(e){return this.inverse.get(e)}delete(e){let r=this.map.get(e);return r!==void 0?(this.map.delete(e),this.inverse.delete(r),!0):!1}}});var F7,ZU=D(()=>{Su();vo();Kx();Cu();F7=class{constructor(e){this.nameProvider=e.references.NameProvider,this.descriptions=e.workspace.AstNodeDescriptionProvider}async computeExports(e,r=Pr.CancellationToken.None){return this.computeExportsForNode(e.parseResult.value,e,void 0,r)}async computeExportsForNode(e,r,n=p6,i=Pr.CancellationToken.None){let a=[];this.exportNode(e,a,r);for(let s of n(e))await ca(i),this.exportNode(s,a,r);return a}exportNode(e,r,n){let i=this.nameProvider.getName(e);i&&r.push(this.descriptions.createDescription(e,i,n))}async computeLocalScopes(e,r=Pr.CancellationToken.None){let n=e.parseResult.value,i=new kc;for(let a of L0(n))await ca(r),this.processNode(a,e,i);return i}processNode(e,r,n){let i=e.$container;if(i){let a=this.nameProvider.getName(e);a&&n.add(i,this.descriptions.createDescription(e,a,r))}}}});var Zx,z7,b4t,QU=D(()=>{nl();Zx=class{constructor(e,r,n){var i;this.elements=e,this.outerScope=r,this.caseInsensitive=(i=n?.caseInsensitive)!==null&&i!==void 0?i:!1}getAllElements(){return this.outerScope?this.elements.concat(this.outerScope.getAllElements()):this.elements}getElement(e){let r=this.caseInsensitive?this.elements.find(n=>n.name.toLowerCase()===e.toLowerCase()):this.elements.find(n=>n.name===e);if(r)return r;if(this.outerScope)return this.outerScope.getElement(e)}},z7=class{constructor(e,r,n){var i;this.elements=new Map,this.caseInsensitive=(i=n?.caseInsensitive)!==null&&i!==void 0?i:!1;for(let a of e){let s=this.caseInsensitive?a.name.toLowerCase():a.name;this.elements.set(s,a)}this.outerScope=r}getElement(e){let r=this.caseInsensitive?e.toLowerCase():e,n=this.elements.get(r);if(n)return n;if(this.outerScope)return this.outerScope.getElement(e)}getAllElements(){let e=An(this.elements.values());return this.outerScope&&(e=e.concat(this.outerScope.getAllElements())),e}},b4t={getElement(){},getAllElements(){return n6}}});var Qx,$7,Ym,KA,Jx,ZA=D(()=>{Qx=class{constructor(){this.toDispose=[],this.isDisposed=!1}onDispose(e){this.toDispose.push(e)}dispose(){this.throwIfDisposed(),this.clear(),this.isDisposed=!0,this.toDispose.forEach(e=>e.dispose())}throwIfDisposed(){if(this.isDisposed)throw new Error("This cache has already been disposed")}},$7=class extends Qx{constructor(){super(...arguments),this.cache=new Map}has(e){return this.throwIfDisposed(),this.cache.has(e)}set(e,r){this.throwIfDisposed(),this.cache.set(e,r)}get(e,r){if(this.throwIfDisposed(),this.cache.has(e))return this.cache.get(e);if(r){let n=r();return this.cache.set(e,n),n}else return}delete(e){return this.throwIfDisposed(),this.cache.delete(e)}clear(){this.throwIfDisposed(),this.cache.clear()}},Ym=class extends Qx{constructor(e){super(),this.cache=new Map,this.converter=e??(r=>r)}has(e,r){return this.throwIfDisposed(),this.cacheForContext(e).has(r)}set(e,r,n){this.throwIfDisposed(),this.cacheForContext(e).set(r,n)}get(e,r,n){this.throwIfDisposed();let i=this.cacheForContext(e);if(i.has(r))return i.get(r);if(n){let a=n();return i.set(r,a),a}else return}delete(e,r){return this.throwIfDisposed(),this.cacheForContext(e).delete(r)}clear(e){if(this.throwIfDisposed(),e){let r=this.converter(e);this.cache.delete(r)}else this.cache.clear()}cacheForContext(e){let r=this.converter(e),n=this.cache.get(r);return n||(n=new Map,this.cache.set(r,n)),n}},KA=class extends Ym{constructor(e,r){super(n=>n.toString()),r?(this.toDispose.push(e.workspace.DocumentBuilder.onDocumentPhase(r,n=>{this.clear(n.uri.toString())})),this.toDispose.push(e.workspace.DocumentBuilder.onUpdate((n,i)=>{for(let a of i)this.clear(a)}))):this.toDispose.push(e.workspace.DocumentBuilder.onUpdate((n,i)=>{let a=n.concat(i);for(let s of a)this.clear(s)}))}},Jx=class extends $7{constructor(e,r){super(),r?(this.toDispose.push(e.workspace.DocumentBuilder.onBuildPhase(r,()=>{this.clear()})),this.toDispose.push(e.workspace.DocumentBuilder.onUpdate((n,i)=>{i.length>0&&this.clear()}))):this.toDispose.push(e.workspace.DocumentBuilder.onUpdate(()=>{this.clear()}))}}});var G7,JU=D(()=>{QU();vo();nl();ZA();G7=class{constructor(e){this.reflection=e.shared.AstReflection,this.nameProvider=e.references.NameProvider,this.descriptions=e.workspace.AstNodeDescriptionProvider,this.indexManager=e.shared.workspace.IndexManager,this.globalScopeCache=new Jx(e.shared)}getScope(e){let r=[],n=this.reflection.getReferenceType(e),i=Xs(e.container).precomputedScopes;if(i){let s=e.container;do{let o=i.get(s);o.length>0&&r.push(An(o).filter(l=>this.reflection.isSubtype(l.type,n))),s=s.$container}while(s)}let a=this.getGlobalScope(n,e);for(let s=r.length-1;s>=0;s--)a=this.createScope(r[s],a);return a}createScope(e,r,n){return new Zx(An(e),r,n)}createScopeForNodes(e,r,n){let i=An(e).map(a=>{let s=this.nameProvider.getName(a);if(s)return this.descriptions.createDescription(a,s)}).nonNullable();return new Zx(i,r,n)}getGlobalScope(e,r){return this.globalScopeCache.get(e,()=>new z7(this.indexManager.allElements(e)))}}});function eH(t){return typeof t.$comment=="string"}function hEe(t){return typeof t=="object"&&!!t&&("$ref"in t||"$error"in t)}var q7,QA=D(()=>{WU();cc();vo();pc();q7=class{constructor(e){this.ignoreProperties=new Set(["$container","$containerProperty","$containerIndex","$document","$cstNode"]),this.langiumDocuments=e.shared.workspace.LangiumDocuments,this.astNodeLocator=e.workspace.AstNodeLocator,this.nameProvider=e.references.NameProvider,this.commentProvider=e.documentation.CommentProvider}serialize(e,r){let n=r??{},i=r?.replacer,a=(o,l)=>this.replacer(o,l,n),s=i?(o,l)=>i(o,l,a):a;try{return this.currentDocument=Xs(e),JSON.stringify(e,s,r?.space)}finally{this.currentDocument=void 0}}deserialize(e,r){let n=r??{},i=JSON.parse(e);return this.linkNode(i,i,n),i}replacer(e,r,{refText:n,sourceText:i,textRegions:a,comments:s,uriConverter:o}){var l,u,h,f;if(!this.ignoreProperties.has(e))if(Is(r)){let d=r.ref,p=n?r.$refText:void 0;if(d){let m=Xs(d),g="";this.currentDocument&&this.currentDocument!==m&&(o?g=o(m.uri,r):g=m.uri.toString());let y=this.astNodeLocator.getAstNodePath(d);return{$ref:`${g}#${y}`,$refText:p}}else return{$error:(u=(l=r.error)===null||l===void 0?void 0:l.message)!==null&&u!==void 0?u:"Could not resolve reference",$refText:p}}else if(qi(r)){let d;if(a&&(d=this.addAstNodeRegionWithAssignmentsTo(Object.assign({},r)),(!e||r.$document)&&d?.$textRegion&&(d.$textRegion.documentURI=(h=this.currentDocument)===null||h===void 0?void 0:h.uri.toString())),i&&!e&&(d??(d=Object.assign({},r)),d.$sourceText=(f=r.$cstNode)===null||f===void 0?void 0:f.text),s){d??(d=Object.assign({},r));let p=this.commentProvider.getComment(r);p&&(d.$comment=p.replace(/\r/g,""))}return d??r}else return r}addAstNodeRegionWithAssignmentsTo(e){let r=n=>({offset:n.offset,end:n.end,length:n.length,range:n.range});if(e.$cstNode){let n=e.$textRegion=r(e.$cstNode),i=n.assignments={};return Object.keys(e).filter(a=>!a.startsWith("$")).forEach(a=>{let s=K$(e.$cstNode,a).map(r);s.length!==0&&(i[a]=s)}),e}}linkNode(e,r,n,i,a,s){for(let[l,u]of Object.entries(e))if(Array.isArray(u))for(let h=0;h{K0();U7=class{get map(){return this.fileExtensionMap}constructor(e){this.languageIdMap=new Map,this.fileExtensionMap=new Map,this.textDocuments=e?.workspace.TextDocuments}register(e){let r=e.LanguageMetaData;for(let n of r.fileExtensions)this.fileExtensionMap.has(n)&&console.warn(`The file extension ${n} is used by multiple languages. It is now assigned to '${r.languageId}'.`),this.fileExtensionMap.set(n,e);this.languageIdMap.set(r.languageId,e),this.languageIdMap.size===1?this.singleton=e:this.singleton=void 0}getServices(e){var r,n;if(this.singleton!==void 0)return this.singleton;if(this.languageIdMap.size===0)throw new Error("The service registry is empty. Use `register` to register the services of a language.");let i=(n=(r=this.textDocuments)===null||r===void 0?void 0:r.get(e))===null||n===void 0?void 0:n.languageId;if(i!==void 0){let o=this.languageIdMap.get(i);if(o)return o}let a=Do.extname(e),s=this.fileExtensionMap.get(a);if(!s)throw i?new Error(`The service registry contains no services for the extension '${a}' for language '${i}'.`):new Error(`The service registry contains no services for the extension '${a}'.`);return s}hasServices(e){try{return this.getServices(e),!0}catch{return!1}}get all(){return Array.from(this.languageIdMap.values())}}});function Xm(t){return{code:t}}var e4,H7,V7=D(()=>{_u();Kx();Cu();nl();(function(t){t.all=["fast","slow","built-in"]})(e4||(e4={}));H7=class{constructor(e){this.entries=new kc,this.entriesBefore=[],this.entriesAfter=[],this.reflection=e.shared.AstReflection}register(e,r=this,n="fast"){if(n==="built-in")throw new Error("The 'built-in' category is reserved for lexer, parser, and linker errors.");for(let[i,a]of Object.entries(e)){let s=a;if(Array.isArray(s))for(let o of s){let l={check:this.wrapValidationException(o,r),category:n};this.addEntry(i,l)}else if(typeof s=="function"){let o={check:this.wrapValidationException(s,r),category:n};this.addEntry(i,o)}else _0(s)}}wrapValidationException(e,r){return async(n,i,a)=>{await this.handleException(()=>e.call(r,n,i,a),"An error occurred during validation",i,n)}}async handleException(e,r,n,i){try{await e()}catch(a){if(j0(a))throw a;console.error(`${r}:`,a),a instanceof Error&&a.stack&&console.error(a.stack);let s=a instanceof Error?a.message:String(a);n("error",`${r}: ${s}`,{node:i})}}addEntry(e,r){if(e==="AstNode"){this.entries.add("AstNode",r);return}for(let n of this.reflection.getAllSubTypes(e))this.entries.add(n,r)}getChecks(e,r){let n=An(this.entries.get(e)).concat(this.entries.get("AstNode"));return r&&(n=n.filter(i=>r.includes(i.category))),n.map(i=>i.check)}registerBeforeDocument(e,r=this){this.entriesBefore.push(this.wrapPreparationException(e,"An error occurred during set-up of the validation",r))}registerAfterDocument(e,r=this){this.entriesAfter.push(this.wrapPreparationException(e,"An error occurred during tear-down of the validation",r))}wrapPreparationException(e,r,n){return async(i,a,s,o)=>{await this.handleException(()=>e.call(n,i,a,s,o),r,a,i)}}get checksBefore(){return this.entriesBefore}get checksAfter(){return this.entriesAfter}}});function fEe(t){if(t.range)return t.range;let e;return typeof t.property=="string"?e=b6(t.node.$cstNode,t.property,t.index):typeof t.keyword=="string"&&(e=Q$(t.node.$cstNode,t.keyword,t.index)),e??(e=t.node.$cstNode),e?e.range:{start:{line:0,character:0},end:{line:0,character:0}}}function JA(t){switch(t){case"error":return 1;case"warning":return 2;case"info":return 3;case"hint":return 4;default:throw new Error("Invalid diagnostic severity: "+t)}}function dEe(t){switch(t){case"error":return Xm(Au.LexingError);case"warning":return Xm(Au.LexingWarning);case"info":return Xm(Au.LexingInfo);case"hint":return Xm(Au.LexingHint);default:throw new Error("Invalid diagnostic severity: "+t)}}var W7,Au,rH=D(()=>{Su();pc();vo();hc();Cu();V7();W7=class{constructor(e){this.validationRegistry=e.validation.ValidationRegistry,this.metadata=e.LanguageMetaData}async validateDocument(e,r={},n=Pr.CancellationToken.None){let i=e.parseResult,a=[];if(await ca(n),(!r.categories||r.categories.includes("built-in"))&&(this.processLexingErrors(i,a,r),r.stopAfterLexingErrors&&a.some(s=>{var o;return((o=s.data)===null||o===void 0?void 0:o.code)===Au.LexingError})||(this.processParsingErrors(i,a,r),r.stopAfterParsingErrors&&a.some(s=>{var o;return((o=s.data)===null||o===void 0?void 0:o.code)===Au.ParsingError}))||(this.processLinkingErrors(e,a,r),r.stopAfterLinkingErrors&&a.some(s=>{var o;return((o=s.data)===null||o===void 0?void 0:o.code)===Au.LinkingError}))))return a;try{a.push(...await this.validateAst(i.value,r,n))}catch(s){if(j0(s))throw s;console.error("An error occurred during validation:",s)}return await ca(n),a}processLexingErrors(e,r,n){var i,a,s;let o=[...e.lexerErrors,...(a=(i=e.lexerReport)===null||i===void 0?void 0:i.diagnostics)!==null&&a!==void 0?a:[]];for(let l of o){let u=(s=l.severity)!==null&&s!==void 0?s:"error",h={severity:JA(u),range:{start:{line:l.line-1,character:l.column-1},end:{line:l.line-1,character:l.column+l.length-1}},message:l.message,data:dEe(u),source:this.getSource()};r.push(h)}}processParsingErrors(e,r,n){for(let i of e.parserErrors){let a;if(isNaN(i.token.startOffset)){if("previousToken"in i){let s=i.previousToken;if(isNaN(s.startOffset)){let o={line:0,character:0};a={start:o,end:o}}else{let o={line:s.endLine-1,character:s.endColumn};a={start:o,end:o}}}}else a=Dy(i.token);if(a){let s={severity:JA("error"),range:a,message:i.message,data:Xm(Au.ParsingError),source:this.getSource()};r.push(s)}}}processLinkingErrors(e,r,n){for(let i of e.references){let a=i.error;if(a){let s={node:a.container,property:a.property,index:a.index,data:{code:Au.LinkingError,containerType:a.container.$type,property:a.property,refText:a.reference.$refText}};r.push(this.toDiagnostic("error",a.message,s))}}}async validateAst(e,r,n=Pr.CancellationToken.None){let i=[],a=(s,o,l)=>{i.push(this.toDiagnostic(s,o,l))};return await this.validateAstBefore(e,r,a,n),await this.validateAstNodes(e,r,a,n),await this.validateAstAfter(e,r,a,n),i}async validateAstBefore(e,r,n,i=Pr.CancellationToken.None){var a;let s=this.validationRegistry.checksBefore;for(let o of s)await ca(i),await o(e,n,(a=r.categories)!==null&&a!==void 0?a:[],i)}async validateAstNodes(e,r,n,i=Pr.CancellationToken.None){await Promise.all(xu(e).map(async a=>{await ca(i);let s=this.validationRegistry.getChecks(a.$type,r.categories);for(let o of s)await o(a,n,i)}))}async validateAstAfter(e,r,n,i=Pr.CancellationToken.None){var a;let s=this.validationRegistry.checksAfter;for(let o of s)await ca(i),await o(e,n,(a=r.categories)!==null&&a!==void 0?a:[],i)}toDiagnostic(e,r,n){return{message:r,range:fEe(n),severity:JA(e),code:n.code,codeDescription:n.codeDescription,tags:n.tags,relatedInformation:n.relatedInformation,data:n.data,source:this.getSource()}}getSource(){return this.metadata.languageId}};(function(t){t.LexingError="lexing-error",t.LexingWarning="lexing-warning",t.LexingInfo="lexing-info",t.LexingHint="lexing-hint",t.ParsingError="parsing-error",t.LinkingError="linking-error"})(Au||(Au={}))});var Y7,X7,nH=D(()=>{Su();cc();vo();hc();Cu();K0();Y7=class{constructor(e){this.astNodeLocator=e.workspace.AstNodeLocator,this.nameProvider=e.references.NameProvider}createDescription(e,r,n){let i=n??Xs(e);r??(r=this.nameProvider.getName(e));let a=this.astNodeLocator.getAstNodePath(e);if(!r)throw new Error(`Node at path ${a} has no name.`);let s,o=()=>{var l;return s??(s=xm((l=this.nameProvider.getNameNode(e))!==null&&l!==void 0?l:e.$cstNode))};return{node:e,name:r,get nameSegment(){return o()},selectionSegment:xm(e.$cstNode),type:e.$type,documentUri:i.uri,path:a}}},X7=class{constructor(e){this.nodeLocator=e.workspace.AstNodeLocator}async createDescriptions(e,r=Pr.CancellationToken.None){let n=[],i=e.parseResult.value;for(let a of xu(i))await ca(r),yv(a).filter(s=>!ym(s)).forEach(s=>{let o=this.createDescription(s);o&&n.push(o)});return n}createDescription(e){let r=e.reference.$nodeDescription,n=e.reference.$refNode;if(!r||!n)return;let i=Xs(e.container).uri;return{sourceUri:i,sourcePath:this.nodeLocator.getAstNodePath(e.container),targetUri:r.documentUri,targetPath:r.path,segment:xm(n),local:Do.equals(r.documentUri,i)}}}});var j7,iH=D(()=>{j7=class{constructor(){this.segmentSeparator="/",this.indexSeparator="@"}getAstNodePath(e){if(e.$container){let r=this.getAstNodePath(e.$container),n=this.getPathSegment(e);return r+this.segmentSeparator+n}return""}getPathSegment({$containerProperty:e,$containerIndex:r}){if(!e)throw new Error("Missing '$containerProperty' in AST node.");return r!==void 0?e+this.indexSeparator+r:e}getAstNode(e,r){return r.split(this.segmentSeparator).reduce((i,a)=>{if(!i||a.length===0)return i;let s=a.indexOf(this.indexSeparator);if(s>0){let o=a.substring(0,s),l=parseInt(a.substring(s+1)),u=i[o];return u?.[l]}return i[a]},e)}}});var Ii={};var eL=D(()=>{Wr(Ii,Na(GU(),1))});var K7,aH=D(()=>{eL();Cu();K7=class{constructor(e){this._ready=new Lo,this.settings={},this.workspaceConfig=!1,this.onConfigurationSectionUpdateEmitter=new Ii.Emitter,this.serviceRegistry=e.ServiceRegistry}get ready(){return this._ready.promise}initialize(e){var r,n;this.workspaceConfig=(n=(r=e.capabilities.workspace)===null||r===void 0?void 0:r.configuration)!==null&&n!==void 0?n:!1}async initialized(e){if(this.workspaceConfig){if(e.register){let r=this.serviceRegistry.all;e.register({section:r.map(n=>this.toSectionName(n.LanguageMetaData.languageId))})}if(e.fetchConfiguration){let r=this.serviceRegistry.all.map(i=>({section:this.toSectionName(i.LanguageMetaData.languageId)})),n=await e.fetchConfiguration(r);r.forEach((i,a)=>{this.updateSectionConfiguration(i.section,n[a])})}}this._ready.resolve()}updateConfiguration(e){e.settings&&Object.keys(e.settings).forEach(r=>{let n=e.settings[r];this.updateSectionConfiguration(r,n),this.onConfigurationSectionUpdateEmitter.fire({section:r,configuration:n})})}updateSectionConfiguration(e,r){this.settings[e]=r}async getConfiguration(e,r){await this.ready;let n=this.toSectionName(e);if(this.settings[n])return this.settings[n][r]}toSectionName(e){return`${e}`}get onConfigurationSectionUpdate(){return this.onConfigurationSectionUpdateEmitter.event}}});var Dp,sH=D(()=>{(function(t){function e(r){return{dispose:async()=>await r()}}t.create=e})(Dp||(Dp={}))});var Z7,oH=D(()=>{Su();sH();Kx();Cu();nl();V7();jx();Z7=class{constructor(e){this.updateBuildOptions={validation:{categories:["built-in","fast"]}},this.updateListeners=[],this.buildPhaseListeners=new kc,this.documentPhaseListeners=new kc,this.buildState=new Map,this.documentBuildWaiters=new Map,this.currentState=ai.Changed,this.langiumDocuments=e.workspace.LangiumDocuments,this.langiumDocumentFactory=e.workspace.LangiumDocumentFactory,this.textDocuments=e.workspace.TextDocuments,this.indexManager=e.workspace.IndexManager,this.serviceRegistry=e.ServiceRegistry}async build(e,r={},n=Pr.CancellationToken.None){var i,a;for(let s of e){let o=s.uri.toString();if(s.state===ai.Validated){if(typeof r.validation=="boolean"&&r.validation)s.state=ai.IndexedReferences,s.diagnostics=void 0,this.buildState.delete(o);else if(typeof r.validation=="object"){let l=this.buildState.get(o),u=(i=l?.result)===null||i===void 0?void 0:i.validationChecks;if(u){let f=((a=r.validation.categories)!==null&&a!==void 0?a:e4.all).filter(d=>!u.includes(d));f.length>0&&(this.buildState.set(o,{completed:!1,options:{validation:Object.assign(Object.assign({},r.validation),{categories:f})},result:l.result}),s.state=ai.IndexedReferences)}}}else this.buildState.delete(o)}this.currentState=ai.Changed,await this.emitUpdate(e.map(s=>s.uri),[]),await this.buildDocuments(e,r,n)}async update(e,r,n=Pr.CancellationToken.None){this.currentState=ai.Changed;for(let s of r)this.langiumDocuments.deleteDocument(s),this.buildState.delete(s.toString()),this.indexManager.remove(s);for(let s of e){if(!this.langiumDocuments.invalidateDocument(s)){let l=this.langiumDocumentFactory.fromModel({$type:"INVALID"},s);l.state=ai.Changed,this.langiumDocuments.addDocument(l)}this.buildState.delete(s.toString())}let i=An(e).concat(r).map(s=>s.toString()).toSet();this.langiumDocuments.all.filter(s=>!i.has(s.uri.toString())&&this.shouldRelink(s,i)).forEach(s=>{this.serviceRegistry.getServices(s.uri).references.Linker.unlink(s),s.state=Math.min(s.state,ai.ComputedScopes),s.diagnostics=void 0}),await this.emitUpdate(e,r),await ca(n);let a=this.sortDocuments(this.langiumDocuments.all.filter(s=>{var o;return s.staten(e,r)))}sortDocuments(e){let r=0,n=e.length-1;for(;r=0&&!this.hasTextDocument(e[n]);)n--;rn.error!==void 0)?!0:this.indexManager.isAffected(e,r)}onUpdate(e){return this.updateListeners.push(e),Dp.create(()=>{let r=this.updateListeners.indexOf(e);r>=0&&this.updateListeners.splice(r,1)})}async buildDocuments(e,r,n){this.prepareBuild(e,r),await this.runCancelable(e,ai.Parsed,n,a=>this.langiumDocumentFactory.update(a,n)),await this.runCancelable(e,ai.IndexedContent,n,a=>this.indexManager.updateContent(a,n)),await this.runCancelable(e,ai.ComputedScopes,n,async a=>{let s=this.serviceRegistry.getServices(a.uri).references.ScopeComputation;a.precomputedScopes=await s.computeLocalScopes(a,n)}),await this.runCancelable(e,ai.Linked,n,a=>this.serviceRegistry.getServices(a.uri).references.Linker.link(a,n)),await this.runCancelable(e,ai.IndexedReferences,n,a=>this.indexManager.updateReferences(a,n));let i=e.filter(a=>this.shouldValidate(a));await this.runCancelable(i,ai.Validated,n,a=>this.validate(a,n));for(let a of e){let s=this.buildState.get(a.uri.toString());s&&(s.completed=!0)}}prepareBuild(e,r){for(let n of e){let i=n.uri.toString(),a=this.buildState.get(i);(!a||a.completed)&&this.buildState.set(i,{completed:!1,options:r,result:a?.result})}}async runCancelable(e,r,n,i){let a=e.filter(o=>o.stateo.state===r);await this.notifyBuildPhase(s,r,n),this.currentState=r}onBuildPhase(e,r){return this.buildPhaseListeners.add(e,r),Dp.create(()=>{this.buildPhaseListeners.delete(e,r)})}onDocumentPhase(e,r){return this.documentPhaseListeners.add(e,r),Dp.create(()=>{this.documentPhaseListeners.delete(e,r)})}waitUntil(e,r,n){let i;if(r&&"path"in r?i=r:n=r,n??(n=Pr.CancellationToken.None),i){let a=this.langiumDocuments.getDocument(i);if(a&&a.state>e)return Promise.resolve(i)}return this.currentState>=e?Promise.resolve(void 0):n.isCancellationRequested?Promise.reject(X0):new Promise((a,s)=>{let o=this.onBuildPhase(e,()=>{if(o.dispose(),l.dispose(),i){let u=this.langiumDocuments.getDocument(i);a(u?.uri)}else a(void 0)}),l=n.onCancellationRequested(()=>{o.dispose(),l.dispose(),s(X0)})})}async notifyDocumentPhase(e,r,n){let a=this.documentPhaseListeners.get(r).slice();for(let s of a)try{await s(e,n)}catch(o){if(!j0(o))throw o}}async notifyBuildPhase(e,r,n){if(e.length===0)return;let a=this.buildPhaseListeners.get(r).slice();for(let s of a)await ca(n),await s(e,n)}shouldValidate(e){return!!this.getBuildOptions(e).validation}async validate(e,r){var n,i;let a=this.serviceRegistry.getServices(e.uri).validation.DocumentValidator,s=this.getBuildOptions(e).validation,o=typeof s=="object"?s:void 0,l=await a.validateDocument(e,o,r);e.diagnostics?e.diagnostics.push(...l):e.diagnostics=l;let u=this.buildState.get(e.uri.toString());if(u){(n=u.result)!==null&&n!==void 0||(u.result={});let h=(i=o?.categories)!==null&&i!==void 0?i:e4.all;u.result.validationChecks?u.result.validationChecks.push(...h):u.result.validationChecks=[...h]}}getBuildOptions(e){var r,n;return(n=(r=this.buildState.get(e.uri.toString()))===null||r===void 0?void 0:r.options)!==null&&n!==void 0?n:{}}}});var Q7,lH=D(()=>{vo();ZA();Su();nl();K0();Q7=class{constructor(e){this.symbolIndex=new Map,this.symbolByTypeIndex=new Ym,this.referenceIndex=new Map,this.documents=e.workspace.LangiumDocuments,this.serviceRegistry=e.ServiceRegistry,this.astReflection=e.AstReflection}findAllReferences(e,r){let n=Xs(e).uri,i=[];return this.referenceIndex.forEach(a=>{a.forEach(s=>{Do.equals(s.targetUri,n)&&s.targetPath===r&&i.push(s)})}),An(i)}allElements(e,r){let n=An(this.symbolIndex.keys());return r&&(n=n.filter(i=>!r||r.has(i))),n.map(i=>this.getFileDescriptions(i,e)).flat()}getFileDescriptions(e,r){var n;return r?this.symbolByTypeIndex.get(e,r,()=>{var a;return((a=this.symbolIndex.get(e))!==null&&a!==void 0?a:[]).filter(o=>this.astReflection.isSubtype(o.type,r))}):(n=this.symbolIndex.get(e))!==null&&n!==void 0?n:[]}remove(e){let r=e.toString();this.symbolIndex.delete(r),this.symbolByTypeIndex.clear(r),this.referenceIndex.delete(r)}async updateContent(e,r=Pr.CancellationToken.None){let i=await this.serviceRegistry.getServices(e.uri).references.ScopeComputation.computeExports(e,r),a=e.uri.toString();this.symbolIndex.set(a,i),this.symbolByTypeIndex.clear(a)}async updateReferences(e,r=Pr.CancellationToken.None){let i=await this.serviceRegistry.getServices(e.uri).workspace.ReferenceDescriptionProvider.createDescriptions(e,r);this.referenceIndex.set(e.uri.toString(),i)}isAffected(e,r){let n=this.referenceIndex.get(e.uri.toString());return n?n.some(i=>!i.local&&r.has(i.targetUri.toString())):!1}}});var J7,uH=D(()=>{Su();Cu();K0();J7=class{constructor(e){this.initialBuildOptions={},this._ready=new Lo,this.serviceRegistry=e.ServiceRegistry,this.langiumDocuments=e.workspace.LangiumDocuments,this.documentBuilder=e.workspace.DocumentBuilder,this.fileSystemProvider=e.workspace.FileSystemProvider,this.mutex=e.workspace.WorkspaceLock}get ready(){return this._ready.promise}get workspaceFolders(){return this.folders}initialize(e){var r;this.folders=(r=e.workspaceFolders)!==null&&r!==void 0?r:void 0}initialized(e){return this.mutex.write(r=>{var n;return this.initializeWorkspace((n=this.folders)!==null&&n!==void 0?n:[],r)})}async initializeWorkspace(e,r=Pr.CancellationToken.None){let n=await this.performStartup(e);await ca(r),await this.documentBuilder.build(n,this.initialBuildOptions,r)}async performStartup(e){let r=this.serviceRegistry.all.flatMap(a=>a.LanguageMetaData.fileExtensions),n=[],i=a=>{n.push(a),this.langiumDocuments.hasDocument(a.uri)||this.langiumDocuments.addDocument(a)};return await this.loadAdditionalDocuments(e,i),await Promise.all(e.map(a=>[a,this.getRootFolder(a)]).map(async a=>this.traverseFolder(...a,r,i))),this._ready.resolve(),n}loadAdditionalDocuments(e,r){return Promise.resolve()}getRootFolder(e){return Ro.parse(e.uri)}async traverseFolder(e,r,n,i){let a=await this.fileSystemProvider.readDirectory(r);await Promise.all(a.map(async s=>{if(this.includeEntry(e,s,n)){if(s.isDirectory)await this.traverseFolder(e,s.uri,n,i);else if(s.isFile){let o=await this.langiumDocuments.getOrCreateDocument(s.uri);i(o)}}}))}includeEntry(e,r,n){let i=Do.basename(r.uri);if(i.startsWith("."))return!1;if(r.isDirectory)return i!=="node_modules"&&i!=="out";if(r.isFile){let a=Do.extname(r.uri);return n.includes(a)}return!1}}});function rL(t){return Array.isArray(t)&&(t.length===0||"name"in t[0])}function hH(t){return t&&"modes"in t&&"defaultMode"in t}function cH(t){return!rL(t)&&!hH(t)}var e8,tL,jm,nL=D(()=>{Ap();e8=class{buildUnexpectedCharactersMessage(e,r,n,i,a){return Sx.buildUnexpectedCharactersMessage(e,r,n,i,a)}buildUnableToPopLexerModeMessage(e){return Sx.buildUnableToPopLexerModeMessage(e)}},tL={mode:"full"},jm=class{constructor(e){this.errorMessageProvider=e.parser.LexerErrorMessageProvider,this.tokenBuilder=e.parser.TokenBuilder;let r=this.tokenBuilder.buildTokens(e.Grammar,{caseInsensitive:e.LanguageMetaData.caseInsensitive});this.tokenTypes=this.toTokenTypeDictionary(r);let n=cH(r)?Object.values(r):r,i=e.LanguageMetaData.mode==="production";this.chevrotainLexer=new Ri(n,{positionTracking:"full",skipValidations:i,errorMessageProvider:this.errorMessageProvider})}get definition(){return this.tokenTypes}tokenize(e,r=tL){var n,i,a;let s=this.chevrotainLexer.tokenize(e);return{tokens:s.tokens,errors:s.errors,hidden:(n=s.groups.hidden)!==null&&n!==void 0?n:[],report:(a=(i=this.tokenBuilder).flushLexingReport)===null||a===void 0?void 0:a.call(i,e)}}toTokenTypeDictionary(e){if(cH(e))return e;let r=hH(e)?Object.values(e.modes).flat():e,n={};return r.forEach(i=>n[i.name]=i),n}}});function pH(t,e,r){let n,i;typeof t=="string"?(i=e,n=r):(i=t.range.start,n=e),i||(i=bn.create(0,0));let a=gEe(t),s=gH(n),o=k4t({lines:a,position:i,options:s});return _4t({index:0,tokens:o,position:i})}function mH(t,e){let r=gH(e),n=gEe(t);if(n.length===0)return!1;let i=n[0],a=n[n.length-1],s=r.start,o=r.end;return!!s?.exec(i)&&!!o?.exec(a)}function gEe(t){let e="";return typeof t=="string"?e=t:e=t.text,e.split(q$)}function k4t(t){var e,r,n;let i=[],a=t.position.line,s=t.position.character;for(let o=0;o=h.length){if(i.length>0){let p=bn.create(a,s);i.push({type:"break",content:"",range:on.create(p,p)})}}else{pEe.lastIndex=f;let p=pEe.exec(h);if(p){let m=p[0],g=p[1],y=bn.create(a,s+f),v=bn.create(a,s+f+m.length);i.push({type:"tag",content:g,range:on.create(y,v)}),f+=m.length,f=dH(h,f)}if(f0&&i[i.length-1].type==="break"?i.slice(0,-1):i}function T4t(t,e,r,n){let i=[];if(t.length===0){let a=bn.create(r,n),s=bn.create(r,n+e.length);i.push({type:"text",content:e,range:on.create(a,s)})}else{let a=0;for(let o of t){let l=o.index,u=e.substring(a,l);u.length>0&&i.push({type:"text",content:e.substring(a,l),range:on.create(bn.create(r,a+n),bn.create(r,l+n))});let h=u.length+1,f=o[1];if(i.push({type:"inline-tag",content:f,range:on.create(bn.create(r,a+h+n),bn.create(r,a+h+f.length+n))}),h+=f.length,o.length===4){h+=o[2].length;let d=o[3];i.push({type:"text",content:d,range:on.create(bn.create(r,a+h+n),bn.create(r,a+h+d.length+n))})}else i.push({type:"text",content:"",range:on.create(bn.create(r,a+h+n),bn.create(r,a+h+n))});a=l+o[0].length}let s=e.substring(a);s.length>0&&i.push({type:"text",content:s,range:on.create(bn.create(r,a+n),bn.create(r,a+n+s.length))})}return i}function dH(t,e){let r=t.substring(e).match(E4t);return r?e+r.index:t.length}function C4t(t){let e=t.match(S4t);if(e&&typeof e.index=="number")return e.index}function _4t(t){var e,r,n,i;let a=bn.create(t.position.line,t.position.character);if(t.tokens.length===0)return new iL([],on.create(a,a));let s=[];for(;t.index0){let l=dH(e,a);s=e.substring(l),e=e.substring(0,a)}return(t==="linkcode"||t==="link"&&r.link==="code")&&(s=`\`${s}\``),(i=(n=r.renderLink)===null||n===void 0?void 0:n.call(r,e,s))!==null&&i!==void 0?i:I4t(e,s)}}function I4t(t,e){try{return Ro.parse(t,!0),`[${e}](${t})`}catch{return t}}function mEe(t){return t.endsWith(` `)?` `:` -`}var UTe,V1t,Y1t,X1t,EA,Fw,zw,CA,iU=A(()=>{pG();oy();Yc();UTe=/\s*(@([\p{L}][\p{L}\p{N}]*)?)/uy,V1t=/\{(@[\p{L}][\p{L}\p{N}]*)(\s*)([^\r\n}]+)?\}/gu;Y1t=/\S/,X1t=/\s*$/;EA=class{constructor(e,r){this.elements=e,this.range=r}getTag(e){return this.getAllTags().find(r=>r.name===e)}getTags(e){return this.getAllTags().filter(r=>r.name===e)}getAllTags(){return this.elements.filter(e=>"name"in e)}toString(){let e="";for(let r of this.elements)if(e.length===0)e=r.toString();else{let n=r.toString();e+=qTe(e)+n}return e.trim()}toMarkdown(e){let r="";for(let n of this.elements)if(r.length===0)r=n.toMarkdown(e);else{let a=n.toMarkdown(e);r+=qTe(r)+a}return r.trim()}},Fw=class{constructor(e,r,n,a){this.name=e,this.content=r,this.inline=n,this.range=a}toString(){let e=`@${this.name}`,r=this.content.toString();return this.content.inlines.length===1?e=`${e} ${r}`:this.content.inlines.length>1&&(e=`${e} -${r}`),this.inline?`{${e}}`:e}toMarkdown(e){var r,n;return(n=(r=e?.renderTag)===null||r===void 0?void 0:r.call(e,this))!==null&&n!==void 0?n:this.toMarkdownDefault(e)}toMarkdownDefault(e){let r=this.content.toMarkdown(e);if(this.inline){let i=evt(this.name,r,e??{});if(typeof i=="string")return i}let n="";e?.tag==="italic"||e?.tag===void 0?n="*":e?.tag==="bold"?n="**":e?.tag==="bold-italic"&&(n="***");let a=`${n}@${this.name}${n}`;return this.content.inlines.length===1?a=`${a} \u2014 ${r}`:this.content.inlines.length>1&&(a=`${a} -${r}`),this.inline?`{${a}}`:a}};zw=class{constructor(e,r){this.inlines=e,this.range=r}toString(){let e="";for(let r=0;rn.range.start.line&&(e+=` -`)}return e}toMarkdown(e){let r="";for(let n=0;na.range.start.line&&(r+=` -`)}return r}},CA=class{constructor(e,r){this.text=e,this.range=r}toString(){return this.text}toMarkdown(){return this.text}}});var $w,sU=A(()=>{_s();iU();$w=class{constructor(e){this.indexManager=e.shared.workspace.IndexManager,this.commentProvider=e.documentation.CommentProvider}getDocumentation(e){let r=this.commentProvider.getComment(e);if(r&&nU(r))return rU(r).toMarkdown({renderLink:(a,i)=>this.documentationLinkRenderer(e,a,i),renderTag:a=>this.documentationTagRenderer(e,a)})}documentationLinkRenderer(e,r,n){var a;let i=(a=this.findNameInPrecomputedScopes(e,r))!==null&&a!==void 0?a:this.findNameInGlobalScope(e,r);if(i&&i.nameSegment){let s=i.nameSegment.range.start.line+1,o=i.nameSegment.range.start.character+1,l=i.documentUri.with({fragment:`L${s},${o}`});return`[${n}](${l.toString()})`}else return}documentationTagRenderer(e,r){}findNameInPrecomputedScopes(e,r){let a=ss(e).precomputedScopes;if(!a)return;let i=e;do{let o=a.get(i).find(l=>l.name===r);if(o)return o;i=i.$container}while(i)}findNameInGlobalScope(e,r){return this.indexManager.allElements().find(a=>a.name===r)}}});var Gw,oU=A(()=>{yA();fu();Gw=class{constructor(e){this.grammarConfig=()=>e.parser.GrammarConfig}getComment(e){var r;return UG(e)?e.$comment:(r=aF(e.$cstNode,this.grammarConfig().multilineCommentRules))===null||r===void 0?void 0:r.text}}});var Uw,lU,uU,cU=A(()=>{Al();bA();Uw=class{constructor(e){this.syncParser=e.parser.LangiumParser}parse(e,r){return Promise.resolve(this.syncParser.parse(e))}},lU=class{constructor(e){this.threadCount=8,this.terminationDelay=200,this.workerPool=[],this.queue=[],this.hydrator=e.serializer.Hydrator}initializeWorkers(){for(;this.workerPool.length{if(this.queue.length>0){let r=this.queue.shift();r&&(e.lock(),r.resolve(e))}}),this.workerPool.push(e)}}async parse(e,r){let n=await this.acquireParserWorker(r),a=new Fs,i,s=r.onCancellationRequested(()=>{i=setTimeout(()=>{this.terminateWorker(n)},this.terminationDelay)});return n.parse(e).then(o=>{let l=this.hydrator.hydrate(o);a.resolve(l)}).catch(o=>{a.reject(o)}).finally(()=>{s.dispose(),clearTimeout(i)}),a.promise}terminateWorker(e){e.terminate();let r=this.workerPool.indexOf(e);r>=0&&this.workerPool.splice(r,1)}async acquireParserWorker(e){this.initializeWorkers();for(let n of this.workerPool)if(n.ready)return n.lock(),n;let r=new Fs;return e.onCancellationRequested(()=>{let n=this.queue.indexOf(r);n>=0&&this.queue.splice(n,1),r.reject(Hc)}),this.queue.push(r),r.promise}},uU=class{get ready(){return this._ready}get onReady(){return this.onReadyEmitter.event}constructor(e,r,n,a){this.onReadyEmitter=new Xn.Emitter,this.deferred=new Fs,this._ready=!0,this._parsing=!1,this.sendMessage=e,this._terminate=a,r(i=>{let s=i;this.deferred.resolve(s),this.unlock()}),n(i=>{this.deferred.reject(i),this.unlock()})}terminate(){this.deferred.reject(Hc),this._terminate()}lock(){this._ready=!1}unlock(){this._parsing=!1,this._ready=!0,this.onReadyEmitter.fire()}parse(e){if(this._parsing)throw new Error("Parser worker is busy");return this._parsing=!0,this.deferred=new Fs,this.sendMessage(e),this.deferred.promise}}});var qw,hU=A(()=>{_l();Al();qw=class{constructor(){this.previousTokenSource=new hr.CancellationTokenSource,this.writeQueue=[],this.readQueue=[],this.done=!0}write(e){this.cancelWrite();let r=pA();return this.previousTokenSource=r,this.enqueue(this.writeQueue,e,r.token)}read(e){return this.enqueue(this.readQueue,e)}enqueue(e,r,n=hr.CancellationToken.None){let a=new Fs,i={action:r,deferred:a,cancellationToken:n};return e.push(i),this.performNextOperation(),a.promise}async performNextOperation(){if(!this.done)return;let e=[];if(this.writeQueue.length>0)e.push(this.writeQueue.shift());else if(this.readQueue.length>0)e.push(...this.readQueue.splice(0,this.readQueue.length));else return;this.done=!1,await Promise.all(e.map(async({action:r,deferred:n,cancellationToken:a})=>{try{let i=await Promise.resolve().then(()=>r(a));n.resolve(i)}catch(i){Wc(i)?n.resolve(void 0):n.reject(i)}})),this.done=!0,this.performNextOperation()}cancelWrite(){this.previousTokenSource.cancel()}}});var Vw,fU=A(()=>{aA();Cc();hu();_s();B2();fu();Vw=class{constructor(e){this.grammarElementIdMap=new Bm,this.tokenTypeIdMap=new Bm,this.grammar=e.Grammar,this.lexer=e.parser.Lexer,this.linker=e.references.Linker}dehydrate(e){return{lexerErrors:e.lexerErrors,lexerReport:e.lexerReport?this.dehydrateLexerReport(e.lexerReport):void 0,parserErrors:e.parserErrors.map(r=>Object.assign(Object.assign({},r),{message:r.message})),value:this.dehydrateAstNode(e.value,this.createDehyrationContext(e.value))}}dehydrateLexerReport(e){return e}createDehyrationContext(e){let r=new Map,n=new Map;for(let a of wl(e))r.set(a,{});if(e.$cstNode)for(let a of um(e.$cstNode))n.set(a,{});return{astNodes:r,cstNodes:n}}dehydrateAstNode(e,r){let n=r.astNodes.get(e);n.$type=e.$type,n.$containerIndex=e.$containerIndex,n.$containerProperty=e.$containerProperty,e.$cstNode!==void 0&&(n.$cstNode=this.dehydrateCstNode(e.$cstNode,r));for(let[a,i]of Object.entries(e))if(!a.startsWith("$"))if(Array.isArray(i)){let s=[];n[a]=s;for(let o of i)na(o)?s.push(this.dehydrateAstNode(o,r)):Ui(o)?s.push(this.dehydrateReference(o,r)):s.push(o)}else na(i)?n[a]=this.dehydrateAstNode(i,r):Ui(i)?n[a]=this.dehydrateReference(i,r):i!==void 0&&(n[a]=i);return n}dehydrateReference(e,r){let n={};return n.$refText=e.$refText,e.$refNode&&(n.$refNode=r.cstNodes.get(e.$refNode)),n}dehydrateCstNode(e,r){let n=r.cstNodes.get(e);return z3(e)?n.fullText=e.fullText:n.grammarSource=this.getGrammarElementId(e.grammarSource),n.hidden=e.hidden,n.astNode=r.astNodes.get(e.astNode),cu(e)?n.content=e.content.map(a=>this.dehydrateCstNode(a,r)):Od(e)&&(n.tokenType=e.tokenType.name,n.offset=e.offset,n.length=e.length,n.startLine=e.range.start.line,n.startColumn=e.range.start.character,n.endLine=e.range.end.line,n.endColumn=e.range.end.character),n}hydrate(e){let r=e.value,n=this.createHydrationContext(r);return"$cstNode"in r&&this.hydrateCstNode(r.$cstNode,n),{lexerErrors:e.lexerErrors,lexerReport:e.lexerReport,parserErrors:e.parserErrors,value:this.hydrateAstNode(r,n)}}createHydrationContext(e){let r=new Map,n=new Map;for(let i of wl(e))r.set(i,{});let a;if(e.$cstNode)for(let i of um(e.$cstNode)){let s;"fullText"in i?(s=new R2(i.fullText),a=s):"content"in i?s=new Mm:"tokenType"in i&&(s=this.hydrateCstLeafNode(i)),s&&(n.set(i,s),s.root=a)}return{astNodes:r,cstNodes:n}}hydrateAstNode(e,r){let n=r.astNodes.get(e);n.$type=e.$type,n.$containerIndex=e.$containerIndex,n.$containerProperty=e.$containerProperty,e.$cstNode&&(n.$cstNode=r.cstNodes.get(e.$cstNode));for(let[a,i]of Object.entries(e))if(!a.startsWith("$"))if(Array.isArray(i)){let s=[];n[a]=s;for(let o of i)na(o)?s.push(this.setParent(this.hydrateAstNode(o,r),n)):Ui(o)?s.push(this.hydrateReference(o,n,a,r)):s.push(o)}else na(i)?n[a]=this.setParent(this.hydrateAstNode(i,r),n):Ui(i)?n[a]=this.hydrateReference(i,n,a,r):i!==void 0&&(n[a]=i);return n}setParent(e,r){return e.$container=r,e}hydrateReference(e,r,n,a){return this.linker.buildReference(r,n,a.cstNodes.get(e.$refNode),e.$refText)}hydrateCstNode(e,r,n=0){let a=r.cstNodes.get(e);if(typeof e.grammarSource=="number"&&(a.grammarSource=this.getGrammarElement(e.grammarSource)),a.astNode=r.astNodes.get(e.astNode),cu(a))for(let i of e.content){let s=this.hydrateCstNode(i,r,n++);a.content.push(s)}return a}hydrateCstLeafNode(e){let r=this.getTokenType(e.tokenType),n=e.offset,a=e.length,i=e.startLine,s=e.startColumn,o=e.endLine,l=e.endColumn,u=e.hidden;return new Nm(n,a,{start:{line:i,character:s},end:{line:o,character:l}},r,u)}getTokenType(e){return this.lexer.definition[e]}getGrammarElementId(e){if(e)return this.grammarElementIdMap.size===0&&this.createGrammarElementIdMap(),this.grammarElementIdMap.get(e)}getGrammarElement(e){return this.grammarElementIdMap.size===0&&this.createGrammarElementIdMap(),this.grammarElementIdMap.getKey(e)}createGrammarElementIdMap(){let e=0;for(let r of wl(this.grammar))Y3(r)&&this.grammarElementIdMap.set(r,e++)}}});function Gs(t){return{documentation:{CommentProvider:e=>new Gw(e),DocumentationProvider:e=>new $w(e)},parser:{AsyncParser:e=>new Uw(e),GrammarConfig:e=>HF(e),LangiumParser:e=>wG(e),CompletionParser:e=>xG(e),ValueConverter:()=>new Pm,TokenBuilder:()=>new cf,Lexer:e=>new $m(e),ParserErrorMessageProvider:()=>new I2,LexerErrorMessageProvider:()=>new Bw},workspace:{AstNodeLocator:()=>new Dw,AstNodeDescriptionProvider:e=>new Rw(e),ReferenceDescriptionProvider:e=>new Iw(e)},references:{Linker:e=>new yw(e),NameProvider:()=>new xw,ScopeProvider:e=>new Ew(e),ScopeComputation:e=>new ww(e),References:e=>new bw(e)},serializer:{Hydrator:e=>new Vw(e),JsonSerializer:e=>new Cw(e)},validation:{DocumentValidator:e=>new Lw(e),ValidationRegistry:e=>new _w(e)},shared:()=>t.shared}}function Us(t){return{ServiceRegistry:e=>new Sw(e),workspace:{LangiumDocuments:e=>new vw(e),LangiumDocumentFactory:e=>new gw(e),DocumentBuilder:e=>new Mw(e),IndexManager:e=>new Ow(e),WorkspaceManager:e=>new Pw(e),FileSystemProvider:e=>t.fileSystemProvider(e),WorkspaceLock:()=>new qw,ConfigurationProvider:e=>new Nw(e)}}}var dU=A(()=>{WF();bG();kG();uA();TG();PG();BG();FG();zG();GG();yA();qG();VG();Aw();HG();WG();YG();jG();P2();KG();ZG();TA();sU();oU();pw();cU();hU();fU()});function pa(t,e,r,n,a,i,s,o,l){let u=[t,e,r,n,a,i,s,o,l].reduce(SA,{});return QTe(u)}function ZTe(t){if(t&&t[KTe])for(let e of Object.values(t))ZTe(e);return t}function QTe(t,e){let r=new Proxy({},{deleteProperty:()=>!1,set:()=>{throw new Error("Cannot set property on injected service container")},get:(n,a)=>a===KTe?!0:jTe(n,a,t,e||r),getOwnPropertyDescriptor:(n,a)=>(jTe(n,a,t,e||r),Object.getOwnPropertyDescriptor(n,a)),has:(n,a)=>a in t,ownKeys:()=>[...Object.getOwnPropertyNames(t)]});return r}function jTe(t,e,r,n){if(e in t){if(t[e]instanceof Error)throw new Error("Construction failure. Please make sure that your dependencies are constructable.",{cause:t[e]});if(t[e]===XTe)throw new Error('Cycle detected. Please make "'+String(e)+'" lazy. Visit https://langium.org/docs/reference/configuration-services/#resolving-cyclic-dependencies');return t[e]}else if(e in r){let a=r[e];t[e]=XTe;try{t[e]=typeof a=="function"?a(n):QTe(a,n)}catch(i){throw t[e]=i instanceof Error?i:void 0,i}return t[e]}else return}function SA(t,e){if(e){for(let[r,n]of Object.entries(e))if(n!==void 0){let a=t[r];a!==null&&n!==null&&typeof a=="object"&&typeof n=="object"?t[r]=SA(a,n):t[r]=n}}return t}var pU,KTe,XTe,mU=A(()=>{(function(t){t.merge=(e,r)=>SA(SA({},e),r)})(pU||(pU={}));KTe=Symbol("isProxy");XTe=Symbol()});var JTe=A(()=>{});var eEe=A(()=>{oU();sU();iU()});var tEe=A(()=>{});var rEe=A(()=>{WF();tEe()});var gU,Gm,_A,vU,nEe=A(()=>{b0();uA();TA();gU={indentTokenName:"INDENT",dedentTokenName:"DEDENT",whitespaceTokenName:"WS",ignoreIndentationDelimiters:[]};(function(t){t.REGULAR="indentation-sensitive",t.IGNORE_INDENTATION="ignore-indentation"})(Gm||(Gm={}));_A=class extends cf{constructor(e=gU){super(),this.indentationStack=[0],this.whitespaceRegExp=/[ \t]+/y,this.options=Object.assign(Object.assign({},gU),e),this.indentTokenType=y0({name:this.options.indentTokenName,pattern:this.indentMatcher.bind(this),line_breaks:!1}),this.dedentTokenType=y0({name:this.options.dedentTokenName,pattern:this.dedentMatcher.bind(this),line_breaks:!1})}buildTokens(e,r){let n=super.buildTokens(e,r);if(!kA(n))throw new Error("Invalid tokens built by default builder");let{indentTokenName:a,dedentTokenName:i,whitespaceTokenName:s,ignoreIndentationDelimiters:o}=this.options,l,u,h,f=[];for(let d of n){for(let[p,m]of o)d.name===p?d.PUSH_MODE=Gm.IGNORE_INDENTATION:d.name===m&&(d.POP_MODE=!0);d.name===i?l=d:d.name===a?u=d:d.name===s?h=d:f.push(d)}if(!l||!u||!h)throw new Error("Some indentation/whitespace tokens not found!");return o.length>0?{modes:{[Gm.REGULAR]:[l,u,...f,h],[Gm.IGNORE_INDENTATION]:[...f,h]},defaultMode:Gm.REGULAR}:[l,u,h,...f]}flushLexingReport(e){let r=super.flushLexingReport(e);return Object.assign(Object.assign({},r),{remainingDedents:this.flushRemainingDedents(e)})}isStartOfLine(e,r){return r===0||`\r -`.includes(e[r-1])}matchWhitespace(e,r,n,a){var i;this.whitespaceRegExp.lastIndex=r;let s=this.whitespaceRegExp.exec(e);return{currIndentLevel:(i=s?.[0].length)!==null&&i!==void 0?i:0,prevIndentLevel:this.indentationStack.at(-1),match:s}}createIndentationTokenInstance(e,r,n,a){let i=this.getLineNumber(r,a);return sf(e,n,a,a+n.length,i,i,1,n.length)}getLineNumber(e,r){return e.substring(0,r).split(/\r\n|\r|\n/).length}indentMatcher(e,r,n,a){if(!this.isStartOfLine(e,r))return null;let{currIndentLevel:i,prevIndentLevel:s,match:o}=this.matchWhitespace(e,r,n,a);return i<=s?null:(this.indentationStack.push(i),o)}dedentMatcher(e,r,n,a){var i,s,o,l;if(!this.isStartOfLine(e,r))return null;let{currIndentLevel:u,prevIndentLevel:h,match:f}=this.matchWhitespace(e,r,n,a);if(u>=h)return null;let d=this.indentationStack.lastIndexOf(u);if(d===-1)return this.diagnostics.push({severity:"error",message:`Invalid dedent level ${u} at offset: ${r}. Current indentation stack: ${this.indentationStack}`,offset:r,length:(s=(i=f?.[0])===null||i===void 0?void 0:i.length)!==null&&s!==void 0?s:0,line:this.getLineNumber(e,r),column:1}),null;let p=this.indentationStack.length-d-1,m=(l=(o=e.substring(0,r).match(/[\r\n]+$/))===null||o===void 0?void 0:o[0].length)!==null&&l!==void 0?l:1;for(let g=0;g1;)r.push(this.createIndentationTokenInstance(this.dedentTokenType,e,"",e.length)),this.indentationStack.pop();return this.indentationStack=[0],r}},vU=class extends $m{constructor(e){if(super(e),e.parser.TokenBuilder instanceof _A)this.indentationTokenBuilder=e.parser.TokenBuilder;else throw new Error("IndentationAwareLexer requires an accompanying IndentationAwareTokenBuilder")}tokenize(e,r=wA){let n=super.tokenize(e),a=n.report;r?.mode==="full"&&n.tokens.push(...a.remainingDedents),a.remainingDedents=[];let{indentTokenType:i,dedentTokenType:s}=this.indentationTokenBuilder,o=i.tokenTypeIdx,l=s.tokenTypeIdx,u=[],h=n.tokens.length-1;for(let f=0;f=0&&u.push(n.tokens[h]),n.tokens=u,n}}});var aEe=A(()=>{});var iEe=A(()=>{cU();bG();aA();nEe();kG();pw();TA();lA();aEe();uA();TG()});var sEe=A(()=>{PG();BG();FG();$G();zG();GG()});var oEe=A(()=>{fU();yA()});var AA,qs,yU=A(()=>{AA=class{readFile(){throw new Error("No file system is available.")}async readDirectory(){return[]}},qs={fileSystemProvider:()=>new AA}});function avt(){let t=pa(Us(qs),nvt),e=pa(Gs({shared:t}),rvt);return t.ServiceRegistry.register(e),e}function hf(t){var e;let r=avt(),n=r.serializer.JsonSerializer.deserialize(t);return r.shared.workspace.LangiumDocumentFactory.fromModel(n,zs.parse(`memory://${(e=n.name)!==null&&e!==void 0?e:"grammar"}.langium`)),n}var rvt,nvt,lEe=A(()=>{dU();mU();Cc();yU();Yc();rvt={Grammar:()=>{},LanguageMetaData:()=>({caseInsensitive:!1,fileExtensions:[".langium"],languageId:"langium"})},nvt={AstReflection:()=>new ny}});var zr={};lr(zr,{AstUtils:()=>M_,BiMap:()=>Bm,Cancellation:()=>hr,ContextCache:()=>Fm,CstUtils:()=>E_,DONE_RESULT:()=>as,Deferred:()=>Fs,Disposable:()=>T0,DisposableCache:()=>z2,DocumentCache:()=>gA,EMPTY_STREAM:()=>$3,ErrorWithLocation:()=>hm,GrammarUtils:()=>z_,MultiMap:()=>Tu,OperationCancelled:()=>Hc,Reduction:()=>vv,RegExpUtils:()=>B_,SimpleCache:()=>Tw,StreamImpl:()=>Vo,TreeStreamImpl:()=>kc,URI:()=>zs,UriUtils:()=>$s,WorkspaceCache:()=>$2,assertUnreachable:()=>Ec,delayNextTick:()=>DG,interruptAndCheck:()=>ka,isOperationCancelled:()=>Wc,loadGrammarFromJson:()=>hf,setInterruptionPeriod:()=>DTe,startCancelableOperation:()=>pA,stream:()=>Kr});var uEe=A(()=>{vA();bA();br(zr,Xn);B2();XG();C_();lEe();Al();ho();Yc();_s();_l();fu();mu();oy()});var cEe=A(()=>{VG();Aw()});var hEe=A(()=>{HG();WG();YG();jG();P2();yU();KG();hU();ZG()});var qi={};lr(qi,{AbstractAstReflection:()=>om,AbstractCstNode:()=>cw,AbstractLangiumParser:()=>hw,AbstractParserErrorMessageProvider:()=>sA,AbstractThreadedAsyncParser:()=>lU,AstUtils:()=>M_,BiMap:()=>Bm,Cancellation:()=>hr,CompositeCstNodeImpl:()=>Mm,ContextCache:()=>Fm,CstNodeBuilder:()=>uw,CstUtils:()=>E_,DEFAULT_TOKENIZE_OPTIONS:()=>wA,DONE_RESULT:()=>as,DatatypeSymbol:()=>iA,DefaultAstNodeDescriptionProvider:()=>Rw,DefaultAstNodeLocator:()=>Dw,DefaultAsyncParser:()=>Uw,DefaultCommentProvider:()=>Gw,DefaultConfigurationProvider:()=>Nw,DefaultDocumentBuilder:()=>Mw,DefaultDocumentValidator:()=>Lw,DefaultHydrator:()=>Vw,DefaultIndexManager:()=>Ow,DefaultJsonSerializer:()=>Cw,DefaultLangiumDocumentFactory:()=>gw,DefaultLangiumDocuments:()=>vw,DefaultLexer:()=>$m,DefaultLexerErrorMessageProvider:()=>Bw,DefaultLinker:()=>yw,DefaultNameProvider:()=>xw,DefaultReferenceDescriptionProvider:()=>Iw,DefaultReferences:()=>bw,DefaultScopeComputation:()=>ww,DefaultScopeProvider:()=>Ew,DefaultServiceRegistry:()=>Sw,DefaultTokenBuilder:()=>cf,DefaultValueConverter:()=>Pm,DefaultWorkspaceLock:()=>qw,DefaultWorkspaceManager:()=>Pw,Deferred:()=>Fs,Disposable:()=>T0,DisposableCache:()=>z2,DocumentCache:()=>gA,DocumentState:()=>wn,DocumentValidator:()=>Rl,EMPTY_SCOPE:()=>q1t,EMPTY_STREAM:()=>$3,EmptyFileSystem:()=>qs,EmptyFileSystemProvider:()=>AA,ErrorWithLocation:()=>hm,GrammarAST:()=>j3,GrammarUtils:()=>z_,IndentationAwareLexer:()=>vU,IndentationAwareTokenBuilder:()=>_A,JSDocDocumentationProvider:()=>$w,LangiumCompletionParser:()=>dw,LangiumParser:()=>fw,LangiumParserErrorMessageProvider:()=>I2,LeafCstNodeImpl:()=>Nm,LexingMode:()=>Gm,MapScope:()=>kw,Module:()=>pU,MultiMap:()=>Tu,OperationCancelled:()=>Hc,ParserWorker:()=>uU,Reduction:()=>vv,RegExpUtils:()=>B_,RootCstNodeImpl:()=>R2,SimpleCache:()=>Tw,StreamImpl:()=>Vo,StreamScope:()=>F2,TextDocument:()=>M2,TreeStreamImpl:()=>kc,URI:()=>zs,UriUtils:()=>$s,ValidationCategory:()=>G2,ValidationRegistry:()=>_w,ValueConverter:()=>Vc,WorkspaceCache:()=>$2,assertUnreachable:()=>Ec,createCompletionParser:()=>xG,createDefaultCoreModule:()=>Gs,createDefaultSharedCoreModule:()=>Us,createGrammarConfig:()=>HF,createLangiumParser:()=>wG,createParser:()=>mw,delayNextTick:()=>DG,diagnosticData:()=>zm,eagerLoad:()=>ZTe,getDiagnosticRange:()=>$Te,indentationBuilderDefaultOptions:()=>gU,inject:()=>pa,interruptAndCheck:()=>ka,isAstNode:()=>na,isAstNodeDescription:()=>eF,isAstNodeWithComment:()=>UG,isCompositeCstNode:()=>cu,isIMultiModeLexerDefinition:()=>JG,isJSDoc:()=>nU,isLeafCstNode:()=>Od,isLinkingError:()=>lm,isNamed:()=>FTe,isOperationCancelled:()=>Wc,isReference:()=>Ui,isRootCstNode:()=>z3,isTokenTypeArray:()=>kA,isTokenTypeDictionary:()=>QG,loadGrammarFromJson:()=>hf,parseJSDoc:()=>rU,prepareLangiumParser:()=>CTe,setInterruptionPeriod:()=>DTe,startCancelableOperation:()=>pA,stream:()=>Kr,toDiagnosticData:()=>GTe,toDiagnosticSeverity:()=>xA});var Ll=A(()=>{dU();mU();qG();JTe();hu();eEe();rEe();iEe();sEe();oEe();uEe();br(qi,zr);cEe();hEe();Cc()});function yEe(t){return Eu.isInstance(t,Hw)}function xEe(t){return Eu.isInstance(t,U2)}function bEe(t){return Eu.isInstance(t,q2)}function wEe(t){return Eu.isInstance(t,NA)}function kEe(t){return Eu.isInstance(t,V2)}function TEe(t){return Eu.isInstance(t,Ww)}function EEe(t){return Eu.isInstance(t,H2)}function CEe(t){return Eu.isInstance(t,Yw)}function SEe(t){return Eu.isInstance(t,Xw)}function _Ee(t){return Eu.isInstance(t,jw)}function AEe(t){return Eu.isInstance(t,Kw)}var ivt,kt,SU,Hw,LA,U2,RA,IA,q2,NA,xU,bU,wU,V2,kU,Ww,TU,H2,EU,Yw,Xw,jw,Kw,MA,CU,DA,W2,LEe,Eu,fEe,svt,dEe,ovt,pEe,lvt,mEe,uvt,gEe,cvt,vEe,hvt,fvt,dvt,pvt,mvt,gvt,vvt,Xo,_U,AU,LU,RU,IU,DU,yvt,xvt,bvt,wvt,Y2,Z2,X2,ff,j2,wo,K2,kvt,ko=A(()=>{Ll();Ll();Ll();Ll();ivt=Object.defineProperty,kt=(t,e)=>ivt(t,"name",{value:e,configurable:!0}),SU="Statement",Hw="Architecture";kt(yEe,"isArchitecture");LA="Axis",U2="Branch";kt(xEe,"isBranch");RA="Checkout",IA="CherryPicking",q2="Commit";kt(bEe,"isCommit");NA="Common";kt(wEe,"isCommon");xU="Curve",bU="Edge",wU="Entry",V2="GitGraph";kt(kEe,"isGitGraph");kU="Group",Ww="Info";kt(TEe,"isInfo");TU="Junction",H2="Merge";kt(EEe,"isMerge");EU="Option",Yw="Packet";kt(CEe,"isPacket");Xw="PacketBlock";kt(SEe,"isPacketBlock");jw="Pie";kt(_Ee,"isPie");Kw="PieSection";kt(AEe,"isPieSection");MA="Radar",CU="Service",DA="Direction",LEe=(W2=class extends om{getAllTypes(){return[Hw,LA,U2,RA,IA,q2,NA,xU,DA,bU,wU,V2,kU,Ww,TU,H2,EU,Yw,Xw,jw,Kw,MA,CU,SU]}computeIsSubtype(e,r){switch(e){case U2:case RA:case IA:case q2:case H2:return this.isSubtype(SU,r);case DA:return this.isSubtype(V2,r);default:return!1}}getReferenceType(e){let r=`${e.container.$type}:${e.property}`;switch(r){case"Entry:axis":return LA;default:throw new Error(`${r} is not a valid reference id.`)}}getTypeMetaData(e){switch(e){case Hw:return{name:Hw,properties:[{name:"accDescr"},{name:"accTitle"},{name:"edges",defaultValue:[]},{name:"groups",defaultValue:[]},{name:"junctions",defaultValue:[]},{name:"services",defaultValue:[]},{name:"title"}]};case LA:return{name:LA,properties:[{name:"label"},{name:"name"}]};case U2:return{name:U2,properties:[{name:"name"},{name:"order"}]};case RA:return{name:RA,properties:[{name:"branch"}]};case IA:return{name:IA,properties:[{name:"id"},{name:"parent"},{name:"tags",defaultValue:[]}]};case q2:return{name:q2,properties:[{name:"id"},{name:"message"},{name:"tags",defaultValue:[]},{name:"type"}]};case NA:return{name:NA,properties:[{name:"accDescr"},{name:"accTitle"},{name:"title"}]};case xU:return{name:xU,properties:[{name:"entries",defaultValue:[]},{name:"label"},{name:"name"}]};case bU:return{name:bU,properties:[{name:"lhsDir"},{name:"lhsGroup",defaultValue:!1},{name:"lhsId"},{name:"lhsInto",defaultValue:!1},{name:"rhsDir"},{name:"rhsGroup",defaultValue:!1},{name:"rhsId"},{name:"rhsInto",defaultValue:!1},{name:"title"}]};case wU:return{name:wU,properties:[{name:"axis"},{name:"value"}]};case V2:return{name:V2,properties:[{name:"accDescr"},{name:"accTitle"},{name:"statements",defaultValue:[]},{name:"title"}]};case kU:return{name:kU,properties:[{name:"icon"},{name:"id"},{name:"in"},{name:"title"}]};case Ww:return{name:Ww,properties:[{name:"accDescr"},{name:"accTitle"},{name:"title"}]};case TU:return{name:TU,properties:[{name:"id"},{name:"in"}]};case H2:return{name:H2,properties:[{name:"branch"},{name:"id"},{name:"tags",defaultValue:[]},{name:"type"}]};case EU:return{name:EU,properties:[{name:"name"},{name:"value",defaultValue:!1}]};case Yw:return{name:Yw,properties:[{name:"accDescr"},{name:"accTitle"},{name:"blocks",defaultValue:[]},{name:"title"}]};case Xw:return{name:Xw,properties:[{name:"end"},{name:"label"},{name:"start"}]};case jw:return{name:jw,properties:[{name:"accDescr"},{name:"accTitle"},{name:"sections",defaultValue:[]},{name:"showData",defaultValue:!1},{name:"title"}]};case Kw:return{name:Kw,properties:[{name:"label"},{name:"value"}]};case MA:return{name:MA,properties:[{name:"accDescr"},{name:"accTitle"},{name:"axes",defaultValue:[]},{name:"curves",defaultValue:[]},{name:"options",defaultValue:[]},{name:"title"}]};case CU:return{name:CU,properties:[{name:"icon"},{name:"iconText"},{name:"id"},{name:"in"},{name:"title"}]};case DA:return{name:DA,properties:[{name:"accDescr"},{name:"accTitle"},{name:"dir"},{name:"statements",defaultValue:[]},{name:"title"}]};default:return{name:e,properties:[]}}}},kt(W2,"MermaidAstReflection"),W2),Eu=new LEe,svt=kt(()=>fEe??(fEe=hf('{"$type":"Grammar","isDeclared":true,"name":"Info","imports":[],"rules":[{"$type":"ParserRule","entry":true,"name":"Info","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[],"cardinality":"*"},{"$type":"Keyword","value":"info"},{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[],"cardinality":"*"},{"$type":"Group","elements":[{"$type":"Keyword","value":"showInfo"},{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[],"cardinality":"*"}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[],"cardinality":"?"}]},"definesHiddenTokens":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","fragment":true,"name":"TitleAndAccessibilities","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}],"cardinality":"+"},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","fragment":true,"name":"EOL","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/"},"fragment":false}],"definesHiddenTokens":false,"hiddenTokens":[],"interfaces":[{"$type":"Interface","name":"Common","attributes":[{"$type":"TypeAttribute","name":"accDescr","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"accTitle","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"title","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}}],"superTypes":[]}],"types":[],"usedGrammars":[]}')),"InfoGrammar"),ovt=kt(()=>dEe??(dEe=hf(`{"$type":"Grammar","isDeclared":true,"name":"Packet","imports":[],"rules":[{"$type":"ParserRule","entry":true,"name":"Packet","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[],"cardinality":"*"},{"$type":"Keyword","value":"packet-beta"},{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]},{"$type":"Assignment","feature":"blocks","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]},"cardinality":"*"}]},{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[],"cardinality":"+"},{"$type":"Assignment","feature":"blocks","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]},"cardinality":"+"}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[],"cardinality":"*"}]}]},"definesHiddenTokens":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"PacketBlock","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"start","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":"-"},{"$type":"Assignment","feature":"end","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}}],"cardinality":"?"},{"$type":"Keyword","value":":"},{"$type":"Assignment","feature":"label","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"TerminalRule","name":"INT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/0|[1-9][0-9]*/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRING","definition":{"$type":"RegexToken","regex":"/\\"[^\\"]*\\"|'[^']*'/"},"fragment":false,"hidden":false},{"$type":"ParserRule","fragment":true,"name":"TitleAndAccessibilities","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}],"cardinality":"+"},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","fragment":true,"name":"EOL","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/"},"fragment":false}],"definesHiddenTokens":false,"hiddenTokens":[],"interfaces":[{"$type":"Interface","name":"Common","attributes":[{"$type":"TypeAttribute","name":"accDescr","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"accTitle","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"title","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}}],"superTypes":[]}],"types":[],"usedGrammars":[]}`)),"PacketGrammar"),lvt=kt(()=>pEe??(pEe=hf('{"$type":"Grammar","isDeclared":true,"name":"Pie","imports":[],"rules":[{"$type":"ParserRule","entry":true,"name":"Pie","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[],"cardinality":"*"},{"$type":"Keyword","value":"pie"},{"$type":"Assignment","feature":"showData","operator":"?=","terminal":{"$type":"Keyword","value":"showData"},"cardinality":"?"},{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]},{"$type":"Assignment","feature":"sections","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]},"cardinality":"*"}]},{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[],"cardinality":"+"},{"$type":"Assignment","feature":"sections","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]},"cardinality":"+"}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[],"cardinality":"*"}]}]},"definesHiddenTokens":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"PieSection","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"label","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}},{"$type":"Keyword","value":":"},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"TerminalRule","name":"PIE_SECTION_LABEL","definition":{"$type":"RegexToken","regex":"/\\"[^\\"]+\\"/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"PIE_SECTION_VALUE","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/(0|[1-9][0-9]*)(\\\\.[0-9]+)?/"},"fragment":false,"hidden":false},{"$type":"ParserRule","fragment":true,"name":"TitleAndAccessibilities","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}],"cardinality":"+"},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","fragment":true,"name":"EOL","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/"},"fragment":false}],"definesHiddenTokens":false,"hiddenTokens":[],"interfaces":[{"$type":"Interface","name":"Common","attributes":[{"$type":"TypeAttribute","name":"accDescr","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"accTitle","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"title","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}}],"superTypes":[]}],"types":[],"usedGrammars":[]}')),"PieGrammar"),uvt=kt(()=>mEe??(mEe=hf('{"$type":"Grammar","isDeclared":true,"name":"Architecture","imports":[],"rules":[{"$type":"ParserRule","entry":true,"name":"Architecture","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@18"},"arguments":[],"cardinality":"*"},{"$type":"Keyword","value":"architecture-beta"},{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@18"},"arguments":[],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]}]},{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@18"},"arguments":[],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[],"cardinality":"*"}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@18"},"arguments":[],"cardinality":"*"}]}]},"definesHiddenTokens":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","fragment":true,"name":"Statement","definition":{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"groups","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}},{"$type":"Assignment","feature":"services","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]}},{"$type":"Assignment","feature":"junctions","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]}},{"$type":"Assignment","feature":"edges","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}}]},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","fragment":true,"name":"LeftPort","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":":"},{"$type":"Assignment","feature":"lhsDir","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}}]},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","fragment":true,"name":"RightPort","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"rhsDir","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}},{"$type":"Keyword","value":":"}]},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","fragment":true,"name":"Arrow","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]},{"$type":"Assignment","feature":"lhsInto","operator":"?=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]},"cardinality":"?"},{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"--"},{"$type":"Group","elements":[{"$type":"Keyword","value":"-"},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]}},{"$type":"Keyword","value":"-"}]}]},{"$type":"Assignment","feature":"rhsInto","operator":"?=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]},"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Group","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"group"},{"$type":"Assignment","feature":"id","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]}},{"$type":"Assignment","feature":"icon","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]},"cardinality":"?"},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]},"cardinality":"?"},{"$type":"Group","elements":[{"$type":"Keyword","value":"in"},{"$type":"Assignment","feature":"in","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]}}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Service","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"service"},{"$type":"Assignment","feature":"id","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]}},{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"iconText","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[]}},{"$type":"Assignment","feature":"icon","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}}],"cardinality":"?"},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]},"cardinality":"?"},{"$type":"Group","elements":[{"$type":"Keyword","value":"in"},{"$type":"Assignment","feature":"in","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]}}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Junction","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"junction"},{"$type":"Assignment","feature":"id","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":"in"},{"$type":"Assignment","feature":"in","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]}}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Edge","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"lhsId","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]}},{"$type":"Assignment","feature":"lhsGroup","operator":"?=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]},"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]},{"$type":"Assignment","feature":"rhsId","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]}},{"$type":"Assignment","feature":"rhsGroup","operator":"?=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]},"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"TerminalRule","name":"ARROW_DIRECTION","definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"L"}},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"R"}}]},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"T"}}]},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"B"}}]},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ARCH_ID","definition":{"$type":"RegexToken","regex":"/[\\\\w]+/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ARCH_TEXT_ICON","definition":{"$type":"RegexToken","regex":"/\\\\(\\"[^\\"]+\\"\\\\)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ARCH_ICON","definition":{"$type":"RegexToken","regex":"/\\\\([\\\\w-:]+\\\\)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ARCH_TITLE","definition":{"$type":"RegexToken","regex":"/\\\\[[\\\\w ]+\\\\]/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ARROW_GROUP","definition":{"$type":"RegexToken","regex":"/\\\\{group\\\\}/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ARROW_INTO","definition":{"$type":"RegexToken","regex":"/<|>/"},"fragment":false,"hidden":false},{"$type":"ParserRule","fragment":true,"name":"TitleAndAccessibilities","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@21"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}],"cardinality":"+"},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","fragment":true,"name":"EOL","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@18"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/"},"fragment":false}],"definesHiddenTokens":false,"hiddenTokens":[],"interfaces":[{"$type":"Interface","name":"Common","attributes":[{"$type":"TypeAttribute","name":"accDescr","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"accTitle","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"title","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}}],"superTypes":[]}],"types":[],"usedGrammars":[]}')),"ArchitectureGrammar"),cvt=kt(()=>gEe??(gEe=hf(`{"$type":"Grammar","isDeclared":true,"name":"GitGraph","interfaces":[{"$type":"Interface","name":"Common","attributes":[{"$type":"TypeAttribute","name":"accDescr","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"accTitle","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"title","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}}],"superTypes":[]}],"rules":[{"$type":"ParserRule","fragment":true,"name":"TitleAndAccessibilities","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}],"cardinality":"+"},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","fragment":true,"name":"EOL","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/"},"fragment":false},{"$type":"ParserRule","entry":true,"name":"GitGraph","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[],"cardinality":"*"},{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"gitGraph"},{"$type":"Group","elements":[{"$type":"Keyword","value":"gitGraph"},{"$type":"Keyword","value":":"}]},{"$type":"Keyword","value":"gitGraph:"},{"$type":"Group","elements":[{"$type":"Keyword","value":"gitGraph"},{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]},{"$type":"Keyword","value":":"}]}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[],"cardinality":"*"},{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[],"cardinality":"*"},{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@0"},"arguments":[]},{"$type":"Assignment","feature":"statements","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}],"cardinality":"*"}]}]},"definesHiddenTokens":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Statement","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Direction","definition":{"$type":"Assignment","feature":"dir","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"LR"},{"$type":"Keyword","value":"TB"},{"$type":"Keyword","value":"BT"}]}},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Commit","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"commit"},{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"Keyword","value":"id:"},{"$type":"Assignment","feature":"id","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"msg:","cardinality":"?"},{"$type":"Assignment","feature":"message","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"tag:"},{"$type":"Assignment","feature":"tags","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"type:"},{"$type":"Assignment","feature":"type","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"NORMAL"},{"$type":"Keyword","value":"REVERSE"},{"$type":"Keyword","value":"HIGHLIGHT"}]}}]}],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Branch","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"branch"},{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}]}},{"$type":"Group","elements":[{"$type":"Keyword","value":"order:"},{"$type":"Assignment","feature":"order","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@18"},"arguments":[]}}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Merge","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"merge"},{"$type":"Assignment","feature":"branch","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}]}},{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"Keyword","value":"id:"},{"$type":"Assignment","feature":"id","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"tag:"},{"$type":"Assignment","feature":"tags","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"type:"},{"$type":"Assignment","feature":"type","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"NORMAL"},{"$type":"Keyword","value":"REVERSE"},{"$type":"Keyword","value":"HIGHLIGHT"}]}}]}],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Checkout","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"checkout"},{"$type":"Keyword","value":"switch"}]},{"$type":"Assignment","feature":"branch","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"CherryPicking","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"cherry-pick"},{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"Keyword","value":"id:"},{"$type":"Assignment","feature":"id","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"tag:"},{"$type":"Assignment","feature":"tags","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"parent:"},{"$type":"Assignment","feature":"parent","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}}]}],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"TerminalRule","name":"INT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/[0-9]+(?=\\\\s)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ID","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\\\w([-\\\\./\\\\w]*[-\\\\w])?/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRING","definition":{"$type":"RegexToken","regex":"/\\"[^\\"]*\\"|'[^']*'/"},"fragment":false,"hidden":false}],"definesHiddenTokens":false,"hiddenTokens":[],"imports":[],"types":[],"usedGrammars":[]}`)),"GitGraphGrammar"),hvt=kt(()=>vEe??(vEe=hf(`{"$type":"Grammar","isDeclared":true,"name":"Radar","interfaces":[{"$type":"Interface","name":"Common","attributes":[{"$type":"TypeAttribute","name":"accDescr","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"accTitle","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"title","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}}],"superTypes":[]},{"$type":"Interface","name":"Entry","attributes":[{"$type":"TypeAttribute","name":"axis","isOptional":true,"type":{"$type":"ReferenceType","referenceType":{"$type":"SimpleType","typeRef":{"$ref":"#/rules@12"}}}},{"$type":"TypeAttribute","name":"value","type":{"$type":"SimpleType","primitiveType":"number"},"isOptional":false}],"superTypes":[]}],"rules":[{"$type":"ParserRule","fragment":true,"name":"TitleAndAccessibilities","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}],"cardinality":"+"},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","fragment":true,"name":"EOL","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/"},"fragment":false},{"$type":"ParserRule","entry":true,"name":"Radar","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[],"cardinality":"*"},{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"radar-beta"},{"$type":"Keyword","value":"radar-beta:"},{"$type":"Group","elements":[{"$type":"Keyword","value":"radar-beta"},{"$type":"Keyword","value":":"}]}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[],"cardinality":"*"},{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@0"},"arguments":[]},{"$type":"Group","elements":[{"$type":"Keyword","value":"axis"},{"$type":"Assignment","feature":"axes","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"axes","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}}],"cardinality":"*"}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"curve"},{"$type":"Assignment","feature":"curves","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"curves","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]}}],"cardinality":"*"}]},{"$type":"Group","elements":[{"$type":"Assignment","feature":"options","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"options","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}],"cardinality":"*"}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}],"cardinality":"*"}]},"definesHiddenTokens":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","fragment":true,"name":"Label","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"["},{"$type":"Assignment","feature":"label","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]}},{"$type":"Keyword","value":"]"}]},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Axis","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@21"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[],"cardinality":"?"}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Curve","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@21"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[],"cardinality":"?"},{"$type":"Keyword","value":"{"},{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]},{"$type":"Keyword","value":"}"}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","fragment":true,"name":"Entries","definition":{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[],"cardinality":"*"},{"$type":"Assignment","feature":"entries","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":","},{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[],"cardinality":"*"},{"$type":"Assignment","feature":"entries","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]}}],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[],"cardinality":"*"}]},{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[],"cardinality":"*"},{"$type":"Assignment","feature":"entries","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":","},{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[],"cardinality":"*"},{"$type":"Assignment","feature":"entries","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]}}],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[],"cardinality":"*"}]}]},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"DetailedEntry","returnType":{"$ref":"#/interfaces@1"},"definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"axis","operator":"=","terminal":{"$type":"CrossReference","type":{"$ref":"#/rules@12"},"terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@21"},"arguments":[]},"deprecatedSyntax":false}},{"$type":"Keyword","value":":","cardinality":"?"},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@18"},"arguments":[]}}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"NumberEntry","returnType":{"$ref":"#/interfaces@1"},"definition":{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@18"},"arguments":[]}},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Option","definition":{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Keyword","value":"showLegend"}},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Keyword","value":"ticks"}},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@18"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Keyword","value":"max"}},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@18"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Keyword","value":"min"}},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@18"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Keyword","value":"graticule"}},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}}]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"TerminalRule","name":"NUMBER","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/(0|[1-9][0-9]*)(\\\\.[0-9]+)?/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"BOOLEAN","type":{"$type":"ReturnType","name":"boolean"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"true"}},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"false"}}]},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"GRATICULE","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"circle"}},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"polygon"}}]},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ID","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[a-zA-Z_][a-zA-Z0-9\\\\-_]*/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRING","definition":{"$type":"RegexToken","regex":"/\\"[^\\"]*\\"|'[^']*'/"},"fragment":false,"hidden":false}],"definesHiddenTokens":false,"hiddenTokens":[],"imports":[],"types":[],"usedGrammars":[]}`)),"RadarGrammar"),fvt={languageId:"info",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},dvt={languageId:"packet",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},pvt={languageId:"pie",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},mvt={languageId:"architecture",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},gvt={languageId:"gitGraph",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},vvt={languageId:"radar",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},Xo={AstReflection:kt(()=>new LEe,"AstReflection")},_U={Grammar:kt(()=>svt(),"Grammar"),LanguageMetaData:kt(()=>fvt,"LanguageMetaData"),parser:{}},AU={Grammar:kt(()=>ovt(),"Grammar"),LanguageMetaData:kt(()=>dvt,"LanguageMetaData"),parser:{}},LU={Grammar:kt(()=>lvt(),"Grammar"),LanguageMetaData:kt(()=>pvt,"LanguageMetaData"),parser:{}},RU={Grammar:kt(()=>uvt(),"Grammar"),LanguageMetaData:kt(()=>mvt,"LanguageMetaData"),parser:{}},IU={Grammar:kt(()=>cvt(),"Grammar"),LanguageMetaData:kt(()=>gvt,"LanguageMetaData"),parser:{}},DU={Grammar:kt(()=>hvt(),"Grammar"),LanguageMetaData:kt(()=>vvt,"LanguageMetaData"),parser:{}},yvt=/accDescr(?:[\t ]*:([^\n\r]*)|\s*{([^}]*)})/,xvt=/accTitle[\t ]*:([^\n\r]*)/,bvt=/title([\t ][^\n\r]*|)/,wvt={ACC_DESCR:yvt,ACC_TITLE:xvt,TITLE:bvt},Z2=(Y2=class extends Pm{runConverter(e,r,n){let a=this.runCommonConverter(e,r,n);return a===void 0&&(a=this.runCustomConverter(e,r,n)),a===void 0?super.runConverter(e,r,n):a}runCommonConverter(e,r,n){let a=wvt[e.name];if(a===void 0)return;let i=a.exec(r);if(i!==null){if(i[1]!==void 0)return i[1].trim().replace(/[\t ]{2,}/gm," ");if(i[2]!==void 0)return i[2].replace(/^\s*/gm,"").replace(/\s+$/gm,"").replace(/[\t ]{2,}/gm," ").replace(/[\n\r]{2,}/gm,` -`)}}},kt(Y2,"AbstractMermaidValueConverter"),Y2),ff=(X2=class extends Z2{runCustomConverter(e,r,n){}},kt(X2,"CommonValueConverter"),X2),wo=(j2=class extends cf{constructor(e){super(),this.keywords=new Set(e)}buildKeywordTokens(e,r,n){let a=super.buildKeywordTokens(e,r,n);return a.forEach(i=>{this.keywords.has(i.name)&&i.PATTERN!==void 0&&(i.PATTERN=new RegExp(i.PATTERN.toString()+"(?:(?=%%)|(?!\\S))"))}),a}},kt(j2,"AbstractMermaidTokenBuilder"),j2),kvt=(K2=class extends wo{},kt(K2,"CommonTokenBuilder"),K2)});function PA(t=qs){let e=pa(Us(t),Xo),r=pa(Gs({shared:e}),IU,OA);return e.ServiceRegistry.register(r),{shared:e,GitGraph:r}}var Q2,Tvt,OA,NU=A(()=>{ko();Ll();Tvt=(Q2=class extends wo{constructor(){super(["gitGraph"])}},kt(Q2,"GitGraphTokenBuilder"),Q2),OA={parser:{TokenBuilder:kt(()=>new Tvt,"TokenBuilder"),ValueConverter:kt(()=>new ff,"ValueConverter")}};kt(PA,"createGitGraphServices")});function FA(t=qs){let e=pa(Us(t),Xo),r=pa(Gs({shared:e}),_U,BA);return e.ServiceRegistry.register(r),{shared:e,Info:r}}var J2,Evt,BA,MU=A(()=>{ko();Ll();Evt=(J2=class extends wo{constructor(){super(["info","showInfo"])}},kt(J2,"InfoTokenBuilder"),J2),BA={parser:{TokenBuilder:kt(()=>new Evt,"TokenBuilder"),ValueConverter:kt(()=>new ff,"ValueConverter")}};kt(FA,"createInfoServices")});function $A(t=qs){let e=pa(Us(t),Xo),r=pa(Gs({shared:e}),AU,zA);return e.ServiceRegistry.register(r),{shared:e,Packet:r}}var ex,Cvt,zA,OU=A(()=>{ko();Ll();Cvt=(ex=class extends wo{constructor(){super(["packet-beta"])}},kt(ex,"PacketTokenBuilder"),ex),zA={parser:{TokenBuilder:kt(()=>new Cvt,"TokenBuilder"),ValueConverter:kt(()=>new ff,"ValueConverter")}};kt($A,"createPacketServices")});function UA(t=qs){let e=pa(Us(t),Xo),r=pa(Gs({shared:e}),LU,GA);return e.ServiceRegistry.register(r),{shared:e,Pie:r}}var tx,Svt,rx,_vt,GA,PU=A(()=>{ko();Ll();Svt=(tx=class extends wo{constructor(){super(["pie","showData"])}},kt(tx,"PieTokenBuilder"),tx),_vt=(rx=class extends Z2{runCustomConverter(e,r,n){if(e.name==="PIE_SECTION_LABEL")return r.replace(/"/g,"").trim()}},kt(rx,"PieValueConverter"),rx),GA={parser:{TokenBuilder:kt(()=>new Svt,"TokenBuilder"),ValueConverter:kt(()=>new _vt,"ValueConverter")}};kt(UA,"createPieServices")});function VA(t=qs){let e=pa(Us(t),Xo),r=pa(Gs({shared:e}),RU,qA);return e.ServiceRegistry.register(r),{shared:e,Architecture:r}}var nx,Avt,ax,Lvt,qA,BU=A(()=>{ko();Ll();Avt=(nx=class extends wo{constructor(){super(["architecture"])}},kt(nx,"ArchitectureTokenBuilder"),nx),Lvt=(ax=class extends Z2{runCustomConverter(e,r,n){if(e.name==="ARCH_ICON")return r.replace(/[()]/g,"").trim();if(e.name==="ARCH_TEXT_ICON")return r.replace(/["()]/g,"");if(e.name==="ARCH_TITLE")return r.replace(/[[\]]/g,"").trim()}},kt(ax,"ArchitectureValueConverter"),ax),qA={parser:{TokenBuilder:kt(()=>new Avt,"TokenBuilder"),ValueConverter:kt(()=>new Lvt,"ValueConverter")}};kt(VA,"createArchitectureServices")});function WA(t=qs){let e=pa(Us(t),Xo),r=pa(Gs({shared:e}),DU,HA);return e.ServiceRegistry.register(r),{shared:e,Radar:r}}var ix,Rvt,HA,FU=A(()=>{ko();Ll();Rvt=(ix=class extends wo{constructor(){super(["radar-beta"])}},kt(ix,"RadarTokenBuilder"),ix),HA={parser:{TokenBuilder:kt(()=>new Rvt,"TokenBuilder"),ValueConverter:kt(()=>new ff,"ValueConverter")}};kt(WA,"createRadarServices")});var REe={};lr(REe,{InfoModule:()=>BA,createInfoServices:()=>FA});var IEe=A(()=>{MU();ko()});var DEe={};lr(DEe,{PacketModule:()=>zA,createPacketServices:()=>$A});var NEe=A(()=>{OU();ko()});var MEe={};lr(MEe,{PieModule:()=>GA,createPieServices:()=>UA});var OEe=A(()=>{PU();ko()});var PEe={};lr(PEe,{ArchitectureModule:()=>qA,createArchitectureServices:()=>VA});var BEe=A(()=>{BU();ko()});var FEe={};lr(FEe,{GitGraphModule:()=>OA,createGitGraphServices:()=>PA});var zEe=A(()=>{NU();ko()});var $Ee={};lr($Ee,{RadarModule:()=>HA,createRadarServices:()=>WA});var GEe=A(()=>{FU();ko()});async function jo(t,e){let r=Ivt[t];if(!r)throw new Error(`Unknown diagram type: ${t}`);E0[t]||await r();let a=E0[t].parse(e);if(a.lexerErrors.length>0||a.parserErrors.length>0)throw new Dvt(a);return a.value}var E0,Ivt,sx,Dvt,Um=A(()=>{NU();MU();OU();PU();BU();FU();ko();E0={},Ivt={info:kt(async()=>{let{createInfoServices:t}=await Promise.resolve().then(()=>(IEe(),REe)),e=t().Info.parser.LangiumParser;E0.info=e},"info"),packet:kt(async()=>{let{createPacketServices:t}=await Promise.resolve().then(()=>(NEe(),DEe)),e=t().Packet.parser.LangiumParser;E0.packet=e},"packet"),pie:kt(async()=>{let{createPieServices:t}=await Promise.resolve().then(()=>(OEe(),MEe)),e=t().Pie.parser.LangiumParser;E0.pie=e},"pie"),architecture:kt(async()=>{let{createArchitectureServices:t}=await Promise.resolve().then(()=>(BEe(),PEe)),e=t().Architecture.parser.LangiumParser;E0.architecture=e},"architecture"),gitGraph:kt(async()=>{let{createGitGraphServices:t}=await Promise.resolve().then(()=>(zEe(),FEe)),e=t().GitGraph.parser.LangiumParser;E0.gitGraph=e},"gitGraph"),radar:kt(async()=>{let{createRadarServices:t}=await Promise.resolve().then(()=>(GEe(),$Ee)),e=t().Radar.parser.LangiumParser;E0.radar=e},"radar")};kt(jo,"parse");Dvt=(sx=class extends Error{constructor(e){let r=e.lexerErrors.map(a=>a.message).join(` -`),n=e.parserErrors.map(a=>a.message).join(` -`);super(`Parsing failed: ${r} ${n}`),this.result=e}},kt(sx,"MermaidParseError"),sx)});var jEe={};lr(jEe,{diagram:()=>Syt});function jA(){return GO({length:7})}function qEe(t,e){let r=Object.create(null);return t.reduce((n,a)=>{let i=e(a);return r[i]||(r[i]=!0,n.push(a)),n},[])}function zU(t,e,r){let n=t.indexOf(e);n===-1?t.push(r):t.splice(n,1,r)}function $U(t){let e=t.reduce((a,i)=>a.seq>i.seq?a:i,t[0]),r="";t.forEach(function(a){a===e?r+=" *":r+=" |"});let n=[r,e.id,e.seq];for(let a in bt.records.branches)bt.records.branches.get(a)===e.id&&n.push(a);if(te.debug(n.join(" ")),e.parents&&e.parents.length==2&&e.parents[0]&&e.parents[1]){let a=bt.records.commits.get(e.parents[0]);zU(t,e,a),e.parents[1]&&t.push(bt.records.commits.get(e.parents[1]))}else{if(e.parents.length==0)return;if(e.parents[0]){let a=bt.records.commits.get(e.parents[0]);zU(t,e,a)}}t=qEe(t,a=>a.id),$U(t)}var sn,Nvt,Vm,bt,Mvt,Ovt,Pvt,Bvt,Fvt,zvt,$vt,VEe,Gvt,Uvt,qvt,Vvt,Hvt,HEe,Wvt,Yvt,Xvt,WEe,jvt,Kvt,Zvt,Qvt,Jvt,eyt,tyt,ryt,nyt,Il,S0,_0,Xc,df,qm,To,Eo,YA,Zw,XA,C0,Nr,ayt,YEe,XEe,iyt,syt,oyt,lyt,uyt,cyt,hyt,fyt,dyt,pyt,myt,gyt,UEe,vyt,Qw,yyt,xyt,byt,wyt,kyt,Tyt,Eyt,Cyt,Syt,KEe=A(()=>{pv();w_();ln();ur();Um();cr();sn={NORMAL:0,REVERSE:1,HIGHLIGHT:2,MERGE:3,CHERRY_PICK:4},Nvt=or.gitGraph,Vm=x(()=>mi({...Nvt,...wr().gitGraph}),"getConfig"),bt=new gv(()=>{let t=Vm(),e=t.mainBranchName,r=t.mainBranchOrder;return{mainBranchName:e,commits:new Map,head:null,branchConfig:new Map([[e,{name:e,order:r}]]),branches:new Map([[e,null]]),currBranch:e,direction:"LR",seq:0,options:{}}});x(jA,"getID");x(qEe,"uniqBy");Mvt=x(function(t){bt.records.direction=t},"setDirection"),Ovt=x(function(t){te.debug("options str",t),t=t?.trim(),t=t||"{}";try{bt.records.options=JSON.parse(t)}catch(e){te.error("error while parsing gitGraph options",e.message)}},"setOptions"),Pvt=x(function(){return bt.records.options},"getOptions"),Bvt=x(function(t){let e=t.msg,r=t.id,n=t.type,a=t.tags;te.info("commit",e,r,n,a),te.debug("Entering commit:",e,r,n,a);let i=Vm();r=Ze.sanitizeText(r,i),e=Ze.sanitizeText(e,i),a=a?.map(o=>Ze.sanitizeText(o,i));let s={id:r||bt.records.seq+"-"+jA(),message:e,seq:bt.records.seq++,type:n??sn.NORMAL,tags:a??[],parents:bt.records.head==null?[]:[bt.records.head.id],branch:bt.records.currBranch};bt.records.head=s,te.info("main branch",i.mainBranchName),bt.records.commits.set(s.id,s),bt.records.branches.set(bt.records.currBranch,s.id),te.debug("in pushCommit "+s.id)},"commit"),Fvt=x(function(t){let e=t.name,r=t.order;if(e=Ze.sanitizeText(e,Vm()),bt.records.branches.has(e))throw new Error(`Trying to create an existing branch. (Help: Either use a new name if you want create a new branch or try using "checkout ${e}")`);bt.records.branches.set(e,bt.records.head!=null?bt.records.head.id:null),bt.records.branchConfig.set(e,{name:e,order:r}),VEe(e),te.debug("in createBranch")},"branch"),zvt=x(t=>{let e=t.branch,r=t.id,n=t.type,a=t.tags,i=Vm();e=Ze.sanitizeText(e,i),r&&(r=Ze.sanitizeText(r,i));let s=bt.records.branches.get(bt.records.currBranch),o=bt.records.branches.get(e),l=s?bt.records.commits.get(s):void 0,u=o?bt.records.commits.get(o):void 0;if(l&&u&&l.branch===e)throw new Error(`Cannot merge branch '${e}' into itself.`);if(bt.records.currBranch===e){let d=new Error('Incorrect usage of "merge". Cannot merge a branch to itself');throw d.hash={text:`merge ${e}`,token:`merge ${e}`,expected:["branch abc"]},d}if(l===void 0||!l){let d=new Error(`Incorrect usage of "merge". Current branch (${bt.records.currBranch})has no commits`);throw d.hash={text:`merge ${e}`,token:`merge ${e}`,expected:["commit"]},d}if(!bt.records.branches.has(e)){let d=new Error('Incorrect usage of "merge". Branch to be merged ('+e+") does not exist");throw d.hash={text:`merge ${e}`,token:`merge ${e}`,expected:[`branch ${e}`]},d}if(u===void 0||!u){let d=new Error('Incorrect usage of "merge". Branch to be merged ('+e+") has no commits");throw d.hash={text:`merge ${e}`,token:`merge ${e}`,expected:['"commit"']},d}if(l===u){let d=new Error('Incorrect usage of "merge". Both branches have same head');throw d.hash={text:`merge ${e}`,token:`merge ${e}`,expected:["branch abc"]},d}if(r&&bt.records.commits.has(r)){let d=new Error('Incorrect usage of "merge". Commit with id:'+r+" already exists, use different custom Id");throw d.hash={text:`merge ${e} ${r} ${n} ${a?.join(" ")}`,token:`merge ${e} ${r} ${n} ${a?.join(" ")}`,expected:[`merge ${e} ${r}_UNIQUE ${n} ${a?.join(" ")}`]},d}let h=o||"",f={id:r||`${bt.records.seq}-${jA()}`,message:`merged branch ${e} into ${bt.records.currBranch}`,seq:bt.records.seq++,parents:bt.records.head==null?[]:[bt.records.head.id,h],branch:bt.records.currBranch,type:sn.MERGE,customType:n,customId:!!r,tags:a??[]};bt.records.head=f,bt.records.commits.set(f.id,f),bt.records.branches.set(bt.records.currBranch,f.id),te.debug(bt.records.branches),te.debug("in mergeBranch")},"merge"),$vt=x(function(t){let e=t.id,r=t.targetId,n=t.tags,a=t.parent;te.debug("Entering cherryPick:",e,r,n);let i=Vm();if(e=Ze.sanitizeText(e,i),r=Ze.sanitizeText(r,i),n=n?.map(l=>Ze.sanitizeText(l,i)),a=Ze.sanitizeText(a,i),!e||!bt.records.commits.has(e)){let l=new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');throw l.hash={text:`cherryPick ${e} ${r}`,token:`cherryPick ${e} ${r}`,expected:["cherry-pick abc"]},l}let s=bt.records.commits.get(e);if(s===void 0||!s)throw new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');if(a&&!(Array.isArray(s.parents)&&s.parents.includes(a)))throw new Error("Invalid operation: The specified parent commit is not an immediate parent of the cherry-picked commit.");let o=s.branch;if(s.type===sn.MERGE&&!a)throw new Error("Incorrect usage of cherry-pick: If the source commit is a merge commit, an immediate parent commit must be specified.");if(!r||!bt.records.commits.has(r)){if(o===bt.records.currBranch){let f=new Error('Incorrect usage of "cherryPick". Source commit is already on current branch');throw f.hash={text:`cherryPick ${e} ${r}`,token:`cherryPick ${e} ${r}`,expected:["cherry-pick abc"]},f}let l=bt.records.branches.get(bt.records.currBranch);if(l===void 0||!l){let f=new Error(`Incorrect usage of "cherry-pick". Current branch (${bt.records.currBranch})has no commits`);throw f.hash={text:`cherryPick ${e} ${r}`,token:`cherryPick ${e} ${r}`,expected:["cherry-pick abc"]},f}let u=bt.records.commits.get(l);if(u===void 0||!u){let f=new Error(`Incorrect usage of "cherry-pick". Current branch (${bt.records.currBranch})has no commits`);throw f.hash={text:`cherryPick ${e} ${r}`,token:`cherryPick ${e} ${r}`,expected:["cherry-pick abc"]},f}let h={id:bt.records.seq+"-"+jA(),message:`cherry-picked ${s?.message} into ${bt.records.currBranch}`,seq:bt.records.seq++,parents:bt.records.head==null?[]:[bt.records.head.id,s.id],branch:bt.records.currBranch,type:sn.CHERRY_PICK,tags:n?n.filter(Boolean):[`cherry-pick:${s.id}${s.type===sn.MERGE?`|parent:${a}`:""}`]};bt.records.head=h,bt.records.commits.set(h.id,h),bt.records.branches.set(bt.records.currBranch,h.id),te.debug(bt.records.branches),te.debug("in cherryPick")}},"cherryPick"),VEe=x(function(t){if(t=Ze.sanitizeText(t,Vm()),bt.records.branches.has(t)){bt.records.currBranch=t;let e=bt.records.branches.get(bt.records.currBranch);e===void 0||!e?bt.records.head=null:bt.records.head=bt.records.commits.get(e)??null}else{let e=new Error(`Trying to checkout branch which is not yet created. (Help try using "branch ${t}")`);throw e.hash={text:`checkout ${t}`,token:`checkout ${t}`,expected:[`branch ${t}`]},e}},"checkout");x(zU,"upsert");x($U,"prettyPrintCommitHistory");Gvt=x(function(){te.debug(bt.records.commits);let t=HEe()[0];$U([t])},"prettyPrint"),Uvt=x(function(){bt.reset(),Cr()},"clear"),qvt=x(function(){return[...bt.records.branchConfig.values()].map((e,r)=>e.order!==null&&e.order!==void 0?e:{...e,order:parseFloat(`0.${r}`)}).sort((e,r)=>(e.order??0)-(r.order??0)).map(({name:e})=>({name:e}))},"getBranchesAsObjArray"),Vvt=x(function(){return bt.records.branches},"getBranches"),Hvt=x(function(){return bt.records.commits},"getCommits"),HEe=x(function(){let t=[...bt.records.commits.values()];return t.forEach(function(e){te.debug(e.id)}),t.sort((e,r)=>e.seq-r.seq),t},"getCommitsArray"),Wvt=x(function(){return bt.records.currBranch},"getCurrentBranch"),Yvt=x(function(){return bt.records.direction},"getDirection"),Xvt=x(function(){return bt.records.head},"getHead"),WEe={commitType:sn,getConfig:Vm,setDirection:Mvt,setOptions:Ovt,getOptions:Pvt,commit:Bvt,branch:Fvt,merge:zvt,cherryPick:$vt,checkout:VEe,prettyPrint:Gvt,clear:Uvt,getBranchesAsObjArray:qvt,getBranches:Vvt,getCommits:Hvt,getCommitsArray:HEe,getCurrentBranch:Wvt,getDirection:Yvt,getHead:Xvt,setAccTitle:Sr,getAccTitle:_r,getAccDescription:Lr,setAccDescription:Ar,setDiagramTitle:Fr,getDiagramTitle:Rr},jvt=x((t,e)=>{uu(t,e),t.dir&&e.setDirection(t.dir);for(let r of t.statements)Kvt(r,e)},"populate"),Kvt=x((t,e)=>{let n={Commit:x(a=>e.commit(Zvt(a)),"Commit"),Branch:x(a=>e.branch(Qvt(a)),"Branch"),Merge:x(a=>e.merge(Jvt(a)),"Merge"),Checkout:x(a=>e.checkout(eyt(a)),"Checkout"),CherryPicking:x(a=>e.cherryPick(tyt(a)),"CherryPicking")}[t.$type];n?n(t):te.error(`Unknown statement type: ${t.$type}`)},"parseStatement"),Zvt=x(t=>({id:t.id,msg:t.message??"",type:t.type!==void 0?sn[t.type]:sn.NORMAL,tags:t.tags??void 0}),"parseCommit"),Qvt=x(t=>({name:t.name,order:t.order??0}),"parseBranch"),Jvt=x(t=>({branch:t.branch,id:t.id??"",type:t.type!==void 0?sn[t.type]:void 0,tags:t.tags??void 0}),"parseMerge"),eyt=x(t=>t.branch,"parseCheckout"),tyt=x(t=>({id:t.id,targetId:"",tags:t.tags?.length===0?void 0:t.tags,parent:t.parent}),"parseCherryPicking"),ryt={parse:x(async t=>{let e=await jo("gitGraph",t);te.debug(e),jvt(e,WEe)},"parse")},nyt=Te(),Il=nyt?.gitGraph,S0=10,_0=40,Xc=4,df=2,qm=8,To=new Map,Eo=new Map,YA=30,Zw=new Map,XA=[],C0=0,Nr="LR",ayt=x(()=>{To.clear(),Eo.clear(),Zw.clear(),C0=0,XA=[],Nr="LR"},"clear"),YEe=x(t=>{let e=document.createElementNS("http://www.w3.org/2000/svg","text");return(typeof t=="string"?t.split(/\\n|\n|/gi):t).forEach(n=>{let a=document.createElementNS("http://www.w3.org/2000/svg","tspan");a.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),a.setAttribute("dy","1em"),a.setAttribute("x","0"),a.setAttribute("class","row"),a.textContent=n.trim(),e.appendChild(a)}),e},"drawText"),XEe=x(t=>{let e,r,n;return Nr==="BT"?(r=x((a,i)=>a<=i,"comparisonFunc"),n=1/0):(r=x((a,i)=>a>=i,"comparisonFunc"),n=0),t.forEach(a=>{let i=Nr==="TB"||Nr=="BT"?Eo.get(a)?.y:Eo.get(a)?.x;i!==void 0&&r(i,n)&&(e=a,n=i)}),e},"findClosestParent"),iyt=x(t=>{let e="",r=1/0;return t.forEach(n=>{let a=Eo.get(n).y;a<=r&&(e=n,r=a)}),e||void 0},"findClosestParentBT"),syt=x((t,e,r)=>{let n=r,a=r,i=[];t.forEach(s=>{let o=e.get(s);if(!o)throw new Error(`Commit not found for key ${s}`);o.parents.length?(n=lyt(o),a=Math.max(n,a)):i.push(o),uyt(o,n)}),n=a,i.forEach(s=>{cyt(s,n,r)}),t.forEach(s=>{let o=e.get(s);if(o?.parents.length){let l=iyt(o.parents);n=Eo.get(l).y-_0,n<=a&&(a=n);let u=To.get(o.branch).pos,h=n-S0;Eo.set(o.id,{x:u,y:h})}})},"setParallelBTPos"),oyt=x(t=>{let e=XEe(t.parents.filter(n=>n!==null));if(!e)throw new Error(`Closest parent not found for commit ${t.id}`);let r=Eo.get(e)?.y;if(r===void 0)throw new Error(`Closest parent position not found for commit ${t.id}`);return r},"findClosestParentPos"),lyt=x(t=>oyt(t)+_0,"calculateCommitPosition"),uyt=x((t,e)=>{let r=To.get(t.branch);if(!r)throw new Error(`Branch not found for commit ${t.id}`);let n=r.pos,a=e+S0;return Eo.set(t.id,{x:n,y:a}),{x:n,y:a}},"setCommitPosition"),cyt=x((t,e,r)=>{let n=To.get(t.branch);if(!n)throw new Error(`Branch not found for commit ${t.id}`);let a=e+r,i=n.pos;Eo.set(t.id,{x:i,y:a})},"setRootPosition"),hyt=x((t,e,r,n,a,i)=>{if(i===sn.HIGHLIGHT)t.append("rect").attr("x",r.x-10).attr("y",r.y-10).attr("width",20).attr("height",20).attr("class",`commit ${e.id} commit-highlight${a%qm} ${n}-outer`),t.append("rect").attr("x",r.x-6).attr("y",r.y-6).attr("width",12).attr("height",12).attr("class",`commit ${e.id} commit${a%qm} ${n}-inner`);else if(i===sn.CHERRY_PICK)t.append("circle").attr("cx",r.x).attr("cy",r.y).attr("r",10).attr("class",`commit ${e.id} ${n}`),t.append("circle").attr("cx",r.x-3).attr("cy",r.y+2).attr("r",2.75).attr("fill","#fff").attr("class",`commit ${e.id} ${n}`),t.append("circle").attr("cx",r.x+3).attr("cy",r.y+2).attr("r",2.75).attr("fill","#fff").attr("class",`commit ${e.id} ${n}`),t.append("line").attr("x1",r.x+3).attr("y1",r.y+1).attr("x2",r.x).attr("y2",r.y-5).attr("stroke","#fff").attr("class",`commit ${e.id} ${n}`),t.append("line").attr("x1",r.x-3).attr("y1",r.y+1).attr("x2",r.x).attr("y2",r.y-5).attr("stroke","#fff").attr("class",`commit ${e.id} ${n}`);else{let s=t.append("circle");if(s.attr("cx",r.x),s.attr("cy",r.y),s.attr("r",e.type===sn.MERGE?9:10),s.attr("class",`commit ${e.id} commit${a%qm}`),i===sn.MERGE){let o=t.append("circle");o.attr("cx",r.x),o.attr("cy",r.y),o.attr("r",6),o.attr("class",`commit ${n} ${e.id} commit${a%qm}`)}i===sn.REVERSE&&t.append("path").attr("d",`M ${r.x-5},${r.y-5}L${r.x+5},${r.y+5}M${r.x-5},${r.y+5}L${r.x+5},${r.y-5}`).attr("class",`commit ${n} ${e.id} commit${a%qm}`)}},"drawCommitBullet"),fyt=x((t,e,r,n)=>{if(e.type!==sn.CHERRY_PICK&&(e.customId&&e.type===sn.MERGE||e.type!==sn.MERGE)&&Il?.showCommitLabel){let a=t.append("g"),i=a.insert("rect").attr("class","commit-label-bkg"),s=a.append("text").attr("x",n).attr("y",r.y+25).attr("class","commit-label").text(e.id),o=s.node()?.getBBox();if(o&&(i.attr("x",r.posWithOffset-o.width/2-df).attr("y",r.y+13.5).attr("width",o.width+2*df).attr("height",o.height+2*df),Nr==="TB"||Nr==="BT"?(i.attr("x",r.x-(o.width+4*Xc+5)).attr("y",r.y-12),s.attr("x",r.x-(o.width+4*Xc)).attr("y",r.y+o.height-12)):s.attr("x",r.posWithOffset-o.width/2),Il.rotateCommitLabel))if(Nr==="TB"||Nr==="BT")s.attr("transform","rotate(-45, "+r.x+", "+r.y+")"),i.attr("transform","rotate(-45, "+r.x+", "+r.y+")");else{let l=-7.5-(o.width+10)/25*9.5,u=10+o.width/25*8.5;a.attr("transform","translate("+l+", "+u+") rotate(-45, "+n+", "+r.y+")")}}},"drawCommitLabel"),dyt=x((t,e,r,n)=>{if(e.tags.length>0){let a=0,i=0,s=0,o=[];for(let l of e.tags.reverse()){let u=t.insert("polygon"),h=t.append("circle"),f=t.append("text").attr("y",r.y-16-a).attr("class","tag-label").text(l),d=f.node()?.getBBox();if(!d)throw new Error("Tag bbox not found");i=Math.max(i,d.width),s=Math.max(s,d.height),f.attr("x",r.posWithOffset-d.width/2),o.push({tag:f,hole:h,rect:u,yOffset:a}),a+=20}for(let{tag:l,hole:u,rect:h,yOffset:f}of o){let d=s/2,p=r.y-19.2-f;if(h.attr("class","tag-label-bkg").attr("points",` - ${n-i/2-Xc/2},${p+df} - ${n-i/2-Xc/2},${p-df} - ${r.posWithOffset-i/2-Xc},${p-d-df} - ${r.posWithOffset+i/2+Xc},${p-d-df} - ${r.posWithOffset+i/2+Xc},${p+d+df} - ${r.posWithOffset-i/2-Xc},${p+d+df}`),u.attr("cy",p).attr("cx",n-i/2+Xc/2).attr("r",1.5).attr("class","tag-hole"),Nr==="TB"||Nr==="BT"){let m=n+f;h.attr("class","tag-label-bkg").attr("points",` +`}var pEe,w4t,E4t,S4t,iL,t8,r8,aL,yH=D(()=>{CU();bv();K0();pEe=/\s*(@([\p{L}][\p{L}\p{N}]*)?)/uy,w4t=/\{(@[\p{L}][\p{L}\p{N}]*)(\s*)([^\r\n}]+)?\}/gu;E4t=/\S/,S4t=/\s*$/;iL=class{constructor(e,r){this.elements=e,this.range=r}getTag(e){return this.getAllTags().find(r=>r.name===e)}getTags(e){return this.getAllTags().filter(r=>r.name===e)}getAllTags(){return this.elements.filter(e=>"name"in e)}toString(){let e="";for(let r of this.elements)if(e.length===0)e=r.toString();else{let n=r.toString();e+=mEe(e)+n}return e.trim()}toMarkdown(e){let r="";for(let n of this.elements)if(r.length===0)r=n.toMarkdown(e);else{let i=n.toMarkdown(e);r+=mEe(r)+i}return r.trim()}},t8=class{constructor(e,r,n,i){this.name=e,this.content=r,this.inline=n,this.range=i}toString(){let e=`@${this.name}`,r=this.content.toString();return this.content.inlines.length===1?e=`${e} ${r}`:this.content.inlines.length>1&&(e=`${e} +${r}`),this.inline?`{${e}}`:e}toMarkdown(e){var r,n;return(n=(r=e?.renderTag)===null||r===void 0?void 0:r.call(e,this))!==null&&n!==void 0?n:this.toMarkdownDefault(e)}toMarkdownDefault(e){let r=this.content.toMarkdown(e);if(this.inline){let a=D4t(this.name,r,e??{});if(typeof a=="string")return a}let n="";e?.tag==="italic"||e?.tag===void 0?n="*":e?.tag==="bold"?n="**":e?.tag==="bold-italic"&&(n="***");let i=`${n}@${this.name}${n}`;return this.content.inlines.length===1?i=`${i} \u2014 ${r}`:this.content.inlines.length>1&&(i=`${i} +${r}`),this.inline?`{${i}}`:i}};r8=class{constructor(e,r){this.inlines=e,this.range=r}toString(){let e="";for(let r=0;rn.range.start.line&&(e+=` +`)}return e}toMarkdown(e){let r="";for(let n=0;ni.range.start.line&&(r+=` +`)}return r}},aL=class{constructor(e,r){this.text=e,this.range=r}toString(){return this.text}toMarkdown(){return this.text}}});var n8,vH=D(()=>{vo();yH();n8=class{constructor(e){this.indexManager=e.shared.workspace.IndexManager,this.commentProvider=e.documentation.CommentProvider}getDocumentation(e){let r=this.commentProvider.getComment(e);if(r&&mH(r))return pH(r).toMarkdown({renderLink:(i,a)=>this.documentationLinkRenderer(e,i,a),renderTag:i=>this.documentationTagRenderer(e,i)})}documentationLinkRenderer(e,r,n){var i;let a=(i=this.findNameInPrecomputedScopes(e,r))!==null&&i!==void 0?i:this.findNameInGlobalScope(e,r);if(a&&a.nameSegment){let s=a.nameSegment.range.start.line+1,o=a.nameSegment.range.start.character+1,l=a.documentUri.with({fragment:`L${s},${o}`});return`[${n}](${l.toString()})`}else return}documentationTagRenderer(e,r){}findNameInPrecomputedScopes(e,r){let i=Xs(e).precomputedScopes;if(!i)return;let a=e;do{let o=i.get(a).find(l=>l.name===r);if(o)return o;a=a.$container}while(a)}findNameInGlobalScope(e,r){return this.indexManager.allElements().find(i=>i.name===r)}}});var i8,xH=D(()=>{QA();hc();i8=class{constructor(e){this.grammarConfig=()=>e.parser.GrammarConfig}getComment(e){var r;return eH(e)?e.$comment:(r=g$(e.$cstNode,this.grammarConfig().multilineCommentRules))===null||r===void 0?void 0:r.text}}});var a8,bH,wH,kH=D(()=>{Cu();eL();a8=class{constructor(e){this.syncParser=e.parser.LangiumParser}parse(e,r){return Promise.resolve(this.syncParser.parse(e))}},bH=class{constructor(e){this.threadCount=8,this.terminationDelay=200,this.workerPool=[],this.queue=[],this.hydrator=e.serializer.Hydrator}initializeWorkers(){for(;this.workerPool.length{if(this.queue.length>0){let r=this.queue.shift();r&&(e.lock(),r.resolve(e))}}),this.workerPool.push(e)}}async parse(e,r){let n=await this.acquireParserWorker(r),i=new Lo,a,s=r.onCancellationRequested(()=>{a=setTimeout(()=>{this.terminateWorker(n)},this.terminationDelay)});return n.parse(e).then(o=>{let l=this.hydrator.hydrate(o);i.resolve(l)}).catch(o=>{i.reject(o)}).finally(()=>{s.dispose(),clearTimeout(a)}),i.promise}terminateWorker(e){e.terminate();let r=this.workerPool.indexOf(e);r>=0&&this.workerPool.splice(r,1)}async acquireParserWorker(e){this.initializeWorkers();for(let n of this.workerPool)if(n.ready)return n.lock(),n;let r=new Lo;return e.onCancellationRequested(()=>{let n=this.queue.indexOf(r);n>=0&&this.queue.splice(n,1),r.reject(X0)}),this.queue.push(r),r.promise}},wH=class{get ready(){return this._ready}get onReady(){return this.onReadyEmitter.event}constructor(e,r,n,i){this.onReadyEmitter=new Ii.Emitter,this.deferred=new Lo,this._ready=!0,this._parsing=!1,this.sendMessage=e,this._terminate=i,r(a=>{let s=a;this.deferred.resolve(s),this.unlock()}),n(a=>{this.deferred.reject(a),this.unlock()})}terminate(){this.deferred.reject(X0),this._terminate()}lock(){this._ready=!1}unlock(){this._parsing=!1,this._ready=!0,this.onReadyEmitter.fire()}parse(e){if(this._parsing)throw new Error("Parser worker is busy");return this._parsing=!0,this.deferred=new Lo,this.sendMessage(e),this.deferred.promise}}});var s8,TH=D(()=>{Su();Cu();s8=class{constructor(){this.previousTokenSource=new Pr.CancellationTokenSource,this.writeQueue=[],this.readQueue=[],this.done=!0}write(e){this.cancelWrite();let r=XA();return this.previousTokenSource=r,this.enqueue(this.writeQueue,e,r.token)}read(e){return this.enqueue(this.readQueue,e)}enqueue(e,r,n=Pr.CancellationToken.None){let i=new Lo,a={action:r,deferred:i,cancellationToken:n};return e.push(a),this.performNextOperation(),i.promise}async performNextOperation(){if(!this.done)return;let e=[];if(this.writeQueue.length>0)e.push(this.writeQueue.shift());else if(this.readQueue.length>0)e.push(...this.readQueue.splice(0,this.readQueue.length));else return;this.done=!1,await Promise.all(e.map(async({action:r,deferred:n,cancellationToken:i})=>{try{let a=await Promise.resolve().then(()=>r(i));n.resolve(a)}catch(a){j0(a)?n.resolve(void 0):n.reject(a)}})),this.done=!0,this.performNextOperation()}cancelWrite(){this.previousTokenSource.cancel()}}});var o8,EH=D(()=>{FA();A0();cc();vo();Kx();hc();o8=class{constructor(e){this.grammarElementIdMap=new Wm,this.tokenTypeIdMap=new Wm,this.grammar=e.Grammar,this.lexer=e.parser.Lexer,this.linker=e.references.Linker}dehydrate(e){return{lexerErrors:e.lexerErrors,lexerReport:e.lexerReport?this.dehydrateLexerReport(e.lexerReport):void 0,parserErrors:e.parserErrors.map(r=>Object.assign(Object.assign({},r),{message:r.message})),value:this.dehydrateAstNode(e.value,this.createDehyrationContext(e.value))}}dehydrateLexerReport(e){return e}createDehyrationContext(e){let r=new Map,n=new Map;for(let i of xu(e))r.set(i,{});if(e.$cstNode)for(let i of vm(e.$cstNode))n.set(i,{});return{astNodes:r,cstNodes:n}}dehydrateAstNode(e,r){let n=r.astNodes.get(e);n.$type=e.$type,n.$containerIndex=e.$containerIndex,n.$containerProperty=e.$containerProperty,e.$cstNode!==void 0&&(n.$cstNode=this.dehydrateCstNode(e.$cstNode,r));for(let[i,a]of Object.entries(e))if(!i.startsWith("$"))if(Array.isArray(a)){let s=[];n[i]=s;for(let o of a)qi(o)?s.push(this.dehydrateAstNode(o,r)):Is(o)?s.push(this.dehydrateReference(o,r)):s.push(o)}else qi(a)?n[i]=this.dehydrateAstNode(a,r):Is(a)?n[i]=this.dehydrateReference(a,r):a!==void 0&&(n[i]=a);return n}dehydrateReference(e,r){let n={};return n.$refText=e.$refText,e.$refNode&&(n.$refNode=r.cstNodes.get(e.$refNode)),n}dehydrateCstNode(e,r){let n=r.cstNodes.get(e);return r6(e)?n.fullText=e.fullText:n.grammarSource=this.getGrammarElementId(e.grammarSource),n.hidden=e.hidden,n.astNode=r.astNodes.get(e.astNode),uc(e)?n.content=e.content.map(i=>this.dehydrateCstNode(i,r)):Ud(e)&&(n.tokenType=e.tokenType.name,n.offset=e.offset,n.length=e.length,n.startLine=e.range.start.line,n.startColumn=e.range.start.character,n.endLine=e.range.end.line,n.endColumn=e.range.end.character),n}hydrate(e){let r=e.value,n=this.createHydrationContext(r);return"$cstNode"in r&&this.hydrateCstNode(r.$cstNode,n),{lexerErrors:e.lexerErrors,lexerReport:e.lexerReport,parserErrors:e.parserErrors,value:this.hydrateAstNode(r,n)}}createHydrationContext(e){let r=new Map,n=new Map;for(let a of xu(e))r.set(a,{});let i;if(e.$cstNode)for(let a of vm(e.$cstNode)){let s;"fullText"in a?(s=new Ux(a.fullText),i=s):"content"in a?s=new Um:"tokenType"in a&&(s=this.hydrateCstLeafNode(a)),s&&(n.set(a,s),s.root=i)}return{astNodes:r,cstNodes:n}}hydrateAstNode(e,r){let n=r.astNodes.get(e);n.$type=e.$type,n.$containerIndex=e.$containerIndex,n.$containerProperty=e.$containerProperty,e.$cstNode&&(n.$cstNode=r.cstNodes.get(e.$cstNode));for(let[i,a]of Object.entries(e))if(!i.startsWith("$"))if(Array.isArray(a)){let s=[];n[i]=s;for(let o of a)qi(o)?s.push(this.setParent(this.hydrateAstNode(o,r),n)):Is(o)?s.push(this.hydrateReference(o,n,i,r)):s.push(o)}else qi(a)?n[i]=this.setParent(this.hydrateAstNode(a,r),n):Is(a)?n[i]=this.hydrateReference(a,n,i,r):a!==void 0&&(n[i]=a);return n}setParent(e,r){return e.$container=r,e}hydrateReference(e,r,n,i){return this.linker.buildReference(r,n,i.cstNodes.get(e.$refNode),e.$refText)}hydrateCstNode(e,r,n=0){let i=r.cstNodes.get(e);if(typeof e.grammarSource=="number"&&(i.grammarSource=this.getGrammarElement(e.grammarSource)),i.astNode=r.astNodes.get(e.astNode),uc(i))for(let a of e.content){let s=this.hydrateCstNode(a,r,n++);i.content.push(s)}return i}hydrateCstLeafNode(e){let r=this.getTokenType(e.tokenType),n=e.offset,i=e.length,a=e.startLine,s=e.startColumn,o=e.endLine,l=e.endColumn,u=e.hidden;return new qm(n,i,{start:{line:a,character:s},end:{line:o,character:l}},r,u)}getTokenType(e){return this.lexer.definition[e]}getGrammarElementId(e){if(e)return this.grammarElementIdMap.size===0&&this.createGrammarElementIdMap(),this.grammarElementIdMap.get(e)}getGrammarElement(e){return this.grammarElementIdMap.size===0&&this.createGrammarElementIdMap(),this.grammarElementIdMap.getKey(e)}createGrammarElementIdMap(){let e=0;for(let r of xu(this.grammar))c6(r)&&this.grammarElementIdMap.set(r,e++)}}});function Io(t){return{documentation:{CommentProvider:e=>new i8(e),DocumentationProvider:e=>new n8(e)},parser:{AsyncParser:e=>new a8(e),GrammarConfig:e=>nG(e),LangiumParser:e=>MU(e),CompletionParser:e=>DU(e),ValueConverter:()=>new Vm,TokenBuilder:()=>new mf,Lexer:e=>new jm(e),ParserErrorMessageProvider:()=>new Hx,LexerErrorMessageProvider:()=>new e8},workspace:{AstNodeLocator:()=>new j7,AstNodeDescriptionProvider:e=>new Y7(e),ReferenceDescriptionProvider:e=>new X7(e)},references:{Linker:e=>new O7(e),NameProvider:()=>new P7,ScopeProvider:e=>new G7(e),ScopeComputation:e=>new F7(e),References:e=>new B7(e)},serializer:{Hydrator:e=>new o8(e),JsonSerializer:e=>new q7(e)},validation:{DocumentValidator:e=>new W7(e),ValidationRegistry:e=>new H7(e)},shared:()=>t.shared}}function Mo(t){return{ServiceRegistry:e=>new U7(e),workspace:{LangiumDocuments:e=>new N7(e),LangiumDocumentFactory:e=>new M7(e),DocumentBuilder:e=>new Z7(e),IndexManager:e=>new Q7(e),WorkspaceManager:e=>new J7(e),FileSystemProvider:e=>t.fileSystemProvider(e),WorkspaceLock:()=>new s8,ConfigurationProvider:e=>new K7(e)}}}var SH=D(()=>{iG();IU();NU();UA();OU();XU();jU();KU();ZU();JU();QA();tH();rH();V7();nH();iH();aH();oH();jx();lH();uH();nL();vH();xH();D7();kH();TH();EH()});function Ji(t,e,r,n,i,a,s,o,l){let u=[t,e,r,n,i,a,s,o,l].reduce(sL,{});return EEe(u)}function TEe(t){if(t&&t[kEe])for(let e of Object.values(t))TEe(e);return t}function EEe(t,e){let r=new Proxy({},{deleteProperty:()=>!1,set:()=>{throw new Error("Cannot set property on injected service container")},get:(n,i)=>i===kEe?!0:wEe(n,i,t,e||r),getOwnPropertyDescriptor:(n,i)=>(wEe(n,i,t,e||r),Object.getOwnPropertyDescriptor(n,i)),has:(n,i)=>i in t,ownKeys:()=>[...Object.getOwnPropertyNames(t)]});return r}function wEe(t,e,r,n){if(e in t){if(t[e]instanceof Error)throw new Error("Construction failure. Please make sure that your dependencies are constructable.",{cause:t[e]});if(t[e]===bEe)throw new Error('Cycle detected. Please make "'+String(e)+'" lazy. Visit https://langium.org/docs/reference/configuration-services/#resolving-cyclic-dependencies');return t[e]}else if(e in r){let i=r[e];t[e]=bEe;try{t[e]=typeof i=="function"?i(n):EEe(i,n)}catch(a){throw t[e]=a instanceof Error?a:void 0,a}return t[e]}else return}function sL(t,e){if(e){for(let[r,n]of Object.entries(e))if(n!==void 0){let i=t[r];i!==null&&n!==null&&typeof i=="object"&&typeof n=="object"?t[r]=sL(i,n):t[r]=n}}return t}var CH,kEe,bEe,_H=D(()=>{(function(t){t.merge=(e,r)=>sL(sL({},e),r)})(CH||(CH={}));kEe=Symbol("isProxy");bEe=Symbol()});var SEe=D(()=>{});var CEe=D(()=>{xH();vH();yH()});var _Ee=D(()=>{});var AEe=D(()=>{iG();_Ee()});var AH,Km,oL,LH,LEe=D(()=>{Ap();UA();nL();AH={indentTokenName:"INDENT",dedentTokenName:"DEDENT",whitespaceTokenName:"WS",ignoreIndentationDelimiters:[]};(function(t){t.REGULAR="indentation-sensitive",t.IGNORE_INDENTATION="ignore-indentation"})(Km||(Km={}));oL=class extends mf{constructor(e=AH){super(),this.indentationStack=[0],this.whitespaceRegExp=/[ \t]+/y,this.options=Object.assign(Object.assign({},AH),e),this.indentTokenType=Cp({name:this.options.indentTokenName,pattern:this.indentMatcher.bind(this),line_breaks:!1}),this.dedentTokenType=Cp({name:this.options.dedentTokenName,pattern:this.dedentMatcher.bind(this),line_breaks:!1})}buildTokens(e,r){let n=super.buildTokens(e,r);if(!rL(n))throw new Error("Invalid tokens built by default builder");let{indentTokenName:i,dedentTokenName:a,whitespaceTokenName:s,ignoreIndentationDelimiters:o}=this.options,l,u,h,f=[];for(let d of n){for(let[p,m]of o)d.name===p?d.PUSH_MODE=Km.IGNORE_INDENTATION:d.name===m&&(d.POP_MODE=!0);d.name===a?l=d:d.name===i?u=d:d.name===s?h=d:f.push(d)}if(!l||!u||!h)throw new Error("Some indentation/whitespace tokens not found!");return o.length>0?{modes:{[Km.REGULAR]:[l,u,...f,h],[Km.IGNORE_INDENTATION]:[...f,h]},defaultMode:Km.REGULAR}:[l,u,h,...f]}flushLexingReport(e){let r=super.flushLexingReport(e);return Object.assign(Object.assign({},r),{remainingDedents:this.flushRemainingDedents(e)})}isStartOfLine(e,r){return r===0||`\r +`.includes(e[r-1])}matchWhitespace(e,r,n,i){var a;this.whitespaceRegExp.lastIndex=r;let s=this.whitespaceRegExp.exec(e);return{currIndentLevel:(a=s?.[0].length)!==null&&a!==void 0?a:0,prevIndentLevel:this.indentationStack.at(-1),match:s}}createIndentationTokenInstance(e,r,n,i){let a=this.getLineNumber(r,i);return hf(e,n,i,i+n.length,a,a,1,n.length)}getLineNumber(e,r){return e.substring(0,r).split(/\r\n|\r|\n/).length}indentMatcher(e,r,n,i){if(!this.isStartOfLine(e,r))return null;let{currIndentLevel:a,prevIndentLevel:s,match:o}=this.matchWhitespace(e,r,n,i);return a<=s?null:(this.indentationStack.push(a),o)}dedentMatcher(e,r,n,i){var a,s,o,l;if(!this.isStartOfLine(e,r))return null;let{currIndentLevel:u,prevIndentLevel:h,match:f}=this.matchWhitespace(e,r,n,i);if(u>=h)return null;let d=this.indentationStack.lastIndexOf(u);if(d===-1)return this.diagnostics.push({severity:"error",message:`Invalid dedent level ${u} at offset: ${r}. Current indentation stack: ${this.indentationStack}`,offset:r,length:(s=(a=f?.[0])===null||a===void 0?void 0:a.length)!==null&&s!==void 0?s:0,line:this.getLineNumber(e,r),column:1}),null;let p=this.indentationStack.length-d-1,m=(l=(o=e.substring(0,r).match(/[\r\n]+$/))===null||o===void 0?void 0:o[0].length)!==null&&l!==void 0?l:1;for(let g=0;g1;)r.push(this.createIndentationTokenInstance(this.dedentTokenType,e,"",e.length)),this.indentationStack.pop();return this.indentationStack=[0],r}},LH=class extends jm{constructor(e){if(super(e),e.parser.TokenBuilder instanceof oL)this.indentationTokenBuilder=e.parser.TokenBuilder;else throw new Error("IndentationAwareLexer requires an accompanying IndentationAwareTokenBuilder")}tokenize(e,r=tL){let n=super.tokenize(e),i=n.report;r?.mode==="full"&&n.tokens.push(...i.remainingDedents),i.remainingDedents=[];let{indentTokenType:a,dedentTokenType:s}=this.indentationTokenBuilder,o=a.tokenTypeIdx,l=s.tokenTypeIdx,u=[],h=n.tokens.length-1;for(let f=0;f=0&&u.push(n.tokens[h]),n.tokens=u,n}}});var REe=D(()=>{});var DEe=D(()=>{kH();IU();FA();LEe();NU();D7();nL();qA();REe();UA();OU()});var IEe=D(()=>{XU();jU();KU();QU();ZU();JU()});var MEe=D(()=>{EH();QA()});var lL,No,RH=D(()=>{lL=class{readFile(){throw new Error("No file system is available.")}async readDirectory(){return[]}},No={fileSystemProvider:()=>new lL}});function O4t(){let t=Ji(Mo(No),N4t),e=Ji(Io({shared:t}),M4t);return t.ServiceRegistry.register(e),e}function gf(t){var e;let r=O4t(),n=r.serializer.JsonSerializer.deserialize(t);return r.shared.workspace.LangiumDocumentFactory.fromModel(n,Ro.parse(`memory://${(e=n.name)!==null&&e!==void 0?e:"grammar"}.langium`)),n}var M4t,N4t,NEe=D(()=>{SH();_H();A0();RH();K0();M4t={Grammar:()=>{},LanguageMetaData:()=>({caseInsensitive:!1,fileExtensions:[".langium"],languageId:"langium"})},N4t={AstReflection:()=>new gv}});var mn={};Mr(mn,{AstUtils:()=>pC,BiMap:()=>Wm,Cancellation:()=>Pr,ContextCache:()=>Ym,CstUtils:()=>iC,DONE_RESULT:()=>Ws,Deferred:()=>Lo,Disposable:()=>Dp,DisposableCache:()=>Qx,DocumentCache:()=>KA,EMPTY_STREAM:()=>n6,ErrorWithLocation:()=>bm,GrammarUtils:()=>xC,MultiMap:()=>kc,OperationCancelled:()=>X0,Reduction:()=>Ry,RegExpUtils:()=>yC,SimpleCache:()=>$7,StreamImpl:()=>Fl,TreeStreamImpl:()=>S0,URI:()=>Ro,UriUtils:()=>Do,WorkspaceCache:()=>Jx,assertUnreachable:()=>_0,delayNextTick:()=>HU,interruptAndCheck:()=>ca,isOperationCancelled:()=>j0,loadGrammarFromJson:()=>gf,setInterruptionPeriod:()=>iEe,startCancelableOperation:()=>XA,stream:()=>An});var OEe=D(()=>{ZA();eL();Wr(mn,Ii);Kx();sH();aC();NEe();Cu();nl();K0();vo();Su();hc();pc();bv()});var PEe=D(()=>{rH();V7()});var BEe=D(()=>{nH();iH();aH();oH();jx();RH();lH();TH();uH()});var Ms={};Mr(Ms,{AbstractAstReflection:()=>gm,AbstractCstNode:()=>_7,AbstractLangiumParser:()=>A7,AbstractParserErrorMessageProvider:()=>$A,AbstractThreadedAsyncParser:()=>bH,AstUtils:()=>pC,BiMap:()=>Wm,Cancellation:()=>Pr,CompositeCstNodeImpl:()=>Um,ContextCache:()=>Ym,CstNodeBuilder:()=>C7,CstUtils:()=>iC,DEFAULT_TOKENIZE_OPTIONS:()=>tL,DONE_RESULT:()=>Ws,DatatypeSymbol:()=>zA,DefaultAstNodeDescriptionProvider:()=>Y7,DefaultAstNodeLocator:()=>j7,DefaultAsyncParser:()=>a8,DefaultCommentProvider:()=>i8,DefaultConfigurationProvider:()=>K7,DefaultDocumentBuilder:()=>Z7,DefaultDocumentValidator:()=>W7,DefaultHydrator:()=>o8,DefaultIndexManager:()=>Q7,DefaultJsonSerializer:()=>q7,DefaultLangiumDocumentFactory:()=>M7,DefaultLangiumDocuments:()=>N7,DefaultLexer:()=>jm,DefaultLexerErrorMessageProvider:()=>e8,DefaultLinker:()=>O7,DefaultNameProvider:()=>P7,DefaultReferenceDescriptionProvider:()=>X7,DefaultReferences:()=>B7,DefaultScopeComputation:()=>F7,DefaultScopeProvider:()=>G7,DefaultServiceRegistry:()=>U7,DefaultTokenBuilder:()=>mf,DefaultValueConverter:()=>Vm,DefaultWorkspaceLock:()=>s8,DefaultWorkspaceManager:()=>J7,Deferred:()=>Lo,Disposable:()=>Dp,DisposableCache:()=>Qx,DocumentCache:()=>KA,DocumentState:()=>ai,DocumentValidator:()=>Au,EMPTY_SCOPE:()=>b4t,EMPTY_STREAM:()=>n6,EmptyFileSystem:()=>No,EmptyFileSystemProvider:()=>lL,ErrorWithLocation:()=>bm,GrammarAST:()=>f6,GrammarUtils:()=>xC,IndentationAwareLexer:()=>LH,IndentationAwareTokenBuilder:()=>oL,JSDocDocumentationProvider:()=>n8,LangiumCompletionParser:()=>R7,LangiumParser:()=>L7,LangiumParserErrorMessageProvider:()=>Hx,LeafCstNodeImpl:()=>qm,LexingMode:()=>Km,MapScope:()=>z7,Module:()=>CH,MultiMap:()=>kc,OperationCancelled:()=>X0,ParserWorker:()=>wH,Reduction:()=>Ry,RegExpUtils:()=>yC,RootCstNodeImpl:()=>Ux,SimpleCache:()=>$7,StreamImpl:()=>Fl,StreamScope:()=>Zx,TextDocument:()=>Yx,TreeStreamImpl:()=>S0,URI:()=>Ro,UriUtils:()=>Do,ValidationCategory:()=>e4,ValidationRegistry:()=>H7,ValueConverter:()=>Y0,WorkspaceCache:()=>Jx,assertUnreachable:()=>_0,createCompletionParser:()=>DU,createDefaultCoreModule:()=>Io,createDefaultSharedCoreModule:()=>Mo,createGrammarConfig:()=>nG,createLangiumParser:()=>MU,createParser:()=>I7,delayNextTick:()=>HU,diagnosticData:()=>Xm,eagerLoad:()=>TEe,getDiagnosticRange:()=>fEe,indentationBuilderDefaultOptions:()=>AH,inject:()=>Ji,interruptAndCheck:()=>ca,isAstNode:()=>qi,isAstNodeDescription:()=>f$,isAstNodeWithComment:()=>eH,isCompositeCstNode:()=>uc,isIMultiModeLexerDefinition:()=>hH,isJSDoc:()=>mH,isLeafCstNode:()=>Ud,isLinkingError:()=>ym,isNamed:()=>cEe,isOperationCancelled:()=>j0,isReference:()=>Is,isRootCstNode:()=>r6,isTokenTypeArray:()=>rL,isTokenTypeDictionary:()=>cH,loadGrammarFromJson:()=>gf,parseJSDoc:()=>pH,prepareLangiumParser:()=>Z9e,setInterruptionPeriod:()=>iEe,startCancelableOperation:()=>XA,stream:()=>An,toDiagnosticData:()=>dEe,toDiagnosticSeverity:()=>JA});var _u=D(()=>{SH();_H();tH();SEe();cc();CEe();AEe();DEe();IEe();MEe();OEe();Wr(Ms,mn);PEe();BEe();A0()});function HEe(t){return Tc.isInstance(t,l8)}function VEe(t){return Tc.isInstance(t,t4)}function WEe(t){return Tc.isInstance(t,r4)}function YEe(t){return Tc.isInstance(t,dL)}function XEe(t){return Tc.isInstance(t,n4)}function jEe(t){return Tc.isInstance(t,u8)}function KEe(t){return Tc.isInstance(t,i4)}function ZEe(t){return Tc.isInstance(t,c8)}function QEe(t){return Tc.isInstance(t,h8)}function JEe(t){return Tc.isInstance(t,f8)}function eSe(t){return Tc.isInstance(t,d8)}var P4t,Yt,FH,l8,uL,t4,cL,hL,r4,dL,DH,IH,MH,n4,NH,u8,OH,i4,PH,c8,h8,f8,d8,pL,BH,fL,a4,tSe,Tc,FEe,B4t,zEe,F4t,$Ee,z4t,GEe,$4t,qEe,G4t,UEe,q4t,U4t,H4t,V4t,W4t,Y4t,X4t,ql,zH,$H,GH,qH,UH,HH,j4t,K4t,Z4t,Q4t,s4,c4,o4,yf,l4,fl,u4,J4t,dl=D(()=>{_u();_u();_u();_u();P4t=Object.defineProperty,Yt=(t,e)=>P4t(t,"name",{value:e,configurable:!0}),FH="Statement",l8="Architecture";Yt(HEe,"isArchitecture");uL="Axis",t4="Branch";Yt(VEe,"isBranch");cL="Checkout",hL="CherryPicking",r4="Commit";Yt(WEe,"isCommit");dL="Common";Yt(YEe,"isCommon");DH="Curve",IH="Edge",MH="Entry",n4="GitGraph";Yt(XEe,"isGitGraph");NH="Group",u8="Info";Yt(jEe,"isInfo");OH="Junction",i4="Merge";Yt(KEe,"isMerge");PH="Option",c8="Packet";Yt(ZEe,"isPacket");h8="PacketBlock";Yt(QEe,"isPacketBlock");f8="Pie";Yt(JEe,"isPie");d8="PieSection";Yt(eSe,"isPieSection");pL="Radar",BH="Service",fL="Direction",tSe=(a4=class extends gm{getAllTypes(){return[l8,uL,t4,cL,hL,r4,dL,DH,fL,IH,MH,n4,NH,u8,OH,i4,PH,c8,h8,f8,d8,pL,BH,FH]}computeIsSubtype(e,r){switch(e){case t4:case cL:case hL:case r4:case i4:return this.isSubtype(FH,r);case fL:return this.isSubtype(n4,r);default:return!1}}getReferenceType(e){let r=`${e.container.$type}:${e.property}`;switch(r){case"Entry:axis":return uL;default:throw new Error(`${r} is not a valid reference id.`)}}getTypeMetaData(e){switch(e){case l8:return{name:l8,properties:[{name:"accDescr"},{name:"accTitle"},{name:"edges",defaultValue:[]},{name:"groups",defaultValue:[]},{name:"junctions",defaultValue:[]},{name:"services",defaultValue:[]},{name:"title"}]};case uL:return{name:uL,properties:[{name:"label"},{name:"name"}]};case t4:return{name:t4,properties:[{name:"name"},{name:"order"}]};case cL:return{name:cL,properties:[{name:"branch"}]};case hL:return{name:hL,properties:[{name:"id"},{name:"parent"},{name:"tags",defaultValue:[]}]};case r4:return{name:r4,properties:[{name:"id"},{name:"message"},{name:"tags",defaultValue:[]},{name:"type"}]};case dL:return{name:dL,properties:[{name:"accDescr"},{name:"accTitle"},{name:"title"}]};case DH:return{name:DH,properties:[{name:"entries",defaultValue:[]},{name:"label"},{name:"name"}]};case IH:return{name:IH,properties:[{name:"lhsDir"},{name:"lhsGroup",defaultValue:!1},{name:"lhsId"},{name:"lhsInto",defaultValue:!1},{name:"rhsDir"},{name:"rhsGroup",defaultValue:!1},{name:"rhsId"},{name:"rhsInto",defaultValue:!1},{name:"title"}]};case MH:return{name:MH,properties:[{name:"axis"},{name:"value"}]};case n4:return{name:n4,properties:[{name:"accDescr"},{name:"accTitle"},{name:"statements",defaultValue:[]},{name:"title"}]};case NH:return{name:NH,properties:[{name:"icon"},{name:"id"},{name:"in"},{name:"title"}]};case u8:return{name:u8,properties:[{name:"accDescr"},{name:"accTitle"},{name:"title"}]};case OH:return{name:OH,properties:[{name:"id"},{name:"in"}]};case i4:return{name:i4,properties:[{name:"branch"},{name:"id"},{name:"tags",defaultValue:[]},{name:"type"}]};case PH:return{name:PH,properties:[{name:"name"},{name:"value",defaultValue:!1}]};case c8:return{name:c8,properties:[{name:"accDescr"},{name:"accTitle"},{name:"blocks",defaultValue:[]},{name:"title"}]};case h8:return{name:h8,properties:[{name:"end"},{name:"label"},{name:"start"}]};case f8:return{name:f8,properties:[{name:"accDescr"},{name:"accTitle"},{name:"sections",defaultValue:[]},{name:"showData",defaultValue:!1},{name:"title"}]};case d8:return{name:d8,properties:[{name:"label"},{name:"value"}]};case pL:return{name:pL,properties:[{name:"accDescr"},{name:"accTitle"},{name:"axes",defaultValue:[]},{name:"curves",defaultValue:[]},{name:"options",defaultValue:[]},{name:"title"}]};case BH:return{name:BH,properties:[{name:"icon"},{name:"iconText"},{name:"id"},{name:"in"},{name:"title"}]};case fL:return{name:fL,properties:[{name:"accDescr"},{name:"accTitle"},{name:"dir"},{name:"statements",defaultValue:[]},{name:"title"}]};default:return{name:e,properties:[]}}}},Yt(a4,"MermaidAstReflection"),a4),Tc=new tSe,B4t=Yt(()=>FEe??(FEe=gf('{"$type":"Grammar","isDeclared":true,"name":"Info","imports":[],"rules":[{"$type":"ParserRule","entry":true,"name":"Info","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[],"cardinality":"*"},{"$type":"Keyword","value":"info"},{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[],"cardinality":"*"},{"$type":"Group","elements":[{"$type":"Keyword","value":"showInfo"},{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[],"cardinality":"*"}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[],"cardinality":"?"}]},"definesHiddenTokens":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","fragment":true,"name":"TitleAndAccessibilities","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}],"cardinality":"+"},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","fragment":true,"name":"EOL","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/"},"fragment":false}],"definesHiddenTokens":false,"hiddenTokens":[],"interfaces":[{"$type":"Interface","name":"Common","attributes":[{"$type":"TypeAttribute","name":"accDescr","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"accTitle","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"title","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}}],"superTypes":[]}],"types":[],"usedGrammars":[]}')),"InfoGrammar"),F4t=Yt(()=>zEe??(zEe=gf(`{"$type":"Grammar","isDeclared":true,"name":"Packet","imports":[],"rules":[{"$type":"ParserRule","entry":true,"name":"Packet","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[],"cardinality":"*"},{"$type":"Keyword","value":"packet-beta"},{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]},{"$type":"Assignment","feature":"blocks","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]},"cardinality":"*"}]},{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[],"cardinality":"+"},{"$type":"Assignment","feature":"blocks","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]},"cardinality":"+"}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[],"cardinality":"*"}]}]},"definesHiddenTokens":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"PacketBlock","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"start","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":"-"},{"$type":"Assignment","feature":"end","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}}],"cardinality":"?"},{"$type":"Keyword","value":":"},{"$type":"Assignment","feature":"label","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"TerminalRule","name":"INT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/0|[1-9][0-9]*/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRING","definition":{"$type":"RegexToken","regex":"/\\"[^\\"]*\\"|'[^']*'/"},"fragment":false,"hidden":false},{"$type":"ParserRule","fragment":true,"name":"TitleAndAccessibilities","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}],"cardinality":"+"},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","fragment":true,"name":"EOL","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/"},"fragment":false}],"definesHiddenTokens":false,"hiddenTokens":[],"interfaces":[{"$type":"Interface","name":"Common","attributes":[{"$type":"TypeAttribute","name":"accDescr","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"accTitle","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"title","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}}],"superTypes":[]}],"types":[],"usedGrammars":[]}`)),"PacketGrammar"),z4t=Yt(()=>$Ee??($Ee=gf('{"$type":"Grammar","isDeclared":true,"name":"Pie","imports":[],"rules":[{"$type":"ParserRule","entry":true,"name":"Pie","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[],"cardinality":"*"},{"$type":"Keyword","value":"pie"},{"$type":"Assignment","feature":"showData","operator":"?=","terminal":{"$type":"Keyword","value":"showData"},"cardinality":"?"},{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]},{"$type":"Assignment","feature":"sections","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]},"cardinality":"*"}]},{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[],"cardinality":"+"},{"$type":"Assignment","feature":"sections","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]},"cardinality":"+"}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[],"cardinality":"*"}]}]},"definesHiddenTokens":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"PieSection","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"label","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}},{"$type":"Keyword","value":":"},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"TerminalRule","name":"PIE_SECTION_LABEL","definition":{"$type":"RegexToken","regex":"/\\"[^\\"]+\\"/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"PIE_SECTION_VALUE","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/(0|[1-9][0-9]*)(\\\\.[0-9]+)?/"},"fragment":false,"hidden":false},{"$type":"ParserRule","fragment":true,"name":"TitleAndAccessibilities","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}],"cardinality":"+"},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","fragment":true,"name":"EOL","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/"},"fragment":false}],"definesHiddenTokens":false,"hiddenTokens":[],"interfaces":[{"$type":"Interface","name":"Common","attributes":[{"$type":"TypeAttribute","name":"accDescr","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"accTitle","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"title","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}}],"superTypes":[]}],"types":[],"usedGrammars":[]}')),"PieGrammar"),$4t=Yt(()=>GEe??(GEe=gf('{"$type":"Grammar","isDeclared":true,"name":"Architecture","imports":[],"rules":[{"$type":"ParserRule","entry":true,"name":"Architecture","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@18"},"arguments":[],"cardinality":"*"},{"$type":"Keyword","value":"architecture-beta"},{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@18"},"arguments":[],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]}]},{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@18"},"arguments":[],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[],"cardinality":"*"}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@18"},"arguments":[],"cardinality":"*"}]}]},"definesHiddenTokens":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","fragment":true,"name":"Statement","definition":{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"groups","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}},{"$type":"Assignment","feature":"services","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]}},{"$type":"Assignment","feature":"junctions","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]}},{"$type":"Assignment","feature":"edges","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}}]},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","fragment":true,"name":"LeftPort","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":":"},{"$type":"Assignment","feature":"lhsDir","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}}]},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","fragment":true,"name":"RightPort","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"rhsDir","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}},{"$type":"Keyword","value":":"}]},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","fragment":true,"name":"Arrow","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]},{"$type":"Assignment","feature":"lhsInto","operator":"?=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]},"cardinality":"?"},{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"--"},{"$type":"Group","elements":[{"$type":"Keyword","value":"-"},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]}},{"$type":"Keyword","value":"-"}]}]},{"$type":"Assignment","feature":"rhsInto","operator":"?=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]},"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Group","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"group"},{"$type":"Assignment","feature":"id","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]}},{"$type":"Assignment","feature":"icon","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]},"cardinality":"?"},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]},"cardinality":"?"},{"$type":"Group","elements":[{"$type":"Keyword","value":"in"},{"$type":"Assignment","feature":"in","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]}}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Service","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"service"},{"$type":"Assignment","feature":"id","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]}},{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"iconText","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[]}},{"$type":"Assignment","feature":"icon","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}}],"cardinality":"?"},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]},"cardinality":"?"},{"$type":"Group","elements":[{"$type":"Keyword","value":"in"},{"$type":"Assignment","feature":"in","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]}}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Junction","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"junction"},{"$type":"Assignment","feature":"id","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":"in"},{"$type":"Assignment","feature":"in","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]}}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Edge","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"lhsId","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]}},{"$type":"Assignment","feature":"lhsGroup","operator":"?=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]},"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]},{"$type":"Assignment","feature":"rhsId","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]}},{"$type":"Assignment","feature":"rhsGroup","operator":"?=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]},"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"TerminalRule","name":"ARROW_DIRECTION","definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"L"}},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"R"}}]},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"T"}}]},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"B"}}]},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ARCH_ID","definition":{"$type":"RegexToken","regex":"/[\\\\w]+/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ARCH_TEXT_ICON","definition":{"$type":"RegexToken","regex":"/\\\\(\\"[^\\"]+\\"\\\\)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ARCH_ICON","definition":{"$type":"RegexToken","regex":"/\\\\([\\\\w-:]+\\\\)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ARCH_TITLE","definition":{"$type":"RegexToken","regex":"/\\\\[[\\\\w ]+\\\\]/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ARROW_GROUP","definition":{"$type":"RegexToken","regex":"/\\\\{group\\\\}/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ARROW_INTO","definition":{"$type":"RegexToken","regex":"/<|>/"},"fragment":false,"hidden":false},{"$type":"ParserRule","fragment":true,"name":"TitleAndAccessibilities","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@21"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}],"cardinality":"+"},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","fragment":true,"name":"EOL","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@18"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/"},"fragment":false}],"definesHiddenTokens":false,"hiddenTokens":[],"interfaces":[{"$type":"Interface","name":"Common","attributes":[{"$type":"TypeAttribute","name":"accDescr","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"accTitle","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"title","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}}],"superTypes":[]}],"types":[],"usedGrammars":[]}')),"ArchitectureGrammar"),G4t=Yt(()=>qEe??(qEe=gf(`{"$type":"Grammar","isDeclared":true,"name":"GitGraph","interfaces":[{"$type":"Interface","name":"Common","attributes":[{"$type":"TypeAttribute","name":"accDescr","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"accTitle","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"title","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}}],"superTypes":[]}],"rules":[{"$type":"ParserRule","fragment":true,"name":"TitleAndAccessibilities","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}],"cardinality":"+"},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","fragment":true,"name":"EOL","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/"},"fragment":false},{"$type":"ParserRule","entry":true,"name":"GitGraph","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[],"cardinality":"*"},{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"gitGraph"},{"$type":"Group","elements":[{"$type":"Keyword","value":"gitGraph"},{"$type":"Keyword","value":":"}]},{"$type":"Keyword","value":"gitGraph:"},{"$type":"Group","elements":[{"$type":"Keyword","value":"gitGraph"},{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]},{"$type":"Keyword","value":":"}]}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[],"cardinality":"*"},{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[],"cardinality":"*"},{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@0"},"arguments":[]},{"$type":"Assignment","feature":"statements","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}],"cardinality":"*"}]}]},"definesHiddenTokens":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Statement","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Direction","definition":{"$type":"Assignment","feature":"dir","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"LR"},{"$type":"Keyword","value":"TB"},{"$type":"Keyword","value":"BT"}]}},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Commit","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"commit"},{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"Keyword","value":"id:"},{"$type":"Assignment","feature":"id","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"msg:","cardinality":"?"},{"$type":"Assignment","feature":"message","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"tag:"},{"$type":"Assignment","feature":"tags","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"type:"},{"$type":"Assignment","feature":"type","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"NORMAL"},{"$type":"Keyword","value":"REVERSE"},{"$type":"Keyword","value":"HIGHLIGHT"}]}}]}],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Branch","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"branch"},{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}]}},{"$type":"Group","elements":[{"$type":"Keyword","value":"order:"},{"$type":"Assignment","feature":"order","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@18"},"arguments":[]}}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Merge","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"merge"},{"$type":"Assignment","feature":"branch","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}]}},{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"Keyword","value":"id:"},{"$type":"Assignment","feature":"id","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"tag:"},{"$type":"Assignment","feature":"tags","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"type:"},{"$type":"Assignment","feature":"type","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"NORMAL"},{"$type":"Keyword","value":"REVERSE"},{"$type":"Keyword","value":"HIGHLIGHT"}]}}]}],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Checkout","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"checkout"},{"$type":"Keyword","value":"switch"}]},{"$type":"Assignment","feature":"branch","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"CherryPicking","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"cherry-pick"},{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"Keyword","value":"id:"},{"$type":"Assignment","feature":"id","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"tag:"},{"$type":"Assignment","feature":"tags","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"parent:"},{"$type":"Assignment","feature":"parent","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}}]}],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"TerminalRule","name":"INT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/[0-9]+(?=\\\\s)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ID","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\\\w([-\\\\./\\\\w]*[-\\\\w])?/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRING","definition":{"$type":"RegexToken","regex":"/\\"[^\\"]*\\"|'[^']*'/"},"fragment":false,"hidden":false}],"definesHiddenTokens":false,"hiddenTokens":[],"imports":[],"types":[],"usedGrammars":[]}`)),"GitGraphGrammar"),q4t=Yt(()=>UEe??(UEe=gf(`{"$type":"Grammar","isDeclared":true,"name":"Radar","interfaces":[{"$type":"Interface","name":"Common","attributes":[{"$type":"TypeAttribute","name":"accDescr","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"accTitle","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"title","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}}],"superTypes":[]},{"$type":"Interface","name":"Entry","attributes":[{"$type":"TypeAttribute","name":"axis","isOptional":true,"type":{"$type":"ReferenceType","referenceType":{"$type":"SimpleType","typeRef":{"$ref":"#/rules@12"}}}},{"$type":"TypeAttribute","name":"value","type":{"$type":"SimpleType","primitiveType":"number"},"isOptional":false}],"superTypes":[]}],"rules":[{"$type":"ParserRule","fragment":true,"name":"TitleAndAccessibilities","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}],"cardinality":"+"},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","fragment":true,"name":"EOL","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/"},"fragment":false},{"$type":"ParserRule","entry":true,"name":"Radar","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[],"cardinality":"*"},{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"radar-beta"},{"$type":"Keyword","value":"radar-beta:"},{"$type":"Group","elements":[{"$type":"Keyword","value":"radar-beta"},{"$type":"Keyword","value":":"}]}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[],"cardinality":"*"},{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@0"},"arguments":[]},{"$type":"Group","elements":[{"$type":"Keyword","value":"axis"},{"$type":"Assignment","feature":"axes","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"axes","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}}],"cardinality":"*"}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"curve"},{"$type":"Assignment","feature":"curves","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"curves","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]}}],"cardinality":"*"}]},{"$type":"Group","elements":[{"$type":"Assignment","feature":"options","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"options","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}],"cardinality":"*"}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}],"cardinality":"*"}]},"definesHiddenTokens":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","fragment":true,"name":"Label","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"["},{"$type":"Assignment","feature":"label","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]}},{"$type":"Keyword","value":"]"}]},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Axis","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@21"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[],"cardinality":"?"}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Curve","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@21"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[],"cardinality":"?"},{"$type":"Keyword","value":"{"},{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]},{"$type":"Keyword","value":"}"}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","fragment":true,"name":"Entries","definition":{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[],"cardinality":"*"},{"$type":"Assignment","feature":"entries","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":","},{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[],"cardinality":"*"},{"$type":"Assignment","feature":"entries","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]}}],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[],"cardinality":"*"}]},{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[],"cardinality":"*"},{"$type":"Assignment","feature":"entries","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":","},{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[],"cardinality":"*"},{"$type":"Assignment","feature":"entries","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]}}],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[],"cardinality":"*"}]}]},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"DetailedEntry","returnType":{"$ref":"#/interfaces@1"},"definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"axis","operator":"=","terminal":{"$type":"CrossReference","type":{"$ref":"#/rules@12"},"terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@21"},"arguments":[]},"deprecatedSyntax":false}},{"$type":"Keyword","value":":","cardinality":"?"},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@18"},"arguments":[]}}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"NumberEntry","returnType":{"$ref":"#/interfaces@1"},"definition":{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@18"},"arguments":[]}},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Option","definition":{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Keyword","value":"showLegend"}},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Keyword","value":"ticks"}},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@18"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Keyword","value":"max"}},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@18"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Keyword","value":"min"}},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@18"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Keyword","value":"graticule"}},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}}]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"TerminalRule","name":"NUMBER","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/(0|[1-9][0-9]*)(\\\\.[0-9]+)?/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"BOOLEAN","type":{"$type":"ReturnType","name":"boolean"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"true"}},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"false"}}]},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"GRATICULE","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"circle"}},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"polygon"}}]},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ID","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[a-zA-Z_][a-zA-Z0-9\\\\-_]*/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRING","definition":{"$type":"RegexToken","regex":"/\\"[^\\"]*\\"|'[^']*'/"},"fragment":false,"hidden":false}],"definesHiddenTokens":false,"hiddenTokens":[],"imports":[],"types":[],"usedGrammars":[]}`)),"RadarGrammar"),U4t={languageId:"info",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},H4t={languageId:"packet",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},V4t={languageId:"pie",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},W4t={languageId:"architecture",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},Y4t={languageId:"gitGraph",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},X4t={languageId:"radar",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},ql={AstReflection:Yt(()=>new tSe,"AstReflection")},zH={Grammar:Yt(()=>B4t(),"Grammar"),LanguageMetaData:Yt(()=>U4t,"LanguageMetaData"),parser:{}},$H={Grammar:Yt(()=>F4t(),"Grammar"),LanguageMetaData:Yt(()=>H4t,"LanguageMetaData"),parser:{}},GH={Grammar:Yt(()=>z4t(),"Grammar"),LanguageMetaData:Yt(()=>V4t,"LanguageMetaData"),parser:{}},qH={Grammar:Yt(()=>$4t(),"Grammar"),LanguageMetaData:Yt(()=>W4t,"LanguageMetaData"),parser:{}},UH={Grammar:Yt(()=>G4t(),"Grammar"),LanguageMetaData:Yt(()=>Y4t,"LanguageMetaData"),parser:{}},HH={Grammar:Yt(()=>q4t(),"Grammar"),LanguageMetaData:Yt(()=>X4t,"LanguageMetaData"),parser:{}},j4t=/accDescr(?:[\t ]*:([^\n\r]*)|\s*{([^}]*)})/,K4t=/accTitle[\t ]*:([^\n\r]*)/,Z4t=/title([\t ][^\n\r]*|)/,Q4t={ACC_DESCR:j4t,ACC_TITLE:K4t,TITLE:Z4t},c4=(s4=class extends Vm{runConverter(e,r,n){let i=this.runCommonConverter(e,r,n);return i===void 0&&(i=this.runCustomConverter(e,r,n)),i===void 0?super.runConverter(e,r,n):i}runCommonConverter(e,r,n){let i=Q4t[e.name];if(i===void 0)return;let a=i.exec(r);if(a!==null){if(a[1]!==void 0)return a[1].trim().replace(/[\t ]{2,}/gm," ");if(a[2]!==void 0)return a[2].replace(/^\s*/gm,"").replace(/\s+$/gm,"").replace(/[\t ]{2,}/gm," ").replace(/[\n\r]{2,}/gm,` +`)}}},Yt(s4,"AbstractMermaidValueConverter"),s4),yf=(o4=class extends c4{runCustomConverter(e,r,n){}},Yt(o4,"CommonValueConverter"),o4),fl=(l4=class extends mf{constructor(e){super(),this.keywords=new Set(e)}buildKeywordTokens(e,r,n){let i=super.buildKeywordTokens(e,r,n);return i.forEach(a=>{this.keywords.has(a.name)&&a.PATTERN!==void 0&&(a.PATTERN=new RegExp(a.PATTERN.toString()+"(?:(?=%%)|(?!\\S))"))}),i}},Yt(l4,"AbstractMermaidTokenBuilder"),l4),J4t=(u4=class extends fl{},Yt(u4,"CommonTokenBuilder"),u4)});function gL(t=No){let e=Ji(Mo(t),ql),r=Ji(Io({shared:e}),UH,mL);return e.ServiceRegistry.register(r),{shared:e,GitGraph:r}}var h4,ebt,mL,VH=D(()=>{dl();_u();ebt=(h4=class extends fl{constructor(){super(["gitGraph"])}},Yt(h4,"GitGraphTokenBuilder"),h4),mL={parser:{TokenBuilder:Yt(()=>new ebt,"TokenBuilder"),ValueConverter:Yt(()=>new yf,"ValueConverter")}};Yt(gL,"createGitGraphServices")});function vL(t=No){let e=Ji(Mo(t),ql),r=Ji(Io({shared:e}),zH,yL);return e.ServiceRegistry.register(r),{shared:e,Info:r}}var f4,tbt,yL,WH=D(()=>{dl();_u();tbt=(f4=class extends fl{constructor(){super(["info","showInfo"])}},Yt(f4,"InfoTokenBuilder"),f4),yL={parser:{TokenBuilder:Yt(()=>new tbt,"TokenBuilder"),ValueConverter:Yt(()=>new yf,"ValueConverter")}};Yt(vL,"createInfoServices")});function bL(t=No){let e=Ji(Mo(t),ql),r=Ji(Io({shared:e}),$H,xL);return e.ServiceRegistry.register(r),{shared:e,Packet:r}}var d4,rbt,xL,YH=D(()=>{dl();_u();rbt=(d4=class extends fl{constructor(){super(["packet-beta"])}},Yt(d4,"PacketTokenBuilder"),d4),xL={parser:{TokenBuilder:Yt(()=>new rbt,"TokenBuilder"),ValueConverter:Yt(()=>new yf,"ValueConverter")}};Yt(bL,"createPacketServices")});function kL(t=No){let e=Ji(Mo(t),ql),r=Ji(Io({shared:e}),GH,wL);return e.ServiceRegistry.register(r),{shared:e,Pie:r}}var p4,nbt,m4,ibt,wL,XH=D(()=>{dl();_u();nbt=(p4=class extends fl{constructor(){super(["pie","showData"])}},Yt(p4,"PieTokenBuilder"),p4),ibt=(m4=class extends c4{runCustomConverter(e,r,n){if(e.name==="PIE_SECTION_LABEL")return r.replace(/"/g,"").trim()}},Yt(m4,"PieValueConverter"),m4),wL={parser:{TokenBuilder:Yt(()=>new nbt,"TokenBuilder"),ValueConverter:Yt(()=>new ibt,"ValueConverter")}};Yt(kL,"createPieServices")});function EL(t=No){let e=Ji(Mo(t),ql),r=Ji(Io({shared:e}),qH,TL);return e.ServiceRegistry.register(r),{shared:e,Architecture:r}}var g4,abt,y4,sbt,TL,jH=D(()=>{dl();_u();abt=(g4=class extends fl{constructor(){super(["architecture"])}},Yt(g4,"ArchitectureTokenBuilder"),g4),sbt=(y4=class extends c4{runCustomConverter(e,r,n){if(e.name==="ARCH_ICON")return r.replace(/[()]/g,"").trim();if(e.name==="ARCH_TEXT_ICON")return r.replace(/["()]/g,"");if(e.name==="ARCH_TITLE")return r.replace(/[[\]]/g,"").trim()}},Yt(y4,"ArchitectureValueConverter"),y4),TL={parser:{TokenBuilder:Yt(()=>new abt,"TokenBuilder"),ValueConverter:Yt(()=>new sbt,"ValueConverter")}};Yt(EL,"createArchitectureServices")});function CL(t=No){let e=Ji(Mo(t),ql),r=Ji(Io({shared:e}),HH,SL);return e.ServiceRegistry.register(r),{shared:e,Radar:r}}var v4,obt,SL,KH=D(()=>{dl();_u();obt=(v4=class extends fl{constructor(){super(["radar-beta"])}},Yt(v4,"RadarTokenBuilder"),v4),SL={parser:{TokenBuilder:Yt(()=>new obt,"TokenBuilder"),ValueConverter:Yt(()=>new yf,"ValueConverter")}};Yt(CL,"createRadarServices")});var rSe={};Mr(rSe,{InfoModule:()=>yL,createInfoServices:()=>vL});var nSe=D(()=>{WH();dl()});var iSe={};Mr(iSe,{PacketModule:()=>xL,createPacketServices:()=>bL});var aSe=D(()=>{YH();dl()});var sSe={};Mr(sSe,{PieModule:()=>wL,createPieServices:()=>kL});var oSe=D(()=>{XH();dl()});var lSe={};Mr(lSe,{ArchitectureModule:()=>TL,createArchitectureServices:()=>EL});var uSe=D(()=>{jH();dl()});var cSe={};Mr(cSe,{GitGraphModule:()=>mL,createGitGraphServices:()=>gL});var hSe=D(()=>{VH();dl()});var fSe={};Mr(fSe,{RadarModule:()=>SL,createRadarServices:()=>CL});var dSe=D(()=>{KH();dl()});async function Ul(t,e){let r=lbt[t];if(!r)throw new Error(`Unknown diagram type: ${t}`);Ip[t]||await r();let i=Ip[t].parse(e);if(i.lexerErrors.length>0||i.parserErrors.length>0)throw new ubt(i);return i.value}var Ip,lbt,x4,ubt,Zm=D(()=>{VH();WH();YH();XH();jH();KH();dl();Ip={},lbt={info:Yt(async()=>{let{createInfoServices:t}=await Promise.resolve().then(()=>(nSe(),rSe)),e=t().Info.parser.LangiumParser;Ip.info=e},"info"),packet:Yt(async()=>{let{createPacketServices:t}=await Promise.resolve().then(()=>(aSe(),iSe)),e=t().Packet.parser.LangiumParser;Ip.packet=e},"packet"),pie:Yt(async()=>{let{createPieServices:t}=await Promise.resolve().then(()=>(oSe(),sSe)),e=t().Pie.parser.LangiumParser;Ip.pie=e},"pie"),architecture:Yt(async()=>{let{createArchitectureServices:t}=await Promise.resolve().then(()=>(uSe(),lSe)),e=t().Architecture.parser.LangiumParser;Ip.architecture=e},"architecture"),gitGraph:Yt(async()=>{let{createGitGraphServices:t}=await Promise.resolve().then(()=>(hSe(),cSe)),e=t().GitGraph.parser.LangiumParser;Ip.gitGraph=e},"gitGraph"),radar:Yt(async()=>{let{createRadarServices:t}=await Promise.resolve().then(()=>(dSe(),fSe)),e=t().Radar.parser.LangiumParser;Ip.radar=e},"radar")};Yt(Ul,"parse");ubt=(x4=class extends Error{constructor(e){let r=e.lexerErrors.map(i=>i.message).join(` +`),n=e.parserErrors.map(i=>i.message).join(` +`);super(`Parsing failed: ${r} ${n}`),this.result=e}},Yt(x4,"MermaidParseError"),x4)});var wSe={};Mr(wSe,{diagram:()=>n3t});function LL(){return JB({length:7})}function mSe(t,e){let r=Object.create(null);return t.reduce((n,i)=>{let a=e(i);return r[a]||(r[a]=!0,n.push(i)),n},[])}function ZH(t,e,r){let n=t.indexOf(e);n===-1?t.push(r):t.splice(n,1,r)}function QH(t){let e=t.reduce((i,a)=>i.seq>a.seq?i:a,t[0]),r="";t.forEach(function(i){i===e?r+=" *":r+=" |"});let n=[r,e.id,e.seq];for(let i in Vt.records.branches)Vt.records.branches.get(i)===e.id&&n.push(i);if(he.debug(n.join(" ")),e.parents&&e.parents.length==2&&e.parents[0]&&e.parents[1]){let i=Vt.records.commits.get(e.parents[0]);ZH(t,e,i),e.parents[1]&&t.push(Vt.records.commits.get(e.parents[1]))}else{if(e.parents.length==0)return;if(e.parents[0]){let i=Vt.records.commits.get(e.parents[0]);ZH(t,e,i)}}t=mSe(t,i=>i.id),QH(t)}var $n,cbt,Jm,Vt,hbt,fbt,dbt,pbt,mbt,gbt,ybt,gSe,vbt,xbt,bbt,wbt,kbt,ySe,Tbt,Ebt,Sbt,vSe,Cbt,_bt,Abt,Lbt,Rbt,Dbt,Ibt,Mbt,Nbt,Lu,Np,Op,Z0,vf,Qm,pl,ml,_L,p8,AL,Mp,ln,Obt,xSe,bSe,Pbt,Bbt,Fbt,zbt,$bt,Gbt,qbt,Ubt,Hbt,Vbt,Wbt,Ybt,pSe,Xbt,m8,jbt,Kbt,Zbt,Qbt,Jbt,e3t,t3t,r3t,n3t,kSe=D(()=>{_y();tC();Hn();Nr();Zm();Or();$n={NORMAL:0,REVERSE:1,HIGHLIGHT:2,MERGE:3,CHERRY_PICK:4},cbt=Ir.gitGraph,Jm=b(()=>ls({...cbt,...Yr().gitGraph}),"getConfig"),Vt=new Ly(()=>{let t=Jm(),e=t.mainBranchName,r=t.mainBranchOrder;return{mainBranchName:e,commits:new Map,head:null,branchConfig:new Map([[e,{name:e,order:r}]]),branches:new Map([[e,null]]),currBranch:e,direction:"LR",seq:0,options:{}}});b(LL,"getID");b(mSe,"uniqBy");hbt=b(function(t){Vt.records.direction=t},"setDirection"),fbt=b(function(t){he.debug("options str",t),t=t?.trim(),t=t||"{}";try{Vt.records.options=JSON.parse(t)}catch(e){he.error("error while parsing gitGraph options",e.message)}},"setOptions"),dbt=b(function(){return Vt.records.options},"getOptions"),pbt=b(function(t){let e=t.msg,r=t.id,n=t.type,i=t.tags;he.info("commit",e,r,n,i),he.debug("Entering commit:",e,r,n,i);let a=Jm();r=St.sanitizeText(r,a),e=St.sanitizeText(e,a),i=i?.map(o=>St.sanitizeText(o,a));let s={id:r||Vt.records.seq+"-"+LL(),message:e,seq:Vt.records.seq++,type:n??$n.NORMAL,tags:i??[],parents:Vt.records.head==null?[]:[Vt.records.head.id],branch:Vt.records.currBranch};Vt.records.head=s,he.info("main branch",a.mainBranchName),Vt.records.commits.set(s.id,s),Vt.records.branches.set(Vt.records.currBranch,s.id),he.debug("in pushCommit "+s.id)},"commit"),mbt=b(function(t){let e=t.name,r=t.order;if(e=St.sanitizeText(e,Jm()),Vt.records.branches.has(e))throw new Error(`Trying to create an existing branch. (Help: Either use a new name if you want create a new branch or try using "checkout ${e}")`);Vt.records.branches.set(e,Vt.records.head!=null?Vt.records.head.id:null),Vt.records.branchConfig.set(e,{name:e,order:r}),gSe(e),he.debug("in createBranch")},"branch"),gbt=b(t=>{let e=t.branch,r=t.id,n=t.type,i=t.tags,a=Jm();e=St.sanitizeText(e,a),r&&(r=St.sanitizeText(r,a));let s=Vt.records.branches.get(Vt.records.currBranch),o=Vt.records.branches.get(e),l=s?Vt.records.commits.get(s):void 0,u=o?Vt.records.commits.get(o):void 0;if(l&&u&&l.branch===e)throw new Error(`Cannot merge branch '${e}' into itself.`);if(Vt.records.currBranch===e){let d=new Error('Incorrect usage of "merge". Cannot merge a branch to itself');throw d.hash={text:`merge ${e}`,token:`merge ${e}`,expected:["branch abc"]},d}if(l===void 0||!l){let d=new Error(`Incorrect usage of "merge". Current branch (${Vt.records.currBranch})has no commits`);throw d.hash={text:`merge ${e}`,token:`merge ${e}`,expected:["commit"]},d}if(!Vt.records.branches.has(e)){let d=new Error('Incorrect usage of "merge". Branch to be merged ('+e+") does not exist");throw d.hash={text:`merge ${e}`,token:`merge ${e}`,expected:[`branch ${e}`]},d}if(u===void 0||!u){let d=new Error('Incorrect usage of "merge". Branch to be merged ('+e+") has no commits");throw d.hash={text:`merge ${e}`,token:`merge ${e}`,expected:['"commit"']},d}if(l===u){let d=new Error('Incorrect usage of "merge". Both branches have same head');throw d.hash={text:`merge ${e}`,token:`merge ${e}`,expected:["branch abc"]},d}if(r&&Vt.records.commits.has(r)){let d=new Error('Incorrect usage of "merge". Commit with id:'+r+" already exists, use different custom Id");throw d.hash={text:`merge ${e} ${r} ${n} ${i?.join(" ")}`,token:`merge ${e} ${r} ${n} ${i?.join(" ")}`,expected:[`merge ${e} ${r}_UNIQUE ${n} ${i?.join(" ")}`]},d}let h=o||"",f={id:r||`${Vt.records.seq}-${LL()}`,message:`merged branch ${e} into ${Vt.records.currBranch}`,seq:Vt.records.seq++,parents:Vt.records.head==null?[]:[Vt.records.head.id,h],branch:Vt.records.currBranch,type:$n.MERGE,customType:n,customId:!!r,tags:i??[]};Vt.records.head=f,Vt.records.commits.set(f.id,f),Vt.records.branches.set(Vt.records.currBranch,f.id),he.debug(Vt.records.branches),he.debug("in mergeBranch")},"merge"),ybt=b(function(t){let e=t.id,r=t.targetId,n=t.tags,i=t.parent;he.debug("Entering cherryPick:",e,r,n);let a=Jm();if(e=St.sanitizeText(e,a),r=St.sanitizeText(r,a),n=n?.map(l=>St.sanitizeText(l,a)),i=St.sanitizeText(i,a),!e||!Vt.records.commits.has(e)){let l=new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');throw l.hash={text:`cherryPick ${e} ${r}`,token:`cherryPick ${e} ${r}`,expected:["cherry-pick abc"]},l}let s=Vt.records.commits.get(e);if(s===void 0||!s)throw new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');if(i&&!(Array.isArray(s.parents)&&s.parents.includes(i)))throw new Error("Invalid operation: The specified parent commit is not an immediate parent of the cherry-picked commit.");let o=s.branch;if(s.type===$n.MERGE&&!i)throw new Error("Incorrect usage of cherry-pick: If the source commit is a merge commit, an immediate parent commit must be specified.");if(!r||!Vt.records.commits.has(r)){if(o===Vt.records.currBranch){let f=new Error('Incorrect usage of "cherryPick". Source commit is already on current branch');throw f.hash={text:`cherryPick ${e} ${r}`,token:`cherryPick ${e} ${r}`,expected:["cherry-pick abc"]},f}let l=Vt.records.branches.get(Vt.records.currBranch);if(l===void 0||!l){let f=new Error(`Incorrect usage of "cherry-pick". Current branch (${Vt.records.currBranch})has no commits`);throw f.hash={text:`cherryPick ${e} ${r}`,token:`cherryPick ${e} ${r}`,expected:["cherry-pick abc"]},f}let u=Vt.records.commits.get(l);if(u===void 0||!u){let f=new Error(`Incorrect usage of "cherry-pick". Current branch (${Vt.records.currBranch})has no commits`);throw f.hash={text:`cherryPick ${e} ${r}`,token:`cherryPick ${e} ${r}`,expected:["cherry-pick abc"]},f}let h={id:Vt.records.seq+"-"+LL(),message:`cherry-picked ${s?.message} into ${Vt.records.currBranch}`,seq:Vt.records.seq++,parents:Vt.records.head==null?[]:[Vt.records.head.id,s.id],branch:Vt.records.currBranch,type:$n.CHERRY_PICK,tags:n?n.filter(Boolean):[`cherry-pick:${s.id}${s.type===$n.MERGE?`|parent:${i}`:""}`]};Vt.records.head=h,Vt.records.commits.set(h.id,h),Vt.records.branches.set(Vt.records.currBranch,h.id),he.debug(Vt.records.branches),he.debug("in cherryPick")}},"cherryPick"),gSe=b(function(t){if(t=St.sanitizeText(t,Jm()),Vt.records.branches.has(t)){Vt.records.currBranch=t;let e=Vt.records.branches.get(Vt.records.currBranch);e===void 0||!e?Vt.records.head=null:Vt.records.head=Vt.records.commits.get(e)??null}else{let e=new Error(`Trying to checkout branch which is not yet created. (Help try using "branch ${t}")`);throw e.hash={text:`checkout ${t}`,token:`checkout ${t}`,expected:[`branch ${t}`]},e}},"checkout");b(ZH,"upsert");b(QH,"prettyPrintCommitHistory");vbt=b(function(){he.debug(Vt.records.commits);let t=ySe()[0];QH([t])},"prettyPrint"),xbt=b(function(){Vt.reset(),Jr()},"clear"),bbt=b(function(){return[...Vt.records.branchConfig.values()].map((e,r)=>e.order!==null&&e.order!==void 0?e:{...e,order:parseFloat(`0.${r}`)}).sort((e,r)=>(e.order??0)-(r.order??0)).map(({name:e})=>({name:e}))},"getBranchesAsObjArray"),wbt=b(function(){return Vt.records.branches},"getBranches"),kbt=b(function(){return Vt.records.commits},"getCommits"),ySe=b(function(){let t=[...Vt.records.commits.values()];return t.forEach(function(e){he.debug(e.id)}),t.sort((e,r)=>e.seq-r.seq),t},"getCommitsArray"),Tbt=b(function(){return Vt.records.currBranch},"getCurrentBranch"),Ebt=b(function(){return Vt.records.direction},"getDirection"),Sbt=b(function(){return Vt.records.head},"getHead"),vSe={commitType:$n,getConfig:Jm,setDirection:hbt,setOptions:fbt,getOptions:dbt,commit:pbt,branch:mbt,merge:gbt,cherryPick:ybt,checkout:gSe,prettyPrint:vbt,clear:xbt,getBranchesAsObjArray:bbt,getBranches:wbt,getCommits:kbt,getCommitsArray:ySe,getCurrentBranch:Tbt,getDirection:Ebt,getHead:Sbt,setAccTitle:en,getAccTitle:tn,getAccDescription:nn,setAccDescription:rn,setDiagramTitle:pn,getDiagramTitle:an},Cbt=b((t,e)=>{lc(t,e),t.dir&&e.setDirection(t.dir);for(let r of t.statements)_bt(r,e)},"populate"),_bt=b((t,e)=>{let n={Commit:b(i=>e.commit(Abt(i)),"Commit"),Branch:b(i=>e.branch(Lbt(i)),"Branch"),Merge:b(i=>e.merge(Rbt(i)),"Merge"),Checkout:b(i=>e.checkout(Dbt(i)),"Checkout"),CherryPicking:b(i=>e.cherryPick(Ibt(i)),"CherryPicking")}[t.$type];n?n(t):he.error(`Unknown statement type: ${t.$type}`)},"parseStatement"),Abt=b(t=>({id:t.id,msg:t.message??"",type:t.type!==void 0?$n[t.type]:$n.NORMAL,tags:t.tags??void 0}),"parseCommit"),Lbt=b(t=>({name:t.name,order:t.order??0}),"parseBranch"),Rbt=b(t=>({branch:t.branch,id:t.id??"",type:t.type!==void 0?$n[t.type]:void 0,tags:t.tags??void 0}),"parseMerge"),Dbt=b(t=>t.branch,"parseCheckout"),Ibt=b(t=>({id:t.id,targetId:"",tags:t.tags?.length===0?void 0:t.tags,parent:t.parent}),"parseCherryPicking"),Mbt={parse:b(async t=>{let e=await Ul("gitGraph",t);he.debug(e),Cbt(e,vSe)},"parse")},Nbt=Fe(),Lu=Nbt?.gitGraph,Np=10,Op=40,Z0=4,vf=2,Qm=8,pl=new Map,ml=new Map,_L=30,p8=new Map,AL=[],Mp=0,ln="LR",Obt=b(()=>{pl.clear(),ml.clear(),p8.clear(),Mp=0,AL=[],ln="LR"},"clear"),xSe=b(t=>{let e=document.createElementNS("http://www.w3.org/2000/svg","text");return(typeof t=="string"?t.split(/\\n|\n|/gi):t).forEach(n=>{let i=document.createElementNS("http://www.w3.org/2000/svg","tspan");i.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),i.setAttribute("dy","1em"),i.setAttribute("x","0"),i.setAttribute("class","row"),i.textContent=n.trim(),e.appendChild(i)}),e},"drawText"),bSe=b(t=>{let e,r,n;return ln==="BT"?(r=b((i,a)=>i<=a,"comparisonFunc"),n=1/0):(r=b((i,a)=>i>=a,"comparisonFunc"),n=0),t.forEach(i=>{let a=ln==="TB"||ln=="BT"?ml.get(i)?.y:ml.get(i)?.x;a!==void 0&&r(a,n)&&(e=i,n=a)}),e},"findClosestParent"),Pbt=b(t=>{let e="",r=1/0;return t.forEach(n=>{let i=ml.get(n).y;i<=r&&(e=n,r=i)}),e||void 0},"findClosestParentBT"),Bbt=b((t,e,r)=>{let n=r,i=r,a=[];t.forEach(s=>{let o=e.get(s);if(!o)throw new Error(`Commit not found for key ${s}`);o.parents.length?(n=zbt(o),i=Math.max(n,i)):a.push(o),$bt(o,n)}),n=i,a.forEach(s=>{Gbt(s,n,r)}),t.forEach(s=>{let o=e.get(s);if(o?.parents.length){let l=Pbt(o.parents);n=ml.get(l).y-Op,n<=i&&(i=n);let u=pl.get(o.branch).pos,h=n-Np;ml.set(o.id,{x:u,y:h})}})},"setParallelBTPos"),Fbt=b(t=>{let e=bSe(t.parents.filter(n=>n!==null));if(!e)throw new Error(`Closest parent not found for commit ${t.id}`);let r=ml.get(e)?.y;if(r===void 0)throw new Error(`Closest parent position not found for commit ${t.id}`);return r},"findClosestParentPos"),zbt=b(t=>Fbt(t)+Op,"calculateCommitPosition"),$bt=b((t,e)=>{let r=pl.get(t.branch);if(!r)throw new Error(`Branch not found for commit ${t.id}`);let n=r.pos,i=e+Np;return ml.set(t.id,{x:n,y:i}),{x:n,y:i}},"setCommitPosition"),Gbt=b((t,e,r)=>{let n=pl.get(t.branch);if(!n)throw new Error(`Branch not found for commit ${t.id}`);let i=e+r,a=n.pos;ml.set(t.id,{x:a,y:i})},"setRootPosition"),qbt=b((t,e,r,n,i,a)=>{if(a===$n.HIGHLIGHT)t.append("rect").attr("x",r.x-10).attr("y",r.y-10).attr("width",20).attr("height",20).attr("class",`commit ${e.id} commit-highlight${i%Qm} ${n}-outer`),t.append("rect").attr("x",r.x-6).attr("y",r.y-6).attr("width",12).attr("height",12).attr("class",`commit ${e.id} commit${i%Qm} ${n}-inner`);else if(a===$n.CHERRY_PICK)t.append("circle").attr("cx",r.x).attr("cy",r.y).attr("r",10).attr("class",`commit ${e.id} ${n}`),t.append("circle").attr("cx",r.x-3).attr("cy",r.y+2).attr("r",2.75).attr("fill","#fff").attr("class",`commit ${e.id} ${n}`),t.append("circle").attr("cx",r.x+3).attr("cy",r.y+2).attr("r",2.75).attr("fill","#fff").attr("class",`commit ${e.id} ${n}`),t.append("line").attr("x1",r.x+3).attr("y1",r.y+1).attr("x2",r.x).attr("y2",r.y-5).attr("stroke","#fff").attr("class",`commit ${e.id} ${n}`),t.append("line").attr("x1",r.x-3).attr("y1",r.y+1).attr("x2",r.x).attr("y2",r.y-5).attr("stroke","#fff").attr("class",`commit ${e.id} ${n}`);else{let s=t.append("circle");if(s.attr("cx",r.x),s.attr("cy",r.y),s.attr("r",e.type===$n.MERGE?9:10),s.attr("class",`commit ${e.id} commit${i%Qm}`),a===$n.MERGE){let o=t.append("circle");o.attr("cx",r.x),o.attr("cy",r.y),o.attr("r",6),o.attr("class",`commit ${n} ${e.id} commit${i%Qm}`)}a===$n.REVERSE&&t.append("path").attr("d",`M ${r.x-5},${r.y-5}L${r.x+5},${r.y+5}M${r.x-5},${r.y+5}L${r.x+5},${r.y-5}`).attr("class",`commit ${n} ${e.id} commit${i%Qm}`)}},"drawCommitBullet"),Ubt=b((t,e,r,n)=>{if(e.type!==$n.CHERRY_PICK&&(e.customId&&e.type===$n.MERGE||e.type!==$n.MERGE)&&Lu?.showCommitLabel){let i=t.append("g"),a=i.insert("rect").attr("class","commit-label-bkg"),s=i.append("text").attr("x",n).attr("y",r.y+25).attr("class","commit-label").text(e.id),o=s.node()?.getBBox();if(o&&(a.attr("x",r.posWithOffset-o.width/2-vf).attr("y",r.y+13.5).attr("width",o.width+2*vf).attr("height",o.height+2*vf),ln==="TB"||ln==="BT"?(a.attr("x",r.x-(o.width+4*Z0+5)).attr("y",r.y-12),s.attr("x",r.x-(o.width+4*Z0)).attr("y",r.y+o.height-12)):s.attr("x",r.posWithOffset-o.width/2),Lu.rotateCommitLabel))if(ln==="TB"||ln==="BT")s.attr("transform","rotate(-45, "+r.x+", "+r.y+")"),a.attr("transform","rotate(-45, "+r.x+", "+r.y+")");else{let l=-7.5-(o.width+10)/25*9.5,u=10+o.width/25*8.5;i.attr("transform","translate("+l+", "+u+") rotate(-45, "+n+", "+r.y+")")}}},"drawCommitLabel"),Hbt=b((t,e,r,n)=>{if(e.tags.length>0){let i=0,a=0,s=0,o=[];for(let l of e.tags.reverse()){let u=t.insert("polygon"),h=t.append("circle"),f=t.append("text").attr("y",r.y-16-i).attr("class","tag-label").text(l),d=f.node()?.getBBox();if(!d)throw new Error("Tag bbox not found");a=Math.max(a,d.width),s=Math.max(s,d.height),f.attr("x",r.posWithOffset-d.width/2),o.push({tag:f,hole:h,rect:u,yOffset:i}),i+=20}for(let{tag:l,hole:u,rect:h,yOffset:f}of o){let d=s/2,p=r.y-19.2-f;if(h.attr("class","tag-label-bkg").attr("points",` + ${n-a/2-Z0/2},${p+vf} + ${n-a/2-Z0/2},${p-vf} + ${r.posWithOffset-a/2-Z0},${p-d-vf} + ${r.posWithOffset+a/2+Z0},${p-d-vf} + ${r.posWithOffset+a/2+Z0},${p+d+vf} + ${r.posWithOffset-a/2-Z0},${p+d+vf}`),u.attr("cy",p).attr("cx",n-a/2+Z0/2).attr("r",1.5).attr("class","tag-hole"),ln==="TB"||ln==="BT"){let m=n+f;h.attr("class","tag-label-bkg").attr("points",` ${r.x},${m+2} ${r.x},${m-2} - ${r.x+S0},${m-d-2} - ${r.x+S0+i+4},${m-d-2} - ${r.x+S0+i+4},${m+d+2} - ${r.x+S0},${m+d+2}`).attr("transform","translate(12,12) rotate(45, "+r.x+","+n+")"),u.attr("cx",r.x+Xc/2).attr("cy",m).attr("transform","translate(12,12) rotate(45, "+r.x+","+n+")"),l.attr("x",r.x+5).attr("y",m+3).attr("transform","translate(14,14) rotate(45, "+r.x+","+n+")")}}}},"drawCommitTags"),pyt=x(t=>{switch(t.customType??t.type){case sn.NORMAL:return"commit-normal";case sn.REVERSE:return"commit-reverse";case sn.HIGHLIGHT:return"commit-highlight";case sn.MERGE:return"commit-merge";case sn.CHERRY_PICK:return"commit-cherry-pick";default:return"commit-normal"}},"getCommitClassType"),myt=x((t,e,r,n)=>{let a={x:0,y:0};if(t.parents.length>0){let i=XEe(t.parents);if(i){let s=n.get(i)??a;return e==="TB"?s.y+_0:e==="BT"?(n.get(t.id)??a).y-_0:s.x+_0}}else return e==="TB"?YA:e==="BT"?(n.get(t.id)??a).y-_0:0;return 0},"calculatePosition"),gyt=x((t,e,r)=>{let n=Nr==="BT"&&r?e:e+S0,a=Nr==="TB"||Nr==="BT"?n:To.get(t.branch)?.pos,i=Nr==="TB"||Nr==="BT"?To.get(t.branch)?.pos:n;if(i===void 0||a===void 0)throw new Error(`Position were undefined for commit ${t.id}`);return{x:i,y:a,posWithOffset:n}},"getCommitPosition"),UEe=x((t,e,r)=>{if(!Il)throw new Error("GitGraph config not found");let n=t.append("g").attr("class","commit-bullets"),a=t.append("g").attr("class","commit-labels"),i=Nr==="TB"||Nr==="BT"?YA:0,s=[...e.keys()],o=Il?.parallelCommits??!1,l=x((h,f)=>{let d=e.get(h)?.seq,p=e.get(f)?.seq;return d!==void 0&&p!==void 0?d-p:0},"sortKeys"),u=s.sort(l);Nr==="BT"&&(o&&syt(u,e,i),u=u.reverse()),u.forEach(h=>{let f=e.get(h);if(!f)throw new Error(`Commit not found for key ${h}`);o&&(i=myt(f,Nr,i,Eo));let d=gyt(f,i,o);if(r){let p=pyt(f),m=f.customType??f.type,g=To.get(f.branch)?.index??0;hyt(n,f,d,p,g,m),fyt(a,f,d,i),dyt(a,f,d,i)}Nr==="TB"||Nr==="BT"?Eo.set(f.id,{x:d.x,y:d.posWithOffset}):Eo.set(f.id,{x:d.posWithOffset,y:d.y}),i=Nr==="BT"&&o?i+_0:i+_0+S0,i>C0&&(C0=i)})},"drawCommits"),vyt=x((t,e,r,n,a)=>{let s=(Nr==="TB"||Nr==="BT"?r.xu.branch===s,"isOnBranchToGetCurve"),l=x(u=>u.seq>t.seq&&u.seql(u)&&o(u))},"shouldRerouteArrow"),Qw=x((t,e,r=0)=>{let n=t+Math.abs(t-e)/2;if(r>5)return n;if(XA.every(s=>Math.abs(s-n)>=10))return XA.push(n),n;let i=Math.abs(t-e);return Qw(t,e-i/5,r+1)},"findLane"),yyt=x((t,e,r,n)=>{let a=Eo.get(e.id),i=Eo.get(r.id);if(a===void 0||i===void 0)throw new Error(`Commit positions not found for commits ${e.id} and ${r.id}`);let s=vyt(e,r,a,i,n),o="",l="",u=0,h=0,f=To.get(r.branch)?.index;r.type===sn.MERGE&&e.id!==r.parents[0]&&(f=To.get(e.branch)?.index);let d;if(s){o="A 10 10, 0, 0, 0,",l="A 10 10, 0, 0, 1,",u=10,h=10;let p=a.yi.x&&(o="A 20 20, 0, 0, 0,",l="A 20 20, 0, 0, 1,",u=20,h=20,r.type===sn.MERGE&&e.id!==r.parents[0]?d=`M ${a.x} ${a.y} L ${a.x} ${i.y-u} ${l} ${a.x-h} ${i.y} L ${i.x} ${i.y}`:d=`M ${a.x} ${a.y} L ${i.x+u} ${a.y} ${o} ${i.x} ${a.y+h} L ${i.x} ${i.y}`),a.x===i.x&&(d=`M ${a.x} ${a.y} L ${i.x} ${i.y}`)):Nr==="BT"?(a.xi.x&&(o="A 20 20, 0, 0, 0,",l="A 20 20, 0, 0, 1,",u=20,h=20,r.type===sn.MERGE&&e.id!==r.parents[0]?d=`M ${a.x} ${a.y} L ${a.x} ${i.y+u} ${o} ${a.x-h} ${i.y} L ${i.x} ${i.y}`:d=`M ${a.x} ${a.y} L ${i.x-u} ${a.y} ${o} ${i.x} ${a.y-h} L ${i.x} ${i.y}`),a.x===i.x&&(d=`M ${a.x} ${a.y} L ${i.x} ${i.y}`)):(a.yi.y&&(r.type===sn.MERGE&&e.id!==r.parents[0]?d=`M ${a.x} ${a.y} L ${i.x-u} ${a.y} ${o} ${i.x} ${a.y-h} L ${i.x} ${i.y}`:d=`M ${a.x} ${a.y} L ${a.x} ${i.y+u} ${l} ${a.x+h} ${i.y} L ${i.x} ${i.y}`),a.y===i.y&&(d=`M ${a.x} ${a.y} L ${i.x} ${i.y}`));if(d===void 0)throw new Error("Line definition not found");t.append("path").attr("d",d).attr("class","arrow arrow"+f%qm)},"drawArrow"),xyt=x((t,e)=>{let r=t.append("g").attr("class","commit-arrows");[...e.keys()].forEach(n=>{let a=e.get(n);a.parents&&a.parents.length>0&&a.parents.forEach(i=>{yyt(r,e.get(i),a,e)})})},"drawArrows"),byt=x((t,e)=>{let r=t.append("g");e.forEach((n,a)=>{let i=a%qm,s=To.get(n.name)?.pos;if(s===void 0)throw new Error(`Position not found for branch ${n.name}`);let o=r.append("line");o.attr("x1",0),o.attr("y1",s),o.attr("x2",C0),o.attr("y2",s),o.attr("class","branch branch"+i),Nr==="TB"?(o.attr("y1",YA),o.attr("x1",s),o.attr("y2",C0),o.attr("x2",s)):Nr==="BT"&&(o.attr("y1",C0),o.attr("x1",s),o.attr("y2",YA),o.attr("x2",s)),XA.push(s);let l=n.name,u=YEe(l),h=r.insert("rect"),d=r.insert("g").attr("class","branchLabel").insert("g").attr("class","label branch-label"+i);d.node().appendChild(u);let p=u.getBBox();h.attr("class","branchLabelBkg label"+i).attr("rx",4).attr("ry",4).attr("x",-p.width-4-(Il?.rotateCommitLabel===!0?30:0)).attr("y",-p.height/2+8).attr("width",p.width+18).attr("height",p.height+4),d.attr("transform","translate("+(-p.width-14-(Il?.rotateCommitLabel===!0?30:0))+", "+(s-p.height/2-1)+")"),Nr==="TB"?(h.attr("x",s-p.width/2-10).attr("y",0),d.attr("transform","translate("+(s-p.width/2-5)+", 0)")):Nr==="BT"?(h.attr("x",s-p.width/2-10).attr("y",C0),d.attr("transform","translate("+(s-p.width/2-5)+", "+C0+")")):h.attr("transform","translate(-19, "+(s-p.height/2)+")")})},"drawBranches"),wyt=x(function(t,e,r,n,a){return To.set(t,{pos:e,index:r}),e+=50+(a?40:0)+(Nr==="TB"||Nr==="BT"?n.width/2:0),e},"setBranchPosition"),kyt=x(function(t,e,r,n){if(ayt(),te.debug("in gitgraph renderer",t+` -`,"id:",e,r),!Il)throw new Error("GitGraph config not found");let a=Il.rotateCommitLabel??!1,i=n.db;Zw=i.getCommits();let s=i.getBranchesAsObjArray();Nr=i.getDirection();let o=We(`[id="${e}"]`),l=0;s.forEach((u,h)=>{let f=YEe(u.name),d=o.append("g"),p=d.insert("g").attr("class","branchLabel"),m=p.insert("g").attr("class","label branch-label");m.node()?.appendChild(f);let g=f.getBBox();l=wyt(u.name,l,h,g,a),m.remove(),p.remove(),d.remove()}),UEe(o,Zw,!1),Il.showBranches&&byt(o,s),xyt(o,Zw),UEe(o,Zw,!0),Wt.insertTitle(o,"gitTitleText",Il.titleTopMargin??0,i.getDiagramTitle()),MD(void 0,o,Il.diagramPadding,Il.useMaxWidth)},"draw"),Tyt={draw:kyt},Eyt=x(t=>` + ${r.x+Np},${m-d-2} + ${r.x+Np+a+4},${m-d-2} + ${r.x+Np+a+4},${m+d+2} + ${r.x+Np},${m+d+2}`).attr("transform","translate(12,12) rotate(45, "+r.x+","+n+")"),u.attr("cx",r.x+Z0/2).attr("cy",m).attr("transform","translate(12,12) rotate(45, "+r.x+","+n+")"),l.attr("x",r.x+5).attr("y",m+3).attr("transform","translate(14,14) rotate(45, "+r.x+","+n+")")}}}},"drawCommitTags"),Vbt=b(t=>{switch(t.customType??t.type){case $n.NORMAL:return"commit-normal";case $n.REVERSE:return"commit-reverse";case $n.HIGHLIGHT:return"commit-highlight";case $n.MERGE:return"commit-merge";case $n.CHERRY_PICK:return"commit-cherry-pick";default:return"commit-normal"}},"getCommitClassType"),Wbt=b((t,e,r,n)=>{let i={x:0,y:0};if(t.parents.length>0){let a=bSe(t.parents);if(a){let s=n.get(a)??i;return e==="TB"?s.y+Op:e==="BT"?(n.get(t.id)??i).y-Op:s.x+Op}}else return e==="TB"?_L:e==="BT"?(n.get(t.id)??i).y-Op:0;return 0},"calculatePosition"),Ybt=b((t,e,r)=>{let n=ln==="BT"&&r?e:e+Np,i=ln==="TB"||ln==="BT"?n:pl.get(t.branch)?.pos,a=ln==="TB"||ln==="BT"?pl.get(t.branch)?.pos:n;if(a===void 0||i===void 0)throw new Error(`Position were undefined for commit ${t.id}`);return{x:a,y:i,posWithOffset:n}},"getCommitPosition"),pSe=b((t,e,r)=>{if(!Lu)throw new Error("GitGraph config not found");let n=t.append("g").attr("class","commit-bullets"),i=t.append("g").attr("class","commit-labels"),a=ln==="TB"||ln==="BT"?_L:0,s=[...e.keys()],o=Lu?.parallelCommits??!1,l=b((h,f)=>{let d=e.get(h)?.seq,p=e.get(f)?.seq;return d!==void 0&&p!==void 0?d-p:0},"sortKeys"),u=s.sort(l);ln==="BT"&&(o&&Bbt(u,e,a),u=u.reverse()),u.forEach(h=>{let f=e.get(h);if(!f)throw new Error(`Commit not found for key ${h}`);o&&(a=Wbt(f,ln,a,ml));let d=Ybt(f,a,o);if(r){let p=Vbt(f),m=f.customType??f.type,g=pl.get(f.branch)?.index??0;qbt(n,f,d,p,g,m),Ubt(i,f,d,a),Hbt(i,f,d,a)}ln==="TB"||ln==="BT"?ml.set(f.id,{x:d.x,y:d.posWithOffset}):ml.set(f.id,{x:d.posWithOffset,y:d.y}),a=ln==="BT"&&o?a+Op:a+Op+Np,a>Mp&&(Mp=a)})},"drawCommits"),Xbt=b((t,e,r,n,i)=>{let s=(ln==="TB"||ln==="BT"?r.xu.branch===s,"isOnBranchToGetCurve"),l=b(u=>u.seq>t.seq&&u.seql(u)&&o(u))},"shouldRerouteArrow"),m8=b((t,e,r=0)=>{let n=t+Math.abs(t-e)/2;if(r>5)return n;if(AL.every(s=>Math.abs(s-n)>=10))return AL.push(n),n;let a=Math.abs(t-e);return m8(t,e-a/5,r+1)},"findLane"),jbt=b((t,e,r,n)=>{let i=ml.get(e.id),a=ml.get(r.id);if(i===void 0||a===void 0)throw new Error(`Commit positions not found for commits ${e.id} and ${r.id}`);let s=Xbt(e,r,i,a,n),o="",l="",u=0,h=0,f=pl.get(r.branch)?.index;r.type===$n.MERGE&&e.id!==r.parents[0]&&(f=pl.get(e.branch)?.index);let d;if(s){o="A 10 10, 0, 0, 0,",l="A 10 10, 0, 0, 1,",u=10,h=10;let p=i.ya.x&&(o="A 20 20, 0, 0, 0,",l="A 20 20, 0, 0, 1,",u=20,h=20,r.type===$n.MERGE&&e.id!==r.parents[0]?d=`M ${i.x} ${i.y} L ${i.x} ${a.y-u} ${l} ${i.x-h} ${a.y} L ${a.x} ${a.y}`:d=`M ${i.x} ${i.y} L ${a.x+u} ${i.y} ${o} ${a.x} ${i.y+h} L ${a.x} ${a.y}`),i.x===a.x&&(d=`M ${i.x} ${i.y} L ${a.x} ${a.y}`)):ln==="BT"?(i.xa.x&&(o="A 20 20, 0, 0, 0,",l="A 20 20, 0, 0, 1,",u=20,h=20,r.type===$n.MERGE&&e.id!==r.parents[0]?d=`M ${i.x} ${i.y} L ${i.x} ${a.y+u} ${o} ${i.x-h} ${a.y} L ${a.x} ${a.y}`:d=`M ${i.x} ${i.y} L ${a.x-u} ${i.y} ${o} ${a.x} ${i.y-h} L ${a.x} ${a.y}`),i.x===a.x&&(d=`M ${i.x} ${i.y} L ${a.x} ${a.y}`)):(i.ya.y&&(r.type===$n.MERGE&&e.id!==r.parents[0]?d=`M ${i.x} ${i.y} L ${a.x-u} ${i.y} ${o} ${a.x} ${i.y-h} L ${a.x} ${a.y}`:d=`M ${i.x} ${i.y} L ${i.x} ${a.y+u} ${l} ${i.x+h} ${a.y} L ${a.x} ${a.y}`),i.y===a.y&&(d=`M ${i.x} ${i.y} L ${a.x} ${a.y}`));if(d===void 0)throw new Error("Line definition not found");t.append("path").attr("d",d).attr("class","arrow arrow"+f%Qm)},"drawArrow"),Kbt=b((t,e)=>{let r=t.append("g").attr("class","commit-arrows");[...e.keys()].forEach(n=>{let i=e.get(n);i.parents&&i.parents.length>0&&i.parents.forEach(a=>{jbt(r,e.get(a),i,e)})})},"drawArrows"),Zbt=b((t,e)=>{let r=t.append("g");e.forEach((n,i)=>{let a=i%Qm,s=pl.get(n.name)?.pos;if(s===void 0)throw new Error(`Position not found for branch ${n.name}`);let o=r.append("line");o.attr("x1",0),o.attr("y1",s),o.attr("x2",Mp),o.attr("y2",s),o.attr("class","branch branch"+a),ln==="TB"?(o.attr("y1",_L),o.attr("x1",s),o.attr("y2",Mp),o.attr("x2",s)):ln==="BT"&&(o.attr("y1",Mp),o.attr("x1",s),o.attr("y2",_L),o.attr("x2",s)),AL.push(s);let l=n.name,u=xSe(l),h=r.insert("rect"),d=r.insert("g").attr("class","branchLabel").insert("g").attr("class","label branch-label"+a);d.node().appendChild(u);let p=u.getBBox();h.attr("class","branchLabelBkg label"+a).attr("rx",4).attr("ry",4).attr("x",-p.width-4-(Lu?.rotateCommitLabel===!0?30:0)).attr("y",-p.height/2+8).attr("width",p.width+18).attr("height",p.height+4),d.attr("transform","translate("+(-p.width-14-(Lu?.rotateCommitLabel===!0?30:0))+", "+(s-p.height/2-1)+")"),ln==="TB"?(h.attr("x",s-p.width/2-10).attr("y",0),d.attr("transform","translate("+(s-p.width/2-5)+", 0)")):ln==="BT"?(h.attr("x",s-p.width/2-10).attr("y",Mp),d.attr("transform","translate("+(s-p.width/2-5)+", "+Mp+")")):h.attr("transform","translate(-19, "+(s-p.height/2)+")")})},"drawBranches"),Qbt=b(function(t,e,r,n,i){return pl.set(t,{pos:e,index:r}),e+=50+(i?40:0)+(ln==="TB"||ln==="BT"?n.width/2:0),e},"setBranchPosition"),Jbt=b(function(t,e,r,n){if(Obt(),he.debug("in gitgraph renderer",t+` +`,"id:",e,r),!Lu)throw new Error("GitGraph config not found");let i=Lu.rotateCommitLabel??!1,a=n.db;p8=a.getCommits();let s=a.getBranchesAsObjArray();ln=a.getDirection();let o=dt(`[id="${e}"]`),l=0;s.forEach((u,h)=>{let f=xSe(u.name),d=o.append("g"),p=d.insert("g").attr("class","branchLabel"),m=p.insert("g").attr("class","label branch-label");m.node()?.appendChild(f);let g=f.getBBox();l=Qbt(u.name,l,h,g,i),m.remove(),p.remove(),d.remove()}),pSe(o,p8,!1),Lu.showBranches&&Zbt(o,s),Kbt(o,p8),pSe(o,p8,!0),gr.insertTitle(o,"gitTitleText",Lu.titleTopMargin??0,a.getDiagramTitle()),WN(void 0,o,Lu.diagramPadding,Lu.useMaxWidth)},"draw"),e3t={draw:Jbt},t3t=b(t=>` .commit-id, .commit-msg, .branch-label { @@ -876,12 +1132,12 @@ ${r}`),this.inline?`{${a}}`:a}};zw=class{constructor(e,r){this.inlines=e,this.ra font-size: 18px; fill: ${t.textColor}; } -`,"getStyles"),Cyt=Eyt,Syt={parser:ryt,db:WEe,renderer:Tyt,styles:Cyt}});var ZEe=va((GU,UU)=>{(function(t,e){typeof GU=="object"&&typeof UU<"u"?UU.exports=e():typeof define=="function"&&define.amd?define(e):(t=typeof globalThis<"u"?globalThis:t||self).dayjs_plugin_isoWeek=e()})(GU,(function(){"use strict";var t="day";return function(e,r,n){var a=function(o){return o.add(4-o.isoWeekday(),t)},i=r.prototype;i.isoWeekYear=function(){return a(this).year()},i.isoWeek=function(o){if(!this.$utils().u(o))return this.add(7*(o-this.isoWeek()),t);var l,u,h,f,d=a(this),p=(l=this.isoWeekYear(),u=this.$u,h=(u?n.utc:n)().year(l).startOf("year"),f=4-h.isoWeekday(),h.isoWeekday()>4&&(f+=7),h.add(f,t));return d.diff(p,"week")+1},i.isoWeekday=function(o){return this.$utils().u(o)?this.day()||7:this.day(this.day()%7?o:o-7)};var s=i.startOf;i.startOf=function(o,l){var u=this.$utils(),h=!!u.u(l)||l;return u.p(o)==="isoweek"?h?this.date(this.date()-(this.isoWeekday()-1)).startOf("day"):this.date(this.date()-1-(this.isoWeekday()-1)+7).endOf("day"):s.bind(this)(o,l)}}}))});var QEe=va((qU,VU)=>{(function(t,e){typeof qU=="object"&&typeof VU<"u"?VU.exports=e():typeof define=="function"&&define.amd?define(e):(t=typeof globalThis<"u"?globalThis:t||self).dayjs_plugin_customParseFormat=e()})(qU,(function(){"use strict";var t={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},e=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,r=/\d/,n=/\d\d/,a=/\d\d?/,i=/\d*[^-_:/,()\s\d]+/,s={},o=function(m){return(m=+m)+(m>68?1900:2e3)},l=function(m){return function(g){this[m]=+g}},u=[/[+-]\d\d:?(\d\d)?|Z/,function(m){(this.zone||(this.zone={})).offset=(function(g){if(!g||g==="Z")return 0;var v=g.match(/([+-]|\d\d)/g),y=60*v[1]+(+v[2]||0);return y===0?0:v[0]==="+"?-y:y})(m)}],h=function(m){var g=s[m];return g&&(g.indexOf?g:g.s.concat(g.f))},f=function(m,g){var v,y=s.meridiem;if(y){for(var b=1;b<=24;b+=1)if(m.indexOf(y(b,0,g))>-1){v=b>12;break}}else v=m===(g?"pm":"PM");return v},d={A:[i,function(m){this.afternoon=f(m,!1)}],a:[i,function(m){this.afternoon=f(m,!0)}],Q:[r,function(m){this.month=3*(m-1)+1}],S:[r,function(m){this.milliseconds=100*+m}],SS:[n,function(m){this.milliseconds=10*+m}],SSS:[/\d{3}/,function(m){this.milliseconds=+m}],s:[a,l("seconds")],ss:[a,l("seconds")],m:[a,l("minutes")],mm:[a,l("minutes")],H:[a,l("hours")],h:[a,l("hours")],HH:[a,l("hours")],hh:[a,l("hours")],D:[a,l("day")],DD:[n,l("day")],Do:[i,function(m){var g=s.ordinal,v=m.match(/\d+/);if(this.day=v[0],g)for(var y=1;y<=31;y+=1)g(y).replace(/\[|\]/g,"")===m&&(this.day=y)}],w:[a,l("week")],ww:[n,l("week")],M:[a,l("month")],MM:[n,l("month")],MMM:[i,function(m){var g=h("months"),v=(h("monthsShort")||g.map((function(y){return y.slice(0,3)}))).indexOf(m)+1;if(v<1)throw new Error;this.month=v%12||v}],MMMM:[i,function(m){var g=h("months").indexOf(m)+1;if(g<1)throw new Error;this.month=g%12||g}],Y:[/[+-]?\d+/,l("year")],YY:[n,function(m){this.year=o(m)}],YYYY:[/\d{4}/,l("year")],Z:u,ZZ:u};function p(m){var g,v;g=m,v=s&&s.formats;for(var y=(m=g.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(S,L,M){var D=M&&M.toUpperCase();return L||v[M]||t[M]||v[D].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(T,I,N){return I||N.slice(1)}))}))).match(e),b=y.length,w=0;w-1)return new Date((R==="X"?1e3:1)*O);var F=p(R)(O),G=F.year,z=F.month,H=F.day,Q=F.hours,Y=F.minutes,ie=F.seconds,se=F.milliseconds,oe=F.zone,pe=F.week,J=new Date,j=H||(G||z?1:J.getDate()),Z=G||J.getFullYear(),K=0;G&&!z||(K=z>0?z-1:J.getMonth());var X,ae=Q||0,W=Y||0,Se=ie||0,ne=se||0;return oe?new Date(Date.UTC(Z,K,j,ae,W,Se,ne+60*oe.offset*1e3)):P?new Date(Date.UTC(Z,K,j,ae,W,Se,ne)):(X=new Date(Z,K,j,ae,W,Se,ne),pe&&(X=B(X).week(pe).toDate()),X)}catch{return new Date("")}})(C,_,k,v),this.init(),D&&D!==!0&&(this.$L=this.locale(D).$L),M&&C!=this.format(_)&&(this.$d=new Date("")),s={}}else if(_ instanceof Array)for(var T=_.length,I=1;I<=T;I+=1){E[1]=_[I-1];var N=v.apply(this,E);if(N.isValid()){this.$d=N.$d,this.$L=N.$L,this.init();break}I===T&&(this.$d=new Date(""))}else b.call(this,w)}}}))});var JEe=va((HU,WU)=>{(function(t,e){typeof HU=="object"&&typeof WU<"u"?WU.exports=e():typeof define=="function"&&define.amd?define(e):(t=typeof globalThis<"u"?globalThis:t||self).dayjs_plugin_advancedFormat=e()})(HU,(function(){"use strict";return function(t,e){var r=e.prototype,n=r.format;r.format=function(a){var i=this,s=this.$locale();if(!this.isValid())return n.bind(this)(a);var o=this.$utils(),l=(a||"YYYY-MM-DDTHH:mm:ssZ").replace(/\[([^\]]+)]|Q|wo|ww|w|WW|W|zzz|z|gggg|GGGG|Do|X|x|k{1,2}|S/g,(function(u){switch(u){case"Q":return Math.ceil((i.$M+1)/3);case"Do":return s.ordinal(i.$D);case"gggg":return i.weekYear();case"GGGG":return i.isoWeekYear();case"wo":return s.ordinal(i.week(),"W");case"w":case"ww":return o.s(i.week(),u==="w"?1:2,"0");case"W":case"WW":return o.s(i.isoWeek(),u==="W"?1:2,"0");case"k":case"kk":return o.s(String(i.$H===0?24:i.$H),u==="k"?1:2,"0");case"X":return Math.floor(i.$d.getTime()/1e3);case"x":return i.$d.getTime();case"z":return"["+i.offsetName()+"]";case"zzz":return"["+i.offsetName("long")+"]";default:return u}}));return n.bind(this)(l)}}}))});var mCe={};lr(mCe,{diagram:()=>g2t});function sq(t,e,r){let n=!0;for(;n;)n=!1,r.forEach(function(a){let i="^\\s*"+a+"\\s*$",s=new RegExp(i);t[0].match(s)&&(e[a]=!0,t.shift(1),n=!0)})}var nCe,Ko,aCe,iCe,sCe,QA,YU,_yt,eCe,jc,ZU,QU,JU,Jw,e6,eq,tq,JA,lx,rq,oCe,nq,t6,aq,iq,e9,XU,Ayt,Lyt,Ryt,Iyt,Dyt,Nyt,Myt,Oyt,Pyt,Byt,Fyt,zyt,$yt,Gyt,Uyt,qyt,Vyt,Hyt,Wyt,Yyt,Xyt,jyt,Kyt,lCe,Zyt,Qyt,Jyt,uCe,e2t,jU,cCe,hCe,KA,ox,t2t,r2t,KU,ZA,Za,fCe,n2t,Hm,a2t,tCe,i2t,dCe,s2t,pCe,o2t,l2t,u2t,c2t,rCe,h2t,pf,f2t,d2t,p2t,m2t,g2t,gCe=A(()=>{ln();ur();nCe=ii(o1(),1),Ko=ii(zk(),1),aCe=ii(ZEe(),1),iCe=ii(QEe(),1),sCe=ii(JEe(),1),QA=ii(zk(),1);cr();YU=(function(){var t=x(function(I,N,O,R){for(O=O||{},R=I.length;R--;O[I[R]]=N);return O},"o"),e=[6,8,10,12,13,14,15,16,17,18,20,21,22,23,24,25,26,27,28,29,30,31,33,35,36,38,40],r=[1,26],n=[1,27],a=[1,28],i=[1,29],s=[1,30],o=[1,31],l=[1,32],u=[1,33],h=[1,34],f=[1,9],d=[1,10],p=[1,11],m=[1,12],g=[1,13],v=[1,14],y=[1,15],b=[1,16],w=[1,19],C=[1,20],k=[1,21],E=[1,22],_=[1,23],S=[1,25],L=[1,35],M={trace:x(function(){},"trace"),yy:{},symbols_:{error:2,start:3,gantt:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NL:10,weekday:11,weekday_monday:12,weekday_tuesday:13,weekday_wednesday:14,weekday_thursday:15,weekday_friday:16,weekday_saturday:17,weekday_sunday:18,weekend:19,weekend_friday:20,weekend_saturday:21,dateFormat:22,inclusiveEndDates:23,topAxis:24,axisFormat:25,tickInterval:26,excludes:27,includes:28,todayMarker:29,title:30,acc_title:31,acc_title_value:32,acc_descr:33,acc_descr_value:34,acc_descr_multiline_value:35,section:36,clickStatement:37,taskTxt:38,taskData:39,click:40,callbackname:41,callbackargs:42,href:43,clickStatementDebug:44,$accept:0,$end:1},terminals_:{2:"error",4:"gantt",6:"EOF",8:"SPACE",10:"NL",12:"weekday_monday",13:"weekday_tuesday",14:"weekday_wednesday",15:"weekday_thursday",16:"weekday_friday",17:"weekday_saturday",18:"weekday_sunday",20:"weekend_friday",21:"weekend_saturday",22:"dateFormat",23:"inclusiveEndDates",24:"topAxis",25:"axisFormat",26:"tickInterval",27:"excludes",28:"includes",29:"todayMarker",30:"title",31:"acc_title",32:"acc_title_value",33:"acc_descr",34:"acc_descr_value",35:"acc_descr_multiline_value",36:"section",38:"taskTxt",39:"taskData",40:"click",41:"callbackname",42:"callbackargs",43:"href"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[11,1],[11,1],[11,1],[11,1],[11,1],[11,1],[11,1],[19,1],[19,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,2],[9,2],[9,1],[9,1],[9,1],[9,2],[37,2],[37,3],[37,3],[37,4],[37,3],[37,4],[37,2],[44,2],[44,3],[44,3],[44,4],[44,3],[44,4],[44,2]],performAction:x(function(N,O,R,P,B,F,G){var z=F.length-1;switch(B){case 1:return F[z-1];case 2:this.$=[];break;case 3:F[z-1].push(F[z]),this.$=F[z-1];break;case 4:case 5:this.$=F[z];break;case 6:case 7:this.$=[];break;case 8:P.setWeekday("monday");break;case 9:P.setWeekday("tuesday");break;case 10:P.setWeekday("wednesday");break;case 11:P.setWeekday("thursday");break;case 12:P.setWeekday("friday");break;case 13:P.setWeekday("saturday");break;case 14:P.setWeekday("sunday");break;case 15:P.setWeekend("friday");break;case 16:P.setWeekend("saturday");break;case 17:P.setDateFormat(F[z].substr(11)),this.$=F[z].substr(11);break;case 18:P.enableInclusiveEndDates(),this.$=F[z].substr(18);break;case 19:P.TopAxis(),this.$=F[z].substr(8);break;case 20:P.setAxisFormat(F[z].substr(11)),this.$=F[z].substr(11);break;case 21:P.setTickInterval(F[z].substr(13)),this.$=F[z].substr(13);break;case 22:P.setExcludes(F[z].substr(9)),this.$=F[z].substr(9);break;case 23:P.setIncludes(F[z].substr(9)),this.$=F[z].substr(9);break;case 24:P.setTodayMarker(F[z].substr(12)),this.$=F[z].substr(12);break;case 27:P.setDiagramTitle(F[z].substr(6)),this.$=F[z].substr(6);break;case 28:this.$=F[z].trim(),P.setAccTitle(this.$);break;case 29:case 30:this.$=F[z].trim(),P.setAccDescription(this.$);break;case 31:P.addSection(F[z].substr(8)),this.$=F[z].substr(8);break;case 33:P.addTask(F[z-1],F[z]),this.$="task";break;case 34:this.$=F[z-1],P.setClickEvent(F[z-1],F[z],null);break;case 35:this.$=F[z-2],P.setClickEvent(F[z-2],F[z-1],F[z]);break;case 36:this.$=F[z-2],P.setClickEvent(F[z-2],F[z-1],null),P.setLink(F[z-2],F[z]);break;case 37:this.$=F[z-3],P.setClickEvent(F[z-3],F[z-2],F[z-1]),P.setLink(F[z-3],F[z]);break;case 38:this.$=F[z-2],P.setClickEvent(F[z-2],F[z],null),P.setLink(F[z-2],F[z-1]);break;case 39:this.$=F[z-3],P.setClickEvent(F[z-3],F[z-1],F[z]),P.setLink(F[z-3],F[z-2]);break;case 40:this.$=F[z-1],P.setLink(F[z-1],F[z]);break;case 41:case 47:this.$=F[z-1]+" "+F[z];break;case 42:case 43:case 45:this.$=F[z-2]+" "+F[z-1]+" "+F[z];break;case 44:case 46:this.$=F[z-3]+" "+F[z-2]+" "+F[z-1]+" "+F[z];break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},t(e,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:17,12:r,13:n,14:a,15:i,16:s,17:o,18:l,19:18,20:u,21:h,22:f,23:d,24:p,25:m,26:g,27:v,28:y,29:b,30:w,31:C,33:k,35:E,36:_,37:24,38:S,40:L},t(e,[2,7],{1:[2,1]}),t(e,[2,3]),{9:36,11:17,12:r,13:n,14:a,15:i,16:s,17:o,18:l,19:18,20:u,21:h,22:f,23:d,24:p,25:m,26:g,27:v,28:y,29:b,30:w,31:C,33:k,35:E,36:_,37:24,38:S,40:L},t(e,[2,5]),t(e,[2,6]),t(e,[2,17]),t(e,[2,18]),t(e,[2,19]),t(e,[2,20]),t(e,[2,21]),t(e,[2,22]),t(e,[2,23]),t(e,[2,24]),t(e,[2,25]),t(e,[2,26]),t(e,[2,27]),{32:[1,37]},{34:[1,38]},t(e,[2,30]),t(e,[2,31]),t(e,[2,32]),{39:[1,39]},t(e,[2,8]),t(e,[2,9]),t(e,[2,10]),t(e,[2,11]),t(e,[2,12]),t(e,[2,13]),t(e,[2,14]),t(e,[2,15]),t(e,[2,16]),{41:[1,40],43:[1,41]},t(e,[2,4]),t(e,[2,28]),t(e,[2,29]),t(e,[2,33]),t(e,[2,34],{42:[1,42],43:[1,43]}),t(e,[2,40],{41:[1,44]}),t(e,[2,35],{43:[1,45]}),t(e,[2,36]),t(e,[2,38],{42:[1,46]}),t(e,[2,37]),t(e,[2,39])],defaultActions:{},parseError:x(function(N,O){if(O.recoverable)this.trace(N);else{var R=new Error(N);throw R.hash=O,R}},"parseError"),parse:x(function(N){var O=this,R=[0],P=[],B=[null],F=[],G=this.table,z="",H=0,Q=0,Y=0,ie=2,se=1,oe=F.slice.call(arguments,1),pe=Object.create(this.lexer),J={yy:{}};for(var j in this.yy)Object.prototype.hasOwnProperty.call(this.yy,j)&&(J.yy[j]=this.yy[j]);pe.setInput(N,J.yy),J.yy.lexer=pe,J.yy.parser=this,typeof pe.yylloc>"u"&&(pe.yylloc={});var Z=pe.yylloc;F.push(Z);var K=pe.options&&pe.options.ranges;typeof J.yy.parseError=="function"?this.parseError=J.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function X(ve){R.length=R.length-2*ve,B.length=B.length-ve,F.length=F.length-ve}x(X,"popStack");function ae(){var ve;return ve=P.pop()||pe.lex()||se,typeof ve!="number"&&(ve instanceof Array&&(P=ve,ve=P.pop()),ve=O.symbols_[ve]||ve),ve}x(ae,"lex");for(var W,Se,ne,ee,$e,me,Ie={},Ue,Fe,Ae,Me;;){if(ne=R[R.length-1],this.defaultActions[ne]?ee=this.defaultActions[ne]:((W===null||typeof W>"u")&&(W=ae()),ee=G[ne]&&G[ne][W]),typeof ee>"u"||!ee.length||!ee[0]){var ke="";Me=[];for(Ue in G[ne])this.terminals_[Ue]&&Ue>ie&&Me.push("'"+this.terminals_[Ue]+"'");pe.showPosition?ke="Parse error on line "+(H+1)+`: -`+pe.showPosition()+` -Expecting `+Me.join(", ")+", got '"+(this.terminals_[W]||W)+"'":ke="Parse error on line "+(H+1)+": Unexpected "+(W==se?"end of input":"'"+(this.terminals_[W]||W)+"'"),this.parseError(ke,{text:pe.match,token:this.terminals_[W]||W,line:pe.yylineno,loc:Z,expected:Me})}if(ee[0]instanceof Array&&ee.length>1)throw new Error("Parse Error: multiple actions possible at state: "+ne+", token: "+W);switch(ee[0]){case 1:R.push(W),B.push(pe.yytext),F.push(pe.yylloc),R.push(ee[1]),W=null,Se?(W=Se,Se=null):(Q=pe.yyleng,z=pe.yytext,H=pe.yylineno,Z=pe.yylloc,Y>0&&Y--);break;case 2:if(Fe=this.productions_[ee[1]][1],Ie.$=B[B.length-Fe],Ie._$={first_line:F[F.length-(Fe||1)].first_line,last_line:F[F.length-1].last_line,first_column:F[F.length-(Fe||1)].first_column,last_column:F[F.length-1].last_column},K&&(Ie._$.range=[F[F.length-(Fe||1)].range[0],F[F.length-1].range[1]]),me=this.performAction.apply(Ie,[z,Q,H,J.yy,ee[1],B,F].concat(oe)),typeof me<"u")return me;Fe&&(R=R.slice(0,-1*Fe*2),B=B.slice(0,-1*Fe),F=F.slice(0,-1*Fe)),R.push(this.productions_[ee[1]][0]),B.push(Ie.$),F.push(Ie._$),Ae=G[R[R.length-2]][R[R.length-1]],R.push(Ae);break;case 3:return!0}}return!0},"parse")},D=(function(){var I={EOF:1,parseError:x(function(O,R){if(this.yy.parser)this.yy.parser.parseError(O,R);else throw new Error(O)},"parseError"),setInput:x(function(N,O){return this.yy=O||this.yy||{},this._input=N,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:x(function(){var N=this._input[0];this.yytext+=N,this.yyleng++,this.offset++,this.match+=N,this.matched+=N;var O=N.match(/(?:\r\n?|\n).*/g);return O?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),N},"input"),unput:x(function(N){var O=N.length,R=N.split(/(?:\r\n?|\n)/g);this._input=N+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-O),this.offset-=O;var P=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),R.length-1&&(this.yylineno-=R.length-1);var B=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:R?(R.length===P.length?this.yylloc.first_column:0)+P[P.length-R.length].length-R[0].length:this.yylloc.first_column-O},this.options.ranges&&(this.yylloc.range=[B[0],B[0]+this.yyleng-O]),this.yyleng=this.yytext.length,this},"unput"),more:x(function(){return this._more=!0,this},"more"),reject:x(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). -`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:x(function(N){this.unput(this.match.slice(N))},"less"),pastInput:x(function(){var N=this.matched.substr(0,this.matched.length-this.match.length);return(N.length>20?"...":"")+N.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:x(function(){var N=this.match;return N.length<20&&(N+=this._input.substr(0,20-N.length)),(N.substr(0,20)+(N.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:x(function(){var N=this.pastInput(),O=new Array(N.length+1).join("-");return N+this.upcomingInput()+` -`+O+"^"},"showPosition"),test_match:x(function(N,O){var R,P,B;if(this.options.backtrack_lexer&&(B={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(B.yylloc.range=this.yylloc.range.slice(0))),P=N[0].match(/(?:\r\n?|\n).*/g),P&&(this.yylineno+=P.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:P?P[P.length-1].length-P[P.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+N[0].length},this.yytext+=N[0],this.match+=N[0],this.matches=N,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(N[0].length),this.matched+=N[0],R=this.performAction.call(this,this.yy,this,O,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),R)return R;if(this._backtrack){for(var F in B)this[F]=B[F];return!1}return!1},"test_match"),next:x(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var N,O,R,P;this._more||(this.yytext="",this.match="");for(var B=this._currentRules(),F=0;FO[0].length)){if(O=R,P=F,this.options.backtrack_lexer){if(N=this.test_match(R,B[F]),N!==!1)return N;if(this._backtrack){O=!1;continue}else return!1}else if(!this.options.flex)break}return O?(N=this.test_match(O,B[P]),N!==!1?N:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. -`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:x(function(){var O=this.next();return O||this.lex()},"lex"),begin:x(function(O){this.conditionStack.push(O)},"begin"),popState:x(function(){var O=this.conditionStack.length-1;return O>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:x(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:x(function(O){return O=this.conditionStack.length-1-Math.abs(O||0),O>=0?this.conditionStack[O]:"INITIAL"},"topState"),pushState:x(function(O){this.begin(O)},"pushState"),stateStackSize:x(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:x(function(O,R,P,B){var F=B;switch(P){case 0:return this.begin("open_directive"),"open_directive";break;case 1:return this.begin("acc_title"),31;break;case 2:return this.popState(),"acc_title_value";break;case 3:return this.begin("acc_descr"),33;break;case 4:return this.popState(),"acc_descr_value";break;case 5:this.begin("acc_descr_multiline");break;case 6:this.popState();break;case 7:return"acc_descr_multiline_value";case 8:break;case 9:break;case 10:break;case 11:return 10;case 12:break;case 13:break;case 14:this.begin("href");break;case 15:this.popState();break;case 16:return 43;case 17:this.begin("callbackname");break;case 18:this.popState();break;case 19:this.popState(),this.begin("callbackargs");break;case 20:return 41;case 21:this.popState();break;case 22:return 42;case 23:this.begin("click");break;case 24:this.popState();break;case 25:return 40;case 26:return 4;case 27:return 22;case 28:return 23;case 29:return 24;case 30:return 25;case 31:return 26;case 32:return 28;case 33:return 27;case 34:return 29;case 35:return 12;case 36:return 13;case 37:return 14;case 38:return 15;case 39:return 16;case 40:return 17;case 41:return 18;case 42:return 20;case 43:return 21;case 44:return"date";case 45:return 30;case 46:return"accDescription";case 47:return 36;case 48:return 38;case 49:return 39;case 50:return":";case 51:return 6;case 52:return"INVALID"}},"anonymous"),rules:[/^(?:%%\{)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:%%(?!\{)*[^\n]*)/i,/^(?:[^\}]%%*[^\n]*)/i,/^(?:%%*[^\n]*[\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:%[^\n]*)/i,/^(?:href[\s]+["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:call[\s]+)/i,/^(?:\([\s]*\))/i,/^(?:\()/i,/^(?:[^(]*)/i,/^(?:\))/i,/^(?:[^)]*)/i,/^(?:click[\s]+)/i,/^(?:[\s\n])/i,/^(?:[^\s\n]*)/i,/^(?:gantt\b)/i,/^(?:dateFormat\s[^#\n;]+)/i,/^(?:inclusiveEndDates\b)/i,/^(?:topAxis\b)/i,/^(?:axisFormat\s[^#\n;]+)/i,/^(?:tickInterval\s[^#\n;]+)/i,/^(?:includes\s[^#\n;]+)/i,/^(?:excludes\s[^#\n;]+)/i,/^(?:todayMarker\s[^\n;]+)/i,/^(?:weekday\s+monday\b)/i,/^(?:weekday\s+tuesday\b)/i,/^(?:weekday\s+wednesday\b)/i,/^(?:weekday\s+thursday\b)/i,/^(?:weekday\s+friday\b)/i,/^(?:weekday\s+saturday\b)/i,/^(?:weekday\s+sunday\b)/i,/^(?:weekend\s+friday\b)/i,/^(?:weekend\s+saturday\b)/i,/^(?:\d\d\d\d-\d\d-\d\d\b)/i,/^(?:title\s[^\n]+)/i,/^(?:accDescription\s[^#\n;]+)/i,/^(?:section\s[^\n]+)/i,/^(?:[^:\n]+)/i,/^(?::[^#\n;]+)/i,/^(?::)/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[6,7],inclusive:!1},acc_descr:{rules:[4],inclusive:!1},acc_title:{rules:[2],inclusive:!1},callbackargs:{rules:[21,22],inclusive:!1},callbackname:{rules:[18,19,20],inclusive:!1},href:{rules:[15,16],inclusive:!1},click:{rules:[24,25],inclusive:!1},INITIAL:{rules:[0,1,3,5,8,9,10,11,12,13,14,17,23,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52],inclusive:!0}}};return I})();M.lexer=D;function T(){this.yy={}}return x(T,"Parser"),T.prototype=M,M.Parser=T,new T})();YU.parser=YU;_yt=YU;Ko.default.extend(aCe.default);Ko.default.extend(iCe.default);Ko.default.extend(sCe.default);eCe={friday:5,saturday:6},jc="",ZU="",QU=void 0,JU="",Jw=[],e6=[],eq=new Map,tq=[],JA=[],lx="",rq="",oCe=["active","done","crit","milestone"],nq=[],t6=!1,aq=!1,iq="sunday",e9="saturday",XU=0,Ayt=x(function(){tq=[],JA=[],lx="",nq=[],KA=0,KU=void 0,ZA=void 0,Za=[],jc="",ZU="",rq="",QU=void 0,JU="",Jw=[],e6=[],t6=!1,aq=!1,XU=0,eq=new Map,Cr(),iq="sunday",e9="saturday"},"clear"),Lyt=x(function(t){ZU=t},"setAxisFormat"),Ryt=x(function(){return ZU},"getAxisFormat"),Iyt=x(function(t){QU=t},"setTickInterval"),Dyt=x(function(){return QU},"getTickInterval"),Nyt=x(function(t){JU=t},"setTodayMarker"),Myt=x(function(){return JU},"getTodayMarker"),Oyt=x(function(t){jc=t},"setDateFormat"),Pyt=x(function(){t6=!0},"enableInclusiveEndDates"),Byt=x(function(){return t6},"endDatesAreInclusive"),Fyt=x(function(){aq=!0},"enableTopAxis"),zyt=x(function(){return aq},"topAxisEnabled"),$yt=x(function(t){rq=t},"setDisplayMode"),Gyt=x(function(){return rq},"getDisplayMode"),Uyt=x(function(){return jc},"getDateFormat"),qyt=x(function(t){Jw=t.toLowerCase().split(/[\s,]+/)},"setIncludes"),Vyt=x(function(){return Jw},"getIncludes"),Hyt=x(function(t){e6=t.toLowerCase().split(/[\s,]+/)},"setExcludes"),Wyt=x(function(){return e6},"getExcludes"),Yyt=x(function(){return eq},"getLinks"),Xyt=x(function(t){lx=t,tq.push(t)},"addSection"),jyt=x(function(){return tq},"getSections"),Kyt=x(function(){let t=tCe(),e=10,r=0;for(;!t&&r[\d\w- ]+)/.exec(r);if(a!==null){let s=null;for(let l of a.groups.ids.split(" ")){let u=Hm(l);u!==void 0&&(!s||u.endTime>s.endTime)&&(s=u)}if(s)return s.endTime;let o=new Date;return o.setHours(0,0,0,0),o}let i=(0,Ko.default)(r,e.trim(),!0);if(i.isValid())return i.toDate();{te.debug("Invalid date:"+r),te.debug("With date format:"+e.trim());let s=new Date(r);if(s===void 0||isNaN(s.getTime())||s.getFullYear()<-1e4||s.getFullYear()>1e4)throw new Error("Invalid date:"+r);return s}},"getStartDate"),cCe=x(function(t){let e=/^(\d+(?:\.\d+)?)([Mdhmswy]|ms)$/.exec(t.trim());return e!==null?[Number.parseFloat(e[1]),e[2]]:[NaN,"ms"]},"parseDuration"),hCe=x(function(t,e,r,n=!1){r=r.trim();let i=/^until\s+(?[\d\w- ]+)/.exec(r);if(i!==null){let h=null;for(let d of i.groups.ids.split(" ")){let p=Hm(d);p!==void 0&&(!h||p.startTime{window.open(r,"_self")}),eq.set(n,r))}),dCe(t,"clickable")},"setLink"),dCe=x(function(t,e){t.split(",").forEach(function(r){let n=Hm(r);n!==void 0&&n.classes.push(e)})},"setClass"),s2t=x(function(t,e,r){if(Te().securityLevel!=="loose"||e===void 0)return;let n=[];if(typeof r=="string"){n=r.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let i=0;i{Wt.runFunc(e,...n)})},"setClickFun"),pCe=x(function(t,e){nq.push(function(){let r=document.querySelector(`[id="${t}"]`);r!==null&&r.addEventListener("click",function(){e()})},function(){let r=document.querySelector(`[id="${t}-text"]`);r!==null&&r.addEventListener("click",function(){e()})})},"pushFun"),o2t=x(function(t,e,r){t.split(",").forEach(function(n){s2t(n,e,r)}),dCe(t,"clickable")},"setClickEvent"),l2t=x(function(t){nq.forEach(function(e){e(t)})},"bindFunctions"),u2t={getConfig:x(()=>Te().gantt,"getConfig"),clear:Ayt,setDateFormat:Oyt,getDateFormat:Uyt,enableInclusiveEndDates:Pyt,endDatesAreInclusive:Byt,enableTopAxis:Fyt,topAxisEnabled:zyt,setAxisFormat:Lyt,getAxisFormat:Ryt,setTickInterval:Iyt,getTickInterval:Dyt,setTodayMarker:Nyt,getTodayMarker:Myt,setAccTitle:Sr,getAccTitle:_r,setDiagramTitle:Fr,getDiagramTitle:Rr,setDisplayMode:$yt,getDisplayMode:Gyt,setAccDescription:Ar,getAccDescription:Lr,addSection:Xyt,getSections:jyt,getTasks:Kyt,addTask:n2t,findTaskById:Hm,addTaskOrg:a2t,setIncludes:qyt,getIncludes:Vyt,setExcludes:Hyt,getExcludes:Wyt,setClickEvent:o2t,setLink:i2t,getLinks:Yyt,bindFunctions:l2t,parseDuration:cCe,isInvalidDate:lCe,setWeekday:Zyt,getWeekday:Qyt,setWeekend:Jyt};x(sq,"getTaskTags");c2t=x(function(){te.debug("Something is calling, setConf, remove the call")},"setConf"),rCe={monday:Kf,tuesday:HE,wednesday:WE,thursday:Ju,friday:YE,saturday:XE,sunday:Zl},h2t=x((t,e)=>{let r=[...t].map(()=>-1/0),n=[...t].sort((i,s)=>i.startTime-s.startTime||i.order-s.order),a=0;for(let i of n)for(let s=0;s=r[s]){r[s]=i.endTime,i.order=s+e,s>a&&(a=s);break}return a},"getMaxIntersections"),f2t=x(function(t,e,r,n){let a=Te().gantt,i=Te().securityLevel,s;i==="sandbox"&&(s=We("#i"+e));let o=i==="sandbox"?We(s.nodes()[0].contentDocument.body):We("body"),l=i==="sandbox"?s.nodes()[0].contentDocument:document,u=l.getElementById(e);pf=u.parentElement.offsetWidth,pf===void 0&&(pf=1200),a.useWidth!==void 0&&(pf=a.useWidth);let h=n.db.getTasks(),f=[];for(let S of h)f.push(S.type);f=_(f);let d={},p=2*a.topPadding;if(n.db.getDisplayMode()==="compact"||a.displayMode==="compact"){let S={};for(let M of h)S[M.section]===void 0?S[M.section]=[M]:S[M.section].push(M);let L=0;for(let M of Object.keys(S)){let D=h2t(S[M],L)+1;L+=D,p+=D*(a.barHeight+a.barGap),d[M]=D}}else{p+=h.length*(a.barHeight+a.barGap);for(let S of f)d[S]=h.filter(L=>L.type===S).length}u.setAttribute("viewBox","0 0 "+pf+" "+p);let m=o.select(`[id="${e}"]`),g=ZE().domain([nE(h,function(S){return S.startTime}),rE(h,function(S){return S.endTime})]).rangeRound([0,pf-a.leftPadding-a.rightPadding]);function v(S,L){let M=S.startTime,D=L.startTime,T=0;return M>D?T=1:MG.order))].map(G=>S.find(z=>z.order===G));m.append("g").selectAll("rect").data(R).enter().append("rect").attr("x",0).attr("y",function(G,z){return z=G.order,z*L+M-2}).attr("width",function(){return N-a.rightPadding/2}).attr("height",L).attr("class",function(G){for(let[z,H]of f.entries())if(G.type===H)return"section section"+z%a.numberSectionStyles;return"section section0"});let P=m.append("g").selectAll("rect").data(S).enter(),B=n.db.getLinks();if(P.append("rect").attr("id",function(G){return G.id}).attr("rx",3).attr("ry",3).attr("x",function(G){return G.milestone?g(G.startTime)+D+.5*(g(G.endTime)-g(G.startTime))-.5*T:g(G.startTime)+D}).attr("y",function(G,z){return z=G.order,z*L+M}).attr("width",function(G){return G.milestone?T:g(G.renderEndTime||G.endTime)-g(G.startTime)}).attr("height",T).attr("transform-origin",function(G,z){return z=G.order,(g(G.startTime)+D+.5*(g(G.endTime)-g(G.startTime))).toString()+"px "+(z*L+M+.5*T).toString()+"px"}).attr("class",function(G){let z="task",H="";G.classes.length>0&&(H=G.classes.join(" "));let Q=0;for(let[ie,se]of f.entries())G.type===se&&(Q=ie%a.numberSectionStyles);let Y="";return G.active?G.crit?Y+=" activeCrit":Y=" active":G.done?G.crit?Y=" doneCrit":Y=" done":G.crit&&(Y+=" crit"),Y.length===0&&(Y=" task"),G.milestone&&(Y=" milestone "+Y),Y+=Q,Y+=" "+H,z+Y}),P.append("text").attr("id",function(G){return G.id+"-text"}).text(function(G){return G.task}).attr("font-size",a.fontSize).attr("x",function(G){let z=g(G.startTime),H=g(G.renderEndTime||G.endTime);G.milestone&&(z+=.5*(g(G.endTime)-g(G.startTime))-.5*T),G.milestone&&(H=z+T);let Q=this.getBBox().width;return Q>H-z?H+Q+1.5*a.leftPadding>N?z+D-5:H+D+5:(H-z)/2+z+D}).attr("y",function(G,z){return z=G.order,z*L+a.barHeight/2+(a.fontSize/2-2)+M}).attr("text-height",T).attr("class",function(G){let z=g(G.startTime),H=g(G.endTime);G.milestone&&(H=z+T);let Q=this.getBBox().width,Y="";G.classes.length>0&&(Y=G.classes.join(" "));let ie=0;for(let[oe,pe]of f.entries())G.type===pe&&(ie=oe%a.numberSectionStyles);let se="";return G.active&&(G.crit?se="activeCritText"+ie:se="activeText"+ie),G.done?G.crit?se=se+" doneCritText"+ie:se=se+" doneText"+ie:G.crit&&(se=se+" critText"+ie),G.milestone&&(se+=" milestoneText"),Q>H-z?H+Q+1.5*a.leftPadding>N?Y+" taskTextOutsideLeft taskTextOutside"+ie+" "+se:Y+" taskTextOutsideRight taskTextOutside"+ie+" "+se+" width-"+Q:Y+" taskText taskText"+ie+" "+se+" width-"+Q}),Te().securityLevel==="sandbox"){let G;G=We("#i"+e);let z=G.nodes()[0].contentDocument;P.filter(function(H){return B.has(H.id)}).each(function(H){var Q=z.querySelector("#"+H.id),Y=z.querySelector("#"+H.id+"-text");let ie=Q.parentNode;var se=z.createElement("a");se.setAttribute("xlink:href",B.get(H.id)),se.setAttribute("target","_top"),ie.appendChild(se),se.appendChild(Q),se.appendChild(Y)})}}x(b,"drawRects");function w(S,L,M,D,T,I,N,O){if(N.length===0&&O.length===0)return;let R,P;for(let{startTime:Q,endTime:Y}of I)(R===void 0||QP)&&(P=Y);if(!R||!P)return;if((0,QA.default)(P).diff((0,QA.default)(R),"year")>5){te.warn("The difference between the min and max time is more than 5 years. This will cause performance issues. Skipping drawing exclude days.");return}let B=n.db.getDateFormat(),F=[],G=null,z=(0,QA.default)(R);for(;z.valueOf()<=P;)n.db.isInvalidDate(z,B,N,O)?G?G.end=z:G={start:z,end:z}:G&&(F.push(G),G=null),z=z.add(1,"d");m.append("g").selectAll("rect").data(F).enter().append("rect").attr("id",function(Q){return"exclude-"+Q.start.format("YYYY-MM-DD")}).attr("x",function(Q){return g(Q.start)+M}).attr("y",a.gridLineStartPadding).attr("width",function(Q){let Y=Q.end.add(1,"day");return g(Y)-g(Q.start)}).attr("height",T-L-a.gridLineStartPadding).attr("transform-origin",function(Q,Y){return(g(Q.start)+M+.5*(g(Q.end)-g(Q.start))).toString()+"px "+(Y*S+.5*T).toString()+"px"}).attr("class","exclude-range")}x(w,"drawExcludeDays");function C(S,L,M,D){let T=TN(g).tickSize(-D+L+a.gridLineStartPadding).tickFormat($p(n.db.getAxisFormat()||a.axisFormat||"%Y-%m-%d")),N=/^([1-9]\d*)(millisecond|second|minute|hour|day|week|month)$/.exec(n.db.getTickInterval()||a.tickInterval);if(N!==null){let O=N[1],R=N[2],P=n.db.getWeekday()||a.weekday;switch(R){case"millisecond":T.ticks(Zu.every(O));break;case"second":T.ticks(Oo.every(O));break;case"minute":T.ticks(Rh.every(O));break;case"hour":T.ticks(Ih.every(O));break;case"day":T.ticks(ol.every(O));break;case"week":T.ticks(rCe[P].every(O));break;case"month":T.ticks(Dh.every(O));break}}if(m.append("g").attr("class","grid").attr("transform","translate("+S+", "+(D-50)+")").call(T).selectAll("text").style("text-anchor","middle").attr("fill","#000").attr("stroke","none").attr("font-size",10).attr("dy","1em"),n.db.topAxisEnabled()||a.topAxis){let O=kN(g).tickSize(-D+L+a.gridLineStartPadding).tickFormat($p(n.db.getAxisFormat()||a.axisFormat||"%Y-%m-%d"));if(N!==null){let R=N[1],P=N[2],B=n.db.getWeekday()||a.weekday;switch(P){case"millisecond":O.ticks(Zu.every(R));break;case"second":O.ticks(Oo.every(R));break;case"minute":O.ticks(Rh.every(R));break;case"hour":O.ticks(Ih.every(R));break;case"day":O.ticks(ol.every(R));break;case"week":O.ticks(rCe[B].every(R));break;case"month":O.ticks(Dh.every(R));break}}m.append("g").attr("class","grid").attr("transform","translate("+S+", "+L+")").call(O).selectAll("text").style("text-anchor","middle").attr("fill","#000").attr("stroke","none").attr("font-size",10)}}x(C,"makeGrid");function k(S,L){let M=0,D=Object.keys(d).map(T=>[T,d[T]]);m.append("g").selectAll("text").data(D).enter().append(function(T){let I=T[0].split(Ze.lineBreakRegex),N=-(I.length-1)/2,O=l.createElementNS("http://www.w3.org/2000/svg","text");O.setAttribute("dy",N+"em");for(let[R,P]of I.entries()){let B=l.createElementNS("http://www.w3.org/2000/svg","tspan");B.setAttribute("alignment-baseline","central"),B.setAttribute("x","10"),R>0&&B.setAttribute("dy","1em"),B.textContent=P,O.appendChild(B)}return O}).attr("x",10).attr("y",function(T,I){if(I>0)for(let N=0;N` +`,"getStyles"),r3t=t3t,n3t={parser:Mbt,db:vSe,renderer:e3t,styles:r3t}});var TSe=Bi((JH,eV)=>{(function(t,e){typeof JH=="object"&&typeof eV<"u"?eV.exports=e():typeof define=="function"&&define.amd?define(e):(t=typeof globalThis<"u"?globalThis:t||self).dayjs_plugin_isoWeek=e()})(JH,(function(){"use strict";var t="day";return function(e,r,n){var i=function(o){return o.add(4-o.isoWeekday(),t)},a=r.prototype;a.isoWeekYear=function(){return i(this).year()},a.isoWeek=function(o){if(!this.$utils().u(o))return this.add(7*(o-this.isoWeek()),t);var l,u,h,f,d=i(this),p=(l=this.isoWeekYear(),u=this.$u,h=(u?n.utc:n)().year(l).startOf("year"),f=4-h.isoWeekday(),h.isoWeekday()>4&&(f+=7),h.add(f,t));return d.diff(p,"week")+1},a.isoWeekday=function(o){return this.$utils().u(o)?this.day()||7:this.day(this.day()%7?o:o-7)};var s=a.startOf;a.startOf=function(o,l){var u=this.$utils(),h=!!u.u(l)||l;return u.p(o)==="isoweek"?h?this.date(this.date()-(this.isoWeekday()-1)).startOf("day"):this.date(this.date()-1-(this.isoWeekday()-1)+7).endOf("day"):s.bind(this)(o,l)}}}))});var ESe=Bi((tV,rV)=>{(function(t,e){typeof tV=="object"&&typeof rV<"u"?rV.exports=e():typeof define=="function"&&define.amd?define(e):(t=typeof globalThis<"u"?globalThis:t||self).dayjs_plugin_customParseFormat=e()})(tV,(function(){"use strict";var t={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},e=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,r=/\d/,n=/\d\d/,i=/\d\d?/,a=/\d*[^-_:/,()\s\d]+/,s={},o=function(m){return(m=+m)+(m>68?1900:2e3)},l=function(m){return function(g){this[m]=+g}},u=[/[+-]\d\d:?(\d\d)?|Z/,function(m){(this.zone||(this.zone={})).offset=(function(g){if(!g||g==="Z")return 0;var y=g.match(/([+-]|\d\d)/g),v=60*y[1]+(+y[2]||0);return v===0?0:y[0]==="+"?-v:v})(m)}],h=function(m){var g=s[m];return g&&(g.indexOf?g:g.s.concat(g.f))},f=function(m,g){var y,v=s.meridiem;if(v){for(var x=1;x<=24;x+=1)if(m.indexOf(v(x,0,g))>-1){y=x>12;break}}else y=m===(g?"pm":"PM");return y},d={A:[a,function(m){this.afternoon=f(m,!1)}],a:[a,function(m){this.afternoon=f(m,!0)}],Q:[r,function(m){this.month=3*(m-1)+1}],S:[r,function(m){this.milliseconds=100*+m}],SS:[n,function(m){this.milliseconds=10*+m}],SSS:[/\d{3}/,function(m){this.milliseconds=+m}],s:[i,l("seconds")],ss:[i,l("seconds")],m:[i,l("minutes")],mm:[i,l("minutes")],H:[i,l("hours")],h:[i,l("hours")],HH:[i,l("hours")],hh:[i,l("hours")],D:[i,l("day")],DD:[n,l("day")],Do:[a,function(m){var g=s.ordinal,y=m.match(/\d+/);if(this.day=y[0],g)for(var v=1;v<=31;v+=1)g(v).replace(/\[|\]/g,"")===m&&(this.day=v)}],w:[i,l("week")],ww:[n,l("week")],M:[i,l("month")],MM:[n,l("month")],MMM:[a,function(m){var g=h("months"),y=(h("monthsShort")||g.map((function(v){return v.slice(0,3)}))).indexOf(m)+1;if(y<1)throw new Error;this.month=y%12||y}],MMMM:[a,function(m){var g=h("months").indexOf(m)+1;if(g<1)throw new Error;this.month=g%12||g}],Y:[/[+-]?\d+/,l("year")],YY:[n,function(m){this.year=o(m)}],YYYY:[/\d{4}/,l("year")],Z:u,ZZ:u};function p(m){var g,y;g=m,y=s&&s.formats;for(var v=(m=g.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(A,I,P){var O=P&&P.toUpperCase();return I||y[P]||t[P]||y[O].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(C,N,B){return N||B.slice(1)}))}))).match(e),x=v.length,k=0;k-1)return new Date((M==="X"?1e3:1)*F);var q=p(M)(F),V=q.year,U=q.month,J=q.day,se=q.hours,re=q.minutes,me=q.seconds,ge=q.milliseconds,ye=q.zone,_e=q.week,ue=new Date,ie=J||(V||U?1:ue.getDate()),le=V||ue.getFullYear(),oe=0;V&&!U||(oe=U>0?U-1:ue.getMonth());var ne,pe=se||0,te=re||0,He=me||0,de=ge||0;return ye?new Date(Date.UTC(le,oe,ie,pe,te,He,de+60*ye.offset*1e3)):$?new Date(Date.UTC(le,oe,ie,pe,te,He,de)):(ne=new Date(le,oe,ie,pe,te,He,de),_e&&(ne=z(ne).week(_e).toDate()),ne)}catch{return new Date("")}})(_,R,T,y),this.init(),O&&O!==!0&&(this.$L=this.locale(O).$L),P&&_!=this.format(R)&&(this.$d=new Date("")),s={}}else if(R instanceof Array)for(var C=R.length,N=1;N<=C;N+=1){S[1]=R[N-1];var B=y.apply(this,S);if(B.isValid()){this.$d=B.$d,this.$L=B.$L,this.init();break}N===C&&(this.$d=new Date(""))}else x.call(this,k)}}}))});var SSe=Bi((nV,iV)=>{(function(t,e){typeof nV=="object"&&typeof iV<"u"?iV.exports=e():typeof define=="function"&&define.amd?define(e):(t=typeof globalThis<"u"?globalThis:t||self).dayjs_plugin_advancedFormat=e()})(nV,(function(){"use strict";return function(t,e){var r=e.prototype,n=r.format;r.format=function(i){var a=this,s=this.$locale();if(!this.isValid())return n.bind(this)(i);var o=this.$utils(),l=(i||"YYYY-MM-DDTHH:mm:ssZ").replace(/\[([^\]]+)]|Q|wo|ww|w|WW|W|zzz|z|gggg|GGGG|Do|X|x|k{1,2}|S/g,(function(u){switch(u){case"Q":return Math.ceil((a.$M+1)/3);case"Do":return s.ordinal(a.$D);case"gggg":return a.weekYear();case"GGGG":return a.isoWeekYear();case"wo":return s.ordinal(a.week(),"W");case"w":case"ww":return o.s(a.week(),u==="w"?1:2,"0");case"W":case"WW":return o.s(a.isoWeek(),u==="W"?1:2,"0");case"k":case"kk":return o.s(String(a.$H===0?24:a.$H),u==="k"?1:2,"0");case"X":return Math.floor(a.$d.getTime()/1e3);case"x":return a.$d.getTime();case"z":return"["+a.offsetName()+"]";case"zzz":return"["+a.offsetName("long")+"]";default:return u}}));return n.bind(this)(l)}}}))});var GSe={};Mr(GSe,{diagram:()=>Y3t});function vV(t,e,r){let n=!0;for(;n;)n=!1,r.forEach(function(i){let a="^\\s*"+i+"\\s*$",s=new RegExp(a);t[0].match(s)&&(e[i]=!0,t.shift(1),n=!0)})}var LSe,Hl,RSe,DSe,ISe,IL,aV,i3t,CSe,Q0,uV,cV,hV,g8,y8,fV,dV,ML,w4,pV,MSe,mV,v8,gV,yV,NL,sV,a3t,s3t,o3t,l3t,u3t,c3t,h3t,f3t,d3t,p3t,m3t,g3t,y3t,v3t,x3t,b3t,w3t,k3t,T3t,E3t,S3t,C3t,_3t,NSe,A3t,L3t,R3t,OSe,D3t,oV,PSe,BSe,RL,b4,I3t,M3t,lV,DL,Va,FSe,N3t,eg,O3t,_Se,P3t,zSe,B3t,$Se,F3t,z3t,$3t,G3t,ASe,q3t,xf,U3t,H3t,V3t,W3t,Y3t,qSe=D(()=>{Hn();Nr();LSe=Na(b2(),1),Hl=Na(Jk(),1),RSe=Na(TSe(),1),DSe=Na(ESe(),1),ISe=Na(SSe(),1),IL=Na(Jk(),1);Or();aV=(function(){var t=b(function(N,B,F,M){for(F=F||{},M=N.length;M--;F[N[M]]=B);return F},"o"),e=[6,8,10,12,13,14,15,16,17,18,20,21,22,23,24,25,26,27,28,29,30,31,33,35,36,38,40],r=[1,26],n=[1,27],i=[1,28],a=[1,29],s=[1,30],o=[1,31],l=[1,32],u=[1,33],h=[1,34],f=[1,9],d=[1,10],p=[1,11],m=[1,12],g=[1,13],y=[1,14],v=[1,15],x=[1,16],k=[1,19],_=[1,20],T=[1,21],S=[1,22],R=[1,23],A=[1,25],I=[1,35],P={trace:b(function(){},"trace"),yy:{},symbols_:{error:2,start:3,gantt:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NL:10,weekday:11,weekday_monday:12,weekday_tuesday:13,weekday_wednesday:14,weekday_thursday:15,weekday_friday:16,weekday_saturday:17,weekday_sunday:18,weekend:19,weekend_friday:20,weekend_saturday:21,dateFormat:22,inclusiveEndDates:23,topAxis:24,axisFormat:25,tickInterval:26,excludes:27,includes:28,todayMarker:29,title:30,acc_title:31,acc_title_value:32,acc_descr:33,acc_descr_value:34,acc_descr_multiline_value:35,section:36,clickStatement:37,taskTxt:38,taskData:39,click:40,callbackname:41,callbackargs:42,href:43,clickStatementDebug:44,$accept:0,$end:1},terminals_:{2:"error",4:"gantt",6:"EOF",8:"SPACE",10:"NL",12:"weekday_monday",13:"weekday_tuesday",14:"weekday_wednesday",15:"weekday_thursday",16:"weekday_friday",17:"weekday_saturday",18:"weekday_sunday",20:"weekend_friday",21:"weekend_saturday",22:"dateFormat",23:"inclusiveEndDates",24:"topAxis",25:"axisFormat",26:"tickInterval",27:"excludes",28:"includes",29:"todayMarker",30:"title",31:"acc_title",32:"acc_title_value",33:"acc_descr",34:"acc_descr_value",35:"acc_descr_multiline_value",36:"section",38:"taskTxt",39:"taskData",40:"click",41:"callbackname",42:"callbackargs",43:"href"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[11,1],[11,1],[11,1],[11,1],[11,1],[11,1],[11,1],[19,1],[19,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,2],[9,2],[9,1],[9,1],[9,1],[9,2],[37,2],[37,3],[37,3],[37,4],[37,3],[37,4],[37,2],[44,2],[44,3],[44,3],[44,4],[44,3],[44,4],[44,2]],performAction:b(function(B,F,M,$,z,q,V){var U=q.length-1;switch(z){case 1:return q[U-1];case 2:this.$=[];break;case 3:q[U-1].push(q[U]),this.$=q[U-1];break;case 4:case 5:this.$=q[U];break;case 6:case 7:this.$=[];break;case 8:$.setWeekday("monday");break;case 9:$.setWeekday("tuesday");break;case 10:$.setWeekday("wednesday");break;case 11:$.setWeekday("thursday");break;case 12:$.setWeekday("friday");break;case 13:$.setWeekday("saturday");break;case 14:$.setWeekday("sunday");break;case 15:$.setWeekend("friday");break;case 16:$.setWeekend("saturday");break;case 17:$.setDateFormat(q[U].substr(11)),this.$=q[U].substr(11);break;case 18:$.enableInclusiveEndDates(),this.$=q[U].substr(18);break;case 19:$.TopAxis(),this.$=q[U].substr(8);break;case 20:$.setAxisFormat(q[U].substr(11)),this.$=q[U].substr(11);break;case 21:$.setTickInterval(q[U].substr(13)),this.$=q[U].substr(13);break;case 22:$.setExcludes(q[U].substr(9)),this.$=q[U].substr(9);break;case 23:$.setIncludes(q[U].substr(9)),this.$=q[U].substr(9);break;case 24:$.setTodayMarker(q[U].substr(12)),this.$=q[U].substr(12);break;case 27:$.setDiagramTitle(q[U].substr(6)),this.$=q[U].substr(6);break;case 28:this.$=q[U].trim(),$.setAccTitle(this.$);break;case 29:case 30:this.$=q[U].trim(),$.setAccDescription(this.$);break;case 31:$.addSection(q[U].substr(8)),this.$=q[U].substr(8);break;case 33:$.addTask(q[U-1],q[U]),this.$="task";break;case 34:this.$=q[U-1],$.setClickEvent(q[U-1],q[U],null);break;case 35:this.$=q[U-2],$.setClickEvent(q[U-2],q[U-1],q[U]);break;case 36:this.$=q[U-2],$.setClickEvent(q[U-2],q[U-1],null),$.setLink(q[U-2],q[U]);break;case 37:this.$=q[U-3],$.setClickEvent(q[U-3],q[U-2],q[U-1]),$.setLink(q[U-3],q[U]);break;case 38:this.$=q[U-2],$.setClickEvent(q[U-2],q[U],null),$.setLink(q[U-2],q[U-1]);break;case 39:this.$=q[U-3],$.setClickEvent(q[U-3],q[U-1],q[U]),$.setLink(q[U-3],q[U-2]);break;case 40:this.$=q[U-1],$.setLink(q[U-1],q[U]);break;case 41:case 47:this.$=q[U-1]+" "+q[U];break;case 42:case 43:case 45:this.$=q[U-2]+" "+q[U-1]+" "+q[U];break;case 44:case 46:this.$=q[U-3]+" "+q[U-2]+" "+q[U-1]+" "+q[U];break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},t(e,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:17,12:r,13:n,14:i,15:a,16:s,17:o,18:l,19:18,20:u,21:h,22:f,23:d,24:p,25:m,26:g,27:y,28:v,29:x,30:k,31:_,33:T,35:S,36:R,37:24,38:A,40:I},t(e,[2,7],{1:[2,1]}),t(e,[2,3]),{9:36,11:17,12:r,13:n,14:i,15:a,16:s,17:o,18:l,19:18,20:u,21:h,22:f,23:d,24:p,25:m,26:g,27:y,28:v,29:x,30:k,31:_,33:T,35:S,36:R,37:24,38:A,40:I},t(e,[2,5]),t(e,[2,6]),t(e,[2,17]),t(e,[2,18]),t(e,[2,19]),t(e,[2,20]),t(e,[2,21]),t(e,[2,22]),t(e,[2,23]),t(e,[2,24]),t(e,[2,25]),t(e,[2,26]),t(e,[2,27]),{32:[1,37]},{34:[1,38]},t(e,[2,30]),t(e,[2,31]),t(e,[2,32]),{39:[1,39]},t(e,[2,8]),t(e,[2,9]),t(e,[2,10]),t(e,[2,11]),t(e,[2,12]),t(e,[2,13]),t(e,[2,14]),t(e,[2,15]),t(e,[2,16]),{41:[1,40],43:[1,41]},t(e,[2,4]),t(e,[2,28]),t(e,[2,29]),t(e,[2,33]),t(e,[2,34],{42:[1,42],43:[1,43]}),t(e,[2,40],{41:[1,44]}),t(e,[2,35],{43:[1,45]}),t(e,[2,36]),t(e,[2,38],{42:[1,46]}),t(e,[2,37]),t(e,[2,39])],defaultActions:{},parseError:b(function(B,F){if(F.recoverable)this.trace(B);else{var M=new Error(B);throw M.hash=F,M}},"parseError"),parse:b(function(B){var F=this,M=[0],$=[],z=[null],q=[],V=this.table,U="",J=0,se=0,re=0,me=2,ge=1,ye=q.slice.call(arguments,1),_e=Object.create(this.lexer),ue={yy:{}};for(var ie in this.yy)Object.prototype.hasOwnProperty.call(this.yy,ie)&&(ue.yy[ie]=this.yy[ie]);_e.setInput(B,ue.yy),ue.yy.lexer=_e,ue.yy.parser=this,typeof _e.yylloc>"u"&&(_e.yylloc={});var le=_e.yylloc;q.push(le);var oe=_e.options&&_e.options.ranges;typeof ue.yy.parseError=="function"?this.parseError=ue.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function ne(Re){M.length=M.length-2*Re,z.length=z.length-Re,q.length=q.length-Re}b(ne,"popStack");function pe(){var Re;return Re=$.pop()||_e.lex()||ge,typeof Re!="number"&&(Re instanceof Array&&($=Re,Re=$.pop()),Re=F.symbols_[Re]||Re),Re}b(pe,"lex");for(var te,He,de,ce,st,Ae,Ye={},Ge,rt,Xe,Ze;;){if(de=M[M.length-1],this.defaultActions[de]?ce=this.defaultActions[de]:((te===null||typeof te>"u")&&(te=pe()),ce=V[de]&&V[de][te]),typeof ce>"u"||!ce.length||!ce[0]){var Pe="";Ze=[];for(Ge in V[de])this.terminals_[Ge]&&Ge>me&&Ze.push("'"+this.terminals_[Ge]+"'");_e.showPosition?Pe="Parse error on line "+(J+1)+`: +`+_e.showPosition()+` +Expecting `+Ze.join(", ")+", got '"+(this.terminals_[te]||te)+"'":Pe="Parse error on line "+(J+1)+": Unexpected "+(te==ge?"end of input":"'"+(this.terminals_[te]||te)+"'"),this.parseError(Pe,{text:_e.match,token:this.terminals_[te]||te,line:_e.yylineno,loc:le,expected:Ze})}if(ce[0]instanceof Array&&ce.length>1)throw new Error("Parse Error: multiple actions possible at state: "+de+", token: "+te);switch(ce[0]){case 1:M.push(te),z.push(_e.yytext),q.push(_e.yylloc),M.push(ce[1]),te=null,He?(te=He,He=null):(se=_e.yyleng,U=_e.yytext,J=_e.yylineno,le=_e.yylloc,re>0&&re--);break;case 2:if(rt=this.productions_[ce[1]][1],Ye.$=z[z.length-rt],Ye._$={first_line:q[q.length-(rt||1)].first_line,last_line:q[q.length-1].last_line,first_column:q[q.length-(rt||1)].first_column,last_column:q[q.length-1].last_column},oe&&(Ye._$.range=[q[q.length-(rt||1)].range[0],q[q.length-1].range[1]]),Ae=this.performAction.apply(Ye,[U,se,J,ue.yy,ce[1],z,q].concat(ye)),typeof Ae<"u")return Ae;rt&&(M=M.slice(0,-1*rt*2),z=z.slice(0,-1*rt),q=q.slice(0,-1*rt)),M.push(this.productions_[ce[1]][0]),z.push(Ye.$),q.push(Ye._$),Xe=V[M[M.length-2]][M[M.length-1]],M.push(Xe);break;case 3:return!0}}return!0},"parse")},O=(function(){var N={EOF:1,parseError:b(function(F,M){if(this.yy.parser)this.yy.parser.parseError(F,M);else throw new Error(F)},"parseError"),setInput:b(function(B,F){return this.yy=F||this.yy||{},this._input=B,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:b(function(){var B=this._input[0];this.yytext+=B,this.yyleng++,this.offset++,this.match+=B,this.matched+=B;var F=B.match(/(?:\r\n?|\n).*/g);return F?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),B},"input"),unput:b(function(B){var F=B.length,M=B.split(/(?:\r\n?|\n)/g);this._input=B+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-F),this.offset-=F;var $=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),M.length-1&&(this.yylineno-=M.length-1);var z=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:M?(M.length===$.length?this.yylloc.first_column:0)+$[$.length-M.length].length-M[0].length:this.yylloc.first_column-F},this.options.ranges&&(this.yylloc.range=[z[0],z[0]+this.yyleng-F]),this.yyleng=this.yytext.length,this},"unput"),more:b(function(){return this._more=!0,this},"more"),reject:b(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). +`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:b(function(B){this.unput(this.match.slice(B))},"less"),pastInput:b(function(){var B=this.matched.substr(0,this.matched.length-this.match.length);return(B.length>20?"...":"")+B.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:b(function(){var B=this.match;return B.length<20&&(B+=this._input.substr(0,20-B.length)),(B.substr(0,20)+(B.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:b(function(){var B=this.pastInput(),F=new Array(B.length+1).join("-");return B+this.upcomingInput()+` +`+F+"^"},"showPosition"),test_match:b(function(B,F){var M,$,z;if(this.options.backtrack_lexer&&(z={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(z.yylloc.range=this.yylloc.range.slice(0))),$=B[0].match(/(?:\r\n?|\n).*/g),$&&(this.yylineno+=$.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:$?$[$.length-1].length-$[$.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+B[0].length},this.yytext+=B[0],this.match+=B[0],this.matches=B,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(B[0].length),this.matched+=B[0],M=this.performAction.call(this,this.yy,this,F,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),M)return M;if(this._backtrack){for(var q in z)this[q]=z[q];return!1}return!1},"test_match"),next:b(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var B,F,M,$;this._more||(this.yytext="",this.match="");for(var z=this._currentRules(),q=0;qF[0].length)){if(F=M,$=q,this.options.backtrack_lexer){if(B=this.test_match(M,z[q]),B!==!1)return B;if(this._backtrack){F=!1;continue}else return!1}else if(!this.options.flex)break}return F?(B=this.test_match(F,z[$]),B!==!1?B:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. +`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:b(function(){var F=this.next();return F||this.lex()},"lex"),begin:b(function(F){this.conditionStack.push(F)},"begin"),popState:b(function(){var F=this.conditionStack.length-1;return F>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:b(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:b(function(F){return F=this.conditionStack.length-1-Math.abs(F||0),F>=0?this.conditionStack[F]:"INITIAL"},"topState"),pushState:b(function(F){this.begin(F)},"pushState"),stateStackSize:b(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:b(function(F,M,$,z){var q=z;switch($){case 0:return this.begin("open_directive"),"open_directive";break;case 1:return this.begin("acc_title"),31;break;case 2:return this.popState(),"acc_title_value";break;case 3:return this.begin("acc_descr"),33;break;case 4:return this.popState(),"acc_descr_value";break;case 5:this.begin("acc_descr_multiline");break;case 6:this.popState();break;case 7:return"acc_descr_multiline_value";case 8:break;case 9:break;case 10:break;case 11:return 10;case 12:break;case 13:break;case 14:this.begin("href");break;case 15:this.popState();break;case 16:return 43;case 17:this.begin("callbackname");break;case 18:this.popState();break;case 19:this.popState(),this.begin("callbackargs");break;case 20:return 41;case 21:this.popState();break;case 22:return 42;case 23:this.begin("click");break;case 24:this.popState();break;case 25:return 40;case 26:return 4;case 27:return 22;case 28:return 23;case 29:return 24;case 30:return 25;case 31:return 26;case 32:return 28;case 33:return 27;case 34:return 29;case 35:return 12;case 36:return 13;case 37:return 14;case 38:return 15;case 39:return 16;case 40:return 17;case 41:return 18;case 42:return 20;case 43:return 21;case 44:return"date";case 45:return 30;case 46:return"accDescription";case 47:return 36;case 48:return 38;case 49:return 39;case 50:return":";case 51:return 6;case 52:return"INVALID"}},"anonymous"),rules:[/^(?:%%\{)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:%%(?!\{)*[^\n]*)/i,/^(?:[^\}]%%*[^\n]*)/i,/^(?:%%*[^\n]*[\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:%[^\n]*)/i,/^(?:href[\s]+["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:call[\s]+)/i,/^(?:\([\s]*\))/i,/^(?:\()/i,/^(?:[^(]*)/i,/^(?:\))/i,/^(?:[^)]*)/i,/^(?:click[\s]+)/i,/^(?:[\s\n])/i,/^(?:[^\s\n]*)/i,/^(?:gantt\b)/i,/^(?:dateFormat\s[^#\n;]+)/i,/^(?:inclusiveEndDates\b)/i,/^(?:topAxis\b)/i,/^(?:axisFormat\s[^#\n;]+)/i,/^(?:tickInterval\s[^#\n;]+)/i,/^(?:includes\s[^#\n;]+)/i,/^(?:excludes\s[^#\n;]+)/i,/^(?:todayMarker\s[^\n;]+)/i,/^(?:weekday\s+monday\b)/i,/^(?:weekday\s+tuesday\b)/i,/^(?:weekday\s+wednesday\b)/i,/^(?:weekday\s+thursday\b)/i,/^(?:weekday\s+friday\b)/i,/^(?:weekday\s+saturday\b)/i,/^(?:weekday\s+sunday\b)/i,/^(?:weekend\s+friday\b)/i,/^(?:weekend\s+saturday\b)/i,/^(?:\d\d\d\d-\d\d-\d\d\b)/i,/^(?:title\s[^\n]+)/i,/^(?:accDescription\s[^#\n;]+)/i,/^(?:section\s[^\n]+)/i,/^(?:[^:\n]+)/i,/^(?::[^#\n;]+)/i,/^(?::)/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[6,7],inclusive:!1},acc_descr:{rules:[4],inclusive:!1},acc_title:{rules:[2],inclusive:!1},callbackargs:{rules:[21,22],inclusive:!1},callbackname:{rules:[18,19,20],inclusive:!1},href:{rules:[15,16],inclusive:!1},click:{rules:[24,25],inclusive:!1},INITIAL:{rules:[0,1,3,5,8,9,10,11,12,13,14,17,23,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52],inclusive:!0}}};return N})();P.lexer=O;function C(){this.yy={}}return b(C,"Parser"),C.prototype=P,P.Parser=C,new C})();aV.parser=aV;i3t=aV;Hl.default.extend(RSe.default);Hl.default.extend(DSe.default);Hl.default.extend(ISe.default);CSe={friday:5,saturday:6},Q0="",uV="",cV=void 0,hV="",g8=[],y8=[],fV=new Map,dV=[],ML=[],w4="",pV="",MSe=["active","done","crit","milestone"],mV=[],v8=!1,gV=!1,yV="sunday",NL="saturday",sV=0,a3t=b(function(){dV=[],ML=[],w4="",mV=[],RL=0,lV=void 0,DL=void 0,Va=[],Q0="",uV="",pV="",cV=void 0,hV="",g8=[],y8=[],v8=!1,gV=!1,sV=0,fV=new Map,Jr(),yV="sunday",NL="saturday"},"clear"),s3t=b(function(t){uV=t},"setAxisFormat"),o3t=b(function(){return uV},"getAxisFormat"),l3t=b(function(t){cV=t},"setTickInterval"),u3t=b(function(){return cV},"getTickInterval"),c3t=b(function(t){hV=t},"setTodayMarker"),h3t=b(function(){return hV},"getTodayMarker"),f3t=b(function(t){Q0=t},"setDateFormat"),d3t=b(function(){v8=!0},"enableInclusiveEndDates"),p3t=b(function(){return v8},"endDatesAreInclusive"),m3t=b(function(){gV=!0},"enableTopAxis"),g3t=b(function(){return gV},"topAxisEnabled"),y3t=b(function(t){pV=t},"setDisplayMode"),v3t=b(function(){return pV},"getDisplayMode"),x3t=b(function(){return Q0},"getDateFormat"),b3t=b(function(t){g8=t.toLowerCase().split(/[\s,]+/)},"setIncludes"),w3t=b(function(){return g8},"getIncludes"),k3t=b(function(t){y8=t.toLowerCase().split(/[\s,]+/)},"setExcludes"),T3t=b(function(){return y8},"getExcludes"),E3t=b(function(){return fV},"getLinks"),S3t=b(function(t){w4=t,dV.push(t)},"addSection"),C3t=b(function(){return dV},"getSections"),_3t=b(function(){let t=_Se(),e=10,r=0;for(;!t&&r[\d\w- ]+)/.exec(r);if(i!==null){let s=null;for(let l of i.groups.ids.split(" ")){let u=eg(l);u!==void 0&&(!s||u.endTime>s.endTime)&&(s=u)}if(s)return s.endTime;let o=new Date;return o.setHours(0,0,0,0),o}let a=(0,Hl.default)(r,e.trim(),!0);if(a.isValid())return a.toDate();{he.debug("Invalid date:"+r),he.debug("With date format:"+e.trim());let s=new Date(r);if(s===void 0||isNaN(s.getTime())||s.getFullYear()<-1e4||s.getFullYear()>1e4)throw new Error("Invalid date:"+r);return s}},"getStartDate"),PSe=b(function(t){let e=/^(\d+(?:\.\d+)?)([Mdhmswy]|ms)$/.exec(t.trim());return e!==null?[Number.parseFloat(e[1]),e[2]]:[NaN,"ms"]},"parseDuration"),BSe=b(function(t,e,r,n=!1){r=r.trim();let a=/^until\s+(?[\d\w- ]+)/.exec(r);if(a!==null){let h=null;for(let d of a.groups.ids.split(" ")){let p=eg(d);p!==void 0&&(!h||p.startTime{window.open(r,"_self")}),fV.set(n,r))}),zSe(t,"clickable")},"setLink"),zSe=b(function(t,e){t.split(",").forEach(function(r){let n=eg(r);n!==void 0&&n.classes.push(e)})},"setClass"),B3t=b(function(t,e,r){if(Fe().securityLevel!=="loose"||e===void 0)return;let n=[];if(typeof r=="string"){n=r.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let a=0;a{gr.runFunc(e,...n)})},"setClickFun"),$Se=b(function(t,e){mV.push(function(){let r=document.querySelector(`[id="${t}"]`);r!==null&&r.addEventListener("click",function(){e()})},function(){let r=document.querySelector(`[id="${t}-text"]`);r!==null&&r.addEventListener("click",function(){e()})})},"pushFun"),F3t=b(function(t,e,r){t.split(",").forEach(function(n){B3t(n,e,r)}),zSe(t,"clickable")},"setClickEvent"),z3t=b(function(t){mV.forEach(function(e){e(t)})},"bindFunctions"),$3t={getConfig:b(()=>Fe().gantt,"getConfig"),clear:a3t,setDateFormat:f3t,getDateFormat:x3t,enableInclusiveEndDates:d3t,endDatesAreInclusive:p3t,enableTopAxis:m3t,topAxisEnabled:g3t,setAxisFormat:s3t,getAxisFormat:o3t,setTickInterval:l3t,getTickInterval:u3t,setTodayMarker:c3t,getTodayMarker:h3t,setAccTitle:en,getAccTitle:tn,setDiagramTitle:pn,getDiagramTitle:an,setDisplayMode:y3t,getDisplayMode:v3t,setAccDescription:rn,getAccDescription:nn,addSection:S3t,getSections:C3t,getTasks:_3t,addTask:N3t,findTaskById:eg,addTaskOrg:O3t,setIncludes:b3t,getIncludes:w3t,setExcludes:k3t,getExcludes:T3t,setClickEvent:F3t,setLink:P3t,getLinks:E3t,bindFunctions:z3t,parseDuration:PSe,isInvalidDate:NSe,setWeekday:A3t,getWeekday:L3t,setWeekend:R3t};b(vV,"getTaskTags");G3t=b(function(){he.debug("Something is calling, setConf, remove the call")},"setConf"),ASe={monday:id,tuesday:S9,wednesday:C9,thursday:r0,friday:_9,saturday:A9,sunday:Ku},q3t=b((t,e)=>{let r=[...t].map(()=>-1/0),n=[...t].sort((a,s)=>a.startTime-s.startTime||a.order-s.order),i=0;for(let a of n)for(let s=0;s=r[s]){r[s]=a.endTime,a.order=s+e,s>i&&(i=s);break}return i},"getMaxIntersections"),U3t=b(function(t,e,r,n){let i=Fe().gantt,a=Fe().securityLevel,s;a==="sandbox"&&(s=dt("#i"+e));let o=a==="sandbox"?dt(s.nodes()[0].contentDocument.body):dt("body"),l=a==="sandbox"?s.nodes()[0].contentDocument:document,u=l.getElementById(e);xf=u.parentElement.offsetWidth,xf===void 0&&(xf=1200),i.useWidth!==void 0&&(xf=i.useWidth);let h=n.db.getTasks(),f=[];for(let A of h)f.push(A.type);f=R(f);let d={},p=2*i.topPadding;if(n.db.getDisplayMode()==="compact"||i.displayMode==="compact"){let A={};for(let P of h)A[P.section]===void 0?A[P.section]=[P]:A[P.section].push(P);let I=0;for(let P of Object.keys(A)){let O=q3t(A[P],I)+1;I+=O,p+=O*(i.barHeight+i.barGap),d[P]=O}}else{p+=h.length*(i.barHeight+i.barGap);for(let A of f)d[A]=h.filter(I=>I.type===A).length}u.setAttribute("viewBox","0 0 "+xf+" "+p);let m=o.select(`[id="${e}"]`),g=D9().domain([BT(h,function(A){return A.startTime}),PT(h,function(A){return A.endTime})]).rangeRound([0,xf-i.leftPadding-i.rightPadding]);function y(A,I){let P=A.startTime,O=I.startTime,C=0;return P>O?C=1:PV.order))].map(V=>A.find(U=>U.order===V));m.append("g").selectAll("rect").data(M).enter().append("rect").attr("x",0).attr("y",function(V,U){return U=V.order,U*I+P-2}).attr("width",function(){return B-i.rightPadding/2}).attr("height",I).attr("class",function(V){for(let[U,J]of f.entries())if(V.type===J)return"section section"+U%i.numberSectionStyles;return"section section0"});let $=m.append("g").selectAll("rect").data(A).enter(),z=n.db.getLinks();if($.append("rect").attr("id",function(V){return V.id}).attr("rx",3).attr("ry",3).attr("x",function(V){return V.milestone?g(V.startTime)+O+.5*(g(V.endTime)-g(V.startTime))-.5*C:g(V.startTime)+O}).attr("y",function(V,U){return U=V.order,U*I+P}).attr("width",function(V){return V.milestone?C:g(V.renderEndTime||V.endTime)-g(V.startTime)}).attr("height",C).attr("transform-origin",function(V,U){return U=V.order,(g(V.startTime)+O+.5*(g(V.endTime)-g(V.startTime))).toString()+"px "+(U*I+P+.5*C).toString()+"px"}).attr("class",function(V){let U="task",J="";V.classes.length>0&&(J=V.classes.join(" "));let se=0;for(let[me,ge]of f.entries())V.type===ge&&(se=me%i.numberSectionStyles);let re="";return V.active?V.crit?re+=" activeCrit":re=" active":V.done?V.crit?re=" doneCrit":re=" done":V.crit&&(re+=" crit"),re.length===0&&(re=" task"),V.milestone&&(re=" milestone "+re),re+=se,re+=" "+J,U+re}),$.append("text").attr("id",function(V){return V.id+"-text"}).text(function(V){return V.task}).attr("font-size",i.fontSize).attr("x",function(V){let U=g(V.startTime),J=g(V.renderEndTime||V.endTime);V.milestone&&(U+=.5*(g(V.endTime)-g(V.startTime))-.5*C),V.milestone&&(J=U+C);let se=this.getBBox().width;return se>J-U?J+se+1.5*i.leftPadding>B?U+O-5:J+O+5:(J-U)/2+U+O}).attr("y",function(V,U){return U=V.order,U*I+i.barHeight/2+(i.fontSize/2-2)+P}).attr("text-height",C).attr("class",function(V){let U=g(V.startTime),J=g(V.endTime);V.milestone&&(J=U+C);let se=this.getBBox().width,re="";V.classes.length>0&&(re=V.classes.join(" "));let me=0;for(let[ye,_e]of f.entries())V.type===_e&&(me=ye%i.numberSectionStyles);let ge="";return V.active&&(V.crit?ge="activeCritText"+me:ge="activeText"+me),V.done?V.crit?ge=ge+" doneCritText"+me:ge=ge+" doneText"+me:V.crit&&(ge=ge+" critText"+me),V.milestone&&(ge+=" milestoneText"),se>J-U?J+se+1.5*i.leftPadding>B?re+" taskTextOutsideLeft taskTextOutside"+me+" "+ge:re+" taskTextOutsideRight taskTextOutside"+me+" "+ge+" width-"+se:re+" taskText taskText"+me+" "+ge+" width-"+se}),Fe().securityLevel==="sandbox"){let V;V=dt("#i"+e);let U=V.nodes()[0].contentDocument;$.filter(function(J){return z.has(J.id)}).each(function(J){var se=U.querySelector("#"+J.id),re=U.querySelector("#"+J.id+"-text");let me=se.parentNode;var ge=U.createElement("a");ge.setAttribute("xlink:href",z.get(J.id)),ge.setAttribute("target","_top"),me.appendChild(ge),ge.appendChild(se),ge.appendChild(re)})}}b(x,"drawRects");function k(A,I,P,O,C,N,B,F){if(B.length===0&&F.length===0)return;let M,$;for(let{startTime:se,endTime:re}of N)(M===void 0||se$)&&($=re);if(!M||!$)return;if((0,IL.default)($).diff((0,IL.default)(M),"year")>5){he.warn("The difference between the min and max time is more than 5 years. This will cause performance issues. Skipping drawing exclude days.");return}let z=n.db.getDateFormat(),q=[],V=null,U=(0,IL.default)(M);for(;U.valueOf()<=$;)n.db.isInvalidDate(U,z,B,F)?V?V.end=U:V={start:U,end:U}:V&&(q.push(V),V=null),U=U.add(1,"d");m.append("g").selectAll("rect").data(q).enter().append("rect").attr("id",function(se){return"exclude-"+se.start.format("YYYY-MM-DD")}).attr("x",function(se){return g(se.start)+P}).attr("y",i.gridLineStartPadding).attr("width",function(se){let re=se.end.add(1,"day");return g(re)-g(se.start)}).attr("height",C-I-i.gridLineStartPadding).attr("transform-origin",function(se,re){return(g(se.start)+P+.5*(g(se.end)-g(se.start))).toString()+"px "+(re*A+.5*C).toString()+"px"}).attr("class","exclude-range")}b(k,"drawExcludeDays");function _(A,I,P,O){let C=OO(g).tickSize(-O+I+i.gridLineStartPadding).tickFormat(j1(n.db.getAxisFormat()||i.axisFormat||"%Y-%m-%d")),B=/^([1-9]\d*)(millisecond|second|minute|hour|day|week|month)$/.exec(n.db.getTickInterval()||i.tickInterval);if(B!==null){let F=B[1],M=B[2],$=n.db.getWeekday()||i.weekday;switch(M){case"millisecond":C.ticks(e0.every(F));break;case"second":C.ticks(Ll.every(F));break;case"minute":C.ticks(Oh.every(F));break;case"hour":C.ticks(Ph.every(F));break;case"day":C.ticks(au.every(F));break;case"week":C.ticks(ASe[$].every(F));break;case"month":C.ticks(Bh.every(F));break}}if(m.append("g").attr("class","grid").attr("transform","translate("+A+", "+(O-50)+")").call(C).selectAll("text").style("text-anchor","middle").attr("fill","#000").attr("stroke","none").attr("font-size",10).attr("dy","1em"),n.db.topAxisEnabled()||i.topAxis){let F=NO(g).tickSize(-O+I+i.gridLineStartPadding).tickFormat(j1(n.db.getAxisFormat()||i.axisFormat||"%Y-%m-%d"));if(B!==null){let M=B[1],$=B[2],z=n.db.getWeekday()||i.weekday;switch($){case"millisecond":F.ticks(e0.every(M));break;case"second":F.ticks(Ll.every(M));break;case"minute":F.ticks(Oh.every(M));break;case"hour":F.ticks(Ph.every(M));break;case"day":F.ticks(au.every(M));break;case"week":F.ticks(ASe[z].every(M));break;case"month":F.ticks(Bh.every(M));break}}m.append("g").attr("class","grid").attr("transform","translate("+A+", "+I+")").call(F).selectAll("text").style("text-anchor","middle").attr("fill","#000").attr("stroke","none").attr("font-size",10)}}b(_,"makeGrid");function T(A,I){let P=0,O=Object.keys(d).map(C=>[C,d[C]]);m.append("g").selectAll("text").data(O).enter().append(function(C){let N=C[0].split(St.lineBreakRegex),B=-(N.length-1)/2,F=l.createElementNS("http://www.w3.org/2000/svg","text");F.setAttribute("dy",B+"em");for(let[M,$]of N.entries()){let z=l.createElementNS("http://www.w3.org/2000/svg","tspan");z.setAttribute("alignment-baseline","central"),z.setAttribute("x","10"),M>0&&z.setAttribute("dy","1em"),z.textContent=$,F.appendChild(z)}return F}).attr("x",10).attr("y",function(C,N){if(N>0)for(let B=0;B` .mermaid-main-font { font-family: ${t.fontFamily}; } @@ -1132,8 +1388,8 @@ Expecting `+Me.join(", ")+", got '"+(this.terminals_[W]||W)+"'":ke="Parse error fill: ${t.titleColor||t.textColor}; font-family: ${t.fontFamily}; } -`,"getStyles"),m2t=p2t,g2t={parser:_yt,db:u2t,renderer:d2t,styles:m2t}});var vCe={};lr(vCe,{diagram:()=>T2t});var v2t,y2t,x2t,b2t,w2t,k2t,T2t,yCe=A(()=>{UB();mc();ur();Um();v2t={parse:x(async t=>{let e=await jo("info",t);te.debug(e)},"parse")},y2t={version:O3.version},x2t=x(()=>y2t.version,"getVersion"),b2t={getVersion:x2t},w2t=x((t,e,r)=>{te.debug(`rendering info diagram -`+t);let n=yi(e);gn(n,100,400,!0),n.append("g").append("text").attr("x",100).attr("y",40).attr("class","version").attr("font-size",32).style("text-anchor","middle").text(`v${r}`)},"draw"),k2t={draw:w2t},T2t={parser:v2t,db:b2t,renderer:k2t}});var wCe={};lr(wCe,{diagram:()=>F2t});var xCe,oq,t9,lq,E2t,C2t,S2t,_2t,A2t,L2t,R2t,bCe,I2t,D2t,N2t,M2t,O2t,P2t,B2t,F2t,kCe=A(()=>{pv();ln();mc();ur();Um();cr();xCe=or.pie,oq={sections:new Map,showData:!1,config:xCe},t9=oq.sections,lq=oq.showData,E2t=structuredClone(xCe),C2t=x(()=>structuredClone(E2t),"getConfig"),S2t=x(()=>{t9=new Map,lq=oq.showData,Cr()},"clear"),_2t=x(({label:t,value:e})=>{t9.has(t)||(t9.set(t,e),te.debug(`added new section: ${t}, with value: ${e}`))},"addSection"),A2t=x(()=>t9,"getSections"),L2t=x(t=>{lq=t},"setShowData"),R2t=x(()=>lq,"getShowData"),bCe={getConfig:C2t,clear:S2t,setDiagramTitle:Fr,getDiagramTitle:Rr,setAccTitle:Sr,getAccTitle:_r,setAccDescription:Ar,getAccDescription:Lr,addSection:_2t,getSections:A2t,setShowData:L2t,getShowData:R2t},I2t=x((t,e)=>{uu(t,e),e.setShowData(t.showData),t.sections.map(e.addSection)},"populateDb"),D2t={parse:x(async t=>{let e=await jo("pie",t);te.debug(e),I2t(e,bCe)},"parse")},N2t=x(t=>` +`,"getStyles"),W3t=V3t,Y3t={parser:i3t,db:$3t,renderer:H3t,styles:W3t}});var USe={};Mr(USe,{diagram:()=>e5t});var X3t,j3t,K3t,Z3t,Q3t,J3t,e5t,HSe=D(()=>{e$();v0();Nr();Zm();X3t={parse:b(async t=>{let e=await Ul("info",t);he.debug(e)},"parse")},j3t={version:Q5.version},K3t=b(()=>j3t.version,"getVersion"),Z3t={getVersion:K3t},Q3t=b((t,e,r)=>{he.debug(`rendering info diagram +`+t);let n=cs(e);ei(n,100,400,!0),n.append("g").append("text").attr("x",100).attr("y",40).attr("class","version").attr("font-size",32).style("text-anchor","middle").text(`v${r}`)},"draw"),J3t={draw:Q3t},e5t={parser:X3t,db:Z3t,renderer:J3t}});var YSe={};Mr(YSe,{diagram:()=>m5t});var VSe,xV,OL,bV,t5t,r5t,n5t,i5t,a5t,s5t,o5t,WSe,l5t,u5t,c5t,h5t,f5t,d5t,p5t,m5t,XSe=D(()=>{_y();Hn();v0();Nr();Zm();Or();VSe=Ir.pie,xV={sections:new Map,showData:!1,config:VSe},OL=xV.sections,bV=xV.showData,t5t=structuredClone(VSe),r5t=b(()=>structuredClone(t5t),"getConfig"),n5t=b(()=>{OL=new Map,bV=xV.showData,Jr()},"clear"),i5t=b(({label:t,value:e})=>{OL.has(t)||(OL.set(t,e),he.debug(`added new section: ${t}, with value: ${e}`))},"addSection"),a5t=b(()=>OL,"getSections"),s5t=b(t=>{bV=t},"setShowData"),o5t=b(()=>bV,"getShowData"),WSe={getConfig:r5t,clear:n5t,setDiagramTitle:pn,getDiagramTitle:an,setAccTitle:en,getAccTitle:tn,setAccDescription:rn,getAccDescription:nn,addSection:i5t,getSections:a5t,setShowData:s5t,getShowData:o5t},l5t=b((t,e)=>{lc(t,e),e.setShowData(t.showData),t.sections.map(e.addSection)},"populateDb"),u5t={parse:b(async t=>{let e=await Ul("pie",t);he.debug(e),l5t(e,WSe)},"parse")},c5t=b(t=>` .pieCircle{ stroke: ${t.pieStrokeColor}; stroke-width : ${t.pieStrokeWidth}; @@ -1161,25 +1417,25 @@ Expecting `+Me.join(", ")+", got '"+(this.terminals_[W]||W)+"'":ke="Parse error font-family: ${t.fontFamily}; font-size: ${t.pieLegendTextSize}; } -`,"getStyles"),M2t=N2t,O2t=x(t=>{let e=[...t.entries()].map(n=>({label:n[0],value:n[1]})).sort((n,a)=>a.value-n.value);return eO().value(n=>n.value)(e)},"createPieArcs"),P2t=x((t,e,r,n)=>{te.debug(`rendering pie chart -`+t);let a=n.db,i=Te(),s=mi(a.getConfig(),i.pie),o=40,l=18,u=4,h=450,f=h,d=yi(e),p=d.append("g");p.attr("transform","translate("+f/2+","+h/2+")");let{themeVariables:m}=i,[g]=fl(m.pieOuterStrokeWidth);g??=2;let v=s.textPosition,y=Math.min(f,h)/2-o,b=ec().innerRadius(0).outerRadius(y),w=ec().innerRadius(y*v).outerRadius(y*v);p.append("circle").attr("cx",0).attr("cy",0).attr("r",y+g/2).attr("class","pieOuterCircle");let C=a.getSections(),k=O2t(C),E=[m.pie1,m.pie2,m.pie3,m.pie4,m.pie5,m.pie6,m.pie7,m.pie8,m.pie9,m.pie10,m.pie11,m.pie12],_=Ah(E);p.selectAll("mySlices").data(k).enter().append("path").attr("d",b).attr("fill",T=>_(T.data.label)).attr("class","pieCircle");let S=0;C.forEach(T=>{S+=T}),p.selectAll("mySlices").data(k).enter().append("text").text(T=>(T.data.value/S*100).toFixed(0)+"%").attr("transform",T=>"translate("+w.centroid(T)+")").style("text-anchor","middle").attr("class","slice"),p.append("text").text(a.getDiagramTitle()).attr("x",0).attr("y",-(h-50)/2).attr("class","pieTitleText");let L=p.selectAll(".legend").data(_.domain()).enter().append("g").attr("class","legend").attr("transform",(T,I)=>{let N=l+u,O=N*_.domain().length/2,R=12*l,P=I*N-O;return"translate("+R+","+P+")"});L.append("rect").attr("width",l).attr("height",l).style("fill",_).style("stroke",_),L.data(k).append("text").attr("x",l+u).attr("y",l-u).text(T=>{let{label:I,value:N}=T.data;return a.getShowData()?`${I} [${N}]`:I});let M=Math.max(...L.selectAll("text").nodes().map(T=>T?.getBoundingClientRect().width??0)),D=f+o+l+u+M;d.attr("viewBox",`0 0 ${D} ${h}`),gn(d,h,D,s.useMaxWidth)},"draw"),B2t={draw:P2t},F2t={parser:D2t,db:bCe,renderer:B2t,styles:M2t}});var FCe={};lr(FCe,{diagram:()=>W2t});function cq(t){return!/^#?([\dA-Fa-f]{6}|[\dA-Fa-f]{3})$/.test(t)}function TCe(t){return!/^\d+$/.test(t)}function ECe(t){return!/^\d+px$/.test(t)}function Kc(t){return Er(t.trim(),G2t)}function CCe(t){Vi.setData({quadrant1Text:Kc(t.text)})}function SCe(t){Vi.setData({quadrant2Text:Kc(t.text)})}function _Ce(t){Vi.setData({quadrant3Text:Kc(t.text)})}function ACe(t){Vi.setData({quadrant4Text:Kc(t.text)})}function LCe(t){Vi.setData({xAxisLeftText:Kc(t.text)})}function RCe(t){Vi.setData({xAxisRightText:Kc(t.text)})}function ICe(t){Vi.setData({yAxisTopText:Kc(t.text)})}function DCe(t){Vi.setData({yAxisBottomText:Kc(t.text)})}function n9(t){let e={};for(let r of t){let[n,a]=r.trim().split(/\s*:\s*/);if(n==="radius"){if(TCe(a))throw new r9(n,a,"number");e.radius=parseInt(a)}else if(n==="color"){if(cq(a))throw new r9(n,a,"hex code");e.color=a}else if(n==="stroke-color"){if(cq(a))throw new r9(n,a,"hex code");e.strokeColor=a}else if(n==="stroke-width"){if(ECe(a))throw new r9(n,a,"number of pixels (eg. 10px)");e.strokeWidth=a}else throw new Error(`style named ${n} is not supported.`)}return e}function NCe(t,e,r,n,a){let i=n9(a);Vi.addPoints([{x:r,y:n,text:Kc(t.text),className:e,...i}])}function MCe(t,e){Vi.addClass(t,n9(e))}function OCe(t){Vi.setConfig({chartWidth:t})}function PCe(t){Vi.setConfig({chartHeight:t})}function BCe(){let t=Te(),{themeVariables:e,quadrantChart:r}=t;return r&&Vi.setConfig(r),Vi.setThemeConfig({quadrant1Fill:e.quadrant1Fill,quadrant2Fill:e.quadrant2Fill,quadrant3Fill:e.quadrant3Fill,quadrant4Fill:e.quadrant4Fill,quadrant1TextFill:e.quadrant1TextFill,quadrant2TextFill:e.quadrant2TextFill,quadrant3TextFill:e.quadrant3TextFill,quadrant4TextFill:e.quadrant4TextFill,quadrantPointFill:e.quadrantPointFill,quadrantPointTextFill:e.quadrantPointTextFill,quadrantXAxisTextFill:e.quadrantXAxisTextFill,quadrantYAxisTextFill:e.quadrantYAxisTextFill,quadrantExternalBorderStrokeFill:e.quadrantExternalBorderStrokeFill,quadrantInternalBorderStrokeFill:e.quadrantInternalBorderStrokeFill,quadrantTitleFill:e.quadrantTitleFill}),Vi.setData({titleText:Rr()}),Vi.build()}var uq,z2t,Vs,ux,$2t,cx,r9,G2t,Vi,U2t,q2t,V2t,H2t,W2t,zCe=A(()=>{ur();cr();cr();uq=(function(){var t=x(function(le,V,he,de){for(he=he||{},de=le.length;de--;he[le[de]]=V);return he},"o"),e=[1,3],r=[1,4],n=[1,5],a=[1,6],i=[1,7],s=[1,4,5,10,12,13,14,18,25,35,37,39,41,42,48,50,51,52,53,54,55,56,57,60,61,63,64,65,66,67],o=[1,4,5,10,12,13,14,18,25,28,35,37,39,41,42,48,50,51,52,53,54,55,56,57,60,61,63,64,65,66,67],l=[55,56,57],u=[2,36],h=[1,37],f=[1,36],d=[1,38],p=[1,35],m=[1,43],g=[1,41],v=[1,14],y=[1,23],b=[1,18],w=[1,19],C=[1,20],k=[1,21],E=[1,22],_=[1,24],S=[1,25],L=[1,26],M=[1,27],D=[1,28],T=[1,29],I=[1,32],N=[1,33],O=[1,34],R=[1,39],P=[1,40],B=[1,42],F=[1,44],G=[1,62],z=[1,61],H=[4,5,8,10,12,13,14,18,44,47,49,55,56,57,63,64,65,66,67],Q=[1,65],Y=[1,66],ie=[1,67],se=[1,68],oe=[1,69],pe=[1,70],J=[1,71],j=[1,72],Z=[1,73],K=[1,74],X=[1,75],ae=[1,76],W=[4,5,6,7,8,9,10,11,12,13,14,15,18],Se=[1,90],ne=[1,91],ee=[1,92],$e=[1,99],me=[1,93],Ie=[1,96],Ue=[1,94],Fe=[1,95],Ae=[1,97],Me=[1,98],ke=[1,102],ve=[10,55,56,57],_e=[4,5,6,8,10,11,13,17,18,19,20,55,56,57],fe={trace:x(function(){},"trace"),yy:{},symbols_:{error:2,idStringToken:3,ALPHA:4,NUM:5,NODE_STRING:6,DOWN:7,MINUS:8,DEFAULT:9,COMMA:10,COLON:11,AMP:12,BRKT:13,MULT:14,UNICODE_TEXT:15,styleComponent:16,UNIT:17,SPACE:18,STYLE:19,PCT:20,idString:21,style:22,stylesOpt:23,classDefStatement:24,CLASSDEF:25,start:26,eol:27,QUADRANT:28,document:29,line:30,statement:31,axisDetails:32,quadrantDetails:33,points:34,title:35,title_value:36,acc_title:37,acc_title_value:38,acc_descr:39,acc_descr_value:40,acc_descr_multiline_value:41,section:42,text:43,point_start:44,point_x:45,point_y:46,class_name:47,"X-AXIS":48,"AXIS-TEXT-DELIMITER":49,"Y-AXIS":50,QUADRANT_1:51,QUADRANT_2:52,QUADRANT_3:53,QUADRANT_4:54,NEWLINE:55,SEMI:56,EOF:57,alphaNumToken:58,textNoTagsToken:59,STR:60,MD_STR:61,alphaNum:62,PUNCTUATION:63,PLUS:64,EQUALS:65,DOT:66,UNDERSCORE:67,$accept:0,$end:1},terminals_:{2:"error",4:"ALPHA",5:"NUM",6:"NODE_STRING",7:"DOWN",8:"MINUS",9:"DEFAULT",10:"COMMA",11:"COLON",12:"AMP",13:"BRKT",14:"MULT",15:"UNICODE_TEXT",17:"UNIT",18:"SPACE",19:"STYLE",20:"PCT",25:"CLASSDEF",28:"QUADRANT",35:"title",36:"title_value",37:"acc_title",38:"acc_title_value",39:"acc_descr",40:"acc_descr_value",41:"acc_descr_multiline_value",42:"section",44:"point_start",45:"point_x",46:"point_y",47:"class_name",48:"X-AXIS",49:"AXIS-TEXT-DELIMITER",50:"Y-AXIS",51:"QUADRANT_1",52:"QUADRANT_2",53:"QUADRANT_3",54:"QUADRANT_4",55:"NEWLINE",56:"SEMI",57:"EOF",60:"STR",61:"MD_STR",63:"PUNCTUATION",64:"PLUS",65:"EQUALS",66:"DOT",67:"UNDERSCORE"},productions_:[0,[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[21,1],[21,2],[22,1],[22,2],[23,1],[23,3],[24,5],[26,2],[26,2],[26,2],[29,0],[29,2],[30,2],[31,0],[31,1],[31,2],[31,1],[31,1],[31,1],[31,2],[31,2],[31,2],[31,1],[31,1],[34,4],[34,5],[34,5],[34,6],[32,4],[32,3],[32,2],[32,4],[32,3],[32,2],[33,2],[33,2],[33,2],[33,2],[27,1],[27,1],[27,1],[43,1],[43,2],[43,1],[43,1],[62,1],[62,2],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[59,1],[59,1],[59,1]],performAction:x(function(V,he,de,Ne,we,ye,Be){var Le=ye.length-1;switch(we){case 23:this.$=ye[Le];break;case 24:this.$=ye[Le-1]+""+ye[Le];break;case 26:this.$=ye[Le-1]+ye[Le];break;case 27:this.$=[ye[Le].trim()];break;case 28:ye[Le-2].push(ye[Le].trim()),this.$=ye[Le-2];break;case 29:this.$=ye[Le-4],Ne.addClass(ye[Le-2],ye[Le]);break;case 37:this.$=[];break;case 42:this.$=ye[Le].trim(),Ne.setDiagramTitle(this.$);break;case 43:this.$=ye[Le].trim(),Ne.setAccTitle(this.$);break;case 44:case 45:this.$=ye[Le].trim(),Ne.setAccDescription(this.$);break;case 46:Ne.addSection(ye[Le].substr(8)),this.$=ye[Le].substr(8);break;case 47:Ne.addPoint(ye[Le-3],"",ye[Le-1],ye[Le],[]);break;case 48:Ne.addPoint(ye[Le-4],ye[Le-3],ye[Le-1],ye[Le],[]);break;case 49:Ne.addPoint(ye[Le-4],"",ye[Le-2],ye[Le-1],ye[Le]);break;case 50:Ne.addPoint(ye[Le-5],ye[Le-4],ye[Le-2],ye[Le-1],ye[Le]);break;case 51:Ne.setXAxisLeftText(ye[Le-2]),Ne.setXAxisRightText(ye[Le]);break;case 52:ye[Le-1].text+=" \u27F6 ",Ne.setXAxisLeftText(ye[Le-1]);break;case 53:Ne.setXAxisLeftText(ye[Le]);break;case 54:Ne.setYAxisBottomText(ye[Le-2]),Ne.setYAxisTopText(ye[Le]);break;case 55:ye[Le-1].text+=" \u27F6 ",Ne.setYAxisBottomText(ye[Le-1]);break;case 56:Ne.setYAxisBottomText(ye[Le]);break;case 57:Ne.setQuadrant1Text(ye[Le]);break;case 58:Ne.setQuadrant2Text(ye[Le]);break;case 59:Ne.setQuadrant3Text(ye[Le]);break;case 60:Ne.setQuadrant4Text(ye[Le]);break;case 64:this.$={text:ye[Le],type:"text"};break;case 65:this.$={text:ye[Le-1].text+""+ye[Le],type:ye[Le-1].type};break;case 66:this.$={text:ye[Le],type:"text"};break;case 67:this.$={text:ye[Le],type:"markdown"};break;case 68:this.$=ye[Le];break;case 69:this.$=ye[Le-1]+""+ye[Le];break}},"anonymous"),table:[{18:e,26:1,27:2,28:r,55:n,56:a,57:i},{1:[3]},{18:e,26:8,27:2,28:r,55:n,56:a,57:i},{18:e,26:9,27:2,28:r,55:n,56:a,57:i},t(s,[2,33],{29:10}),t(o,[2,61]),t(o,[2,62]),t(o,[2,63]),{1:[2,30]},{1:[2,31]},t(l,u,{30:11,31:12,24:13,32:15,33:16,34:17,43:30,58:31,1:[2,32],4:h,5:f,10:d,12:p,13:m,14:g,18:v,25:y,35:b,37:w,39:C,41:k,42:E,48:_,50:S,51:L,52:M,53:D,54:T,60:I,61:N,63:O,64:R,65:P,66:B,67:F}),t(s,[2,34]),{27:45,55:n,56:a,57:i},t(l,[2,37]),t(l,u,{24:13,32:15,33:16,34:17,43:30,58:31,31:46,4:h,5:f,10:d,12:p,13:m,14:g,18:v,25:y,35:b,37:w,39:C,41:k,42:E,48:_,50:S,51:L,52:M,53:D,54:T,60:I,61:N,63:O,64:R,65:P,66:B,67:F}),t(l,[2,39]),t(l,[2,40]),t(l,[2,41]),{36:[1,47]},{38:[1,48]},{40:[1,49]},t(l,[2,45]),t(l,[2,46]),{18:[1,50]},{4:h,5:f,10:d,12:p,13:m,14:g,43:51,58:31,60:I,61:N,63:O,64:R,65:P,66:B,67:F},{4:h,5:f,10:d,12:p,13:m,14:g,43:52,58:31,60:I,61:N,63:O,64:R,65:P,66:B,67:F},{4:h,5:f,10:d,12:p,13:m,14:g,43:53,58:31,60:I,61:N,63:O,64:R,65:P,66:B,67:F},{4:h,5:f,10:d,12:p,13:m,14:g,43:54,58:31,60:I,61:N,63:O,64:R,65:P,66:B,67:F},{4:h,5:f,10:d,12:p,13:m,14:g,43:55,58:31,60:I,61:N,63:O,64:R,65:P,66:B,67:F},{4:h,5:f,10:d,12:p,13:m,14:g,43:56,58:31,60:I,61:N,63:O,64:R,65:P,66:B,67:F},{4:h,5:f,8:G,10:d,12:p,13:m,14:g,18:z,44:[1,57],47:[1,58],58:60,59:59,63:O,64:R,65:P,66:B,67:F},t(H,[2,64]),t(H,[2,66]),t(H,[2,67]),t(H,[2,70]),t(H,[2,71]),t(H,[2,72]),t(H,[2,73]),t(H,[2,74]),t(H,[2,75]),t(H,[2,76]),t(H,[2,77]),t(H,[2,78]),t(H,[2,79]),t(H,[2,80]),t(s,[2,35]),t(l,[2,38]),t(l,[2,42]),t(l,[2,43]),t(l,[2,44]),{3:64,4:Q,5:Y,6:ie,7:se,8:oe,9:pe,10:J,11:j,12:Z,13:K,14:X,15:ae,21:63},t(l,[2,53],{59:59,58:60,4:h,5:f,8:G,10:d,12:p,13:m,14:g,18:z,49:[1,77],63:O,64:R,65:P,66:B,67:F}),t(l,[2,56],{59:59,58:60,4:h,5:f,8:G,10:d,12:p,13:m,14:g,18:z,49:[1,78],63:O,64:R,65:P,66:B,67:F}),t(l,[2,57],{59:59,58:60,4:h,5:f,8:G,10:d,12:p,13:m,14:g,18:z,63:O,64:R,65:P,66:B,67:F}),t(l,[2,58],{59:59,58:60,4:h,5:f,8:G,10:d,12:p,13:m,14:g,18:z,63:O,64:R,65:P,66:B,67:F}),t(l,[2,59],{59:59,58:60,4:h,5:f,8:G,10:d,12:p,13:m,14:g,18:z,63:O,64:R,65:P,66:B,67:F}),t(l,[2,60],{59:59,58:60,4:h,5:f,8:G,10:d,12:p,13:m,14:g,18:z,63:O,64:R,65:P,66:B,67:F}),{45:[1,79]},{44:[1,80]},t(H,[2,65]),t(H,[2,81]),t(H,[2,82]),t(H,[2,83]),{3:82,4:Q,5:Y,6:ie,7:se,8:oe,9:pe,10:J,11:j,12:Z,13:K,14:X,15:ae,18:[1,81]},t(W,[2,23]),t(W,[2,1]),t(W,[2,2]),t(W,[2,3]),t(W,[2,4]),t(W,[2,5]),t(W,[2,6]),t(W,[2,7]),t(W,[2,8]),t(W,[2,9]),t(W,[2,10]),t(W,[2,11]),t(W,[2,12]),t(l,[2,52],{58:31,43:83,4:h,5:f,10:d,12:p,13:m,14:g,60:I,61:N,63:O,64:R,65:P,66:B,67:F}),t(l,[2,55],{58:31,43:84,4:h,5:f,10:d,12:p,13:m,14:g,60:I,61:N,63:O,64:R,65:P,66:B,67:F}),{46:[1,85]},{45:[1,86]},{4:Se,5:ne,6:ee,8:$e,11:me,13:Ie,16:89,17:Ue,18:Fe,19:Ae,20:Me,22:88,23:87},t(W,[2,24]),t(l,[2,51],{59:59,58:60,4:h,5:f,8:G,10:d,12:p,13:m,14:g,18:z,63:O,64:R,65:P,66:B,67:F}),t(l,[2,54],{59:59,58:60,4:h,5:f,8:G,10:d,12:p,13:m,14:g,18:z,63:O,64:R,65:P,66:B,67:F}),t(l,[2,47],{22:88,16:89,23:100,4:Se,5:ne,6:ee,8:$e,11:me,13:Ie,17:Ue,18:Fe,19:Ae,20:Me}),{46:[1,101]},t(l,[2,29],{10:ke}),t(ve,[2,27],{16:103,4:Se,5:ne,6:ee,8:$e,11:me,13:Ie,17:Ue,18:Fe,19:Ae,20:Me}),t(_e,[2,25]),t(_e,[2,13]),t(_e,[2,14]),t(_e,[2,15]),t(_e,[2,16]),t(_e,[2,17]),t(_e,[2,18]),t(_e,[2,19]),t(_e,[2,20]),t(_e,[2,21]),t(_e,[2,22]),t(l,[2,49],{10:ke}),t(l,[2,48],{22:88,16:89,23:104,4:Se,5:ne,6:ee,8:$e,11:me,13:Ie,17:Ue,18:Fe,19:Ae,20:Me}),{4:Se,5:ne,6:ee,8:$e,11:me,13:Ie,16:89,17:Ue,18:Fe,19:Ae,20:Me,22:105},t(_e,[2,26]),t(l,[2,50],{10:ke}),t(ve,[2,28],{16:103,4:Se,5:ne,6:ee,8:$e,11:me,13:Ie,17:Ue,18:Fe,19:Ae,20:Me})],defaultActions:{8:[2,30],9:[2,31]},parseError:x(function(V,he){if(he.recoverable)this.trace(V);else{var de=new Error(V);throw de.hash=he,de}},"parseError"),parse:x(function(V){var he=this,de=[0],Ne=[],we=[null],ye=[],Be=this.table,Le="",qe=0,Ke=0,Ye=0,Xe=2,Ve=1,ot=ye.slice.call(arguments,1),He=Object.create(this.lexer),nt={yy:{}};for(var It in this.yy)Object.prototype.hasOwnProperty.call(this.yy,It)&&(nt.yy[It]=this.yy[It]);He.setInput(V,nt.yy),nt.yy.lexer=He,nt.yy.parser=this,typeof He.yylloc>"u"&&(He.yylloc={});var it=He.yylloc;ye.push(it);var Tt=He.options&&He.options.ranges;typeof nt.yy.parseError=="function"?this.parseError=nt.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function lt(Hr){de.length=de.length-2*Hr,we.length=we.length-Hr,ye.length=ye.length-Hr}x(lt,"popStack");function ct(){var Hr;return Hr=Ne.pop()||He.lex()||Ve,typeof Hr!="number"&&(Hr instanceof Array&&(Ne=Hr,Hr=Ne.pop()),Hr=he.symbols_[Hr]||Hr),Hr}x(ct,"lex");for(var ft,dt,yt,at,dn,Ct,Ut={},Qt,er,mr,xr;;){if(yt=de[de.length-1],this.defaultActions[yt]?at=this.defaultActions[yt]:((ft===null||typeof ft>"u")&&(ft=ct()),at=Be[yt]&&Be[yt][ft]),typeof at>"u"||!at.length||!at[0]){var Tn="";xr=[];for(Qt in Be[yt])this.terminals_[Qt]&&Qt>Xe&&xr.push("'"+this.terminals_[Qt]+"'");He.showPosition?Tn="Parse error on line "+(qe+1)+`: -`+He.showPosition()+` -Expecting `+xr.join(", ")+", got '"+(this.terminals_[ft]||ft)+"'":Tn="Parse error on line "+(qe+1)+": Unexpected "+(ft==Ve?"end of input":"'"+(this.terminals_[ft]||ft)+"'"),this.parseError(Tn,{text:He.match,token:this.terminals_[ft]||ft,line:He.yylineno,loc:it,expected:xr})}if(at[0]instanceof Array&&at.length>1)throw new Error("Parse Error: multiple actions possible at state: "+yt+", token: "+ft);switch(at[0]){case 1:de.push(ft),we.push(He.yytext),ye.push(He.yylloc),de.push(at[1]),ft=null,dt?(ft=dt,dt=null):(Ke=He.yyleng,Le=He.yytext,qe=He.yylineno,it=He.yylloc,Ye>0&&Ye--);break;case 2:if(er=this.productions_[at[1]][1],Ut.$=we[we.length-er],Ut._$={first_line:ye[ye.length-(er||1)].first_line,last_line:ye[ye.length-1].last_line,first_column:ye[ye.length-(er||1)].first_column,last_column:ye[ye.length-1].last_column},Tt&&(Ut._$.range=[ye[ye.length-(er||1)].range[0],ye[ye.length-1].range[1]]),Ct=this.performAction.apply(Ut,[Le,Ke,qe,nt.yy,at[1],we,ye].concat(ot)),typeof Ct<"u")return Ct;er&&(de=de.slice(0,-1*er*2),we=we.slice(0,-1*er),ye=ye.slice(0,-1*er)),de.push(this.productions_[at[1]][0]),we.push(Ut.$),ye.push(Ut._$),mr=Be[de[de.length-2]][de[de.length-1]],de.push(mr);break;case 3:return!0}}return!0},"parse")},ue=(function(){var le={EOF:1,parseError:x(function(he,de){if(this.yy.parser)this.yy.parser.parseError(he,de);else throw new Error(he)},"parseError"),setInput:x(function(V,he){return this.yy=he||this.yy||{},this._input=V,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:x(function(){var V=this._input[0];this.yytext+=V,this.yyleng++,this.offset++,this.match+=V,this.matched+=V;var he=V.match(/(?:\r\n?|\n).*/g);return he?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),V},"input"),unput:x(function(V){var he=V.length,de=V.split(/(?:\r\n?|\n)/g);this._input=V+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-he),this.offset-=he;var Ne=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),de.length-1&&(this.yylineno-=de.length-1);var we=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:de?(de.length===Ne.length?this.yylloc.first_column:0)+Ne[Ne.length-de.length].length-de[0].length:this.yylloc.first_column-he},this.options.ranges&&(this.yylloc.range=[we[0],we[0]+this.yyleng-he]),this.yyleng=this.yytext.length,this},"unput"),more:x(function(){return this._more=!0,this},"more"),reject:x(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). -`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:x(function(V){this.unput(this.match.slice(V))},"less"),pastInput:x(function(){var V=this.matched.substr(0,this.matched.length-this.match.length);return(V.length>20?"...":"")+V.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:x(function(){var V=this.match;return V.length<20&&(V+=this._input.substr(0,20-V.length)),(V.substr(0,20)+(V.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:x(function(){var V=this.pastInput(),he=new Array(V.length+1).join("-");return V+this.upcomingInput()+` -`+he+"^"},"showPosition"),test_match:x(function(V,he){var de,Ne,we;if(this.options.backtrack_lexer&&(we={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(we.yylloc.range=this.yylloc.range.slice(0))),Ne=V[0].match(/(?:\r\n?|\n).*/g),Ne&&(this.yylineno+=Ne.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:Ne?Ne[Ne.length-1].length-Ne[Ne.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+V[0].length},this.yytext+=V[0],this.match+=V[0],this.matches=V,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(V[0].length),this.matched+=V[0],de=this.performAction.call(this,this.yy,this,he,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),de)return de;if(this._backtrack){for(var ye in we)this[ye]=we[ye];return!1}return!1},"test_match"),next:x(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var V,he,de,Ne;this._more||(this.yytext="",this.match="");for(var we=this._currentRules(),ye=0;yehe[0].length)){if(he=de,Ne=ye,this.options.backtrack_lexer){if(V=this.test_match(de,we[ye]),V!==!1)return V;if(this._backtrack){he=!1;continue}else return!1}else if(!this.options.flex)break}return he?(V=this.test_match(he,we[Ne]),V!==!1?V:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. -`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:x(function(){var he=this.next();return he||this.lex()},"lex"),begin:x(function(he){this.conditionStack.push(he)},"begin"),popState:x(function(){var he=this.conditionStack.length-1;return he>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:x(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:x(function(he){return he=this.conditionStack.length-1-Math.abs(he||0),he>=0?this.conditionStack[he]:"INITIAL"},"topState"),pushState:x(function(he){this.begin(he)},"pushState"),stateStackSize:x(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:x(function(he,de,Ne,we){var ye=we;switch(Ne){case 0:break;case 1:break;case 2:return 55;case 3:break;case 4:return this.begin("title"),35;break;case 5:return this.popState(),"title_value";break;case 6:return this.begin("acc_title"),37;break;case 7:return this.popState(),"acc_title_value";break;case 8:return this.begin("acc_descr"),39;break;case 9:return this.popState(),"acc_descr_value";break;case 10:this.begin("acc_descr_multiline");break;case 11:this.popState();break;case 12:return"acc_descr_multiline_value";case 13:return 48;case 14:return 50;case 15:return 49;case 16:return 51;case 17:return 52;case 18:return 53;case 19:return 54;case 20:return 25;case 21:this.begin("md_string");break;case 22:return"MD_STR";case 23:this.popState();break;case 24:this.begin("string");break;case 25:this.popState();break;case 26:return"STR";case 27:this.begin("class_name");break;case 28:return this.popState(),47;break;case 29:return this.begin("point_start"),44;break;case 30:return this.begin("point_x"),45;break;case 31:this.popState();break;case 32:this.popState(),this.begin("point_y");break;case 33:return this.popState(),46;break;case 34:return 28;case 35:return 4;case 36:return 11;case 37:return 64;case 38:return 10;case 39:return 65;case 40:return 65;case 41:return 14;case 42:return 13;case 43:return 67;case 44:return 66;case 45:return 12;case 46:return 8;case 47:return 5;case 48:return 18;case 49:return 56;case 50:return 63;case 51:return 57}},"anonymous"),rules:[/^(?:%%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n\r]+)/i,/^(?:%%[^\n]*)/i,/^(?:title\b)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?: *x-axis *)/i,/^(?: *y-axis *)/i,/^(?: *--+> *)/i,/^(?: *quadrant-1 *)/i,/^(?: *quadrant-2 *)/i,/^(?: *quadrant-3 *)/i,/^(?: *quadrant-4 *)/i,/^(?:classDef\b)/i,/^(?:["][`])/i,/^(?:[^`"]+)/i,/^(?:[`]["])/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?::::)/i,/^(?:^\w+)/i,/^(?:\s*:\s*\[\s*)/i,/^(?:(1)|(0(.\d+)?))/i,/^(?:\s*\] *)/i,/^(?:\s*,\s*)/i,/^(?:(1)|(0(.\d+)?))/i,/^(?: *quadrantChart *)/i,/^(?:[A-Za-z]+)/i,/^(?::)/i,/^(?:\+)/i,/^(?:,)/i,/^(?:=)/i,/^(?:=)/i,/^(?:\*)/i,/^(?:#)/i,/^(?:[\_])/i,/^(?:\.)/i,/^(?:&)/i,/^(?:-)/i,/^(?:[0-9]+)/i,/^(?:\s)/i,/^(?:;)/i,/^(?:[!"#$%&'*+,-.`?\\_/])/i,/^(?:$)/i],conditions:{class_name:{rules:[28],inclusive:!1},point_y:{rules:[33],inclusive:!1},point_x:{rules:[32],inclusive:!1},point_start:{rules:[30,31],inclusive:!1},acc_descr_multiline:{rules:[11,12],inclusive:!1},acc_descr:{rules:[9],inclusive:!1},acc_title:{rules:[7],inclusive:!1},title:{rules:[5],inclusive:!1},md_string:{rules:[22,23],inclusive:!1},string:{rules:[25,26],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,6,8,10,13,14,15,16,17,18,19,20,21,24,27,29,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51],inclusive:!0}}};return le})();fe.lexer=ue;function $(){this.yy={}}return x($,"Parser"),$.prototype=fe,fe.Parser=$,new $})();uq.parser=uq;z2t=uq,Vs=pp(),$2t=(ux=class{constructor(){this.classes=new Map,this.config=this.getDefaultConfig(),this.themeConfig=this.getDefaultThemeConfig(),this.data=this.getDefaultData()}getDefaultData(){return{titleText:"",quadrant1Text:"",quadrant2Text:"",quadrant3Text:"",quadrant4Text:"",xAxisLeftText:"",xAxisRightText:"",yAxisBottomText:"",yAxisTopText:"",points:[]}}getDefaultConfig(){return{showXAxis:!0,showYAxis:!0,showTitle:!0,chartHeight:or.quadrantChart?.chartWidth||500,chartWidth:or.quadrantChart?.chartHeight||500,titlePadding:or.quadrantChart?.titlePadding||10,titleFontSize:or.quadrantChart?.titleFontSize||20,quadrantPadding:or.quadrantChart?.quadrantPadding||5,xAxisLabelPadding:or.quadrantChart?.xAxisLabelPadding||5,yAxisLabelPadding:or.quadrantChart?.yAxisLabelPadding||5,xAxisLabelFontSize:or.quadrantChart?.xAxisLabelFontSize||16,yAxisLabelFontSize:or.quadrantChart?.yAxisLabelFontSize||16,quadrantLabelFontSize:or.quadrantChart?.quadrantLabelFontSize||16,quadrantTextTopPadding:or.quadrantChart?.quadrantTextTopPadding||5,pointTextPadding:or.quadrantChart?.pointTextPadding||5,pointLabelFontSize:or.quadrantChart?.pointLabelFontSize||12,pointRadius:or.quadrantChart?.pointRadius||5,xAxisPosition:or.quadrantChart?.xAxisPosition||"top",yAxisPosition:or.quadrantChart?.yAxisPosition||"left",quadrantInternalBorderStrokeWidth:or.quadrantChart?.quadrantInternalBorderStrokeWidth||1,quadrantExternalBorderStrokeWidth:or.quadrantChart?.quadrantExternalBorderStrokeWidth||2}}getDefaultThemeConfig(){return{quadrant1Fill:Vs.quadrant1Fill,quadrant2Fill:Vs.quadrant2Fill,quadrant3Fill:Vs.quadrant3Fill,quadrant4Fill:Vs.quadrant4Fill,quadrant1TextFill:Vs.quadrant1TextFill,quadrant2TextFill:Vs.quadrant2TextFill,quadrant3TextFill:Vs.quadrant3TextFill,quadrant4TextFill:Vs.quadrant4TextFill,quadrantPointFill:Vs.quadrantPointFill,quadrantPointTextFill:Vs.quadrantPointTextFill,quadrantXAxisTextFill:Vs.quadrantXAxisTextFill,quadrantYAxisTextFill:Vs.quadrantYAxisTextFill,quadrantTitleFill:Vs.quadrantTitleFill,quadrantInternalBorderStrokeFill:Vs.quadrantInternalBorderStrokeFill,quadrantExternalBorderStrokeFill:Vs.quadrantExternalBorderStrokeFill}}clear(){this.config=this.getDefaultConfig(),this.themeConfig=this.getDefaultThemeConfig(),this.data=this.getDefaultData(),this.classes=new Map,te.info("clear called")}setData(e){this.data={...this.data,...e}}addPoints(e){this.data.points=[...e,...this.data.points]}addClass(e,r){this.classes.set(e,r)}setConfig(e){te.trace("setConfig called with: ",e),this.config={...this.config,...e}}setThemeConfig(e){te.trace("setThemeConfig called with: ",e),this.themeConfig={...this.themeConfig,...e}}calculateSpace(e,r,n,a){let i=this.config.xAxisLabelPadding*2+this.config.xAxisLabelFontSize,s={top:e==="top"&&r?i:0,bottom:e==="bottom"&&r?i:0},o=this.config.yAxisLabelPadding*2+this.config.yAxisLabelFontSize,l={left:this.config.yAxisPosition==="left"&&n?o:0,right:this.config.yAxisPosition==="right"&&n?o:0},u=this.config.titleFontSize+this.config.titlePadding*2,h={top:a?u:0},f=this.config.quadrantPadding+l.left,d=this.config.quadrantPadding+s.top+h.top,p=this.config.chartWidth-this.config.quadrantPadding*2-l.left-l.right,m=this.config.chartHeight-this.config.quadrantPadding*2-s.top-s.bottom-h.top,g=p/2,v=m/2;return{xAxisSpace:s,yAxisSpace:l,titleSpace:h,quadrantSpace:{quadrantLeft:f,quadrantTop:d,quadrantWidth:p,quadrantHalfWidth:g,quadrantHeight:m,quadrantHalfHeight:v}}}getAxisLabels(e,r,n,a){let{quadrantSpace:i,titleSpace:s}=a,{quadrantHalfHeight:o,quadrantHeight:l,quadrantLeft:u,quadrantHalfWidth:h,quadrantTop:f,quadrantWidth:d}=i,p=!!this.data.xAxisRightText,m=!!this.data.yAxisTopText,g=[];return this.data.xAxisLeftText&&r&&g.push({text:this.data.xAxisLeftText,fill:this.themeConfig.quadrantXAxisTextFill,x:u+(p?h/2:0),y:e==="top"?this.config.xAxisLabelPadding+s.top:this.config.xAxisLabelPadding+f+l+this.config.quadrantPadding,fontSize:this.config.xAxisLabelFontSize,verticalPos:p?"center":"left",horizontalPos:"top",rotation:0}),this.data.xAxisRightText&&r&&g.push({text:this.data.xAxisRightText,fill:this.themeConfig.quadrantXAxisTextFill,x:u+h+(p?h/2:0),y:e==="top"?this.config.xAxisLabelPadding+s.top:this.config.xAxisLabelPadding+f+l+this.config.quadrantPadding,fontSize:this.config.xAxisLabelFontSize,verticalPos:p?"center":"left",horizontalPos:"top",rotation:0}),this.data.yAxisBottomText&&n&&g.push({text:this.data.yAxisBottomText,fill:this.themeConfig.quadrantYAxisTextFill,x:this.config.yAxisPosition==="left"?this.config.yAxisLabelPadding:this.config.yAxisLabelPadding+u+d+this.config.quadrantPadding,y:f+l-(m?o/2:0),fontSize:this.config.yAxisLabelFontSize,verticalPos:m?"center":"left",horizontalPos:"top",rotation:-90}),this.data.yAxisTopText&&n&&g.push({text:this.data.yAxisTopText,fill:this.themeConfig.quadrantYAxisTextFill,x:this.config.yAxisPosition==="left"?this.config.yAxisLabelPadding:this.config.yAxisLabelPadding+u+d+this.config.quadrantPadding,y:f+o-(m?o/2:0),fontSize:this.config.yAxisLabelFontSize,verticalPos:m?"center":"left",horizontalPos:"top",rotation:-90}),g}getQuadrants(e){let{quadrantSpace:r}=e,{quadrantHalfHeight:n,quadrantLeft:a,quadrantHalfWidth:i,quadrantTop:s}=r,o=[{text:{text:this.data.quadrant1Text,fill:this.themeConfig.quadrant1TextFill,x:0,y:0,fontSize:this.config.quadrantLabelFontSize,verticalPos:"center",horizontalPos:"middle",rotation:0},x:a+i,y:s,width:i,height:n,fill:this.themeConfig.quadrant1Fill},{text:{text:this.data.quadrant2Text,fill:this.themeConfig.quadrant2TextFill,x:0,y:0,fontSize:this.config.quadrantLabelFontSize,verticalPos:"center",horizontalPos:"middle",rotation:0},x:a,y:s,width:i,height:n,fill:this.themeConfig.quadrant2Fill},{text:{text:this.data.quadrant3Text,fill:this.themeConfig.quadrant3TextFill,x:0,y:0,fontSize:this.config.quadrantLabelFontSize,verticalPos:"center",horizontalPos:"middle",rotation:0},x:a,y:s+n,width:i,height:n,fill:this.themeConfig.quadrant3Fill},{text:{text:this.data.quadrant4Text,fill:this.themeConfig.quadrant4TextFill,x:0,y:0,fontSize:this.config.quadrantLabelFontSize,verticalPos:"center",horizontalPos:"middle",rotation:0},x:a+i,y:s+n,width:i,height:n,fill:this.themeConfig.quadrant4Fill}];for(let l of o)l.text.x=l.x+l.width/2,this.data.points.length===0?(l.text.y=l.y+l.height/2,l.text.horizontalPos="middle"):(l.text.y=l.y+this.config.quadrantTextTopPadding,l.text.horizontalPos="top");return o}getQuadrantPoints(e){let{quadrantSpace:r}=e,{quadrantHeight:n,quadrantLeft:a,quadrantTop:i,quadrantWidth:s}=r,o=Kl().domain([0,1]).range([a,s+a]),l=Kl().domain([0,1]).range([n+i,i]);return this.data.points.map(h=>{let f=this.classes.get(h.className);return f&&(h={...f,...h}),{x:o(h.x),y:l(h.y),fill:h.color??this.themeConfig.quadrantPointFill,radius:h.radius??this.config.pointRadius,text:{text:h.text,fill:this.themeConfig.quadrantPointTextFill,x:o(h.x),y:l(h.y)+this.config.pointTextPadding,verticalPos:"center",horizontalPos:"top",fontSize:this.config.pointLabelFontSize,rotation:0},strokeColor:h.strokeColor??this.themeConfig.quadrantPointFill,strokeWidth:h.strokeWidth??"0px"}})}getBorders(e){let r=this.config.quadrantExternalBorderStrokeWidth/2,{quadrantSpace:n}=e,{quadrantHalfHeight:a,quadrantHeight:i,quadrantLeft:s,quadrantHalfWidth:o,quadrantTop:l,quadrantWidth:u}=n;return[{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:s-r,y1:l,x2:s+u+r,y2:l},{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:s+u,y1:l+r,x2:s+u,y2:l+i-r},{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:s-r,y1:l+i,x2:s+u+r,y2:l+i},{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:s,y1:l+r,x2:s,y2:l+i-r},{strokeFill:this.themeConfig.quadrantInternalBorderStrokeFill,strokeWidth:this.config.quadrantInternalBorderStrokeWidth,x1:s+o,y1:l+r,x2:s+o,y2:l+i-r},{strokeFill:this.themeConfig.quadrantInternalBorderStrokeFill,strokeWidth:this.config.quadrantInternalBorderStrokeWidth,x1:s+r,y1:l+a,x2:s+u-r,y2:l+a}]}getTitle(e){if(e)return{text:this.data.titleText,fill:this.themeConfig.quadrantTitleFill,fontSize:this.config.titleFontSize,horizontalPos:"top",verticalPos:"center",rotation:0,y:this.config.titlePadding,x:this.config.chartWidth/2}}build(){let e=this.config.showXAxis&&!!(this.data.xAxisLeftText||this.data.xAxisRightText),r=this.config.showYAxis&&!!(this.data.yAxisTopText||this.data.yAxisBottomText),n=this.config.showTitle&&!!this.data.titleText,a=this.data.points.length>0?"bottom":this.config.xAxisPosition,i=this.calculateSpace(a,e,r,n);return{points:this.getQuadrantPoints(i),quadrants:this.getQuadrants(i),axisLabels:this.getAxisLabels(a,e,r,i),borderLines:this.getBorders(i),title:this.getTitle(n)}}},x(ux,"QuadrantBuilder"),ux),r9=(cx=class extends Error{constructor(e,r,n){super(`value for ${e} ${r} is invalid, please use a valid ${n}`),this.name="InvalidStyleError"}},x(cx,"InvalidStyleError"),cx);x(cq,"validateHexCode");x(TCe,"validateNumber");x(ECe,"validateSizeInPixels");G2t=Te();x(Kc,"textSanitizer");Vi=new $2t;x(CCe,"setQuadrant1Text");x(SCe,"setQuadrant2Text");x(_Ce,"setQuadrant3Text");x(ACe,"setQuadrant4Text");x(LCe,"setXAxisLeftText");x(RCe,"setXAxisRightText");x(ICe,"setYAxisTopText");x(DCe,"setYAxisBottomText");x(n9,"parseStyles");x(NCe,"addPoint");x(MCe,"addClass");x(OCe,"setWidth");x(PCe,"setHeight");x(BCe,"getQuadrantData");U2t=x(function(){Vi.clear(),Cr()},"clear"),q2t={setWidth:OCe,setHeight:PCe,setQuadrant1Text:CCe,setQuadrant2Text:SCe,setQuadrant3Text:_Ce,setQuadrant4Text:ACe,setXAxisLeftText:LCe,setXAxisRightText:RCe,setYAxisTopText:ICe,setYAxisBottomText:DCe,parseStyles:n9,addPoint:NCe,addClass:MCe,getQuadrantData:BCe,clear:U2t,setAccTitle:Sr,getAccTitle:_r,setDiagramTitle:Fr,getDiagramTitle:Rr,getAccDescription:Lr,setAccDescription:Ar},V2t=x((t,e,r,n)=>{function a(S){return S==="top"?"hanging":"middle"}x(a,"getDominantBaseLine");function i(S){return S==="left"?"start":"middle"}x(i,"getTextAnchor");function s(S){return`translate(${S.x}, ${S.y}) rotate(${S.rotation||0})`}x(s,"getTransformation");let o=Te();te.debug(`Rendering quadrant chart -`+t);let l=o.securityLevel,u;l==="sandbox"&&(u=We("#i"+e));let f=(l==="sandbox"?We(u.nodes()[0].contentDocument.body):We("body")).select(`[id="${e}"]`),d=f.append("g").attr("class","main"),p=o.quadrantChart?.chartWidth??500,m=o.quadrantChart?.chartHeight??500;gn(f,m,p,o.quadrantChart?.useMaxWidth??!0),f.attr("viewBox","0 0 "+p+" "+m),n.db.setHeight(m),n.db.setWidth(p);let g=n.db.getQuadrantData(),v=d.append("g").attr("class","quadrants"),y=d.append("g").attr("class","border"),b=d.append("g").attr("class","data-points"),w=d.append("g").attr("class","labels"),C=d.append("g").attr("class","title");g.title&&C.append("text").attr("x",0).attr("y",0).attr("fill",g.title.fill).attr("font-size",g.title.fontSize).attr("dominant-baseline",a(g.title.horizontalPos)).attr("text-anchor",i(g.title.verticalPos)).attr("transform",s(g.title)).text(g.title.text),g.borderLines&&y.selectAll("line").data(g.borderLines).enter().append("line").attr("x1",S=>S.x1).attr("y1",S=>S.y1).attr("x2",S=>S.x2).attr("y2",S=>S.y2).style("stroke",S=>S.strokeFill).style("stroke-width",S=>S.strokeWidth);let k=v.selectAll("g.quadrant").data(g.quadrants).enter().append("g").attr("class","quadrant");k.append("rect").attr("x",S=>S.x).attr("y",S=>S.y).attr("width",S=>S.width).attr("height",S=>S.height).attr("fill",S=>S.fill),k.append("text").attr("x",0).attr("y",0).attr("fill",S=>S.text.fill).attr("font-size",S=>S.text.fontSize).attr("dominant-baseline",S=>a(S.text.horizontalPos)).attr("text-anchor",S=>i(S.text.verticalPos)).attr("transform",S=>s(S.text)).text(S=>S.text.text),w.selectAll("g.label").data(g.axisLabels).enter().append("g").attr("class","label").append("text").attr("x",0).attr("y",0).text(S=>S.text).attr("fill",S=>S.fill).attr("font-size",S=>S.fontSize).attr("dominant-baseline",S=>a(S.horizontalPos)).attr("text-anchor",S=>i(S.verticalPos)).attr("transform",S=>s(S));let _=b.selectAll("g.data-point").data(g.points).enter().append("g").attr("class","data-point");_.append("circle").attr("cx",S=>S.x).attr("cy",S=>S.y).attr("r",S=>S.radius).attr("fill",S=>S.fill).attr("stroke",S=>S.strokeColor).attr("stroke-width",S=>S.strokeWidth),_.append("text").attr("x",0).attr("y",0).text(S=>S.text.text).attr("fill",S=>S.text.fill).attr("font-size",S=>S.text.fontSize).attr("dominant-baseline",S=>a(S.text.horizontalPos)).attr("text-anchor",S=>i(S.text.verticalPos)).attr("transform",S=>s(S.text))},"draw"),H2t={draw:V2t},W2t={parser:z2t,db:q2t,renderer:H2t,styles:x(()=>"","styles")}});var iSe={};lr(iSe,{diagram:()=>sxt});function fq(t){return t.type==="bar"}function mq(t){return t.type==="band"}function hx(t){return t.type==="linear"}function dq(t,e,r,n){let a=new UCe(n);return mq(t)?new X2t(e,r,t.categories,t.title,a):new j2t(e,r,[t.min,t.max],t.title,a)}function VCe(t,e,r,n){let a=new UCe(n);return new K2t(a,t,e,r)}function HCe(t,e,r){return new J2t(t,e,r)}function vq(){let t=pp(),e=wr();return mi(t.xyChart,e.themeVariables.xyChart)}function yq(){let t=wr();return mi(or.xyChart,t.xyChart)}function xq(){return{yAxis:{type:"linear",title:"",min:1/0,max:-1/0},xAxis:{type:"band",title:"",categories:[]},title:"",plots:[]}}function i9(t){let e=wr();return Er(t.trim(),e)}function YCe(t){WCe=t}function XCe(t){t==="horizontal"?n6.chartOrientation="horizontal":n6.chartOrientation="vertical"}function jCe(t){on.xAxis.title=i9(t.text)}function bq(t,e){on.xAxis={type:"linear",title:on.xAxis.title,min:t,max:e},a9=!0}function KCe(t){on.xAxis={type:"band",title:on.xAxis.title,categories:t.map(e=>i9(e.text))},a9=!0}function ZCe(t){on.yAxis.title=i9(t.text)}function QCe(t,e){on.yAxis={type:"linear",title:on.yAxis.title,min:t,max:e},gq=!0}function JCe(t){let e=Math.min(...t),r=Math.max(...t),n=hx(on.yAxis)?on.yAxis.min:1/0,a=hx(on.yAxis)?on.yAxis.max:-1/0;on.yAxis={type:"linear",title:on.yAxis.title,min:Math.min(n,e),max:Math.max(a,r)}}function wq(t){let e=[];if(t.length===0)return e;if(!a9){let r=hx(on.xAxis)?on.xAxis.min:1/0,n=hx(on.xAxis)?on.xAxis.max:-1/0;bq(Math.min(r,1),Math.max(n,t.length))}if(gq||JCe(t),mq(on.xAxis)&&(e=on.xAxis.categories.map((r,n)=>[r,t[n]])),hx(on.xAxis)){let r=on.xAxis.min,n=on.xAxis.max,a=(n-r)/(t.length-1),i=[];for(let s=r;s<=n;s+=a)i.push(`${s}`);e=i.map((s,o)=>[s,t[o]])}return e}function kq(t){return pq[t===0?0:t%pq.length]}function eSe(t,e){let r=wq(e);on.plots.push({type:"line",strokeFill:kq(r6),strokeWidth:2,data:r}),r6++}function tSe(t,e){let r=wq(e);on.plots.push({type:"bar",fill:kq(r6),data:r}),r6++}function rSe(){if(on.plots.length===0)throw Error("No Plot to render, please provide a plot with some data");return on.title=Rr(),txt.build(n6,on,a6,WCe)}function nSe(){return a6}function aSe(){return n6}var hq,Y2t,fx,UCe,$Ce,GCe,dx,qCe,px,X2t,mx,j2t,gx,K2t,vx,Z2t,yx,Q2t,xx,J2t,bx,ext,wx,txt,r6,WCe,n6,a6,on,pq,a9,gq,rxt,nxt,axt,ixt,sxt,sSe=A(()=>{Fi();ln();mc();ur();cr();cr();cr();hq=(function(){var t=x(function(O,R,P,B){for(P=P||{},B=O.length;B--;P[O[B]]=R);return P},"o"),e=[1,10,12,14,16,18,19,21,23],r=[2,6],n=[1,3],a=[1,5],i=[1,6],s=[1,7],o=[1,5,10,12,14,16,18,19,21,23,34,35,36],l=[1,25],u=[1,26],h=[1,28],f=[1,29],d=[1,30],p=[1,31],m=[1,32],g=[1,33],v=[1,34],y=[1,35],b=[1,36],w=[1,37],C=[1,43],k=[1,42],E=[1,47],_=[1,50],S=[1,10,12,14,16,18,19,21,23,34,35,36],L=[1,10,12,14,16,18,19,21,23,24,26,27,28,34,35,36],M=[1,10,12,14,16,18,19,21,23,24,26,27,28,34,35,36,41,42,43,44,45,46,47,48,49,50],D=[1,64],T={trace:x(function(){},"trace"),yy:{},symbols_:{error:2,start:3,eol:4,XYCHART:5,chartConfig:6,document:7,CHART_ORIENTATION:8,statement:9,title:10,text:11,X_AXIS:12,parseXAxis:13,Y_AXIS:14,parseYAxis:15,LINE:16,plotData:17,BAR:18,acc_title:19,acc_title_value:20,acc_descr:21,acc_descr_value:22,acc_descr_multiline_value:23,SQUARE_BRACES_START:24,commaSeparatedNumbers:25,SQUARE_BRACES_END:26,NUMBER_WITH_DECIMAL:27,COMMA:28,xAxisData:29,bandData:30,ARROW_DELIMITER:31,commaSeparatedTexts:32,yAxisData:33,NEWLINE:34,SEMI:35,EOF:36,alphaNum:37,STR:38,MD_STR:39,alphaNumToken:40,AMP:41,NUM:42,ALPHA:43,PLUS:44,EQUALS:45,MULT:46,DOT:47,BRKT:48,MINUS:49,UNDERSCORE:50,$accept:0,$end:1},terminals_:{2:"error",5:"XYCHART",8:"CHART_ORIENTATION",10:"title",12:"X_AXIS",14:"Y_AXIS",16:"LINE",18:"BAR",19:"acc_title",20:"acc_title_value",21:"acc_descr",22:"acc_descr_value",23:"acc_descr_multiline_value",24:"SQUARE_BRACES_START",26:"SQUARE_BRACES_END",27:"NUMBER_WITH_DECIMAL",28:"COMMA",31:"ARROW_DELIMITER",34:"NEWLINE",35:"SEMI",36:"EOF",38:"STR",39:"MD_STR",41:"AMP",42:"NUM",43:"ALPHA",44:"PLUS",45:"EQUALS",46:"MULT",47:"DOT",48:"BRKT",49:"MINUS",50:"UNDERSCORE"},productions_:[0,[3,2],[3,3],[3,2],[3,1],[6,1],[7,0],[7,2],[9,2],[9,2],[9,2],[9,2],[9,2],[9,3],[9,2],[9,3],[9,2],[9,2],[9,1],[17,3],[25,3],[25,1],[13,1],[13,2],[13,1],[29,1],[29,3],[30,3],[32,3],[32,1],[15,1],[15,2],[15,1],[33,3],[4,1],[4,1],[4,1],[11,1],[11,1],[11,1],[37,1],[37,2],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1]],performAction:x(function(R,P,B,F,G,z,H){var Q=z.length-1;switch(G){case 5:F.setOrientation(z[Q]);break;case 9:F.setDiagramTitle(z[Q].text.trim());break;case 12:F.setLineData({text:"",type:"text"},z[Q]);break;case 13:F.setLineData(z[Q-1],z[Q]);break;case 14:F.setBarData({text:"",type:"text"},z[Q]);break;case 15:F.setBarData(z[Q-1],z[Q]);break;case 16:this.$=z[Q].trim(),F.setAccTitle(this.$);break;case 17:case 18:this.$=z[Q].trim(),F.setAccDescription(this.$);break;case 19:this.$=z[Q-1];break;case 20:this.$=[Number(z[Q-2]),...z[Q]];break;case 21:this.$=[Number(z[Q])];break;case 22:F.setXAxisTitle(z[Q]);break;case 23:F.setXAxisTitle(z[Q-1]);break;case 24:F.setXAxisTitle({type:"text",text:""});break;case 25:F.setXAxisBand(z[Q]);break;case 26:F.setXAxisRangeData(Number(z[Q-2]),Number(z[Q]));break;case 27:this.$=z[Q-1];break;case 28:this.$=[z[Q-2],...z[Q]];break;case 29:this.$=[z[Q]];break;case 30:F.setYAxisTitle(z[Q]);break;case 31:F.setYAxisTitle(z[Q-1]);break;case 32:F.setYAxisTitle({type:"text",text:""});break;case 33:F.setYAxisRangeData(Number(z[Q-2]),Number(z[Q]));break;case 37:this.$={text:z[Q],type:"text"};break;case 38:this.$={text:z[Q],type:"text"};break;case 39:this.$={text:z[Q],type:"markdown"};break;case 40:this.$=z[Q];break;case 41:this.$=z[Q-1]+""+z[Q];break}},"anonymous"),table:[t(e,r,{3:1,4:2,7:4,5:n,34:a,35:i,36:s}),{1:[3]},t(e,r,{4:2,7:4,3:8,5:n,34:a,35:i,36:s}),t(e,r,{4:2,7:4,6:9,3:10,5:n,8:[1,11],34:a,35:i,36:s}),{1:[2,4],9:12,10:[1,13],12:[1,14],14:[1,15],16:[1,16],18:[1,17],19:[1,18],21:[1,19],23:[1,20]},t(o,[2,34]),t(o,[2,35]),t(o,[2,36]),{1:[2,1]},t(e,r,{4:2,7:4,3:21,5:n,34:a,35:i,36:s}),{1:[2,3]},t(o,[2,5]),t(e,[2,7],{4:22,34:a,35:i,36:s}),{11:23,37:24,38:l,39:u,40:27,41:h,42:f,43:d,44:p,45:m,46:g,47:v,48:y,49:b,50:w},{11:39,13:38,24:C,27:k,29:40,30:41,37:24,38:l,39:u,40:27,41:h,42:f,43:d,44:p,45:m,46:g,47:v,48:y,49:b,50:w},{11:45,15:44,27:E,33:46,37:24,38:l,39:u,40:27,41:h,42:f,43:d,44:p,45:m,46:g,47:v,48:y,49:b,50:w},{11:49,17:48,24:_,37:24,38:l,39:u,40:27,41:h,42:f,43:d,44:p,45:m,46:g,47:v,48:y,49:b,50:w},{11:52,17:51,24:_,37:24,38:l,39:u,40:27,41:h,42:f,43:d,44:p,45:m,46:g,47:v,48:y,49:b,50:w},{20:[1,53]},{22:[1,54]},t(S,[2,18]),{1:[2,2]},t(S,[2,8]),t(S,[2,9]),t(L,[2,37],{40:55,41:h,42:f,43:d,44:p,45:m,46:g,47:v,48:y,49:b,50:w}),t(L,[2,38]),t(L,[2,39]),t(M,[2,40]),t(M,[2,42]),t(M,[2,43]),t(M,[2,44]),t(M,[2,45]),t(M,[2,46]),t(M,[2,47]),t(M,[2,48]),t(M,[2,49]),t(M,[2,50]),t(M,[2,51]),t(S,[2,10]),t(S,[2,22],{30:41,29:56,24:C,27:k}),t(S,[2,24]),t(S,[2,25]),{31:[1,57]},{11:59,32:58,37:24,38:l,39:u,40:27,41:h,42:f,43:d,44:p,45:m,46:g,47:v,48:y,49:b,50:w},t(S,[2,11]),t(S,[2,30],{33:60,27:E}),t(S,[2,32]),{31:[1,61]},t(S,[2,12]),{17:62,24:_},{25:63,27:D},t(S,[2,14]),{17:65,24:_},t(S,[2,16]),t(S,[2,17]),t(M,[2,41]),t(S,[2,23]),{27:[1,66]},{26:[1,67]},{26:[2,29],28:[1,68]},t(S,[2,31]),{27:[1,69]},t(S,[2,13]),{26:[1,70]},{26:[2,21],28:[1,71]},t(S,[2,15]),t(S,[2,26]),t(S,[2,27]),{11:59,32:72,37:24,38:l,39:u,40:27,41:h,42:f,43:d,44:p,45:m,46:g,47:v,48:y,49:b,50:w},t(S,[2,33]),t(S,[2,19]),{25:73,27:D},{26:[2,28]},{26:[2,20]}],defaultActions:{8:[2,1],10:[2,3],21:[2,2],72:[2,28],73:[2,20]},parseError:x(function(R,P){if(P.recoverable)this.trace(R);else{var B=new Error(R);throw B.hash=P,B}},"parseError"),parse:x(function(R){var P=this,B=[0],F=[],G=[null],z=[],H=this.table,Q="",Y=0,ie=0,se=0,oe=2,pe=1,J=z.slice.call(arguments,1),j=Object.create(this.lexer),Z={yy:{}};for(var K in this.yy)Object.prototype.hasOwnProperty.call(this.yy,K)&&(Z.yy[K]=this.yy[K]);j.setInput(R,Z.yy),Z.yy.lexer=j,Z.yy.parser=this,typeof j.yylloc>"u"&&(j.yylloc={});var X=j.yylloc;z.push(X);var ae=j.options&&j.options.ranges;typeof Z.yy.parseError=="function"?this.parseError=Z.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function W(fe){B.length=B.length-2*fe,G.length=G.length-fe,z.length=z.length-fe}x(W,"popStack");function Se(){var fe;return fe=F.pop()||j.lex()||pe,typeof fe!="number"&&(fe instanceof Array&&(F=fe,fe=F.pop()),fe=P.symbols_[fe]||fe),fe}x(Se,"lex");for(var ne,ee,$e,me,Ie,Ue,Fe={},Ae,Me,ke,ve;;){if($e=B[B.length-1],this.defaultActions[$e]?me=this.defaultActions[$e]:((ne===null||typeof ne>"u")&&(ne=Se()),me=H[$e]&&H[$e][ne]),typeof me>"u"||!me.length||!me[0]){var _e="";ve=[];for(Ae in H[$e])this.terminals_[Ae]&&Ae>oe&&ve.push("'"+this.terminals_[Ae]+"'");j.showPosition?_e="Parse error on line "+(Y+1)+`: -`+j.showPosition()+` -Expecting `+ve.join(", ")+", got '"+(this.terminals_[ne]||ne)+"'":_e="Parse error on line "+(Y+1)+": Unexpected "+(ne==pe?"end of input":"'"+(this.terminals_[ne]||ne)+"'"),this.parseError(_e,{text:j.match,token:this.terminals_[ne]||ne,line:j.yylineno,loc:X,expected:ve})}if(me[0]instanceof Array&&me.length>1)throw new Error("Parse Error: multiple actions possible at state: "+$e+", token: "+ne);switch(me[0]){case 1:B.push(ne),G.push(j.yytext),z.push(j.yylloc),B.push(me[1]),ne=null,ee?(ne=ee,ee=null):(ie=j.yyleng,Q=j.yytext,Y=j.yylineno,X=j.yylloc,se>0&&se--);break;case 2:if(Me=this.productions_[me[1]][1],Fe.$=G[G.length-Me],Fe._$={first_line:z[z.length-(Me||1)].first_line,last_line:z[z.length-1].last_line,first_column:z[z.length-(Me||1)].first_column,last_column:z[z.length-1].last_column},ae&&(Fe._$.range=[z[z.length-(Me||1)].range[0],z[z.length-1].range[1]]),Ue=this.performAction.apply(Fe,[Q,ie,Y,Z.yy,me[1],G,z].concat(J)),typeof Ue<"u")return Ue;Me&&(B=B.slice(0,-1*Me*2),G=G.slice(0,-1*Me),z=z.slice(0,-1*Me)),B.push(this.productions_[me[1]][0]),G.push(Fe.$),z.push(Fe._$),ke=H[B[B.length-2]][B[B.length-1]],B.push(ke);break;case 3:return!0}}return!0},"parse")},I=(function(){var O={EOF:1,parseError:x(function(P,B){if(this.yy.parser)this.yy.parser.parseError(P,B);else throw new Error(P)},"parseError"),setInput:x(function(R,P){return this.yy=P||this.yy||{},this._input=R,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:x(function(){var R=this._input[0];this.yytext+=R,this.yyleng++,this.offset++,this.match+=R,this.matched+=R;var P=R.match(/(?:\r\n?|\n).*/g);return P?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),R},"input"),unput:x(function(R){var P=R.length,B=R.split(/(?:\r\n?|\n)/g);this._input=R+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-P),this.offset-=P;var F=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),B.length-1&&(this.yylineno-=B.length-1);var G=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:B?(B.length===F.length?this.yylloc.first_column:0)+F[F.length-B.length].length-B[0].length:this.yylloc.first_column-P},this.options.ranges&&(this.yylloc.range=[G[0],G[0]+this.yyleng-P]),this.yyleng=this.yytext.length,this},"unput"),more:x(function(){return this._more=!0,this},"more"),reject:x(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). -`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:x(function(R){this.unput(this.match.slice(R))},"less"),pastInput:x(function(){var R=this.matched.substr(0,this.matched.length-this.match.length);return(R.length>20?"...":"")+R.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:x(function(){var R=this.match;return R.length<20&&(R+=this._input.substr(0,20-R.length)),(R.substr(0,20)+(R.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:x(function(){var R=this.pastInput(),P=new Array(R.length+1).join("-");return R+this.upcomingInput()+` -`+P+"^"},"showPosition"),test_match:x(function(R,P){var B,F,G;if(this.options.backtrack_lexer&&(G={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(G.yylloc.range=this.yylloc.range.slice(0))),F=R[0].match(/(?:\r\n?|\n).*/g),F&&(this.yylineno+=F.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:F?F[F.length-1].length-F[F.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+R[0].length},this.yytext+=R[0],this.match+=R[0],this.matches=R,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(R[0].length),this.matched+=R[0],B=this.performAction.call(this,this.yy,this,P,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),B)return B;if(this._backtrack){for(var z in G)this[z]=G[z];return!1}return!1},"test_match"),next:x(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var R,P,B,F;this._more||(this.yytext="",this.match="");for(var G=this._currentRules(),z=0;zP[0].length)){if(P=B,F=z,this.options.backtrack_lexer){if(R=this.test_match(B,G[z]),R!==!1)return R;if(this._backtrack){P=!1;continue}else return!1}else if(!this.options.flex)break}return P?(R=this.test_match(P,G[F]),R!==!1?R:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. -`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:x(function(){var P=this.next();return P||this.lex()},"lex"),begin:x(function(P){this.conditionStack.push(P)},"begin"),popState:x(function(){var P=this.conditionStack.length-1;return P>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:x(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:x(function(P){return P=this.conditionStack.length-1-Math.abs(P||0),P>=0?this.conditionStack[P]:"INITIAL"},"topState"),pushState:x(function(P){this.begin(P)},"pushState"),stateStackSize:x(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:x(function(P,B,F,G){var z=G;switch(F){case 0:break;case 1:break;case 2:return this.popState(),34;break;case 3:return this.popState(),34;break;case 4:return 34;case 5:break;case 6:return 10;case 7:return this.pushState("acc_title"),19;break;case 8:return this.popState(),"acc_title_value";break;case 9:return this.pushState("acc_descr"),21;break;case 10:return this.popState(),"acc_descr_value";break;case 11:this.pushState("acc_descr_multiline");break;case 12:this.popState();break;case 13:return"acc_descr_multiline_value";case 14:return 5;case 15:return 8;case 16:return this.pushState("axis_data"),"X_AXIS";break;case 17:return this.pushState("axis_data"),"Y_AXIS";break;case 18:return this.pushState("axis_band_data"),24;break;case 19:return 31;case 20:return this.pushState("data"),16;break;case 21:return this.pushState("data"),18;break;case 22:return this.pushState("data_inner"),24;break;case 23:return 27;case 24:return this.popState(),26;break;case 25:this.popState();break;case 26:this.pushState("string");break;case 27:this.popState();break;case 28:return"STR";case 29:return 24;case 30:return 26;case 31:return 43;case 32:return"COLON";case 33:return 44;case 34:return 28;case 35:return 45;case 36:return 46;case 37:return 48;case 38:return 50;case 39:return 47;case 40:return 41;case 41:return 49;case 42:return 42;case 43:break;case 44:return 35;case 45:return 36}},"anonymous"),rules:[/^(?:%%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:(\r?\n))/i,/^(?:(\r?\n))/i,/^(?:[\n\r]+)/i,/^(?:%%[^\n]*)/i,/^(?:title\b)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:\{)/i,/^(?:[^\}]*)/i,/^(?:xychart-beta\b)/i,/^(?:(?:vertical|horizontal))/i,/^(?:x-axis\b)/i,/^(?:y-axis\b)/i,/^(?:\[)/i,/^(?:-->)/i,/^(?:line\b)/i,/^(?:bar\b)/i,/^(?:\[)/i,/^(?:[+-]?(?:\d+(?:\.\d+)?|\.\d+))/i,/^(?:\])/i,/^(?:(?:`\) \{ this\.pushState\(md_string\); \}\n\(\?:\(\?!`"\)\.\)\+ \{ return MD_STR; \}\n\(\?:`))/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:\[)/i,/^(?:\])/i,/^(?:[A-Za-z]+)/i,/^(?::)/i,/^(?:\+)/i,/^(?:,)/i,/^(?:=)/i,/^(?:\*)/i,/^(?:#)/i,/^(?:[\_])/i,/^(?:\.)/i,/^(?:&)/i,/^(?:-)/i,/^(?:[0-9]+)/i,/^(?:\s+)/i,/^(?:;)/i,/^(?:$)/i],conditions:{data_inner:{rules:[0,1,4,5,6,7,9,11,14,15,16,17,20,21,23,24,25,26,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45],inclusive:!0},data:{rules:[0,1,3,4,5,6,7,9,11,14,15,16,17,20,21,22,25,26,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45],inclusive:!0},axis_band_data:{rules:[0,1,4,5,6,7,9,11,14,15,16,17,20,21,24,25,26,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45],inclusive:!0},axis_data:{rules:[0,1,2,4,5,6,7,9,11,14,15,16,17,18,19,20,21,23,25,26,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45],inclusive:!0},acc_descr_multiline:{rules:[12,13],inclusive:!1},acc_descr:{rules:[10],inclusive:!1},acc_title:{rules:[8],inclusive:!1},title:{rules:[],inclusive:!1},md_string:{rules:[],inclusive:!1},string:{rules:[27,28],inclusive:!1},INITIAL:{rules:[0,1,4,5,6,7,9,11,14,15,16,17,20,21,25,26,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45],inclusive:!0}}};return O})();T.lexer=I;function N(){this.yy={}}return x(N,"Parser"),N.prototype=T,T.Parser=N,new N})();hq.parser=hq;Y2t=hq;x(fq,"isBarPlot");x(mq,"isBandAxisData");x(hx,"isLinearAxisData");UCe=(fx=class{constructor(e){this.parentGroup=e}getMaxDimension(e,r){if(!this.parentGroup)return{width:e.reduce((i,s)=>Math.max(s.length,i),0)*r,height:r};let n={width:0,height:0},a=this.parentGroup.append("g").attr("visibility","hidden").attr("font-size",r);for(let i of e){let s=sP(a,1,i),o=s?s.width:i.length*r,l=s?s.height:r;n.width=Math.max(n.width,o),n.height=Math.max(n.height,l)}return a.remove(),n}},x(fx,"TextDimensionCalculatorWithFont"),fx),$Ce=.7,GCe=.2,qCe=(dx=class{constructor(e,r,n,a){this.axisConfig=e,this.title=r,this.textDimensionCalculator=n,this.axisThemeConfig=a,this.boundingRect={x:0,y:0,width:0,height:0},this.axisPosition="left",this.showTitle=!1,this.showLabel=!1,this.showTick=!1,this.showAxisLine=!1,this.outerPadding=0,this.titleTextHeight=0,this.labelTextHeight=0,this.range=[0,10],this.boundingRect={x:0,y:0,width:0,height:0},this.axisPosition="left"}setRange(e){this.range=e,this.axisPosition==="left"||this.axisPosition==="right"?this.boundingRect.height=e[1]-e[0]:this.boundingRect.width=e[1]-e[0],this.recalculateScale()}getRange(){return[this.range[0]+this.outerPadding,this.range[1]-this.outerPadding]}setAxisPosition(e){this.axisPosition=e,this.setRange(this.range)}getTickDistance(){let e=this.getRange();return Math.abs(e[0]-e[1])/this.getTickValues().length}getAxisOuterPadding(){return this.outerPadding}getLabelDimension(){return this.textDimensionCalculator.getMaxDimension(this.getTickValues().map(e=>e.toString()),this.axisConfig.labelFontSize)}recalculateOuterPaddingToDrawBar(){$Ce*this.getTickDistance()>this.outerPadding*2&&(this.outerPadding=Math.floor($Ce*this.getTickDistance()/2)),this.recalculateScale()}calculateSpaceIfDrawnHorizontally(e){let r=e.height;if(this.axisConfig.showAxisLine&&r>this.axisConfig.axisLineWidth&&(r-=this.axisConfig.axisLineWidth,this.showAxisLine=!0),this.axisConfig.showLabel){let n=this.getLabelDimension(),a=GCe*e.width;this.outerPadding=Math.min(n.width/2,a);let i=n.height+this.axisConfig.labelPadding*2;this.labelTextHeight=n.height,i<=r&&(r-=i,this.showLabel=!0)}if(this.axisConfig.showTick&&r>=this.axisConfig.tickLength&&(this.showTick=!0,r-=this.axisConfig.tickLength),this.axisConfig.showTitle&&this.title){let n=this.textDimensionCalculator.getMaxDimension([this.title],this.axisConfig.titleFontSize),a=n.height+this.axisConfig.titlePadding*2;this.titleTextHeight=n.height,a<=r&&(r-=a,this.showTitle=!0)}this.boundingRect.width=e.width,this.boundingRect.height=e.height-r}calculateSpaceIfDrawnVertical(e){let r=e.width;if(this.axisConfig.showAxisLine&&r>this.axisConfig.axisLineWidth&&(r-=this.axisConfig.axisLineWidth,this.showAxisLine=!0),this.axisConfig.showLabel){let n=this.getLabelDimension(),a=GCe*e.height;this.outerPadding=Math.min(n.height/2,a);let i=n.width+this.axisConfig.labelPadding*2;i<=r&&(r-=i,this.showLabel=!0)}if(this.axisConfig.showTick&&r>=this.axisConfig.tickLength&&(this.showTick=!0,r-=this.axisConfig.tickLength),this.axisConfig.showTitle&&this.title){let n=this.textDimensionCalculator.getMaxDimension([this.title],this.axisConfig.titleFontSize),a=n.height+this.axisConfig.titlePadding*2;this.titleTextHeight=n.height,a<=r&&(r-=a,this.showTitle=!0)}this.boundingRect.width=e.width-r,this.boundingRect.height=e.height}calculateSpace(e){return this.axisPosition==="left"||this.axisPosition==="right"?this.calculateSpaceIfDrawnVertical(e):this.calculateSpaceIfDrawnHorizontally(e),this.recalculateScale(),{width:this.boundingRect.width,height:this.boundingRect.height}}setBoundingBoxXY(e){this.boundingRect.x=e.x,this.boundingRect.y=e.y}getDrawableElementsForLeftAxis(){let e=[];if(this.showAxisLine){let r=this.boundingRect.x+this.boundingRect.width-this.axisConfig.axisLineWidth/2;e.push({type:"path",groupTexts:["left-axis","axisl-line"],data:[{path:`M ${r},${this.boundingRect.y} L ${r},${this.boundingRect.y+this.boundingRect.height} `,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})}if(this.showLabel&&e.push({type:"text",groupTexts:["left-axis","label"],data:this.getTickValues().map(r=>({text:r.toString(),x:this.boundingRect.x+this.boundingRect.width-(this.showLabel?this.axisConfig.labelPadding:0)-(this.showTick?this.axisConfig.tickLength:0)-(this.showAxisLine?this.axisConfig.axisLineWidth:0),y:this.getScaleValue(r),fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:0,verticalPos:"middle",horizontalPos:"right"}))}),this.showTick){let r=this.boundingRect.x+this.boundingRect.width-(this.showAxisLine?this.axisConfig.axisLineWidth:0);e.push({type:"path",groupTexts:["left-axis","ticks"],data:this.getTickValues().map(n=>({path:`M ${r},${this.getScaleValue(n)} L ${r-this.axisConfig.tickLength},${this.getScaleValue(n)}`,strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth}))})}return this.showTitle&&e.push({type:"text",groupTexts:["left-axis","title"],data:[{text:this.title,x:this.boundingRect.x+this.axisConfig.titlePadding,y:this.boundingRect.y+this.boundingRect.height/2,fill:this.axisThemeConfig.titleColor,fontSize:this.axisConfig.titleFontSize,rotation:270,verticalPos:"top",horizontalPos:"center"}]}),e}getDrawableElementsForBottomAxis(){let e=[];if(this.showAxisLine){let r=this.boundingRect.y+this.axisConfig.axisLineWidth/2;e.push({type:"path",groupTexts:["bottom-axis","axis-line"],data:[{path:`M ${this.boundingRect.x},${r} L ${this.boundingRect.x+this.boundingRect.width},${r}`,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})}if(this.showLabel&&e.push({type:"text",groupTexts:["bottom-axis","label"],data:this.getTickValues().map(r=>({text:r.toString(),x:this.getScaleValue(r),y:this.boundingRect.y+this.axisConfig.labelPadding+(this.showTick?this.axisConfig.tickLength:0)+(this.showAxisLine?this.axisConfig.axisLineWidth:0),fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:0,verticalPos:"top",horizontalPos:"center"}))}),this.showTick){let r=this.boundingRect.y+(this.showAxisLine?this.axisConfig.axisLineWidth:0);e.push({type:"path",groupTexts:["bottom-axis","ticks"],data:this.getTickValues().map(n=>({path:`M ${this.getScaleValue(n)},${r} L ${this.getScaleValue(n)},${r+this.axisConfig.tickLength}`,strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth}))})}return this.showTitle&&e.push({type:"text",groupTexts:["bottom-axis","title"],data:[{text:this.title,x:this.range[0]+(this.range[1]-this.range[0])/2,y:this.boundingRect.y+this.boundingRect.height-this.axisConfig.titlePadding-this.titleTextHeight,fill:this.axisThemeConfig.titleColor,fontSize:this.axisConfig.titleFontSize,rotation:0,verticalPos:"top",horizontalPos:"center"}]}),e}getDrawableElementsForTopAxis(){let e=[];if(this.showAxisLine){let r=this.boundingRect.y+this.boundingRect.height-this.axisConfig.axisLineWidth/2;e.push({type:"path",groupTexts:["top-axis","axis-line"],data:[{path:`M ${this.boundingRect.x},${r} L ${this.boundingRect.x+this.boundingRect.width},${r}`,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})}if(this.showLabel&&e.push({type:"text",groupTexts:["top-axis","label"],data:this.getTickValues().map(r=>({text:r.toString(),x:this.getScaleValue(r),y:this.boundingRect.y+(this.showTitle?this.titleTextHeight+this.axisConfig.titlePadding*2:0)+this.axisConfig.labelPadding,fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:0,verticalPos:"top",horizontalPos:"center"}))}),this.showTick){let r=this.boundingRect.y;e.push({type:"path",groupTexts:["top-axis","ticks"],data:this.getTickValues().map(n=>({path:`M ${this.getScaleValue(n)},${r+this.boundingRect.height-(this.showAxisLine?this.axisConfig.axisLineWidth:0)} L ${this.getScaleValue(n)},${r+this.boundingRect.height-this.axisConfig.tickLength-(this.showAxisLine?this.axisConfig.axisLineWidth:0)}`,strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth}))})}return this.showTitle&&e.push({type:"text",groupTexts:["top-axis","title"],data:[{text:this.title,x:this.boundingRect.x+this.boundingRect.width/2,y:this.boundingRect.y+this.axisConfig.titlePadding,fill:this.axisThemeConfig.titleColor,fontSize:this.axisConfig.titleFontSize,rotation:0,verticalPos:"top",horizontalPos:"center"}]}),e}getDrawableElements(){if(this.axisPosition==="left")return this.getDrawableElementsForLeftAxis();if(this.axisPosition==="right")throw Error("Drawing of right axis is not implemented");return this.axisPosition==="bottom"?this.getDrawableElementsForBottomAxis():this.axisPosition==="top"?this.getDrawableElementsForTopAxis():[]}},x(dx,"BaseAxis"),dx),X2t=(px=class extends qCe{constructor(e,r,n,a,i){super(e,a,i,r),this.categories=n,this.scale=x1().domain(this.categories).range(this.getRange())}setRange(e){super.setRange(e)}recalculateScale(){this.scale=x1().domain(this.categories).range(this.getRange()).paddingInner(1).paddingOuter(0).align(.5),te.trace("BandAxis axis final categories, range: ",this.categories,this.getRange())}getTickValues(){return this.categories}getScaleValue(e){return this.scale(e)??this.getRange()[0]}},x(px,"BandAxis"),px),j2t=(mx=class extends qCe{constructor(e,r,n,a,i){super(e,a,i,r),this.domain=n,this.scale=Kl().domain(this.domain).range(this.getRange())}getTickValues(){return this.scale.ticks()}recalculateScale(){let e=[...this.domain];this.axisPosition==="left"&&e.reverse(),this.scale=Kl().domain(e).range(this.getRange())}getScaleValue(e){return this.scale(e)}},x(mx,"LinearAxis"),mx);x(dq,"getAxis");K2t=(gx=class{constructor(e,r,n,a){this.textDimensionCalculator=e,this.chartConfig=r,this.chartData=n,this.chartThemeConfig=a,this.boundingRect={x:0,y:0,width:0,height:0},this.showChartTitle=!1}setBoundingBoxXY(e){this.boundingRect.x=e.x,this.boundingRect.y=e.y}calculateSpace(e){let r=this.textDimensionCalculator.getMaxDimension([this.chartData.title],this.chartConfig.titleFontSize),n=Math.max(r.width,e.width),a=r.height+2*this.chartConfig.titlePadding;return r.width<=n&&r.height<=a&&this.chartConfig.showTitle&&this.chartData.title&&(this.boundingRect.width=n,this.boundingRect.height=a,this.showChartTitle=!0),{width:this.boundingRect.width,height:this.boundingRect.height}}getDrawableElements(){let e=[];return this.showChartTitle&&e.push({groupTexts:["chart-title"],type:"text",data:[{fontSize:this.chartConfig.titleFontSize,text:this.chartData.title,verticalPos:"middle",horizontalPos:"center",x:this.boundingRect.x+this.boundingRect.width/2,y:this.boundingRect.y+this.boundingRect.height/2,fill:this.chartThemeConfig.titleColor,rotation:0}]}),e}},x(gx,"ChartTitle"),gx);x(VCe,"getChartTitleComponent");Z2t=(vx=class{constructor(e,r,n,a,i){this.plotData=e,this.xAxis=r,this.yAxis=n,this.orientation=a,this.plotIndex=i}getDrawableElement(){let e=this.plotData.data.map(n=>[this.xAxis.getScaleValue(n[0]),this.yAxis.getScaleValue(n[1])]),r;return this.orientation==="horizontal"?r=tc().y(n=>n[0]).x(n=>n[1])(e):r=tc().x(n=>n[0]).y(n=>n[1])(e),r?[{groupTexts:["plot",`line-plot-${this.plotIndex}`],type:"path",data:[{path:r,strokeFill:this.plotData.strokeFill,strokeWidth:this.plotData.strokeWidth}]}]:[]}},x(vx,"LinePlot"),vx),Q2t=(yx=class{constructor(e,r,n,a,i,s){this.barData=e,this.boundingRect=r,this.xAxis=n,this.yAxis=a,this.orientation=i,this.plotIndex=s}getDrawableElement(){let e=this.barData.data.map(i=>[this.xAxis.getScaleValue(i[0]),this.yAxis.getScaleValue(i[1])]),n=Math.min(this.xAxis.getAxisOuterPadding()*2,this.xAxis.getTickDistance())*(1-.05),a=n/2;return this.orientation==="horizontal"?[{groupTexts:["plot",`bar-plot-${this.plotIndex}`],type:"rect",data:e.map(i=>({x:this.boundingRect.x,y:i[0]-a,height:n,width:i[1]-this.boundingRect.x,fill:this.barData.fill,strokeWidth:0,strokeFill:this.barData.fill}))}]:[{groupTexts:["plot",`bar-plot-${this.plotIndex}`],type:"rect",data:e.map(i=>({x:i[0]-a,y:i[1],width:n,height:this.boundingRect.y+this.boundingRect.height-i[1],fill:this.barData.fill,strokeWidth:0,strokeFill:this.barData.fill}))}]}},x(yx,"BarPlot"),yx),J2t=(xx=class{constructor(e,r,n){this.chartConfig=e,this.chartData=r,this.chartThemeConfig=n,this.boundingRect={x:0,y:0,width:0,height:0}}setAxes(e,r){this.xAxis=e,this.yAxis=r}setBoundingBoxXY(e){this.boundingRect.x=e.x,this.boundingRect.y=e.y}calculateSpace(e){return this.boundingRect.width=e.width,this.boundingRect.height=e.height,{width:this.boundingRect.width,height:this.boundingRect.height}}getDrawableElements(){if(!(this.xAxis&&this.yAxis))throw Error("Axes must be passed to render Plots");let e=[];for(let[r,n]of this.chartData.plots.entries())switch(n.type){case"line":{let a=new Z2t(n,this.xAxis,this.yAxis,this.chartConfig.chartOrientation,r);e.push(...a.getDrawableElement())}break;case"bar":{let a=new Q2t(n,this.boundingRect,this.xAxis,this.yAxis,this.chartConfig.chartOrientation,r);e.push(...a.getDrawableElement())}break}return e}},x(xx,"BasePlot"),xx);x(HCe,"getPlotComponent");ext=(bx=class{constructor(e,r,n,a){this.chartConfig=e,this.chartData=r,this.componentStore={title:VCe(e,r,n,a),plot:HCe(e,r,n),xAxis:dq(r.xAxis,e.xAxis,{titleColor:n.xAxisTitleColor,labelColor:n.xAxisLabelColor,tickColor:n.xAxisTickColor,axisLineColor:n.xAxisLineColor},a),yAxis:dq(r.yAxis,e.yAxis,{titleColor:n.yAxisTitleColor,labelColor:n.yAxisLabelColor,tickColor:n.yAxisTickColor,axisLineColor:n.yAxisLineColor},a)}}calculateVerticalSpace(){let e=this.chartConfig.width,r=this.chartConfig.height,n=0,a=0,i=Math.floor(e*this.chartConfig.plotReservedSpacePercent/100),s=Math.floor(r*this.chartConfig.plotReservedSpacePercent/100),o=this.componentStore.plot.calculateSpace({width:i,height:s});e-=o.width,r-=o.height,o=this.componentStore.title.calculateSpace({width:this.chartConfig.width,height:r}),a=o.height,r-=o.height,this.componentStore.xAxis.setAxisPosition("bottom"),o=this.componentStore.xAxis.calculateSpace({width:e,height:r}),r-=o.height,this.componentStore.yAxis.setAxisPosition("left"),o=this.componentStore.yAxis.calculateSpace({width:e,height:r}),n=o.width,e-=o.width,e>0&&(i+=e,e=0),r>0&&(s+=r,r=0),this.componentStore.plot.calculateSpace({width:i,height:s}),this.componentStore.plot.setBoundingBoxXY({x:n,y:a}),this.componentStore.xAxis.setRange([n,n+i]),this.componentStore.xAxis.setBoundingBoxXY({x:n,y:a+s}),this.componentStore.yAxis.setRange([a,a+s]),this.componentStore.yAxis.setBoundingBoxXY({x:0,y:a}),this.chartData.plots.some(l=>fq(l))&&this.componentStore.xAxis.recalculateOuterPaddingToDrawBar()}calculateHorizontalSpace(){let e=this.chartConfig.width,r=this.chartConfig.height,n=0,a=0,i=0,s=Math.floor(e*this.chartConfig.plotReservedSpacePercent/100),o=Math.floor(r*this.chartConfig.plotReservedSpacePercent/100),l=this.componentStore.plot.calculateSpace({width:s,height:o});e-=l.width,r-=l.height,l=this.componentStore.title.calculateSpace({width:this.chartConfig.width,height:r}),n=l.height,r-=l.height,this.componentStore.xAxis.setAxisPosition("left"),l=this.componentStore.xAxis.calculateSpace({width:e,height:r}),e-=l.width,a=l.width,this.componentStore.yAxis.setAxisPosition("top"),l=this.componentStore.yAxis.calculateSpace({width:e,height:r}),r-=l.height,i=n+l.height,e>0&&(s+=e,e=0),r>0&&(o+=r,r=0),this.componentStore.plot.calculateSpace({width:s,height:o}),this.componentStore.plot.setBoundingBoxXY({x:a,y:i}),this.componentStore.yAxis.setRange([a,a+s]),this.componentStore.yAxis.setBoundingBoxXY({x:a,y:n}),this.componentStore.xAxis.setRange([i,i+o]),this.componentStore.xAxis.setBoundingBoxXY({x:0,y:i}),this.chartData.plots.some(u=>fq(u))&&this.componentStore.xAxis.recalculateOuterPaddingToDrawBar()}calculateSpace(){this.chartConfig.chartOrientation==="horizontal"?this.calculateHorizontalSpace():this.calculateVerticalSpace()}getDrawableElement(){this.calculateSpace();let e=[];this.componentStore.plot.setAxes(this.componentStore.xAxis,this.componentStore.yAxis);for(let r of Object.values(this.componentStore))e.push(...r.getDrawableElements());return e}},x(bx,"Orchestrator"),bx),txt=(wx=class{static build(e,r,n,a){return new ext(e,r,n,a).getDrawableElement()}},x(wx,"XYChartBuilder"),wx),r6=0,n6=yq(),a6=vq(),on=xq(),pq=a6.plotColorPalette.split(",").map(t=>t.trim()),a9=!1,gq=!1;x(vq,"getChartDefaultThemeConfig");x(yq,"getChartDefaultConfig");x(xq,"getChartDefaultData");x(i9,"textSanitizer");x(YCe,"setTmpSVGG");x(XCe,"setOrientation");x(jCe,"setXAxisTitle");x(bq,"setXAxisRangeData");x(KCe,"setXAxisBand");x(ZCe,"setYAxisTitle");x(QCe,"setYAxisRangeData");x(JCe,"setYAxisRangeFromPlotData");x(wq,"transformDataWithoutCategory");x(kq,"getPlotColorFromPalette");x(eSe,"setLineData");x(tSe,"setBarData");x(rSe,"getDrawableElem");x(nSe,"getChartThemeConfig");x(aSe,"getChartConfig");rxt=x(function(){Cr(),r6=0,n6=yq(),on=xq(),a6=vq(),pq=a6.plotColorPalette.split(",").map(t=>t.trim()),a9=!1,gq=!1},"clear"),nxt={getDrawableElem:rSe,clear:rxt,setAccTitle:Sr,getAccTitle:_r,setDiagramTitle:Fr,getDiagramTitle:Rr,getAccDescription:Lr,setAccDescription:Ar,setOrientation:XCe,setXAxisTitle:jCe,setXAxisRangeData:bq,setXAxisBand:KCe,setYAxisTitle:ZCe,setYAxisRangeData:QCe,setLineData:eSe,setBarData:tSe,setTmpSVGG:YCe,getChartThemeConfig:nSe,getChartConfig:aSe},axt=x((t,e,r,n)=>{let a=n.db,i=a.getChartThemeConfig(),s=a.getChartConfig();function o(v){return v==="top"?"text-before-edge":"middle"}x(o,"getDominantBaseLine");function l(v){return v==="left"?"start":v==="right"?"end":"middle"}x(l,"getTextAnchor");function u(v){return`translate(${v.x}, ${v.y}) rotate(${v.rotation||0})`}x(u,"getTextTransformation"),te.debug(`Rendering xychart chart -`+t);let h=yi(e),f=h.append("g").attr("class","main"),d=f.append("rect").attr("width",s.width).attr("height",s.height).attr("class","background");gn(h,s.height,s.width,!0),h.attr("viewBox",`0 0 ${s.width} ${s.height}`),d.attr("fill",i.backgroundColor),a.setTmpSVGG(h.append("g").attr("class","mermaid-tmp-group"));let p=a.getDrawableElem(),m={};function g(v){let y=f,b="";for(let[w]of v.entries()){let C=f;w>0&&m[b]&&(C=m[b]),b+=v[w],y=m[b],y||(y=m[b]=C.append("g").attr("class",v[w]))}return y}x(g,"getGroup");for(let v of p){if(v.data.length===0)continue;let y=g(v.groupTexts);switch(v.type){case"rect":y.selectAll("rect").data(v.data).enter().append("rect").attr("x",b=>b.x).attr("y",b=>b.y).attr("width",b=>b.width).attr("height",b=>b.height).attr("fill",b=>b.fill).attr("stroke",b=>b.strokeFill).attr("stroke-width",b=>b.strokeWidth);break;case"text":y.selectAll("text").data(v.data).enter().append("text").attr("x",0).attr("y",0).attr("fill",b=>b.fill).attr("font-size",b=>b.fontSize).attr("dominant-baseline",b=>o(b.verticalPos)).attr("text-anchor",b=>l(b.horizontalPos)).attr("transform",b=>u(b)).text(b=>b.text);break;case"path":y.selectAll("path").data(v.data).enter().append("path").attr("d",b=>b.path).attr("fill",b=>b.fill?b.fill:"none").attr("stroke",b=>b.strokeFill).attr("stroke-width",b=>b.strokeWidth);break}}},"draw"),ixt={draw:axt},sxt={parser:Y2t,db:nxt,renderer:ixt}});var lSe={};lr(lSe,{diagram:()=>fxt});var Tq,oxt,kx,lxt,uxt,cxt,oSe,hxt,fxt,uSe=A(()=>{wc();su();au();sl();Fo();eo();Mo();Fi();ln();ur();Tq=(function(){var t=x(function(fe,ue,$,le){for($=$||{},le=fe.length;le--;$[fe[le]]=ue);return $},"o"),e=[1,3],r=[1,4],n=[1,5],a=[1,6],i=[5,6,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,77,89,90],s=[1,22],o=[2,7],l=[1,26],u=[1,27],h=[1,28],f=[1,29],d=[1,33],p=[1,34],m=[1,35],g=[1,36],v=[1,37],y=[1,38],b=[1,24],w=[1,31],C=[1,32],k=[1,30],E=[1,39],_=[1,40],S=[5,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,77,89,90],L=[1,61],M=[89,90],D=[5,8,9,11,13,21,22,23,24,27,29,41,42,43,44,45,46,54,61,63,72,74,75,76,77,80,81,82,83,84,85,86,87,88,89,90],T=[27,29],I=[1,70],N=[1,71],O=[1,72],R=[1,73],P=[1,74],B=[1,75],F=[1,76],G=[1,83],z=[1,80],H=[1,84],Q=[1,85],Y=[1,86],ie=[1,87],se=[1,88],oe=[1,89],pe=[1,90],J=[1,91],j=[1,92],Z=[5,8,9,11,13,21,22,23,24,27,41,42,43,44,45,46,54,72,74,75,76,77,80,81,82,83,84,85,86,87,88,89,90],K=[63,64],X=[1,101],ae=[5,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,76,77,89,90],W=[5,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,75,76,77,80,81,82,83,84,85,86,87,88,89,90],Se=[1,110],ne=[1,106],ee=[1,107],$e=[1,108],me=[1,109],Ie=[1,111],Ue=[1,116],Fe=[1,117],Ae=[1,114],Me=[1,115],ke={trace:x(function(){},"trace"),yy:{},symbols_:{error:2,start:3,directive:4,NEWLINE:5,RD:6,diagram:7,EOF:8,acc_title:9,acc_title_value:10,acc_descr:11,acc_descr_value:12,acc_descr_multiline_value:13,requirementDef:14,elementDef:15,relationshipDef:16,direction:17,styleStatement:18,classDefStatement:19,classStatement:20,direction_tb:21,direction_bt:22,direction_rl:23,direction_lr:24,requirementType:25,requirementName:26,STRUCT_START:27,requirementBody:28,STYLE_SEPARATOR:29,idList:30,ID:31,COLONSEP:32,id:33,TEXT:34,text:35,RISK:36,riskLevel:37,VERIFYMTHD:38,verifyType:39,STRUCT_STOP:40,REQUIREMENT:41,FUNCTIONAL_REQUIREMENT:42,INTERFACE_REQUIREMENT:43,PERFORMANCE_REQUIREMENT:44,PHYSICAL_REQUIREMENT:45,DESIGN_CONSTRAINT:46,LOW_RISK:47,MED_RISK:48,HIGH_RISK:49,VERIFY_ANALYSIS:50,VERIFY_DEMONSTRATION:51,VERIFY_INSPECTION:52,VERIFY_TEST:53,ELEMENT:54,elementName:55,elementBody:56,TYPE:57,type:58,DOCREF:59,ref:60,END_ARROW_L:61,relationship:62,LINE:63,END_ARROW_R:64,CONTAINS:65,COPIES:66,DERIVES:67,SATISFIES:68,VERIFIES:69,REFINES:70,TRACES:71,CLASSDEF:72,stylesOpt:73,CLASS:74,ALPHA:75,COMMA:76,STYLE:77,style:78,styleComponent:79,NUM:80,COLON:81,UNIT:82,SPACE:83,BRKT:84,PCT:85,MINUS:86,LABEL:87,SEMICOLON:88,unqString:89,qString:90,$accept:0,$end:1},terminals_:{2:"error",5:"NEWLINE",6:"RD",8:"EOF",9:"acc_title",10:"acc_title_value",11:"acc_descr",12:"acc_descr_value",13:"acc_descr_multiline_value",21:"direction_tb",22:"direction_bt",23:"direction_rl",24:"direction_lr",27:"STRUCT_START",29:"STYLE_SEPARATOR",31:"ID",32:"COLONSEP",34:"TEXT",36:"RISK",38:"VERIFYMTHD",40:"STRUCT_STOP",41:"REQUIREMENT",42:"FUNCTIONAL_REQUIREMENT",43:"INTERFACE_REQUIREMENT",44:"PERFORMANCE_REQUIREMENT",45:"PHYSICAL_REQUIREMENT",46:"DESIGN_CONSTRAINT",47:"LOW_RISK",48:"MED_RISK",49:"HIGH_RISK",50:"VERIFY_ANALYSIS",51:"VERIFY_DEMONSTRATION",52:"VERIFY_INSPECTION",53:"VERIFY_TEST",54:"ELEMENT",57:"TYPE",59:"DOCREF",61:"END_ARROW_L",63:"LINE",64:"END_ARROW_R",65:"CONTAINS",66:"COPIES",67:"DERIVES",68:"SATISFIES",69:"VERIFIES",70:"REFINES",71:"TRACES",72:"CLASSDEF",74:"CLASS",75:"ALPHA",76:"COMMA",77:"STYLE",80:"NUM",81:"COLON",82:"UNIT",83:"SPACE",84:"BRKT",85:"PCT",86:"MINUS",87:"LABEL",88:"SEMICOLON",89:"unqString",90:"qString"},productions_:[0,[3,3],[3,2],[3,4],[4,2],[4,2],[4,1],[7,0],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[17,1],[17,1],[17,1],[17,1],[14,5],[14,7],[28,5],[28,5],[28,5],[28,5],[28,2],[28,1],[25,1],[25,1],[25,1],[25,1],[25,1],[25,1],[37,1],[37,1],[37,1],[39,1],[39,1],[39,1],[39,1],[15,5],[15,7],[56,5],[56,5],[56,2],[56,1],[16,5],[16,5],[62,1],[62,1],[62,1],[62,1],[62,1],[62,1],[62,1],[19,3],[20,3],[20,3],[30,1],[30,3],[30,1],[30,3],[18,3],[73,1],[73,3],[78,1],[78,2],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[26,1],[26,1],[33,1],[33,1],[35,1],[35,1],[55,1],[55,1],[58,1],[58,1],[60,1],[60,1]],performAction:x(function(ue,$,le,V,he,de,Ne){var we=de.length-1;switch(he){case 4:this.$=de[we].trim(),V.setAccTitle(this.$);break;case 5:case 6:this.$=de[we].trim(),V.setAccDescription(this.$);break;case 7:this.$=[];break;case 17:V.setDirection("TB");break;case 18:V.setDirection("BT");break;case 19:V.setDirection("RL");break;case 20:V.setDirection("LR");break;case 21:V.addRequirement(de[we-3],de[we-4]);break;case 22:V.addRequirement(de[we-5],de[we-6]),V.setClass([de[we-5]],de[we-3]);break;case 23:V.setNewReqId(de[we-2]);break;case 24:V.setNewReqText(de[we-2]);break;case 25:V.setNewReqRisk(de[we-2]);break;case 26:V.setNewReqVerifyMethod(de[we-2]);break;case 29:this.$=V.RequirementType.REQUIREMENT;break;case 30:this.$=V.RequirementType.FUNCTIONAL_REQUIREMENT;break;case 31:this.$=V.RequirementType.INTERFACE_REQUIREMENT;break;case 32:this.$=V.RequirementType.PERFORMANCE_REQUIREMENT;break;case 33:this.$=V.RequirementType.PHYSICAL_REQUIREMENT;break;case 34:this.$=V.RequirementType.DESIGN_CONSTRAINT;break;case 35:this.$=V.RiskLevel.LOW_RISK;break;case 36:this.$=V.RiskLevel.MED_RISK;break;case 37:this.$=V.RiskLevel.HIGH_RISK;break;case 38:this.$=V.VerifyType.VERIFY_ANALYSIS;break;case 39:this.$=V.VerifyType.VERIFY_DEMONSTRATION;break;case 40:this.$=V.VerifyType.VERIFY_INSPECTION;break;case 41:this.$=V.VerifyType.VERIFY_TEST;break;case 42:V.addElement(de[we-3]);break;case 43:V.addElement(de[we-5]),V.setClass([de[we-5]],de[we-3]);break;case 44:V.setNewElementType(de[we-2]);break;case 45:V.setNewElementDocRef(de[we-2]);break;case 48:V.addRelationship(de[we-2],de[we],de[we-4]);break;case 49:V.addRelationship(de[we-2],de[we-4],de[we]);break;case 50:this.$=V.Relationships.CONTAINS;break;case 51:this.$=V.Relationships.COPIES;break;case 52:this.$=V.Relationships.DERIVES;break;case 53:this.$=V.Relationships.SATISFIES;break;case 54:this.$=V.Relationships.VERIFIES;break;case 55:this.$=V.Relationships.REFINES;break;case 56:this.$=V.Relationships.TRACES;break;case 57:this.$=de[we-2],V.defineClass(de[we-1],de[we]);break;case 58:V.setClass(de[we-1],de[we]);break;case 59:V.setClass([de[we-2]],de[we]);break;case 60:case 62:this.$=[de[we]];break;case 61:case 63:this.$=de[we-2].concat([de[we]]);break;case 64:this.$=de[we-2],V.setCssStyle(de[we-1],de[we]);break;case 65:this.$=[de[we]];break;case 66:de[we-2].push(de[we]),this.$=de[we-2];break;case 68:this.$=de[we-1]+de[we];break}},"anonymous"),table:[{3:1,4:2,6:e,9:r,11:n,13:a},{1:[3]},{3:8,4:2,5:[1,7],6:e,9:r,11:n,13:a},{5:[1,9]},{10:[1,10]},{12:[1,11]},t(i,[2,6]),{3:12,4:2,6:e,9:r,11:n,13:a},{1:[2,2]},{4:17,5:s,7:13,8:o,9:r,11:n,13:a,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:l,22:u,23:h,24:f,25:23,33:25,41:d,42:p,43:m,44:g,45:v,46:y,54:b,72:w,74:C,77:k,89:E,90:_},t(i,[2,4]),t(i,[2,5]),{1:[2,1]},{8:[1,41]},{4:17,5:s,7:42,8:o,9:r,11:n,13:a,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:l,22:u,23:h,24:f,25:23,33:25,41:d,42:p,43:m,44:g,45:v,46:y,54:b,72:w,74:C,77:k,89:E,90:_},{4:17,5:s,7:43,8:o,9:r,11:n,13:a,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:l,22:u,23:h,24:f,25:23,33:25,41:d,42:p,43:m,44:g,45:v,46:y,54:b,72:w,74:C,77:k,89:E,90:_},{4:17,5:s,7:44,8:o,9:r,11:n,13:a,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:l,22:u,23:h,24:f,25:23,33:25,41:d,42:p,43:m,44:g,45:v,46:y,54:b,72:w,74:C,77:k,89:E,90:_},{4:17,5:s,7:45,8:o,9:r,11:n,13:a,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:l,22:u,23:h,24:f,25:23,33:25,41:d,42:p,43:m,44:g,45:v,46:y,54:b,72:w,74:C,77:k,89:E,90:_},{4:17,5:s,7:46,8:o,9:r,11:n,13:a,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:l,22:u,23:h,24:f,25:23,33:25,41:d,42:p,43:m,44:g,45:v,46:y,54:b,72:w,74:C,77:k,89:E,90:_},{4:17,5:s,7:47,8:o,9:r,11:n,13:a,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:l,22:u,23:h,24:f,25:23,33:25,41:d,42:p,43:m,44:g,45:v,46:y,54:b,72:w,74:C,77:k,89:E,90:_},{4:17,5:s,7:48,8:o,9:r,11:n,13:a,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:l,22:u,23:h,24:f,25:23,33:25,41:d,42:p,43:m,44:g,45:v,46:y,54:b,72:w,74:C,77:k,89:E,90:_},{4:17,5:s,7:49,8:o,9:r,11:n,13:a,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:l,22:u,23:h,24:f,25:23,33:25,41:d,42:p,43:m,44:g,45:v,46:y,54:b,72:w,74:C,77:k,89:E,90:_},{4:17,5:s,7:50,8:o,9:r,11:n,13:a,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:l,22:u,23:h,24:f,25:23,33:25,41:d,42:p,43:m,44:g,45:v,46:y,54:b,72:w,74:C,77:k,89:E,90:_},{26:51,89:[1,52],90:[1,53]},{55:54,89:[1,55],90:[1,56]},{29:[1,59],61:[1,57],63:[1,58]},t(S,[2,17]),t(S,[2,18]),t(S,[2,19]),t(S,[2,20]),{30:60,33:62,75:L,89:E,90:_},{30:63,33:62,75:L,89:E,90:_},{30:64,33:62,75:L,89:E,90:_},t(M,[2,29]),t(M,[2,30]),t(M,[2,31]),t(M,[2,32]),t(M,[2,33]),t(M,[2,34]),t(D,[2,81]),t(D,[2,82]),{1:[2,3]},{8:[2,8]},{8:[2,9]},{8:[2,10]},{8:[2,11]},{8:[2,12]},{8:[2,13]},{8:[2,14]},{8:[2,15]},{8:[2,16]},{27:[1,65],29:[1,66]},t(T,[2,79]),t(T,[2,80]),{27:[1,67],29:[1,68]},t(T,[2,85]),t(T,[2,86]),{62:69,65:I,66:N,67:O,68:R,69:P,70:B,71:F},{62:77,65:I,66:N,67:O,68:R,69:P,70:B,71:F},{30:78,33:62,75:L,89:E,90:_},{73:79,75:G,76:z,78:81,79:82,80:H,81:Q,82:Y,83:ie,84:se,85:oe,86:pe,87:J,88:j},t(Z,[2,60]),t(Z,[2,62]),{73:93,75:G,76:z,78:81,79:82,80:H,81:Q,82:Y,83:ie,84:se,85:oe,86:pe,87:J,88:j},{30:94,33:62,75:L,76:z,89:E,90:_},{5:[1,95]},{30:96,33:62,75:L,89:E,90:_},{5:[1,97]},{30:98,33:62,75:L,89:E,90:_},{63:[1,99]},t(K,[2,50]),t(K,[2,51]),t(K,[2,52]),t(K,[2,53]),t(K,[2,54]),t(K,[2,55]),t(K,[2,56]),{64:[1,100]},t(S,[2,59],{76:z}),t(S,[2,64],{76:X}),{33:103,75:[1,102],89:E,90:_},t(ae,[2,65],{79:104,75:G,80:H,81:Q,82:Y,83:ie,84:se,85:oe,86:pe,87:J,88:j}),t(W,[2,67]),t(W,[2,69]),t(W,[2,70]),t(W,[2,71]),t(W,[2,72]),t(W,[2,73]),t(W,[2,74]),t(W,[2,75]),t(W,[2,76]),t(W,[2,77]),t(W,[2,78]),t(S,[2,57],{76:X}),t(S,[2,58],{76:z}),{5:Se,28:105,31:ne,34:ee,36:$e,38:me,40:Ie},{27:[1,112],76:z},{5:Ue,40:Fe,56:113,57:Ae,59:Me},{27:[1,118],76:z},{33:119,89:E,90:_},{33:120,89:E,90:_},{75:G,78:121,79:82,80:H,81:Q,82:Y,83:ie,84:se,85:oe,86:pe,87:J,88:j},t(Z,[2,61]),t(Z,[2,63]),t(W,[2,68]),t(S,[2,21]),{32:[1,122]},{32:[1,123]},{32:[1,124]},{32:[1,125]},{5:Se,28:126,31:ne,34:ee,36:$e,38:me,40:Ie},t(S,[2,28]),{5:[1,127]},t(S,[2,42]),{32:[1,128]},{32:[1,129]},{5:Ue,40:Fe,56:130,57:Ae,59:Me},t(S,[2,47]),{5:[1,131]},t(S,[2,48]),t(S,[2,49]),t(ae,[2,66],{79:104,75:G,80:H,81:Q,82:Y,83:ie,84:se,85:oe,86:pe,87:J,88:j}),{33:132,89:E,90:_},{35:133,89:[1,134],90:[1,135]},{37:136,47:[1,137],48:[1,138],49:[1,139]},{39:140,50:[1,141],51:[1,142],52:[1,143],53:[1,144]},t(S,[2,27]),{5:Se,28:145,31:ne,34:ee,36:$e,38:me,40:Ie},{58:146,89:[1,147],90:[1,148]},{60:149,89:[1,150],90:[1,151]},t(S,[2,46]),{5:Ue,40:Fe,56:152,57:Ae,59:Me},{5:[1,153]},{5:[1,154]},{5:[2,83]},{5:[2,84]},{5:[1,155]},{5:[2,35]},{5:[2,36]},{5:[2,37]},{5:[1,156]},{5:[2,38]},{5:[2,39]},{5:[2,40]},{5:[2,41]},t(S,[2,22]),{5:[1,157]},{5:[2,87]},{5:[2,88]},{5:[1,158]},{5:[2,89]},{5:[2,90]},t(S,[2,43]),{5:Se,28:159,31:ne,34:ee,36:$e,38:me,40:Ie},{5:Se,28:160,31:ne,34:ee,36:$e,38:me,40:Ie},{5:Se,28:161,31:ne,34:ee,36:$e,38:me,40:Ie},{5:Se,28:162,31:ne,34:ee,36:$e,38:me,40:Ie},{5:Ue,40:Fe,56:163,57:Ae,59:Me},{5:Ue,40:Fe,56:164,57:Ae,59:Me},t(S,[2,23]),t(S,[2,24]),t(S,[2,25]),t(S,[2,26]),t(S,[2,44]),t(S,[2,45])],defaultActions:{8:[2,2],12:[2,1],41:[2,3],42:[2,8],43:[2,9],44:[2,10],45:[2,11],46:[2,12],47:[2,13],48:[2,14],49:[2,15],50:[2,16],134:[2,83],135:[2,84],137:[2,35],138:[2,36],139:[2,37],141:[2,38],142:[2,39],143:[2,40],144:[2,41],147:[2,87],148:[2,88],150:[2,89],151:[2,90]},parseError:x(function(ue,$){if($.recoverable)this.trace(ue);else{var le=new Error(ue);throw le.hash=$,le}},"parseError"),parse:x(function(ue){var $=this,le=[0],V=[],he=[null],de=[],Ne=this.table,we="",ye=0,Be=0,Le=0,qe=2,Ke=1,Ye=de.slice.call(arguments,1),Xe=Object.create(this.lexer),Ve={yy:{}};for(var ot in this.yy)Object.prototype.hasOwnProperty.call(this.yy,ot)&&(Ve.yy[ot]=this.yy[ot]);Xe.setInput(ue,Ve.yy),Ve.yy.lexer=Xe,Ve.yy.parser=this,typeof Xe.yylloc>"u"&&(Xe.yylloc={});var He=Xe.yylloc;de.push(He);var nt=Xe.options&&Xe.options.ranges;typeof Ve.yy.parseError=="function"?this.parseError=Ve.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function It(mr){le.length=le.length-2*mr,he.length=he.length-mr,de.length=de.length-mr}x(It,"popStack");function it(){var mr;return mr=V.pop()||Xe.lex()||Ke,typeof mr!="number"&&(mr instanceof Array&&(V=mr,mr=V.pop()),mr=$.symbols_[mr]||mr),mr}x(it,"lex");for(var Tt,lt,ct,ft,dt,yt,at={},dn,Ct,Ut,Qt;;){if(ct=le[le.length-1],this.defaultActions[ct]?ft=this.defaultActions[ct]:((Tt===null||typeof Tt>"u")&&(Tt=it()),ft=Ne[ct]&&Ne[ct][Tt]),typeof ft>"u"||!ft.length||!ft[0]){var er="";Qt=[];for(dn in Ne[ct])this.terminals_[dn]&&dn>qe&&Qt.push("'"+this.terminals_[dn]+"'");Xe.showPosition?er="Parse error on line "+(ye+1)+`: -`+Xe.showPosition()+` -Expecting `+Qt.join(", ")+", got '"+(this.terminals_[Tt]||Tt)+"'":er="Parse error on line "+(ye+1)+": Unexpected "+(Tt==Ke?"end of input":"'"+(this.terminals_[Tt]||Tt)+"'"),this.parseError(er,{text:Xe.match,token:this.terminals_[Tt]||Tt,line:Xe.yylineno,loc:He,expected:Qt})}if(ft[0]instanceof Array&&ft.length>1)throw new Error("Parse Error: multiple actions possible at state: "+ct+", token: "+Tt);switch(ft[0]){case 1:le.push(Tt),he.push(Xe.yytext),de.push(Xe.yylloc),le.push(ft[1]),Tt=null,lt?(Tt=lt,lt=null):(Be=Xe.yyleng,we=Xe.yytext,ye=Xe.yylineno,He=Xe.yylloc,Le>0&&Le--);break;case 2:if(Ct=this.productions_[ft[1]][1],at.$=he[he.length-Ct],at._$={first_line:de[de.length-(Ct||1)].first_line,last_line:de[de.length-1].last_line,first_column:de[de.length-(Ct||1)].first_column,last_column:de[de.length-1].last_column},nt&&(at._$.range=[de[de.length-(Ct||1)].range[0],de[de.length-1].range[1]]),yt=this.performAction.apply(at,[we,Be,ye,Ve.yy,ft[1],he,de].concat(Ye)),typeof yt<"u")return yt;Ct&&(le=le.slice(0,-1*Ct*2),he=he.slice(0,-1*Ct),de=de.slice(0,-1*Ct)),le.push(this.productions_[ft[1]][0]),he.push(at.$),de.push(at._$),Ut=Ne[le[le.length-2]][le[le.length-1]],le.push(Ut);break;case 3:return!0}}return!0},"parse")},ve=(function(){var fe={EOF:1,parseError:x(function($,le){if(this.yy.parser)this.yy.parser.parseError($,le);else throw new Error($)},"parseError"),setInput:x(function(ue,$){return this.yy=$||this.yy||{},this._input=ue,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:x(function(){var ue=this._input[0];this.yytext+=ue,this.yyleng++,this.offset++,this.match+=ue,this.matched+=ue;var $=ue.match(/(?:\r\n?|\n).*/g);return $?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),ue},"input"),unput:x(function(ue){var $=ue.length,le=ue.split(/(?:\r\n?|\n)/g);this._input=ue+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-$),this.offset-=$;var V=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),le.length-1&&(this.yylineno-=le.length-1);var he=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:le?(le.length===V.length?this.yylloc.first_column:0)+V[V.length-le.length].length-le[0].length:this.yylloc.first_column-$},this.options.ranges&&(this.yylloc.range=[he[0],he[0]+this.yyleng-$]),this.yyleng=this.yytext.length,this},"unput"),more:x(function(){return this._more=!0,this},"more"),reject:x(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). -`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:x(function(ue){this.unput(this.match.slice(ue))},"less"),pastInput:x(function(){var ue=this.matched.substr(0,this.matched.length-this.match.length);return(ue.length>20?"...":"")+ue.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:x(function(){var ue=this.match;return ue.length<20&&(ue+=this._input.substr(0,20-ue.length)),(ue.substr(0,20)+(ue.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:x(function(){var ue=this.pastInput(),$=new Array(ue.length+1).join("-");return ue+this.upcomingInput()+` -`+$+"^"},"showPosition"),test_match:x(function(ue,$){var le,V,he;if(this.options.backtrack_lexer&&(he={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(he.yylloc.range=this.yylloc.range.slice(0))),V=ue[0].match(/(?:\r\n?|\n).*/g),V&&(this.yylineno+=V.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:V?V[V.length-1].length-V[V.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+ue[0].length},this.yytext+=ue[0],this.match+=ue[0],this.matches=ue,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(ue[0].length),this.matched+=ue[0],le=this.performAction.call(this,this.yy,this,$,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),le)return le;if(this._backtrack){for(var de in he)this[de]=he[de];return!1}return!1},"test_match"),next:x(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var ue,$,le,V;this._more||(this.yytext="",this.match="");for(var he=this._currentRules(),de=0;de$[0].length)){if($=le,V=de,this.options.backtrack_lexer){if(ue=this.test_match(le,he[de]),ue!==!1)return ue;if(this._backtrack){$=!1;continue}else return!1}else if(!this.options.flex)break}return $?(ue=this.test_match($,he[V]),ue!==!1?ue:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. -`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:x(function(){var $=this.next();return $||this.lex()},"lex"),begin:x(function($){this.conditionStack.push($)},"begin"),popState:x(function(){var $=this.conditionStack.length-1;return $>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:x(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:x(function($){return $=this.conditionStack.length-1-Math.abs($||0),$>=0?this.conditionStack[$]:"INITIAL"},"topState"),pushState:x(function($){this.begin($)},"pushState"),stateStackSize:x(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:x(function($,le,V,he){var de=he;switch(V){case 0:return"title";case 1:return this.begin("acc_title"),9;break;case 2:return this.popState(),"acc_title_value";break;case 3:return this.begin("acc_descr"),11;break;case 4:return this.popState(),"acc_descr_value";break;case 5:this.begin("acc_descr_multiline");break;case 6:this.popState();break;case 7:return"acc_descr_multiline_value";case 8:return 21;case 9:return 22;case 10:return 23;case 11:return 24;case 12:return 5;case 13:break;case 14:break;case 15:break;case 16:return 8;case 17:return 6;case 18:return 27;case 19:return 40;case 20:return 29;case 21:return 32;case 22:return 31;case 23:return 34;case 24:return 36;case 25:return 38;case 26:return 41;case 27:return 42;case 28:return 43;case 29:return 44;case 30:return 45;case 31:return 46;case 32:return 47;case 33:return 48;case 34:return 49;case 35:return 50;case 36:return 51;case 37:return 52;case 38:return 53;case 39:return 54;case 40:return 65;case 41:return 66;case 42:return 67;case 43:return 68;case 44:return 69;case 45:return 70;case 46:return 71;case 47:return 57;case 48:return 59;case 49:return this.begin("style"),77;break;case 50:return 75;case 51:return 81;case 52:return 88;case 53:return"PERCENT";case 54:return 86;case 55:return 84;case 56:break;case 57:this.begin("string");break;case 58:this.popState();break;case 59:return this.begin("style"),72;break;case 60:return this.begin("style"),74;break;case 61:return 61;case 62:return 64;case 63:return 63;case 64:this.begin("string");break;case 65:this.popState();break;case 66:return"qString";case 67:return le.yytext=le.yytext.trim(),89;break;case 68:return 75;case 69:return 80;case 70:return 76}},"anonymous"),rules:[/^(?:title\s[^#\n;]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:.*direction\s+TB[^\n]*)/i,/^(?:.*direction\s+BT[^\n]*)/i,/^(?:.*direction\s+RL[^\n]*)/i,/^(?:.*direction\s+LR[^\n]*)/i,/^(?:(\r?\n)+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:%[^\n]*)/i,/^(?:$)/i,/^(?:requirementDiagram\b)/i,/^(?:\{)/i,/^(?:\})/i,/^(?::{3})/i,/^(?::)/i,/^(?:id\b)/i,/^(?:text\b)/i,/^(?:risk\b)/i,/^(?:verifyMethod\b)/i,/^(?:requirement\b)/i,/^(?:functionalRequirement\b)/i,/^(?:interfaceRequirement\b)/i,/^(?:performanceRequirement\b)/i,/^(?:physicalRequirement\b)/i,/^(?:designConstraint\b)/i,/^(?:low\b)/i,/^(?:medium\b)/i,/^(?:high\b)/i,/^(?:analysis\b)/i,/^(?:demonstration\b)/i,/^(?:inspection\b)/i,/^(?:test\b)/i,/^(?:element\b)/i,/^(?:contains\b)/i,/^(?:copies\b)/i,/^(?:derives\b)/i,/^(?:satisfies\b)/i,/^(?:verifies\b)/i,/^(?:refines\b)/i,/^(?:traces\b)/i,/^(?:type\b)/i,/^(?:docref\b)/i,/^(?:style\b)/i,/^(?:\w+)/i,/^(?::)/i,/^(?:;)/i,/^(?:%)/i,/^(?:-)/i,/^(?:#)/i,/^(?: )/i,/^(?:["])/i,/^(?:\n)/i,/^(?:classDef\b)/i,/^(?:class\b)/i,/^(?:<-)/i,/^(?:->)/i,/^(?:-)/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[\w][^:,\r\n\{\<\>\-\=]*)/i,/^(?:\w+)/i,/^(?:[0-9]+)/i,/^(?:,)/i],conditions:{acc_descr_multiline:{rules:[6,7,68,69,70],inclusive:!1},acc_descr:{rules:[4,68,69,70],inclusive:!1},acc_title:{rules:[2,68,69,70],inclusive:!1},style:{rules:[50,51,52,53,54,55,56,57,58,68,69,70],inclusive:!1},unqString:{rules:[68,69,70],inclusive:!1},token:{rules:[68,69,70],inclusive:!1},string:{rules:[65,66,68,69,70],inclusive:!1},INITIAL:{rules:[0,1,3,5,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,59,60,61,62,63,64,67,68,69,70],inclusive:!0}}};return fe})();ke.lexer=ve;function _e(){this.yy={}}return x(_e,"Parser"),_e.prototype=ke,ke.Parser=_e,new _e})();Tq.parser=Tq;oxt=Tq,lxt=(kx=class{constructor(){this.relations=[],this.latestRequirement=this.getInitialRequirement(),this.requirements=new Map,this.latestElement=this.getInitialElement(),this.elements=new Map,this.classes=new Map,this.direction="TB",this.RequirementType={REQUIREMENT:"Requirement",FUNCTIONAL_REQUIREMENT:"Functional Requirement",INTERFACE_REQUIREMENT:"Interface Requirement",PERFORMANCE_REQUIREMENT:"Performance Requirement",PHYSICAL_REQUIREMENT:"Physical Requirement",DESIGN_CONSTRAINT:"Design Constraint"},this.RiskLevel={LOW_RISK:"Low",MED_RISK:"Medium",HIGH_RISK:"High"},this.VerifyType={VERIFY_ANALYSIS:"Analysis",VERIFY_DEMONSTRATION:"Demonstration",VERIFY_INSPECTION:"Inspection",VERIFY_TEST:"Test"},this.Relationships={CONTAINS:"contains",COPIES:"copies",DERIVES:"derives",SATISFIES:"satisfies",VERIFIES:"verifies",REFINES:"refines",TRACES:"traces"},this.setAccTitle=Sr,this.getAccTitle=_r,this.setAccDescription=Ar,this.getAccDescription=Lr,this.setDiagramTitle=Fr,this.getDiagramTitle=Rr,this.getConfig=x(()=>Te().requirement,"getConfig"),this.clear(),this.setDirection=this.setDirection.bind(this),this.addRequirement=this.addRequirement.bind(this),this.setNewReqId=this.setNewReqId.bind(this),this.setNewReqRisk=this.setNewReqRisk.bind(this),this.setNewReqText=this.setNewReqText.bind(this),this.setNewReqVerifyMethod=this.setNewReqVerifyMethod.bind(this),this.addElement=this.addElement.bind(this),this.setNewElementType=this.setNewElementType.bind(this),this.setNewElementDocRef=this.setNewElementDocRef.bind(this),this.addRelationship=this.addRelationship.bind(this),this.setCssStyle=this.setCssStyle.bind(this),this.setClass=this.setClass.bind(this),this.defineClass=this.defineClass.bind(this),this.setAccTitle=this.setAccTitle.bind(this),this.setAccDescription=this.setAccDescription.bind(this)}getDirection(){return this.direction}setDirection(e){this.direction=e}resetLatestRequirement(){this.latestRequirement=this.getInitialRequirement()}resetLatestElement(){this.latestElement=this.getInitialElement()}getInitialRequirement(){return{requirementId:"",text:"",risk:"",verifyMethod:"",name:"",type:"",cssStyles:[],classes:["default"]}}getInitialElement(){return{name:"",type:"",docRef:"",cssStyles:[],classes:["default"]}}addRequirement(e,r){return this.requirements.has(e)||this.requirements.set(e,{name:e,type:r,requirementId:this.latestRequirement.requirementId,text:this.latestRequirement.text,risk:this.latestRequirement.risk,verifyMethod:this.latestRequirement.verifyMethod,cssStyles:[],classes:["default"]}),this.resetLatestRequirement(),this.requirements.get(e)}getRequirements(){return this.requirements}setNewReqId(e){this.latestRequirement!==void 0&&(this.latestRequirement.requirementId=e)}setNewReqText(e){this.latestRequirement!==void 0&&(this.latestRequirement.text=e)}setNewReqRisk(e){this.latestRequirement!==void 0&&(this.latestRequirement.risk=e)}setNewReqVerifyMethod(e){this.latestRequirement!==void 0&&(this.latestRequirement.verifyMethod=e)}addElement(e){return this.elements.has(e)||(this.elements.set(e,{name:e,type:this.latestElement.type,docRef:this.latestElement.docRef,cssStyles:[],classes:["default"]}),te.info("Added new element: ",e)),this.resetLatestElement(),this.elements.get(e)}getElements(){return this.elements}setNewElementType(e){this.latestElement!==void 0&&(this.latestElement.type=e)}setNewElementDocRef(e){this.latestElement!==void 0&&(this.latestElement.docRef=e)}addRelationship(e,r,n){this.relations.push({type:e,src:r,dst:n})}getRelationships(){return this.relations}clear(){this.relations=[],this.resetLatestRequirement(),this.requirements=new Map,this.resetLatestElement(),this.elements=new Map,this.classes=new Map,Cr()}setCssStyle(e,r){for(let n of e){let a=this.requirements.get(n)??this.elements.get(n);if(!r||!a)return;for(let i of r)i.includes(",")?a.cssStyles.push(...i.split(",")):a.cssStyles.push(i)}}setClass(e,r){for(let n of e){let a=this.requirements.get(n)??this.elements.get(n);if(a)for(let i of r){a.classes.push(i);let s=this.classes.get(i)?.styles;s&&a.cssStyles.push(...s)}}}defineClass(e,r){for(let n of e){let a=this.classes.get(n);a===void 0&&(a={id:n,styles:[],textStyles:[]},this.classes.set(n,a)),r&&r.forEach(function(i){if(/color/.exec(i)){let s=i.replace("fill","bgFill");a.textStyles.push(s)}a.styles.push(i)}),this.requirements.forEach(i=>{i.classes.includes(n)&&i.cssStyles.push(...r.flatMap(s=>s.split(",")))}),this.elements.forEach(i=>{i.classes.includes(n)&&i.cssStyles.push(...r.flatMap(s=>s.split(",")))})}}getClasses(){return this.classes}getData(){let e=Te(),r=[],n=[];for(let a of this.requirements.values()){let i=a;i.id=a.name,i.cssStyles=a.cssStyles,i.cssClasses=a.classes.join(" "),i.shape="requirementBox",i.look=e.look,r.push(i)}for(let a of this.elements.values()){let i=a;i.shape="requirementBox",i.look=e.look,i.id=a.name,i.cssStyles=a.cssStyles,i.cssClasses=a.classes.join(" "),r.push(i)}for(let a of this.relations){let i=0,s=a.type===this.Relationships.CONTAINS,o={id:`${a.src}-${a.dst}-${i}`,start:this.requirements.get(a.src)?.name??this.elements.get(a.src)?.name,end:this.requirements.get(a.dst)?.name??this.elements.get(a.dst)?.name,label:`<<${a.type}>>`,classes:"relationshipLine",style:["fill:none",s?"":"stroke-dasharray: 10,7"],labelpos:"c",thickness:"normal",type:"normal",pattern:s?"normal":"dashed",arrowTypeStart:s?"requirement_contains":"",arrowTypeEnd:s?"":"requirement_arrow",look:e.look};n.push(o),i++}return{nodes:r,edges:n,other:{},config:e,direction:this.getDirection()}}},x(kx,"RequirementDB"),kx),uxt=x(t=>` +`,"getStyles"),h5t=c5t,f5t=b(t=>{let e=[...t.entries()].map(n=>({label:n[0],value:n[1]})).sort((n,i)=>i.value-n.value);return fB().value(n=>n.value)(e)},"createPieArcs"),d5t=b((t,e,r,n)=>{he.debug(`rendering pie chart +`+t);let i=n.db,a=Fe(),s=ls(i.getConfig(),a.pie),o=40,l=18,u=4,h=450,f=h,d=cs(e),p=d.append("g");p.attr("transform","translate("+f/2+","+h/2+")");let{themeVariables:m}=a,[g]=cu(m.pieOuterStrokeWidth);g??=2;let y=s.textPosition,v=Math.min(f,h)/2-o,x=n0().innerRadius(0).outerRadius(v),k=n0().innerRadius(v*y).outerRadius(v*y);p.append("circle").attr("cx",0).attr("cy",0).attr("r",v+g/2).attr("class","pieOuterCircle");let _=i.getSections(),T=f5t(_),S=[m.pie1,m.pie2,m.pie3,m.pie4,m.pie5,m.pie6,m.pie7,m.pie8,m.pie9,m.pie10,m.pie11,m.pie12],R=Mh(S);p.selectAll("mySlices").data(T).enter().append("path").attr("d",x).attr("fill",C=>R(C.data.label)).attr("class","pieCircle");let A=0;_.forEach(C=>{A+=C}),p.selectAll("mySlices").data(T).enter().append("text").text(C=>(C.data.value/A*100).toFixed(0)+"%").attr("transform",C=>"translate("+k.centroid(C)+")").style("text-anchor","middle").attr("class","slice"),p.append("text").text(i.getDiagramTitle()).attr("x",0).attr("y",-(h-50)/2).attr("class","pieTitleText");let I=p.selectAll(".legend").data(R.domain()).enter().append("g").attr("class","legend").attr("transform",(C,N)=>{let B=l+u,F=B*R.domain().length/2,M=12*l,$=N*B-F;return"translate("+M+","+$+")"});I.append("rect").attr("width",l).attr("height",l).style("fill",R).style("stroke",R),I.data(T).append("text").attr("x",l+u).attr("y",l-u).text(C=>{let{label:N,value:B}=C.data;return i.getShowData()?`${N} [${B}]`:N});let P=Math.max(...I.selectAll("text").nodes().map(C=>C?.getBoundingClientRect().width??0)),O=f+o+l+u+P;d.attr("viewBox",`0 0 ${O} ${h}`),ei(d,h,O,s.useMaxWidth)},"draw"),p5t={draw:d5t},m5t={parser:u5t,db:WSe,renderer:p5t,styles:h5t}});var cCe={};Mr(cCe,{diagram:()=>T5t});function kV(t){return!/^#?([\dA-Fa-f]{6}|[\dA-Fa-f]{3})$/.test(t)}function jSe(t){return!/^\d+$/.test(t)}function KSe(t){return!/^\d+px$/.test(t)}function J0(t){return Qr(t.trim(),v5t)}function ZSe(t){Ns.setData({quadrant1Text:J0(t.text)})}function QSe(t){Ns.setData({quadrant2Text:J0(t.text)})}function JSe(t){Ns.setData({quadrant3Text:J0(t.text)})}function eCe(t){Ns.setData({quadrant4Text:J0(t.text)})}function tCe(t){Ns.setData({xAxisLeftText:J0(t.text)})}function rCe(t){Ns.setData({xAxisRightText:J0(t.text)})}function nCe(t){Ns.setData({yAxisTopText:J0(t.text)})}function iCe(t){Ns.setData({yAxisBottomText:J0(t.text)})}function BL(t){let e={};for(let r of t){let[n,i]=r.trim().split(/\s*:\s*/);if(n==="radius"){if(jSe(i))throw new PL(n,i,"number");e.radius=parseInt(i)}else if(n==="color"){if(kV(i))throw new PL(n,i,"hex code");e.color=i}else if(n==="stroke-color"){if(kV(i))throw new PL(n,i,"hex code");e.strokeColor=i}else if(n==="stroke-width"){if(KSe(i))throw new PL(n,i,"number of pixels (eg. 10px)");e.strokeWidth=i}else throw new Error(`style named ${n} is not supported.`)}return e}function aCe(t,e,r,n,i){let a=BL(i);Ns.addPoints([{x:r,y:n,text:J0(t.text),className:e,...a}])}function sCe(t,e){Ns.addClass(t,BL(e))}function oCe(t){Ns.setConfig({chartWidth:t})}function lCe(t){Ns.setConfig({chartHeight:t})}function uCe(){let t=Fe(),{themeVariables:e,quadrantChart:r}=t;return r&&Ns.setConfig(r),Ns.setThemeConfig({quadrant1Fill:e.quadrant1Fill,quadrant2Fill:e.quadrant2Fill,quadrant3Fill:e.quadrant3Fill,quadrant4Fill:e.quadrant4Fill,quadrant1TextFill:e.quadrant1TextFill,quadrant2TextFill:e.quadrant2TextFill,quadrant3TextFill:e.quadrant3TextFill,quadrant4TextFill:e.quadrant4TextFill,quadrantPointFill:e.quadrantPointFill,quadrantPointTextFill:e.quadrantPointTextFill,quadrantXAxisTextFill:e.quadrantXAxisTextFill,quadrantYAxisTextFill:e.quadrantYAxisTextFill,quadrantExternalBorderStrokeFill:e.quadrantExternalBorderStrokeFill,quadrantInternalBorderStrokeFill:e.quadrantInternalBorderStrokeFill,quadrantTitleFill:e.quadrantTitleFill}),Ns.setData({titleText:an()}),Ns.build()}var wV,g5t,Oo,k4,y5t,T4,PL,v5t,Ns,x5t,b5t,w5t,k5t,T5t,hCe=D(()=>{Nr();Or();Or();wV=(function(){var t=b(function(ve,K,we,Ee){for(we=we||{},Ee=ve.length;Ee--;we[ve[Ee]]=K);return we},"o"),e=[1,3],r=[1,4],n=[1,5],i=[1,6],a=[1,7],s=[1,4,5,10,12,13,14,18,25,35,37,39,41,42,48,50,51,52,53,54,55,56,57,60,61,63,64,65,66,67],o=[1,4,5,10,12,13,14,18,25,28,35,37,39,41,42,48,50,51,52,53,54,55,56,57,60,61,63,64,65,66,67],l=[55,56,57],u=[2,36],h=[1,37],f=[1,36],d=[1,38],p=[1,35],m=[1,43],g=[1,41],y=[1,14],v=[1,23],x=[1,18],k=[1,19],_=[1,20],T=[1,21],S=[1,22],R=[1,24],A=[1,25],I=[1,26],P=[1,27],O=[1,28],C=[1,29],N=[1,32],B=[1,33],F=[1,34],M=[1,39],$=[1,40],z=[1,42],q=[1,44],V=[1,62],U=[1,61],J=[4,5,8,10,12,13,14,18,44,47,49,55,56,57,63,64,65,66,67],se=[1,65],re=[1,66],me=[1,67],ge=[1,68],ye=[1,69],_e=[1,70],ue=[1,71],ie=[1,72],le=[1,73],oe=[1,74],ne=[1,75],pe=[1,76],te=[4,5,6,7,8,9,10,11,12,13,14,15,18],He=[1,90],de=[1,91],ce=[1,92],st=[1,99],Ae=[1,93],Ye=[1,96],Ge=[1,94],rt=[1,95],Xe=[1,97],Ze=[1,98],Pe=[1,102],Re=[10,55,56,57],Ve=[4,5,6,8,10,11,13,17,18,19,20,55,56,57],ke={trace:b(function(){},"trace"),yy:{},symbols_:{error:2,idStringToken:3,ALPHA:4,NUM:5,NODE_STRING:6,DOWN:7,MINUS:8,DEFAULT:9,COMMA:10,COLON:11,AMP:12,BRKT:13,MULT:14,UNICODE_TEXT:15,styleComponent:16,UNIT:17,SPACE:18,STYLE:19,PCT:20,idString:21,style:22,stylesOpt:23,classDefStatement:24,CLASSDEF:25,start:26,eol:27,QUADRANT:28,document:29,line:30,statement:31,axisDetails:32,quadrantDetails:33,points:34,title:35,title_value:36,acc_title:37,acc_title_value:38,acc_descr:39,acc_descr_value:40,acc_descr_multiline_value:41,section:42,text:43,point_start:44,point_x:45,point_y:46,class_name:47,"X-AXIS":48,"AXIS-TEXT-DELIMITER":49,"Y-AXIS":50,QUADRANT_1:51,QUADRANT_2:52,QUADRANT_3:53,QUADRANT_4:54,NEWLINE:55,SEMI:56,EOF:57,alphaNumToken:58,textNoTagsToken:59,STR:60,MD_STR:61,alphaNum:62,PUNCTUATION:63,PLUS:64,EQUALS:65,DOT:66,UNDERSCORE:67,$accept:0,$end:1},terminals_:{2:"error",4:"ALPHA",5:"NUM",6:"NODE_STRING",7:"DOWN",8:"MINUS",9:"DEFAULT",10:"COMMA",11:"COLON",12:"AMP",13:"BRKT",14:"MULT",15:"UNICODE_TEXT",17:"UNIT",18:"SPACE",19:"STYLE",20:"PCT",25:"CLASSDEF",28:"QUADRANT",35:"title",36:"title_value",37:"acc_title",38:"acc_title_value",39:"acc_descr",40:"acc_descr_value",41:"acc_descr_multiline_value",42:"section",44:"point_start",45:"point_x",46:"point_y",47:"class_name",48:"X-AXIS",49:"AXIS-TEXT-DELIMITER",50:"Y-AXIS",51:"QUADRANT_1",52:"QUADRANT_2",53:"QUADRANT_3",54:"QUADRANT_4",55:"NEWLINE",56:"SEMI",57:"EOF",60:"STR",61:"MD_STR",63:"PUNCTUATION",64:"PLUS",65:"EQUALS",66:"DOT",67:"UNDERSCORE"},productions_:[0,[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[21,1],[21,2],[22,1],[22,2],[23,1],[23,3],[24,5],[26,2],[26,2],[26,2],[29,0],[29,2],[30,2],[31,0],[31,1],[31,2],[31,1],[31,1],[31,1],[31,2],[31,2],[31,2],[31,1],[31,1],[34,4],[34,5],[34,5],[34,6],[32,4],[32,3],[32,2],[32,4],[32,3],[32,2],[33,2],[33,2],[33,2],[33,2],[27,1],[27,1],[27,1],[43,1],[43,2],[43,1],[43,1],[62,1],[62,2],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[59,1],[59,1],[59,1]],performAction:b(function(K,we,Ee,Ke,Be,De,nt){var We=De.length-1;switch(Be){case 23:this.$=De[We];break;case 24:this.$=De[We-1]+""+De[We];break;case 26:this.$=De[We-1]+De[We];break;case 27:this.$=[De[We].trim()];break;case 28:De[We-2].push(De[We].trim()),this.$=De[We-2];break;case 29:this.$=De[We-4],Ke.addClass(De[We-2],De[We]);break;case 37:this.$=[];break;case 42:this.$=De[We].trim(),Ke.setDiagramTitle(this.$);break;case 43:this.$=De[We].trim(),Ke.setAccTitle(this.$);break;case 44:case 45:this.$=De[We].trim(),Ke.setAccDescription(this.$);break;case 46:Ke.addSection(De[We].substr(8)),this.$=De[We].substr(8);break;case 47:Ke.addPoint(De[We-3],"",De[We-1],De[We],[]);break;case 48:Ke.addPoint(De[We-4],De[We-3],De[We-1],De[We],[]);break;case 49:Ke.addPoint(De[We-4],"",De[We-2],De[We-1],De[We]);break;case 50:Ke.addPoint(De[We-5],De[We-4],De[We-2],De[We-1],De[We]);break;case 51:Ke.setXAxisLeftText(De[We-2]),Ke.setXAxisRightText(De[We]);break;case 52:De[We-1].text+=" \u27F6 ",Ke.setXAxisLeftText(De[We-1]);break;case 53:Ke.setXAxisLeftText(De[We]);break;case 54:Ke.setYAxisBottomText(De[We-2]),Ke.setYAxisTopText(De[We]);break;case 55:De[We-1].text+=" \u27F6 ",Ke.setYAxisBottomText(De[We-1]);break;case 56:Ke.setYAxisBottomText(De[We]);break;case 57:Ke.setQuadrant1Text(De[We]);break;case 58:Ke.setQuadrant2Text(De[We]);break;case 59:Ke.setQuadrant3Text(De[We]);break;case 60:Ke.setQuadrant4Text(De[We]);break;case 64:this.$={text:De[We],type:"text"};break;case 65:this.$={text:De[We-1].text+""+De[We],type:De[We-1].type};break;case 66:this.$={text:De[We],type:"text"};break;case 67:this.$={text:De[We],type:"markdown"};break;case 68:this.$=De[We];break;case 69:this.$=De[We-1]+""+De[We];break}},"anonymous"),table:[{18:e,26:1,27:2,28:r,55:n,56:i,57:a},{1:[3]},{18:e,26:8,27:2,28:r,55:n,56:i,57:a},{18:e,26:9,27:2,28:r,55:n,56:i,57:a},t(s,[2,33],{29:10}),t(o,[2,61]),t(o,[2,62]),t(o,[2,63]),{1:[2,30]},{1:[2,31]},t(l,u,{30:11,31:12,24:13,32:15,33:16,34:17,43:30,58:31,1:[2,32],4:h,5:f,10:d,12:p,13:m,14:g,18:y,25:v,35:x,37:k,39:_,41:T,42:S,48:R,50:A,51:I,52:P,53:O,54:C,60:N,61:B,63:F,64:M,65:$,66:z,67:q}),t(s,[2,34]),{27:45,55:n,56:i,57:a},t(l,[2,37]),t(l,u,{24:13,32:15,33:16,34:17,43:30,58:31,31:46,4:h,5:f,10:d,12:p,13:m,14:g,18:y,25:v,35:x,37:k,39:_,41:T,42:S,48:R,50:A,51:I,52:P,53:O,54:C,60:N,61:B,63:F,64:M,65:$,66:z,67:q}),t(l,[2,39]),t(l,[2,40]),t(l,[2,41]),{36:[1,47]},{38:[1,48]},{40:[1,49]},t(l,[2,45]),t(l,[2,46]),{18:[1,50]},{4:h,5:f,10:d,12:p,13:m,14:g,43:51,58:31,60:N,61:B,63:F,64:M,65:$,66:z,67:q},{4:h,5:f,10:d,12:p,13:m,14:g,43:52,58:31,60:N,61:B,63:F,64:M,65:$,66:z,67:q},{4:h,5:f,10:d,12:p,13:m,14:g,43:53,58:31,60:N,61:B,63:F,64:M,65:$,66:z,67:q},{4:h,5:f,10:d,12:p,13:m,14:g,43:54,58:31,60:N,61:B,63:F,64:M,65:$,66:z,67:q},{4:h,5:f,10:d,12:p,13:m,14:g,43:55,58:31,60:N,61:B,63:F,64:M,65:$,66:z,67:q},{4:h,5:f,10:d,12:p,13:m,14:g,43:56,58:31,60:N,61:B,63:F,64:M,65:$,66:z,67:q},{4:h,5:f,8:V,10:d,12:p,13:m,14:g,18:U,44:[1,57],47:[1,58],58:60,59:59,63:F,64:M,65:$,66:z,67:q},t(J,[2,64]),t(J,[2,66]),t(J,[2,67]),t(J,[2,70]),t(J,[2,71]),t(J,[2,72]),t(J,[2,73]),t(J,[2,74]),t(J,[2,75]),t(J,[2,76]),t(J,[2,77]),t(J,[2,78]),t(J,[2,79]),t(J,[2,80]),t(s,[2,35]),t(l,[2,38]),t(l,[2,42]),t(l,[2,43]),t(l,[2,44]),{3:64,4:se,5:re,6:me,7:ge,8:ye,9:_e,10:ue,11:ie,12:le,13:oe,14:ne,15:pe,21:63},t(l,[2,53],{59:59,58:60,4:h,5:f,8:V,10:d,12:p,13:m,14:g,18:U,49:[1,77],63:F,64:M,65:$,66:z,67:q}),t(l,[2,56],{59:59,58:60,4:h,5:f,8:V,10:d,12:p,13:m,14:g,18:U,49:[1,78],63:F,64:M,65:$,66:z,67:q}),t(l,[2,57],{59:59,58:60,4:h,5:f,8:V,10:d,12:p,13:m,14:g,18:U,63:F,64:M,65:$,66:z,67:q}),t(l,[2,58],{59:59,58:60,4:h,5:f,8:V,10:d,12:p,13:m,14:g,18:U,63:F,64:M,65:$,66:z,67:q}),t(l,[2,59],{59:59,58:60,4:h,5:f,8:V,10:d,12:p,13:m,14:g,18:U,63:F,64:M,65:$,66:z,67:q}),t(l,[2,60],{59:59,58:60,4:h,5:f,8:V,10:d,12:p,13:m,14:g,18:U,63:F,64:M,65:$,66:z,67:q}),{45:[1,79]},{44:[1,80]},t(J,[2,65]),t(J,[2,81]),t(J,[2,82]),t(J,[2,83]),{3:82,4:se,5:re,6:me,7:ge,8:ye,9:_e,10:ue,11:ie,12:le,13:oe,14:ne,15:pe,18:[1,81]},t(te,[2,23]),t(te,[2,1]),t(te,[2,2]),t(te,[2,3]),t(te,[2,4]),t(te,[2,5]),t(te,[2,6]),t(te,[2,7]),t(te,[2,8]),t(te,[2,9]),t(te,[2,10]),t(te,[2,11]),t(te,[2,12]),t(l,[2,52],{58:31,43:83,4:h,5:f,10:d,12:p,13:m,14:g,60:N,61:B,63:F,64:M,65:$,66:z,67:q}),t(l,[2,55],{58:31,43:84,4:h,5:f,10:d,12:p,13:m,14:g,60:N,61:B,63:F,64:M,65:$,66:z,67:q}),{46:[1,85]},{45:[1,86]},{4:He,5:de,6:ce,8:st,11:Ae,13:Ye,16:89,17:Ge,18:rt,19:Xe,20:Ze,22:88,23:87},t(te,[2,24]),t(l,[2,51],{59:59,58:60,4:h,5:f,8:V,10:d,12:p,13:m,14:g,18:U,63:F,64:M,65:$,66:z,67:q}),t(l,[2,54],{59:59,58:60,4:h,5:f,8:V,10:d,12:p,13:m,14:g,18:U,63:F,64:M,65:$,66:z,67:q}),t(l,[2,47],{22:88,16:89,23:100,4:He,5:de,6:ce,8:st,11:Ae,13:Ye,17:Ge,18:rt,19:Xe,20:Ze}),{46:[1,101]},t(l,[2,29],{10:Pe}),t(Re,[2,27],{16:103,4:He,5:de,6:ce,8:st,11:Ae,13:Ye,17:Ge,18:rt,19:Xe,20:Ze}),t(Ve,[2,25]),t(Ve,[2,13]),t(Ve,[2,14]),t(Ve,[2,15]),t(Ve,[2,16]),t(Ve,[2,17]),t(Ve,[2,18]),t(Ve,[2,19]),t(Ve,[2,20]),t(Ve,[2,21]),t(Ve,[2,22]),t(l,[2,49],{10:Pe}),t(l,[2,48],{22:88,16:89,23:104,4:He,5:de,6:ce,8:st,11:Ae,13:Ye,17:Ge,18:rt,19:Xe,20:Ze}),{4:He,5:de,6:ce,8:st,11:Ae,13:Ye,16:89,17:Ge,18:rt,19:Xe,20:Ze,22:105},t(Ve,[2,26]),t(l,[2,50],{10:Pe}),t(Re,[2,28],{16:103,4:He,5:de,6:ce,8:st,11:Ae,13:Ye,17:Ge,18:rt,19:Xe,20:Ze})],defaultActions:{8:[2,30],9:[2,31]},parseError:b(function(K,we){if(we.recoverable)this.trace(K);else{var Ee=new Error(K);throw Ee.hash=we,Ee}},"parseError"),parse:b(function(K){var we=this,Ee=[0],Ke=[],Be=[null],De=[],nt=this.table,We="",ut=0,vt=0,gt=0,mt=2,ft=1,Dt=De.slice.call(arguments,1),ht=Object.create(this.lexer),yt={yy:{}};for(var W in this.yy)Object.prototype.hasOwnProperty.call(this.yy,W)&&(yt.yy[W]=this.yy[W]);ht.setInput(K,yt.yy),yt.yy.lexer=ht,yt.yy.parser=this,typeof ht.yylloc>"u"&&(ht.yylloc={});var j=ht.yylloc;De.push(j);var Je=ht.options&&ht.options.ranges;typeof yt.yy.parseError=="function"?this.parseError=yt.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function ee(un){Ee.length=Ee.length-2*un,Be.length=Be.length-un,De.length=De.length-un}b(ee,"popStack");function Te(){var un;return un=Ke.pop()||ht.lex()||ft,typeof un!="number"&&(un instanceof Array&&(Ke=un,un=Ke.pop()),un=we.symbols_[un]||un),un}b(Te,"lex");for(var bt,at,It,At,Ut,Bt,Kt={},vr,Me,kr,Ue;;){if(It=Ee[Ee.length-1],this.defaultActions[It]?At=this.defaultActions[It]:((bt===null||typeof bt>"u")&&(bt=Te()),At=nt[It]&&nt[It][bt]),typeof At>"u"||!At.length||!At[0]){var Bn="";Ue=[];for(vr in nt[It])this.terminals_[vr]&&vr>mt&&Ue.push("'"+this.terminals_[vr]+"'");ht.showPosition?Bn="Parse error on line "+(ut+1)+`: +`+ht.showPosition()+` +Expecting `+Ue.join(", ")+", got '"+(this.terminals_[bt]||bt)+"'":Bn="Parse error on line "+(ut+1)+": Unexpected "+(bt==ft?"end of input":"'"+(this.terminals_[bt]||bt)+"'"),this.parseError(Bn,{text:ht.match,token:this.terminals_[bt]||bt,line:ht.yylineno,loc:j,expected:Ue})}if(At[0]instanceof Array&&At.length>1)throw new Error("Parse Error: multiple actions possible at state: "+It+", token: "+bt);switch(At[0]){case 1:Ee.push(bt),Be.push(ht.yytext),De.push(ht.yylloc),Ee.push(At[1]),bt=null,at?(bt=at,at=null):(vt=ht.yyleng,We=ht.yytext,ut=ht.yylineno,j=ht.yylloc,gt>0&>--);break;case 2:if(Me=this.productions_[At[1]][1],Kt.$=Be[Be.length-Me],Kt._$={first_line:De[De.length-(Me||1)].first_line,last_line:De[De.length-1].last_line,first_column:De[De.length-(Me||1)].first_column,last_column:De[De.length-1].last_column},Je&&(Kt._$.range=[De[De.length-(Me||1)].range[0],De[De.length-1].range[1]]),Bt=this.performAction.apply(Kt,[We,vt,ut,yt.yy,At[1],Be,De].concat(Dt)),typeof Bt<"u")return Bt;Me&&(Ee=Ee.slice(0,-1*Me*2),Be=Be.slice(0,-1*Me),De=De.slice(0,-1*Me)),Ee.push(this.productions_[At[1]][0]),Be.push(Kt.$),De.push(Kt._$),kr=nt[Ee[Ee.length-2]][Ee[Ee.length-1]],Ee.push(kr);break;case 3:return!0}}return!0},"parse")},xe=(function(){var ve={EOF:1,parseError:b(function(we,Ee){if(this.yy.parser)this.yy.parser.parseError(we,Ee);else throw new Error(we)},"parseError"),setInput:b(function(K,we){return this.yy=we||this.yy||{},this._input=K,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:b(function(){var K=this._input[0];this.yytext+=K,this.yyleng++,this.offset++,this.match+=K,this.matched+=K;var we=K.match(/(?:\r\n?|\n).*/g);return we?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),K},"input"),unput:b(function(K){var we=K.length,Ee=K.split(/(?:\r\n?|\n)/g);this._input=K+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-we),this.offset-=we;var Ke=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),Ee.length-1&&(this.yylineno-=Ee.length-1);var Be=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:Ee?(Ee.length===Ke.length?this.yylloc.first_column:0)+Ke[Ke.length-Ee.length].length-Ee[0].length:this.yylloc.first_column-we},this.options.ranges&&(this.yylloc.range=[Be[0],Be[0]+this.yyleng-we]),this.yyleng=this.yytext.length,this},"unput"),more:b(function(){return this._more=!0,this},"more"),reject:b(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). +`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:b(function(K){this.unput(this.match.slice(K))},"less"),pastInput:b(function(){var K=this.matched.substr(0,this.matched.length-this.match.length);return(K.length>20?"...":"")+K.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:b(function(){var K=this.match;return K.length<20&&(K+=this._input.substr(0,20-K.length)),(K.substr(0,20)+(K.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:b(function(){var K=this.pastInput(),we=new Array(K.length+1).join("-");return K+this.upcomingInput()+` +`+we+"^"},"showPosition"),test_match:b(function(K,we){var Ee,Ke,Be;if(this.options.backtrack_lexer&&(Be={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(Be.yylloc.range=this.yylloc.range.slice(0))),Ke=K[0].match(/(?:\r\n?|\n).*/g),Ke&&(this.yylineno+=Ke.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:Ke?Ke[Ke.length-1].length-Ke[Ke.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+K[0].length},this.yytext+=K[0],this.match+=K[0],this.matches=K,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(K[0].length),this.matched+=K[0],Ee=this.performAction.call(this,this.yy,this,we,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),Ee)return Ee;if(this._backtrack){for(var De in Be)this[De]=Be[De];return!1}return!1},"test_match"),next:b(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var K,we,Ee,Ke;this._more||(this.yytext="",this.match="");for(var Be=this._currentRules(),De=0;Dewe[0].length)){if(we=Ee,Ke=De,this.options.backtrack_lexer){if(K=this.test_match(Ee,Be[De]),K!==!1)return K;if(this._backtrack){we=!1;continue}else return!1}else if(!this.options.flex)break}return we?(K=this.test_match(we,Be[Ke]),K!==!1?K:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. +`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:b(function(){var we=this.next();return we||this.lex()},"lex"),begin:b(function(we){this.conditionStack.push(we)},"begin"),popState:b(function(){var we=this.conditionStack.length-1;return we>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:b(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:b(function(we){return we=this.conditionStack.length-1-Math.abs(we||0),we>=0?this.conditionStack[we]:"INITIAL"},"topState"),pushState:b(function(we){this.begin(we)},"pushState"),stateStackSize:b(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:b(function(we,Ee,Ke,Be){var De=Be;switch(Ke){case 0:break;case 1:break;case 2:return 55;case 3:break;case 4:return this.begin("title"),35;break;case 5:return this.popState(),"title_value";break;case 6:return this.begin("acc_title"),37;break;case 7:return this.popState(),"acc_title_value";break;case 8:return this.begin("acc_descr"),39;break;case 9:return this.popState(),"acc_descr_value";break;case 10:this.begin("acc_descr_multiline");break;case 11:this.popState();break;case 12:return"acc_descr_multiline_value";case 13:return 48;case 14:return 50;case 15:return 49;case 16:return 51;case 17:return 52;case 18:return 53;case 19:return 54;case 20:return 25;case 21:this.begin("md_string");break;case 22:return"MD_STR";case 23:this.popState();break;case 24:this.begin("string");break;case 25:this.popState();break;case 26:return"STR";case 27:this.begin("class_name");break;case 28:return this.popState(),47;break;case 29:return this.begin("point_start"),44;break;case 30:return this.begin("point_x"),45;break;case 31:this.popState();break;case 32:this.popState(),this.begin("point_y");break;case 33:return this.popState(),46;break;case 34:return 28;case 35:return 4;case 36:return 11;case 37:return 64;case 38:return 10;case 39:return 65;case 40:return 65;case 41:return 14;case 42:return 13;case 43:return 67;case 44:return 66;case 45:return 12;case 46:return 8;case 47:return 5;case 48:return 18;case 49:return 56;case 50:return 63;case 51:return 57}},"anonymous"),rules:[/^(?:%%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n\r]+)/i,/^(?:%%[^\n]*)/i,/^(?:title\b)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?: *x-axis *)/i,/^(?: *y-axis *)/i,/^(?: *--+> *)/i,/^(?: *quadrant-1 *)/i,/^(?: *quadrant-2 *)/i,/^(?: *quadrant-3 *)/i,/^(?: *quadrant-4 *)/i,/^(?:classDef\b)/i,/^(?:["][`])/i,/^(?:[^`"]+)/i,/^(?:[`]["])/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?::::)/i,/^(?:^\w+)/i,/^(?:\s*:\s*\[\s*)/i,/^(?:(1)|(0(.\d+)?))/i,/^(?:\s*\] *)/i,/^(?:\s*,\s*)/i,/^(?:(1)|(0(.\d+)?))/i,/^(?: *quadrantChart *)/i,/^(?:[A-Za-z]+)/i,/^(?::)/i,/^(?:\+)/i,/^(?:,)/i,/^(?:=)/i,/^(?:=)/i,/^(?:\*)/i,/^(?:#)/i,/^(?:[\_])/i,/^(?:\.)/i,/^(?:&)/i,/^(?:-)/i,/^(?:[0-9]+)/i,/^(?:\s)/i,/^(?:;)/i,/^(?:[!"#$%&'*+,-.`?\\_/])/i,/^(?:$)/i],conditions:{class_name:{rules:[28],inclusive:!1},point_y:{rules:[33],inclusive:!1},point_x:{rules:[32],inclusive:!1},point_start:{rules:[30,31],inclusive:!1},acc_descr_multiline:{rules:[11,12],inclusive:!1},acc_descr:{rules:[9],inclusive:!1},acc_title:{rules:[7],inclusive:!1},title:{rules:[5],inclusive:!1},md_string:{rules:[22,23],inclusive:!1},string:{rules:[25,26],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,6,8,10,13,14,15,16,17,18,19,20,21,24,27,29,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51],inclusive:!0}}};return ve})();ke.lexer=xe;function H(){this.yy={}}return b(H,"Parser"),H.prototype=ke,ke.Parser=H,new H})();wV.parser=wV;g5t=wV,Oo=T1(),y5t=(k4=class{constructor(){this.classes=new Map,this.config=this.getDefaultConfig(),this.themeConfig=this.getDefaultThemeConfig(),this.data=this.getDefaultData()}getDefaultData(){return{titleText:"",quadrant1Text:"",quadrant2Text:"",quadrant3Text:"",quadrant4Text:"",xAxisLeftText:"",xAxisRightText:"",yAxisBottomText:"",yAxisTopText:"",points:[]}}getDefaultConfig(){return{showXAxis:!0,showYAxis:!0,showTitle:!0,chartHeight:Ir.quadrantChart?.chartWidth||500,chartWidth:Ir.quadrantChart?.chartHeight||500,titlePadding:Ir.quadrantChart?.titlePadding||10,titleFontSize:Ir.quadrantChart?.titleFontSize||20,quadrantPadding:Ir.quadrantChart?.quadrantPadding||5,xAxisLabelPadding:Ir.quadrantChart?.xAxisLabelPadding||5,yAxisLabelPadding:Ir.quadrantChart?.yAxisLabelPadding||5,xAxisLabelFontSize:Ir.quadrantChart?.xAxisLabelFontSize||16,yAxisLabelFontSize:Ir.quadrantChart?.yAxisLabelFontSize||16,quadrantLabelFontSize:Ir.quadrantChart?.quadrantLabelFontSize||16,quadrantTextTopPadding:Ir.quadrantChart?.quadrantTextTopPadding||5,pointTextPadding:Ir.quadrantChart?.pointTextPadding||5,pointLabelFontSize:Ir.quadrantChart?.pointLabelFontSize||12,pointRadius:Ir.quadrantChart?.pointRadius||5,xAxisPosition:Ir.quadrantChart?.xAxisPosition||"top",yAxisPosition:Ir.quadrantChart?.yAxisPosition||"left",quadrantInternalBorderStrokeWidth:Ir.quadrantChart?.quadrantInternalBorderStrokeWidth||1,quadrantExternalBorderStrokeWidth:Ir.quadrantChart?.quadrantExternalBorderStrokeWidth||2}}getDefaultThemeConfig(){return{quadrant1Fill:Oo.quadrant1Fill,quadrant2Fill:Oo.quadrant2Fill,quadrant3Fill:Oo.quadrant3Fill,quadrant4Fill:Oo.quadrant4Fill,quadrant1TextFill:Oo.quadrant1TextFill,quadrant2TextFill:Oo.quadrant2TextFill,quadrant3TextFill:Oo.quadrant3TextFill,quadrant4TextFill:Oo.quadrant4TextFill,quadrantPointFill:Oo.quadrantPointFill,quadrantPointTextFill:Oo.quadrantPointTextFill,quadrantXAxisTextFill:Oo.quadrantXAxisTextFill,quadrantYAxisTextFill:Oo.quadrantYAxisTextFill,quadrantTitleFill:Oo.quadrantTitleFill,quadrantInternalBorderStrokeFill:Oo.quadrantInternalBorderStrokeFill,quadrantExternalBorderStrokeFill:Oo.quadrantExternalBorderStrokeFill}}clear(){this.config=this.getDefaultConfig(),this.themeConfig=this.getDefaultThemeConfig(),this.data=this.getDefaultData(),this.classes=new Map,he.info("clear called")}setData(e){this.data={...this.data,...e}}addPoints(e){this.data.points=[...e,...this.data.points]}addClass(e,r){this.classes.set(e,r)}setConfig(e){he.trace("setConfig called with: ",e),this.config={...this.config,...e}}setThemeConfig(e){he.trace("setThemeConfig called with: ",e),this.themeConfig={...this.themeConfig,...e}}calculateSpace(e,r,n,i){let a=this.config.xAxisLabelPadding*2+this.config.xAxisLabelFontSize,s={top:e==="top"&&r?a:0,bottom:e==="bottom"&&r?a:0},o=this.config.yAxisLabelPadding*2+this.config.yAxisLabelFontSize,l={left:this.config.yAxisPosition==="left"&&n?o:0,right:this.config.yAxisPosition==="right"&&n?o:0},u=this.config.titleFontSize+this.config.titlePadding*2,h={top:i?u:0},f=this.config.quadrantPadding+l.left,d=this.config.quadrantPadding+s.top+h.top,p=this.config.chartWidth-this.config.quadrantPadding*2-l.left-l.right,m=this.config.chartHeight-this.config.quadrantPadding*2-s.top-s.bottom-h.top,g=p/2,y=m/2;return{xAxisSpace:s,yAxisSpace:l,titleSpace:h,quadrantSpace:{quadrantLeft:f,quadrantTop:d,quadrantWidth:p,quadrantHalfWidth:g,quadrantHeight:m,quadrantHalfHeight:y}}}getAxisLabels(e,r,n,i){let{quadrantSpace:a,titleSpace:s}=i,{quadrantHalfHeight:o,quadrantHeight:l,quadrantLeft:u,quadrantHalfWidth:h,quadrantTop:f,quadrantWidth:d}=a,p=!!this.data.xAxisRightText,m=!!this.data.yAxisTopText,g=[];return this.data.xAxisLeftText&&r&&g.push({text:this.data.xAxisLeftText,fill:this.themeConfig.quadrantXAxisTextFill,x:u+(p?h/2:0),y:e==="top"?this.config.xAxisLabelPadding+s.top:this.config.xAxisLabelPadding+f+l+this.config.quadrantPadding,fontSize:this.config.xAxisLabelFontSize,verticalPos:p?"center":"left",horizontalPos:"top",rotation:0}),this.data.xAxisRightText&&r&&g.push({text:this.data.xAxisRightText,fill:this.themeConfig.quadrantXAxisTextFill,x:u+h+(p?h/2:0),y:e==="top"?this.config.xAxisLabelPadding+s.top:this.config.xAxisLabelPadding+f+l+this.config.quadrantPadding,fontSize:this.config.xAxisLabelFontSize,verticalPos:p?"center":"left",horizontalPos:"top",rotation:0}),this.data.yAxisBottomText&&n&&g.push({text:this.data.yAxisBottomText,fill:this.themeConfig.quadrantYAxisTextFill,x:this.config.yAxisPosition==="left"?this.config.yAxisLabelPadding:this.config.yAxisLabelPadding+u+d+this.config.quadrantPadding,y:f+l-(m?o/2:0),fontSize:this.config.yAxisLabelFontSize,verticalPos:m?"center":"left",horizontalPos:"top",rotation:-90}),this.data.yAxisTopText&&n&&g.push({text:this.data.yAxisTopText,fill:this.themeConfig.quadrantYAxisTextFill,x:this.config.yAxisPosition==="left"?this.config.yAxisLabelPadding:this.config.yAxisLabelPadding+u+d+this.config.quadrantPadding,y:f+o-(m?o/2:0),fontSize:this.config.yAxisLabelFontSize,verticalPos:m?"center":"left",horizontalPos:"top",rotation:-90}),g}getQuadrants(e){let{quadrantSpace:r}=e,{quadrantHalfHeight:n,quadrantLeft:i,quadrantHalfWidth:a,quadrantTop:s}=r,o=[{text:{text:this.data.quadrant1Text,fill:this.themeConfig.quadrant1TextFill,x:0,y:0,fontSize:this.config.quadrantLabelFontSize,verticalPos:"center",horizontalPos:"middle",rotation:0},x:i+a,y:s,width:a,height:n,fill:this.themeConfig.quadrant1Fill},{text:{text:this.data.quadrant2Text,fill:this.themeConfig.quadrant2TextFill,x:0,y:0,fontSize:this.config.quadrantLabelFontSize,verticalPos:"center",horizontalPos:"middle",rotation:0},x:i,y:s,width:a,height:n,fill:this.themeConfig.quadrant2Fill},{text:{text:this.data.quadrant3Text,fill:this.themeConfig.quadrant3TextFill,x:0,y:0,fontSize:this.config.quadrantLabelFontSize,verticalPos:"center",horizontalPos:"middle",rotation:0},x:i,y:s+n,width:a,height:n,fill:this.themeConfig.quadrant3Fill},{text:{text:this.data.quadrant4Text,fill:this.themeConfig.quadrant4TextFill,x:0,y:0,fontSize:this.config.quadrantLabelFontSize,verticalPos:"center",horizontalPos:"middle",rotation:0},x:i+a,y:s+n,width:a,height:n,fill:this.themeConfig.quadrant4Fill}];for(let l of o)l.text.x=l.x+l.width/2,this.data.points.length===0?(l.text.y=l.y+l.height/2,l.text.horizontalPos="middle"):(l.text.y=l.y+this.config.quadrantTextTopPadding,l.text.horizontalPos="top");return o}getQuadrantPoints(e){let{quadrantSpace:r}=e,{quadrantHeight:n,quadrantLeft:i,quadrantTop:a,quadrantWidth:s}=r,o=ju().domain([0,1]).range([i,s+i]),l=ju().domain([0,1]).range([n+a,a]);return this.data.points.map(h=>{let f=this.classes.get(h.className);return f&&(h={...f,...h}),{x:o(h.x),y:l(h.y),fill:h.color??this.themeConfig.quadrantPointFill,radius:h.radius??this.config.pointRadius,text:{text:h.text,fill:this.themeConfig.quadrantPointTextFill,x:o(h.x),y:l(h.y)+this.config.pointTextPadding,verticalPos:"center",horizontalPos:"top",fontSize:this.config.pointLabelFontSize,rotation:0},strokeColor:h.strokeColor??this.themeConfig.quadrantPointFill,strokeWidth:h.strokeWidth??"0px"}})}getBorders(e){let r=this.config.quadrantExternalBorderStrokeWidth/2,{quadrantSpace:n}=e,{quadrantHalfHeight:i,quadrantHeight:a,quadrantLeft:s,quadrantHalfWidth:o,quadrantTop:l,quadrantWidth:u}=n;return[{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:s-r,y1:l,x2:s+u+r,y2:l},{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:s+u,y1:l+r,x2:s+u,y2:l+a-r},{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:s-r,y1:l+a,x2:s+u+r,y2:l+a},{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:s,y1:l+r,x2:s,y2:l+a-r},{strokeFill:this.themeConfig.quadrantInternalBorderStrokeFill,strokeWidth:this.config.quadrantInternalBorderStrokeWidth,x1:s+o,y1:l+r,x2:s+o,y2:l+a-r},{strokeFill:this.themeConfig.quadrantInternalBorderStrokeFill,strokeWidth:this.config.quadrantInternalBorderStrokeWidth,x1:s+r,y1:l+i,x2:s+u-r,y2:l+i}]}getTitle(e){if(e)return{text:this.data.titleText,fill:this.themeConfig.quadrantTitleFill,fontSize:this.config.titleFontSize,horizontalPos:"top",verticalPos:"center",rotation:0,y:this.config.titlePadding,x:this.config.chartWidth/2}}build(){let e=this.config.showXAxis&&!!(this.data.xAxisLeftText||this.data.xAxisRightText),r=this.config.showYAxis&&!!(this.data.yAxisTopText||this.data.yAxisBottomText),n=this.config.showTitle&&!!this.data.titleText,i=this.data.points.length>0?"bottom":this.config.xAxisPosition,a=this.calculateSpace(i,e,r,n);return{points:this.getQuadrantPoints(a),quadrants:this.getQuadrants(a),axisLabels:this.getAxisLabels(i,e,r,a),borderLines:this.getBorders(a),title:this.getTitle(n)}}},b(k4,"QuadrantBuilder"),k4),PL=(T4=class extends Error{constructor(e,r,n){super(`value for ${e} ${r} is invalid, please use a valid ${n}`),this.name="InvalidStyleError"}},b(T4,"InvalidStyleError"),T4);b(kV,"validateHexCode");b(jSe,"validateNumber");b(KSe,"validateSizeInPixels");v5t=Fe();b(J0,"textSanitizer");Ns=new y5t;b(ZSe,"setQuadrant1Text");b(QSe,"setQuadrant2Text");b(JSe,"setQuadrant3Text");b(eCe,"setQuadrant4Text");b(tCe,"setXAxisLeftText");b(rCe,"setXAxisRightText");b(nCe,"setYAxisTopText");b(iCe,"setYAxisBottomText");b(BL,"parseStyles");b(aCe,"addPoint");b(sCe,"addClass");b(oCe,"setWidth");b(lCe,"setHeight");b(uCe,"getQuadrantData");x5t=b(function(){Ns.clear(),Jr()},"clear"),b5t={setWidth:oCe,setHeight:lCe,setQuadrant1Text:ZSe,setQuadrant2Text:QSe,setQuadrant3Text:JSe,setQuadrant4Text:eCe,setXAxisLeftText:tCe,setXAxisRightText:rCe,setYAxisTopText:nCe,setYAxisBottomText:iCe,parseStyles:BL,addPoint:aCe,addClass:sCe,getQuadrantData:uCe,clear:x5t,setAccTitle:en,getAccTitle:tn,setDiagramTitle:pn,getDiagramTitle:an,getAccDescription:nn,setAccDescription:rn},w5t=b((t,e,r,n)=>{function i(A){return A==="top"?"hanging":"middle"}b(i,"getDominantBaseLine");function a(A){return A==="left"?"start":"middle"}b(a,"getTextAnchor");function s(A){return`translate(${A.x}, ${A.y}) rotate(${A.rotation||0})`}b(s,"getTransformation");let o=Fe();he.debug(`Rendering quadrant chart +`+t);let l=o.securityLevel,u;l==="sandbox"&&(u=dt("#i"+e));let f=(l==="sandbox"?dt(u.nodes()[0].contentDocument.body):dt("body")).select(`[id="${e}"]`),d=f.append("g").attr("class","main"),p=o.quadrantChart?.chartWidth??500,m=o.quadrantChart?.chartHeight??500;ei(f,m,p,o.quadrantChart?.useMaxWidth??!0),f.attr("viewBox","0 0 "+p+" "+m),n.db.setHeight(m),n.db.setWidth(p);let g=n.db.getQuadrantData(),y=d.append("g").attr("class","quadrants"),v=d.append("g").attr("class","border"),x=d.append("g").attr("class","data-points"),k=d.append("g").attr("class","labels"),_=d.append("g").attr("class","title");g.title&&_.append("text").attr("x",0).attr("y",0).attr("fill",g.title.fill).attr("font-size",g.title.fontSize).attr("dominant-baseline",i(g.title.horizontalPos)).attr("text-anchor",a(g.title.verticalPos)).attr("transform",s(g.title)).text(g.title.text),g.borderLines&&v.selectAll("line").data(g.borderLines).enter().append("line").attr("x1",A=>A.x1).attr("y1",A=>A.y1).attr("x2",A=>A.x2).attr("y2",A=>A.y2).style("stroke",A=>A.strokeFill).style("stroke-width",A=>A.strokeWidth);let T=y.selectAll("g.quadrant").data(g.quadrants).enter().append("g").attr("class","quadrant");T.append("rect").attr("x",A=>A.x).attr("y",A=>A.y).attr("width",A=>A.width).attr("height",A=>A.height).attr("fill",A=>A.fill),T.append("text").attr("x",0).attr("y",0).attr("fill",A=>A.text.fill).attr("font-size",A=>A.text.fontSize).attr("dominant-baseline",A=>i(A.text.horizontalPos)).attr("text-anchor",A=>a(A.text.verticalPos)).attr("transform",A=>s(A.text)).text(A=>A.text.text),k.selectAll("g.label").data(g.axisLabels).enter().append("g").attr("class","label").append("text").attr("x",0).attr("y",0).text(A=>A.text).attr("fill",A=>A.fill).attr("font-size",A=>A.fontSize).attr("dominant-baseline",A=>i(A.horizontalPos)).attr("text-anchor",A=>a(A.verticalPos)).attr("transform",A=>s(A));let R=x.selectAll("g.data-point").data(g.points).enter().append("g").attr("class","data-point");R.append("circle").attr("cx",A=>A.x).attr("cy",A=>A.y).attr("r",A=>A.radius).attr("fill",A=>A.fill).attr("stroke",A=>A.strokeColor).attr("stroke-width",A=>A.strokeWidth),R.append("text").attr("x",0).attr("y",0).text(A=>A.text.text).attr("fill",A=>A.text.fill).attr("font-size",A=>A.text.fontSize).attr("dominant-baseline",A=>i(A.text.horizontalPos)).attr("text-anchor",A=>a(A.text.verticalPos)).attr("transform",A=>s(A.text))},"draw"),k5t={draw:w5t},T5t={parser:g5t,db:b5t,renderer:k5t,styles:b(()=>"","styles")}});var DCe={};Mr(DCe,{diagram:()=>B5t});function EV(t){return t.type==="bar"}function _V(t){return t.type==="band"}function E4(t){return t.type==="linear"}function SV(t,e,r,n){let i=new pCe(n);return _V(t)?new S5t(e,r,t.categories,t.title,i):new C5t(e,r,[t.min,t.max],t.title,i)}function gCe(t,e,r,n){let i=new pCe(n);return new _5t(i,t,e,r)}function yCe(t,e,r){return new R5t(t,e,r)}function LV(){let t=T1(),e=Yr();return ls(t.xyChart,e.themeVariables.xyChart)}function RV(){let t=Yr();return ls(Ir.xyChart,t.xyChart)}function DV(){return{yAxis:{type:"linear",title:"",min:1/0,max:-1/0},xAxis:{type:"band",title:"",categories:[]},title:"",plots:[]}}function zL(t){let e=Yr();return Qr(t.trim(),e)}function xCe(t){vCe=t}function bCe(t){t==="horizontal"?b8.chartOrientation="horizontal":b8.chartOrientation="vertical"}function wCe(t){Gn.xAxis.title=zL(t.text)}function IV(t,e){Gn.xAxis={type:"linear",title:Gn.xAxis.title,min:t,max:e},FL=!0}function kCe(t){Gn.xAxis={type:"band",title:Gn.xAxis.title,categories:t.map(e=>zL(e.text))},FL=!0}function TCe(t){Gn.yAxis.title=zL(t.text)}function ECe(t,e){Gn.yAxis={type:"linear",title:Gn.yAxis.title,min:t,max:e},AV=!0}function SCe(t){let e=Math.min(...t),r=Math.max(...t),n=E4(Gn.yAxis)?Gn.yAxis.min:1/0,i=E4(Gn.yAxis)?Gn.yAxis.max:-1/0;Gn.yAxis={type:"linear",title:Gn.yAxis.title,min:Math.min(n,e),max:Math.max(i,r)}}function MV(t){let e=[];if(t.length===0)return e;if(!FL){let r=E4(Gn.xAxis)?Gn.xAxis.min:1/0,n=E4(Gn.xAxis)?Gn.xAxis.max:-1/0;IV(Math.min(r,1),Math.max(n,t.length))}if(AV||SCe(t),_V(Gn.xAxis)&&(e=Gn.xAxis.categories.map((r,n)=>[r,t[n]])),E4(Gn.xAxis)){let r=Gn.xAxis.min,n=Gn.xAxis.max,i=(n-r)/(t.length-1),a=[];for(let s=r;s<=n;s+=i)a.push(`${s}`);e=a.map((s,o)=>[s,t[o]])}return e}function NV(t){return CV[t===0?0:t%CV.length]}function CCe(t,e){let r=MV(e);Gn.plots.push({type:"line",strokeFill:NV(x8),strokeWidth:2,data:r}),x8++}function _Ce(t,e){let r=MV(e);Gn.plots.push({type:"bar",fill:NV(x8),data:r}),x8++}function ACe(){if(Gn.plots.length===0)throw Error("No Plot to render, please provide a plot with some data");return Gn.title=an(),I5t.build(b8,Gn,w8,vCe)}function LCe(){return w8}function RCe(){return b8}var TV,E5t,S4,pCe,fCe,dCe,C4,mCe,_4,S5t,A4,C5t,L4,_5t,R4,A5t,D4,L5t,I4,R5t,M4,D5t,N4,I5t,x8,vCe,b8,w8,Gn,CV,FL,AV,M5t,N5t,O5t,P5t,B5t,ICe=D(()=>{As();Hn();v0();Nr();Or();Or();Or();TV=(function(){var t=b(function(F,M,$,z){for($=$||{},z=F.length;z--;$[F[z]]=M);return $},"o"),e=[1,10,12,14,16,18,19,21,23],r=[2,6],n=[1,3],i=[1,5],a=[1,6],s=[1,7],o=[1,5,10,12,14,16,18,19,21,23,34,35,36],l=[1,25],u=[1,26],h=[1,28],f=[1,29],d=[1,30],p=[1,31],m=[1,32],g=[1,33],y=[1,34],v=[1,35],x=[1,36],k=[1,37],_=[1,43],T=[1,42],S=[1,47],R=[1,50],A=[1,10,12,14,16,18,19,21,23,34,35,36],I=[1,10,12,14,16,18,19,21,23,24,26,27,28,34,35,36],P=[1,10,12,14,16,18,19,21,23,24,26,27,28,34,35,36,41,42,43,44,45,46,47,48,49,50],O=[1,64],C={trace:b(function(){},"trace"),yy:{},symbols_:{error:2,start:3,eol:4,XYCHART:5,chartConfig:6,document:7,CHART_ORIENTATION:8,statement:9,title:10,text:11,X_AXIS:12,parseXAxis:13,Y_AXIS:14,parseYAxis:15,LINE:16,plotData:17,BAR:18,acc_title:19,acc_title_value:20,acc_descr:21,acc_descr_value:22,acc_descr_multiline_value:23,SQUARE_BRACES_START:24,commaSeparatedNumbers:25,SQUARE_BRACES_END:26,NUMBER_WITH_DECIMAL:27,COMMA:28,xAxisData:29,bandData:30,ARROW_DELIMITER:31,commaSeparatedTexts:32,yAxisData:33,NEWLINE:34,SEMI:35,EOF:36,alphaNum:37,STR:38,MD_STR:39,alphaNumToken:40,AMP:41,NUM:42,ALPHA:43,PLUS:44,EQUALS:45,MULT:46,DOT:47,BRKT:48,MINUS:49,UNDERSCORE:50,$accept:0,$end:1},terminals_:{2:"error",5:"XYCHART",8:"CHART_ORIENTATION",10:"title",12:"X_AXIS",14:"Y_AXIS",16:"LINE",18:"BAR",19:"acc_title",20:"acc_title_value",21:"acc_descr",22:"acc_descr_value",23:"acc_descr_multiline_value",24:"SQUARE_BRACES_START",26:"SQUARE_BRACES_END",27:"NUMBER_WITH_DECIMAL",28:"COMMA",31:"ARROW_DELIMITER",34:"NEWLINE",35:"SEMI",36:"EOF",38:"STR",39:"MD_STR",41:"AMP",42:"NUM",43:"ALPHA",44:"PLUS",45:"EQUALS",46:"MULT",47:"DOT",48:"BRKT",49:"MINUS",50:"UNDERSCORE"},productions_:[0,[3,2],[3,3],[3,2],[3,1],[6,1],[7,0],[7,2],[9,2],[9,2],[9,2],[9,2],[9,2],[9,3],[9,2],[9,3],[9,2],[9,2],[9,1],[17,3],[25,3],[25,1],[13,1],[13,2],[13,1],[29,1],[29,3],[30,3],[32,3],[32,1],[15,1],[15,2],[15,1],[33,3],[4,1],[4,1],[4,1],[11,1],[11,1],[11,1],[37,1],[37,2],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1]],performAction:b(function(M,$,z,q,V,U,J){var se=U.length-1;switch(V){case 5:q.setOrientation(U[se]);break;case 9:q.setDiagramTitle(U[se].text.trim());break;case 12:q.setLineData({text:"",type:"text"},U[se]);break;case 13:q.setLineData(U[se-1],U[se]);break;case 14:q.setBarData({text:"",type:"text"},U[se]);break;case 15:q.setBarData(U[se-1],U[se]);break;case 16:this.$=U[se].trim(),q.setAccTitle(this.$);break;case 17:case 18:this.$=U[se].trim(),q.setAccDescription(this.$);break;case 19:this.$=U[se-1];break;case 20:this.$=[Number(U[se-2]),...U[se]];break;case 21:this.$=[Number(U[se])];break;case 22:q.setXAxisTitle(U[se]);break;case 23:q.setXAxisTitle(U[se-1]);break;case 24:q.setXAxisTitle({type:"text",text:""});break;case 25:q.setXAxisBand(U[se]);break;case 26:q.setXAxisRangeData(Number(U[se-2]),Number(U[se]));break;case 27:this.$=U[se-1];break;case 28:this.$=[U[se-2],...U[se]];break;case 29:this.$=[U[se]];break;case 30:q.setYAxisTitle(U[se]);break;case 31:q.setYAxisTitle(U[se-1]);break;case 32:q.setYAxisTitle({type:"text",text:""});break;case 33:q.setYAxisRangeData(Number(U[se-2]),Number(U[se]));break;case 37:this.$={text:U[se],type:"text"};break;case 38:this.$={text:U[se],type:"text"};break;case 39:this.$={text:U[se],type:"markdown"};break;case 40:this.$=U[se];break;case 41:this.$=U[se-1]+""+U[se];break}},"anonymous"),table:[t(e,r,{3:1,4:2,7:4,5:n,34:i,35:a,36:s}),{1:[3]},t(e,r,{4:2,7:4,3:8,5:n,34:i,35:a,36:s}),t(e,r,{4:2,7:4,6:9,3:10,5:n,8:[1,11],34:i,35:a,36:s}),{1:[2,4],9:12,10:[1,13],12:[1,14],14:[1,15],16:[1,16],18:[1,17],19:[1,18],21:[1,19],23:[1,20]},t(o,[2,34]),t(o,[2,35]),t(o,[2,36]),{1:[2,1]},t(e,r,{4:2,7:4,3:21,5:n,34:i,35:a,36:s}),{1:[2,3]},t(o,[2,5]),t(e,[2,7],{4:22,34:i,35:a,36:s}),{11:23,37:24,38:l,39:u,40:27,41:h,42:f,43:d,44:p,45:m,46:g,47:y,48:v,49:x,50:k},{11:39,13:38,24:_,27:T,29:40,30:41,37:24,38:l,39:u,40:27,41:h,42:f,43:d,44:p,45:m,46:g,47:y,48:v,49:x,50:k},{11:45,15:44,27:S,33:46,37:24,38:l,39:u,40:27,41:h,42:f,43:d,44:p,45:m,46:g,47:y,48:v,49:x,50:k},{11:49,17:48,24:R,37:24,38:l,39:u,40:27,41:h,42:f,43:d,44:p,45:m,46:g,47:y,48:v,49:x,50:k},{11:52,17:51,24:R,37:24,38:l,39:u,40:27,41:h,42:f,43:d,44:p,45:m,46:g,47:y,48:v,49:x,50:k},{20:[1,53]},{22:[1,54]},t(A,[2,18]),{1:[2,2]},t(A,[2,8]),t(A,[2,9]),t(I,[2,37],{40:55,41:h,42:f,43:d,44:p,45:m,46:g,47:y,48:v,49:x,50:k}),t(I,[2,38]),t(I,[2,39]),t(P,[2,40]),t(P,[2,42]),t(P,[2,43]),t(P,[2,44]),t(P,[2,45]),t(P,[2,46]),t(P,[2,47]),t(P,[2,48]),t(P,[2,49]),t(P,[2,50]),t(P,[2,51]),t(A,[2,10]),t(A,[2,22],{30:41,29:56,24:_,27:T}),t(A,[2,24]),t(A,[2,25]),{31:[1,57]},{11:59,32:58,37:24,38:l,39:u,40:27,41:h,42:f,43:d,44:p,45:m,46:g,47:y,48:v,49:x,50:k},t(A,[2,11]),t(A,[2,30],{33:60,27:S}),t(A,[2,32]),{31:[1,61]},t(A,[2,12]),{17:62,24:R},{25:63,27:O},t(A,[2,14]),{17:65,24:R},t(A,[2,16]),t(A,[2,17]),t(P,[2,41]),t(A,[2,23]),{27:[1,66]},{26:[1,67]},{26:[2,29],28:[1,68]},t(A,[2,31]),{27:[1,69]},t(A,[2,13]),{26:[1,70]},{26:[2,21],28:[1,71]},t(A,[2,15]),t(A,[2,26]),t(A,[2,27]),{11:59,32:72,37:24,38:l,39:u,40:27,41:h,42:f,43:d,44:p,45:m,46:g,47:y,48:v,49:x,50:k},t(A,[2,33]),t(A,[2,19]),{25:73,27:O},{26:[2,28]},{26:[2,20]}],defaultActions:{8:[2,1],10:[2,3],21:[2,2],72:[2,28],73:[2,20]},parseError:b(function(M,$){if($.recoverable)this.trace(M);else{var z=new Error(M);throw z.hash=$,z}},"parseError"),parse:b(function(M){var $=this,z=[0],q=[],V=[null],U=[],J=this.table,se="",re=0,me=0,ge=0,ye=2,_e=1,ue=U.slice.call(arguments,1),ie=Object.create(this.lexer),le={yy:{}};for(var oe in this.yy)Object.prototype.hasOwnProperty.call(this.yy,oe)&&(le.yy[oe]=this.yy[oe]);ie.setInput(M,le.yy),le.yy.lexer=ie,le.yy.parser=this,typeof ie.yylloc>"u"&&(ie.yylloc={});var ne=ie.yylloc;U.push(ne);var pe=ie.options&&ie.options.ranges;typeof le.yy.parseError=="function"?this.parseError=le.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function te(ke){z.length=z.length-2*ke,V.length=V.length-ke,U.length=U.length-ke}b(te,"popStack");function He(){var ke;return ke=q.pop()||ie.lex()||_e,typeof ke!="number"&&(ke instanceof Array&&(q=ke,ke=q.pop()),ke=$.symbols_[ke]||ke),ke}b(He,"lex");for(var de,ce,st,Ae,Ye,Ge,rt={},Xe,Ze,Pe,Re;;){if(st=z[z.length-1],this.defaultActions[st]?Ae=this.defaultActions[st]:((de===null||typeof de>"u")&&(de=He()),Ae=J[st]&&J[st][de]),typeof Ae>"u"||!Ae.length||!Ae[0]){var Ve="";Re=[];for(Xe in J[st])this.terminals_[Xe]&&Xe>ye&&Re.push("'"+this.terminals_[Xe]+"'");ie.showPosition?Ve="Parse error on line "+(re+1)+`: +`+ie.showPosition()+` +Expecting `+Re.join(", ")+", got '"+(this.terminals_[de]||de)+"'":Ve="Parse error on line "+(re+1)+": Unexpected "+(de==_e?"end of input":"'"+(this.terminals_[de]||de)+"'"),this.parseError(Ve,{text:ie.match,token:this.terminals_[de]||de,line:ie.yylineno,loc:ne,expected:Re})}if(Ae[0]instanceof Array&&Ae.length>1)throw new Error("Parse Error: multiple actions possible at state: "+st+", token: "+de);switch(Ae[0]){case 1:z.push(de),V.push(ie.yytext),U.push(ie.yylloc),z.push(Ae[1]),de=null,ce?(de=ce,ce=null):(me=ie.yyleng,se=ie.yytext,re=ie.yylineno,ne=ie.yylloc,ge>0&&ge--);break;case 2:if(Ze=this.productions_[Ae[1]][1],rt.$=V[V.length-Ze],rt._$={first_line:U[U.length-(Ze||1)].first_line,last_line:U[U.length-1].last_line,first_column:U[U.length-(Ze||1)].first_column,last_column:U[U.length-1].last_column},pe&&(rt._$.range=[U[U.length-(Ze||1)].range[0],U[U.length-1].range[1]]),Ge=this.performAction.apply(rt,[se,me,re,le.yy,Ae[1],V,U].concat(ue)),typeof Ge<"u")return Ge;Ze&&(z=z.slice(0,-1*Ze*2),V=V.slice(0,-1*Ze),U=U.slice(0,-1*Ze)),z.push(this.productions_[Ae[1]][0]),V.push(rt.$),U.push(rt._$),Pe=J[z[z.length-2]][z[z.length-1]],z.push(Pe);break;case 3:return!0}}return!0},"parse")},N=(function(){var F={EOF:1,parseError:b(function($,z){if(this.yy.parser)this.yy.parser.parseError($,z);else throw new Error($)},"parseError"),setInput:b(function(M,$){return this.yy=$||this.yy||{},this._input=M,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:b(function(){var M=this._input[0];this.yytext+=M,this.yyleng++,this.offset++,this.match+=M,this.matched+=M;var $=M.match(/(?:\r\n?|\n).*/g);return $?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),M},"input"),unput:b(function(M){var $=M.length,z=M.split(/(?:\r\n?|\n)/g);this._input=M+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-$),this.offset-=$;var q=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),z.length-1&&(this.yylineno-=z.length-1);var V=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:z?(z.length===q.length?this.yylloc.first_column:0)+q[q.length-z.length].length-z[0].length:this.yylloc.first_column-$},this.options.ranges&&(this.yylloc.range=[V[0],V[0]+this.yyleng-$]),this.yyleng=this.yytext.length,this},"unput"),more:b(function(){return this._more=!0,this},"more"),reject:b(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). +`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:b(function(M){this.unput(this.match.slice(M))},"less"),pastInput:b(function(){var M=this.matched.substr(0,this.matched.length-this.match.length);return(M.length>20?"...":"")+M.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:b(function(){var M=this.match;return M.length<20&&(M+=this._input.substr(0,20-M.length)),(M.substr(0,20)+(M.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:b(function(){var M=this.pastInput(),$=new Array(M.length+1).join("-");return M+this.upcomingInput()+` +`+$+"^"},"showPosition"),test_match:b(function(M,$){var z,q,V;if(this.options.backtrack_lexer&&(V={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(V.yylloc.range=this.yylloc.range.slice(0))),q=M[0].match(/(?:\r\n?|\n).*/g),q&&(this.yylineno+=q.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:q?q[q.length-1].length-q[q.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+M[0].length},this.yytext+=M[0],this.match+=M[0],this.matches=M,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(M[0].length),this.matched+=M[0],z=this.performAction.call(this,this.yy,this,$,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),z)return z;if(this._backtrack){for(var U in V)this[U]=V[U];return!1}return!1},"test_match"),next:b(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var M,$,z,q;this._more||(this.yytext="",this.match="");for(var V=this._currentRules(),U=0;U$[0].length)){if($=z,q=U,this.options.backtrack_lexer){if(M=this.test_match(z,V[U]),M!==!1)return M;if(this._backtrack){$=!1;continue}else return!1}else if(!this.options.flex)break}return $?(M=this.test_match($,V[q]),M!==!1?M:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. +`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:b(function(){var $=this.next();return $||this.lex()},"lex"),begin:b(function($){this.conditionStack.push($)},"begin"),popState:b(function(){var $=this.conditionStack.length-1;return $>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:b(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:b(function($){return $=this.conditionStack.length-1-Math.abs($||0),$>=0?this.conditionStack[$]:"INITIAL"},"topState"),pushState:b(function($){this.begin($)},"pushState"),stateStackSize:b(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:b(function($,z,q,V){var U=V;switch(q){case 0:break;case 1:break;case 2:return this.popState(),34;break;case 3:return this.popState(),34;break;case 4:return 34;case 5:break;case 6:return 10;case 7:return this.pushState("acc_title"),19;break;case 8:return this.popState(),"acc_title_value";break;case 9:return this.pushState("acc_descr"),21;break;case 10:return this.popState(),"acc_descr_value";break;case 11:this.pushState("acc_descr_multiline");break;case 12:this.popState();break;case 13:return"acc_descr_multiline_value";case 14:return 5;case 15:return 8;case 16:return this.pushState("axis_data"),"X_AXIS";break;case 17:return this.pushState("axis_data"),"Y_AXIS";break;case 18:return this.pushState("axis_band_data"),24;break;case 19:return 31;case 20:return this.pushState("data"),16;break;case 21:return this.pushState("data"),18;break;case 22:return this.pushState("data_inner"),24;break;case 23:return 27;case 24:return this.popState(),26;break;case 25:this.popState();break;case 26:this.pushState("string");break;case 27:this.popState();break;case 28:return"STR";case 29:return 24;case 30:return 26;case 31:return 43;case 32:return"COLON";case 33:return 44;case 34:return 28;case 35:return 45;case 36:return 46;case 37:return 48;case 38:return 50;case 39:return 47;case 40:return 41;case 41:return 49;case 42:return 42;case 43:break;case 44:return 35;case 45:return 36}},"anonymous"),rules:[/^(?:%%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:(\r?\n))/i,/^(?:(\r?\n))/i,/^(?:[\n\r]+)/i,/^(?:%%[^\n]*)/i,/^(?:title\b)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:\{)/i,/^(?:[^\}]*)/i,/^(?:xychart-beta\b)/i,/^(?:(?:vertical|horizontal))/i,/^(?:x-axis\b)/i,/^(?:y-axis\b)/i,/^(?:\[)/i,/^(?:-->)/i,/^(?:line\b)/i,/^(?:bar\b)/i,/^(?:\[)/i,/^(?:[+-]?(?:\d+(?:\.\d+)?|\.\d+))/i,/^(?:\])/i,/^(?:(?:`\) \{ this\.pushState\(md_string\); \}\n\(\?:\(\?!`"\)\.\)\+ \{ return MD_STR; \}\n\(\?:`))/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:\[)/i,/^(?:\])/i,/^(?:[A-Za-z]+)/i,/^(?::)/i,/^(?:\+)/i,/^(?:,)/i,/^(?:=)/i,/^(?:\*)/i,/^(?:#)/i,/^(?:[\_])/i,/^(?:\.)/i,/^(?:&)/i,/^(?:-)/i,/^(?:[0-9]+)/i,/^(?:\s+)/i,/^(?:;)/i,/^(?:$)/i],conditions:{data_inner:{rules:[0,1,4,5,6,7,9,11,14,15,16,17,20,21,23,24,25,26,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45],inclusive:!0},data:{rules:[0,1,3,4,5,6,7,9,11,14,15,16,17,20,21,22,25,26,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45],inclusive:!0},axis_band_data:{rules:[0,1,4,5,6,7,9,11,14,15,16,17,20,21,24,25,26,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45],inclusive:!0},axis_data:{rules:[0,1,2,4,5,6,7,9,11,14,15,16,17,18,19,20,21,23,25,26,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45],inclusive:!0},acc_descr_multiline:{rules:[12,13],inclusive:!1},acc_descr:{rules:[10],inclusive:!1},acc_title:{rules:[8],inclusive:!1},title:{rules:[],inclusive:!1},md_string:{rules:[],inclusive:!1},string:{rules:[27,28],inclusive:!1},INITIAL:{rules:[0,1,4,5,6,7,9,11,14,15,16,17,20,21,25,26,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45],inclusive:!0}}};return F})();C.lexer=N;function B(){this.yy={}}return b(B,"Parser"),B.prototype=C,C.Parser=B,new B})();TV.parser=TV;E5t=TV;b(EV,"isBarPlot");b(_V,"isBandAxisData");b(E4,"isLinearAxisData");pCe=(S4=class{constructor(e){this.parentGroup=e}getMaxDimension(e,r){if(!this.parentGroup)return{width:e.reduce((a,s)=>Math.max(s.length,a),0)*r,height:r};let n={width:0,height:0},i=this.parentGroup.append("g").attr("visibility","hidden").attr("font-size",r);for(let a of e){let s=vF(i,1,a),o=s?s.width:a.length*r,l=s?s.height:r;n.width=Math.max(n.width,o),n.height=Math.max(n.height,l)}return i.remove(),n}},b(S4,"TextDimensionCalculatorWithFont"),S4),fCe=.7,dCe=.2,mCe=(C4=class{constructor(e,r,n,i){this.axisConfig=e,this.title=r,this.textDimensionCalculator=n,this.axisThemeConfig=i,this.boundingRect={x:0,y:0,width:0,height:0},this.axisPosition="left",this.showTitle=!1,this.showLabel=!1,this.showTick=!1,this.showAxisLine=!1,this.outerPadding=0,this.titleTextHeight=0,this.labelTextHeight=0,this.range=[0,10],this.boundingRect={x:0,y:0,width:0,height:0},this.axisPosition="left"}setRange(e){this.range=e,this.axisPosition==="left"||this.axisPosition==="right"?this.boundingRect.height=e[1]-e[0]:this.boundingRect.width=e[1]-e[0],this.recalculateScale()}getRange(){return[this.range[0]+this.outerPadding,this.range[1]-this.outerPadding]}setAxisPosition(e){this.axisPosition=e,this.setRange(this.range)}getTickDistance(){let e=this.getRange();return Math.abs(e[0]-e[1])/this.getTickValues().length}getAxisOuterPadding(){return this.outerPadding}getLabelDimension(){return this.textDimensionCalculator.getMaxDimension(this.getTickValues().map(e=>e.toString()),this.axisConfig.labelFontSize)}recalculateOuterPaddingToDrawBar(){fCe*this.getTickDistance()>this.outerPadding*2&&(this.outerPadding=Math.floor(fCe*this.getTickDistance()/2)),this.recalculateScale()}calculateSpaceIfDrawnHorizontally(e){let r=e.height;if(this.axisConfig.showAxisLine&&r>this.axisConfig.axisLineWidth&&(r-=this.axisConfig.axisLineWidth,this.showAxisLine=!0),this.axisConfig.showLabel){let n=this.getLabelDimension(),i=dCe*e.width;this.outerPadding=Math.min(n.width/2,i);let a=n.height+this.axisConfig.labelPadding*2;this.labelTextHeight=n.height,a<=r&&(r-=a,this.showLabel=!0)}if(this.axisConfig.showTick&&r>=this.axisConfig.tickLength&&(this.showTick=!0,r-=this.axisConfig.tickLength),this.axisConfig.showTitle&&this.title){let n=this.textDimensionCalculator.getMaxDimension([this.title],this.axisConfig.titleFontSize),i=n.height+this.axisConfig.titlePadding*2;this.titleTextHeight=n.height,i<=r&&(r-=i,this.showTitle=!0)}this.boundingRect.width=e.width,this.boundingRect.height=e.height-r}calculateSpaceIfDrawnVertical(e){let r=e.width;if(this.axisConfig.showAxisLine&&r>this.axisConfig.axisLineWidth&&(r-=this.axisConfig.axisLineWidth,this.showAxisLine=!0),this.axisConfig.showLabel){let n=this.getLabelDimension(),i=dCe*e.height;this.outerPadding=Math.min(n.height/2,i);let a=n.width+this.axisConfig.labelPadding*2;a<=r&&(r-=a,this.showLabel=!0)}if(this.axisConfig.showTick&&r>=this.axisConfig.tickLength&&(this.showTick=!0,r-=this.axisConfig.tickLength),this.axisConfig.showTitle&&this.title){let n=this.textDimensionCalculator.getMaxDimension([this.title],this.axisConfig.titleFontSize),i=n.height+this.axisConfig.titlePadding*2;this.titleTextHeight=n.height,i<=r&&(r-=i,this.showTitle=!0)}this.boundingRect.width=e.width-r,this.boundingRect.height=e.height}calculateSpace(e){return this.axisPosition==="left"||this.axisPosition==="right"?this.calculateSpaceIfDrawnVertical(e):this.calculateSpaceIfDrawnHorizontally(e),this.recalculateScale(),{width:this.boundingRect.width,height:this.boundingRect.height}}setBoundingBoxXY(e){this.boundingRect.x=e.x,this.boundingRect.y=e.y}getDrawableElementsForLeftAxis(){let e=[];if(this.showAxisLine){let r=this.boundingRect.x+this.boundingRect.width-this.axisConfig.axisLineWidth/2;e.push({type:"path",groupTexts:["left-axis","axisl-line"],data:[{path:`M ${r},${this.boundingRect.y} L ${r},${this.boundingRect.y+this.boundingRect.height} `,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})}if(this.showLabel&&e.push({type:"text",groupTexts:["left-axis","label"],data:this.getTickValues().map(r=>({text:r.toString(),x:this.boundingRect.x+this.boundingRect.width-(this.showLabel?this.axisConfig.labelPadding:0)-(this.showTick?this.axisConfig.tickLength:0)-(this.showAxisLine?this.axisConfig.axisLineWidth:0),y:this.getScaleValue(r),fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:0,verticalPos:"middle",horizontalPos:"right"}))}),this.showTick){let r=this.boundingRect.x+this.boundingRect.width-(this.showAxisLine?this.axisConfig.axisLineWidth:0);e.push({type:"path",groupTexts:["left-axis","ticks"],data:this.getTickValues().map(n=>({path:`M ${r},${this.getScaleValue(n)} L ${r-this.axisConfig.tickLength},${this.getScaleValue(n)}`,strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth}))})}return this.showTitle&&e.push({type:"text",groupTexts:["left-axis","title"],data:[{text:this.title,x:this.boundingRect.x+this.axisConfig.titlePadding,y:this.boundingRect.y+this.boundingRect.height/2,fill:this.axisThemeConfig.titleColor,fontSize:this.axisConfig.titleFontSize,rotation:270,verticalPos:"top",horizontalPos:"center"}]}),e}getDrawableElementsForBottomAxis(){let e=[];if(this.showAxisLine){let r=this.boundingRect.y+this.axisConfig.axisLineWidth/2;e.push({type:"path",groupTexts:["bottom-axis","axis-line"],data:[{path:`M ${this.boundingRect.x},${r} L ${this.boundingRect.x+this.boundingRect.width},${r}`,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})}if(this.showLabel&&e.push({type:"text",groupTexts:["bottom-axis","label"],data:this.getTickValues().map(r=>({text:r.toString(),x:this.getScaleValue(r),y:this.boundingRect.y+this.axisConfig.labelPadding+(this.showTick?this.axisConfig.tickLength:0)+(this.showAxisLine?this.axisConfig.axisLineWidth:0),fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:0,verticalPos:"top",horizontalPos:"center"}))}),this.showTick){let r=this.boundingRect.y+(this.showAxisLine?this.axisConfig.axisLineWidth:0);e.push({type:"path",groupTexts:["bottom-axis","ticks"],data:this.getTickValues().map(n=>({path:`M ${this.getScaleValue(n)},${r} L ${this.getScaleValue(n)},${r+this.axisConfig.tickLength}`,strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth}))})}return this.showTitle&&e.push({type:"text",groupTexts:["bottom-axis","title"],data:[{text:this.title,x:this.range[0]+(this.range[1]-this.range[0])/2,y:this.boundingRect.y+this.boundingRect.height-this.axisConfig.titlePadding-this.titleTextHeight,fill:this.axisThemeConfig.titleColor,fontSize:this.axisConfig.titleFontSize,rotation:0,verticalPos:"top",horizontalPos:"center"}]}),e}getDrawableElementsForTopAxis(){let e=[];if(this.showAxisLine){let r=this.boundingRect.y+this.boundingRect.height-this.axisConfig.axisLineWidth/2;e.push({type:"path",groupTexts:["top-axis","axis-line"],data:[{path:`M ${this.boundingRect.x},${r} L ${this.boundingRect.x+this.boundingRect.width},${r}`,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})}if(this.showLabel&&e.push({type:"text",groupTexts:["top-axis","label"],data:this.getTickValues().map(r=>({text:r.toString(),x:this.getScaleValue(r),y:this.boundingRect.y+(this.showTitle?this.titleTextHeight+this.axisConfig.titlePadding*2:0)+this.axisConfig.labelPadding,fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:0,verticalPos:"top",horizontalPos:"center"}))}),this.showTick){let r=this.boundingRect.y;e.push({type:"path",groupTexts:["top-axis","ticks"],data:this.getTickValues().map(n=>({path:`M ${this.getScaleValue(n)},${r+this.boundingRect.height-(this.showAxisLine?this.axisConfig.axisLineWidth:0)} L ${this.getScaleValue(n)},${r+this.boundingRect.height-this.axisConfig.tickLength-(this.showAxisLine?this.axisConfig.axisLineWidth:0)}`,strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth}))})}return this.showTitle&&e.push({type:"text",groupTexts:["top-axis","title"],data:[{text:this.title,x:this.boundingRect.x+this.boundingRect.width/2,y:this.boundingRect.y+this.axisConfig.titlePadding,fill:this.axisThemeConfig.titleColor,fontSize:this.axisConfig.titleFontSize,rotation:0,verticalPos:"top",horizontalPos:"center"}]}),e}getDrawableElements(){if(this.axisPosition==="left")return this.getDrawableElementsForLeftAxis();if(this.axisPosition==="right")throw Error("Drawing of right axis is not implemented");return this.axisPosition==="bottom"?this.getDrawableElementsForBottomAxis():this.axisPosition==="top"?this.getDrawableElementsForTopAxis():[]}},b(C4,"BaseAxis"),C4),S5t=(_4=class extends mCe{constructor(e,r,n,i,a){super(e,i,a,r),this.categories=n,this.scale=I2().domain(this.categories).range(this.getRange())}setRange(e){super.setRange(e)}recalculateScale(){this.scale=I2().domain(this.categories).range(this.getRange()).paddingInner(1).paddingOuter(0).align(.5),he.trace("BandAxis axis final categories, range: ",this.categories,this.getRange())}getTickValues(){return this.categories}getScaleValue(e){return this.scale(e)??this.getRange()[0]}},b(_4,"BandAxis"),_4),C5t=(A4=class extends mCe{constructor(e,r,n,i,a){super(e,i,a,r),this.domain=n,this.scale=ju().domain(this.domain).range(this.getRange())}getTickValues(){return this.scale.ticks()}recalculateScale(){let e=[...this.domain];this.axisPosition==="left"&&e.reverse(),this.scale=ju().domain(e).range(this.getRange())}getScaleValue(e){return this.scale(e)}},b(A4,"LinearAxis"),A4);b(SV,"getAxis");_5t=(L4=class{constructor(e,r,n,i){this.textDimensionCalculator=e,this.chartConfig=r,this.chartData=n,this.chartThemeConfig=i,this.boundingRect={x:0,y:0,width:0,height:0},this.showChartTitle=!1}setBoundingBoxXY(e){this.boundingRect.x=e.x,this.boundingRect.y=e.y}calculateSpace(e){let r=this.textDimensionCalculator.getMaxDimension([this.chartData.title],this.chartConfig.titleFontSize),n=Math.max(r.width,e.width),i=r.height+2*this.chartConfig.titlePadding;return r.width<=n&&r.height<=i&&this.chartConfig.showTitle&&this.chartData.title&&(this.boundingRect.width=n,this.boundingRect.height=i,this.showChartTitle=!0),{width:this.boundingRect.width,height:this.boundingRect.height}}getDrawableElements(){let e=[];return this.showChartTitle&&e.push({groupTexts:["chart-title"],type:"text",data:[{fontSize:this.chartConfig.titleFontSize,text:this.chartData.title,verticalPos:"middle",horizontalPos:"center",x:this.boundingRect.x+this.boundingRect.width/2,y:this.boundingRect.y+this.boundingRect.height/2,fill:this.chartThemeConfig.titleColor,rotation:0}]}),e}},b(L4,"ChartTitle"),L4);b(gCe,"getChartTitleComponent");A5t=(R4=class{constructor(e,r,n,i,a){this.plotData=e,this.xAxis=r,this.yAxis=n,this.orientation=i,this.plotIndex=a}getDrawableElement(){let e=this.plotData.data.map(n=>[this.xAxis.getScaleValue(n[0]),this.yAxis.getScaleValue(n[1])]),r;return this.orientation==="horizontal"?r=i0().y(n=>n[0]).x(n=>n[1])(e):r=i0().x(n=>n[0]).y(n=>n[1])(e),r?[{groupTexts:["plot",`line-plot-${this.plotIndex}`],type:"path",data:[{path:r,strokeFill:this.plotData.strokeFill,strokeWidth:this.plotData.strokeWidth}]}]:[]}},b(R4,"LinePlot"),R4),L5t=(D4=class{constructor(e,r,n,i,a,s){this.barData=e,this.boundingRect=r,this.xAxis=n,this.yAxis=i,this.orientation=a,this.plotIndex=s}getDrawableElement(){let e=this.barData.data.map(a=>[this.xAxis.getScaleValue(a[0]),this.yAxis.getScaleValue(a[1])]),n=Math.min(this.xAxis.getAxisOuterPadding()*2,this.xAxis.getTickDistance())*(1-.05),i=n/2;return this.orientation==="horizontal"?[{groupTexts:["plot",`bar-plot-${this.plotIndex}`],type:"rect",data:e.map(a=>({x:this.boundingRect.x,y:a[0]-i,height:n,width:a[1]-this.boundingRect.x,fill:this.barData.fill,strokeWidth:0,strokeFill:this.barData.fill}))}]:[{groupTexts:["plot",`bar-plot-${this.plotIndex}`],type:"rect",data:e.map(a=>({x:a[0]-i,y:a[1],width:n,height:this.boundingRect.y+this.boundingRect.height-a[1],fill:this.barData.fill,strokeWidth:0,strokeFill:this.barData.fill}))}]}},b(D4,"BarPlot"),D4),R5t=(I4=class{constructor(e,r,n){this.chartConfig=e,this.chartData=r,this.chartThemeConfig=n,this.boundingRect={x:0,y:0,width:0,height:0}}setAxes(e,r){this.xAxis=e,this.yAxis=r}setBoundingBoxXY(e){this.boundingRect.x=e.x,this.boundingRect.y=e.y}calculateSpace(e){return this.boundingRect.width=e.width,this.boundingRect.height=e.height,{width:this.boundingRect.width,height:this.boundingRect.height}}getDrawableElements(){if(!(this.xAxis&&this.yAxis))throw Error("Axes must be passed to render Plots");let e=[];for(let[r,n]of this.chartData.plots.entries())switch(n.type){case"line":{let i=new A5t(n,this.xAxis,this.yAxis,this.chartConfig.chartOrientation,r);e.push(...i.getDrawableElement())}break;case"bar":{let i=new L5t(n,this.boundingRect,this.xAxis,this.yAxis,this.chartConfig.chartOrientation,r);e.push(...i.getDrawableElement())}break}return e}},b(I4,"BasePlot"),I4);b(yCe,"getPlotComponent");D5t=(M4=class{constructor(e,r,n,i){this.chartConfig=e,this.chartData=r,this.componentStore={title:gCe(e,r,n,i),plot:yCe(e,r,n),xAxis:SV(r.xAxis,e.xAxis,{titleColor:n.xAxisTitleColor,labelColor:n.xAxisLabelColor,tickColor:n.xAxisTickColor,axisLineColor:n.xAxisLineColor},i),yAxis:SV(r.yAxis,e.yAxis,{titleColor:n.yAxisTitleColor,labelColor:n.yAxisLabelColor,tickColor:n.yAxisTickColor,axisLineColor:n.yAxisLineColor},i)}}calculateVerticalSpace(){let e=this.chartConfig.width,r=this.chartConfig.height,n=0,i=0,a=Math.floor(e*this.chartConfig.plotReservedSpacePercent/100),s=Math.floor(r*this.chartConfig.plotReservedSpacePercent/100),o=this.componentStore.plot.calculateSpace({width:a,height:s});e-=o.width,r-=o.height,o=this.componentStore.title.calculateSpace({width:this.chartConfig.width,height:r}),i=o.height,r-=o.height,this.componentStore.xAxis.setAxisPosition("bottom"),o=this.componentStore.xAxis.calculateSpace({width:e,height:r}),r-=o.height,this.componentStore.yAxis.setAxisPosition("left"),o=this.componentStore.yAxis.calculateSpace({width:e,height:r}),n=o.width,e-=o.width,e>0&&(a+=e,e=0),r>0&&(s+=r,r=0),this.componentStore.plot.calculateSpace({width:a,height:s}),this.componentStore.plot.setBoundingBoxXY({x:n,y:i}),this.componentStore.xAxis.setRange([n,n+a]),this.componentStore.xAxis.setBoundingBoxXY({x:n,y:i+s}),this.componentStore.yAxis.setRange([i,i+s]),this.componentStore.yAxis.setBoundingBoxXY({x:0,y:i}),this.chartData.plots.some(l=>EV(l))&&this.componentStore.xAxis.recalculateOuterPaddingToDrawBar()}calculateHorizontalSpace(){let e=this.chartConfig.width,r=this.chartConfig.height,n=0,i=0,a=0,s=Math.floor(e*this.chartConfig.plotReservedSpacePercent/100),o=Math.floor(r*this.chartConfig.plotReservedSpacePercent/100),l=this.componentStore.plot.calculateSpace({width:s,height:o});e-=l.width,r-=l.height,l=this.componentStore.title.calculateSpace({width:this.chartConfig.width,height:r}),n=l.height,r-=l.height,this.componentStore.xAxis.setAxisPosition("left"),l=this.componentStore.xAxis.calculateSpace({width:e,height:r}),e-=l.width,i=l.width,this.componentStore.yAxis.setAxisPosition("top"),l=this.componentStore.yAxis.calculateSpace({width:e,height:r}),r-=l.height,a=n+l.height,e>0&&(s+=e,e=0),r>0&&(o+=r,r=0),this.componentStore.plot.calculateSpace({width:s,height:o}),this.componentStore.plot.setBoundingBoxXY({x:i,y:a}),this.componentStore.yAxis.setRange([i,i+s]),this.componentStore.yAxis.setBoundingBoxXY({x:i,y:n}),this.componentStore.xAxis.setRange([a,a+o]),this.componentStore.xAxis.setBoundingBoxXY({x:0,y:a}),this.chartData.plots.some(u=>EV(u))&&this.componentStore.xAxis.recalculateOuterPaddingToDrawBar()}calculateSpace(){this.chartConfig.chartOrientation==="horizontal"?this.calculateHorizontalSpace():this.calculateVerticalSpace()}getDrawableElement(){this.calculateSpace();let e=[];this.componentStore.plot.setAxes(this.componentStore.xAxis,this.componentStore.yAxis);for(let r of Object.values(this.componentStore))e.push(...r.getDrawableElements());return e}},b(M4,"Orchestrator"),M4),I5t=(N4=class{static build(e,r,n,i){return new D5t(e,r,n,i).getDrawableElement()}},b(N4,"XYChartBuilder"),N4),x8=0,b8=RV(),w8=LV(),Gn=DV(),CV=w8.plotColorPalette.split(",").map(t=>t.trim()),FL=!1,AV=!1;b(LV,"getChartDefaultThemeConfig");b(RV,"getChartDefaultConfig");b(DV,"getChartDefaultData");b(zL,"textSanitizer");b(xCe,"setTmpSVGG");b(bCe,"setOrientation");b(wCe,"setXAxisTitle");b(IV,"setXAxisRangeData");b(kCe,"setXAxisBand");b(TCe,"setYAxisTitle");b(ECe,"setYAxisRangeData");b(SCe,"setYAxisRangeFromPlotData");b(MV,"transformDataWithoutCategory");b(NV,"getPlotColorFromPalette");b(CCe,"setLineData");b(_Ce,"setBarData");b(ACe,"getDrawableElem");b(LCe,"getChartThemeConfig");b(RCe,"getChartConfig");M5t=b(function(){Jr(),x8=0,b8=RV(),Gn=DV(),w8=LV(),CV=w8.plotColorPalette.split(",").map(t=>t.trim()),FL=!1,AV=!1},"clear"),N5t={getDrawableElem:ACe,clear:M5t,setAccTitle:en,getAccTitle:tn,setDiagramTitle:pn,getDiagramTitle:an,getAccDescription:nn,setAccDescription:rn,setOrientation:bCe,setXAxisTitle:wCe,setXAxisRangeData:IV,setXAxisBand:kCe,setYAxisTitle:TCe,setYAxisRangeData:ECe,setLineData:CCe,setBarData:_Ce,setTmpSVGG:xCe,getChartThemeConfig:LCe,getChartConfig:RCe},O5t=b((t,e,r,n)=>{let i=n.db,a=i.getChartThemeConfig(),s=i.getChartConfig();function o(y){return y==="top"?"text-before-edge":"middle"}b(o,"getDominantBaseLine");function l(y){return y==="left"?"start":y==="right"?"end":"middle"}b(l,"getTextAnchor");function u(y){return`translate(${y.x}, ${y.y}) rotate(${y.rotation||0})`}b(u,"getTextTransformation"),he.debug(`Rendering xychart chart +`+t);let h=cs(e),f=h.append("g").attr("class","main"),d=f.append("rect").attr("width",s.width).attr("height",s.height).attr("class","background");ei(h,s.height,s.width,!0),h.attr("viewBox",`0 0 ${s.width} ${s.height}`),d.attr("fill",a.backgroundColor),i.setTmpSVGG(h.append("g").attr("class","mermaid-tmp-group"));let p=i.getDrawableElem(),m={};function g(y){let v=f,x="";for(let[k]of y.entries()){let _=f;k>0&&m[x]&&(_=m[x]),x+=y[k],v=m[x],v||(v=m[x]=_.append("g").attr("class",y[k]))}return v}b(g,"getGroup");for(let y of p){if(y.data.length===0)continue;let v=g(y.groupTexts);switch(y.type){case"rect":v.selectAll("rect").data(y.data).enter().append("rect").attr("x",x=>x.x).attr("y",x=>x.y).attr("width",x=>x.width).attr("height",x=>x.height).attr("fill",x=>x.fill).attr("stroke",x=>x.strokeFill).attr("stroke-width",x=>x.strokeWidth);break;case"text":v.selectAll("text").data(y.data).enter().append("text").attr("x",0).attr("y",0).attr("fill",x=>x.fill).attr("font-size",x=>x.fontSize).attr("dominant-baseline",x=>o(x.verticalPos)).attr("text-anchor",x=>l(x.horizontalPos)).attr("transform",x=>u(x)).text(x=>x.text);break;case"path":v.selectAll("path").data(y.data).enter().append("path").attr("d",x=>x.path).attr("fill",x=>x.fill?x.fill:"none").attr("stroke",x=>x.strokeFill).attr("stroke-width",x=>x.strokeWidth);break}}},"draw"),P5t={draw:O5t},B5t={parser:E5t,db:N5t,renderer:P5t}});var NCe={};Mr(NCe,{diagram:()=>U5t});var OV,F5t,O4,z5t,$5t,G5t,MCe,q5t,U5t,OCe=D(()=>{E0();ac();nc();iu();Il();Wo();Al();As();Hn();Nr();OV=(function(){var t=b(function(ke,xe,H,ve){for(H=H||{},ve=ke.length;ve--;H[ke[ve]]=xe);return H},"o"),e=[1,3],r=[1,4],n=[1,5],i=[1,6],a=[5,6,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,77,89,90],s=[1,22],o=[2,7],l=[1,26],u=[1,27],h=[1,28],f=[1,29],d=[1,33],p=[1,34],m=[1,35],g=[1,36],y=[1,37],v=[1,38],x=[1,24],k=[1,31],_=[1,32],T=[1,30],S=[1,39],R=[1,40],A=[5,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,77,89,90],I=[1,61],P=[89,90],O=[5,8,9,11,13,21,22,23,24,27,29,41,42,43,44,45,46,54,61,63,72,74,75,76,77,80,81,82,83,84,85,86,87,88,89,90],C=[27,29],N=[1,70],B=[1,71],F=[1,72],M=[1,73],$=[1,74],z=[1,75],q=[1,76],V=[1,83],U=[1,80],J=[1,84],se=[1,85],re=[1,86],me=[1,87],ge=[1,88],ye=[1,89],_e=[1,90],ue=[1,91],ie=[1,92],le=[5,8,9,11,13,21,22,23,24,27,41,42,43,44,45,46,54,72,74,75,76,77,80,81,82,83,84,85,86,87,88,89,90],oe=[63,64],ne=[1,101],pe=[5,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,76,77,89,90],te=[5,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,75,76,77,80,81,82,83,84,85,86,87,88,89,90],He=[1,110],de=[1,106],ce=[1,107],st=[1,108],Ae=[1,109],Ye=[1,111],Ge=[1,116],rt=[1,117],Xe=[1,114],Ze=[1,115],Pe={trace:b(function(){},"trace"),yy:{},symbols_:{error:2,start:3,directive:4,NEWLINE:5,RD:6,diagram:7,EOF:8,acc_title:9,acc_title_value:10,acc_descr:11,acc_descr_value:12,acc_descr_multiline_value:13,requirementDef:14,elementDef:15,relationshipDef:16,direction:17,styleStatement:18,classDefStatement:19,classStatement:20,direction_tb:21,direction_bt:22,direction_rl:23,direction_lr:24,requirementType:25,requirementName:26,STRUCT_START:27,requirementBody:28,STYLE_SEPARATOR:29,idList:30,ID:31,COLONSEP:32,id:33,TEXT:34,text:35,RISK:36,riskLevel:37,VERIFYMTHD:38,verifyType:39,STRUCT_STOP:40,REQUIREMENT:41,FUNCTIONAL_REQUIREMENT:42,INTERFACE_REQUIREMENT:43,PERFORMANCE_REQUIREMENT:44,PHYSICAL_REQUIREMENT:45,DESIGN_CONSTRAINT:46,LOW_RISK:47,MED_RISK:48,HIGH_RISK:49,VERIFY_ANALYSIS:50,VERIFY_DEMONSTRATION:51,VERIFY_INSPECTION:52,VERIFY_TEST:53,ELEMENT:54,elementName:55,elementBody:56,TYPE:57,type:58,DOCREF:59,ref:60,END_ARROW_L:61,relationship:62,LINE:63,END_ARROW_R:64,CONTAINS:65,COPIES:66,DERIVES:67,SATISFIES:68,VERIFIES:69,REFINES:70,TRACES:71,CLASSDEF:72,stylesOpt:73,CLASS:74,ALPHA:75,COMMA:76,STYLE:77,style:78,styleComponent:79,NUM:80,COLON:81,UNIT:82,SPACE:83,BRKT:84,PCT:85,MINUS:86,LABEL:87,SEMICOLON:88,unqString:89,qString:90,$accept:0,$end:1},terminals_:{2:"error",5:"NEWLINE",6:"RD",8:"EOF",9:"acc_title",10:"acc_title_value",11:"acc_descr",12:"acc_descr_value",13:"acc_descr_multiline_value",21:"direction_tb",22:"direction_bt",23:"direction_rl",24:"direction_lr",27:"STRUCT_START",29:"STYLE_SEPARATOR",31:"ID",32:"COLONSEP",34:"TEXT",36:"RISK",38:"VERIFYMTHD",40:"STRUCT_STOP",41:"REQUIREMENT",42:"FUNCTIONAL_REQUIREMENT",43:"INTERFACE_REQUIREMENT",44:"PERFORMANCE_REQUIREMENT",45:"PHYSICAL_REQUIREMENT",46:"DESIGN_CONSTRAINT",47:"LOW_RISK",48:"MED_RISK",49:"HIGH_RISK",50:"VERIFY_ANALYSIS",51:"VERIFY_DEMONSTRATION",52:"VERIFY_INSPECTION",53:"VERIFY_TEST",54:"ELEMENT",57:"TYPE",59:"DOCREF",61:"END_ARROW_L",63:"LINE",64:"END_ARROW_R",65:"CONTAINS",66:"COPIES",67:"DERIVES",68:"SATISFIES",69:"VERIFIES",70:"REFINES",71:"TRACES",72:"CLASSDEF",74:"CLASS",75:"ALPHA",76:"COMMA",77:"STYLE",80:"NUM",81:"COLON",82:"UNIT",83:"SPACE",84:"BRKT",85:"PCT",86:"MINUS",87:"LABEL",88:"SEMICOLON",89:"unqString",90:"qString"},productions_:[0,[3,3],[3,2],[3,4],[4,2],[4,2],[4,1],[7,0],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[17,1],[17,1],[17,1],[17,1],[14,5],[14,7],[28,5],[28,5],[28,5],[28,5],[28,2],[28,1],[25,1],[25,1],[25,1],[25,1],[25,1],[25,1],[37,1],[37,1],[37,1],[39,1],[39,1],[39,1],[39,1],[15,5],[15,7],[56,5],[56,5],[56,2],[56,1],[16,5],[16,5],[62,1],[62,1],[62,1],[62,1],[62,1],[62,1],[62,1],[19,3],[20,3],[20,3],[30,1],[30,3],[30,1],[30,3],[18,3],[73,1],[73,3],[78,1],[78,2],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[26,1],[26,1],[33,1],[33,1],[35,1],[35,1],[55,1],[55,1],[58,1],[58,1],[60,1],[60,1]],performAction:b(function(xe,H,ve,K,we,Ee,Ke){var Be=Ee.length-1;switch(we){case 4:this.$=Ee[Be].trim(),K.setAccTitle(this.$);break;case 5:case 6:this.$=Ee[Be].trim(),K.setAccDescription(this.$);break;case 7:this.$=[];break;case 17:K.setDirection("TB");break;case 18:K.setDirection("BT");break;case 19:K.setDirection("RL");break;case 20:K.setDirection("LR");break;case 21:K.addRequirement(Ee[Be-3],Ee[Be-4]);break;case 22:K.addRequirement(Ee[Be-5],Ee[Be-6]),K.setClass([Ee[Be-5]],Ee[Be-3]);break;case 23:K.setNewReqId(Ee[Be-2]);break;case 24:K.setNewReqText(Ee[Be-2]);break;case 25:K.setNewReqRisk(Ee[Be-2]);break;case 26:K.setNewReqVerifyMethod(Ee[Be-2]);break;case 29:this.$=K.RequirementType.REQUIREMENT;break;case 30:this.$=K.RequirementType.FUNCTIONAL_REQUIREMENT;break;case 31:this.$=K.RequirementType.INTERFACE_REQUIREMENT;break;case 32:this.$=K.RequirementType.PERFORMANCE_REQUIREMENT;break;case 33:this.$=K.RequirementType.PHYSICAL_REQUIREMENT;break;case 34:this.$=K.RequirementType.DESIGN_CONSTRAINT;break;case 35:this.$=K.RiskLevel.LOW_RISK;break;case 36:this.$=K.RiskLevel.MED_RISK;break;case 37:this.$=K.RiskLevel.HIGH_RISK;break;case 38:this.$=K.VerifyType.VERIFY_ANALYSIS;break;case 39:this.$=K.VerifyType.VERIFY_DEMONSTRATION;break;case 40:this.$=K.VerifyType.VERIFY_INSPECTION;break;case 41:this.$=K.VerifyType.VERIFY_TEST;break;case 42:K.addElement(Ee[Be-3]);break;case 43:K.addElement(Ee[Be-5]),K.setClass([Ee[Be-5]],Ee[Be-3]);break;case 44:K.setNewElementType(Ee[Be-2]);break;case 45:K.setNewElementDocRef(Ee[Be-2]);break;case 48:K.addRelationship(Ee[Be-2],Ee[Be],Ee[Be-4]);break;case 49:K.addRelationship(Ee[Be-2],Ee[Be-4],Ee[Be]);break;case 50:this.$=K.Relationships.CONTAINS;break;case 51:this.$=K.Relationships.COPIES;break;case 52:this.$=K.Relationships.DERIVES;break;case 53:this.$=K.Relationships.SATISFIES;break;case 54:this.$=K.Relationships.VERIFIES;break;case 55:this.$=K.Relationships.REFINES;break;case 56:this.$=K.Relationships.TRACES;break;case 57:this.$=Ee[Be-2],K.defineClass(Ee[Be-1],Ee[Be]);break;case 58:K.setClass(Ee[Be-1],Ee[Be]);break;case 59:K.setClass([Ee[Be-2]],Ee[Be]);break;case 60:case 62:this.$=[Ee[Be]];break;case 61:case 63:this.$=Ee[Be-2].concat([Ee[Be]]);break;case 64:this.$=Ee[Be-2],K.setCssStyle(Ee[Be-1],Ee[Be]);break;case 65:this.$=[Ee[Be]];break;case 66:Ee[Be-2].push(Ee[Be]),this.$=Ee[Be-2];break;case 68:this.$=Ee[Be-1]+Ee[Be];break}},"anonymous"),table:[{3:1,4:2,6:e,9:r,11:n,13:i},{1:[3]},{3:8,4:2,5:[1,7],6:e,9:r,11:n,13:i},{5:[1,9]},{10:[1,10]},{12:[1,11]},t(a,[2,6]),{3:12,4:2,6:e,9:r,11:n,13:i},{1:[2,2]},{4:17,5:s,7:13,8:o,9:r,11:n,13:i,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:l,22:u,23:h,24:f,25:23,33:25,41:d,42:p,43:m,44:g,45:y,46:v,54:x,72:k,74:_,77:T,89:S,90:R},t(a,[2,4]),t(a,[2,5]),{1:[2,1]},{8:[1,41]},{4:17,5:s,7:42,8:o,9:r,11:n,13:i,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:l,22:u,23:h,24:f,25:23,33:25,41:d,42:p,43:m,44:g,45:y,46:v,54:x,72:k,74:_,77:T,89:S,90:R},{4:17,5:s,7:43,8:o,9:r,11:n,13:i,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:l,22:u,23:h,24:f,25:23,33:25,41:d,42:p,43:m,44:g,45:y,46:v,54:x,72:k,74:_,77:T,89:S,90:R},{4:17,5:s,7:44,8:o,9:r,11:n,13:i,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:l,22:u,23:h,24:f,25:23,33:25,41:d,42:p,43:m,44:g,45:y,46:v,54:x,72:k,74:_,77:T,89:S,90:R},{4:17,5:s,7:45,8:o,9:r,11:n,13:i,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:l,22:u,23:h,24:f,25:23,33:25,41:d,42:p,43:m,44:g,45:y,46:v,54:x,72:k,74:_,77:T,89:S,90:R},{4:17,5:s,7:46,8:o,9:r,11:n,13:i,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:l,22:u,23:h,24:f,25:23,33:25,41:d,42:p,43:m,44:g,45:y,46:v,54:x,72:k,74:_,77:T,89:S,90:R},{4:17,5:s,7:47,8:o,9:r,11:n,13:i,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:l,22:u,23:h,24:f,25:23,33:25,41:d,42:p,43:m,44:g,45:y,46:v,54:x,72:k,74:_,77:T,89:S,90:R},{4:17,5:s,7:48,8:o,9:r,11:n,13:i,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:l,22:u,23:h,24:f,25:23,33:25,41:d,42:p,43:m,44:g,45:y,46:v,54:x,72:k,74:_,77:T,89:S,90:R},{4:17,5:s,7:49,8:o,9:r,11:n,13:i,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:l,22:u,23:h,24:f,25:23,33:25,41:d,42:p,43:m,44:g,45:y,46:v,54:x,72:k,74:_,77:T,89:S,90:R},{4:17,5:s,7:50,8:o,9:r,11:n,13:i,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:l,22:u,23:h,24:f,25:23,33:25,41:d,42:p,43:m,44:g,45:y,46:v,54:x,72:k,74:_,77:T,89:S,90:R},{26:51,89:[1,52],90:[1,53]},{55:54,89:[1,55],90:[1,56]},{29:[1,59],61:[1,57],63:[1,58]},t(A,[2,17]),t(A,[2,18]),t(A,[2,19]),t(A,[2,20]),{30:60,33:62,75:I,89:S,90:R},{30:63,33:62,75:I,89:S,90:R},{30:64,33:62,75:I,89:S,90:R},t(P,[2,29]),t(P,[2,30]),t(P,[2,31]),t(P,[2,32]),t(P,[2,33]),t(P,[2,34]),t(O,[2,81]),t(O,[2,82]),{1:[2,3]},{8:[2,8]},{8:[2,9]},{8:[2,10]},{8:[2,11]},{8:[2,12]},{8:[2,13]},{8:[2,14]},{8:[2,15]},{8:[2,16]},{27:[1,65],29:[1,66]},t(C,[2,79]),t(C,[2,80]),{27:[1,67],29:[1,68]},t(C,[2,85]),t(C,[2,86]),{62:69,65:N,66:B,67:F,68:M,69:$,70:z,71:q},{62:77,65:N,66:B,67:F,68:M,69:$,70:z,71:q},{30:78,33:62,75:I,89:S,90:R},{73:79,75:V,76:U,78:81,79:82,80:J,81:se,82:re,83:me,84:ge,85:ye,86:_e,87:ue,88:ie},t(le,[2,60]),t(le,[2,62]),{73:93,75:V,76:U,78:81,79:82,80:J,81:se,82:re,83:me,84:ge,85:ye,86:_e,87:ue,88:ie},{30:94,33:62,75:I,76:U,89:S,90:R},{5:[1,95]},{30:96,33:62,75:I,89:S,90:R},{5:[1,97]},{30:98,33:62,75:I,89:S,90:R},{63:[1,99]},t(oe,[2,50]),t(oe,[2,51]),t(oe,[2,52]),t(oe,[2,53]),t(oe,[2,54]),t(oe,[2,55]),t(oe,[2,56]),{64:[1,100]},t(A,[2,59],{76:U}),t(A,[2,64],{76:ne}),{33:103,75:[1,102],89:S,90:R},t(pe,[2,65],{79:104,75:V,80:J,81:se,82:re,83:me,84:ge,85:ye,86:_e,87:ue,88:ie}),t(te,[2,67]),t(te,[2,69]),t(te,[2,70]),t(te,[2,71]),t(te,[2,72]),t(te,[2,73]),t(te,[2,74]),t(te,[2,75]),t(te,[2,76]),t(te,[2,77]),t(te,[2,78]),t(A,[2,57],{76:ne}),t(A,[2,58],{76:U}),{5:He,28:105,31:de,34:ce,36:st,38:Ae,40:Ye},{27:[1,112],76:U},{5:Ge,40:rt,56:113,57:Xe,59:Ze},{27:[1,118],76:U},{33:119,89:S,90:R},{33:120,89:S,90:R},{75:V,78:121,79:82,80:J,81:se,82:re,83:me,84:ge,85:ye,86:_e,87:ue,88:ie},t(le,[2,61]),t(le,[2,63]),t(te,[2,68]),t(A,[2,21]),{32:[1,122]},{32:[1,123]},{32:[1,124]},{32:[1,125]},{5:He,28:126,31:de,34:ce,36:st,38:Ae,40:Ye},t(A,[2,28]),{5:[1,127]},t(A,[2,42]),{32:[1,128]},{32:[1,129]},{5:Ge,40:rt,56:130,57:Xe,59:Ze},t(A,[2,47]),{5:[1,131]},t(A,[2,48]),t(A,[2,49]),t(pe,[2,66],{79:104,75:V,80:J,81:se,82:re,83:me,84:ge,85:ye,86:_e,87:ue,88:ie}),{33:132,89:S,90:R},{35:133,89:[1,134],90:[1,135]},{37:136,47:[1,137],48:[1,138],49:[1,139]},{39:140,50:[1,141],51:[1,142],52:[1,143],53:[1,144]},t(A,[2,27]),{5:He,28:145,31:de,34:ce,36:st,38:Ae,40:Ye},{58:146,89:[1,147],90:[1,148]},{60:149,89:[1,150],90:[1,151]},t(A,[2,46]),{5:Ge,40:rt,56:152,57:Xe,59:Ze},{5:[1,153]},{5:[1,154]},{5:[2,83]},{5:[2,84]},{5:[1,155]},{5:[2,35]},{5:[2,36]},{5:[2,37]},{5:[1,156]},{5:[2,38]},{5:[2,39]},{5:[2,40]},{5:[2,41]},t(A,[2,22]),{5:[1,157]},{5:[2,87]},{5:[2,88]},{5:[1,158]},{5:[2,89]},{5:[2,90]},t(A,[2,43]),{5:He,28:159,31:de,34:ce,36:st,38:Ae,40:Ye},{5:He,28:160,31:de,34:ce,36:st,38:Ae,40:Ye},{5:He,28:161,31:de,34:ce,36:st,38:Ae,40:Ye},{5:He,28:162,31:de,34:ce,36:st,38:Ae,40:Ye},{5:Ge,40:rt,56:163,57:Xe,59:Ze},{5:Ge,40:rt,56:164,57:Xe,59:Ze},t(A,[2,23]),t(A,[2,24]),t(A,[2,25]),t(A,[2,26]),t(A,[2,44]),t(A,[2,45])],defaultActions:{8:[2,2],12:[2,1],41:[2,3],42:[2,8],43:[2,9],44:[2,10],45:[2,11],46:[2,12],47:[2,13],48:[2,14],49:[2,15],50:[2,16],134:[2,83],135:[2,84],137:[2,35],138:[2,36],139:[2,37],141:[2,38],142:[2,39],143:[2,40],144:[2,41],147:[2,87],148:[2,88],150:[2,89],151:[2,90]},parseError:b(function(xe,H){if(H.recoverable)this.trace(xe);else{var ve=new Error(xe);throw ve.hash=H,ve}},"parseError"),parse:b(function(xe){var H=this,ve=[0],K=[],we=[null],Ee=[],Ke=this.table,Be="",De=0,nt=0,We=0,ut=2,vt=1,gt=Ee.slice.call(arguments,1),mt=Object.create(this.lexer),ft={yy:{}};for(var Dt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Dt)&&(ft.yy[Dt]=this.yy[Dt]);mt.setInput(xe,ft.yy),ft.yy.lexer=mt,ft.yy.parser=this,typeof mt.yylloc>"u"&&(mt.yylloc={});var ht=mt.yylloc;Ee.push(ht);var yt=mt.options&&mt.options.ranges;typeof ft.yy.parseError=="function"?this.parseError=ft.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function W(kr){ve.length=ve.length-2*kr,we.length=we.length-kr,Ee.length=Ee.length-kr}b(W,"popStack");function j(){var kr;return kr=K.pop()||mt.lex()||vt,typeof kr!="number"&&(kr instanceof Array&&(K=kr,kr=K.pop()),kr=H.symbols_[kr]||kr),kr}b(j,"lex");for(var Je,ee,Te,bt,at,It,At={},Ut,Bt,Kt,vr;;){if(Te=ve[ve.length-1],this.defaultActions[Te]?bt=this.defaultActions[Te]:((Je===null||typeof Je>"u")&&(Je=j()),bt=Ke[Te]&&Ke[Te][Je]),typeof bt>"u"||!bt.length||!bt[0]){var Me="";vr=[];for(Ut in Ke[Te])this.terminals_[Ut]&&Ut>ut&&vr.push("'"+this.terminals_[Ut]+"'");mt.showPosition?Me="Parse error on line "+(De+1)+`: +`+mt.showPosition()+` +Expecting `+vr.join(", ")+", got '"+(this.terminals_[Je]||Je)+"'":Me="Parse error on line "+(De+1)+": Unexpected "+(Je==vt?"end of input":"'"+(this.terminals_[Je]||Je)+"'"),this.parseError(Me,{text:mt.match,token:this.terminals_[Je]||Je,line:mt.yylineno,loc:ht,expected:vr})}if(bt[0]instanceof Array&&bt.length>1)throw new Error("Parse Error: multiple actions possible at state: "+Te+", token: "+Je);switch(bt[0]){case 1:ve.push(Je),we.push(mt.yytext),Ee.push(mt.yylloc),ve.push(bt[1]),Je=null,ee?(Je=ee,ee=null):(nt=mt.yyleng,Be=mt.yytext,De=mt.yylineno,ht=mt.yylloc,We>0&&We--);break;case 2:if(Bt=this.productions_[bt[1]][1],At.$=we[we.length-Bt],At._$={first_line:Ee[Ee.length-(Bt||1)].first_line,last_line:Ee[Ee.length-1].last_line,first_column:Ee[Ee.length-(Bt||1)].first_column,last_column:Ee[Ee.length-1].last_column},yt&&(At._$.range=[Ee[Ee.length-(Bt||1)].range[0],Ee[Ee.length-1].range[1]]),It=this.performAction.apply(At,[Be,nt,De,ft.yy,bt[1],we,Ee].concat(gt)),typeof It<"u")return It;Bt&&(ve=ve.slice(0,-1*Bt*2),we=we.slice(0,-1*Bt),Ee=Ee.slice(0,-1*Bt)),ve.push(this.productions_[bt[1]][0]),we.push(At.$),Ee.push(At._$),Kt=Ke[ve[ve.length-2]][ve[ve.length-1]],ve.push(Kt);break;case 3:return!0}}return!0},"parse")},Re=(function(){var ke={EOF:1,parseError:b(function(H,ve){if(this.yy.parser)this.yy.parser.parseError(H,ve);else throw new Error(H)},"parseError"),setInput:b(function(xe,H){return this.yy=H||this.yy||{},this._input=xe,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:b(function(){var xe=this._input[0];this.yytext+=xe,this.yyleng++,this.offset++,this.match+=xe,this.matched+=xe;var H=xe.match(/(?:\r\n?|\n).*/g);return H?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),xe},"input"),unput:b(function(xe){var H=xe.length,ve=xe.split(/(?:\r\n?|\n)/g);this._input=xe+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-H),this.offset-=H;var K=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),ve.length-1&&(this.yylineno-=ve.length-1);var we=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:ve?(ve.length===K.length?this.yylloc.first_column:0)+K[K.length-ve.length].length-ve[0].length:this.yylloc.first_column-H},this.options.ranges&&(this.yylloc.range=[we[0],we[0]+this.yyleng-H]),this.yyleng=this.yytext.length,this},"unput"),more:b(function(){return this._more=!0,this},"more"),reject:b(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). +`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:b(function(xe){this.unput(this.match.slice(xe))},"less"),pastInput:b(function(){var xe=this.matched.substr(0,this.matched.length-this.match.length);return(xe.length>20?"...":"")+xe.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:b(function(){var xe=this.match;return xe.length<20&&(xe+=this._input.substr(0,20-xe.length)),(xe.substr(0,20)+(xe.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:b(function(){var xe=this.pastInput(),H=new Array(xe.length+1).join("-");return xe+this.upcomingInput()+` +`+H+"^"},"showPosition"),test_match:b(function(xe,H){var ve,K,we;if(this.options.backtrack_lexer&&(we={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(we.yylloc.range=this.yylloc.range.slice(0))),K=xe[0].match(/(?:\r\n?|\n).*/g),K&&(this.yylineno+=K.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:K?K[K.length-1].length-K[K.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+xe[0].length},this.yytext+=xe[0],this.match+=xe[0],this.matches=xe,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(xe[0].length),this.matched+=xe[0],ve=this.performAction.call(this,this.yy,this,H,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),ve)return ve;if(this._backtrack){for(var Ee in we)this[Ee]=we[Ee];return!1}return!1},"test_match"),next:b(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var xe,H,ve,K;this._more||(this.yytext="",this.match="");for(var we=this._currentRules(),Ee=0;EeH[0].length)){if(H=ve,K=Ee,this.options.backtrack_lexer){if(xe=this.test_match(ve,we[Ee]),xe!==!1)return xe;if(this._backtrack){H=!1;continue}else return!1}else if(!this.options.flex)break}return H?(xe=this.test_match(H,we[K]),xe!==!1?xe:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. +`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:b(function(){var H=this.next();return H||this.lex()},"lex"),begin:b(function(H){this.conditionStack.push(H)},"begin"),popState:b(function(){var H=this.conditionStack.length-1;return H>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:b(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:b(function(H){return H=this.conditionStack.length-1-Math.abs(H||0),H>=0?this.conditionStack[H]:"INITIAL"},"topState"),pushState:b(function(H){this.begin(H)},"pushState"),stateStackSize:b(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:b(function(H,ve,K,we){var Ee=we;switch(K){case 0:return"title";case 1:return this.begin("acc_title"),9;break;case 2:return this.popState(),"acc_title_value";break;case 3:return this.begin("acc_descr"),11;break;case 4:return this.popState(),"acc_descr_value";break;case 5:this.begin("acc_descr_multiline");break;case 6:this.popState();break;case 7:return"acc_descr_multiline_value";case 8:return 21;case 9:return 22;case 10:return 23;case 11:return 24;case 12:return 5;case 13:break;case 14:break;case 15:break;case 16:return 8;case 17:return 6;case 18:return 27;case 19:return 40;case 20:return 29;case 21:return 32;case 22:return 31;case 23:return 34;case 24:return 36;case 25:return 38;case 26:return 41;case 27:return 42;case 28:return 43;case 29:return 44;case 30:return 45;case 31:return 46;case 32:return 47;case 33:return 48;case 34:return 49;case 35:return 50;case 36:return 51;case 37:return 52;case 38:return 53;case 39:return 54;case 40:return 65;case 41:return 66;case 42:return 67;case 43:return 68;case 44:return 69;case 45:return 70;case 46:return 71;case 47:return 57;case 48:return 59;case 49:return this.begin("style"),77;break;case 50:return 75;case 51:return 81;case 52:return 88;case 53:return"PERCENT";case 54:return 86;case 55:return 84;case 56:break;case 57:this.begin("string");break;case 58:this.popState();break;case 59:return this.begin("style"),72;break;case 60:return this.begin("style"),74;break;case 61:return 61;case 62:return 64;case 63:return 63;case 64:this.begin("string");break;case 65:this.popState();break;case 66:return"qString";case 67:return ve.yytext=ve.yytext.trim(),89;break;case 68:return 75;case 69:return 80;case 70:return 76}},"anonymous"),rules:[/^(?:title\s[^#\n;]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:.*direction\s+TB[^\n]*)/i,/^(?:.*direction\s+BT[^\n]*)/i,/^(?:.*direction\s+RL[^\n]*)/i,/^(?:.*direction\s+LR[^\n]*)/i,/^(?:(\r?\n)+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:%[^\n]*)/i,/^(?:$)/i,/^(?:requirementDiagram\b)/i,/^(?:\{)/i,/^(?:\})/i,/^(?::{3})/i,/^(?::)/i,/^(?:id\b)/i,/^(?:text\b)/i,/^(?:risk\b)/i,/^(?:verifyMethod\b)/i,/^(?:requirement\b)/i,/^(?:functionalRequirement\b)/i,/^(?:interfaceRequirement\b)/i,/^(?:performanceRequirement\b)/i,/^(?:physicalRequirement\b)/i,/^(?:designConstraint\b)/i,/^(?:low\b)/i,/^(?:medium\b)/i,/^(?:high\b)/i,/^(?:analysis\b)/i,/^(?:demonstration\b)/i,/^(?:inspection\b)/i,/^(?:test\b)/i,/^(?:element\b)/i,/^(?:contains\b)/i,/^(?:copies\b)/i,/^(?:derives\b)/i,/^(?:satisfies\b)/i,/^(?:verifies\b)/i,/^(?:refines\b)/i,/^(?:traces\b)/i,/^(?:type\b)/i,/^(?:docref\b)/i,/^(?:style\b)/i,/^(?:\w+)/i,/^(?::)/i,/^(?:;)/i,/^(?:%)/i,/^(?:-)/i,/^(?:#)/i,/^(?: )/i,/^(?:["])/i,/^(?:\n)/i,/^(?:classDef\b)/i,/^(?:class\b)/i,/^(?:<-)/i,/^(?:->)/i,/^(?:-)/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[\w][^:,\r\n\{\<\>\-\=]*)/i,/^(?:\w+)/i,/^(?:[0-9]+)/i,/^(?:,)/i],conditions:{acc_descr_multiline:{rules:[6,7,68,69,70],inclusive:!1},acc_descr:{rules:[4,68,69,70],inclusive:!1},acc_title:{rules:[2,68,69,70],inclusive:!1},style:{rules:[50,51,52,53,54,55,56,57,58,68,69,70],inclusive:!1},unqString:{rules:[68,69,70],inclusive:!1},token:{rules:[68,69,70],inclusive:!1},string:{rules:[65,66,68,69,70],inclusive:!1},INITIAL:{rules:[0,1,3,5,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,59,60,61,62,63,64,67,68,69,70],inclusive:!0}}};return ke})();Pe.lexer=Re;function Ve(){this.yy={}}return b(Ve,"Parser"),Ve.prototype=Pe,Pe.Parser=Ve,new Ve})();OV.parser=OV;F5t=OV,z5t=(O4=class{constructor(){this.relations=[],this.latestRequirement=this.getInitialRequirement(),this.requirements=new Map,this.latestElement=this.getInitialElement(),this.elements=new Map,this.classes=new Map,this.direction="TB",this.RequirementType={REQUIREMENT:"Requirement",FUNCTIONAL_REQUIREMENT:"Functional Requirement",INTERFACE_REQUIREMENT:"Interface Requirement",PERFORMANCE_REQUIREMENT:"Performance Requirement",PHYSICAL_REQUIREMENT:"Physical Requirement",DESIGN_CONSTRAINT:"Design Constraint"},this.RiskLevel={LOW_RISK:"Low",MED_RISK:"Medium",HIGH_RISK:"High"},this.VerifyType={VERIFY_ANALYSIS:"Analysis",VERIFY_DEMONSTRATION:"Demonstration",VERIFY_INSPECTION:"Inspection",VERIFY_TEST:"Test"},this.Relationships={CONTAINS:"contains",COPIES:"copies",DERIVES:"derives",SATISFIES:"satisfies",VERIFIES:"verifies",REFINES:"refines",TRACES:"traces"},this.setAccTitle=en,this.getAccTitle=tn,this.setAccDescription=rn,this.getAccDescription=nn,this.setDiagramTitle=pn,this.getDiagramTitle=an,this.getConfig=b(()=>Fe().requirement,"getConfig"),this.clear(),this.setDirection=this.setDirection.bind(this),this.addRequirement=this.addRequirement.bind(this),this.setNewReqId=this.setNewReqId.bind(this),this.setNewReqRisk=this.setNewReqRisk.bind(this),this.setNewReqText=this.setNewReqText.bind(this),this.setNewReqVerifyMethod=this.setNewReqVerifyMethod.bind(this),this.addElement=this.addElement.bind(this),this.setNewElementType=this.setNewElementType.bind(this),this.setNewElementDocRef=this.setNewElementDocRef.bind(this),this.addRelationship=this.addRelationship.bind(this),this.setCssStyle=this.setCssStyle.bind(this),this.setClass=this.setClass.bind(this),this.defineClass=this.defineClass.bind(this),this.setAccTitle=this.setAccTitle.bind(this),this.setAccDescription=this.setAccDescription.bind(this)}getDirection(){return this.direction}setDirection(e){this.direction=e}resetLatestRequirement(){this.latestRequirement=this.getInitialRequirement()}resetLatestElement(){this.latestElement=this.getInitialElement()}getInitialRequirement(){return{requirementId:"",text:"",risk:"",verifyMethod:"",name:"",type:"",cssStyles:[],classes:["default"]}}getInitialElement(){return{name:"",type:"",docRef:"",cssStyles:[],classes:["default"]}}addRequirement(e,r){return this.requirements.has(e)||this.requirements.set(e,{name:e,type:r,requirementId:this.latestRequirement.requirementId,text:this.latestRequirement.text,risk:this.latestRequirement.risk,verifyMethod:this.latestRequirement.verifyMethod,cssStyles:[],classes:["default"]}),this.resetLatestRequirement(),this.requirements.get(e)}getRequirements(){return this.requirements}setNewReqId(e){this.latestRequirement!==void 0&&(this.latestRequirement.requirementId=e)}setNewReqText(e){this.latestRequirement!==void 0&&(this.latestRequirement.text=e)}setNewReqRisk(e){this.latestRequirement!==void 0&&(this.latestRequirement.risk=e)}setNewReqVerifyMethod(e){this.latestRequirement!==void 0&&(this.latestRequirement.verifyMethod=e)}addElement(e){return this.elements.has(e)||(this.elements.set(e,{name:e,type:this.latestElement.type,docRef:this.latestElement.docRef,cssStyles:[],classes:["default"]}),he.info("Added new element: ",e)),this.resetLatestElement(),this.elements.get(e)}getElements(){return this.elements}setNewElementType(e){this.latestElement!==void 0&&(this.latestElement.type=e)}setNewElementDocRef(e){this.latestElement!==void 0&&(this.latestElement.docRef=e)}addRelationship(e,r,n){this.relations.push({type:e,src:r,dst:n})}getRelationships(){return this.relations}clear(){this.relations=[],this.resetLatestRequirement(),this.requirements=new Map,this.resetLatestElement(),this.elements=new Map,this.classes=new Map,Jr()}setCssStyle(e,r){for(let n of e){let i=this.requirements.get(n)??this.elements.get(n);if(!r||!i)return;for(let a of r)a.includes(",")?i.cssStyles.push(...a.split(",")):i.cssStyles.push(a)}}setClass(e,r){for(let n of e){let i=this.requirements.get(n)??this.elements.get(n);if(i)for(let a of r){i.classes.push(a);let s=this.classes.get(a)?.styles;s&&i.cssStyles.push(...s)}}}defineClass(e,r){for(let n of e){let i=this.classes.get(n);i===void 0&&(i={id:n,styles:[],textStyles:[]},this.classes.set(n,i)),r&&r.forEach(function(a){if(/color/.exec(a)){let s=a.replace("fill","bgFill");i.textStyles.push(s)}i.styles.push(a)}),this.requirements.forEach(a=>{a.classes.includes(n)&&a.cssStyles.push(...r.flatMap(s=>s.split(",")))}),this.elements.forEach(a=>{a.classes.includes(n)&&a.cssStyles.push(...r.flatMap(s=>s.split(",")))})}}getClasses(){return this.classes}getData(){let e=Fe(),r=[],n=[];for(let i of this.requirements.values()){let a=i;a.id=i.name,a.cssStyles=i.cssStyles,a.cssClasses=i.classes.join(" "),a.shape="requirementBox",a.look=e.look,r.push(a)}for(let i of this.elements.values()){let a=i;a.shape="requirementBox",a.look=e.look,a.id=i.name,a.cssStyles=i.cssStyles,a.cssClasses=i.classes.join(" "),r.push(a)}for(let i of this.relations){let a=0,s=i.type===this.Relationships.CONTAINS,o={id:`${i.src}-${i.dst}-${a}`,start:this.requirements.get(i.src)?.name??this.elements.get(i.src)?.name,end:this.requirements.get(i.dst)?.name??this.elements.get(i.dst)?.name,label:`<<${i.type}>>`,classes:"relationshipLine",style:["fill:none",s?"":"stroke-dasharray: 10,7"],labelpos:"c",thickness:"normal",type:"normal",pattern:s?"normal":"dashed",arrowTypeStart:s?"requirement_contains":"",arrowTypeEnd:s?"":"requirement_arrow",look:e.look};n.push(o),a++}return{nodes:r,edges:n,other:{},config:e,direction:this.getDirection()}}},b(O4,"RequirementDB"),O4),$5t=b(t=>` marker { fill: ${t.relationColor}; @@ -1201,7 +1457,7 @@ Expecting `+Qt.join(", ")+", got '"+(this.terminals_[Tt]||Tt)+"'":er="Parse erro stroke: ${t.requirementBorderColor}; stroke-width: ${t.requirementBorderSize}; } - + .reqTitle, .reqLabel{ fill: ${t.requirementTextColor}; } @@ -1237,12 +1493,12 @@ Expecting `+Qt.join(", ")+", got '"+(this.terminals_[Tt]||Tt)+"'":er="Parse erro background-color: ${t.edgeLabelBackground}; } -`,"getStyles"),cxt=uxt,oSe={};dp(oSe,{draw:()=>hxt});hxt=x(async function(t,e,r,n){te.info("REF0:"),te.info("Drawing requirement diagram (unified)",e);let{securityLevel:a,state:i,layout:s}=Te(),o=n.db.getData(),l=xc(e,a);o.type=n.type,o.layoutAlgorithm=Rd(s),o.nodeSpacing=i?.nodeSpacing??50,o.rankSpacing=i?.rankSpacing??50,o.markers=["requirement_contains","requirement_arrow"],o.diagramId=e,await pc(o,l);let u=8;Wt.insertTitle(l,"requirementDiagramTitleText",i?.titleTopMargin??25,n.db.getDiagramTitle()),bc(l,u,"requirementDiagram",i?.useMaxWidth??!0)},"draw"),fxt={parser:oxt,get db(){return new lxt},renderer:oSe,styles:cxt}});var ESe={};lr(ESe,{diagram:()=>Xxt});async function ySe(t,e){rt.bumpVerticalPos(10);let{startx:r,stopx:n,message:a}=e,i=Ze.splitBreaks(a).length,s=Ha(a),o=s?await Kg(a,Te()):Wt.calculateTextDimensions(a,Ym(De));if(!s){let f=o.height/i;e.height+=f,rt.bumpVerticalPos(f)}let l,u=o.height-10,h=o.width;if(r===n){l=rt.getVerticalPos()+u,De.rightAngles||(u+=De.boxMargin,l=rt.getVerticalPos()+u),u+=30;let f=Ze.getMax(h/2,De.width/2);rt.insert(r-f,rt.getVerticalPos()-10+u,n+f,rt.getVerticalPos()+30+u)}else u+=De.boxMargin,l=rt.getVerticalPos()+u,rt.insert(r,l-10,n,l);return rt.bumpVerticalPos(u),e.height+=u,e.stopy=e.starty+e.height,rt.insert(e.fromBounds,e.starty,e.toBounds,e.stopy),l}function Cu(t,e,r,n,a){rt.bumpVerticalPos(r);let i=n;if(e.id&&e.message&&t[e.id]){let s=t[e.id].width,o=Ym(De);e.message=Wt.wrapLabel(`[${e.message}]`,s-2*De.wrapPadding,o),e.width=s,e.wrap=!0;let l=Wt.calculateTextDimensions(e.message,o),u=Ze.getMax(l.height,De.labelBoxHeight);i=n+u,te.debug(`${u} - ${e.message}`)}a(e),rt.bumpVerticalPos(i)}function wSe(t,e,r,n,a,i,s){function o(u,h){u.x{let s=Ym(De),o=i.actorKeys.reduce((h,f)=>h+=t.get(f).width+(t.get(f).margin||0),0);o-=2*De.boxTextMargin,i.wrap&&(i.name=Wt.wrapLabel(i.name,o-2*De.wrapPadding,s));let l=Wt.calculateTextDimensions(i.name,s);a=Ze.getMax(l.height,a);let u=Ze.getMax(o,l.width+2*De.wrapPadding);if(i.margin=De.boxTextMargin,oi.textMaxHeight=a),Ze.getMax(n,De.height)}var _q,Eq,dxt,pxt,mxt,gxt,Ex,vxt,yxt,xxt,Wm,fSe,dSe,bxt,cSe,Aq,wxt,kxt,s9,Cx,pSe,Zc,mSe,Txt,Ext,Cxt,Sxt,_xt,Axt,Lxt,gSe,Rxt,Ixt,Dxt,Nxt,Mxt,Oxt,Pxt,vSe,Bxt,Lq,Fxt,Ta,De,rt,zxt,Ym,Tx,Cq,$xt,Gxt,Sq,xSe,bSe,o9,hSe,Uxt,qxt,Vxt,Hxt,Wxt,Yxt,Xxt,CSe=A(()=>{f_();w_();ln();ur();cr();_q=ii(o1(),1),Eq=(function(){var t=x(function(J,j,Z,K){for(Z=Z||{},K=J.length;K--;Z[J[K]]=j);return Z},"o"),e=[1,2],r=[1,3],n=[1,4],a=[2,4],i=[1,9],s=[1,11],o=[1,13],l=[1,14],u=[1,16],h=[1,17],f=[1,18],d=[1,24],p=[1,25],m=[1,26],g=[1,27],v=[1,28],y=[1,29],b=[1,30],w=[1,31],C=[1,32],k=[1,33],E=[1,34],_=[1,35],S=[1,36],L=[1,37],M=[1,38],D=[1,39],T=[1,41],I=[1,42],N=[1,43],O=[1,44],R=[1,45],P=[1,46],B=[1,4,5,13,14,16,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,47,48,49,50,52,53,54,59,60,61,62,70],F=[4,5,16,50,52,53],G=[4,5,13,14,16,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,50,52,53,54,59,60,61,62,70],z=[4,5,13,14,16,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,49,50,52,53,54,59,60,61,62,70],H=[4,5,13,14,16,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,48,50,52,53,54,59,60,61,62,70],Q=[4,5,13,14,16,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,47,50,52,53,54,59,60,61,62,70],Y=[68,69,70],ie=[1,122],se={trace:x(function(){},"trace"),yy:{},symbols_:{error:2,start:3,SPACE:4,NEWLINE:5,SD:6,document:7,line:8,statement:9,box_section:10,box_line:11,participant_statement:12,create:13,box:14,restOfLine:15,end:16,signal:17,autonumber:18,NUM:19,off:20,activate:21,actor:22,deactivate:23,note_statement:24,links_statement:25,link_statement:26,properties_statement:27,details_statement:28,title:29,legacy_title:30,acc_title:31,acc_title_value:32,acc_descr:33,acc_descr_value:34,acc_descr_multiline_value:35,loop:36,rect:37,opt:38,alt:39,else_sections:40,par:41,par_sections:42,par_over:43,critical:44,option_sections:45,break:46,option:47,and:48,else:49,participant:50,AS:51,participant_actor:52,destroy:53,note:54,placement:55,text2:56,over:57,actor_pair:58,links:59,link:60,properties:61,details:62,spaceList:63,",":64,left_of:65,right_of:66,signaltype:67,"+":68,"-":69,ACTOR:70,SOLID_OPEN_ARROW:71,DOTTED_OPEN_ARROW:72,SOLID_ARROW:73,BIDIRECTIONAL_SOLID_ARROW:74,DOTTED_ARROW:75,BIDIRECTIONAL_DOTTED_ARROW:76,SOLID_CROSS:77,DOTTED_CROSS:78,SOLID_POINT:79,DOTTED_POINT:80,TXT:81,$accept:0,$end:1},terminals_:{2:"error",4:"SPACE",5:"NEWLINE",6:"SD",13:"create",14:"box",15:"restOfLine",16:"end",18:"autonumber",19:"NUM",20:"off",21:"activate",23:"deactivate",29:"title",30:"legacy_title",31:"acc_title",32:"acc_title_value",33:"acc_descr",34:"acc_descr_value",35:"acc_descr_multiline_value",36:"loop",37:"rect",38:"opt",39:"alt",41:"par",43:"par_over",44:"critical",46:"break",47:"option",48:"and",49:"else",50:"participant",51:"AS",52:"participant_actor",53:"destroy",54:"note",57:"over",59:"links",60:"link",61:"properties",62:"details",64:",",65:"left_of",66:"right_of",68:"+",69:"-",70:"ACTOR",71:"SOLID_OPEN_ARROW",72:"DOTTED_OPEN_ARROW",73:"SOLID_ARROW",74:"BIDIRECTIONAL_SOLID_ARROW",75:"DOTTED_ARROW",76:"BIDIRECTIONAL_DOTTED_ARROW",77:"SOLID_CROSS",78:"DOTTED_CROSS",79:"SOLID_POINT",80:"DOTTED_POINT",81:"TXT"},productions_:[0,[3,2],[3,2],[3,2],[7,0],[7,2],[8,2],[8,1],[8,1],[10,0],[10,2],[11,2],[11,1],[11,1],[9,1],[9,2],[9,4],[9,2],[9,4],[9,3],[9,3],[9,2],[9,3],[9,3],[9,2],[9,2],[9,2],[9,2],[9,2],[9,1],[9,1],[9,2],[9,2],[9,1],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[45,1],[45,4],[42,1],[42,4],[40,1],[40,4],[12,5],[12,3],[12,5],[12,3],[12,3],[24,4],[24,4],[25,3],[26,3],[27,3],[28,3],[63,2],[63,1],[58,3],[58,1],[55,1],[55,1],[17,5],[17,5],[17,4],[22,1],[67,1],[67,1],[67,1],[67,1],[67,1],[67,1],[67,1],[67,1],[67,1],[67,1],[56,1]],performAction:x(function(j,Z,K,X,ae,W,Se){var ne=W.length-1;switch(ae){case 3:return X.apply(W[ne]),W[ne];break;case 4:case 9:this.$=[];break;case 5:case 10:W[ne-1].push(W[ne]),this.$=W[ne-1];break;case 6:case 7:case 11:case 12:this.$=W[ne];break;case 8:case 13:this.$=[];break;case 15:W[ne].type="createParticipant",this.$=W[ne];break;case 16:W[ne-1].unshift({type:"boxStart",boxData:X.parseBoxData(W[ne-2])}),W[ne-1].push({type:"boxEnd",boxText:W[ne-2]}),this.$=W[ne-1];break;case 18:this.$={type:"sequenceIndex",sequenceIndex:Number(W[ne-2]),sequenceIndexStep:Number(W[ne-1]),sequenceVisible:!0,signalType:X.LINETYPE.AUTONUMBER};break;case 19:this.$={type:"sequenceIndex",sequenceIndex:Number(W[ne-1]),sequenceIndexStep:1,sequenceVisible:!0,signalType:X.LINETYPE.AUTONUMBER};break;case 20:this.$={type:"sequenceIndex",sequenceVisible:!1,signalType:X.LINETYPE.AUTONUMBER};break;case 21:this.$={type:"sequenceIndex",sequenceVisible:!0,signalType:X.LINETYPE.AUTONUMBER};break;case 22:this.$={type:"activeStart",signalType:X.LINETYPE.ACTIVE_START,actor:W[ne-1].actor};break;case 23:this.$={type:"activeEnd",signalType:X.LINETYPE.ACTIVE_END,actor:W[ne-1].actor};break;case 29:X.setDiagramTitle(W[ne].substring(6)),this.$=W[ne].substring(6);break;case 30:X.setDiagramTitle(W[ne].substring(7)),this.$=W[ne].substring(7);break;case 31:this.$=W[ne].trim(),X.setAccTitle(this.$);break;case 32:case 33:this.$=W[ne].trim(),X.setAccDescription(this.$);break;case 34:W[ne-1].unshift({type:"loopStart",loopText:X.parseMessage(W[ne-2]),signalType:X.LINETYPE.LOOP_START}),W[ne-1].push({type:"loopEnd",loopText:W[ne-2],signalType:X.LINETYPE.LOOP_END}),this.$=W[ne-1];break;case 35:W[ne-1].unshift({type:"rectStart",color:X.parseMessage(W[ne-2]),signalType:X.LINETYPE.RECT_START}),W[ne-1].push({type:"rectEnd",color:X.parseMessage(W[ne-2]),signalType:X.LINETYPE.RECT_END}),this.$=W[ne-1];break;case 36:W[ne-1].unshift({type:"optStart",optText:X.parseMessage(W[ne-2]),signalType:X.LINETYPE.OPT_START}),W[ne-1].push({type:"optEnd",optText:X.parseMessage(W[ne-2]),signalType:X.LINETYPE.OPT_END}),this.$=W[ne-1];break;case 37:W[ne-1].unshift({type:"altStart",altText:X.parseMessage(W[ne-2]),signalType:X.LINETYPE.ALT_START}),W[ne-1].push({type:"altEnd",signalType:X.LINETYPE.ALT_END}),this.$=W[ne-1];break;case 38:W[ne-1].unshift({type:"parStart",parText:X.parseMessage(W[ne-2]),signalType:X.LINETYPE.PAR_START}),W[ne-1].push({type:"parEnd",signalType:X.LINETYPE.PAR_END}),this.$=W[ne-1];break;case 39:W[ne-1].unshift({type:"parStart",parText:X.parseMessage(W[ne-2]),signalType:X.LINETYPE.PAR_OVER_START}),W[ne-1].push({type:"parEnd",signalType:X.LINETYPE.PAR_END}),this.$=W[ne-1];break;case 40:W[ne-1].unshift({type:"criticalStart",criticalText:X.parseMessage(W[ne-2]),signalType:X.LINETYPE.CRITICAL_START}),W[ne-1].push({type:"criticalEnd",signalType:X.LINETYPE.CRITICAL_END}),this.$=W[ne-1];break;case 41:W[ne-1].unshift({type:"breakStart",breakText:X.parseMessage(W[ne-2]),signalType:X.LINETYPE.BREAK_START}),W[ne-1].push({type:"breakEnd",optText:X.parseMessage(W[ne-2]),signalType:X.LINETYPE.BREAK_END}),this.$=W[ne-1];break;case 43:this.$=W[ne-3].concat([{type:"option",optionText:X.parseMessage(W[ne-1]),signalType:X.LINETYPE.CRITICAL_OPTION},W[ne]]);break;case 45:this.$=W[ne-3].concat([{type:"and",parText:X.parseMessage(W[ne-1]),signalType:X.LINETYPE.PAR_AND},W[ne]]);break;case 47:this.$=W[ne-3].concat([{type:"else",altText:X.parseMessage(W[ne-1]),signalType:X.LINETYPE.ALT_ELSE},W[ne]]);break;case 48:W[ne-3].draw="participant",W[ne-3].type="addParticipant",W[ne-3].description=X.parseMessage(W[ne-1]),this.$=W[ne-3];break;case 49:W[ne-1].draw="participant",W[ne-1].type="addParticipant",this.$=W[ne-1];break;case 50:W[ne-3].draw="actor",W[ne-3].type="addParticipant",W[ne-3].description=X.parseMessage(W[ne-1]),this.$=W[ne-3];break;case 51:W[ne-1].draw="actor",W[ne-1].type="addParticipant",this.$=W[ne-1];break;case 52:W[ne-1].type="destroyParticipant",this.$=W[ne-1];break;case 53:this.$=[W[ne-1],{type:"addNote",placement:W[ne-2],actor:W[ne-1].actor,text:W[ne]}];break;case 54:W[ne-2]=[].concat(W[ne-1],W[ne-1]).slice(0,2),W[ne-2][0]=W[ne-2][0].actor,W[ne-2][1]=W[ne-2][1].actor,this.$=[W[ne-1],{type:"addNote",placement:X.PLACEMENT.OVER,actor:W[ne-2].slice(0,2),text:W[ne]}];break;case 55:this.$=[W[ne-1],{type:"addLinks",actor:W[ne-1].actor,text:W[ne]}];break;case 56:this.$=[W[ne-1],{type:"addALink",actor:W[ne-1].actor,text:W[ne]}];break;case 57:this.$=[W[ne-1],{type:"addProperties",actor:W[ne-1].actor,text:W[ne]}];break;case 58:this.$=[W[ne-1],{type:"addDetails",actor:W[ne-1].actor,text:W[ne]}];break;case 61:this.$=[W[ne-2],W[ne]];break;case 62:this.$=W[ne];break;case 63:this.$=X.PLACEMENT.LEFTOF;break;case 64:this.$=X.PLACEMENT.RIGHTOF;break;case 65:this.$=[W[ne-4],W[ne-1],{type:"addMessage",from:W[ne-4].actor,to:W[ne-1].actor,signalType:W[ne-3],msg:W[ne],activate:!0},{type:"activeStart",signalType:X.LINETYPE.ACTIVE_START,actor:W[ne-1].actor}];break;case 66:this.$=[W[ne-4],W[ne-1],{type:"addMessage",from:W[ne-4].actor,to:W[ne-1].actor,signalType:W[ne-3],msg:W[ne]},{type:"activeEnd",signalType:X.LINETYPE.ACTIVE_END,actor:W[ne-4].actor}];break;case 67:this.$=[W[ne-3],W[ne-1],{type:"addMessage",from:W[ne-3].actor,to:W[ne-1].actor,signalType:W[ne-2],msg:W[ne]}];break;case 68:this.$={type:"addParticipant",actor:W[ne]};break;case 69:this.$=X.LINETYPE.SOLID_OPEN;break;case 70:this.$=X.LINETYPE.DOTTED_OPEN;break;case 71:this.$=X.LINETYPE.SOLID;break;case 72:this.$=X.LINETYPE.BIDIRECTIONAL_SOLID;break;case 73:this.$=X.LINETYPE.DOTTED;break;case 74:this.$=X.LINETYPE.BIDIRECTIONAL_DOTTED;break;case 75:this.$=X.LINETYPE.SOLID_CROSS;break;case 76:this.$=X.LINETYPE.DOTTED_CROSS;break;case 77:this.$=X.LINETYPE.SOLID_POINT;break;case 78:this.$=X.LINETYPE.DOTTED_POINT;break;case 79:this.$=X.parseMessage(W[ne].trim().substring(1));break}},"anonymous"),table:[{3:1,4:e,5:r,6:n},{1:[3]},{3:5,4:e,5:r,6:n},{3:6,4:e,5:r,6:n},t([1,4,5,13,14,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,50,52,53,54,59,60,61,62,70],a,{7:7}),{1:[2,1]},{1:[2,2]},{1:[2,3],4:i,5:s,8:8,9:10,12:12,13:o,14:l,17:15,18:u,21:h,22:40,23:f,24:19,25:20,26:21,27:22,28:23,29:d,30:p,31:m,33:g,35:v,36:y,37:b,38:w,39:C,41:k,43:E,44:_,46:S,50:L,52:M,53:D,54:T,59:I,60:N,61:O,62:R,70:P},t(B,[2,5]),{9:47,12:12,13:o,14:l,17:15,18:u,21:h,22:40,23:f,24:19,25:20,26:21,27:22,28:23,29:d,30:p,31:m,33:g,35:v,36:y,37:b,38:w,39:C,41:k,43:E,44:_,46:S,50:L,52:M,53:D,54:T,59:I,60:N,61:O,62:R,70:P},t(B,[2,7]),t(B,[2,8]),t(B,[2,14]),{12:48,50:L,52:M,53:D},{15:[1,49]},{5:[1,50]},{5:[1,53],19:[1,51],20:[1,52]},{22:54,70:P},{22:55,70:P},{5:[1,56]},{5:[1,57]},{5:[1,58]},{5:[1,59]},{5:[1,60]},t(B,[2,29]),t(B,[2,30]),{32:[1,61]},{34:[1,62]},t(B,[2,33]),{15:[1,63]},{15:[1,64]},{15:[1,65]},{15:[1,66]},{15:[1,67]},{15:[1,68]},{15:[1,69]},{15:[1,70]},{22:71,70:P},{22:72,70:P},{22:73,70:P},{67:74,71:[1,75],72:[1,76],73:[1,77],74:[1,78],75:[1,79],76:[1,80],77:[1,81],78:[1,82],79:[1,83],80:[1,84]},{55:85,57:[1,86],65:[1,87],66:[1,88]},{22:89,70:P},{22:90,70:P},{22:91,70:P},{22:92,70:P},t([5,51,64,71,72,73,74,75,76,77,78,79,80,81],[2,68]),t(B,[2,6]),t(B,[2,15]),t(F,[2,9],{10:93}),t(B,[2,17]),{5:[1,95],19:[1,94]},{5:[1,96]},t(B,[2,21]),{5:[1,97]},{5:[1,98]},t(B,[2,24]),t(B,[2,25]),t(B,[2,26]),t(B,[2,27]),t(B,[2,28]),t(B,[2,31]),t(B,[2,32]),t(G,a,{7:99}),t(G,a,{7:100}),t(G,a,{7:101}),t(z,a,{40:102,7:103}),t(H,a,{42:104,7:105}),t(H,a,{7:105,42:106}),t(Q,a,{45:107,7:108}),t(G,a,{7:109}),{5:[1,111],51:[1,110]},{5:[1,113],51:[1,112]},{5:[1,114]},{22:117,68:[1,115],69:[1,116],70:P},t(Y,[2,69]),t(Y,[2,70]),t(Y,[2,71]),t(Y,[2,72]),t(Y,[2,73]),t(Y,[2,74]),t(Y,[2,75]),t(Y,[2,76]),t(Y,[2,77]),t(Y,[2,78]),{22:118,70:P},{22:120,58:119,70:P},{70:[2,63]},{70:[2,64]},{56:121,81:ie},{56:123,81:ie},{56:124,81:ie},{56:125,81:ie},{4:[1,128],5:[1,130],11:127,12:129,16:[1,126],50:L,52:M,53:D},{5:[1,131]},t(B,[2,19]),t(B,[2,20]),t(B,[2,22]),t(B,[2,23]),{4:i,5:s,8:8,9:10,12:12,13:o,14:l,16:[1,132],17:15,18:u,21:h,22:40,23:f,24:19,25:20,26:21,27:22,28:23,29:d,30:p,31:m,33:g,35:v,36:y,37:b,38:w,39:C,41:k,43:E,44:_,46:S,50:L,52:M,53:D,54:T,59:I,60:N,61:O,62:R,70:P},{4:i,5:s,8:8,9:10,12:12,13:o,14:l,16:[1,133],17:15,18:u,21:h,22:40,23:f,24:19,25:20,26:21,27:22,28:23,29:d,30:p,31:m,33:g,35:v,36:y,37:b,38:w,39:C,41:k,43:E,44:_,46:S,50:L,52:M,53:D,54:T,59:I,60:N,61:O,62:R,70:P},{4:i,5:s,8:8,9:10,12:12,13:o,14:l,16:[1,134],17:15,18:u,21:h,22:40,23:f,24:19,25:20,26:21,27:22,28:23,29:d,30:p,31:m,33:g,35:v,36:y,37:b,38:w,39:C,41:k,43:E,44:_,46:S,50:L,52:M,53:D,54:T,59:I,60:N,61:O,62:R,70:P},{16:[1,135]},{4:i,5:s,8:8,9:10,12:12,13:o,14:l,16:[2,46],17:15,18:u,21:h,22:40,23:f,24:19,25:20,26:21,27:22,28:23,29:d,30:p,31:m,33:g,35:v,36:y,37:b,38:w,39:C,41:k,43:E,44:_,46:S,49:[1,136],50:L,52:M,53:D,54:T,59:I,60:N,61:O,62:R,70:P},{16:[1,137]},{4:i,5:s,8:8,9:10,12:12,13:o,14:l,16:[2,44],17:15,18:u,21:h,22:40,23:f,24:19,25:20,26:21,27:22,28:23,29:d,30:p,31:m,33:g,35:v,36:y,37:b,38:w,39:C,41:k,43:E,44:_,46:S,48:[1,138],50:L,52:M,53:D,54:T,59:I,60:N,61:O,62:R,70:P},{16:[1,139]},{16:[1,140]},{4:i,5:s,8:8,9:10,12:12,13:o,14:l,16:[2,42],17:15,18:u,21:h,22:40,23:f,24:19,25:20,26:21,27:22,28:23,29:d,30:p,31:m,33:g,35:v,36:y,37:b,38:w,39:C,41:k,43:E,44:_,46:S,47:[1,141],50:L,52:M,53:D,54:T,59:I,60:N,61:O,62:R,70:P},{4:i,5:s,8:8,9:10,12:12,13:o,14:l,16:[1,142],17:15,18:u,21:h,22:40,23:f,24:19,25:20,26:21,27:22,28:23,29:d,30:p,31:m,33:g,35:v,36:y,37:b,38:w,39:C,41:k,43:E,44:_,46:S,50:L,52:M,53:D,54:T,59:I,60:N,61:O,62:R,70:P},{15:[1,143]},t(B,[2,49]),{15:[1,144]},t(B,[2,51]),t(B,[2,52]),{22:145,70:P},{22:146,70:P},{56:147,81:ie},{56:148,81:ie},{56:149,81:ie},{64:[1,150],81:[2,62]},{5:[2,55]},{5:[2,79]},{5:[2,56]},{5:[2,57]},{5:[2,58]},t(B,[2,16]),t(F,[2,10]),{12:151,50:L,52:M,53:D},t(F,[2,12]),t(F,[2,13]),t(B,[2,18]),t(B,[2,34]),t(B,[2,35]),t(B,[2,36]),t(B,[2,37]),{15:[1,152]},t(B,[2,38]),{15:[1,153]},t(B,[2,39]),t(B,[2,40]),{15:[1,154]},t(B,[2,41]),{5:[1,155]},{5:[1,156]},{56:157,81:ie},{56:158,81:ie},{5:[2,67]},{5:[2,53]},{5:[2,54]},{22:159,70:P},t(F,[2,11]),t(z,a,{7:103,40:160}),t(H,a,{7:105,42:161}),t(Q,a,{7:108,45:162}),t(B,[2,48]),t(B,[2,50]),{5:[2,65]},{5:[2,66]},{81:[2,61]},{16:[2,47]},{16:[2,45]},{16:[2,43]}],defaultActions:{5:[2,1],6:[2,2],87:[2,63],88:[2,64],121:[2,55],122:[2,79],123:[2,56],124:[2,57],125:[2,58],147:[2,67],148:[2,53],149:[2,54],157:[2,65],158:[2,66],159:[2,61],160:[2,47],161:[2,45],162:[2,43]},parseError:x(function(j,Z){if(Z.recoverable)this.trace(j);else{var K=new Error(j);throw K.hash=Z,K}},"parseError"),parse:x(function(j){var Z=this,K=[0],X=[],ae=[null],W=[],Se=this.table,ne="",ee=0,$e=0,me=0,Ie=2,Ue=1,Fe=W.slice.call(arguments,1),Ae=Object.create(this.lexer),Me={yy:{}};for(var ke in this.yy)Object.prototype.hasOwnProperty.call(this.yy,ke)&&(Me.yy[ke]=this.yy[ke]);Ae.setInput(j,Me.yy),Me.yy.lexer=Ae,Me.yy.parser=this,typeof Ae.yylloc>"u"&&(Ae.yylloc={});var ve=Ae.yylloc;W.push(ve);var _e=Ae.options&&Ae.options.ranges;typeof Me.yy.parseError=="function"?this.parseError=Me.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function fe(Ye){K.length=K.length-2*Ye,ae.length=ae.length-Ye,W.length=W.length-Ye}x(fe,"popStack");function ue(){var Ye;return Ye=X.pop()||Ae.lex()||Ue,typeof Ye!="number"&&(Ye instanceof Array&&(X=Ye,Ye=X.pop()),Ye=Z.symbols_[Ye]||Ye),Ye}x(ue,"lex");for(var $,le,V,he,de,Ne,we={},ye,Be,Le,qe;;){if(V=K[K.length-1],this.defaultActions[V]?he=this.defaultActions[V]:(($===null||typeof $>"u")&&($=ue()),he=Se[V]&&Se[V][$]),typeof he>"u"||!he.length||!he[0]){var Ke="";qe=[];for(ye in Se[V])this.terminals_[ye]&&ye>Ie&&qe.push("'"+this.terminals_[ye]+"'");Ae.showPosition?Ke="Parse error on line "+(ee+1)+`: -`+Ae.showPosition()+` -Expecting `+qe.join(", ")+", got '"+(this.terminals_[$]||$)+"'":Ke="Parse error on line "+(ee+1)+": Unexpected "+($==Ue?"end of input":"'"+(this.terminals_[$]||$)+"'"),this.parseError(Ke,{text:Ae.match,token:this.terminals_[$]||$,line:Ae.yylineno,loc:ve,expected:qe})}if(he[0]instanceof Array&&he.length>1)throw new Error("Parse Error: multiple actions possible at state: "+V+", token: "+$);switch(he[0]){case 1:K.push($),ae.push(Ae.yytext),W.push(Ae.yylloc),K.push(he[1]),$=null,le?($=le,le=null):($e=Ae.yyleng,ne=Ae.yytext,ee=Ae.yylineno,ve=Ae.yylloc,me>0&&me--);break;case 2:if(Be=this.productions_[he[1]][1],we.$=ae[ae.length-Be],we._$={first_line:W[W.length-(Be||1)].first_line,last_line:W[W.length-1].last_line,first_column:W[W.length-(Be||1)].first_column,last_column:W[W.length-1].last_column},_e&&(we._$.range=[W[W.length-(Be||1)].range[0],W[W.length-1].range[1]]),Ne=this.performAction.apply(we,[ne,$e,ee,Me.yy,he[1],ae,W].concat(Fe)),typeof Ne<"u")return Ne;Be&&(K=K.slice(0,-1*Be*2),ae=ae.slice(0,-1*Be),W=W.slice(0,-1*Be)),K.push(this.productions_[he[1]][0]),ae.push(we.$),W.push(we._$),Le=Se[K[K.length-2]][K[K.length-1]],K.push(Le);break;case 3:return!0}}return!0},"parse")},oe=(function(){var J={EOF:1,parseError:x(function(Z,K){if(this.yy.parser)this.yy.parser.parseError(Z,K);else throw new Error(Z)},"parseError"),setInput:x(function(j,Z){return this.yy=Z||this.yy||{},this._input=j,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:x(function(){var j=this._input[0];this.yytext+=j,this.yyleng++,this.offset++,this.match+=j,this.matched+=j;var Z=j.match(/(?:\r\n?|\n).*/g);return Z?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),j},"input"),unput:x(function(j){var Z=j.length,K=j.split(/(?:\r\n?|\n)/g);this._input=j+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-Z),this.offset-=Z;var X=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),K.length-1&&(this.yylineno-=K.length-1);var ae=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:K?(K.length===X.length?this.yylloc.first_column:0)+X[X.length-K.length].length-K[0].length:this.yylloc.first_column-Z},this.options.ranges&&(this.yylloc.range=[ae[0],ae[0]+this.yyleng-Z]),this.yyleng=this.yytext.length,this},"unput"),more:x(function(){return this._more=!0,this},"more"),reject:x(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). -`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:x(function(j){this.unput(this.match.slice(j))},"less"),pastInput:x(function(){var j=this.matched.substr(0,this.matched.length-this.match.length);return(j.length>20?"...":"")+j.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:x(function(){var j=this.match;return j.length<20&&(j+=this._input.substr(0,20-j.length)),(j.substr(0,20)+(j.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:x(function(){var j=this.pastInput(),Z=new Array(j.length+1).join("-");return j+this.upcomingInput()+` -`+Z+"^"},"showPosition"),test_match:x(function(j,Z){var K,X,ae;if(this.options.backtrack_lexer&&(ae={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(ae.yylloc.range=this.yylloc.range.slice(0))),X=j[0].match(/(?:\r\n?|\n).*/g),X&&(this.yylineno+=X.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:X?X[X.length-1].length-X[X.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+j[0].length},this.yytext+=j[0],this.match+=j[0],this.matches=j,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(j[0].length),this.matched+=j[0],K=this.performAction.call(this,this.yy,this,Z,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),K)return K;if(this._backtrack){for(var W in ae)this[W]=ae[W];return!1}return!1},"test_match"),next:x(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var j,Z,K,X;this._more||(this.yytext="",this.match="");for(var ae=this._currentRules(),W=0;WZ[0].length)){if(Z=K,X=W,this.options.backtrack_lexer){if(j=this.test_match(K,ae[W]),j!==!1)return j;if(this._backtrack){Z=!1;continue}else return!1}else if(!this.options.flex)break}return Z?(j=this.test_match(Z,ae[X]),j!==!1?j:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. -`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:x(function(){var Z=this.next();return Z||this.lex()},"lex"),begin:x(function(Z){this.conditionStack.push(Z)},"begin"),popState:x(function(){var Z=this.conditionStack.length-1;return Z>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:x(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:x(function(Z){return Z=this.conditionStack.length-1-Math.abs(Z||0),Z>=0?this.conditionStack[Z]:"INITIAL"},"topState"),pushState:x(function(Z){this.begin(Z)},"pushState"),stateStackSize:x(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:x(function(Z,K,X,ae){var W=ae;switch(X){case 0:return 5;case 1:break;case 2:break;case 3:break;case 4:break;case 5:break;case 6:return 19;case 7:return this.begin("LINE"),14;break;case 8:return this.begin("ID"),50;break;case 9:return this.begin("ID"),52;break;case 10:return 13;case 11:return this.begin("ID"),53;break;case 12:return K.yytext=K.yytext.trim(),this.begin("ALIAS"),70;break;case 13:return this.popState(),this.popState(),this.begin("LINE"),51;break;case 14:return this.popState(),this.popState(),5;break;case 15:return this.begin("LINE"),36;break;case 16:return this.begin("LINE"),37;break;case 17:return this.begin("LINE"),38;break;case 18:return this.begin("LINE"),39;break;case 19:return this.begin("LINE"),49;break;case 20:return this.begin("LINE"),41;break;case 21:return this.begin("LINE"),43;break;case 22:return this.begin("LINE"),48;break;case 23:return this.begin("LINE"),44;break;case 24:return this.begin("LINE"),47;break;case 25:return this.begin("LINE"),46;break;case 26:return this.popState(),15;break;case 27:return 16;case 28:return 65;case 29:return 66;case 30:return 59;case 31:return 60;case 32:return 61;case 33:return 62;case 34:return 57;case 35:return 54;case 36:return this.begin("ID"),21;break;case 37:return this.begin("ID"),23;break;case 38:return 29;case 39:return 30;case 40:return this.begin("acc_title"),31;break;case 41:return this.popState(),"acc_title_value";break;case 42:return this.begin("acc_descr"),33;break;case 43:return this.popState(),"acc_descr_value";break;case 44:this.begin("acc_descr_multiline");break;case 45:this.popState();break;case 46:return"acc_descr_multiline_value";case 47:return 6;case 48:return 18;case 49:return 20;case 50:return 64;case 51:return 5;case 52:return K.yytext=K.yytext.trim(),70;break;case 53:return 73;case 54:return 74;case 55:return 75;case 56:return 76;case 57:return 71;case 58:return 72;case 59:return 77;case 60:return 78;case 61:return 79;case 62:return 80;case 63:return 81;case 64:return 68;case 65:return 69;case 66:return 5;case 67:return"INVALID"}},"anonymous"),rules:[/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:((?!\n)\s)+)/i,/^(?:#[^\n]*)/i,/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[0-9]+(?=[ \n]+))/i,/^(?:box\b)/i,/^(?:participant\b)/i,/^(?:actor\b)/i,/^(?:create\b)/i,/^(?:destroy\b)/i,/^(?:[^\<->\->:\n,;]+?([\-]*[^\<->\->:\n,;]+?)*?(?=((?!\n)\s)+as(?!\n)\s|[#\n;]|$))/i,/^(?:as\b)/i,/^(?:(?:))/i,/^(?:loop\b)/i,/^(?:rect\b)/i,/^(?:opt\b)/i,/^(?:alt\b)/i,/^(?:else\b)/i,/^(?:par\b)/i,/^(?:par_over\b)/i,/^(?:and\b)/i,/^(?:critical\b)/i,/^(?:option\b)/i,/^(?:break\b)/i,/^(?:(?:[:]?(?:no)?wrap)?[^#\n;]*)/i,/^(?:end\b)/i,/^(?:left of\b)/i,/^(?:right of\b)/i,/^(?:links\b)/i,/^(?:link\b)/i,/^(?:properties\b)/i,/^(?:details\b)/i,/^(?:over\b)/i,/^(?:note\b)/i,/^(?:activate\b)/i,/^(?:deactivate\b)/i,/^(?:title\s[^#\n;]+)/i,/^(?:title:\s[^#\n;]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:sequenceDiagram\b)/i,/^(?:autonumber\b)/i,/^(?:off\b)/i,/^(?:,)/i,/^(?:;)/i,/^(?:[^\+\<->\->:\n,;]+((?!(-x|--x|-\)|--\)))[\-]*[^\+\<->\->:\n,;]+)*)/i,/^(?:->>)/i,/^(?:<<->>)/i,/^(?:-->>)/i,/^(?:<<-->>)/i,/^(?:->)/i,/^(?:-->)/i,/^(?:-[x])/i,/^(?:--[x])/i,/^(?:-[\)])/i,/^(?:--[\)])/i,/^(?::(?:(?:no)?wrap)?[^#\n;]+)/i,/^(?:\+)/i,/^(?:-)/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[45,46],inclusive:!1},acc_descr:{rules:[43],inclusive:!1},acc_title:{rules:[41],inclusive:!1},ID:{rules:[2,3,12],inclusive:!1},ALIAS:{rules:[2,3,13,14],inclusive:!1},LINE:{rules:[2,3,26],inclusive:!1},INITIAL:{rules:[0,1,3,4,5,6,7,8,9,10,11,15,16,17,18,19,20,21,22,23,24,25,27,28,29,30,31,32,33,34,35,36,37,38,39,40,42,44,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67],inclusive:!0}}};return J})();se.lexer=oe;function pe(){this.yy={}}return x(pe,"Parser"),pe.prototype=se,se.Parser=pe,new pe})();Eq.parser=Eq;dxt=Eq,pxt={SOLID:0,DOTTED:1,NOTE:2,SOLID_CROSS:3,DOTTED_CROSS:4,SOLID_OPEN:5,DOTTED_OPEN:6,LOOP_START:10,LOOP_END:11,ALT_START:12,ALT_ELSE:13,ALT_END:14,OPT_START:15,OPT_END:16,ACTIVE_START:17,ACTIVE_END:18,PAR_START:19,PAR_AND:20,PAR_END:21,RECT_START:22,RECT_END:23,SOLID_POINT:24,DOTTED_POINT:25,AUTONUMBER:26,CRITICAL_START:27,CRITICAL_OPTION:28,CRITICAL_END:29,BREAK_START:30,BREAK_END:31,PAR_OVER_START:32,BIDIRECTIONAL_SOLID:33,BIDIRECTIONAL_DOTTED:34},mxt={FILLED:0,OPEN:1},gxt={LEFTOF:0,RIGHTOF:1,OVER:2},vxt=(Ex=class{constructor(){this.state=new gv(()=>({prevActor:void 0,actors:new Map,createdActors:new Map,destroyedActors:new Map,boxes:[],messages:[],notes:[],sequenceNumbersEnabled:!1,wrapEnabled:void 0,currentBox:void 0,lastCreated:void 0,lastDestroyed:void 0})),this.setAccTitle=Sr,this.setAccDescription=Ar,this.setDiagramTitle=Fr,this.getAccTitle=_r,this.getAccDescription=Lr,this.getDiagramTitle=Rr,this.apply=this.apply.bind(this),this.parseBoxData=this.parseBoxData.bind(this),this.parseMessage=this.parseMessage.bind(this),this.clear(),this.setWrap(Te().wrap),this.LINETYPE=pxt,this.ARROWTYPE=mxt,this.PLACEMENT=gxt}addBox(e){this.state.records.boxes.push({name:e.text,wrap:e.wrap??this.autoWrap(),fill:e.color,actorKeys:[]}),this.state.records.currentBox=this.state.records.boxes.slice(-1)[0]}addActor(e,r,n,a){let i=this.state.records.currentBox,s=this.state.records.actors.get(e);if(s){if(this.state.records.currentBox&&s.box&&this.state.records.currentBox!==s.box)throw new Error(`A same participant should only be defined in one Box: ${s.name} can't be in '${s.box.name}' and in '${this.state.records.currentBox.name}' at the same time.`);if(i=s.box?s.box:this.state.records.currentBox,s.box=i,s&&r===s.name&&n==null)return}if(n?.text==null&&(n={text:r,type:a}),(a==null||n.text==null)&&(n={text:r,type:a}),this.state.records.actors.set(e,{box:i,name:r,description:n.text,wrap:n.wrap??this.autoWrap(),prevActor:this.state.records.prevActor,links:{},properties:{},actorCnt:null,rectData:null,type:a??"participant"}),this.state.records.prevActor){let o=this.state.records.actors.get(this.state.records.prevActor);o&&(o.nextActor=e)}this.state.records.currentBox&&this.state.records.currentBox.actorKeys.push(e),this.state.records.prevActor=e}activationCount(e){let r,n=0;if(!e)return 0;for(r=0;r>-",token:"->>-",line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["'ACTIVE_PARTICIPANT'"]},o}return this.state.records.messages.push({id:this.state.records.messages.length.toString(),from:e,to:r,message:n?.text??"",wrap:n?.wrap??this.autoWrap(),type:a,activate:i}),!0}hasAtLeastOneBox(){return this.state.records.boxes.length>0}hasAtLeastOneBoxWithTitle(){return this.state.records.boxes.some(e=>e.name)}getMessages(){return this.state.records.messages}getBoxes(){return this.state.records.boxes}getActors(){return this.state.records.actors}getCreatedActors(){return this.state.records.createdActors}getDestroyedActors(){return this.state.records.destroyedActors}getActor(e){return this.state.records.actors.get(e)}getActorKeys(){return[...this.state.records.actors.keys()]}enableSequenceNumbers(){this.state.records.sequenceNumbersEnabled=!0}disableSequenceNumbers(){this.state.records.sequenceNumbersEnabled=!1}showSequenceNumbers(){return this.state.records.sequenceNumbersEnabled}setWrap(e){this.state.records.wrapEnabled=e}extractWrap(e){if(e===void 0)return{};e=e.trim();let r=/^:?wrap:/.exec(e)!==null?!0:/^:?nowrap:/.exec(e)!==null?!1:void 0;return{cleanedText:(r===void 0?e:e.replace(/^:?(?:no)?wrap:/,"")).trim(),wrap:r}}autoWrap(){return this.state.records.wrapEnabled!==void 0?this.state.records.wrapEnabled:Te().sequence?.wrap??!1}clear(){this.state.reset(),Cr()}parseMessage(e){let r=e.trim(),{wrap:n,cleanedText:a}=this.extractWrap(r),i={text:a,wrap:n};return te.debug(`parseMessage: ${JSON.stringify(i)}`),i}parseBoxData(e){let r=/^((?:rgba?|hsla?)\s*\(.*\)|\w*)(.*)$/.exec(e),n=r?.[1]?r[1].trim():"transparent",a=r?.[2]?r[2].trim():void 0;if(window?.CSS)window.CSS.supports("color",n)||(n="transparent",a=e.trim());else{let o=new Option().style;o.color=n,o.color!==n&&(n="transparent",a=e.trim())}let{wrap:i,cleanedText:s}=this.extractWrap(a);return{text:s?Er(s,Te()):void 0,color:n,wrap:i}}addNote(e,r,n){let a={actor:e,placement:r,message:n.text,wrap:n.wrap??this.autoWrap()},i=[].concat(e,e);this.state.records.notes.push(a),this.state.records.messages.push({id:this.state.records.messages.length.toString(),from:i[0],to:i[1],message:n.text,wrap:n.wrap??this.autoWrap(),type:this.LINETYPE.NOTE,placement:r})}addLinks(e,r){let n=this.getActor(e);try{let a=Er(r.text,Te());a=a.replace(/=/g,"="),a=a.replace(/&/g,"&");let i=JSON.parse(a);this.insertLinks(n,i)}catch(a){te.error("error while parsing actor link text",a)}}addALink(e,r){let n=this.getActor(e);try{let a={},i=Er(r.text,Te()),s=i.indexOf("@");i=i.replace(/=/g,"="),i=i.replace(/&/g,"&");let o=i.slice(0,s-1).trim(),l=i.slice(s+1).trim();a[o]=l,this.insertLinks(n,a)}catch(a){te.error("error while parsing actor link text",a)}}insertLinks(e,r){if(e.links==null)e.links=r;else for(let n in r)e.links[n]=r[n]}addProperties(e,r){let n=this.getActor(e);try{let a=Er(r.text,Te()),i=JSON.parse(a);this.insertProperties(n,i)}catch(a){te.error("error while parsing actor properties text",a)}}insertProperties(e,r){if(e.properties==null)e.properties=r;else for(let n in r)e.properties[n]=r[n]}boxEnd(){this.state.records.currentBox=void 0}addDetails(e,r){let n=this.getActor(e),a=document.getElementById(r.text);try{let i=a.innerHTML,s=JSON.parse(i);s.properties&&this.insertProperties(n,s.properties),s.links&&this.insertLinks(n,s.links)}catch(i){te.error("error while parsing actor details text",i)}}getActorProperty(e,r){if(e?.properties!==void 0)return e.properties[r]}apply(e){if(Array.isArray(e))e.forEach(r=>{this.apply(r)});else switch(e.type){case"sequenceIndex":this.state.records.messages.push({id:this.state.records.messages.length.toString(),from:void 0,to:void 0,message:{start:e.sequenceIndex,step:e.sequenceIndexStep,visible:e.sequenceVisible},wrap:!1,type:e.signalType});break;case"addParticipant":this.addActor(e.actor,e.actor,e.description,e.draw);break;case"createParticipant":if(this.state.records.actors.has(e.actor))throw new Error("It is not possible to have actors with the same id, even if one is destroyed before the next is created. Use 'AS' aliases to simulate the behavior");this.state.records.lastCreated=e.actor,this.addActor(e.actor,e.actor,e.description,e.draw),this.state.records.createdActors.set(e.actor,this.state.records.messages.length);break;case"destroyParticipant":this.state.records.lastDestroyed=e.actor,this.state.records.destroyedActors.set(e.actor,this.state.records.messages.length);break;case"activeStart":this.addSignal(e.actor,void 0,void 0,e.signalType);break;case"activeEnd":this.addSignal(e.actor,void 0,void 0,e.signalType);break;case"addNote":this.addNote(e.actor,e.placement,e.text);break;case"addLinks":this.addLinks(e.actor,e.text);break;case"addALink":this.addALink(e.actor,e.text);break;case"addProperties":this.addProperties(e.actor,e.text);break;case"addDetails":this.addDetails(e.actor,e.text);break;case"addMessage":if(this.state.records.lastCreated){if(e.to!==this.state.records.lastCreated)throw new Error("The created participant "+this.state.records.lastCreated.name+" does not have an associated creating message after its declaration. Please check the sequence diagram.");this.state.records.lastCreated=void 0}else if(this.state.records.lastDestroyed){if(e.to!==this.state.records.lastDestroyed&&e.from!==this.state.records.lastDestroyed)throw new Error("The destroyed participant "+this.state.records.lastDestroyed.name+" does not have an associated destroying message after its declaration. Please check the sequence diagram.");this.state.records.lastDestroyed=void 0}this.addSignal(e.from,e.to,e.msg,e.signalType,e.activate);break;case"boxStart":this.addBox(e.boxData);break;case"boxEnd":this.boxEnd();break;case"loopStart":this.addSignal(void 0,void 0,e.loopText,e.signalType);break;case"loopEnd":this.addSignal(void 0,void 0,void 0,e.signalType);break;case"rectStart":this.addSignal(void 0,void 0,e.color,e.signalType);break;case"rectEnd":this.addSignal(void 0,void 0,void 0,e.signalType);break;case"optStart":this.addSignal(void 0,void 0,e.optText,e.signalType);break;case"optEnd":this.addSignal(void 0,void 0,void 0,e.signalType);break;case"altStart":this.addSignal(void 0,void 0,e.altText,e.signalType);break;case"else":this.addSignal(void 0,void 0,e.altText,e.signalType);break;case"altEnd":this.addSignal(void 0,void 0,void 0,e.signalType);break;case"setAccTitle":Sr(e.text);break;case"parStart":this.addSignal(void 0,void 0,e.parText,e.signalType);break;case"and":this.addSignal(void 0,void 0,e.parText,e.signalType);break;case"parEnd":this.addSignal(void 0,void 0,void 0,e.signalType);break;case"criticalStart":this.addSignal(void 0,void 0,e.criticalText,e.signalType);break;case"option":this.addSignal(void 0,void 0,e.optionText,e.signalType);break;case"criticalEnd":this.addSignal(void 0,void 0,void 0,e.signalType);break;case"breakStart":this.addSignal(void 0,void 0,e.breakText,e.signalType);break;case"breakEnd":this.addSignal(void 0,void 0,void 0,e.signalType);break}}getConfig(){return Te().sequence}},x(Ex,"SequenceDB"),Ex),yxt=x(t=>`.actor { +`,"getStyles"),G5t=$5t,MCe={};k1(MCe,{draw:()=>q5t});q5t=b(async function(t,e,r,n){he.info("REF0:"),he.info("Drawing requirement diagram (unified)",e);let{securityLevel:i,state:a,layout:s}=Fe(),o=n.db.getData(),l=k0(e,i);o.type=n.type,o.layoutAlgorithm=Fd(s),o.nodeSpacing=a?.nodeSpacing??50,o.rankSpacing=a?.rankSpacing??50,o.markers=["requirement_contains","requirement_arrow"],o.diagramId=e,await y0(o,l);let u=8;gr.insertTitle(l,"requirementDiagramTitleText",a?.titleTopMargin??25,n.db.getDiagramTitle()),T0(l,u,"requirementDiagram",a?.useMaxWidth??!0)},"draw"),U5t={parser:F5t,get db(){return new z5t},renderer:MCe,styles:G5t}});var KCe={};Mr(KCe,{diagram:()=>S6t});async function HCe(t,e){Rt.bumpVerticalPos(10);let{startx:r,stopx:n,message:i}=e,a=St.splitBreaks(i).length,s=za(i),o=s?await u2(i,Fe()):gr.calculateTextDimensions(i,rg(Qe));if(!s){let f=o.height/a;e.height+=f,Rt.bumpVerticalPos(f)}let l,u=o.height-10,h=o.width;if(r===n){l=Rt.getVerticalPos()+u,Qe.rightAngles||(u+=Qe.boxMargin,l=Rt.getVerticalPos()+u),u+=30;let f=St.getMax(h/2,Qe.width/2);Rt.insert(r-f,Rt.getVerticalPos()-10+u,n+f,Rt.getVerticalPos()+30+u)}else u+=Qe.boxMargin,l=Rt.getVerticalPos()+u,Rt.insert(r,l-10,n,l);return Rt.bumpVerticalPos(u),e.height+=u,e.stopy=e.starty+e.height,Rt.insert(e.fromBounds,e.starty,e.toBounds,e.stopy),l}function Ec(t,e,r,n,i){Rt.bumpVerticalPos(r);let a=n;if(e.id&&e.message&&t[e.id]){let s=t[e.id].width,o=rg(Qe);e.message=gr.wrapLabel(`[${e.message}]`,s-2*Qe.wrapPadding,o),e.width=s,e.wrap=!0;let l=gr.calculateTextDimensions(e.message,o),u=St.getMax(l.height,Qe.labelBoxHeight);a=n+u,he.debug(`${u} - ${e.message}`)}i(e),Rt.bumpVerticalPos(a)}function YCe(t,e,r,n,i,a,s){function o(u,h){u.x{let s=rg(Qe),o=a.actorKeys.reduce((h,f)=>h+=t.get(f).width+(t.get(f).margin||0),0);o-=2*Qe.boxTextMargin,a.wrap&&(a.name=gr.wrapLabel(a.name,o-2*Qe.wrapPadding,s));let l=gr.calculateTextDimensions(a.name,s);i=St.getMax(l.height,i);let u=St.getMax(o,l.width+2*Qe.wrapPadding);if(a.margin=Qe.boxTextMargin,oa.textMaxHeight=i),St.getMax(n,Qe.height)}var zV,PV,H5t,V5t,W5t,Y5t,B4,X5t,j5t,K5t,tg,FCe,zCe,Z5t,PCe,$V,Q5t,J5t,$L,F4,$Ce,eh,GCe,e6t,t6t,r6t,n6t,i6t,a6t,s6t,qCe,o6t,l6t,u6t,c6t,h6t,f6t,d6t,UCe,p6t,GV,m6t,ha,Qe,Rt,g6t,rg,P4,BV,y6t,v6t,FV,VCe,WCe,GL,BCe,x6t,b6t,w6t,k6t,T6t,E6t,S6t,ZCe=D(()=>{WS();tC();Hn();Nr();Or();zV=Na(b2(),1),PV=(function(){var t=b(function(ue,ie,le,oe){for(le=le||{},oe=ue.length;oe--;le[ue[oe]]=ie);return le},"o"),e=[1,2],r=[1,3],n=[1,4],i=[2,4],a=[1,9],s=[1,11],o=[1,13],l=[1,14],u=[1,16],h=[1,17],f=[1,18],d=[1,24],p=[1,25],m=[1,26],g=[1,27],y=[1,28],v=[1,29],x=[1,30],k=[1,31],_=[1,32],T=[1,33],S=[1,34],R=[1,35],A=[1,36],I=[1,37],P=[1,38],O=[1,39],C=[1,41],N=[1,42],B=[1,43],F=[1,44],M=[1,45],$=[1,46],z=[1,4,5,13,14,16,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,47,48,49,50,52,53,54,59,60,61,62,70],q=[4,5,16,50,52,53],V=[4,5,13,14,16,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,50,52,53,54,59,60,61,62,70],U=[4,5,13,14,16,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,49,50,52,53,54,59,60,61,62,70],J=[4,5,13,14,16,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,48,50,52,53,54,59,60,61,62,70],se=[4,5,13,14,16,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,47,50,52,53,54,59,60,61,62,70],re=[68,69,70],me=[1,122],ge={trace:b(function(){},"trace"),yy:{},symbols_:{error:2,start:3,SPACE:4,NEWLINE:5,SD:6,document:7,line:8,statement:9,box_section:10,box_line:11,participant_statement:12,create:13,box:14,restOfLine:15,end:16,signal:17,autonumber:18,NUM:19,off:20,activate:21,actor:22,deactivate:23,note_statement:24,links_statement:25,link_statement:26,properties_statement:27,details_statement:28,title:29,legacy_title:30,acc_title:31,acc_title_value:32,acc_descr:33,acc_descr_value:34,acc_descr_multiline_value:35,loop:36,rect:37,opt:38,alt:39,else_sections:40,par:41,par_sections:42,par_over:43,critical:44,option_sections:45,break:46,option:47,and:48,else:49,participant:50,AS:51,participant_actor:52,destroy:53,note:54,placement:55,text2:56,over:57,actor_pair:58,links:59,link:60,properties:61,details:62,spaceList:63,",":64,left_of:65,right_of:66,signaltype:67,"+":68,"-":69,ACTOR:70,SOLID_OPEN_ARROW:71,DOTTED_OPEN_ARROW:72,SOLID_ARROW:73,BIDIRECTIONAL_SOLID_ARROW:74,DOTTED_ARROW:75,BIDIRECTIONAL_DOTTED_ARROW:76,SOLID_CROSS:77,DOTTED_CROSS:78,SOLID_POINT:79,DOTTED_POINT:80,TXT:81,$accept:0,$end:1},terminals_:{2:"error",4:"SPACE",5:"NEWLINE",6:"SD",13:"create",14:"box",15:"restOfLine",16:"end",18:"autonumber",19:"NUM",20:"off",21:"activate",23:"deactivate",29:"title",30:"legacy_title",31:"acc_title",32:"acc_title_value",33:"acc_descr",34:"acc_descr_value",35:"acc_descr_multiline_value",36:"loop",37:"rect",38:"opt",39:"alt",41:"par",43:"par_over",44:"critical",46:"break",47:"option",48:"and",49:"else",50:"participant",51:"AS",52:"participant_actor",53:"destroy",54:"note",57:"over",59:"links",60:"link",61:"properties",62:"details",64:",",65:"left_of",66:"right_of",68:"+",69:"-",70:"ACTOR",71:"SOLID_OPEN_ARROW",72:"DOTTED_OPEN_ARROW",73:"SOLID_ARROW",74:"BIDIRECTIONAL_SOLID_ARROW",75:"DOTTED_ARROW",76:"BIDIRECTIONAL_DOTTED_ARROW",77:"SOLID_CROSS",78:"DOTTED_CROSS",79:"SOLID_POINT",80:"DOTTED_POINT",81:"TXT"},productions_:[0,[3,2],[3,2],[3,2],[7,0],[7,2],[8,2],[8,1],[8,1],[10,0],[10,2],[11,2],[11,1],[11,1],[9,1],[9,2],[9,4],[9,2],[9,4],[9,3],[9,3],[9,2],[9,3],[9,3],[9,2],[9,2],[9,2],[9,2],[9,2],[9,1],[9,1],[9,2],[9,2],[9,1],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[45,1],[45,4],[42,1],[42,4],[40,1],[40,4],[12,5],[12,3],[12,5],[12,3],[12,3],[24,4],[24,4],[25,3],[26,3],[27,3],[28,3],[63,2],[63,1],[58,3],[58,1],[55,1],[55,1],[17,5],[17,5],[17,4],[22,1],[67,1],[67,1],[67,1],[67,1],[67,1],[67,1],[67,1],[67,1],[67,1],[67,1],[56,1]],performAction:b(function(ie,le,oe,ne,pe,te,He){var de=te.length-1;switch(pe){case 3:return ne.apply(te[de]),te[de];break;case 4:case 9:this.$=[];break;case 5:case 10:te[de-1].push(te[de]),this.$=te[de-1];break;case 6:case 7:case 11:case 12:this.$=te[de];break;case 8:case 13:this.$=[];break;case 15:te[de].type="createParticipant",this.$=te[de];break;case 16:te[de-1].unshift({type:"boxStart",boxData:ne.parseBoxData(te[de-2])}),te[de-1].push({type:"boxEnd",boxText:te[de-2]}),this.$=te[de-1];break;case 18:this.$={type:"sequenceIndex",sequenceIndex:Number(te[de-2]),sequenceIndexStep:Number(te[de-1]),sequenceVisible:!0,signalType:ne.LINETYPE.AUTONUMBER};break;case 19:this.$={type:"sequenceIndex",sequenceIndex:Number(te[de-1]),sequenceIndexStep:1,sequenceVisible:!0,signalType:ne.LINETYPE.AUTONUMBER};break;case 20:this.$={type:"sequenceIndex",sequenceVisible:!1,signalType:ne.LINETYPE.AUTONUMBER};break;case 21:this.$={type:"sequenceIndex",sequenceVisible:!0,signalType:ne.LINETYPE.AUTONUMBER};break;case 22:this.$={type:"activeStart",signalType:ne.LINETYPE.ACTIVE_START,actor:te[de-1].actor};break;case 23:this.$={type:"activeEnd",signalType:ne.LINETYPE.ACTIVE_END,actor:te[de-1].actor};break;case 29:ne.setDiagramTitle(te[de].substring(6)),this.$=te[de].substring(6);break;case 30:ne.setDiagramTitle(te[de].substring(7)),this.$=te[de].substring(7);break;case 31:this.$=te[de].trim(),ne.setAccTitle(this.$);break;case 32:case 33:this.$=te[de].trim(),ne.setAccDescription(this.$);break;case 34:te[de-1].unshift({type:"loopStart",loopText:ne.parseMessage(te[de-2]),signalType:ne.LINETYPE.LOOP_START}),te[de-1].push({type:"loopEnd",loopText:te[de-2],signalType:ne.LINETYPE.LOOP_END}),this.$=te[de-1];break;case 35:te[de-1].unshift({type:"rectStart",color:ne.parseMessage(te[de-2]),signalType:ne.LINETYPE.RECT_START}),te[de-1].push({type:"rectEnd",color:ne.parseMessage(te[de-2]),signalType:ne.LINETYPE.RECT_END}),this.$=te[de-1];break;case 36:te[de-1].unshift({type:"optStart",optText:ne.parseMessage(te[de-2]),signalType:ne.LINETYPE.OPT_START}),te[de-1].push({type:"optEnd",optText:ne.parseMessage(te[de-2]),signalType:ne.LINETYPE.OPT_END}),this.$=te[de-1];break;case 37:te[de-1].unshift({type:"altStart",altText:ne.parseMessage(te[de-2]),signalType:ne.LINETYPE.ALT_START}),te[de-1].push({type:"altEnd",signalType:ne.LINETYPE.ALT_END}),this.$=te[de-1];break;case 38:te[de-1].unshift({type:"parStart",parText:ne.parseMessage(te[de-2]),signalType:ne.LINETYPE.PAR_START}),te[de-1].push({type:"parEnd",signalType:ne.LINETYPE.PAR_END}),this.$=te[de-1];break;case 39:te[de-1].unshift({type:"parStart",parText:ne.parseMessage(te[de-2]),signalType:ne.LINETYPE.PAR_OVER_START}),te[de-1].push({type:"parEnd",signalType:ne.LINETYPE.PAR_END}),this.$=te[de-1];break;case 40:te[de-1].unshift({type:"criticalStart",criticalText:ne.parseMessage(te[de-2]),signalType:ne.LINETYPE.CRITICAL_START}),te[de-1].push({type:"criticalEnd",signalType:ne.LINETYPE.CRITICAL_END}),this.$=te[de-1];break;case 41:te[de-1].unshift({type:"breakStart",breakText:ne.parseMessage(te[de-2]),signalType:ne.LINETYPE.BREAK_START}),te[de-1].push({type:"breakEnd",optText:ne.parseMessage(te[de-2]),signalType:ne.LINETYPE.BREAK_END}),this.$=te[de-1];break;case 43:this.$=te[de-3].concat([{type:"option",optionText:ne.parseMessage(te[de-1]),signalType:ne.LINETYPE.CRITICAL_OPTION},te[de]]);break;case 45:this.$=te[de-3].concat([{type:"and",parText:ne.parseMessage(te[de-1]),signalType:ne.LINETYPE.PAR_AND},te[de]]);break;case 47:this.$=te[de-3].concat([{type:"else",altText:ne.parseMessage(te[de-1]),signalType:ne.LINETYPE.ALT_ELSE},te[de]]);break;case 48:te[de-3].draw="participant",te[de-3].type="addParticipant",te[de-3].description=ne.parseMessage(te[de-1]),this.$=te[de-3];break;case 49:te[de-1].draw="participant",te[de-1].type="addParticipant",this.$=te[de-1];break;case 50:te[de-3].draw="actor",te[de-3].type="addParticipant",te[de-3].description=ne.parseMessage(te[de-1]),this.$=te[de-3];break;case 51:te[de-1].draw="actor",te[de-1].type="addParticipant",this.$=te[de-1];break;case 52:te[de-1].type="destroyParticipant",this.$=te[de-1];break;case 53:this.$=[te[de-1],{type:"addNote",placement:te[de-2],actor:te[de-1].actor,text:te[de]}];break;case 54:te[de-2]=[].concat(te[de-1],te[de-1]).slice(0,2),te[de-2][0]=te[de-2][0].actor,te[de-2][1]=te[de-2][1].actor,this.$=[te[de-1],{type:"addNote",placement:ne.PLACEMENT.OVER,actor:te[de-2].slice(0,2),text:te[de]}];break;case 55:this.$=[te[de-1],{type:"addLinks",actor:te[de-1].actor,text:te[de]}];break;case 56:this.$=[te[de-1],{type:"addALink",actor:te[de-1].actor,text:te[de]}];break;case 57:this.$=[te[de-1],{type:"addProperties",actor:te[de-1].actor,text:te[de]}];break;case 58:this.$=[te[de-1],{type:"addDetails",actor:te[de-1].actor,text:te[de]}];break;case 61:this.$=[te[de-2],te[de]];break;case 62:this.$=te[de];break;case 63:this.$=ne.PLACEMENT.LEFTOF;break;case 64:this.$=ne.PLACEMENT.RIGHTOF;break;case 65:this.$=[te[de-4],te[de-1],{type:"addMessage",from:te[de-4].actor,to:te[de-1].actor,signalType:te[de-3],msg:te[de],activate:!0},{type:"activeStart",signalType:ne.LINETYPE.ACTIVE_START,actor:te[de-1].actor}];break;case 66:this.$=[te[de-4],te[de-1],{type:"addMessage",from:te[de-4].actor,to:te[de-1].actor,signalType:te[de-3],msg:te[de]},{type:"activeEnd",signalType:ne.LINETYPE.ACTIVE_END,actor:te[de-4].actor}];break;case 67:this.$=[te[de-3],te[de-1],{type:"addMessage",from:te[de-3].actor,to:te[de-1].actor,signalType:te[de-2],msg:te[de]}];break;case 68:this.$={type:"addParticipant",actor:te[de]};break;case 69:this.$=ne.LINETYPE.SOLID_OPEN;break;case 70:this.$=ne.LINETYPE.DOTTED_OPEN;break;case 71:this.$=ne.LINETYPE.SOLID;break;case 72:this.$=ne.LINETYPE.BIDIRECTIONAL_SOLID;break;case 73:this.$=ne.LINETYPE.DOTTED;break;case 74:this.$=ne.LINETYPE.BIDIRECTIONAL_DOTTED;break;case 75:this.$=ne.LINETYPE.SOLID_CROSS;break;case 76:this.$=ne.LINETYPE.DOTTED_CROSS;break;case 77:this.$=ne.LINETYPE.SOLID_POINT;break;case 78:this.$=ne.LINETYPE.DOTTED_POINT;break;case 79:this.$=ne.parseMessage(te[de].trim().substring(1));break}},"anonymous"),table:[{3:1,4:e,5:r,6:n},{1:[3]},{3:5,4:e,5:r,6:n},{3:6,4:e,5:r,6:n},t([1,4,5,13,14,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,50,52,53,54,59,60,61,62,70],i,{7:7}),{1:[2,1]},{1:[2,2]},{1:[2,3],4:a,5:s,8:8,9:10,12:12,13:o,14:l,17:15,18:u,21:h,22:40,23:f,24:19,25:20,26:21,27:22,28:23,29:d,30:p,31:m,33:g,35:y,36:v,37:x,38:k,39:_,41:T,43:S,44:R,46:A,50:I,52:P,53:O,54:C,59:N,60:B,61:F,62:M,70:$},t(z,[2,5]),{9:47,12:12,13:o,14:l,17:15,18:u,21:h,22:40,23:f,24:19,25:20,26:21,27:22,28:23,29:d,30:p,31:m,33:g,35:y,36:v,37:x,38:k,39:_,41:T,43:S,44:R,46:A,50:I,52:P,53:O,54:C,59:N,60:B,61:F,62:M,70:$},t(z,[2,7]),t(z,[2,8]),t(z,[2,14]),{12:48,50:I,52:P,53:O},{15:[1,49]},{5:[1,50]},{5:[1,53],19:[1,51],20:[1,52]},{22:54,70:$},{22:55,70:$},{5:[1,56]},{5:[1,57]},{5:[1,58]},{5:[1,59]},{5:[1,60]},t(z,[2,29]),t(z,[2,30]),{32:[1,61]},{34:[1,62]},t(z,[2,33]),{15:[1,63]},{15:[1,64]},{15:[1,65]},{15:[1,66]},{15:[1,67]},{15:[1,68]},{15:[1,69]},{15:[1,70]},{22:71,70:$},{22:72,70:$},{22:73,70:$},{67:74,71:[1,75],72:[1,76],73:[1,77],74:[1,78],75:[1,79],76:[1,80],77:[1,81],78:[1,82],79:[1,83],80:[1,84]},{55:85,57:[1,86],65:[1,87],66:[1,88]},{22:89,70:$},{22:90,70:$},{22:91,70:$},{22:92,70:$},t([5,51,64,71,72,73,74,75,76,77,78,79,80,81],[2,68]),t(z,[2,6]),t(z,[2,15]),t(q,[2,9],{10:93}),t(z,[2,17]),{5:[1,95],19:[1,94]},{5:[1,96]},t(z,[2,21]),{5:[1,97]},{5:[1,98]},t(z,[2,24]),t(z,[2,25]),t(z,[2,26]),t(z,[2,27]),t(z,[2,28]),t(z,[2,31]),t(z,[2,32]),t(V,i,{7:99}),t(V,i,{7:100}),t(V,i,{7:101}),t(U,i,{40:102,7:103}),t(J,i,{42:104,7:105}),t(J,i,{7:105,42:106}),t(se,i,{45:107,7:108}),t(V,i,{7:109}),{5:[1,111],51:[1,110]},{5:[1,113],51:[1,112]},{5:[1,114]},{22:117,68:[1,115],69:[1,116],70:$},t(re,[2,69]),t(re,[2,70]),t(re,[2,71]),t(re,[2,72]),t(re,[2,73]),t(re,[2,74]),t(re,[2,75]),t(re,[2,76]),t(re,[2,77]),t(re,[2,78]),{22:118,70:$},{22:120,58:119,70:$},{70:[2,63]},{70:[2,64]},{56:121,81:me},{56:123,81:me},{56:124,81:me},{56:125,81:me},{4:[1,128],5:[1,130],11:127,12:129,16:[1,126],50:I,52:P,53:O},{5:[1,131]},t(z,[2,19]),t(z,[2,20]),t(z,[2,22]),t(z,[2,23]),{4:a,5:s,8:8,9:10,12:12,13:o,14:l,16:[1,132],17:15,18:u,21:h,22:40,23:f,24:19,25:20,26:21,27:22,28:23,29:d,30:p,31:m,33:g,35:y,36:v,37:x,38:k,39:_,41:T,43:S,44:R,46:A,50:I,52:P,53:O,54:C,59:N,60:B,61:F,62:M,70:$},{4:a,5:s,8:8,9:10,12:12,13:o,14:l,16:[1,133],17:15,18:u,21:h,22:40,23:f,24:19,25:20,26:21,27:22,28:23,29:d,30:p,31:m,33:g,35:y,36:v,37:x,38:k,39:_,41:T,43:S,44:R,46:A,50:I,52:P,53:O,54:C,59:N,60:B,61:F,62:M,70:$},{4:a,5:s,8:8,9:10,12:12,13:o,14:l,16:[1,134],17:15,18:u,21:h,22:40,23:f,24:19,25:20,26:21,27:22,28:23,29:d,30:p,31:m,33:g,35:y,36:v,37:x,38:k,39:_,41:T,43:S,44:R,46:A,50:I,52:P,53:O,54:C,59:N,60:B,61:F,62:M,70:$},{16:[1,135]},{4:a,5:s,8:8,9:10,12:12,13:o,14:l,16:[2,46],17:15,18:u,21:h,22:40,23:f,24:19,25:20,26:21,27:22,28:23,29:d,30:p,31:m,33:g,35:y,36:v,37:x,38:k,39:_,41:T,43:S,44:R,46:A,49:[1,136],50:I,52:P,53:O,54:C,59:N,60:B,61:F,62:M,70:$},{16:[1,137]},{4:a,5:s,8:8,9:10,12:12,13:o,14:l,16:[2,44],17:15,18:u,21:h,22:40,23:f,24:19,25:20,26:21,27:22,28:23,29:d,30:p,31:m,33:g,35:y,36:v,37:x,38:k,39:_,41:T,43:S,44:R,46:A,48:[1,138],50:I,52:P,53:O,54:C,59:N,60:B,61:F,62:M,70:$},{16:[1,139]},{16:[1,140]},{4:a,5:s,8:8,9:10,12:12,13:o,14:l,16:[2,42],17:15,18:u,21:h,22:40,23:f,24:19,25:20,26:21,27:22,28:23,29:d,30:p,31:m,33:g,35:y,36:v,37:x,38:k,39:_,41:T,43:S,44:R,46:A,47:[1,141],50:I,52:P,53:O,54:C,59:N,60:B,61:F,62:M,70:$},{4:a,5:s,8:8,9:10,12:12,13:o,14:l,16:[1,142],17:15,18:u,21:h,22:40,23:f,24:19,25:20,26:21,27:22,28:23,29:d,30:p,31:m,33:g,35:y,36:v,37:x,38:k,39:_,41:T,43:S,44:R,46:A,50:I,52:P,53:O,54:C,59:N,60:B,61:F,62:M,70:$},{15:[1,143]},t(z,[2,49]),{15:[1,144]},t(z,[2,51]),t(z,[2,52]),{22:145,70:$},{22:146,70:$},{56:147,81:me},{56:148,81:me},{56:149,81:me},{64:[1,150],81:[2,62]},{5:[2,55]},{5:[2,79]},{5:[2,56]},{5:[2,57]},{5:[2,58]},t(z,[2,16]),t(q,[2,10]),{12:151,50:I,52:P,53:O},t(q,[2,12]),t(q,[2,13]),t(z,[2,18]),t(z,[2,34]),t(z,[2,35]),t(z,[2,36]),t(z,[2,37]),{15:[1,152]},t(z,[2,38]),{15:[1,153]},t(z,[2,39]),t(z,[2,40]),{15:[1,154]},t(z,[2,41]),{5:[1,155]},{5:[1,156]},{56:157,81:me},{56:158,81:me},{5:[2,67]},{5:[2,53]},{5:[2,54]},{22:159,70:$},t(q,[2,11]),t(U,i,{7:103,40:160}),t(J,i,{7:105,42:161}),t(se,i,{7:108,45:162}),t(z,[2,48]),t(z,[2,50]),{5:[2,65]},{5:[2,66]},{81:[2,61]},{16:[2,47]},{16:[2,45]},{16:[2,43]}],defaultActions:{5:[2,1],6:[2,2],87:[2,63],88:[2,64],121:[2,55],122:[2,79],123:[2,56],124:[2,57],125:[2,58],147:[2,67],148:[2,53],149:[2,54],157:[2,65],158:[2,66],159:[2,61],160:[2,47],161:[2,45],162:[2,43]},parseError:b(function(ie,le){if(le.recoverable)this.trace(ie);else{var oe=new Error(ie);throw oe.hash=le,oe}},"parseError"),parse:b(function(ie){var le=this,oe=[0],ne=[],pe=[null],te=[],He=this.table,de="",ce=0,st=0,Ae=0,Ye=2,Ge=1,rt=te.slice.call(arguments,1),Xe=Object.create(this.lexer),Ze={yy:{}};for(var Pe in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Pe)&&(Ze.yy[Pe]=this.yy[Pe]);Xe.setInput(ie,Ze.yy),Ze.yy.lexer=Xe,Ze.yy.parser=this,typeof Xe.yylloc>"u"&&(Xe.yylloc={});var Re=Xe.yylloc;te.push(Re);var Ve=Xe.options&&Xe.options.ranges;typeof Ze.yy.parseError=="function"?this.parseError=Ze.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function ke(gt){oe.length=oe.length-2*gt,pe.length=pe.length-gt,te.length=te.length-gt}b(ke,"popStack");function xe(){var gt;return gt=ne.pop()||Xe.lex()||Ge,typeof gt!="number"&&(gt instanceof Array&&(ne=gt,gt=ne.pop()),gt=le.symbols_[gt]||gt),gt}b(xe,"lex");for(var H,ve,K,we,Ee,Ke,Be={},De,nt,We,ut;;){if(K=oe[oe.length-1],this.defaultActions[K]?we=this.defaultActions[K]:((H===null||typeof H>"u")&&(H=xe()),we=He[K]&&He[K][H]),typeof we>"u"||!we.length||!we[0]){var vt="";ut=[];for(De in He[K])this.terminals_[De]&&De>Ye&&ut.push("'"+this.terminals_[De]+"'");Xe.showPosition?vt="Parse error on line "+(ce+1)+`: +`+Xe.showPosition()+` +Expecting `+ut.join(", ")+", got '"+(this.terminals_[H]||H)+"'":vt="Parse error on line "+(ce+1)+": Unexpected "+(H==Ge?"end of input":"'"+(this.terminals_[H]||H)+"'"),this.parseError(vt,{text:Xe.match,token:this.terminals_[H]||H,line:Xe.yylineno,loc:Re,expected:ut})}if(we[0]instanceof Array&&we.length>1)throw new Error("Parse Error: multiple actions possible at state: "+K+", token: "+H);switch(we[0]){case 1:oe.push(H),pe.push(Xe.yytext),te.push(Xe.yylloc),oe.push(we[1]),H=null,ve?(H=ve,ve=null):(st=Xe.yyleng,de=Xe.yytext,ce=Xe.yylineno,Re=Xe.yylloc,Ae>0&&Ae--);break;case 2:if(nt=this.productions_[we[1]][1],Be.$=pe[pe.length-nt],Be._$={first_line:te[te.length-(nt||1)].first_line,last_line:te[te.length-1].last_line,first_column:te[te.length-(nt||1)].first_column,last_column:te[te.length-1].last_column},Ve&&(Be._$.range=[te[te.length-(nt||1)].range[0],te[te.length-1].range[1]]),Ke=this.performAction.apply(Be,[de,st,ce,Ze.yy,we[1],pe,te].concat(rt)),typeof Ke<"u")return Ke;nt&&(oe=oe.slice(0,-1*nt*2),pe=pe.slice(0,-1*nt),te=te.slice(0,-1*nt)),oe.push(this.productions_[we[1]][0]),pe.push(Be.$),te.push(Be._$),We=He[oe[oe.length-2]][oe[oe.length-1]],oe.push(We);break;case 3:return!0}}return!0},"parse")},ye=(function(){var ue={EOF:1,parseError:b(function(le,oe){if(this.yy.parser)this.yy.parser.parseError(le,oe);else throw new Error(le)},"parseError"),setInput:b(function(ie,le){return this.yy=le||this.yy||{},this._input=ie,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:b(function(){var ie=this._input[0];this.yytext+=ie,this.yyleng++,this.offset++,this.match+=ie,this.matched+=ie;var le=ie.match(/(?:\r\n?|\n).*/g);return le?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),ie},"input"),unput:b(function(ie){var le=ie.length,oe=ie.split(/(?:\r\n?|\n)/g);this._input=ie+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-le),this.offset-=le;var ne=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),oe.length-1&&(this.yylineno-=oe.length-1);var pe=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:oe?(oe.length===ne.length?this.yylloc.first_column:0)+ne[ne.length-oe.length].length-oe[0].length:this.yylloc.first_column-le},this.options.ranges&&(this.yylloc.range=[pe[0],pe[0]+this.yyleng-le]),this.yyleng=this.yytext.length,this},"unput"),more:b(function(){return this._more=!0,this},"more"),reject:b(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). +`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:b(function(ie){this.unput(this.match.slice(ie))},"less"),pastInput:b(function(){var ie=this.matched.substr(0,this.matched.length-this.match.length);return(ie.length>20?"...":"")+ie.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:b(function(){var ie=this.match;return ie.length<20&&(ie+=this._input.substr(0,20-ie.length)),(ie.substr(0,20)+(ie.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:b(function(){var ie=this.pastInput(),le=new Array(ie.length+1).join("-");return ie+this.upcomingInput()+` +`+le+"^"},"showPosition"),test_match:b(function(ie,le){var oe,ne,pe;if(this.options.backtrack_lexer&&(pe={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(pe.yylloc.range=this.yylloc.range.slice(0))),ne=ie[0].match(/(?:\r\n?|\n).*/g),ne&&(this.yylineno+=ne.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:ne?ne[ne.length-1].length-ne[ne.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+ie[0].length},this.yytext+=ie[0],this.match+=ie[0],this.matches=ie,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(ie[0].length),this.matched+=ie[0],oe=this.performAction.call(this,this.yy,this,le,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),oe)return oe;if(this._backtrack){for(var te in pe)this[te]=pe[te];return!1}return!1},"test_match"),next:b(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var ie,le,oe,ne;this._more||(this.yytext="",this.match="");for(var pe=this._currentRules(),te=0;tele[0].length)){if(le=oe,ne=te,this.options.backtrack_lexer){if(ie=this.test_match(oe,pe[te]),ie!==!1)return ie;if(this._backtrack){le=!1;continue}else return!1}else if(!this.options.flex)break}return le?(ie=this.test_match(le,pe[ne]),ie!==!1?ie:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. +`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:b(function(){var le=this.next();return le||this.lex()},"lex"),begin:b(function(le){this.conditionStack.push(le)},"begin"),popState:b(function(){var le=this.conditionStack.length-1;return le>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:b(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:b(function(le){return le=this.conditionStack.length-1-Math.abs(le||0),le>=0?this.conditionStack[le]:"INITIAL"},"topState"),pushState:b(function(le){this.begin(le)},"pushState"),stateStackSize:b(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:b(function(le,oe,ne,pe){var te=pe;switch(ne){case 0:return 5;case 1:break;case 2:break;case 3:break;case 4:break;case 5:break;case 6:return 19;case 7:return this.begin("LINE"),14;break;case 8:return this.begin("ID"),50;break;case 9:return this.begin("ID"),52;break;case 10:return 13;case 11:return this.begin("ID"),53;break;case 12:return oe.yytext=oe.yytext.trim(),this.begin("ALIAS"),70;break;case 13:return this.popState(),this.popState(),this.begin("LINE"),51;break;case 14:return this.popState(),this.popState(),5;break;case 15:return this.begin("LINE"),36;break;case 16:return this.begin("LINE"),37;break;case 17:return this.begin("LINE"),38;break;case 18:return this.begin("LINE"),39;break;case 19:return this.begin("LINE"),49;break;case 20:return this.begin("LINE"),41;break;case 21:return this.begin("LINE"),43;break;case 22:return this.begin("LINE"),48;break;case 23:return this.begin("LINE"),44;break;case 24:return this.begin("LINE"),47;break;case 25:return this.begin("LINE"),46;break;case 26:return this.popState(),15;break;case 27:return 16;case 28:return 65;case 29:return 66;case 30:return 59;case 31:return 60;case 32:return 61;case 33:return 62;case 34:return 57;case 35:return 54;case 36:return this.begin("ID"),21;break;case 37:return this.begin("ID"),23;break;case 38:return 29;case 39:return 30;case 40:return this.begin("acc_title"),31;break;case 41:return this.popState(),"acc_title_value";break;case 42:return this.begin("acc_descr"),33;break;case 43:return this.popState(),"acc_descr_value";break;case 44:this.begin("acc_descr_multiline");break;case 45:this.popState();break;case 46:return"acc_descr_multiline_value";case 47:return 6;case 48:return 18;case 49:return 20;case 50:return 64;case 51:return 5;case 52:return oe.yytext=oe.yytext.trim(),70;break;case 53:return 73;case 54:return 74;case 55:return 75;case 56:return 76;case 57:return 71;case 58:return 72;case 59:return 77;case 60:return 78;case 61:return 79;case 62:return 80;case 63:return 81;case 64:return 68;case 65:return 69;case 66:return 5;case 67:return"INVALID"}},"anonymous"),rules:[/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:((?!\n)\s)+)/i,/^(?:#[^\n]*)/i,/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[0-9]+(?=[ \n]+))/i,/^(?:box\b)/i,/^(?:participant\b)/i,/^(?:actor\b)/i,/^(?:create\b)/i,/^(?:destroy\b)/i,/^(?:[^\<->\->:\n,;]+?([\-]*[^\<->\->:\n,;]+?)*?(?=((?!\n)\s)+as(?!\n)\s|[#\n;]|$))/i,/^(?:as\b)/i,/^(?:(?:))/i,/^(?:loop\b)/i,/^(?:rect\b)/i,/^(?:opt\b)/i,/^(?:alt\b)/i,/^(?:else\b)/i,/^(?:par\b)/i,/^(?:par_over\b)/i,/^(?:and\b)/i,/^(?:critical\b)/i,/^(?:option\b)/i,/^(?:break\b)/i,/^(?:(?:[:]?(?:no)?wrap)?[^#\n;]*)/i,/^(?:end\b)/i,/^(?:left of\b)/i,/^(?:right of\b)/i,/^(?:links\b)/i,/^(?:link\b)/i,/^(?:properties\b)/i,/^(?:details\b)/i,/^(?:over\b)/i,/^(?:note\b)/i,/^(?:activate\b)/i,/^(?:deactivate\b)/i,/^(?:title\s[^#\n;]+)/i,/^(?:title:\s[^#\n;]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:sequenceDiagram\b)/i,/^(?:autonumber\b)/i,/^(?:off\b)/i,/^(?:,)/i,/^(?:;)/i,/^(?:[^\+\<->\->:\n,;]+((?!(-x|--x|-\)|--\)))[\-]*[^\+\<->\->:\n,;]+)*)/i,/^(?:->>)/i,/^(?:<<->>)/i,/^(?:-->>)/i,/^(?:<<-->>)/i,/^(?:->)/i,/^(?:-->)/i,/^(?:-[x])/i,/^(?:--[x])/i,/^(?:-[\)])/i,/^(?:--[\)])/i,/^(?::(?:(?:no)?wrap)?[^#\n;]+)/i,/^(?:\+)/i,/^(?:-)/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[45,46],inclusive:!1},acc_descr:{rules:[43],inclusive:!1},acc_title:{rules:[41],inclusive:!1},ID:{rules:[2,3,12],inclusive:!1},ALIAS:{rules:[2,3,13,14],inclusive:!1},LINE:{rules:[2,3,26],inclusive:!1},INITIAL:{rules:[0,1,3,4,5,6,7,8,9,10,11,15,16,17,18,19,20,21,22,23,24,25,27,28,29,30,31,32,33,34,35,36,37,38,39,40,42,44,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67],inclusive:!0}}};return ue})();ge.lexer=ye;function _e(){this.yy={}}return b(_e,"Parser"),_e.prototype=ge,ge.Parser=_e,new _e})();PV.parser=PV;H5t=PV,V5t={SOLID:0,DOTTED:1,NOTE:2,SOLID_CROSS:3,DOTTED_CROSS:4,SOLID_OPEN:5,DOTTED_OPEN:6,LOOP_START:10,LOOP_END:11,ALT_START:12,ALT_ELSE:13,ALT_END:14,OPT_START:15,OPT_END:16,ACTIVE_START:17,ACTIVE_END:18,PAR_START:19,PAR_AND:20,PAR_END:21,RECT_START:22,RECT_END:23,SOLID_POINT:24,DOTTED_POINT:25,AUTONUMBER:26,CRITICAL_START:27,CRITICAL_OPTION:28,CRITICAL_END:29,BREAK_START:30,BREAK_END:31,PAR_OVER_START:32,BIDIRECTIONAL_SOLID:33,BIDIRECTIONAL_DOTTED:34},W5t={FILLED:0,OPEN:1},Y5t={LEFTOF:0,RIGHTOF:1,OVER:2},X5t=(B4=class{constructor(){this.state=new Ly(()=>({prevActor:void 0,actors:new Map,createdActors:new Map,destroyedActors:new Map,boxes:[],messages:[],notes:[],sequenceNumbersEnabled:!1,wrapEnabled:void 0,currentBox:void 0,lastCreated:void 0,lastDestroyed:void 0})),this.setAccTitle=en,this.setAccDescription=rn,this.setDiagramTitle=pn,this.getAccTitle=tn,this.getAccDescription=nn,this.getDiagramTitle=an,this.apply=this.apply.bind(this),this.parseBoxData=this.parseBoxData.bind(this),this.parseMessage=this.parseMessage.bind(this),this.clear(),this.setWrap(Fe().wrap),this.LINETYPE=V5t,this.ARROWTYPE=W5t,this.PLACEMENT=Y5t}addBox(e){this.state.records.boxes.push({name:e.text,wrap:e.wrap??this.autoWrap(),fill:e.color,actorKeys:[]}),this.state.records.currentBox=this.state.records.boxes.slice(-1)[0]}addActor(e,r,n,i){let a=this.state.records.currentBox,s=this.state.records.actors.get(e);if(s){if(this.state.records.currentBox&&s.box&&this.state.records.currentBox!==s.box)throw new Error(`A same participant should only be defined in one Box: ${s.name} can't be in '${s.box.name}' and in '${this.state.records.currentBox.name}' at the same time.`);if(a=s.box?s.box:this.state.records.currentBox,s.box=a,s&&r===s.name&&n==null)return}if(n?.text==null&&(n={text:r,type:i}),(i==null||n.text==null)&&(n={text:r,type:i}),this.state.records.actors.set(e,{box:a,name:r,description:n.text,wrap:n.wrap??this.autoWrap(),prevActor:this.state.records.prevActor,links:{},properties:{},actorCnt:null,rectData:null,type:i??"participant"}),this.state.records.prevActor){let o=this.state.records.actors.get(this.state.records.prevActor);o&&(o.nextActor=e)}this.state.records.currentBox&&this.state.records.currentBox.actorKeys.push(e),this.state.records.prevActor=e}activationCount(e){let r,n=0;if(!e)return 0;for(r=0;r>-",token:"->>-",line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["'ACTIVE_PARTICIPANT'"]},o}return this.state.records.messages.push({id:this.state.records.messages.length.toString(),from:e,to:r,message:n?.text??"",wrap:n?.wrap??this.autoWrap(),type:i,activate:a}),!0}hasAtLeastOneBox(){return this.state.records.boxes.length>0}hasAtLeastOneBoxWithTitle(){return this.state.records.boxes.some(e=>e.name)}getMessages(){return this.state.records.messages}getBoxes(){return this.state.records.boxes}getActors(){return this.state.records.actors}getCreatedActors(){return this.state.records.createdActors}getDestroyedActors(){return this.state.records.destroyedActors}getActor(e){return this.state.records.actors.get(e)}getActorKeys(){return[...this.state.records.actors.keys()]}enableSequenceNumbers(){this.state.records.sequenceNumbersEnabled=!0}disableSequenceNumbers(){this.state.records.sequenceNumbersEnabled=!1}showSequenceNumbers(){return this.state.records.sequenceNumbersEnabled}setWrap(e){this.state.records.wrapEnabled=e}extractWrap(e){if(e===void 0)return{};e=e.trim();let r=/^:?wrap:/.exec(e)!==null?!0:/^:?nowrap:/.exec(e)!==null?!1:void 0;return{cleanedText:(r===void 0?e:e.replace(/^:?(?:no)?wrap:/,"")).trim(),wrap:r}}autoWrap(){return this.state.records.wrapEnabled!==void 0?this.state.records.wrapEnabled:Fe().sequence?.wrap??!1}clear(){this.state.reset(),Jr()}parseMessage(e){let r=e.trim(),{wrap:n,cleanedText:i}=this.extractWrap(r),a={text:i,wrap:n};return he.debug(`parseMessage: ${JSON.stringify(a)}`),a}parseBoxData(e){let r=/^((?:rgba?|hsla?)\s*\(.*\)|\w*)(.*)$/.exec(e),n=r?.[1]?r[1].trim():"transparent",i=r?.[2]?r[2].trim():void 0;if(window?.CSS)window.CSS.supports("color",n)||(n="transparent",i=e.trim());else{let o=new Option().style;o.color=n,o.color!==n&&(n="transparent",i=e.trim())}let{wrap:a,cleanedText:s}=this.extractWrap(i);return{text:s?Qr(s,Fe()):void 0,color:n,wrap:a}}addNote(e,r,n){let i={actor:e,placement:r,message:n.text,wrap:n.wrap??this.autoWrap()},a=[].concat(e,e);this.state.records.notes.push(i),this.state.records.messages.push({id:this.state.records.messages.length.toString(),from:a[0],to:a[1],message:n.text,wrap:n.wrap??this.autoWrap(),type:this.LINETYPE.NOTE,placement:r})}addLinks(e,r){let n=this.getActor(e);try{let i=Qr(r.text,Fe());i=i.replace(/=/g,"="),i=i.replace(/&/g,"&");let a=JSON.parse(i);this.insertLinks(n,a)}catch(i){he.error("error while parsing actor link text",i)}}addALink(e,r){let n=this.getActor(e);try{let i={},a=Qr(r.text,Fe()),s=a.indexOf("@");a=a.replace(/=/g,"="),a=a.replace(/&/g,"&");let o=a.slice(0,s-1).trim(),l=a.slice(s+1).trim();i[o]=l,this.insertLinks(n,i)}catch(i){he.error("error while parsing actor link text",i)}}insertLinks(e,r){if(e.links==null)e.links=r;else for(let n in r)e.links[n]=r[n]}addProperties(e,r){let n=this.getActor(e);try{let i=Qr(r.text,Fe()),a=JSON.parse(i);this.insertProperties(n,a)}catch(i){he.error("error while parsing actor properties text",i)}}insertProperties(e,r){if(e.properties==null)e.properties=r;else for(let n in r)e.properties[n]=r[n]}boxEnd(){this.state.records.currentBox=void 0}addDetails(e,r){let n=this.getActor(e),i=document.getElementById(r.text);try{let a=i.innerHTML,s=JSON.parse(a);s.properties&&this.insertProperties(n,s.properties),s.links&&this.insertLinks(n,s.links)}catch(a){he.error("error while parsing actor details text",a)}}getActorProperty(e,r){if(e?.properties!==void 0)return e.properties[r]}apply(e){if(Array.isArray(e))e.forEach(r=>{this.apply(r)});else switch(e.type){case"sequenceIndex":this.state.records.messages.push({id:this.state.records.messages.length.toString(),from:void 0,to:void 0,message:{start:e.sequenceIndex,step:e.sequenceIndexStep,visible:e.sequenceVisible},wrap:!1,type:e.signalType});break;case"addParticipant":this.addActor(e.actor,e.actor,e.description,e.draw);break;case"createParticipant":if(this.state.records.actors.has(e.actor))throw new Error("It is not possible to have actors with the same id, even if one is destroyed before the next is created. Use 'AS' aliases to simulate the behavior");this.state.records.lastCreated=e.actor,this.addActor(e.actor,e.actor,e.description,e.draw),this.state.records.createdActors.set(e.actor,this.state.records.messages.length);break;case"destroyParticipant":this.state.records.lastDestroyed=e.actor,this.state.records.destroyedActors.set(e.actor,this.state.records.messages.length);break;case"activeStart":this.addSignal(e.actor,void 0,void 0,e.signalType);break;case"activeEnd":this.addSignal(e.actor,void 0,void 0,e.signalType);break;case"addNote":this.addNote(e.actor,e.placement,e.text);break;case"addLinks":this.addLinks(e.actor,e.text);break;case"addALink":this.addALink(e.actor,e.text);break;case"addProperties":this.addProperties(e.actor,e.text);break;case"addDetails":this.addDetails(e.actor,e.text);break;case"addMessage":if(this.state.records.lastCreated){if(e.to!==this.state.records.lastCreated)throw new Error("The created participant "+this.state.records.lastCreated.name+" does not have an associated creating message after its declaration. Please check the sequence diagram.");this.state.records.lastCreated=void 0}else if(this.state.records.lastDestroyed){if(e.to!==this.state.records.lastDestroyed&&e.from!==this.state.records.lastDestroyed)throw new Error("The destroyed participant "+this.state.records.lastDestroyed.name+" does not have an associated destroying message after its declaration. Please check the sequence diagram.");this.state.records.lastDestroyed=void 0}this.addSignal(e.from,e.to,e.msg,e.signalType,e.activate);break;case"boxStart":this.addBox(e.boxData);break;case"boxEnd":this.boxEnd();break;case"loopStart":this.addSignal(void 0,void 0,e.loopText,e.signalType);break;case"loopEnd":this.addSignal(void 0,void 0,void 0,e.signalType);break;case"rectStart":this.addSignal(void 0,void 0,e.color,e.signalType);break;case"rectEnd":this.addSignal(void 0,void 0,void 0,e.signalType);break;case"optStart":this.addSignal(void 0,void 0,e.optText,e.signalType);break;case"optEnd":this.addSignal(void 0,void 0,void 0,e.signalType);break;case"altStart":this.addSignal(void 0,void 0,e.altText,e.signalType);break;case"else":this.addSignal(void 0,void 0,e.altText,e.signalType);break;case"altEnd":this.addSignal(void 0,void 0,void 0,e.signalType);break;case"setAccTitle":en(e.text);break;case"parStart":this.addSignal(void 0,void 0,e.parText,e.signalType);break;case"and":this.addSignal(void 0,void 0,e.parText,e.signalType);break;case"parEnd":this.addSignal(void 0,void 0,void 0,e.signalType);break;case"criticalStart":this.addSignal(void 0,void 0,e.criticalText,e.signalType);break;case"option":this.addSignal(void 0,void 0,e.optionText,e.signalType);break;case"criticalEnd":this.addSignal(void 0,void 0,void 0,e.signalType);break;case"breakStart":this.addSignal(void 0,void 0,e.breakText,e.signalType);break;case"breakEnd":this.addSignal(void 0,void 0,void 0,e.signalType);break}}getConfig(){return Fe().sequence}},b(B4,"SequenceDB"),B4),j5t=b(t=>`.actor { stroke: ${t.actorBorder}; fill: ${t.actorBkg}; } @@ -1358,12 +1614,12 @@ Expecting `+qe.join(", ")+", got '"+(this.terminals_[$]||$)+"'":Ke="Parse error fill: ${t.actorBkg}; stroke-width: 2px; } -`,"getStyles"),xxt=yxt,Wm=36,fSe="actor-top",dSe="actor-bottom",bxt="actor-box",cSe="actor-man",Aq=x(function(t,e){return sm(t,e)},"drawRect"),wxt=x(function(t,e,r,n,a){if(e.links===void 0||e.links===null||Object.keys(e.links).length===0)return{height:0,width:0};let i=e.links,s=e.actorCnt,o=e.rectData;var l="none";a&&(l="block !important");let u=t.append("g");u.attr("id","actor"+s+"_popup"),u.attr("class","actorPopupMenu"),u.attr("display",l);var h="";o.class!==void 0&&(h=" "+o.class);let f=o.width>r?o.width:r,d=u.append("rect");if(d.attr("class","actorPopupMenuPanel"+h),d.attr("x",o.x),d.attr("y",o.height),d.attr("fill",o.fill),d.attr("stroke",o.stroke),d.attr("width",f),d.attr("height",o.height),d.attr("rx",o.rx),d.attr("ry",o.ry),i!=null){var p=20;for(let v in i){var m=u.append("a"),g=(0,_q.sanitizeUrl)(i[v]);m.attr("xlink:href",g),m.attr("target","_blank"),Fxt(n)(v,m,o.x+10,o.height+p,f,20,{class:"actor"},n),p+=30}}return d.attr("height",p),{height:o.height+p,width:f}},"drawPopup"),kxt=x(function(t){return"var pu = document.getElementById('"+t+"'); if (pu != null) { pu.style.display = pu.style.display == 'block' ? 'none' : 'block'; }"},"popupMenuToggle"),s9=x(async function(t,e,r=null){let n=t.append("foreignObject"),a=await Gf(e.text,wr()),s=n.append("xhtml:div").attr("style","width: fit-content;").attr("xmlns","http://www.w3.org/1999/xhtml").html(a).node().getBoundingClientRect();if(n.attr("height",Math.round(s.height)).attr("width",Math.round(s.width)),e.class==="noteText"){let o=t.node().firstChild;o.setAttribute("height",s.height+2*e.textMargin);let l=o.getBBox();n.attr("x",Math.round(l.x+l.width/2-s.width/2)).attr("y",Math.round(l.y+l.height/2-s.height/2))}else if(r){let{startx:o,stopx:l,starty:u}=r;if(o>l){let h=o;o=l,l=h}n.attr("x",Math.round(o+Math.abs(o-l)/2-s.width/2)),e.class==="loopText"?n.attr("y",Math.round(u)):n.attr("y",Math.round(u-s.height))}return[n]},"drawKatex"),Cx=x(function(t,e){let r=0,n=0,a=e.text.split(Ze.lineBreakRegex),[i,s]=fl(e.fontSize),o=[],l=0,u=x(()=>e.y,"yfunc");if(e.valign!==void 0&&e.textMargin!==void 0&&e.textMargin>0)switch(e.valign){case"top":case"start":u=x(()=>Math.round(e.y+e.textMargin),"yfunc");break;case"middle":case"center":u=x(()=>Math.round(e.y+(r+n+e.textMargin)/2),"yfunc");break;case"bottom":case"end":u=x(()=>Math.round(e.y+(r+n+2*e.textMargin)-e.textMargin),"yfunc");break}if(e.anchor!==void 0&&e.textMargin!==void 0&&e.width!==void 0)switch(e.anchor){case"left":case"start":e.x=Math.round(e.x+e.textMargin),e.anchor="start",e.dominantBaseline="middle",e.alignmentBaseline="middle";break;case"middle":case"center":e.x=Math.round(e.x+e.width/2),e.anchor="middle",e.dominantBaseline="middle",e.alignmentBaseline="middle";break;case"right":case"end":e.x=Math.round(e.x+e.width-e.textMargin),e.anchor="end",e.dominantBaseline="middle",e.alignmentBaseline="middle";break}for(let[h,f]of a.entries()){e.textMargin!==void 0&&e.textMargin===0&&i!==void 0&&(l=h*i);let d=t.append("text");d.attr("x",e.x),d.attr("y",u()),e.anchor!==void 0&&d.attr("text-anchor",e.anchor).attr("dominant-baseline",e.dominantBaseline).attr("alignment-baseline",e.alignmentBaseline),e.fontFamily!==void 0&&d.style("font-family",e.fontFamily),s!==void 0&&d.style("font-size",s),e.fontWeight!==void 0&&d.style("font-weight",e.fontWeight),e.fill!==void 0&&d.attr("fill",e.fill),e.class!==void 0&&d.attr("class",e.class),e.dy!==void 0?d.attr("dy",e.dy):l!==0&&d.attr("dy",l);let p=f||BO;if(e.tspan){let m=d.append("tspan");m.attr("x",e.x),e.fill!==void 0&&m.attr("fill",e.fill),m.text(p)}else d.text(p);e.valign!==void 0&&e.textMargin!==void 0&&e.textMargin>0&&(n+=(d._groups||d)[0][0].getBBox().height,r=n),o.push(d)}return o},"drawText"),pSe=x(function(t,e){function r(a,i,s,o,l){return a+","+i+" "+(a+s)+","+i+" "+(a+s)+","+(i+o-l)+" "+(a+s-l*1.2)+","+(i+o)+" "+a+","+(i+o)}x(r,"genPoints");let n=t.append("polygon");return n.attr("points",r(e.x,e.y,e.width,e.height,7)),n.attr("class","labelBox"),e.y=e.y+e.height/2,Cx(t,e),n},"drawLabel"),Zc=-1,mSe=x((t,e,r,n)=>{t.select&&r.forEach(a=>{let i=e.get(a),s=t.select("#actor"+i.actorCnt);!n.mirrorActors&&i.stopy?s.attr("y2",i.stopy+i.height/2):n.mirrorActors&&s.attr("y2",i.stopy)})},"fixLifeLineHeights"),Txt=x(function(t,e,r,n){let a=n?e.stopy:e.starty,i=e.x+e.width/2,s=a+e.height,o=t.append("g").lower();var l=o;n||(Zc++,Object.keys(e.links||{}).length&&!r.forceMenus&&l.attr("onclick",kxt(`actor${Zc}_popup`)).attr("cursor","pointer"),l.append("line").attr("id","actor"+Zc).attr("x1",i).attr("y1",s).attr("x2",i).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",e.name),l=o.append("g"),e.actorCnt=Zc,e.links!=null&&l.attr("id","root-"+Zc));let u=gc();var h="actor";e.properties?.class?h=e.properties.class:u.fill="#eaeaea",n?h+=` ${dSe}`:h+=` ${fSe}`,u.x=e.x,u.y=a,u.width=e.width,u.height=e.height,u.class=h,u.rx=3,u.ry=3,u.name=e.name;let f=Aq(l,u);if(e.rectData=u,e.properties?.icon){let p=e.properties.icon.trim();p.charAt(0)==="@"?$me(l,u.x+u.width-20,u.y+10,p.substr(1)):zme(l,u.x+u.width-20,u.y+10,p)}Lq(r,Ha(e.description))(e.description,l,u.x,u.y,u.width,u.height,{class:`actor ${bxt}`},r);let d=e.height;if(f.node){let p=f.node().getBBox();e.height=p.height,d=p.height}return d},"drawActorTypeParticipant"),Ext=x(function(t,e,r,n){let a=n?e.stopy:e.starty,i=e.x+e.width/2,s=a+80,o=t.append("g").lower();n||(Zc++,o.append("line").attr("id","actor"+Zc).attr("x1",i).attr("y1",s).attr("x2",i).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",e.name),e.actorCnt=Zc);let l=t.append("g"),u=cSe;n?u+=` ${dSe}`:u+=` ${fSe}`,l.attr("class",u),l.attr("name",e.name);let h=gc();h.x=e.x,h.y=a,h.fill="#eaeaea",h.width=e.width,h.height=e.height,h.class="actor",h.rx=3,h.ry=3,l.append("line").attr("id","actor-man-torso"+Zc).attr("x1",i).attr("y1",a+25).attr("x2",i).attr("y2",a+45),l.append("line").attr("id","actor-man-arms"+Zc).attr("x1",i-Wm/2).attr("y1",a+33).attr("x2",i+Wm/2).attr("y2",a+33),l.append("line").attr("x1",i-Wm/2).attr("y1",a+60).attr("x2",i).attr("y2",a+45),l.append("line").attr("x1",i).attr("y1",a+45).attr("x2",i+Wm/2-2).attr("y2",a+60);let f=l.append("circle");f.attr("cx",e.x+e.width/2),f.attr("cy",a+10),f.attr("r",15),f.attr("width",e.width),f.attr("height",e.height);let d=l.node().getBBox();return e.height=d.height,Lq(r,Ha(e.description))(e.description,l,h.x,h.y+35,h.width,h.height,{class:`actor ${cSe}`},r),e.height},"drawActorTypeActor"),Cxt=x(async function(t,e,r,n){switch(e.type){case"actor":return await Ext(t,e,r,n);case"participant":return await Txt(t,e,r,n)}},"drawActor"),Sxt=x(function(t,e,r){let a=t.append("g");gSe(a,e),e.name&&Lq(r)(e.name,a,e.x,e.y+(e.textMaxHeight||0)/2,e.width,0,{class:"text"},r),a.lower()},"drawBox"),_xt=x(function(t){return t.append("g")},"anchorElement"),Axt=x(function(t,e,r,n,a){let i=gc(),s=e.anchored;i.x=e.startx,i.y=e.starty,i.class="activation"+a%3,i.width=e.stopx-e.startx,i.height=r-e.starty,Aq(s,i)},"drawActivation"),Lxt=x(async function(t,e,r,n){let{boxMargin:a,boxTextMargin:i,labelBoxHeight:s,labelBoxWidth:o,messageFontFamily:l,messageFontSize:u,messageFontWeight:h}=n,f=t.append("g"),d=x(function(g,v,y,b){return f.append("line").attr("x1",g).attr("y1",v).attr("x2",y).attr("y2",b).attr("class","loopLine")},"drawLoopLine");d(e.startx,e.starty,e.stopx,e.starty),d(e.stopx,e.starty,e.stopx,e.stopy),d(e.startx,e.stopy,e.stopx,e.stopy),d(e.startx,e.starty,e.startx,e.stopy),e.sections!==void 0&&e.sections.forEach(function(g){d(e.startx,g.y,e.stopx,g.y).style("stroke-dasharray","3, 3")});let p=h_();p.text=r,p.x=e.startx,p.y=e.starty,p.fontFamily=l,p.fontSize=u,p.fontWeight=h,p.anchor="middle",p.valign="middle",p.tspan=!1,p.width=o||50,p.height=s||20,p.textMargin=i,p.class="labelText",pSe(f,p),p=vSe(),p.text=e.title,p.x=e.startx+o/2+(e.stopx-e.startx)/2,p.y=e.starty+a+i,p.anchor="middle",p.valign="middle",p.textMargin=i,p.class="loopText",p.fontFamily=l,p.fontSize=u,p.fontWeight=h,p.wrap=!0;let m=Ha(p.text)?await s9(f,p,e):Cx(f,p);if(e.sectionTitles!==void 0){for(let[g,v]of Object.entries(e.sectionTitles))if(v.message){p.text=v.message,p.x=e.startx+(e.stopx-e.startx)/2,p.y=e.sections[g].y+a+i,p.class="loopText",p.anchor="middle",p.valign="middle",p.tspan=!1,p.fontFamily=l,p.fontSize=u,p.fontWeight=h,p.wrap=e.wrap,Ha(p.text)?(e.starty=e.sections[g].y,await s9(f,p,e)):Cx(f,p);let y=Math.round(m.map(b=>(b._groups||b)[0][0].getBBox().height).reduce((b,w)=>b+w));e.sections[g].height+=y-(a+i)}}return e.height=Math.round(e.stopy-e.starty),f},"drawLoop"),gSe=x(function(t,e){c_(t,e)},"drawBackgroundRect"),Rxt=x(function(t){t.append("defs").append("symbol").attr("id","database").attr("fill-rule","evenodd").attr("clip-rule","evenodd").append("path").attr("transform","scale(.5)").attr("d","M12.258.001l.256.004.255.005.253.008.251.01.249.012.247.015.246.016.242.019.241.02.239.023.236.024.233.027.231.028.229.031.225.032.223.034.22.036.217.038.214.04.211.041.208.043.205.045.201.046.198.048.194.05.191.051.187.053.183.054.18.056.175.057.172.059.168.06.163.061.16.063.155.064.15.066.074.033.073.033.071.034.07.034.069.035.068.035.067.035.066.035.064.036.064.036.062.036.06.036.06.037.058.037.058.037.055.038.055.038.053.038.052.038.051.039.05.039.048.039.047.039.045.04.044.04.043.04.041.04.04.041.039.041.037.041.036.041.034.041.033.042.032.042.03.042.029.042.027.042.026.043.024.043.023.043.021.043.02.043.018.044.017.043.015.044.013.044.012.044.011.045.009.044.007.045.006.045.004.045.002.045.001.045v17l-.001.045-.002.045-.004.045-.006.045-.007.045-.009.044-.011.045-.012.044-.013.044-.015.044-.017.043-.018.044-.02.043-.021.043-.023.043-.024.043-.026.043-.027.042-.029.042-.03.042-.032.042-.033.042-.034.041-.036.041-.037.041-.039.041-.04.041-.041.04-.043.04-.044.04-.045.04-.047.039-.048.039-.05.039-.051.039-.052.038-.053.038-.055.038-.055.038-.058.037-.058.037-.06.037-.06.036-.062.036-.064.036-.064.036-.066.035-.067.035-.068.035-.069.035-.07.034-.071.034-.073.033-.074.033-.15.066-.155.064-.16.063-.163.061-.168.06-.172.059-.175.057-.18.056-.183.054-.187.053-.191.051-.194.05-.198.048-.201.046-.205.045-.208.043-.211.041-.214.04-.217.038-.22.036-.223.034-.225.032-.229.031-.231.028-.233.027-.236.024-.239.023-.241.02-.242.019-.246.016-.247.015-.249.012-.251.01-.253.008-.255.005-.256.004-.258.001-.258-.001-.256-.004-.255-.005-.253-.008-.251-.01-.249-.012-.247-.015-.245-.016-.243-.019-.241-.02-.238-.023-.236-.024-.234-.027-.231-.028-.228-.031-.226-.032-.223-.034-.22-.036-.217-.038-.214-.04-.211-.041-.208-.043-.204-.045-.201-.046-.198-.048-.195-.05-.19-.051-.187-.053-.184-.054-.179-.056-.176-.057-.172-.059-.167-.06-.164-.061-.159-.063-.155-.064-.151-.066-.074-.033-.072-.033-.072-.034-.07-.034-.069-.035-.068-.035-.067-.035-.066-.035-.064-.036-.063-.036-.062-.036-.061-.036-.06-.037-.058-.037-.057-.037-.056-.038-.055-.038-.053-.038-.052-.038-.051-.039-.049-.039-.049-.039-.046-.039-.046-.04-.044-.04-.043-.04-.041-.04-.04-.041-.039-.041-.037-.041-.036-.041-.034-.041-.033-.042-.032-.042-.03-.042-.029-.042-.027-.042-.026-.043-.024-.043-.023-.043-.021-.043-.02-.043-.018-.044-.017-.043-.015-.044-.013-.044-.012-.044-.011-.045-.009-.044-.007-.045-.006-.045-.004-.045-.002-.045-.001-.045v-17l.001-.045.002-.045.004-.045.006-.045.007-.045.009-.044.011-.045.012-.044.013-.044.015-.044.017-.043.018-.044.02-.043.021-.043.023-.043.024-.043.026-.043.027-.042.029-.042.03-.042.032-.042.033-.042.034-.041.036-.041.037-.041.039-.041.04-.041.041-.04.043-.04.044-.04.046-.04.046-.039.049-.039.049-.039.051-.039.052-.038.053-.038.055-.038.056-.038.057-.037.058-.037.06-.037.061-.036.062-.036.063-.036.064-.036.066-.035.067-.035.068-.035.069-.035.07-.034.072-.034.072-.033.074-.033.151-.066.155-.064.159-.063.164-.061.167-.06.172-.059.176-.057.179-.056.184-.054.187-.053.19-.051.195-.05.198-.048.201-.046.204-.045.208-.043.211-.041.214-.04.217-.038.22-.036.223-.034.226-.032.228-.031.231-.028.234-.027.236-.024.238-.023.241-.02.243-.019.245-.016.247-.015.249-.012.251-.01.253-.008.255-.005.256-.004.258-.001.258.001zm-9.258 20.499v.01l.001.021.003.021.004.022.005.021.006.022.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.023.018.024.019.024.021.024.022.025.023.024.024.025.052.049.056.05.061.051.066.051.07.051.075.051.079.052.084.052.088.052.092.052.097.052.102.051.105.052.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.048.144.049.147.047.152.047.155.047.16.045.163.045.167.043.171.043.176.041.178.041.183.039.187.039.19.037.194.035.197.035.202.033.204.031.209.03.212.029.216.027.219.025.222.024.226.021.23.02.233.018.236.016.24.015.243.012.246.01.249.008.253.005.256.004.259.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.021.224-.024.22-.026.216-.027.212-.028.21-.031.205-.031.202-.034.198-.034.194-.036.191-.037.187-.039.183-.04.179-.04.175-.042.172-.043.168-.044.163-.045.16-.046.155-.046.152-.047.148-.048.143-.049.139-.049.136-.05.131-.05.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.053.083-.051.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.05.023-.024.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.023.01-.022.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.127l-.077.055-.08.053-.083.054-.085.053-.087.052-.09.052-.093.051-.095.05-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.045-.118.044-.12.043-.122.042-.124.042-.126.041-.128.04-.13.04-.132.038-.134.038-.135.037-.138.037-.139.035-.142.035-.143.034-.144.033-.147.032-.148.031-.15.03-.151.03-.153.029-.154.027-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.01-.179.008-.179.008-.181.006-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.006-.179-.008-.179-.008-.178-.01-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.027-.153-.029-.151-.03-.15-.03-.148-.031-.146-.032-.145-.033-.143-.034-.141-.035-.14-.035-.137-.037-.136-.037-.134-.038-.132-.038-.13-.04-.128-.04-.126-.041-.124-.042-.122-.042-.12-.044-.117-.043-.116-.045-.113-.045-.112-.046-.109-.047-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.05-.093-.052-.09-.051-.087-.052-.085-.053-.083-.054-.08-.054-.077-.054v4.127zm0-5.654v.011l.001.021.003.021.004.021.005.022.006.022.007.022.009.022.01.022.011.023.012.023.013.023.015.024.016.023.017.024.018.024.019.024.021.024.022.024.023.025.024.024.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.052.11.051.114.051.119.052.123.05.127.051.131.05.135.049.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.044.171.042.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.022.23.02.233.018.236.016.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.012.241-.015.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.048.139-.05.136-.049.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.051.051-.049.023-.025.023-.024.021-.025.02-.024.019-.024.018-.024.017-.024.015-.023.014-.023.013-.024.012-.022.01-.023.01-.023.008-.022.006-.022.006-.022.004-.021.004-.022.001-.021.001-.021v-4.139l-.077.054-.08.054-.083.054-.085.052-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.044-.118.044-.12.044-.122.042-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.035-.143.033-.144.033-.147.033-.148.031-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.009-.179.009-.179.007-.181.007-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.007-.179-.007-.179-.009-.178-.009-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.031-.146-.033-.145-.033-.143-.033-.141-.035-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.04-.126-.041-.124-.042-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.051-.093-.051-.09-.051-.087-.053-.085-.052-.083-.054-.08-.054-.077-.054v4.139zm0-5.666v.011l.001.02.003.022.004.021.005.022.006.021.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.024.018.023.019.024.021.025.022.024.023.024.024.025.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.051.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.043.171.043.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.021.23.02.233.018.236.017.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.013.241-.014.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.049.139-.049.136-.049.131-.051.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.049.023-.025.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.022.01-.023.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.153l-.077.054-.08.054-.083.053-.085.053-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.048-.105.048-.106.048-.109.046-.111.046-.114.046-.115.044-.118.044-.12.043-.122.043-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.034-.143.034-.144.033-.147.032-.148.032-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.024-.161.024-.162.023-.163.023-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.01-.178.01-.179.009-.179.007-.181.006-.182.006-.182.004-.184.003-.184.001-.185.001-.185-.001-.184-.001-.184-.003-.182-.004-.182-.006-.181-.006-.179-.007-.179-.009-.178-.01-.176-.01-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.023-.162-.023-.161-.024-.159-.024-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.032-.146-.032-.145-.033-.143-.034-.141-.034-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.041-.126-.041-.124-.041-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.048-.105-.048-.102-.048-.1-.05-.097-.049-.095-.051-.093-.051-.09-.052-.087-.052-.085-.053-.083-.053-.08-.054-.077-.054v4.153zm8.74-8.179l-.257.004-.254.005-.25.008-.247.011-.244.012-.241.014-.237.016-.233.018-.231.021-.226.022-.224.023-.22.026-.216.027-.212.028-.21.031-.205.032-.202.033-.198.034-.194.036-.191.038-.187.038-.183.04-.179.041-.175.042-.172.043-.168.043-.163.045-.16.046-.155.046-.152.048-.148.048-.143.048-.139.049-.136.05-.131.05-.126.051-.123.051-.118.051-.114.052-.11.052-.106.052-.101.052-.096.052-.092.052-.088.052-.083.052-.079.052-.074.051-.07.052-.065.051-.06.05-.056.05-.051.05-.023.025-.023.024-.021.024-.02.025-.019.024-.018.024-.017.023-.015.024-.014.023-.013.023-.012.023-.01.023-.01.022-.008.022-.006.023-.006.021-.004.022-.004.021-.001.021-.001.021.001.021.001.021.004.021.004.022.006.021.006.023.008.022.01.022.01.023.012.023.013.023.014.023.015.024.017.023.018.024.019.024.02.025.021.024.023.024.023.025.051.05.056.05.06.05.065.051.07.052.074.051.079.052.083.052.088.052.092.052.096.052.101.052.106.052.11.052.114.052.118.051.123.051.126.051.131.05.136.05.139.049.143.048.148.048.152.048.155.046.16.046.163.045.168.043.172.043.175.042.179.041.183.04.187.038.191.038.194.036.198.034.202.033.205.032.21.031.212.028.216.027.22.026.224.023.226.022.231.021.233.018.237.016.241.014.244.012.247.011.25.008.254.005.257.004.26.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.022.224-.023.22-.026.216-.027.212-.028.21-.031.205-.032.202-.033.198-.034.194-.036.191-.038.187-.038.183-.04.179-.041.175-.042.172-.043.168-.043.163-.045.16-.046.155-.046.152-.048.148-.048.143-.048.139-.049.136-.05.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.05.051-.05.023-.025.023-.024.021-.024.02-.025.019-.024.018-.024.017-.023.015-.024.014-.023.013-.023.012-.023.01-.023.01-.022.008-.022.006-.023.006-.021.004-.022.004-.021.001-.021.001-.021-.001-.021-.001-.021-.004-.021-.004-.022-.006-.021-.006-.023-.008-.022-.01-.022-.01-.023-.012-.023-.013-.023-.014-.023-.015-.024-.017-.023-.018-.024-.019-.024-.02-.025-.021-.024-.023-.024-.023-.025-.051-.05-.056-.05-.06-.05-.065-.051-.07-.052-.074-.051-.079-.052-.083-.052-.088-.052-.092-.052-.096-.052-.101-.052-.106-.052-.11-.052-.114-.052-.118-.051-.123-.051-.126-.051-.131-.05-.136-.05-.139-.049-.143-.048-.148-.048-.152-.048-.155-.046-.16-.046-.163-.045-.168-.043-.172-.043-.175-.042-.179-.041-.183-.04-.187-.038-.191-.038-.194-.036-.198-.034-.202-.033-.205-.032-.21-.031-.212-.028-.216-.027-.22-.026-.224-.023-.226-.022-.231-.021-.233-.018-.237-.016-.241-.014-.244-.012-.247-.011-.25-.008-.254-.005-.257-.004-.26-.001-.26.001z")},"insertDatabaseIcon"),Ixt=x(function(t){t.append("defs").append("symbol").attr("id","computer").attr("width","24").attr("height","24").append("path").attr("transform","scale(.5)").attr("d","M2 2v13h20v-13h-20zm18 11h-16v-9h16v9zm-10.228 6l.466-1h3.524l.467 1h-4.457zm14.228 3h-24l2-6h2.104l-1.33 4h18.45l-1.297-4h2.073l2 6zm-5-10h-14v-7h14v7z")},"insertComputerIcon"),Dxt=x(function(t){t.append("defs").append("symbol").attr("id","clock").attr("width","24").attr("height","24").append("path").attr("transform","scale(.5)").attr("d","M12 2c5.514 0 10 4.486 10 10s-4.486 10-10 10-10-4.486-10-10 4.486-10 10-10zm0-2c-6.627 0-12 5.373-12 12s5.373 12 12 12 12-5.373 12-12-5.373-12-12-12zm5.848 12.459c.202.038.202.333.001.372-1.907.361-6.045 1.111-6.547 1.111-.719 0-1.301-.582-1.301-1.301 0-.512.77-5.447 1.125-7.445.034-.192.312-.181.343.014l.985 6.238 5.394 1.011z")},"insertClockIcon"),Nxt=x(function(t){t.append("defs").append("marker").attr("id","arrowhead").attr("refX",7.9).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto-start-reverse").append("path").attr("d","M -1 0 L 10 5 L 0 10 z")},"insertArrowHead"),Mxt=x(function(t){t.append("defs").append("marker").attr("id","filled-head").attr("refX",15.5).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},"insertArrowFilledHead"),Oxt=x(function(t){t.append("defs").append("marker").attr("id","sequencenumber").attr("refX",15).attr("refY",15).attr("markerWidth",60).attr("markerHeight",40).attr("orient","auto").append("circle").attr("cx",15).attr("cy",15).attr("r",6)},"insertSequenceNumber"),Pxt=x(function(t){t.append("defs").append("marker").attr("id","crosshead").attr("markerWidth",15).attr("markerHeight",8).attr("orient","auto").attr("refX",4).attr("refY",4.5).append("path").attr("fill","none").attr("stroke","#000000").style("stroke-dasharray","0, 0").attr("stroke-width","1pt").attr("d","M 1,2 L 6,7 M 6,2 L 1,7")},"insertArrowCrossHead"),vSe=x(function(){return{x:0,y:0,fill:void 0,anchor:void 0,style:"#666",width:void 0,height:void 0,textMargin:0,rx:0,ry:0,tspan:!0,valign:void 0}},"getTextObj"),Bxt=x(function(){return{x:0,y:0,fill:"#EDF2AE",stroke:"#666",width:100,anchor:"start",height:100,rx:0,ry:0}},"getNoteRect"),Lq=(function(){function t(i,s,o,l,u,h,f){let d=s.append("text").attr("x",o+u/2).attr("y",l+h/2+5).style("text-anchor","middle").text(i);a(d,f)}x(t,"byText");function e(i,s,o,l,u,h,f,d){let{actorFontSize:p,actorFontFamily:m,actorFontWeight:g}=d,[v,y]=fl(p),b=i.split(Ze.lineBreakRegex);for(let w=0;wt.height||0))+(this.loops.length===0?0:this.loops.map(t=>t.height||0).reduce((t,e)=>t+e))+(this.messages.length===0?0:this.messages.map(t=>t.height||0).reduce((t,e)=>t+e))+(this.notes.length===0?0:this.notes.map(t=>t.height||0).reduce((t,e)=>t+e))},"getHeight"),clear:x(function(){this.actors=[],this.boxes=[],this.loops=[],this.messages=[],this.notes=[]},"clear"),addBox:x(function(t){this.boxes.push(t)},"addBox"),addActor:x(function(t){this.actors.push(t)},"addActor"),addLoop:x(function(t){this.loops.push(t)},"addLoop"),addMessage:x(function(t){this.messages.push(t)},"addMessage"),addNote:x(function(t){this.notes.push(t)},"addNote"),lastActor:x(function(){return this.actors[this.actors.length-1]},"lastActor"),lastLoop:x(function(){return this.loops[this.loops.length-1]},"lastLoop"),lastMessage:x(function(){return this.messages[this.messages.length-1]},"lastMessage"),lastNote:x(function(){return this.notes[this.notes.length-1]},"lastNote"),actors:[],boxes:[],loops:[],messages:[],notes:[]},init:x(function(){this.sequenceItems=[],this.activations=[],this.models.clear(),this.data={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},this.verticalPos=0,bSe(Te())},"init"),updateVal:x(function(t,e,r,n){t[e]===void 0?t[e]=r:t[e]=n(r,t[e])},"updateVal"),updateBounds:x(function(t,e,r,n){let a=this,i=0;function s(o){return x(function(u){i++;let h=a.sequenceItems.length-i+1;a.updateVal(u,"starty",e-h*De.boxMargin,Math.min),a.updateVal(u,"stopy",n+h*De.boxMargin,Math.max),a.updateVal(rt.data,"startx",t-h*De.boxMargin,Math.min),a.updateVal(rt.data,"stopx",r+h*De.boxMargin,Math.max),o!=="activation"&&(a.updateVal(u,"startx",t-h*De.boxMargin,Math.min),a.updateVal(u,"stopx",r+h*De.boxMargin,Math.max),a.updateVal(rt.data,"starty",e-h*De.boxMargin,Math.min),a.updateVal(rt.data,"stopy",n+h*De.boxMargin,Math.max))},"updateItemBounds")}x(s,"updateFn"),this.sequenceItems.forEach(s()),this.activations.forEach(s("activation"))},"updateBounds"),insert:x(function(t,e,r,n){let a=Ze.getMin(t,r),i=Ze.getMax(t,r),s=Ze.getMin(e,n),o=Ze.getMax(e,n);this.updateVal(rt.data,"startx",a,Math.min),this.updateVal(rt.data,"starty",s,Math.min),this.updateVal(rt.data,"stopx",i,Math.max),this.updateVal(rt.data,"stopy",o,Math.max),this.updateBounds(a,s,i,o)},"insert"),newActivation:x(function(t,e,r){let n=r.get(t.from),a=o9(t.from).length||0,i=n.x+n.width/2+(a-1)*De.activationWidth/2;this.activations.push({startx:i,starty:this.verticalPos+2,stopx:i+De.activationWidth,stopy:void 0,actor:t.from,anchored:Ta.anchorElement(e)})},"newActivation"),endActivation:x(function(t){let e=this.activations.map(function(r){return r.actor}).lastIndexOf(t.from);return this.activations.splice(e,1)[0]},"endActivation"),createLoop:x(function(t={message:void 0,wrap:!1,width:void 0},e){return{startx:void 0,starty:this.verticalPos,stopx:void 0,stopy:void 0,title:t.message,wrap:t.wrap,width:t.width,height:0,fill:e}},"createLoop"),newLoop:x(function(t={message:void 0,wrap:!1,width:void 0},e){this.sequenceItems.push(this.createLoop(t,e))},"newLoop"),endLoop:x(function(){return this.sequenceItems.pop()},"endLoop"),isLoopOverlap:x(function(){return this.sequenceItems.length?this.sequenceItems[this.sequenceItems.length-1].overlap:!1},"isLoopOverlap"),addSectionToLoop:x(function(t){let e=this.sequenceItems.pop();e.sections=e.sections||[],e.sectionTitles=e.sectionTitles||[],e.sections.push({y:rt.getVerticalPos(),height:0}),e.sectionTitles.push(t),this.sequenceItems.push(e)},"addSectionToLoop"),saveVerticalPos:x(function(){this.isLoopOverlap()&&(this.savedVerticalPos=this.verticalPos)},"saveVerticalPos"),resetVerticalPos:x(function(){this.isLoopOverlap()&&(this.verticalPos=this.savedVerticalPos)},"resetVerticalPos"),bumpVerticalPos:x(function(t){this.verticalPos=this.verticalPos+t,this.data.stopy=Ze.getMax(this.data.stopy,this.verticalPos)},"bumpVerticalPos"),getVerticalPos:x(function(){return this.verticalPos},"getVerticalPos"),getBounds:x(function(){return{bounds:this.data,models:this.models}},"getBounds")},zxt=x(async function(t,e){rt.bumpVerticalPos(De.boxMargin),e.height=De.boxMargin,e.starty=rt.getVerticalPos();let r=gc();r.x=e.startx,r.y=e.starty,r.width=e.width||De.width,r.class="note";let n=t.append("g"),a=Ta.drawRect(n,r),i=h_();i.x=e.startx,i.y=e.starty,i.width=r.width,i.dy="1em",i.text=e.message,i.class="noteText",i.fontFamily=De.noteFontFamily,i.fontSize=De.noteFontSize,i.fontWeight=De.noteFontWeight,i.anchor=De.noteAlign,i.textMargin=De.noteMargin,i.valign="center";let s=Ha(i.text)?await s9(n,i):Cx(n,i),o=Math.round(s.map(l=>(l._groups||l)[0][0].getBBox().height).reduce((l,u)=>l+u));a.attr("height",o+2*De.noteMargin),e.height+=o+2*De.noteMargin,rt.bumpVerticalPos(o+2*De.noteMargin),e.stopy=e.starty+o+2*De.noteMargin,e.stopx=e.startx+r.width,rt.insert(e.startx,e.starty,e.stopx,e.stopy),rt.models.addNote(e)},"drawNote"),Ym=x(t=>({fontFamily:t.messageFontFamily,fontSize:t.messageFontSize,fontWeight:t.messageFontWeight}),"messageFont"),Tx=x(t=>({fontFamily:t.noteFontFamily,fontSize:t.noteFontSize,fontWeight:t.noteFontWeight}),"noteFont"),Cq=x(t=>({fontFamily:t.actorFontFamily,fontSize:t.actorFontSize,fontWeight:t.actorFontWeight}),"actorFont");x(ySe,"boundMessage");$xt=x(async function(t,e,r,n){let{startx:a,stopx:i,starty:s,message:o,type:l,sequenceIndex:u,sequenceVisible:h}=e,f=Wt.calculateTextDimensions(o,Ym(De)),d=h_();d.x=a,d.y=s+10,d.width=i-a,d.class="messageText",d.dy="1em",d.text=o,d.fontFamily=De.messageFontFamily,d.fontSize=De.messageFontSize,d.fontWeight=De.messageFontWeight,d.anchor=De.messageAlign,d.valign="center",d.textMargin=De.wrapPadding,d.tspan=!1,Ha(d.text)?await s9(t,d,{startx:a,stopx:i,starty:r}):Cx(t,d);let p=f.width,m;a===i?De.rightAngles?m=t.append("path").attr("d",`M ${a},${r} H ${a+Ze.getMax(De.width/2,p/2)} V ${r+25} H ${a}`):m=t.append("path").attr("d","M "+a+","+r+" C "+(a+60)+","+(r-10)+" "+(a+60)+","+(r+30)+" "+a+","+(r+20)):(m=t.append("line"),m.attr("x1",a),m.attr("y1",r),m.attr("x2",i),m.attr("y2",r)),l===n.db.LINETYPE.DOTTED||l===n.db.LINETYPE.DOTTED_CROSS||l===n.db.LINETYPE.DOTTED_POINT||l===n.db.LINETYPE.DOTTED_OPEN||l===n.db.LINETYPE.BIDIRECTIONAL_DOTTED?(m.style("stroke-dasharray","3, 3"),m.attr("class","messageLine1")):m.attr("class","messageLine0");let g="";De.arrowMarkerAbsolute&&(g=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,g=g.replace(/\(/g,"\\("),g=g.replace(/\)/g,"\\)")),m.attr("stroke-width",2),m.attr("stroke","none"),m.style("fill","none"),(l===n.db.LINETYPE.SOLID||l===n.db.LINETYPE.DOTTED)&&m.attr("marker-end","url("+g+"#arrowhead)"),(l===n.db.LINETYPE.BIDIRECTIONAL_SOLID||l===n.db.LINETYPE.BIDIRECTIONAL_DOTTED)&&(m.attr("marker-start","url("+g+"#arrowhead)"),m.attr("marker-end","url("+g+"#arrowhead)")),(l===n.db.LINETYPE.SOLID_POINT||l===n.db.LINETYPE.DOTTED_POINT)&&m.attr("marker-end","url("+g+"#filled-head)"),(l===n.db.LINETYPE.SOLID_CROSS||l===n.db.LINETYPE.DOTTED_CROSS)&&m.attr("marker-end","url("+g+"#crosshead)"),(h||De.showSequenceNumbers)&&(m.attr("marker-start","url("+g+"#sequencenumber)"),t.append("text").attr("x",a).attr("y",r+4).attr("font-family","sans-serif").attr("font-size","12px").attr("text-anchor","middle").attr("class","sequenceNumber").text(u))},"drawMessage"),Gxt=x(function(t,e,r,n,a,i,s){let o=0,l=0,u,h=0;for(let f of n){let d=e.get(f),p=d.box;u&&u!=p&&(s||rt.models.addBox(u),l+=De.boxMargin+u.margin),p&&p!=u&&(s||(p.x=o+l,p.y=a),l+=p.margin),d.width=d.width||De.width,d.height=Ze.getMax(d.height||De.height,De.height),d.margin=d.margin||De.actorMargin,h=Ze.getMax(h,d.height),r.get(d.name)&&(l+=d.width/2),d.x=o+l,d.starty=rt.getVerticalPos(),rt.insert(d.x,a,d.x+d.width,d.height),o+=d.width+l,d.box&&(d.box.width=o+p.margin-d.box.x),l=d.margin,u=d.box,rt.models.addActor(d)}u&&!s&&rt.models.addBox(u),rt.bumpVerticalPos(h)},"addActorRenderingData"),Sq=x(async function(t,e,r,n){if(n){let a=0;rt.bumpVerticalPos(De.boxMargin*2);for(let i of r){let s=e.get(i);s.stopy||(s.stopy=rt.getVerticalPos());let o=await Ta.drawActor(t,s,De,!0);a=Ze.getMax(a,o)}rt.bumpVerticalPos(a+De.boxMargin)}else for(let a of r){let i=e.get(a);await Ta.drawActor(t,i,De,!1)}},"drawActors"),xSe=x(function(t,e,r,n){let a=0,i=0;for(let s of r){let o=e.get(s),l=qxt(o),u=Ta.drawPopup(t,o,l,De,De.forceMenus,n);u.height>a&&(a=u.height),u.width+o.x>i&&(i=u.width+o.x)}return{maxHeight:a,maxWidth:i}},"drawActorsPopup"),bSe=x(function(t){ra(De,t),t.fontFamily&&(De.actorFontFamily=De.noteFontFamily=De.messageFontFamily=t.fontFamily),t.fontSize&&(De.actorFontSize=De.noteFontSize=De.messageFontSize=t.fontSize),t.fontWeight&&(De.actorFontWeight=De.noteFontWeight=De.messageFontWeight=t.fontWeight)},"setConf"),o9=x(function(t){return rt.activations.filter(function(e){return e.actor===t})},"actorActivations"),hSe=x(function(t,e){let r=e.get(t),n=o9(t),a=n.reduce(function(s,o){return Ze.getMin(s,o.startx)},r.x+r.width/2-1),i=n.reduce(function(s,o){return Ze.getMax(s,o.stopx)},r.x+r.width/2+1);return[a,i]},"activationBounds");x(Cu,"adjustLoopHeightForWrap");x(wSe,"adjustCreatedDestroyedData");Uxt=x(async function(t,e,r,n){let{securityLevel:a,sequence:i}=Te();De=i;let s;a==="sandbox"&&(s=We("#i"+e));let o=a==="sandbox"?We(s.nodes()[0].contentDocument.body):We("body"),l=a==="sandbox"?s.nodes()[0].contentDocument:document;rt.init(),te.debug(n.db);let u=a==="sandbox"?o.select(`[id="${e}"]`):We(`[id="${e}"]`),h=n.db.getActors(),f=n.db.getCreatedActors(),d=n.db.getDestroyedActors(),p=n.db.getBoxes(),m=n.db.getActorKeys(),g=n.db.getMessages(),v=n.db.getDiagramTitle(),y=n.db.hasAtLeastOneBox(),b=n.db.hasAtLeastOneBoxWithTitle(),w=await kSe(h,g,n);if(De.height=await TSe(h,w,p),Ta.insertComputerIcon(u),Ta.insertDatabaseIcon(u),Ta.insertClockIcon(u),y&&(rt.bumpVerticalPos(De.boxMargin),b&&rt.bumpVerticalPos(p[0].textMaxHeight)),De.hideUnusedParticipants===!0){let B=new Set;g.forEach(F=>{B.add(F.from),B.add(F.to)}),m=m.filter(F=>B.has(F))}Gxt(u,h,f,m,0,g,!1);let C=await Wxt(g,h,w,n);Ta.insertArrowHead(u),Ta.insertArrowCrossHead(u),Ta.insertArrowFilledHead(u),Ta.insertSequenceNumber(u);function k(B,F){let G=rt.endActivation(B);G.starty+18>F&&(G.starty=F-6,F+=12),Ta.drawActivation(u,G,F,De,o9(B.from).length),rt.insert(G.startx,F-10,G.stopx,F)}x(k,"activeEnd");let E=1,_=1,S=[],L=[],M=0;for(let B of g){let F,G,z;switch(B.type){case n.db.LINETYPE.NOTE:rt.resetVerticalPos(),G=B.noteModel,await zxt(u,G);break;case n.db.LINETYPE.ACTIVE_START:rt.newActivation(B,u,h);break;case n.db.LINETYPE.ACTIVE_END:k(B,rt.getVerticalPos());break;case n.db.LINETYPE.LOOP_START:Cu(C,B,De.boxMargin,De.boxMargin+De.boxTextMargin,H=>rt.newLoop(H));break;case n.db.LINETYPE.LOOP_END:F=rt.endLoop(),await Ta.drawLoop(u,F,"loop",De),rt.bumpVerticalPos(F.stopy-rt.getVerticalPos()),rt.models.addLoop(F);break;case n.db.LINETYPE.RECT_START:Cu(C,B,De.boxMargin,De.boxMargin,H=>rt.newLoop(void 0,H.message));break;case n.db.LINETYPE.RECT_END:F=rt.endLoop(),L.push(F),rt.models.addLoop(F),rt.bumpVerticalPos(F.stopy-rt.getVerticalPos());break;case n.db.LINETYPE.OPT_START:Cu(C,B,De.boxMargin,De.boxMargin+De.boxTextMargin,H=>rt.newLoop(H));break;case n.db.LINETYPE.OPT_END:F=rt.endLoop(),await Ta.drawLoop(u,F,"opt",De),rt.bumpVerticalPos(F.stopy-rt.getVerticalPos()),rt.models.addLoop(F);break;case n.db.LINETYPE.ALT_START:Cu(C,B,De.boxMargin,De.boxMargin+De.boxTextMargin,H=>rt.newLoop(H));break;case n.db.LINETYPE.ALT_ELSE:Cu(C,B,De.boxMargin+De.boxTextMargin,De.boxMargin,H=>rt.addSectionToLoop(H));break;case n.db.LINETYPE.ALT_END:F=rt.endLoop(),await Ta.drawLoop(u,F,"alt",De),rt.bumpVerticalPos(F.stopy-rt.getVerticalPos()),rt.models.addLoop(F);break;case n.db.LINETYPE.PAR_START:case n.db.LINETYPE.PAR_OVER_START:Cu(C,B,De.boxMargin,De.boxMargin+De.boxTextMargin,H=>rt.newLoop(H)),rt.saveVerticalPos();break;case n.db.LINETYPE.PAR_AND:Cu(C,B,De.boxMargin+De.boxTextMargin,De.boxMargin,H=>rt.addSectionToLoop(H));break;case n.db.LINETYPE.PAR_END:F=rt.endLoop(),await Ta.drawLoop(u,F,"par",De),rt.bumpVerticalPos(F.stopy-rt.getVerticalPos()),rt.models.addLoop(F);break;case n.db.LINETYPE.AUTONUMBER:E=B.message.start||E,_=B.message.step||_,B.message.visible?n.db.enableSequenceNumbers():n.db.disableSequenceNumbers();break;case n.db.LINETYPE.CRITICAL_START:Cu(C,B,De.boxMargin,De.boxMargin+De.boxTextMargin,H=>rt.newLoop(H));break;case n.db.LINETYPE.CRITICAL_OPTION:Cu(C,B,De.boxMargin+De.boxTextMargin,De.boxMargin,H=>rt.addSectionToLoop(H));break;case n.db.LINETYPE.CRITICAL_END:F=rt.endLoop(),await Ta.drawLoop(u,F,"critical",De),rt.bumpVerticalPos(F.stopy-rt.getVerticalPos()),rt.models.addLoop(F);break;case n.db.LINETYPE.BREAK_START:Cu(C,B,De.boxMargin,De.boxMargin+De.boxTextMargin,H=>rt.newLoop(H));break;case n.db.LINETYPE.BREAK_END:F=rt.endLoop(),await Ta.drawLoop(u,F,"break",De),rt.bumpVerticalPos(F.stopy-rt.getVerticalPos()),rt.models.addLoop(F);break;default:try{z=B.msgModel,z.starty=rt.getVerticalPos(),z.sequenceIndex=E,z.sequenceVisible=n.db.showSequenceNumbers();let H=await ySe(u,z);wSe(B,z,H,M,h,f,d),S.push({messageModel:z,lineStartY:H}),rt.models.addMessage(z)}catch(H){te.error("error while drawing message",H)}}[n.db.LINETYPE.SOLID_OPEN,n.db.LINETYPE.DOTTED_OPEN,n.db.LINETYPE.SOLID,n.db.LINETYPE.DOTTED,n.db.LINETYPE.SOLID_CROSS,n.db.LINETYPE.DOTTED_CROSS,n.db.LINETYPE.SOLID_POINT,n.db.LINETYPE.DOTTED_POINT,n.db.LINETYPE.BIDIRECTIONAL_SOLID,n.db.LINETYPE.BIDIRECTIONAL_DOTTED].includes(B.type)&&(E=E+_),M++}te.debug("createdActors",f),te.debug("destroyedActors",d),await Sq(u,h,m,!1);for(let B of S)await $xt(u,B.messageModel,B.lineStartY,n);De.mirrorActors&&await Sq(u,h,m,!0),L.forEach(B=>Ta.drawBackgroundRect(u,B)),mSe(u,h,m,De);for(let B of rt.models.boxes)B.height=rt.getVerticalPos()-B.y,rt.insert(B.x,B.y,B.x+B.width,B.height),B.startx=B.x,B.starty=B.y,B.stopx=B.startx+B.width,B.stopy=B.starty+B.height,B.stroke="rgb(0,0,0, 0.5)",Ta.drawBox(u,B,De);y&&rt.bumpVerticalPos(De.boxMargin);let D=xSe(u,h,m,l),{bounds:T}=rt.getBounds();T.startx===void 0&&(T.startx=0),T.starty===void 0&&(T.starty=0),T.stopx===void 0&&(T.stopx=0),T.stopy===void 0&&(T.stopy=0);let I=T.stopy-T.starty;I2,f=x(g=>o?-g:g,"adjustValue");t.from===t.to?u=l:(t.activate&&!h&&(u+=f(De.activationWidth/2-1)),[r.db.LINETYPE.SOLID_OPEN,r.db.LINETYPE.DOTTED_OPEN].includes(t.type)||(u+=f(3)),[r.db.LINETYPE.BIDIRECTIONAL_SOLID,r.db.LINETYPE.BIDIRECTIONAL_DOTTED].includes(t.type)&&(l-=f(3)));let d=[n,a,i,s],p=Math.abs(l-u);t.wrap&&t.message&&(t.message=Wt.wrapLabel(t.message,Ze.getMax(p+2*De.wrapPadding,De.width),Ym(De)));let m=Wt.calculateTextDimensions(t.message,Ym(De));return{width:Ze.getMax(t.wrap?0:m.width+2*De.wrapPadding,p+2*De.wrapPadding,De.width),height:0,startx:l,stopx:u,starty:0,stopy:0,message:t.message,type:t.type,wrap:t.wrap,fromBounds:Math.min.apply(null,d),toBounds:Math.max.apply(null,d)}},"buildMessageModel"),Wxt=x(async function(t,e,r,n){let a={},i=[],s,o,l;for(let u of t){switch(u.type){case n.db.LINETYPE.LOOP_START:case n.db.LINETYPE.ALT_START:case n.db.LINETYPE.OPT_START:case n.db.LINETYPE.PAR_START:case n.db.LINETYPE.PAR_OVER_START:case n.db.LINETYPE.CRITICAL_START:case n.db.LINETYPE.BREAK_START:i.push({id:u.id,msg:u.message,from:Number.MAX_SAFE_INTEGER,to:Number.MIN_SAFE_INTEGER,width:0});break;case n.db.LINETYPE.ALT_ELSE:case n.db.LINETYPE.PAR_AND:case n.db.LINETYPE.CRITICAL_OPTION:u.message&&(s=i.pop(),a[s.id]=s,a[u.id]=s,i.push(s));break;case n.db.LINETYPE.LOOP_END:case n.db.LINETYPE.ALT_END:case n.db.LINETYPE.OPT_END:case n.db.LINETYPE.PAR_END:case n.db.LINETYPE.CRITICAL_END:case n.db.LINETYPE.BREAK_END:s=i.pop(),a[s.id]=s;break;case n.db.LINETYPE.ACTIVE_START:{let f=e.get(u.from?u.from:u.to.actor),d=o9(u.from?u.from:u.to.actor).length,p=f.x+f.width/2+(d-1)*De.activationWidth/2,m={startx:p,stopx:p+De.activationWidth,actor:u.from,enabled:!0};rt.activations.push(m)}break;case n.db.LINETYPE.ACTIVE_END:{let f=rt.activations.map(d=>d.actor).lastIndexOf(u.from);rt.activations.splice(f,1).splice(0,1)}break}u.placement!==void 0?(o=await Vxt(u,e,n),u.noteModel=o,i.forEach(f=>{s=f,s.from=Ze.getMin(s.from,o.startx),s.to=Ze.getMax(s.to,o.startx+o.width),s.width=Ze.getMax(s.width,Math.abs(s.from-s.to))-De.labelBoxWidth})):(l=Hxt(u,e,n),u.msgModel=l,l.startx&&l.stopx&&i.length>0&&i.forEach(f=>{if(s=f,l.startx===l.stopx){let d=e.get(u.from),p=e.get(u.to);s.from=Ze.getMin(d.x-l.width/2,d.x-d.width/2,s.from),s.to=Ze.getMax(p.x+l.width/2,p.x+d.width/2,s.to),s.width=Ze.getMax(s.width,Math.abs(s.to-s.from))-De.labelBoxWidth}else s.from=Ze.getMin(l.startx,s.from),s.to=Ze.getMax(l.stopx,s.to),s.width=Ze.getMax(s.width,l.width)-De.labelBoxWidth}))}return rt.activations=[],te.debug("Loop type widths:",a),a},"calculateLoopBounds"),Yxt={bounds:rt,drawActors:Sq,drawActorsPopup:xSe,setConf:bSe,draw:Uxt},Xxt={parser:dxt,get db(){return new vxt},renderer:Yxt,styles:xxt,init:x(t=>{t.sequence||(t.sequence={}),t.wrap&&(t.sequence.wrap=t.wrap,Vb({sequence:{wrap:t.wrap}}))},"init")}});var Rq,u9,SSe,Sx,_Se,l9,ASe,Xm,_x,c9,jxt,h9,Kxt,Zxt,Qxt,f9,Iq=A(()=>{wc();su();ln();ur();cr();Rq=(function(){var t=x(function(Me,ke,ve,_e){for(ve=ve||{},_e=Me.length;_e--;ve[Me[_e]]=ke);return ve},"o"),e=[1,18],r=[1,19],n=[1,20],a=[1,41],i=[1,42],s=[1,26],o=[1,24],l=[1,25],u=[1,32],h=[1,33],f=[1,34],d=[1,45],p=[1,35],m=[1,36],g=[1,37],v=[1,38],y=[1,27],b=[1,28],w=[1,29],C=[1,30],k=[1,31],E=[1,44],_=[1,46],S=[1,43],L=[1,47],M=[1,9],D=[1,8,9],T=[1,58],I=[1,59],N=[1,60],O=[1,61],R=[1,62],P=[1,63],B=[1,64],F=[1,8,9,41],G=[1,76],z=[1,8,9,12,13,22,39,41,44,66,67,68,69,70,71,72,77,79],H=[1,8,9,12,13,17,20,22,39,41,44,48,58,66,67,68,69,70,71,72,77,79,84,99,101,102],Q=[13,58,84,99,101,102],Y=[13,58,71,72,84,99,101,102],ie=[13,58,66,67,68,69,70,84,99,101,102],se=[1,98],oe=[1,115],pe=[1,107],J=[1,113],j=[1,108],Z=[1,109],K=[1,110],X=[1,111],ae=[1,112],W=[1,114],Se=[22,58,59,80,84,85,86,87,88,89],ne=[1,8,9,39,41,44],ee=[1,8,9,22],$e=[1,143],me=[1,8,9,59],Ie=[1,8,9,22,58,59,80,84,85,86,87,88,89],Ue={trace:x(function(){},"trace"),yy:{},symbols_:{error:2,start:3,mermaidDoc:4,statements:5,graphConfig:6,CLASS_DIAGRAM:7,NEWLINE:8,EOF:9,statement:10,classLabel:11,SQS:12,STR:13,SQE:14,namespaceName:15,alphaNumToken:16,DOT:17,className:18,classLiteralName:19,GENERICTYPE:20,relationStatement:21,LABEL:22,namespaceStatement:23,classStatement:24,memberStatement:25,annotationStatement:26,clickStatement:27,styleStatement:28,cssClassStatement:29,noteStatement:30,classDefStatement:31,direction:32,acc_title:33,acc_title_value:34,acc_descr:35,acc_descr_value:36,acc_descr_multiline_value:37,namespaceIdentifier:38,STRUCT_START:39,classStatements:40,STRUCT_STOP:41,NAMESPACE:42,classIdentifier:43,STYLE_SEPARATOR:44,members:45,CLASS:46,ANNOTATION_START:47,ANNOTATION_END:48,MEMBER:49,SEPARATOR:50,relation:51,NOTE_FOR:52,noteText:53,NOTE:54,CLASSDEF:55,classList:56,stylesOpt:57,ALPHA:58,COMMA:59,direction_tb:60,direction_bt:61,direction_rl:62,direction_lr:63,relationType:64,lineType:65,AGGREGATION:66,EXTENSION:67,COMPOSITION:68,DEPENDENCY:69,LOLLIPOP:70,LINE:71,DOTTED_LINE:72,CALLBACK:73,LINK:74,LINK_TARGET:75,CLICK:76,CALLBACK_NAME:77,CALLBACK_ARGS:78,HREF:79,STYLE:80,CSSCLASS:81,style:82,styleComponent:83,NUM:84,COLON:85,UNIT:86,SPACE:87,BRKT:88,PCT:89,commentToken:90,textToken:91,graphCodeTokens:92,textNoTagsToken:93,TAGSTART:94,TAGEND:95,"==":96,"--":97,DEFAULT:98,MINUS:99,keywords:100,UNICODE_TEXT:101,BQUOTE_STR:102,$accept:0,$end:1},terminals_:{2:"error",7:"CLASS_DIAGRAM",8:"NEWLINE",9:"EOF",12:"SQS",13:"STR",14:"SQE",17:"DOT",20:"GENERICTYPE",22:"LABEL",33:"acc_title",34:"acc_title_value",35:"acc_descr",36:"acc_descr_value",37:"acc_descr_multiline_value",39:"STRUCT_START",41:"STRUCT_STOP",42:"NAMESPACE",44:"STYLE_SEPARATOR",46:"CLASS",47:"ANNOTATION_START",48:"ANNOTATION_END",49:"MEMBER",50:"SEPARATOR",52:"NOTE_FOR",54:"NOTE",55:"CLASSDEF",58:"ALPHA",59:"COMMA",60:"direction_tb",61:"direction_bt",62:"direction_rl",63:"direction_lr",66:"AGGREGATION",67:"EXTENSION",68:"COMPOSITION",69:"DEPENDENCY",70:"LOLLIPOP",71:"LINE",72:"DOTTED_LINE",73:"CALLBACK",74:"LINK",75:"LINK_TARGET",76:"CLICK",77:"CALLBACK_NAME",78:"CALLBACK_ARGS",79:"HREF",80:"STYLE",81:"CSSCLASS",84:"NUM",85:"COLON",86:"UNIT",87:"SPACE",88:"BRKT",89:"PCT",92:"graphCodeTokens",94:"TAGSTART",95:"TAGEND",96:"==",97:"--",98:"DEFAULT",99:"MINUS",100:"keywords",101:"UNICODE_TEXT",102:"BQUOTE_STR"},productions_:[0,[3,1],[3,1],[4,1],[6,4],[5,1],[5,2],[5,3],[11,3],[15,1],[15,3],[15,2],[18,1],[18,3],[18,1],[18,2],[18,2],[18,2],[10,1],[10,2],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,2],[10,2],[10,1],[23,4],[23,5],[38,2],[40,1],[40,2],[40,3],[24,1],[24,3],[24,4],[24,6],[43,2],[43,3],[26,4],[45,1],[45,2],[25,1],[25,2],[25,1],[25,1],[21,3],[21,4],[21,4],[21,5],[30,3],[30,2],[31,3],[56,1],[56,3],[32,1],[32,1],[32,1],[32,1],[51,3],[51,2],[51,2],[51,1],[64,1],[64,1],[64,1],[64,1],[64,1],[65,1],[65,1],[27,3],[27,4],[27,3],[27,4],[27,4],[27,5],[27,3],[27,4],[27,4],[27,5],[27,4],[27,5],[27,5],[27,6],[28,3],[29,3],[57,1],[57,3],[82,1],[82,2],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[90,1],[90,1],[91,1],[91,1],[91,1],[91,1],[91,1],[91,1],[91,1],[93,1],[93,1],[93,1],[93,1],[16,1],[16,1],[16,1],[16,1],[19,1],[53,1]],performAction:x(function(ke,ve,_e,fe,ue,$,le){var V=$.length-1;switch(ue){case 8:this.$=$[V-1];break;case 9:case 12:case 14:this.$=$[V];break;case 10:case 13:this.$=$[V-2]+"."+$[V];break;case 11:case 15:this.$=$[V-1]+$[V];break;case 16:case 17:this.$=$[V-1]+"~"+$[V]+"~";break;case 18:fe.addRelation($[V]);break;case 19:$[V-1].title=fe.cleanupLabel($[V]),fe.addRelation($[V-1]);break;case 30:this.$=$[V].trim(),fe.setAccTitle(this.$);break;case 31:case 32:this.$=$[V].trim(),fe.setAccDescription(this.$);break;case 33:fe.addClassesToNamespace($[V-3],$[V-1]);break;case 34:fe.addClassesToNamespace($[V-4],$[V-1]);break;case 35:this.$=$[V],fe.addNamespace($[V]);break;case 36:this.$=[$[V]];break;case 37:this.$=[$[V-1]];break;case 38:$[V].unshift($[V-2]),this.$=$[V];break;case 40:fe.setCssClass($[V-2],$[V]);break;case 41:fe.addMembers($[V-3],$[V-1]);break;case 42:fe.setCssClass($[V-5],$[V-3]),fe.addMembers($[V-5],$[V-1]);break;case 43:this.$=$[V],fe.addClass($[V]);break;case 44:this.$=$[V-1],fe.addClass($[V-1]),fe.setClassLabel($[V-1],$[V]);break;case 45:fe.addAnnotation($[V],$[V-2]);break;case 46:case 59:this.$=[$[V]];break;case 47:$[V].push($[V-1]),this.$=$[V];break;case 48:break;case 49:fe.addMember($[V-1],fe.cleanupLabel($[V]));break;case 50:break;case 51:break;case 52:this.$={id1:$[V-2],id2:$[V],relation:$[V-1],relationTitle1:"none",relationTitle2:"none"};break;case 53:this.$={id1:$[V-3],id2:$[V],relation:$[V-1],relationTitle1:$[V-2],relationTitle2:"none"};break;case 54:this.$={id1:$[V-3],id2:$[V],relation:$[V-2],relationTitle1:"none",relationTitle2:$[V-1]};break;case 55:this.$={id1:$[V-4],id2:$[V],relation:$[V-2],relationTitle1:$[V-3],relationTitle2:$[V-1]};break;case 56:fe.addNote($[V],$[V-1]);break;case 57:fe.addNote($[V]);break;case 58:this.$=$[V-2],fe.defineClass($[V-1],$[V]);break;case 60:this.$=$[V-2].concat([$[V]]);break;case 61:fe.setDirection("TB");break;case 62:fe.setDirection("BT");break;case 63:fe.setDirection("RL");break;case 64:fe.setDirection("LR");break;case 65:this.$={type1:$[V-2],type2:$[V],lineType:$[V-1]};break;case 66:this.$={type1:"none",type2:$[V],lineType:$[V-1]};break;case 67:this.$={type1:$[V-1],type2:"none",lineType:$[V]};break;case 68:this.$={type1:"none",type2:"none",lineType:$[V]};break;case 69:this.$=fe.relationType.AGGREGATION;break;case 70:this.$=fe.relationType.EXTENSION;break;case 71:this.$=fe.relationType.COMPOSITION;break;case 72:this.$=fe.relationType.DEPENDENCY;break;case 73:this.$=fe.relationType.LOLLIPOP;break;case 74:this.$=fe.lineType.LINE;break;case 75:this.$=fe.lineType.DOTTED_LINE;break;case 76:case 82:this.$=$[V-2],fe.setClickEvent($[V-1],$[V]);break;case 77:case 83:this.$=$[V-3],fe.setClickEvent($[V-2],$[V-1]),fe.setTooltip($[V-2],$[V]);break;case 78:this.$=$[V-2],fe.setLink($[V-1],$[V]);break;case 79:this.$=$[V-3],fe.setLink($[V-2],$[V-1],$[V]);break;case 80:this.$=$[V-3],fe.setLink($[V-2],$[V-1]),fe.setTooltip($[V-2],$[V]);break;case 81:this.$=$[V-4],fe.setLink($[V-3],$[V-2],$[V]),fe.setTooltip($[V-3],$[V-1]);break;case 84:this.$=$[V-3],fe.setClickEvent($[V-2],$[V-1],$[V]);break;case 85:this.$=$[V-4],fe.setClickEvent($[V-3],$[V-2],$[V-1]),fe.setTooltip($[V-3],$[V]);break;case 86:this.$=$[V-3],fe.setLink($[V-2],$[V]);break;case 87:this.$=$[V-4],fe.setLink($[V-3],$[V-1],$[V]);break;case 88:this.$=$[V-4],fe.setLink($[V-3],$[V-1]),fe.setTooltip($[V-3],$[V]);break;case 89:this.$=$[V-5],fe.setLink($[V-4],$[V-2],$[V]),fe.setTooltip($[V-4],$[V-1]);break;case 90:this.$=$[V-2],fe.setCssStyle($[V-1],$[V]);break;case 91:fe.setCssClass($[V-1],$[V]);break;case 92:this.$=[$[V]];break;case 93:$[V-2].push($[V]),this.$=$[V-2];break;case 95:this.$=$[V-1]+$[V];break}},"anonymous"),table:[{3:1,4:2,5:3,6:4,7:[1,6],10:5,16:39,18:21,19:40,21:7,23:8,24:9,25:10,26:11,27:12,28:13,29:14,30:15,31:16,32:17,33:e,35:r,37:n,38:22,42:a,43:23,46:i,47:s,49:o,50:l,52:u,54:h,55:f,58:d,60:p,61:m,62:g,63:v,73:y,74:b,76:w,80:C,81:k,84:E,99:_,101:S,102:L},{1:[3]},{1:[2,1]},{1:[2,2]},{1:[2,3]},t(M,[2,5],{8:[1,48]}),{8:[1,49]},t(D,[2,18],{22:[1,50]}),t(D,[2,20]),t(D,[2,21]),t(D,[2,22]),t(D,[2,23]),t(D,[2,24]),t(D,[2,25]),t(D,[2,26]),t(D,[2,27]),t(D,[2,28]),t(D,[2,29]),{34:[1,51]},{36:[1,52]},t(D,[2,32]),t(D,[2,48],{51:53,64:56,65:57,13:[1,54],22:[1,55],66:T,67:I,68:N,69:O,70:R,71:P,72:B}),{39:[1,65]},t(F,[2,39],{39:[1,67],44:[1,66]}),t(D,[2,50]),t(D,[2,51]),{16:68,58:d,84:E,99:_,101:S},{16:39,18:69,19:40,58:d,84:E,99:_,101:S,102:L},{16:39,18:70,19:40,58:d,84:E,99:_,101:S,102:L},{16:39,18:71,19:40,58:d,84:E,99:_,101:S,102:L},{58:[1,72]},{13:[1,73]},{16:39,18:74,19:40,58:d,84:E,99:_,101:S,102:L},{13:G,53:75},{56:77,58:[1,78]},t(D,[2,61]),t(D,[2,62]),t(D,[2,63]),t(D,[2,64]),t(z,[2,12],{16:39,19:40,18:80,17:[1,79],20:[1,81],58:d,84:E,99:_,101:S,102:L}),t(z,[2,14],{20:[1,82]}),{15:83,16:84,58:d,84:E,99:_,101:S},{16:39,18:85,19:40,58:d,84:E,99:_,101:S,102:L},t(H,[2,118]),t(H,[2,119]),t(H,[2,120]),t(H,[2,121]),t([1,8,9,12,13,20,22,39,41,44,66,67,68,69,70,71,72,77,79],[2,122]),t(M,[2,6],{10:5,21:7,23:8,24:9,25:10,26:11,27:12,28:13,29:14,30:15,31:16,32:17,18:21,38:22,43:23,16:39,19:40,5:86,33:e,35:r,37:n,42:a,46:i,47:s,49:o,50:l,52:u,54:h,55:f,58:d,60:p,61:m,62:g,63:v,73:y,74:b,76:w,80:C,81:k,84:E,99:_,101:S,102:L}),{5:87,10:5,16:39,18:21,19:40,21:7,23:8,24:9,25:10,26:11,27:12,28:13,29:14,30:15,31:16,32:17,33:e,35:r,37:n,38:22,42:a,43:23,46:i,47:s,49:o,50:l,52:u,54:h,55:f,58:d,60:p,61:m,62:g,63:v,73:y,74:b,76:w,80:C,81:k,84:E,99:_,101:S,102:L},t(D,[2,19]),t(D,[2,30]),t(D,[2,31]),{13:[1,89],16:39,18:88,19:40,58:d,84:E,99:_,101:S,102:L},{51:90,64:56,65:57,66:T,67:I,68:N,69:O,70:R,71:P,72:B},t(D,[2,49]),{65:91,71:P,72:B},t(Q,[2,68],{64:92,66:T,67:I,68:N,69:O,70:R}),t(Y,[2,69]),t(Y,[2,70]),t(Y,[2,71]),t(Y,[2,72]),t(Y,[2,73]),t(ie,[2,74]),t(ie,[2,75]),{8:[1,94],24:95,40:93,43:23,46:i},{16:96,58:d,84:E,99:_,101:S},{45:97,49:se},{48:[1,99]},{13:[1,100]},{13:[1,101]},{77:[1,102],79:[1,103]},{22:oe,57:104,58:pe,80:J,82:105,83:106,84:j,85:Z,86:K,87:X,88:ae,89:W},{58:[1,116]},{13:G,53:117},t(D,[2,57]),t(D,[2,123]),{22:oe,57:118,58:pe,59:[1,119],80:J,82:105,83:106,84:j,85:Z,86:K,87:X,88:ae,89:W},t(Se,[2,59]),{16:39,18:120,19:40,58:d,84:E,99:_,101:S,102:L},t(z,[2,15]),t(z,[2,16]),t(z,[2,17]),{39:[2,35]},{15:122,16:84,17:[1,121],39:[2,9],58:d,84:E,99:_,101:S},t(ne,[2,43],{11:123,12:[1,124]}),t(M,[2,7]),{9:[1,125]},t(ee,[2,52]),{16:39,18:126,19:40,58:d,84:E,99:_,101:S,102:L},{13:[1,128],16:39,18:127,19:40,58:d,84:E,99:_,101:S,102:L},t(Q,[2,67],{64:129,66:T,67:I,68:N,69:O,70:R}),t(Q,[2,66]),{41:[1,130]},{24:95,40:131,43:23,46:i},{8:[1,132],41:[2,36]},t(F,[2,40],{39:[1,133]}),{41:[1,134]},{41:[2,46],45:135,49:se},{16:39,18:136,19:40,58:d,84:E,99:_,101:S,102:L},t(D,[2,76],{13:[1,137]}),t(D,[2,78],{13:[1,139],75:[1,138]}),t(D,[2,82],{13:[1,140],78:[1,141]}),{13:[1,142]},t(D,[2,90],{59:$e}),t(me,[2,92],{83:144,22:oe,58:pe,80:J,84:j,85:Z,86:K,87:X,88:ae,89:W}),t(Ie,[2,94]),t(Ie,[2,96]),t(Ie,[2,97]),t(Ie,[2,98]),t(Ie,[2,99]),t(Ie,[2,100]),t(Ie,[2,101]),t(Ie,[2,102]),t(Ie,[2,103]),t(Ie,[2,104]),t(D,[2,91]),t(D,[2,56]),t(D,[2,58],{59:$e}),{58:[1,145]},t(z,[2,13]),{15:146,16:84,58:d,84:E,99:_,101:S},{39:[2,11]},t(ne,[2,44]),{13:[1,147]},{1:[2,4]},t(ee,[2,54]),t(ee,[2,53]),{16:39,18:148,19:40,58:d,84:E,99:_,101:S,102:L},t(Q,[2,65]),t(D,[2,33]),{41:[1,149]},{24:95,40:150,41:[2,37],43:23,46:i},{45:151,49:se},t(F,[2,41]),{41:[2,47]},t(D,[2,45]),t(D,[2,77]),t(D,[2,79]),t(D,[2,80],{75:[1,152]}),t(D,[2,83]),t(D,[2,84],{13:[1,153]}),t(D,[2,86],{13:[1,155],75:[1,154]}),{22:oe,58:pe,80:J,82:156,83:106,84:j,85:Z,86:K,87:X,88:ae,89:W},t(Ie,[2,95]),t(Se,[2,60]),{39:[2,10]},{14:[1,157]},t(ee,[2,55]),t(D,[2,34]),{41:[2,38]},{41:[1,158]},t(D,[2,81]),t(D,[2,85]),t(D,[2,87]),t(D,[2,88],{75:[1,159]}),t(me,[2,93],{83:144,22:oe,58:pe,80:J,84:j,85:Z,86:K,87:X,88:ae,89:W}),t(ne,[2,8]),t(F,[2,42]),t(D,[2,89])],defaultActions:{2:[2,1],3:[2,2],4:[2,3],83:[2,35],122:[2,11],125:[2,4],135:[2,47],146:[2,10],150:[2,38]},parseError:x(function(ke,ve){if(ve.recoverable)this.trace(ke);else{var _e=new Error(ke);throw _e.hash=ve,_e}},"parseError"),parse:x(function(ke){var ve=this,_e=[0],fe=[],ue=[null],$=[],le=this.table,V="",he=0,de=0,Ne=0,we=2,ye=1,Be=$.slice.call(arguments,1),Le=Object.create(this.lexer),qe={yy:{}};for(var Ke in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Ke)&&(qe.yy[Ke]=this.yy[Ke]);Le.setInput(ke,qe.yy),qe.yy.lexer=Le,qe.yy.parser=this,typeof Le.yylloc>"u"&&(Le.yylloc={});var Ye=Le.yylloc;$.push(Ye);var Xe=Le.options&&Le.options.ranges;typeof qe.yy.parseError=="function"?this.parseError=qe.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Ve(Ct){_e.length=_e.length-2*Ct,ue.length=ue.length-Ct,$.length=$.length-Ct}x(Ve,"popStack");function ot(){var Ct;return Ct=fe.pop()||Le.lex()||ye,typeof Ct!="number"&&(Ct instanceof Array&&(fe=Ct,Ct=fe.pop()),Ct=ve.symbols_[Ct]||Ct),Ct}x(ot,"lex");for(var He,nt,It,it,Tt,lt,ct={},ft,dt,yt,at;;){if(It=_e[_e.length-1],this.defaultActions[It]?it=this.defaultActions[It]:((He===null||typeof He>"u")&&(He=ot()),it=le[It]&&le[It][He]),typeof it>"u"||!it.length||!it[0]){var dn="";at=[];for(ft in le[It])this.terminals_[ft]&&ft>we&&at.push("'"+this.terminals_[ft]+"'");Le.showPosition?dn="Parse error on line "+(he+1)+`: -`+Le.showPosition()+` -Expecting `+at.join(", ")+", got '"+(this.terminals_[He]||He)+"'":dn="Parse error on line "+(he+1)+": Unexpected "+(He==ye?"end of input":"'"+(this.terminals_[He]||He)+"'"),this.parseError(dn,{text:Le.match,token:this.terminals_[He]||He,line:Le.yylineno,loc:Ye,expected:at})}if(it[0]instanceof Array&&it.length>1)throw new Error("Parse Error: multiple actions possible at state: "+It+", token: "+He);switch(it[0]){case 1:_e.push(He),ue.push(Le.yytext),$.push(Le.yylloc),_e.push(it[1]),He=null,nt?(He=nt,nt=null):(de=Le.yyleng,V=Le.yytext,he=Le.yylineno,Ye=Le.yylloc,Ne>0&&Ne--);break;case 2:if(dt=this.productions_[it[1]][1],ct.$=ue[ue.length-dt],ct._$={first_line:$[$.length-(dt||1)].first_line,last_line:$[$.length-1].last_line,first_column:$[$.length-(dt||1)].first_column,last_column:$[$.length-1].last_column},Xe&&(ct._$.range=[$[$.length-(dt||1)].range[0],$[$.length-1].range[1]]),lt=this.performAction.apply(ct,[V,de,he,qe.yy,it[1],ue,$].concat(Be)),typeof lt<"u")return lt;dt&&(_e=_e.slice(0,-1*dt*2),ue=ue.slice(0,-1*dt),$=$.slice(0,-1*dt)),_e.push(this.productions_[it[1]][0]),ue.push(ct.$),$.push(ct._$),yt=le[_e[_e.length-2]][_e[_e.length-1]],_e.push(yt);break;case 3:return!0}}return!0},"parse")},Fe=(function(){var Me={EOF:1,parseError:x(function(ve,_e){if(this.yy.parser)this.yy.parser.parseError(ve,_e);else throw new Error(ve)},"parseError"),setInput:x(function(ke,ve){return this.yy=ve||this.yy||{},this._input=ke,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:x(function(){var ke=this._input[0];this.yytext+=ke,this.yyleng++,this.offset++,this.match+=ke,this.matched+=ke;var ve=ke.match(/(?:\r\n?|\n).*/g);return ve?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),ke},"input"),unput:x(function(ke){var ve=ke.length,_e=ke.split(/(?:\r\n?|\n)/g);this._input=ke+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-ve),this.offset-=ve;var fe=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),_e.length-1&&(this.yylineno-=_e.length-1);var ue=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:_e?(_e.length===fe.length?this.yylloc.first_column:0)+fe[fe.length-_e.length].length-_e[0].length:this.yylloc.first_column-ve},this.options.ranges&&(this.yylloc.range=[ue[0],ue[0]+this.yyleng-ve]),this.yyleng=this.yytext.length,this},"unput"),more:x(function(){return this._more=!0,this},"more"),reject:x(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). -`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:x(function(ke){this.unput(this.match.slice(ke))},"less"),pastInput:x(function(){var ke=this.matched.substr(0,this.matched.length-this.match.length);return(ke.length>20?"...":"")+ke.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:x(function(){var ke=this.match;return ke.length<20&&(ke+=this._input.substr(0,20-ke.length)),(ke.substr(0,20)+(ke.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:x(function(){var ke=this.pastInput(),ve=new Array(ke.length+1).join("-");return ke+this.upcomingInput()+` -`+ve+"^"},"showPosition"),test_match:x(function(ke,ve){var _e,fe,ue;if(this.options.backtrack_lexer&&(ue={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(ue.yylloc.range=this.yylloc.range.slice(0))),fe=ke[0].match(/(?:\r\n?|\n).*/g),fe&&(this.yylineno+=fe.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:fe?fe[fe.length-1].length-fe[fe.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+ke[0].length},this.yytext+=ke[0],this.match+=ke[0],this.matches=ke,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(ke[0].length),this.matched+=ke[0],_e=this.performAction.call(this,this.yy,this,ve,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),_e)return _e;if(this._backtrack){for(var $ in ue)this[$]=ue[$];return!1}return!1},"test_match"),next:x(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var ke,ve,_e,fe;this._more||(this.yytext="",this.match="");for(var ue=this._currentRules(),$=0;$ve[0].length)){if(ve=_e,fe=$,this.options.backtrack_lexer){if(ke=this.test_match(_e,ue[$]),ke!==!1)return ke;if(this._backtrack){ve=!1;continue}else return!1}else if(!this.options.flex)break}return ve?(ke=this.test_match(ve,ue[fe]),ke!==!1?ke:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. -`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:x(function(){var ve=this.next();return ve||this.lex()},"lex"),begin:x(function(ve){this.conditionStack.push(ve)},"begin"),popState:x(function(){var ve=this.conditionStack.length-1;return ve>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:x(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:x(function(ve){return ve=this.conditionStack.length-1-Math.abs(ve||0),ve>=0?this.conditionStack[ve]:"INITIAL"},"topState"),pushState:x(function(ve){this.begin(ve)},"pushState"),stateStackSize:x(function(){return this.conditionStack.length},"stateStackSize"),options:{},performAction:x(function(ve,_e,fe,ue){var $=ue;switch(fe){case 0:return 60;case 1:return 61;case 2:return 62;case 3:return 63;case 4:break;case 5:break;case 6:return this.begin("acc_title"),33;break;case 7:return this.popState(),"acc_title_value";break;case 8:return this.begin("acc_descr"),35;break;case 9:return this.popState(),"acc_descr_value";break;case 10:this.begin("acc_descr_multiline");break;case 11:this.popState();break;case 12:return"acc_descr_multiline_value";case 13:return 8;case 14:break;case 15:return 7;case 16:return 7;case 17:return"EDGE_STATE";case 18:this.begin("callback_name");break;case 19:this.popState();break;case 20:this.popState(),this.begin("callback_args");break;case 21:return 77;case 22:this.popState();break;case 23:return 78;case 24:this.popState();break;case 25:return"STR";case 26:this.begin("string");break;case 27:return 80;case 28:return 55;case 29:return this.begin("namespace"),42;break;case 30:return this.popState(),8;break;case 31:break;case 32:return this.begin("namespace-body"),39;break;case 33:return this.popState(),41;break;case 34:return"EOF_IN_STRUCT";case 35:return 8;case 36:break;case 37:return"EDGE_STATE";case 38:return this.begin("class"),46;break;case 39:return this.popState(),8;break;case 40:break;case 41:return this.popState(),this.popState(),41;break;case 42:return this.begin("class-body"),39;break;case 43:return this.popState(),41;break;case 44:return"EOF_IN_STRUCT";case 45:return"EDGE_STATE";case 46:return"OPEN_IN_STRUCT";case 47:break;case 48:return"MEMBER";case 49:return 81;case 50:return 73;case 51:return 74;case 52:return 76;case 53:return 52;case 54:return 54;case 55:return 47;case 56:return 48;case 57:return 79;case 58:this.popState();break;case 59:return"GENERICTYPE";case 60:this.begin("generic");break;case 61:this.popState();break;case 62:return"BQUOTE_STR";case 63:this.begin("bqstring");break;case 64:return 75;case 65:return 75;case 66:return 75;case 67:return 75;case 68:return 67;case 69:return 67;case 70:return 69;case 71:return 69;case 72:return 68;case 73:return 66;case 74:return 70;case 75:return 71;case 76:return 72;case 77:return 22;case 78:return 44;case 79:return 99;case 80:return 17;case 81:return"PLUS";case 82:return 85;case 83:return 59;case 84:return 88;case 85:return 88;case 86:return 89;case 87:return"EQUALS";case 88:return"EQUALS";case 89:return 58;case 90:return 12;case 91:return 14;case 92:return"PUNCTUATION";case 93:return 84;case 94:return 101;case 95:return 87;case 96:return 87;case 97:return 9}},"anonymous"),rules:[/^(?:.*direction\s+TB[^\n]*)/,/^(?:.*direction\s+BT[^\n]*)/,/^(?:.*direction\s+RL[^\n]*)/,/^(?:.*direction\s+LR[^\n]*)/,/^(?:%%(?!\{)*[^\n]*(\r?\n?)+)/,/^(?:%%[^\n]*(\r?\n)*)/,/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?:\s*(\r?\n)+)/,/^(?:\s+)/,/^(?:classDiagram-v2\b)/,/^(?:classDiagram\b)/,/^(?:\[\*\])/,/^(?:call[\s]+)/,/^(?:\([\s]*\))/,/^(?:\()/,/^(?:[^(]*)/,/^(?:\))/,/^(?:[^)]*)/,/^(?:["])/,/^(?:[^"]*)/,/^(?:["])/,/^(?:style\b)/,/^(?:classDef\b)/,/^(?:namespace\b)/,/^(?:\s*(\r?\n)+)/,/^(?:\s+)/,/^(?:[{])/,/^(?:[}])/,/^(?:$)/,/^(?:\s*(\r?\n)+)/,/^(?:\s+)/,/^(?:\[\*\])/,/^(?:class\b)/,/^(?:\s*(\r?\n)+)/,/^(?:\s+)/,/^(?:[}])/,/^(?:[{])/,/^(?:[}])/,/^(?:$)/,/^(?:\[\*\])/,/^(?:[{])/,/^(?:[\n])/,/^(?:[^{}\n]*)/,/^(?:cssClass\b)/,/^(?:callback\b)/,/^(?:link\b)/,/^(?:click\b)/,/^(?:note for\b)/,/^(?:note\b)/,/^(?:<<)/,/^(?:>>)/,/^(?:href\b)/,/^(?:[~])/,/^(?:[^~]*)/,/^(?:~)/,/^(?:[`])/,/^(?:[^`]+)/,/^(?:[`])/,/^(?:_self\b)/,/^(?:_blank\b)/,/^(?:_parent\b)/,/^(?:_top\b)/,/^(?:\s*<\|)/,/^(?:\s*\|>)/,/^(?:\s*>)/,/^(?:\s*<)/,/^(?:\s*\*)/,/^(?:\s*o\b)/,/^(?:\s*\(\))/,/^(?:--)/,/^(?:\.\.)/,/^(?::{1}[^:\n;]+)/,/^(?::{3})/,/^(?:-)/,/^(?:\.)/,/^(?:\+)/,/^(?::)/,/^(?:,)/,/^(?:#)/,/^(?:#)/,/^(?:%)/,/^(?:=)/,/^(?:=)/,/^(?:\w+)/,/^(?:\[)/,/^(?:\])/,/^(?:[!"#$%&'*+,-.`?\\/])/,/^(?:[0-9]+)/,/^(?:[\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6]|[\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377]|[\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5]|[\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA]|[\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE]|[\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA]|[\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0]|[\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977]|[\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2]|[\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A]|[\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39]|[\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8]|[\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C]|[\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C]|[\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99]|[\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0]|[\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D]|[\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3]|[\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10]|[\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1]|[\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81]|[\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3]|[\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6]|[\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A]|[\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081]|[\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D]|[\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0]|[\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310]|[\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C]|[\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711]|[\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7]|[\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C]|[\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16]|[\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF]|[\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC]|[\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D]|[\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D]|[\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3]|[\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F]|[\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128]|[\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184]|[\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3]|[\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6]|[\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE]|[\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C]|[\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D]|[\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC]|[\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B]|[\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788]|[\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805]|[\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB]|[\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28]|[\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5]|[\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4]|[\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E]|[\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D]|[\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36]|[\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D]|[\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC]|[\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF]|[\uFFD2-\uFFD7\uFFDA-\uFFDC])/,/^(?:\s)/,/^(?:\s)/,/^(?:$)/],conditions:{"namespace-body":{rules:[26,33,34,35,36,37,38,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},namespace:{rules:[26,29,30,31,32,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},"class-body":{rules:[26,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},class:{rules:[26,39,40,41,42,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},acc_descr_multiline:{rules:[11,12,26,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},acc_descr:{rules:[9,26,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},acc_title:{rules:[7,26,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},callback_args:{rules:[22,23,26,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},callback_name:{rules:[19,20,21,26,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},href:{rules:[26,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},struct:{rules:[26,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},generic:{rules:[26,49,50,51,52,53,54,55,56,57,58,59,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},bqstring:{rules:[26,49,50,51,52,53,54,55,56,57,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},string:{rules:[24,25,26,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,8,10,13,14,15,16,17,18,26,27,28,29,38,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97],inclusive:!0}}};return Me})();Ue.lexer=Fe;function Ae(){this.yy={}}return x(Ae,"Parser"),Ae.prototype=Ue,Ue.Parser=Ae,new Ae})();Rq.parser=Rq;u9=Rq,SSe=["#","+","~","-",""],_Se=(Sx=class{constructor(e,r){this.memberType=r,this.visibility="",this.classifier="",this.text="";let n=Er(e,Te());this.parseMember(n)}getDisplayDetails(){let e=this.visibility+Wu(this.id);this.memberType==="method"&&(e+=`(${Wu(this.parameters.trim())})`,this.returnType&&(e+=" : "+Wu(this.returnType))),e=e.trim();let r=this.parseClassifier();return{displayText:e,cssStyle:r}}parseMember(e){let r="";if(this.memberType==="method"){let i=/([#+~-])?(.+)\((.*)\)([\s$*])?(.*)([$*])?/.exec(e);if(i){let s=i[1]?i[1].trim():"";if(SSe.includes(s)&&(this.visibility=s),this.id=i[2],this.parameters=i[3]?i[3].trim():"",r=i[4]?i[4].trim():"",this.returnType=i[5]?i[5].trim():"",r===""){let o=this.returnType.substring(this.returnType.length-1);/[$*]/.exec(o)&&(r=o,this.returnType=this.returnType.substring(0,this.returnType.length-1))}}}else{let a=e.length,i=e.substring(0,1),s=e.substring(a-1);SSe.includes(i)&&(this.visibility=i),/[$*]/.exec(s)&&(r=s),this.id=e.substring(this.visibility===""?0:1,r===""?a:a-1)}this.classifier=r,this.id=this.id.startsWith(" ")?" "+this.id.trim():this.id.trim();let n=`${this.visibility?"\\"+this.visibility:""}${Wu(this.id)}${this.memberType==="method"?`(${Wu(this.parameters)})${this.returnType?" : "+Wu(this.returnType):""}`:""}`;this.text=n.replaceAll("<","<").replaceAll(">",">"),this.text.startsWith("\\<")&&(this.text=this.text.replace("\\<","~"))}parseClassifier(){switch(this.classifier){case"*":return"font-style:italic;";case"$":return"text-decoration:underline;";default:return""}}},x(Sx,"ClassMember"),Sx),l9="classId-",ASe=0,Xm=x(t=>Ze.sanitizeText(t,Te()),"sanitizeText"),c9=(_x=class{constructor(){this.relations=[],this.classes=new Map,this.styleClasses=new Map,this.notes=[],this.interfaces=[],this.namespaces=new Map,this.namespaceCounter=0,this.functions=[],this.lineType={LINE:0,DOTTED_LINE:1},this.relationType={AGGREGATION:0,EXTENSION:1,COMPOSITION:2,DEPENDENCY:3,LOLLIPOP:4},this.setupToolTips=x(e=>{let r=We(".mermaidTooltip");(r._groups||r)[0][0]===null&&(r=We("body").append("div").attr("class","mermaidTooltip").style("opacity",0)),We(e).select("svg").selectAll("g.node").on("mouseover",i=>{let s=We(i.currentTarget);if(s.attr("title")===null)return;let l=this.getBoundingClientRect();r.transition().duration(200).style("opacity",".9"),r.text(s.attr("title")).style("left",window.scrollX+l.left+(l.right-l.left)/2+"px").style("top",window.scrollY+l.top-14+document.body.scrollTop+"px"),r.html(r.html().replace(/<br\/>/g,"
    ")),s.classed("hover",!0)}).on("mouseout",i=>{r.transition().duration(500).style("opacity",0),We(i.currentTarget).classed("hover",!1)})},"setupToolTips"),this.direction="TB",this.setAccTitle=Sr,this.getAccTitle=_r,this.setAccDescription=Ar,this.getAccDescription=Lr,this.setDiagramTitle=Fr,this.getDiagramTitle=Rr,this.getConfig=x(()=>Te().class,"getConfig"),this.functions.push(this.setupToolTips.bind(this)),this.clear(),this.addRelation=this.addRelation.bind(this),this.addClassesToNamespace=this.addClassesToNamespace.bind(this),this.addNamespace=this.addNamespace.bind(this),this.setCssClass=this.setCssClass.bind(this),this.addMembers=this.addMembers.bind(this),this.addClass=this.addClass.bind(this),this.setClassLabel=this.setClassLabel.bind(this),this.addAnnotation=this.addAnnotation.bind(this),this.addMember=this.addMember.bind(this),this.cleanupLabel=this.cleanupLabel.bind(this),this.addNote=this.addNote.bind(this),this.defineClass=this.defineClass.bind(this),this.setDirection=this.setDirection.bind(this),this.setLink=this.setLink.bind(this),this.bindFunctions=this.bindFunctions.bind(this),this.clear=this.clear.bind(this),this.setTooltip=this.setTooltip.bind(this),this.setClickEvent=this.setClickEvent.bind(this),this.setCssStyle=this.setCssStyle.bind(this)}splitClassNameAndType(e){let r=Ze.sanitizeText(e,Te()),n="",a=r;if(r.indexOf("~")>0){let i=r.split("~");a=Xm(i[0]),n=Xm(i[1])}return{className:a,type:n}}setClassLabel(e,r){let n=Ze.sanitizeText(e,Te());r&&(r=Xm(r));let{className:a}=this.splitClassNameAndType(n);this.classes.get(a).label=r,this.classes.get(a).text=`${r}${this.classes.get(a).type?`<${this.classes.get(a).type}>`:""}`}addClass(e){let r=Ze.sanitizeText(e,Te()),{className:n,type:a}=this.splitClassNameAndType(r);if(this.classes.has(n))return;let i=Ze.sanitizeText(n,Te());this.classes.set(i,{id:i,type:a,label:i,text:`${i}${a?`<${a}>`:""}`,shape:"classBox",cssClasses:"default",methods:[],members:[],annotations:[],styles:[],domId:l9+i+"-"+ASe}),ASe++}addInterface(e,r){let n={id:`interface${this.interfaces.length}`,label:e,classId:r};this.interfaces.push(n)}lookUpDomId(e){let r=Ze.sanitizeText(e,Te());if(this.classes.has(r))return this.classes.get(r).domId;throw new Error("Class not found: "+r)}clear(){this.relations=[],this.classes=new Map,this.notes=[],this.interfaces=[],this.functions=[],this.functions.push(this.setupToolTips.bind(this)),this.namespaces=new Map,this.namespaceCounter=0,this.direction="TB",Cr()}getClass(e){return this.classes.get(e)}getClasses(){return this.classes}getRelations(){return this.relations}getNotes(){return this.notes}addRelation(e){te.debug("Adding relation: "+JSON.stringify(e));let r=[this.relationType.LOLLIPOP,this.relationType.AGGREGATION,this.relationType.COMPOSITION,this.relationType.DEPENDENCY,this.relationType.EXTENSION];e.relation.type1===this.relationType.LOLLIPOP&&!r.includes(e.relation.type2)?(this.addClass(e.id2),this.addInterface(e.id1,e.id2),e.id1=`interface${this.interfaces.length-1}`):e.relation.type2===this.relationType.LOLLIPOP&&!r.includes(e.relation.type1)?(this.addClass(e.id1),this.addInterface(e.id2,e.id1),e.id2=`interface${this.interfaces.length-1}`):(this.addClass(e.id1),this.addClass(e.id2)),e.id1=this.splitClassNameAndType(e.id1).className,e.id2=this.splitClassNameAndType(e.id2).className,e.relationTitle1=Ze.sanitizeText(e.relationTitle1.trim(),Te()),e.relationTitle2=Ze.sanitizeText(e.relationTitle2.trim(),Te()),this.relations.push(e)}addAnnotation(e,r){let n=this.splitClassNameAndType(e).className;this.classes.get(n).annotations.push(r)}addMember(e,r){this.addClass(e);let n=this.splitClassNameAndType(e).className,a=this.classes.get(n);if(typeof r=="string"){let i=r.trim();i.startsWith("<<")&&i.endsWith(">>")?a.annotations.push(Xm(i.substring(2,i.length-2))):i.indexOf(")")>0?a.methods.push(new _Se(i,"method")):i&&a.members.push(new _Se(i,"attribute"))}}addMembers(e,r){Array.isArray(r)&&(r.reverse(),r.forEach(n=>this.addMember(e,n)))}addNote(e,r){let n={id:`note${this.notes.length}`,class:r,text:e};this.notes.push(n)}cleanupLabel(e){return e.startsWith(":")&&(e=e.substring(1)),Xm(e.trim())}setCssClass(e,r){e.split(",").forEach(n=>{let a=n;/\d/.exec(n[0])&&(a=l9+a);let i=this.classes.get(a);i&&(i.cssClasses+=" "+r)})}defineClass(e,r){for(let n of e){let a=this.styleClasses.get(n);a===void 0&&(a={id:n,styles:[],textStyles:[]},this.styleClasses.set(n,a)),r&&r.forEach(i=>{if(/color/.exec(i)){let s=i.replace("fill","bgFill");a.textStyles.push(s)}a.styles.push(i)}),this.classes.forEach(i=>{i.cssClasses.includes(n)&&i.styles.push(...r.flatMap(s=>s.split(",")))})}}setTooltip(e,r){e.split(",").forEach(n=>{r!==void 0&&(this.classes.get(n).tooltip=Xm(r))})}getTooltip(e,r){return r&&this.namespaces.has(r)?this.namespaces.get(r).classes.get(e).tooltip:this.classes.get(e).tooltip}setLink(e,r,n){let a=Te();e.split(",").forEach(i=>{let s=i;/\d/.exec(i[0])&&(s=l9+s);let o=this.classes.get(s);o&&(o.link=Wt.formatUrl(r,a),a.securityLevel==="sandbox"?o.linkTarget="_top":typeof n=="string"?o.linkTarget=Xm(n):o.linkTarget="_blank")}),this.setCssClass(e,"clickable")}setClickEvent(e,r,n){e.split(",").forEach(a=>{this.setClickFunc(a,r,n),this.classes.get(a).haveCallback=!0}),this.setCssClass(e,"clickable")}setClickFunc(e,r,n){let a=Ze.sanitizeText(e,Te());if(Te().securityLevel!=="loose"||r===void 0)return;let s=a;if(this.classes.has(s)){let o=this.lookUpDomId(s),l=[];if(typeof n=="string"){l=n.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let u=0;u{let u=document.querySelector(`[id="${o}"]`);u!==null&&u.addEventListener("click",()=>{Wt.runFunc(r,...l)},!1)})}}bindFunctions(e){this.functions.forEach(r=>{r(e)})}getDirection(){return this.direction}setDirection(e){this.direction=e}addNamespace(e){this.namespaces.has(e)||(this.namespaces.set(e,{id:e,classes:new Map,children:{},domId:l9+e+"-"+this.namespaceCounter}),this.namespaceCounter++)}getNamespace(e){return this.namespaces.get(e)}getNamespaces(){return this.namespaces}addClassesToNamespace(e,r){if(this.namespaces.has(e))for(let n of r){let{className:a}=this.splitClassNameAndType(n);this.classes.get(a).parent=e,this.namespaces.get(e).classes.set(a,this.classes.get(a))}}setCssStyle(e,r){let n=this.classes.get(e);if(!(!r||!n))for(let a of r)a.includes(",")?n.styles.push(...a.split(",")):n.styles.push(a)}getArrowMarker(e){let r;switch(e){case 0:r="aggregation";break;case 1:r="extension";break;case 2:r="composition";break;case 3:r="dependency";break;case 4:r="lollipop";break;default:r="none"}return r}getData(){let e=[],r=[],n=Te();for(let i of this.namespaces.keys()){let s=this.namespaces.get(i);if(s){let o={id:s.id,label:s.id,isGroup:!0,padding:n.class.padding??16,shape:"rect",cssStyles:["fill: none","stroke: black"],look:n.look};e.push(o)}}for(let i of this.classes.keys()){let s=this.classes.get(i);if(s){let o=s;o.parentId=s.parent,o.look=n.look,e.push(o)}}let a=0;for(let i of this.notes){a++;let s={id:i.id,label:i.text,isGroup:!1,shape:"note",padding:n.class.padding??6,cssStyles:["text-align: left","white-space: nowrap",`fill: ${n.themeVariables.noteBkgColor}`,`stroke: ${n.themeVariables.noteBorderColor}`],look:n.look};e.push(s);let o=this.classes.get(i.class)?.id??"";if(o){let l={id:`edgeNote${a}`,start:i.id,end:o,type:"normal",thickness:"normal",classes:"relation",arrowTypeStart:"none",arrowTypeEnd:"none",arrowheadStyle:"",labelStyle:[""],style:["fill: none"],pattern:"dotted",look:n.look};r.push(l)}}for(let i of this.interfaces){let s={id:i.id,label:i.label,isGroup:!1,shape:"rect",cssStyles:["opacity: 0;"],look:n.look};e.push(s)}a=0;for(let i of this.relations){a++;let s={id:vd(i.id1,i.id2,{prefix:"id",counter:a}),start:i.id1,end:i.id2,type:"normal",label:i.title,labelpos:"c",thickness:"normal",classes:"relation",arrowTypeStart:this.getArrowMarker(i.relation.type1),arrowTypeEnd:this.getArrowMarker(i.relation.type2),startLabelRight:i.relationTitle1==="none"?"":i.relationTitle1,endLabelLeft:i.relationTitle2==="none"?"":i.relationTitle2,arrowheadStyle:"",labelStyle:["display: inline-block"],style:i.style||"",pattern:i.relation.lineType==1?"dashed":"solid",look:n.look};r.push(s)}return{nodes:e,edges:r,other:{},config:n,direction:this.getDirection()}}},x(_x,"ClassDB"),_x),jxt=x(t=>`g.classGroup text { +`,"getStyles"),K5t=j5t,tg=36,FCe="actor-top",zCe="actor-bottom",Z5t="actor-box",PCe="actor-man",$V=b(function(t,e){return mm(t,e)},"drawRect"),Q5t=b(function(t,e,r,n,i){if(e.links===void 0||e.links===null||Object.keys(e.links).length===0)return{height:0,width:0};let a=e.links,s=e.actorCnt,o=e.rectData;var l="none";i&&(l="block !important");let u=t.append("g");u.attr("id","actor"+s+"_popup"),u.attr("class","actorPopupMenu"),u.attr("display",l);var h="";o.class!==void 0&&(h=" "+o.class);let f=o.width>r?o.width:r,d=u.append("rect");if(d.attr("class","actorPopupMenuPanel"+h),d.attr("x",o.x),d.attr("y",o.height),d.attr("fill",o.fill),d.attr("stroke",o.stroke),d.attr("width",f),d.attr("height",o.height),d.attr("rx",o.rx),d.attr("ry",o.ry),a!=null){var p=20;for(let y in a){var m=u.append("a"),g=(0,zV.sanitizeUrl)(a[y]);m.attr("xlink:href",g),m.attr("target","_blank"),m6t(n)(y,m,o.x+10,o.height+p,f,20,{class:"actor"},n),p+=30}}return d.attr("height",p),{height:o.height+p,width:f}},"drawPopup"),J5t=b(function(t){return"var pu = document.getElementById('"+t+"'); if (pu != null) { pu.style.display = pu.style.display == 'block' ? 'none' : 'block'; }"},"popupMenuToggle"),$L=b(async function(t,e,r=null){let n=t.append("foreignObject"),i=await jf(e.text,Yr()),s=n.append("xhtml:div").attr("style","width: fit-content;").attr("xmlns","http://www.w3.org/1999/xhtml").html(i).node().getBoundingClientRect();if(n.attr("height",Math.round(s.height)).attr("width",Math.round(s.width)),e.class==="noteText"){let o=t.node().firstChild;o.setAttribute("height",s.height+2*e.textMargin);let l=o.getBBox();n.attr("x",Math.round(l.x+l.width/2-s.width/2)).attr("y",Math.round(l.y+l.height/2-s.height/2))}else if(r){let{startx:o,stopx:l,starty:u}=r;if(o>l){let h=o;o=l,l=h}n.attr("x",Math.round(o+Math.abs(o-l)/2-s.width/2)),e.class==="loopText"?n.attr("y",Math.round(u)):n.attr("y",Math.round(u-s.height))}return[n]},"drawKatex"),F4=b(function(t,e){let r=0,n=0,i=e.text.split(St.lineBreakRegex),[a,s]=cu(e.fontSize),o=[],l=0,u=b(()=>e.y,"yfunc");if(e.valign!==void 0&&e.textMargin!==void 0&&e.textMargin>0)switch(e.valign){case"top":case"start":u=b(()=>Math.round(e.y+e.textMargin),"yfunc");break;case"middle":case"center":u=b(()=>Math.round(e.y+(r+n+e.textMargin)/2),"yfunc");break;case"bottom":case"end":u=b(()=>Math.round(e.y+(r+n+2*e.textMargin)-e.textMargin),"yfunc");break}if(e.anchor!==void 0&&e.textMargin!==void 0&&e.width!==void 0)switch(e.anchor){case"left":case"start":e.x=Math.round(e.x+e.textMargin),e.anchor="start",e.dominantBaseline="middle",e.alignmentBaseline="middle";break;case"middle":case"center":e.x=Math.round(e.x+e.width/2),e.anchor="middle",e.dominantBaseline="middle",e.alignmentBaseline="middle";break;case"right":case"end":e.x=Math.round(e.x+e.width-e.textMargin),e.anchor="end",e.dominantBaseline="middle",e.alignmentBaseline="middle";break}for(let[h,f]of i.entries()){e.textMargin!==void 0&&e.textMargin===0&&a!==void 0&&(l=h*a);let d=t.append("text");d.attr("x",e.x),d.attr("y",u()),e.anchor!==void 0&&d.attr("text-anchor",e.anchor).attr("dominant-baseline",e.dominantBaseline).attr("alignment-baseline",e.alignmentBaseline),e.fontFamily!==void 0&&d.style("font-family",e.fontFamily),s!==void 0&&d.style("font-size",s),e.fontWeight!==void 0&&d.style("font-weight",e.fontWeight),e.fill!==void 0&&d.attr("fill",e.fill),e.class!==void 0&&d.attr("class",e.class),e.dy!==void 0?d.attr("dy",e.dy):l!==0&&d.attr("dy",l);let p=f||jB;if(e.tspan){let m=d.append("tspan");m.attr("x",e.x),e.fill!==void 0&&m.attr("fill",e.fill),m.text(p)}else d.text(p);e.valign!==void 0&&e.textMargin!==void 0&&e.textMargin>0&&(n+=(d._groups||d)[0][0].getBBox().height,r=n),o.push(d)}return o},"drawText"),$Ce=b(function(t,e){function r(i,a,s,o,l){return i+","+a+" "+(i+s)+","+a+" "+(i+s)+","+(a+o-l)+" "+(i+s-l*1.2)+","+(a+o)+" "+i+","+(a+o)}b(r,"genPoints");let n=t.append("polygon");return n.attr("points",r(e.x,e.y,e.width,e.height,7)),n.attr("class","labelBox"),e.y=e.y+e.height/2,F4(t,e),n},"drawLabel"),eh=-1,GCe=b((t,e,r,n)=>{t.select&&r.forEach(i=>{let a=e.get(i),s=t.select("#actor"+a.actorCnt);!n.mirrorActors&&a.stopy?s.attr("y2",a.stopy+a.height/2):n.mirrorActors&&s.attr("y2",a.stopy)})},"fixLifeLineHeights"),e6t=b(function(t,e,r,n){let i=n?e.stopy:e.starty,a=e.x+e.width/2,s=i+e.height,o=t.append("g").lower();var l=o;n||(eh++,Object.keys(e.links||{}).length&&!r.forceMenus&&l.attr("onclick",J5t(`actor${eh}_popup`)).attr("cursor","pointer"),l.append("line").attr("id","actor"+eh).attr("x1",a).attr("y1",s).attr("x2",a).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",e.name),l=o.append("g"),e.actorCnt=eh,e.links!=null&&l.attr("id","root-"+eh));let u=x0();var h="actor";e.properties?.class?h=e.properties.class:u.fill="#eaeaea",n?h+=` ${zCe}`:h+=` ${FCe}`,u.x=e.x,u.y=i,u.width=e.width,u.height=e.height,u.class=h,u.rx=3,u.ry=3,u.name=e.name;let f=$V(l,u);if(e.rectData=u,e.properties?.icon){let p=e.properties.icon.trim();p.charAt(0)==="@"?fye(l,u.x+u.width-20,u.y+10,p.substr(1)):hye(l,u.x+u.width-20,u.y+10,p)}GV(r,za(e.description))(e.description,l,u.x,u.y,u.width,u.height,{class:`actor ${Z5t}`},r);let d=e.height;if(f.node){let p=f.node().getBBox();e.height=p.height,d=p.height}return d},"drawActorTypeParticipant"),t6t=b(function(t,e,r,n){let i=n?e.stopy:e.starty,a=e.x+e.width/2,s=i+80,o=t.append("g").lower();n||(eh++,o.append("line").attr("id","actor"+eh).attr("x1",a).attr("y1",s).attr("x2",a).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",e.name),e.actorCnt=eh);let l=t.append("g"),u=PCe;n?u+=` ${zCe}`:u+=` ${FCe}`,l.attr("class",u),l.attr("name",e.name);let h=x0();h.x=e.x,h.y=i,h.fill="#eaeaea",h.width=e.width,h.height=e.height,h.class="actor",h.rx=3,h.ry=3,l.append("line").attr("id","actor-man-torso"+eh).attr("x1",a).attr("y1",i+25).attr("x2",a).attr("y2",i+45),l.append("line").attr("id","actor-man-arms"+eh).attr("x1",a-tg/2).attr("y1",i+33).attr("x2",a+tg/2).attr("y2",i+33),l.append("line").attr("x1",a-tg/2).attr("y1",i+60).attr("x2",a).attr("y2",i+45),l.append("line").attr("x1",a).attr("y1",i+45).attr("x2",a+tg/2-2).attr("y2",i+60);let f=l.append("circle");f.attr("cx",e.x+e.width/2),f.attr("cy",i+10),f.attr("r",15),f.attr("width",e.width),f.attr("height",e.height);let d=l.node().getBBox();return e.height=d.height,GV(r,za(e.description))(e.description,l,h.x,h.y+35,h.width,h.height,{class:`actor ${PCe}`},r),e.height},"drawActorTypeActor"),r6t=b(async function(t,e,r,n){switch(e.type){case"actor":return await t6t(t,e,r,n);case"participant":return await e6t(t,e,r,n)}},"drawActor"),n6t=b(function(t,e,r){let i=t.append("g");qCe(i,e),e.name&&GV(r)(e.name,i,e.x,e.y+(e.textMaxHeight||0)/2,e.width,0,{class:"text"},r),i.lower()},"drawBox"),i6t=b(function(t){return t.append("g")},"anchorElement"),a6t=b(function(t,e,r,n,i){let a=x0(),s=e.anchored;a.x=e.startx,a.y=e.starty,a.class="activation"+i%3,a.width=e.stopx-e.startx,a.height=r-e.starty,$V(s,a)},"drawActivation"),s6t=b(async function(t,e,r,n){let{boxMargin:i,boxTextMargin:a,labelBoxHeight:s,labelBoxWidth:o,messageFontFamily:l,messageFontSize:u,messageFontWeight:h}=n,f=t.append("g"),d=b(function(g,y,v,x){return f.append("line").attr("x1",g).attr("y1",y).attr("x2",v).attr("y2",x).attr("class","loopLine")},"drawLoopLine");d(e.startx,e.starty,e.stopx,e.starty),d(e.stopx,e.starty,e.stopx,e.stopy),d(e.startx,e.stopy,e.stopx,e.stopy),d(e.startx,e.starty,e.startx,e.stopy),e.sections!==void 0&&e.sections.forEach(function(g){d(e.startx,g.y,e.stopx,g.y).style("stroke-dasharray","3, 3")});let p=VS();p.text=r,p.x=e.startx,p.y=e.starty,p.fontFamily=l,p.fontSize=u,p.fontWeight=h,p.anchor="middle",p.valign="middle",p.tspan=!1,p.width=o||50,p.height=s||20,p.textMargin=a,p.class="labelText",$Ce(f,p),p=UCe(),p.text=e.title,p.x=e.startx+o/2+(e.stopx-e.startx)/2,p.y=e.starty+i+a,p.anchor="middle",p.valign="middle",p.textMargin=a,p.class="loopText",p.fontFamily=l,p.fontSize=u,p.fontWeight=h,p.wrap=!0;let m=za(p.text)?await $L(f,p,e):F4(f,p);if(e.sectionTitles!==void 0){for(let[g,y]of Object.entries(e.sectionTitles))if(y.message){p.text=y.message,p.x=e.startx+(e.stopx-e.startx)/2,p.y=e.sections[g].y+i+a,p.class="loopText",p.anchor="middle",p.valign="middle",p.tspan=!1,p.fontFamily=l,p.fontSize=u,p.fontWeight=h,p.wrap=e.wrap,za(p.text)?(e.starty=e.sections[g].y,await $L(f,p,e)):F4(f,p);let v=Math.round(m.map(x=>(x._groups||x)[0][0].getBBox().height).reduce((x,k)=>x+k));e.sections[g].height+=v-(i+a)}}return e.height=Math.round(e.stopy-e.starty),f},"drawLoop"),qCe=b(function(t,e){HS(t,e)},"drawBackgroundRect"),o6t=b(function(t){t.append("defs").append("symbol").attr("id","database").attr("fill-rule","evenodd").attr("clip-rule","evenodd").append("path").attr("transform","scale(.5)").attr("d","M12.258.001l.256.004.255.005.253.008.251.01.249.012.247.015.246.016.242.019.241.02.239.023.236.024.233.027.231.028.229.031.225.032.223.034.22.036.217.038.214.04.211.041.208.043.205.045.201.046.198.048.194.05.191.051.187.053.183.054.18.056.175.057.172.059.168.06.163.061.16.063.155.064.15.066.074.033.073.033.071.034.07.034.069.035.068.035.067.035.066.035.064.036.064.036.062.036.06.036.06.037.058.037.058.037.055.038.055.038.053.038.052.038.051.039.05.039.048.039.047.039.045.04.044.04.043.04.041.04.04.041.039.041.037.041.036.041.034.041.033.042.032.042.03.042.029.042.027.042.026.043.024.043.023.043.021.043.02.043.018.044.017.043.015.044.013.044.012.044.011.045.009.044.007.045.006.045.004.045.002.045.001.045v17l-.001.045-.002.045-.004.045-.006.045-.007.045-.009.044-.011.045-.012.044-.013.044-.015.044-.017.043-.018.044-.02.043-.021.043-.023.043-.024.043-.026.043-.027.042-.029.042-.03.042-.032.042-.033.042-.034.041-.036.041-.037.041-.039.041-.04.041-.041.04-.043.04-.044.04-.045.04-.047.039-.048.039-.05.039-.051.039-.052.038-.053.038-.055.038-.055.038-.058.037-.058.037-.06.037-.06.036-.062.036-.064.036-.064.036-.066.035-.067.035-.068.035-.069.035-.07.034-.071.034-.073.033-.074.033-.15.066-.155.064-.16.063-.163.061-.168.06-.172.059-.175.057-.18.056-.183.054-.187.053-.191.051-.194.05-.198.048-.201.046-.205.045-.208.043-.211.041-.214.04-.217.038-.22.036-.223.034-.225.032-.229.031-.231.028-.233.027-.236.024-.239.023-.241.02-.242.019-.246.016-.247.015-.249.012-.251.01-.253.008-.255.005-.256.004-.258.001-.258-.001-.256-.004-.255-.005-.253-.008-.251-.01-.249-.012-.247-.015-.245-.016-.243-.019-.241-.02-.238-.023-.236-.024-.234-.027-.231-.028-.228-.031-.226-.032-.223-.034-.22-.036-.217-.038-.214-.04-.211-.041-.208-.043-.204-.045-.201-.046-.198-.048-.195-.05-.19-.051-.187-.053-.184-.054-.179-.056-.176-.057-.172-.059-.167-.06-.164-.061-.159-.063-.155-.064-.151-.066-.074-.033-.072-.033-.072-.034-.07-.034-.069-.035-.068-.035-.067-.035-.066-.035-.064-.036-.063-.036-.062-.036-.061-.036-.06-.037-.058-.037-.057-.037-.056-.038-.055-.038-.053-.038-.052-.038-.051-.039-.049-.039-.049-.039-.046-.039-.046-.04-.044-.04-.043-.04-.041-.04-.04-.041-.039-.041-.037-.041-.036-.041-.034-.041-.033-.042-.032-.042-.03-.042-.029-.042-.027-.042-.026-.043-.024-.043-.023-.043-.021-.043-.02-.043-.018-.044-.017-.043-.015-.044-.013-.044-.012-.044-.011-.045-.009-.044-.007-.045-.006-.045-.004-.045-.002-.045-.001-.045v-17l.001-.045.002-.045.004-.045.006-.045.007-.045.009-.044.011-.045.012-.044.013-.044.015-.044.017-.043.018-.044.02-.043.021-.043.023-.043.024-.043.026-.043.027-.042.029-.042.03-.042.032-.042.033-.042.034-.041.036-.041.037-.041.039-.041.04-.041.041-.04.043-.04.044-.04.046-.04.046-.039.049-.039.049-.039.051-.039.052-.038.053-.038.055-.038.056-.038.057-.037.058-.037.06-.037.061-.036.062-.036.063-.036.064-.036.066-.035.067-.035.068-.035.069-.035.07-.034.072-.034.072-.033.074-.033.151-.066.155-.064.159-.063.164-.061.167-.06.172-.059.176-.057.179-.056.184-.054.187-.053.19-.051.195-.05.198-.048.201-.046.204-.045.208-.043.211-.041.214-.04.217-.038.22-.036.223-.034.226-.032.228-.031.231-.028.234-.027.236-.024.238-.023.241-.02.243-.019.245-.016.247-.015.249-.012.251-.01.253-.008.255-.005.256-.004.258-.001.258.001zm-9.258 20.499v.01l.001.021.003.021.004.022.005.021.006.022.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.023.018.024.019.024.021.024.022.025.023.024.024.025.052.049.056.05.061.051.066.051.07.051.075.051.079.052.084.052.088.052.092.052.097.052.102.051.105.052.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.048.144.049.147.047.152.047.155.047.16.045.163.045.167.043.171.043.176.041.178.041.183.039.187.039.19.037.194.035.197.035.202.033.204.031.209.03.212.029.216.027.219.025.222.024.226.021.23.02.233.018.236.016.24.015.243.012.246.01.249.008.253.005.256.004.259.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.021.224-.024.22-.026.216-.027.212-.028.21-.031.205-.031.202-.034.198-.034.194-.036.191-.037.187-.039.183-.04.179-.04.175-.042.172-.043.168-.044.163-.045.16-.046.155-.046.152-.047.148-.048.143-.049.139-.049.136-.05.131-.05.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.053.083-.051.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.05.023-.024.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.023.01-.022.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.127l-.077.055-.08.053-.083.054-.085.053-.087.052-.09.052-.093.051-.095.05-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.045-.118.044-.12.043-.122.042-.124.042-.126.041-.128.04-.13.04-.132.038-.134.038-.135.037-.138.037-.139.035-.142.035-.143.034-.144.033-.147.032-.148.031-.15.03-.151.03-.153.029-.154.027-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.01-.179.008-.179.008-.181.006-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.006-.179-.008-.179-.008-.178-.01-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.027-.153-.029-.151-.03-.15-.03-.148-.031-.146-.032-.145-.033-.143-.034-.141-.035-.14-.035-.137-.037-.136-.037-.134-.038-.132-.038-.13-.04-.128-.04-.126-.041-.124-.042-.122-.042-.12-.044-.117-.043-.116-.045-.113-.045-.112-.046-.109-.047-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.05-.093-.052-.09-.051-.087-.052-.085-.053-.083-.054-.08-.054-.077-.054v4.127zm0-5.654v.011l.001.021.003.021.004.021.005.022.006.022.007.022.009.022.01.022.011.023.012.023.013.023.015.024.016.023.017.024.018.024.019.024.021.024.022.024.023.025.024.024.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.052.11.051.114.051.119.052.123.05.127.051.131.05.135.049.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.044.171.042.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.022.23.02.233.018.236.016.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.012.241-.015.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.048.139-.05.136-.049.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.051.051-.049.023-.025.023-.024.021-.025.02-.024.019-.024.018-.024.017-.024.015-.023.014-.023.013-.024.012-.022.01-.023.01-.023.008-.022.006-.022.006-.022.004-.021.004-.022.001-.021.001-.021v-4.139l-.077.054-.08.054-.083.054-.085.052-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.044-.118.044-.12.044-.122.042-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.035-.143.033-.144.033-.147.033-.148.031-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.009-.179.009-.179.007-.181.007-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.007-.179-.007-.179-.009-.178-.009-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.031-.146-.033-.145-.033-.143-.033-.141-.035-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.04-.126-.041-.124-.042-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.051-.093-.051-.09-.051-.087-.053-.085-.052-.083-.054-.08-.054-.077-.054v4.139zm0-5.666v.011l.001.02.003.022.004.021.005.022.006.021.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.024.018.023.019.024.021.025.022.024.023.024.024.025.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.051.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.043.171.043.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.021.23.02.233.018.236.017.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.013.241-.014.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.049.139-.049.136-.049.131-.051.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.049.023-.025.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.022.01-.023.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.153l-.077.054-.08.054-.083.053-.085.053-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.048-.105.048-.106.048-.109.046-.111.046-.114.046-.115.044-.118.044-.12.043-.122.043-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.034-.143.034-.144.033-.147.032-.148.032-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.024-.161.024-.162.023-.163.023-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.01-.178.01-.179.009-.179.007-.181.006-.182.006-.182.004-.184.003-.184.001-.185.001-.185-.001-.184-.001-.184-.003-.182-.004-.182-.006-.181-.006-.179-.007-.179-.009-.178-.01-.176-.01-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.023-.162-.023-.161-.024-.159-.024-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.032-.146-.032-.145-.033-.143-.034-.141-.034-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.041-.126-.041-.124-.041-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.048-.105-.048-.102-.048-.1-.05-.097-.049-.095-.051-.093-.051-.09-.052-.087-.052-.085-.053-.083-.053-.08-.054-.077-.054v4.153zm8.74-8.179l-.257.004-.254.005-.25.008-.247.011-.244.012-.241.014-.237.016-.233.018-.231.021-.226.022-.224.023-.22.026-.216.027-.212.028-.21.031-.205.032-.202.033-.198.034-.194.036-.191.038-.187.038-.183.04-.179.041-.175.042-.172.043-.168.043-.163.045-.16.046-.155.046-.152.048-.148.048-.143.048-.139.049-.136.05-.131.05-.126.051-.123.051-.118.051-.114.052-.11.052-.106.052-.101.052-.096.052-.092.052-.088.052-.083.052-.079.052-.074.051-.07.052-.065.051-.06.05-.056.05-.051.05-.023.025-.023.024-.021.024-.02.025-.019.024-.018.024-.017.023-.015.024-.014.023-.013.023-.012.023-.01.023-.01.022-.008.022-.006.023-.006.021-.004.022-.004.021-.001.021-.001.021.001.021.001.021.004.021.004.022.006.021.006.023.008.022.01.022.01.023.012.023.013.023.014.023.015.024.017.023.018.024.019.024.02.025.021.024.023.024.023.025.051.05.056.05.06.05.065.051.07.052.074.051.079.052.083.052.088.052.092.052.096.052.101.052.106.052.11.052.114.052.118.051.123.051.126.051.131.05.136.05.139.049.143.048.148.048.152.048.155.046.16.046.163.045.168.043.172.043.175.042.179.041.183.04.187.038.191.038.194.036.198.034.202.033.205.032.21.031.212.028.216.027.22.026.224.023.226.022.231.021.233.018.237.016.241.014.244.012.247.011.25.008.254.005.257.004.26.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.022.224-.023.22-.026.216-.027.212-.028.21-.031.205-.032.202-.033.198-.034.194-.036.191-.038.187-.038.183-.04.179-.041.175-.042.172-.043.168-.043.163-.045.16-.046.155-.046.152-.048.148-.048.143-.048.139-.049.136-.05.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.05.051-.05.023-.025.023-.024.021-.024.02-.025.019-.024.018-.024.017-.023.015-.024.014-.023.013-.023.012-.023.01-.023.01-.022.008-.022.006-.023.006-.021.004-.022.004-.021.001-.021.001-.021-.001-.021-.001-.021-.004-.021-.004-.022-.006-.021-.006-.023-.008-.022-.01-.022-.01-.023-.012-.023-.013-.023-.014-.023-.015-.024-.017-.023-.018-.024-.019-.024-.02-.025-.021-.024-.023-.024-.023-.025-.051-.05-.056-.05-.06-.05-.065-.051-.07-.052-.074-.051-.079-.052-.083-.052-.088-.052-.092-.052-.096-.052-.101-.052-.106-.052-.11-.052-.114-.052-.118-.051-.123-.051-.126-.051-.131-.05-.136-.05-.139-.049-.143-.048-.148-.048-.152-.048-.155-.046-.16-.046-.163-.045-.168-.043-.172-.043-.175-.042-.179-.041-.183-.04-.187-.038-.191-.038-.194-.036-.198-.034-.202-.033-.205-.032-.21-.031-.212-.028-.216-.027-.22-.026-.224-.023-.226-.022-.231-.021-.233-.018-.237-.016-.241-.014-.244-.012-.247-.011-.25-.008-.254-.005-.257-.004-.26-.001-.26.001z")},"insertDatabaseIcon"),l6t=b(function(t){t.append("defs").append("symbol").attr("id","computer").attr("width","24").attr("height","24").append("path").attr("transform","scale(.5)").attr("d","M2 2v13h20v-13h-20zm18 11h-16v-9h16v9zm-10.228 6l.466-1h3.524l.467 1h-4.457zm14.228 3h-24l2-6h2.104l-1.33 4h18.45l-1.297-4h2.073l2 6zm-5-10h-14v-7h14v7z")},"insertComputerIcon"),u6t=b(function(t){t.append("defs").append("symbol").attr("id","clock").attr("width","24").attr("height","24").append("path").attr("transform","scale(.5)").attr("d","M12 2c5.514 0 10 4.486 10 10s-4.486 10-10 10-10-4.486-10-10 4.486-10 10-10zm0-2c-6.627 0-12 5.373-12 12s5.373 12 12 12 12-5.373 12-12-5.373-12-12-12zm5.848 12.459c.202.038.202.333.001.372-1.907.361-6.045 1.111-6.547 1.111-.719 0-1.301-.582-1.301-1.301 0-.512.77-5.447 1.125-7.445.034-.192.312-.181.343.014l.985 6.238 5.394 1.011z")},"insertClockIcon"),c6t=b(function(t){t.append("defs").append("marker").attr("id","arrowhead").attr("refX",7.9).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto-start-reverse").append("path").attr("d","M -1 0 L 10 5 L 0 10 z")},"insertArrowHead"),h6t=b(function(t){t.append("defs").append("marker").attr("id","filled-head").attr("refX",15.5).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},"insertArrowFilledHead"),f6t=b(function(t){t.append("defs").append("marker").attr("id","sequencenumber").attr("refX",15).attr("refY",15).attr("markerWidth",60).attr("markerHeight",40).attr("orient","auto").append("circle").attr("cx",15).attr("cy",15).attr("r",6)},"insertSequenceNumber"),d6t=b(function(t){t.append("defs").append("marker").attr("id","crosshead").attr("markerWidth",15).attr("markerHeight",8).attr("orient","auto").attr("refX",4).attr("refY",4.5).append("path").attr("fill","none").attr("stroke","#000000").style("stroke-dasharray","0, 0").attr("stroke-width","1pt").attr("d","M 1,2 L 6,7 M 6,2 L 1,7")},"insertArrowCrossHead"),UCe=b(function(){return{x:0,y:0,fill:void 0,anchor:void 0,style:"#666",width:void 0,height:void 0,textMargin:0,rx:0,ry:0,tspan:!0,valign:void 0}},"getTextObj"),p6t=b(function(){return{x:0,y:0,fill:"#EDF2AE",stroke:"#666",width:100,anchor:"start",height:100,rx:0,ry:0}},"getNoteRect"),GV=(function(){function t(a,s,o,l,u,h,f){let d=s.append("text").attr("x",o+u/2).attr("y",l+h/2+5).style("text-anchor","middle").text(a);i(d,f)}b(t,"byText");function e(a,s,o,l,u,h,f,d){let{actorFontSize:p,actorFontFamily:m,actorFontWeight:g}=d,[y,v]=cu(p),x=a.split(St.lineBreakRegex);for(let k=0;kt.height||0))+(this.loops.length===0?0:this.loops.map(t=>t.height||0).reduce((t,e)=>t+e))+(this.messages.length===0?0:this.messages.map(t=>t.height||0).reduce((t,e)=>t+e))+(this.notes.length===0?0:this.notes.map(t=>t.height||0).reduce((t,e)=>t+e))},"getHeight"),clear:b(function(){this.actors=[],this.boxes=[],this.loops=[],this.messages=[],this.notes=[]},"clear"),addBox:b(function(t){this.boxes.push(t)},"addBox"),addActor:b(function(t){this.actors.push(t)},"addActor"),addLoop:b(function(t){this.loops.push(t)},"addLoop"),addMessage:b(function(t){this.messages.push(t)},"addMessage"),addNote:b(function(t){this.notes.push(t)},"addNote"),lastActor:b(function(){return this.actors[this.actors.length-1]},"lastActor"),lastLoop:b(function(){return this.loops[this.loops.length-1]},"lastLoop"),lastMessage:b(function(){return this.messages[this.messages.length-1]},"lastMessage"),lastNote:b(function(){return this.notes[this.notes.length-1]},"lastNote"),actors:[],boxes:[],loops:[],messages:[],notes:[]},init:b(function(){this.sequenceItems=[],this.activations=[],this.models.clear(),this.data={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},this.verticalPos=0,WCe(Fe())},"init"),updateVal:b(function(t,e,r,n){t[e]===void 0?t[e]=r:t[e]=n(r,t[e])},"updateVal"),updateBounds:b(function(t,e,r,n){let i=this,a=0;function s(o){return b(function(u){a++;let h=i.sequenceItems.length-a+1;i.updateVal(u,"starty",e-h*Qe.boxMargin,Math.min),i.updateVal(u,"stopy",n+h*Qe.boxMargin,Math.max),i.updateVal(Rt.data,"startx",t-h*Qe.boxMargin,Math.min),i.updateVal(Rt.data,"stopx",r+h*Qe.boxMargin,Math.max),o!=="activation"&&(i.updateVal(u,"startx",t-h*Qe.boxMargin,Math.min),i.updateVal(u,"stopx",r+h*Qe.boxMargin,Math.max),i.updateVal(Rt.data,"starty",e-h*Qe.boxMargin,Math.min),i.updateVal(Rt.data,"stopy",n+h*Qe.boxMargin,Math.max))},"updateItemBounds")}b(s,"updateFn"),this.sequenceItems.forEach(s()),this.activations.forEach(s("activation"))},"updateBounds"),insert:b(function(t,e,r,n){let i=St.getMin(t,r),a=St.getMax(t,r),s=St.getMin(e,n),o=St.getMax(e,n);this.updateVal(Rt.data,"startx",i,Math.min),this.updateVal(Rt.data,"starty",s,Math.min),this.updateVal(Rt.data,"stopx",a,Math.max),this.updateVal(Rt.data,"stopy",o,Math.max),this.updateBounds(i,s,a,o)},"insert"),newActivation:b(function(t,e,r){let n=r.get(t.from),i=GL(t.from).length||0,a=n.x+n.width/2+(i-1)*Qe.activationWidth/2;this.activations.push({startx:a,starty:this.verticalPos+2,stopx:a+Qe.activationWidth,stopy:void 0,actor:t.from,anchored:ha.anchorElement(e)})},"newActivation"),endActivation:b(function(t){let e=this.activations.map(function(r){return r.actor}).lastIndexOf(t.from);return this.activations.splice(e,1)[0]},"endActivation"),createLoop:b(function(t={message:void 0,wrap:!1,width:void 0},e){return{startx:void 0,starty:this.verticalPos,stopx:void 0,stopy:void 0,title:t.message,wrap:t.wrap,width:t.width,height:0,fill:e}},"createLoop"),newLoop:b(function(t={message:void 0,wrap:!1,width:void 0},e){this.sequenceItems.push(this.createLoop(t,e))},"newLoop"),endLoop:b(function(){return this.sequenceItems.pop()},"endLoop"),isLoopOverlap:b(function(){return this.sequenceItems.length?this.sequenceItems[this.sequenceItems.length-1].overlap:!1},"isLoopOverlap"),addSectionToLoop:b(function(t){let e=this.sequenceItems.pop();e.sections=e.sections||[],e.sectionTitles=e.sectionTitles||[],e.sections.push({y:Rt.getVerticalPos(),height:0}),e.sectionTitles.push(t),this.sequenceItems.push(e)},"addSectionToLoop"),saveVerticalPos:b(function(){this.isLoopOverlap()&&(this.savedVerticalPos=this.verticalPos)},"saveVerticalPos"),resetVerticalPos:b(function(){this.isLoopOverlap()&&(this.verticalPos=this.savedVerticalPos)},"resetVerticalPos"),bumpVerticalPos:b(function(t){this.verticalPos=this.verticalPos+t,this.data.stopy=St.getMax(this.data.stopy,this.verticalPos)},"bumpVerticalPos"),getVerticalPos:b(function(){return this.verticalPos},"getVerticalPos"),getBounds:b(function(){return{bounds:this.data,models:this.models}},"getBounds")},g6t=b(async function(t,e){Rt.bumpVerticalPos(Qe.boxMargin),e.height=Qe.boxMargin,e.starty=Rt.getVerticalPos();let r=x0();r.x=e.startx,r.y=e.starty,r.width=e.width||Qe.width,r.class="note";let n=t.append("g"),i=ha.drawRect(n,r),a=VS();a.x=e.startx,a.y=e.starty,a.width=r.width,a.dy="1em",a.text=e.message,a.class="noteText",a.fontFamily=Qe.noteFontFamily,a.fontSize=Qe.noteFontSize,a.fontWeight=Qe.noteFontWeight,a.anchor=Qe.noteAlign,a.textMargin=Qe.noteMargin,a.valign="center";let s=za(a.text)?await $L(n,a):F4(n,a),o=Math.round(s.map(l=>(l._groups||l)[0][0].getBBox().height).reduce((l,u)=>l+u));i.attr("height",o+2*Qe.noteMargin),e.height+=o+2*Qe.noteMargin,Rt.bumpVerticalPos(o+2*Qe.noteMargin),e.stopy=e.starty+o+2*Qe.noteMargin,e.stopx=e.startx+r.width,Rt.insert(e.startx,e.starty,e.stopx,e.stopy),Rt.models.addNote(e)},"drawNote"),rg=b(t=>({fontFamily:t.messageFontFamily,fontSize:t.messageFontSize,fontWeight:t.messageFontWeight}),"messageFont"),P4=b(t=>({fontFamily:t.noteFontFamily,fontSize:t.noteFontSize,fontWeight:t.noteFontWeight}),"noteFont"),BV=b(t=>({fontFamily:t.actorFontFamily,fontSize:t.actorFontSize,fontWeight:t.actorFontWeight}),"actorFont");b(HCe,"boundMessage");y6t=b(async function(t,e,r,n){let{startx:i,stopx:a,starty:s,message:o,type:l,sequenceIndex:u,sequenceVisible:h}=e,f=gr.calculateTextDimensions(o,rg(Qe)),d=VS();d.x=i,d.y=s+10,d.width=a-i,d.class="messageText",d.dy="1em",d.text=o,d.fontFamily=Qe.messageFontFamily,d.fontSize=Qe.messageFontSize,d.fontWeight=Qe.messageFontWeight,d.anchor=Qe.messageAlign,d.valign="center",d.textMargin=Qe.wrapPadding,d.tspan=!1,za(d.text)?await $L(t,d,{startx:i,stopx:a,starty:r}):F4(t,d);let p=f.width,m;i===a?Qe.rightAngles?m=t.append("path").attr("d",`M ${i},${r} H ${i+St.getMax(Qe.width/2,p/2)} V ${r+25} H ${i}`):m=t.append("path").attr("d","M "+i+","+r+" C "+(i+60)+","+(r-10)+" "+(i+60)+","+(r+30)+" "+i+","+(r+20)):(m=t.append("line"),m.attr("x1",i),m.attr("y1",r),m.attr("x2",a),m.attr("y2",r)),l===n.db.LINETYPE.DOTTED||l===n.db.LINETYPE.DOTTED_CROSS||l===n.db.LINETYPE.DOTTED_POINT||l===n.db.LINETYPE.DOTTED_OPEN||l===n.db.LINETYPE.BIDIRECTIONAL_DOTTED?(m.style("stroke-dasharray","3, 3"),m.attr("class","messageLine1")):m.attr("class","messageLine0");let g="";Qe.arrowMarkerAbsolute&&(g=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,g=g.replace(/\(/g,"\\("),g=g.replace(/\)/g,"\\)")),m.attr("stroke-width",2),m.attr("stroke","none"),m.style("fill","none"),(l===n.db.LINETYPE.SOLID||l===n.db.LINETYPE.DOTTED)&&m.attr("marker-end","url("+g+"#arrowhead)"),(l===n.db.LINETYPE.BIDIRECTIONAL_SOLID||l===n.db.LINETYPE.BIDIRECTIONAL_DOTTED)&&(m.attr("marker-start","url("+g+"#arrowhead)"),m.attr("marker-end","url("+g+"#arrowhead)")),(l===n.db.LINETYPE.SOLID_POINT||l===n.db.LINETYPE.DOTTED_POINT)&&m.attr("marker-end","url("+g+"#filled-head)"),(l===n.db.LINETYPE.SOLID_CROSS||l===n.db.LINETYPE.DOTTED_CROSS)&&m.attr("marker-end","url("+g+"#crosshead)"),(h||Qe.showSequenceNumbers)&&(m.attr("marker-start","url("+g+"#sequencenumber)"),t.append("text").attr("x",i).attr("y",r+4).attr("font-family","sans-serif").attr("font-size","12px").attr("text-anchor","middle").attr("class","sequenceNumber").text(u))},"drawMessage"),v6t=b(function(t,e,r,n,i,a,s){let o=0,l=0,u,h=0;for(let f of n){let d=e.get(f),p=d.box;u&&u!=p&&(s||Rt.models.addBox(u),l+=Qe.boxMargin+u.margin),p&&p!=u&&(s||(p.x=o+l,p.y=i),l+=p.margin),d.width=d.width||Qe.width,d.height=St.getMax(d.height||Qe.height,Qe.height),d.margin=d.margin||Qe.actorMargin,h=St.getMax(h,d.height),r.get(d.name)&&(l+=d.width/2),d.x=o+l,d.starty=Rt.getVerticalPos(),Rt.insert(d.x,i,d.x+d.width,d.height),o+=d.width+l,d.box&&(d.box.width=o+p.margin-d.box.x),l=d.margin,u=d.box,Rt.models.addActor(d)}u&&!s&&Rt.models.addBox(u),Rt.bumpVerticalPos(h)},"addActorRenderingData"),FV=b(async function(t,e,r,n){if(n){let i=0;Rt.bumpVerticalPos(Qe.boxMargin*2);for(let a of r){let s=e.get(a);s.stopy||(s.stopy=Rt.getVerticalPos());let o=await ha.drawActor(t,s,Qe,!0);i=St.getMax(i,o)}Rt.bumpVerticalPos(i+Qe.boxMargin)}else for(let i of r){let a=e.get(i);await ha.drawActor(t,a,Qe,!1)}},"drawActors"),VCe=b(function(t,e,r,n){let i=0,a=0;for(let s of r){let o=e.get(s),l=b6t(o),u=ha.drawPopup(t,o,l,Qe,Qe.forceMenus,n);u.height>i&&(i=u.height),u.width+o.x>a&&(a=u.width+o.x)}return{maxHeight:i,maxWidth:a}},"drawActorsPopup"),WCe=b(function(t){Gi(Qe,t),t.fontFamily&&(Qe.actorFontFamily=Qe.noteFontFamily=Qe.messageFontFamily=t.fontFamily),t.fontSize&&(Qe.actorFontSize=Qe.noteFontSize=Qe.messageFontSize=t.fontSize),t.fontWeight&&(Qe.actorFontWeight=Qe.noteFontWeight=Qe.messageFontWeight=t.fontWeight)},"setConf"),GL=b(function(t){return Rt.activations.filter(function(e){return e.actor===t})},"actorActivations"),BCe=b(function(t,e){let r=e.get(t),n=GL(t),i=n.reduce(function(s,o){return St.getMin(s,o.startx)},r.x+r.width/2-1),a=n.reduce(function(s,o){return St.getMax(s,o.stopx)},r.x+r.width/2+1);return[i,a]},"activationBounds");b(Ec,"adjustLoopHeightForWrap");b(YCe,"adjustCreatedDestroyedData");x6t=b(async function(t,e,r,n){let{securityLevel:i,sequence:a}=Fe();Qe=a;let s;i==="sandbox"&&(s=dt("#i"+e));let o=i==="sandbox"?dt(s.nodes()[0].contentDocument.body):dt("body"),l=i==="sandbox"?s.nodes()[0].contentDocument:document;Rt.init(),he.debug(n.db);let u=i==="sandbox"?o.select(`[id="${e}"]`):dt(`[id="${e}"]`),h=n.db.getActors(),f=n.db.getCreatedActors(),d=n.db.getDestroyedActors(),p=n.db.getBoxes(),m=n.db.getActorKeys(),g=n.db.getMessages(),y=n.db.getDiagramTitle(),v=n.db.hasAtLeastOneBox(),x=n.db.hasAtLeastOneBoxWithTitle(),k=await XCe(h,g,n);if(Qe.height=await jCe(h,k,p),ha.insertComputerIcon(u),ha.insertDatabaseIcon(u),ha.insertClockIcon(u),v&&(Rt.bumpVerticalPos(Qe.boxMargin),x&&Rt.bumpVerticalPos(p[0].textMaxHeight)),Qe.hideUnusedParticipants===!0){let z=new Set;g.forEach(q=>{z.add(q.from),z.add(q.to)}),m=m.filter(q=>z.has(q))}v6t(u,h,f,m,0,g,!1);let _=await T6t(g,h,k,n);ha.insertArrowHead(u),ha.insertArrowCrossHead(u),ha.insertArrowFilledHead(u),ha.insertSequenceNumber(u);function T(z,q){let V=Rt.endActivation(z);V.starty+18>q&&(V.starty=q-6,q+=12),ha.drawActivation(u,V,q,Qe,GL(z.from).length),Rt.insert(V.startx,q-10,V.stopx,q)}b(T,"activeEnd");let S=1,R=1,A=[],I=[],P=0;for(let z of g){let q,V,U;switch(z.type){case n.db.LINETYPE.NOTE:Rt.resetVerticalPos(),V=z.noteModel,await g6t(u,V);break;case n.db.LINETYPE.ACTIVE_START:Rt.newActivation(z,u,h);break;case n.db.LINETYPE.ACTIVE_END:T(z,Rt.getVerticalPos());break;case n.db.LINETYPE.LOOP_START:Ec(_,z,Qe.boxMargin,Qe.boxMargin+Qe.boxTextMargin,J=>Rt.newLoop(J));break;case n.db.LINETYPE.LOOP_END:q=Rt.endLoop(),await ha.drawLoop(u,q,"loop",Qe),Rt.bumpVerticalPos(q.stopy-Rt.getVerticalPos()),Rt.models.addLoop(q);break;case n.db.LINETYPE.RECT_START:Ec(_,z,Qe.boxMargin,Qe.boxMargin,J=>Rt.newLoop(void 0,J.message));break;case n.db.LINETYPE.RECT_END:q=Rt.endLoop(),I.push(q),Rt.models.addLoop(q),Rt.bumpVerticalPos(q.stopy-Rt.getVerticalPos());break;case n.db.LINETYPE.OPT_START:Ec(_,z,Qe.boxMargin,Qe.boxMargin+Qe.boxTextMargin,J=>Rt.newLoop(J));break;case n.db.LINETYPE.OPT_END:q=Rt.endLoop(),await ha.drawLoop(u,q,"opt",Qe),Rt.bumpVerticalPos(q.stopy-Rt.getVerticalPos()),Rt.models.addLoop(q);break;case n.db.LINETYPE.ALT_START:Ec(_,z,Qe.boxMargin,Qe.boxMargin+Qe.boxTextMargin,J=>Rt.newLoop(J));break;case n.db.LINETYPE.ALT_ELSE:Ec(_,z,Qe.boxMargin+Qe.boxTextMargin,Qe.boxMargin,J=>Rt.addSectionToLoop(J));break;case n.db.LINETYPE.ALT_END:q=Rt.endLoop(),await ha.drawLoop(u,q,"alt",Qe),Rt.bumpVerticalPos(q.stopy-Rt.getVerticalPos()),Rt.models.addLoop(q);break;case n.db.LINETYPE.PAR_START:case n.db.LINETYPE.PAR_OVER_START:Ec(_,z,Qe.boxMargin,Qe.boxMargin+Qe.boxTextMargin,J=>Rt.newLoop(J)),Rt.saveVerticalPos();break;case n.db.LINETYPE.PAR_AND:Ec(_,z,Qe.boxMargin+Qe.boxTextMargin,Qe.boxMargin,J=>Rt.addSectionToLoop(J));break;case n.db.LINETYPE.PAR_END:q=Rt.endLoop(),await ha.drawLoop(u,q,"par",Qe),Rt.bumpVerticalPos(q.stopy-Rt.getVerticalPos()),Rt.models.addLoop(q);break;case n.db.LINETYPE.AUTONUMBER:S=z.message.start||S,R=z.message.step||R,z.message.visible?n.db.enableSequenceNumbers():n.db.disableSequenceNumbers();break;case n.db.LINETYPE.CRITICAL_START:Ec(_,z,Qe.boxMargin,Qe.boxMargin+Qe.boxTextMargin,J=>Rt.newLoop(J));break;case n.db.LINETYPE.CRITICAL_OPTION:Ec(_,z,Qe.boxMargin+Qe.boxTextMargin,Qe.boxMargin,J=>Rt.addSectionToLoop(J));break;case n.db.LINETYPE.CRITICAL_END:q=Rt.endLoop(),await ha.drawLoop(u,q,"critical",Qe),Rt.bumpVerticalPos(q.stopy-Rt.getVerticalPos()),Rt.models.addLoop(q);break;case n.db.LINETYPE.BREAK_START:Ec(_,z,Qe.boxMargin,Qe.boxMargin+Qe.boxTextMargin,J=>Rt.newLoop(J));break;case n.db.LINETYPE.BREAK_END:q=Rt.endLoop(),await ha.drawLoop(u,q,"break",Qe),Rt.bumpVerticalPos(q.stopy-Rt.getVerticalPos()),Rt.models.addLoop(q);break;default:try{U=z.msgModel,U.starty=Rt.getVerticalPos(),U.sequenceIndex=S,U.sequenceVisible=n.db.showSequenceNumbers();let J=await HCe(u,U);YCe(z,U,J,P,h,f,d),A.push({messageModel:U,lineStartY:J}),Rt.models.addMessage(U)}catch(J){he.error("error while drawing message",J)}}[n.db.LINETYPE.SOLID_OPEN,n.db.LINETYPE.DOTTED_OPEN,n.db.LINETYPE.SOLID,n.db.LINETYPE.DOTTED,n.db.LINETYPE.SOLID_CROSS,n.db.LINETYPE.DOTTED_CROSS,n.db.LINETYPE.SOLID_POINT,n.db.LINETYPE.DOTTED_POINT,n.db.LINETYPE.BIDIRECTIONAL_SOLID,n.db.LINETYPE.BIDIRECTIONAL_DOTTED].includes(z.type)&&(S=S+R),P++}he.debug("createdActors",f),he.debug("destroyedActors",d),await FV(u,h,m,!1);for(let z of A)await y6t(u,z.messageModel,z.lineStartY,n);Qe.mirrorActors&&await FV(u,h,m,!0),I.forEach(z=>ha.drawBackgroundRect(u,z)),GCe(u,h,m,Qe);for(let z of Rt.models.boxes)z.height=Rt.getVerticalPos()-z.y,Rt.insert(z.x,z.y,z.x+z.width,z.height),z.startx=z.x,z.starty=z.y,z.stopx=z.startx+z.width,z.stopy=z.starty+z.height,z.stroke="rgb(0,0,0, 0.5)",ha.drawBox(u,z,Qe);v&&Rt.bumpVerticalPos(Qe.boxMargin);let O=VCe(u,h,m,l),{bounds:C}=Rt.getBounds();C.startx===void 0&&(C.startx=0),C.starty===void 0&&(C.starty=0),C.stopx===void 0&&(C.stopx=0),C.stopy===void 0&&(C.stopy=0);let N=C.stopy-C.starty;N2,f=b(g=>o?-g:g,"adjustValue");t.from===t.to?u=l:(t.activate&&!h&&(u+=f(Qe.activationWidth/2-1)),[r.db.LINETYPE.SOLID_OPEN,r.db.LINETYPE.DOTTED_OPEN].includes(t.type)||(u+=f(3)),[r.db.LINETYPE.BIDIRECTIONAL_SOLID,r.db.LINETYPE.BIDIRECTIONAL_DOTTED].includes(t.type)&&(l-=f(3)));let d=[n,i,a,s],p=Math.abs(l-u);t.wrap&&t.message&&(t.message=gr.wrapLabel(t.message,St.getMax(p+2*Qe.wrapPadding,Qe.width),rg(Qe)));let m=gr.calculateTextDimensions(t.message,rg(Qe));return{width:St.getMax(t.wrap?0:m.width+2*Qe.wrapPadding,p+2*Qe.wrapPadding,Qe.width),height:0,startx:l,stopx:u,starty:0,stopy:0,message:t.message,type:t.type,wrap:t.wrap,fromBounds:Math.min.apply(null,d),toBounds:Math.max.apply(null,d)}},"buildMessageModel"),T6t=b(async function(t,e,r,n){let i={},a=[],s,o,l;for(let u of t){switch(u.type){case n.db.LINETYPE.LOOP_START:case n.db.LINETYPE.ALT_START:case n.db.LINETYPE.OPT_START:case n.db.LINETYPE.PAR_START:case n.db.LINETYPE.PAR_OVER_START:case n.db.LINETYPE.CRITICAL_START:case n.db.LINETYPE.BREAK_START:a.push({id:u.id,msg:u.message,from:Number.MAX_SAFE_INTEGER,to:Number.MIN_SAFE_INTEGER,width:0});break;case n.db.LINETYPE.ALT_ELSE:case n.db.LINETYPE.PAR_AND:case n.db.LINETYPE.CRITICAL_OPTION:u.message&&(s=a.pop(),i[s.id]=s,i[u.id]=s,a.push(s));break;case n.db.LINETYPE.LOOP_END:case n.db.LINETYPE.ALT_END:case n.db.LINETYPE.OPT_END:case n.db.LINETYPE.PAR_END:case n.db.LINETYPE.CRITICAL_END:case n.db.LINETYPE.BREAK_END:s=a.pop(),i[s.id]=s;break;case n.db.LINETYPE.ACTIVE_START:{let f=e.get(u.from?u.from:u.to.actor),d=GL(u.from?u.from:u.to.actor).length,p=f.x+f.width/2+(d-1)*Qe.activationWidth/2,m={startx:p,stopx:p+Qe.activationWidth,actor:u.from,enabled:!0};Rt.activations.push(m)}break;case n.db.LINETYPE.ACTIVE_END:{let f=Rt.activations.map(d=>d.actor).lastIndexOf(u.from);Rt.activations.splice(f,1).splice(0,1)}break}u.placement!==void 0?(o=await w6t(u,e,n),u.noteModel=o,a.forEach(f=>{s=f,s.from=St.getMin(s.from,o.startx),s.to=St.getMax(s.to,o.startx+o.width),s.width=St.getMax(s.width,Math.abs(s.from-s.to))-Qe.labelBoxWidth})):(l=k6t(u,e,n),u.msgModel=l,l.startx&&l.stopx&&a.length>0&&a.forEach(f=>{if(s=f,l.startx===l.stopx){let d=e.get(u.from),p=e.get(u.to);s.from=St.getMin(d.x-l.width/2,d.x-d.width/2,s.from),s.to=St.getMax(p.x+l.width/2,p.x+d.width/2,s.to),s.width=St.getMax(s.width,Math.abs(s.to-s.from))-Qe.labelBoxWidth}else s.from=St.getMin(l.startx,s.from),s.to=St.getMax(l.stopx,s.to),s.width=St.getMax(s.width,l.width)-Qe.labelBoxWidth}))}return Rt.activations=[],he.debug("Loop type widths:",i),i},"calculateLoopBounds"),E6t={bounds:Rt,drawActors:FV,drawActorsPopup:VCe,setConf:WCe,draw:x6t},S6t={parser:H5t,get db(){return new X5t},renderer:E6t,styles:K5t,init:b(t=>{t.sequence||(t.sequence={}),t.wrap&&(t.sequence.wrap=t.wrap,o3({sequence:{wrap:t.wrap}}))},"init")}});var qV,UL,QCe,z4,JCe,qL,e_e,ng,$4,HL,C6t,VL,_6t,A6t,L6t,WL,UV=D(()=>{E0();ac();Hn();Nr();Or();qV=(function(){var t=b(function(Ze,Pe,Re,Ve){for(Re=Re||{},Ve=Ze.length;Ve--;Re[Ze[Ve]]=Pe);return Re},"o"),e=[1,18],r=[1,19],n=[1,20],i=[1,41],a=[1,42],s=[1,26],o=[1,24],l=[1,25],u=[1,32],h=[1,33],f=[1,34],d=[1,45],p=[1,35],m=[1,36],g=[1,37],y=[1,38],v=[1,27],x=[1,28],k=[1,29],_=[1,30],T=[1,31],S=[1,44],R=[1,46],A=[1,43],I=[1,47],P=[1,9],O=[1,8,9],C=[1,58],N=[1,59],B=[1,60],F=[1,61],M=[1,62],$=[1,63],z=[1,64],q=[1,8,9,41],V=[1,76],U=[1,8,9,12,13,22,39,41,44,66,67,68,69,70,71,72,77,79],J=[1,8,9,12,13,17,20,22,39,41,44,48,58,66,67,68,69,70,71,72,77,79,84,99,101,102],se=[13,58,84,99,101,102],re=[13,58,71,72,84,99,101,102],me=[13,58,66,67,68,69,70,84,99,101,102],ge=[1,98],ye=[1,115],_e=[1,107],ue=[1,113],ie=[1,108],le=[1,109],oe=[1,110],ne=[1,111],pe=[1,112],te=[1,114],He=[22,58,59,80,84,85,86,87,88,89],de=[1,8,9,39,41,44],ce=[1,8,9,22],st=[1,143],Ae=[1,8,9,59],Ye=[1,8,9,22,58,59,80,84,85,86,87,88,89],Ge={trace:b(function(){},"trace"),yy:{},symbols_:{error:2,start:3,mermaidDoc:4,statements:5,graphConfig:6,CLASS_DIAGRAM:7,NEWLINE:8,EOF:9,statement:10,classLabel:11,SQS:12,STR:13,SQE:14,namespaceName:15,alphaNumToken:16,DOT:17,className:18,classLiteralName:19,GENERICTYPE:20,relationStatement:21,LABEL:22,namespaceStatement:23,classStatement:24,memberStatement:25,annotationStatement:26,clickStatement:27,styleStatement:28,cssClassStatement:29,noteStatement:30,classDefStatement:31,direction:32,acc_title:33,acc_title_value:34,acc_descr:35,acc_descr_value:36,acc_descr_multiline_value:37,namespaceIdentifier:38,STRUCT_START:39,classStatements:40,STRUCT_STOP:41,NAMESPACE:42,classIdentifier:43,STYLE_SEPARATOR:44,members:45,CLASS:46,ANNOTATION_START:47,ANNOTATION_END:48,MEMBER:49,SEPARATOR:50,relation:51,NOTE_FOR:52,noteText:53,NOTE:54,CLASSDEF:55,classList:56,stylesOpt:57,ALPHA:58,COMMA:59,direction_tb:60,direction_bt:61,direction_rl:62,direction_lr:63,relationType:64,lineType:65,AGGREGATION:66,EXTENSION:67,COMPOSITION:68,DEPENDENCY:69,LOLLIPOP:70,LINE:71,DOTTED_LINE:72,CALLBACK:73,LINK:74,LINK_TARGET:75,CLICK:76,CALLBACK_NAME:77,CALLBACK_ARGS:78,HREF:79,STYLE:80,CSSCLASS:81,style:82,styleComponent:83,NUM:84,COLON:85,UNIT:86,SPACE:87,BRKT:88,PCT:89,commentToken:90,textToken:91,graphCodeTokens:92,textNoTagsToken:93,TAGSTART:94,TAGEND:95,"==":96,"--":97,DEFAULT:98,MINUS:99,keywords:100,UNICODE_TEXT:101,BQUOTE_STR:102,$accept:0,$end:1},terminals_:{2:"error",7:"CLASS_DIAGRAM",8:"NEWLINE",9:"EOF",12:"SQS",13:"STR",14:"SQE",17:"DOT",20:"GENERICTYPE",22:"LABEL",33:"acc_title",34:"acc_title_value",35:"acc_descr",36:"acc_descr_value",37:"acc_descr_multiline_value",39:"STRUCT_START",41:"STRUCT_STOP",42:"NAMESPACE",44:"STYLE_SEPARATOR",46:"CLASS",47:"ANNOTATION_START",48:"ANNOTATION_END",49:"MEMBER",50:"SEPARATOR",52:"NOTE_FOR",54:"NOTE",55:"CLASSDEF",58:"ALPHA",59:"COMMA",60:"direction_tb",61:"direction_bt",62:"direction_rl",63:"direction_lr",66:"AGGREGATION",67:"EXTENSION",68:"COMPOSITION",69:"DEPENDENCY",70:"LOLLIPOP",71:"LINE",72:"DOTTED_LINE",73:"CALLBACK",74:"LINK",75:"LINK_TARGET",76:"CLICK",77:"CALLBACK_NAME",78:"CALLBACK_ARGS",79:"HREF",80:"STYLE",81:"CSSCLASS",84:"NUM",85:"COLON",86:"UNIT",87:"SPACE",88:"BRKT",89:"PCT",92:"graphCodeTokens",94:"TAGSTART",95:"TAGEND",96:"==",97:"--",98:"DEFAULT",99:"MINUS",100:"keywords",101:"UNICODE_TEXT",102:"BQUOTE_STR"},productions_:[0,[3,1],[3,1],[4,1],[6,4],[5,1],[5,2],[5,3],[11,3],[15,1],[15,3],[15,2],[18,1],[18,3],[18,1],[18,2],[18,2],[18,2],[10,1],[10,2],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,2],[10,2],[10,1],[23,4],[23,5],[38,2],[40,1],[40,2],[40,3],[24,1],[24,3],[24,4],[24,6],[43,2],[43,3],[26,4],[45,1],[45,2],[25,1],[25,2],[25,1],[25,1],[21,3],[21,4],[21,4],[21,5],[30,3],[30,2],[31,3],[56,1],[56,3],[32,1],[32,1],[32,1],[32,1],[51,3],[51,2],[51,2],[51,1],[64,1],[64,1],[64,1],[64,1],[64,1],[65,1],[65,1],[27,3],[27,4],[27,3],[27,4],[27,4],[27,5],[27,3],[27,4],[27,4],[27,5],[27,4],[27,5],[27,5],[27,6],[28,3],[29,3],[57,1],[57,3],[82,1],[82,2],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[90,1],[90,1],[91,1],[91,1],[91,1],[91,1],[91,1],[91,1],[91,1],[93,1],[93,1],[93,1],[93,1],[16,1],[16,1],[16,1],[16,1],[19,1],[53,1]],performAction:b(function(Pe,Re,Ve,ke,xe,H,ve){var K=H.length-1;switch(xe){case 8:this.$=H[K-1];break;case 9:case 12:case 14:this.$=H[K];break;case 10:case 13:this.$=H[K-2]+"."+H[K];break;case 11:case 15:this.$=H[K-1]+H[K];break;case 16:case 17:this.$=H[K-1]+"~"+H[K]+"~";break;case 18:ke.addRelation(H[K]);break;case 19:H[K-1].title=ke.cleanupLabel(H[K]),ke.addRelation(H[K-1]);break;case 30:this.$=H[K].trim(),ke.setAccTitle(this.$);break;case 31:case 32:this.$=H[K].trim(),ke.setAccDescription(this.$);break;case 33:ke.addClassesToNamespace(H[K-3],H[K-1]);break;case 34:ke.addClassesToNamespace(H[K-4],H[K-1]);break;case 35:this.$=H[K],ke.addNamespace(H[K]);break;case 36:this.$=[H[K]];break;case 37:this.$=[H[K-1]];break;case 38:H[K].unshift(H[K-2]),this.$=H[K];break;case 40:ke.setCssClass(H[K-2],H[K]);break;case 41:ke.addMembers(H[K-3],H[K-1]);break;case 42:ke.setCssClass(H[K-5],H[K-3]),ke.addMembers(H[K-5],H[K-1]);break;case 43:this.$=H[K],ke.addClass(H[K]);break;case 44:this.$=H[K-1],ke.addClass(H[K-1]),ke.setClassLabel(H[K-1],H[K]);break;case 45:ke.addAnnotation(H[K],H[K-2]);break;case 46:case 59:this.$=[H[K]];break;case 47:H[K].push(H[K-1]),this.$=H[K];break;case 48:break;case 49:ke.addMember(H[K-1],ke.cleanupLabel(H[K]));break;case 50:break;case 51:break;case 52:this.$={id1:H[K-2],id2:H[K],relation:H[K-1],relationTitle1:"none",relationTitle2:"none"};break;case 53:this.$={id1:H[K-3],id2:H[K],relation:H[K-1],relationTitle1:H[K-2],relationTitle2:"none"};break;case 54:this.$={id1:H[K-3],id2:H[K],relation:H[K-2],relationTitle1:"none",relationTitle2:H[K-1]};break;case 55:this.$={id1:H[K-4],id2:H[K],relation:H[K-2],relationTitle1:H[K-3],relationTitle2:H[K-1]};break;case 56:ke.addNote(H[K],H[K-1]);break;case 57:ke.addNote(H[K]);break;case 58:this.$=H[K-2],ke.defineClass(H[K-1],H[K]);break;case 60:this.$=H[K-2].concat([H[K]]);break;case 61:ke.setDirection("TB");break;case 62:ke.setDirection("BT");break;case 63:ke.setDirection("RL");break;case 64:ke.setDirection("LR");break;case 65:this.$={type1:H[K-2],type2:H[K],lineType:H[K-1]};break;case 66:this.$={type1:"none",type2:H[K],lineType:H[K-1]};break;case 67:this.$={type1:H[K-1],type2:"none",lineType:H[K]};break;case 68:this.$={type1:"none",type2:"none",lineType:H[K]};break;case 69:this.$=ke.relationType.AGGREGATION;break;case 70:this.$=ke.relationType.EXTENSION;break;case 71:this.$=ke.relationType.COMPOSITION;break;case 72:this.$=ke.relationType.DEPENDENCY;break;case 73:this.$=ke.relationType.LOLLIPOP;break;case 74:this.$=ke.lineType.LINE;break;case 75:this.$=ke.lineType.DOTTED_LINE;break;case 76:case 82:this.$=H[K-2],ke.setClickEvent(H[K-1],H[K]);break;case 77:case 83:this.$=H[K-3],ke.setClickEvent(H[K-2],H[K-1]),ke.setTooltip(H[K-2],H[K]);break;case 78:this.$=H[K-2],ke.setLink(H[K-1],H[K]);break;case 79:this.$=H[K-3],ke.setLink(H[K-2],H[K-1],H[K]);break;case 80:this.$=H[K-3],ke.setLink(H[K-2],H[K-1]),ke.setTooltip(H[K-2],H[K]);break;case 81:this.$=H[K-4],ke.setLink(H[K-3],H[K-2],H[K]),ke.setTooltip(H[K-3],H[K-1]);break;case 84:this.$=H[K-3],ke.setClickEvent(H[K-2],H[K-1],H[K]);break;case 85:this.$=H[K-4],ke.setClickEvent(H[K-3],H[K-2],H[K-1]),ke.setTooltip(H[K-3],H[K]);break;case 86:this.$=H[K-3],ke.setLink(H[K-2],H[K]);break;case 87:this.$=H[K-4],ke.setLink(H[K-3],H[K-1],H[K]);break;case 88:this.$=H[K-4],ke.setLink(H[K-3],H[K-1]),ke.setTooltip(H[K-3],H[K]);break;case 89:this.$=H[K-5],ke.setLink(H[K-4],H[K-2],H[K]),ke.setTooltip(H[K-4],H[K-1]);break;case 90:this.$=H[K-2],ke.setCssStyle(H[K-1],H[K]);break;case 91:ke.setCssClass(H[K-1],H[K]);break;case 92:this.$=[H[K]];break;case 93:H[K-2].push(H[K]),this.$=H[K-2];break;case 95:this.$=H[K-1]+H[K];break}},"anonymous"),table:[{3:1,4:2,5:3,6:4,7:[1,6],10:5,16:39,18:21,19:40,21:7,23:8,24:9,25:10,26:11,27:12,28:13,29:14,30:15,31:16,32:17,33:e,35:r,37:n,38:22,42:i,43:23,46:a,47:s,49:o,50:l,52:u,54:h,55:f,58:d,60:p,61:m,62:g,63:y,73:v,74:x,76:k,80:_,81:T,84:S,99:R,101:A,102:I},{1:[3]},{1:[2,1]},{1:[2,2]},{1:[2,3]},t(P,[2,5],{8:[1,48]}),{8:[1,49]},t(O,[2,18],{22:[1,50]}),t(O,[2,20]),t(O,[2,21]),t(O,[2,22]),t(O,[2,23]),t(O,[2,24]),t(O,[2,25]),t(O,[2,26]),t(O,[2,27]),t(O,[2,28]),t(O,[2,29]),{34:[1,51]},{36:[1,52]},t(O,[2,32]),t(O,[2,48],{51:53,64:56,65:57,13:[1,54],22:[1,55],66:C,67:N,68:B,69:F,70:M,71:$,72:z}),{39:[1,65]},t(q,[2,39],{39:[1,67],44:[1,66]}),t(O,[2,50]),t(O,[2,51]),{16:68,58:d,84:S,99:R,101:A},{16:39,18:69,19:40,58:d,84:S,99:R,101:A,102:I},{16:39,18:70,19:40,58:d,84:S,99:R,101:A,102:I},{16:39,18:71,19:40,58:d,84:S,99:R,101:A,102:I},{58:[1,72]},{13:[1,73]},{16:39,18:74,19:40,58:d,84:S,99:R,101:A,102:I},{13:V,53:75},{56:77,58:[1,78]},t(O,[2,61]),t(O,[2,62]),t(O,[2,63]),t(O,[2,64]),t(U,[2,12],{16:39,19:40,18:80,17:[1,79],20:[1,81],58:d,84:S,99:R,101:A,102:I}),t(U,[2,14],{20:[1,82]}),{15:83,16:84,58:d,84:S,99:R,101:A},{16:39,18:85,19:40,58:d,84:S,99:R,101:A,102:I},t(J,[2,118]),t(J,[2,119]),t(J,[2,120]),t(J,[2,121]),t([1,8,9,12,13,20,22,39,41,44,66,67,68,69,70,71,72,77,79],[2,122]),t(P,[2,6],{10:5,21:7,23:8,24:9,25:10,26:11,27:12,28:13,29:14,30:15,31:16,32:17,18:21,38:22,43:23,16:39,19:40,5:86,33:e,35:r,37:n,42:i,46:a,47:s,49:o,50:l,52:u,54:h,55:f,58:d,60:p,61:m,62:g,63:y,73:v,74:x,76:k,80:_,81:T,84:S,99:R,101:A,102:I}),{5:87,10:5,16:39,18:21,19:40,21:7,23:8,24:9,25:10,26:11,27:12,28:13,29:14,30:15,31:16,32:17,33:e,35:r,37:n,38:22,42:i,43:23,46:a,47:s,49:o,50:l,52:u,54:h,55:f,58:d,60:p,61:m,62:g,63:y,73:v,74:x,76:k,80:_,81:T,84:S,99:R,101:A,102:I},t(O,[2,19]),t(O,[2,30]),t(O,[2,31]),{13:[1,89],16:39,18:88,19:40,58:d,84:S,99:R,101:A,102:I},{51:90,64:56,65:57,66:C,67:N,68:B,69:F,70:M,71:$,72:z},t(O,[2,49]),{65:91,71:$,72:z},t(se,[2,68],{64:92,66:C,67:N,68:B,69:F,70:M}),t(re,[2,69]),t(re,[2,70]),t(re,[2,71]),t(re,[2,72]),t(re,[2,73]),t(me,[2,74]),t(me,[2,75]),{8:[1,94],24:95,40:93,43:23,46:a},{16:96,58:d,84:S,99:R,101:A},{45:97,49:ge},{48:[1,99]},{13:[1,100]},{13:[1,101]},{77:[1,102],79:[1,103]},{22:ye,57:104,58:_e,80:ue,82:105,83:106,84:ie,85:le,86:oe,87:ne,88:pe,89:te},{58:[1,116]},{13:V,53:117},t(O,[2,57]),t(O,[2,123]),{22:ye,57:118,58:_e,59:[1,119],80:ue,82:105,83:106,84:ie,85:le,86:oe,87:ne,88:pe,89:te},t(He,[2,59]),{16:39,18:120,19:40,58:d,84:S,99:R,101:A,102:I},t(U,[2,15]),t(U,[2,16]),t(U,[2,17]),{39:[2,35]},{15:122,16:84,17:[1,121],39:[2,9],58:d,84:S,99:R,101:A},t(de,[2,43],{11:123,12:[1,124]}),t(P,[2,7]),{9:[1,125]},t(ce,[2,52]),{16:39,18:126,19:40,58:d,84:S,99:R,101:A,102:I},{13:[1,128],16:39,18:127,19:40,58:d,84:S,99:R,101:A,102:I},t(se,[2,67],{64:129,66:C,67:N,68:B,69:F,70:M}),t(se,[2,66]),{41:[1,130]},{24:95,40:131,43:23,46:a},{8:[1,132],41:[2,36]},t(q,[2,40],{39:[1,133]}),{41:[1,134]},{41:[2,46],45:135,49:ge},{16:39,18:136,19:40,58:d,84:S,99:R,101:A,102:I},t(O,[2,76],{13:[1,137]}),t(O,[2,78],{13:[1,139],75:[1,138]}),t(O,[2,82],{13:[1,140],78:[1,141]}),{13:[1,142]},t(O,[2,90],{59:st}),t(Ae,[2,92],{83:144,22:ye,58:_e,80:ue,84:ie,85:le,86:oe,87:ne,88:pe,89:te}),t(Ye,[2,94]),t(Ye,[2,96]),t(Ye,[2,97]),t(Ye,[2,98]),t(Ye,[2,99]),t(Ye,[2,100]),t(Ye,[2,101]),t(Ye,[2,102]),t(Ye,[2,103]),t(Ye,[2,104]),t(O,[2,91]),t(O,[2,56]),t(O,[2,58],{59:st}),{58:[1,145]},t(U,[2,13]),{15:146,16:84,58:d,84:S,99:R,101:A},{39:[2,11]},t(de,[2,44]),{13:[1,147]},{1:[2,4]},t(ce,[2,54]),t(ce,[2,53]),{16:39,18:148,19:40,58:d,84:S,99:R,101:A,102:I},t(se,[2,65]),t(O,[2,33]),{41:[1,149]},{24:95,40:150,41:[2,37],43:23,46:a},{45:151,49:ge},t(q,[2,41]),{41:[2,47]},t(O,[2,45]),t(O,[2,77]),t(O,[2,79]),t(O,[2,80],{75:[1,152]}),t(O,[2,83]),t(O,[2,84],{13:[1,153]}),t(O,[2,86],{13:[1,155],75:[1,154]}),{22:ye,58:_e,80:ue,82:156,83:106,84:ie,85:le,86:oe,87:ne,88:pe,89:te},t(Ye,[2,95]),t(He,[2,60]),{39:[2,10]},{14:[1,157]},t(ce,[2,55]),t(O,[2,34]),{41:[2,38]},{41:[1,158]},t(O,[2,81]),t(O,[2,85]),t(O,[2,87]),t(O,[2,88],{75:[1,159]}),t(Ae,[2,93],{83:144,22:ye,58:_e,80:ue,84:ie,85:le,86:oe,87:ne,88:pe,89:te}),t(de,[2,8]),t(q,[2,42]),t(O,[2,89])],defaultActions:{2:[2,1],3:[2,2],4:[2,3],83:[2,35],122:[2,11],125:[2,4],135:[2,47],146:[2,10],150:[2,38]},parseError:b(function(Pe,Re){if(Re.recoverable)this.trace(Pe);else{var Ve=new Error(Pe);throw Ve.hash=Re,Ve}},"parseError"),parse:b(function(Pe){var Re=this,Ve=[0],ke=[],xe=[null],H=[],ve=this.table,K="",we=0,Ee=0,Ke=0,Be=2,De=1,nt=H.slice.call(arguments,1),We=Object.create(this.lexer),ut={yy:{}};for(var vt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,vt)&&(ut.yy[vt]=this.yy[vt]);We.setInput(Pe,ut.yy),ut.yy.lexer=We,ut.yy.parser=this,typeof We.yylloc>"u"&&(We.yylloc={});var gt=We.yylloc;H.push(gt);var mt=We.options&&We.options.ranges;typeof ut.yy.parseError=="function"?this.parseError=ut.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function ft(Bt){Ve.length=Ve.length-2*Bt,xe.length=xe.length-Bt,H.length=H.length-Bt}b(ft,"popStack");function Dt(){var Bt;return Bt=ke.pop()||We.lex()||De,typeof Bt!="number"&&(Bt instanceof Array&&(ke=Bt,Bt=ke.pop()),Bt=Re.symbols_[Bt]||Bt),Bt}b(Dt,"lex");for(var ht,yt,W,j,Je,ee,Te={},bt,at,It,At;;){if(W=Ve[Ve.length-1],this.defaultActions[W]?j=this.defaultActions[W]:((ht===null||typeof ht>"u")&&(ht=Dt()),j=ve[W]&&ve[W][ht]),typeof j>"u"||!j.length||!j[0]){var Ut="";At=[];for(bt in ve[W])this.terminals_[bt]&&bt>Be&&At.push("'"+this.terminals_[bt]+"'");We.showPosition?Ut="Parse error on line "+(we+1)+`: +`+We.showPosition()+` +Expecting `+At.join(", ")+", got '"+(this.terminals_[ht]||ht)+"'":Ut="Parse error on line "+(we+1)+": Unexpected "+(ht==De?"end of input":"'"+(this.terminals_[ht]||ht)+"'"),this.parseError(Ut,{text:We.match,token:this.terminals_[ht]||ht,line:We.yylineno,loc:gt,expected:At})}if(j[0]instanceof Array&&j.length>1)throw new Error("Parse Error: multiple actions possible at state: "+W+", token: "+ht);switch(j[0]){case 1:Ve.push(ht),xe.push(We.yytext),H.push(We.yylloc),Ve.push(j[1]),ht=null,yt?(ht=yt,yt=null):(Ee=We.yyleng,K=We.yytext,we=We.yylineno,gt=We.yylloc,Ke>0&&Ke--);break;case 2:if(at=this.productions_[j[1]][1],Te.$=xe[xe.length-at],Te._$={first_line:H[H.length-(at||1)].first_line,last_line:H[H.length-1].last_line,first_column:H[H.length-(at||1)].first_column,last_column:H[H.length-1].last_column},mt&&(Te._$.range=[H[H.length-(at||1)].range[0],H[H.length-1].range[1]]),ee=this.performAction.apply(Te,[K,Ee,we,ut.yy,j[1],xe,H].concat(nt)),typeof ee<"u")return ee;at&&(Ve=Ve.slice(0,-1*at*2),xe=xe.slice(0,-1*at),H=H.slice(0,-1*at)),Ve.push(this.productions_[j[1]][0]),xe.push(Te.$),H.push(Te._$),It=ve[Ve[Ve.length-2]][Ve[Ve.length-1]],Ve.push(It);break;case 3:return!0}}return!0},"parse")},rt=(function(){var Ze={EOF:1,parseError:b(function(Re,Ve){if(this.yy.parser)this.yy.parser.parseError(Re,Ve);else throw new Error(Re)},"parseError"),setInput:b(function(Pe,Re){return this.yy=Re||this.yy||{},this._input=Pe,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:b(function(){var Pe=this._input[0];this.yytext+=Pe,this.yyleng++,this.offset++,this.match+=Pe,this.matched+=Pe;var Re=Pe.match(/(?:\r\n?|\n).*/g);return Re?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),Pe},"input"),unput:b(function(Pe){var Re=Pe.length,Ve=Pe.split(/(?:\r\n?|\n)/g);this._input=Pe+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-Re),this.offset-=Re;var ke=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),Ve.length-1&&(this.yylineno-=Ve.length-1);var xe=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:Ve?(Ve.length===ke.length?this.yylloc.first_column:0)+ke[ke.length-Ve.length].length-Ve[0].length:this.yylloc.first_column-Re},this.options.ranges&&(this.yylloc.range=[xe[0],xe[0]+this.yyleng-Re]),this.yyleng=this.yytext.length,this},"unput"),more:b(function(){return this._more=!0,this},"more"),reject:b(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). +`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:b(function(Pe){this.unput(this.match.slice(Pe))},"less"),pastInput:b(function(){var Pe=this.matched.substr(0,this.matched.length-this.match.length);return(Pe.length>20?"...":"")+Pe.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:b(function(){var Pe=this.match;return Pe.length<20&&(Pe+=this._input.substr(0,20-Pe.length)),(Pe.substr(0,20)+(Pe.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:b(function(){var Pe=this.pastInput(),Re=new Array(Pe.length+1).join("-");return Pe+this.upcomingInput()+` +`+Re+"^"},"showPosition"),test_match:b(function(Pe,Re){var Ve,ke,xe;if(this.options.backtrack_lexer&&(xe={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(xe.yylloc.range=this.yylloc.range.slice(0))),ke=Pe[0].match(/(?:\r\n?|\n).*/g),ke&&(this.yylineno+=ke.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:ke?ke[ke.length-1].length-ke[ke.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+Pe[0].length},this.yytext+=Pe[0],this.match+=Pe[0],this.matches=Pe,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(Pe[0].length),this.matched+=Pe[0],Ve=this.performAction.call(this,this.yy,this,Re,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),Ve)return Ve;if(this._backtrack){for(var H in xe)this[H]=xe[H];return!1}return!1},"test_match"),next:b(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var Pe,Re,Ve,ke;this._more||(this.yytext="",this.match="");for(var xe=this._currentRules(),H=0;HRe[0].length)){if(Re=Ve,ke=H,this.options.backtrack_lexer){if(Pe=this.test_match(Ve,xe[H]),Pe!==!1)return Pe;if(this._backtrack){Re=!1;continue}else return!1}else if(!this.options.flex)break}return Re?(Pe=this.test_match(Re,xe[ke]),Pe!==!1?Pe:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. +`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:b(function(){var Re=this.next();return Re||this.lex()},"lex"),begin:b(function(Re){this.conditionStack.push(Re)},"begin"),popState:b(function(){var Re=this.conditionStack.length-1;return Re>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:b(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:b(function(Re){return Re=this.conditionStack.length-1-Math.abs(Re||0),Re>=0?this.conditionStack[Re]:"INITIAL"},"topState"),pushState:b(function(Re){this.begin(Re)},"pushState"),stateStackSize:b(function(){return this.conditionStack.length},"stateStackSize"),options:{},performAction:b(function(Re,Ve,ke,xe){var H=xe;switch(ke){case 0:return 60;case 1:return 61;case 2:return 62;case 3:return 63;case 4:break;case 5:break;case 6:return this.begin("acc_title"),33;break;case 7:return this.popState(),"acc_title_value";break;case 8:return this.begin("acc_descr"),35;break;case 9:return this.popState(),"acc_descr_value";break;case 10:this.begin("acc_descr_multiline");break;case 11:this.popState();break;case 12:return"acc_descr_multiline_value";case 13:return 8;case 14:break;case 15:return 7;case 16:return 7;case 17:return"EDGE_STATE";case 18:this.begin("callback_name");break;case 19:this.popState();break;case 20:this.popState(),this.begin("callback_args");break;case 21:return 77;case 22:this.popState();break;case 23:return 78;case 24:this.popState();break;case 25:return"STR";case 26:this.begin("string");break;case 27:return 80;case 28:return 55;case 29:return this.begin("namespace"),42;break;case 30:return this.popState(),8;break;case 31:break;case 32:return this.begin("namespace-body"),39;break;case 33:return this.popState(),41;break;case 34:return"EOF_IN_STRUCT";case 35:return 8;case 36:break;case 37:return"EDGE_STATE";case 38:return this.begin("class"),46;break;case 39:return this.popState(),8;break;case 40:break;case 41:return this.popState(),this.popState(),41;break;case 42:return this.begin("class-body"),39;break;case 43:return this.popState(),41;break;case 44:return"EOF_IN_STRUCT";case 45:return"EDGE_STATE";case 46:return"OPEN_IN_STRUCT";case 47:break;case 48:return"MEMBER";case 49:return 81;case 50:return 73;case 51:return 74;case 52:return 76;case 53:return 52;case 54:return 54;case 55:return 47;case 56:return 48;case 57:return 79;case 58:this.popState();break;case 59:return"GENERICTYPE";case 60:this.begin("generic");break;case 61:this.popState();break;case 62:return"BQUOTE_STR";case 63:this.begin("bqstring");break;case 64:return 75;case 65:return 75;case 66:return 75;case 67:return 75;case 68:return 67;case 69:return 67;case 70:return 69;case 71:return 69;case 72:return 68;case 73:return 66;case 74:return 70;case 75:return 71;case 76:return 72;case 77:return 22;case 78:return 44;case 79:return 99;case 80:return 17;case 81:return"PLUS";case 82:return 85;case 83:return 59;case 84:return 88;case 85:return 88;case 86:return 89;case 87:return"EQUALS";case 88:return"EQUALS";case 89:return 58;case 90:return 12;case 91:return 14;case 92:return"PUNCTUATION";case 93:return 84;case 94:return 101;case 95:return 87;case 96:return 87;case 97:return 9}},"anonymous"),rules:[/^(?:.*direction\s+TB[^\n]*)/,/^(?:.*direction\s+BT[^\n]*)/,/^(?:.*direction\s+RL[^\n]*)/,/^(?:.*direction\s+LR[^\n]*)/,/^(?:%%(?!\{)*[^\n]*(\r?\n?)+)/,/^(?:%%[^\n]*(\r?\n)*)/,/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?:\s*(\r?\n)+)/,/^(?:\s+)/,/^(?:classDiagram-v2\b)/,/^(?:classDiagram\b)/,/^(?:\[\*\])/,/^(?:call[\s]+)/,/^(?:\([\s]*\))/,/^(?:\()/,/^(?:[^(]*)/,/^(?:\))/,/^(?:[^)]*)/,/^(?:["])/,/^(?:[^"]*)/,/^(?:["])/,/^(?:style\b)/,/^(?:classDef\b)/,/^(?:namespace\b)/,/^(?:\s*(\r?\n)+)/,/^(?:\s+)/,/^(?:[{])/,/^(?:[}])/,/^(?:$)/,/^(?:\s*(\r?\n)+)/,/^(?:\s+)/,/^(?:\[\*\])/,/^(?:class\b)/,/^(?:\s*(\r?\n)+)/,/^(?:\s+)/,/^(?:[}])/,/^(?:[{])/,/^(?:[}])/,/^(?:$)/,/^(?:\[\*\])/,/^(?:[{])/,/^(?:[\n])/,/^(?:[^{}\n]*)/,/^(?:cssClass\b)/,/^(?:callback\b)/,/^(?:link\b)/,/^(?:click\b)/,/^(?:note for\b)/,/^(?:note\b)/,/^(?:<<)/,/^(?:>>)/,/^(?:href\b)/,/^(?:[~])/,/^(?:[^~]*)/,/^(?:~)/,/^(?:[`])/,/^(?:[^`]+)/,/^(?:[`])/,/^(?:_self\b)/,/^(?:_blank\b)/,/^(?:_parent\b)/,/^(?:_top\b)/,/^(?:\s*<\|)/,/^(?:\s*\|>)/,/^(?:\s*>)/,/^(?:\s*<)/,/^(?:\s*\*)/,/^(?:\s*o\b)/,/^(?:\s*\(\))/,/^(?:--)/,/^(?:\.\.)/,/^(?::{1}[^:\n;]+)/,/^(?::{3})/,/^(?:-)/,/^(?:\.)/,/^(?:\+)/,/^(?::)/,/^(?:,)/,/^(?:#)/,/^(?:#)/,/^(?:%)/,/^(?:=)/,/^(?:=)/,/^(?:\w+)/,/^(?:\[)/,/^(?:\])/,/^(?:[!"#$%&'*+,-.`?\\/])/,/^(?:[0-9]+)/,/^(?:[\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6]|[\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377]|[\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5]|[\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA]|[\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE]|[\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA]|[\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0]|[\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977]|[\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2]|[\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A]|[\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39]|[\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8]|[\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C]|[\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C]|[\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99]|[\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0]|[\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D]|[\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3]|[\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10]|[\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1]|[\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81]|[\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3]|[\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6]|[\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A]|[\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081]|[\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D]|[\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0]|[\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310]|[\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C]|[\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711]|[\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7]|[\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C]|[\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16]|[\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF]|[\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC]|[\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D]|[\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D]|[\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3]|[\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F]|[\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128]|[\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184]|[\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3]|[\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6]|[\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE]|[\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C]|[\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D]|[\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC]|[\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B]|[\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788]|[\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805]|[\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB]|[\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28]|[\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5]|[\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4]|[\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E]|[\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D]|[\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36]|[\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D]|[\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC]|[\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF]|[\uFFD2-\uFFD7\uFFDA-\uFFDC])/,/^(?:\s)/,/^(?:\s)/,/^(?:$)/],conditions:{"namespace-body":{rules:[26,33,34,35,36,37,38,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},namespace:{rules:[26,29,30,31,32,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},"class-body":{rules:[26,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},class:{rules:[26,39,40,41,42,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},acc_descr_multiline:{rules:[11,12,26,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},acc_descr:{rules:[9,26,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},acc_title:{rules:[7,26,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},callback_args:{rules:[22,23,26,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},callback_name:{rules:[19,20,21,26,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},href:{rules:[26,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},struct:{rules:[26,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},generic:{rules:[26,49,50,51,52,53,54,55,56,57,58,59,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},bqstring:{rules:[26,49,50,51,52,53,54,55,56,57,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},string:{rules:[24,25,26,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,8,10,13,14,15,16,17,18,26,27,28,29,38,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97],inclusive:!0}}};return Ze})();Ge.lexer=rt;function Xe(){this.yy={}}return b(Xe,"Parser"),Xe.prototype=Ge,Ge.Parser=Xe,new Xe})();qV.parser=qV;UL=qV,QCe=["#","+","~","-",""],JCe=(z4=class{constructor(e,r){this.memberType=r,this.visibility="",this.classifier="",this.text="";let n=Qr(e,Fe());this.parseMember(n)}getDisplayDetails(){let e=this.visibility+jc(this.id);this.memberType==="method"&&(e+=`(${jc(this.parameters.trim())})`,this.returnType&&(e+=" : "+jc(this.returnType))),e=e.trim();let r=this.parseClassifier();return{displayText:e,cssStyle:r}}parseMember(e){let r="";if(this.memberType==="method"){let a=/([#+~-])?(.+)\((.*)\)([\s$*])?(.*)([$*])?/.exec(e);if(a){let s=a[1]?a[1].trim():"";if(QCe.includes(s)&&(this.visibility=s),this.id=a[2],this.parameters=a[3]?a[3].trim():"",r=a[4]?a[4].trim():"",this.returnType=a[5]?a[5].trim():"",r===""){let o=this.returnType.substring(this.returnType.length-1);/[$*]/.exec(o)&&(r=o,this.returnType=this.returnType.substring(0,this.returnType.length-1))}}}else{let i=e.length,a=e.substring(0,1),s=e.substring(i-1);QCe.includes(a)&&(this.visibility=a),/[$*]/.exec(s)&&(r=s),this.id=e.substring(this.visibility===""?0:1,r===""?i:i-1)}this.classifier=r,this.id=this.id.startsWith(" ")?" "+this.id.trim():this.id.trim();let n=`${this.visibility?"\\"+this.visibility:""}${jc(this.id)}${this.memberType==="method"?`(${jc(this.parameters)})${this.returnType?" : "+jc(this.returnType):""}`:""}`;this.text=n.replaceAll("<","<").replaceAll(">",">"),this.text.startsWith("\\<")&&(this.text=this.text.replace("\\<","~"))}parseClassifier(){switch(this.classifier){case"*":return"font-style:italic;";case"$":return"text-decoration:underline;";default:return""}}},b(z4,"ClassMember"),z4),qL="classId-",e_e=0,ng=b(t=>St.sanitizeText(t,Fe()),"sanitizeText"),HL=($4=class{constructor(){this.relations=[],this.classes=new Map,this.styleClasses=new Map,this.notes=[],this.interfaces=[],this.namespaces=new Map,this.namespaceCounter=0,this.functions=[],this.lineType={LINE:0,DOTTED_LINE:1},this.relationType={AGGREGATION:0,EXTENSION:1,COMPOSITION:2,DEPENDENCY:3,LOLLIPOP:4},this.setupToolTips=b(e=>{let r=dt(".mermaidTooltip");(r._groups||r)[0][0]===null&&(r=dt("body").append("div").attr("class","mermaidTooltip").style("opacity",0)),dt(e).select("svg").selectAll("g.node").on("mouseover",a=>{let s=dt(a.currentTarget);if(s.attr("title")===null)return;let l=this.getBoundingClientRect();r.transition().duration(200).style("opacity",".9"),r.text(s.attr("title")).style("left",window.scrollX+l.left+(l.right-l.left)/2+"px").style("top",window.scrollY+l.top-14+document.body.scrollTop+"px"),r.html(r.html().replace(/<br\/>/g,"
    ")),s.classed("hover",!0)}).on("mouseout",a=>{r.transition().duration(500).style("opacity",0),dt(a.currentTarget).classed("hover",!1)})},"setupToolTips"),this.direction="TB",this.setAccTitle=en,this.getAccTitle=tn,this.setAccDescription=rn,this.getAccDescription=nn,this.setDiagramTitle=pn,this.getDiagramTitle=an,this.getConfig=b(()=>Fe().class,"getConfig"),this.functions.push(this.setupToolTips.bind(this)),this.clear(),this.addRelation=this.addRelation.bind(this),this.addClassesToNamespace=this.addClassesToNamespace.bind(this),this.addNamespace=this.addNamespace.bind(this),this.setCssClass=this.setCssClass.bind(this),this.addMembers=this.addMembers.bind(this),this.addClass=this.addClass.bind(this),this.setClassLabel=this.setClassLabel.bind(this),this.addAnnotation=this.addAnnotation.bind(this),this.addMember=this.addMember.bind(this),this.cleanupLabel=this.cleanupLabel.bind(this),this.addNote=this.addNote.bind(this),this.defineClass=this.defineClass.bind(this),this.setDirection=this.setDirection.bind(this),this.setLink=this.setLink.bind(this),this.bindFunctions=this.bindFunctions.bind(this),this.clear=this.clear.bind(this),this.setTooltip=this.setTooltip.bind(this),this.setClickEvent=this.setClickEvent.bind(this),this.setCssStyle=this.setCssStyle.bind(this)}splitClassNameAndType(e){let r=St.sanitizeText(e,Fe()),n="",i=r;if(r.indexOf("~")>0){let a=r.split("~");i=ng(a[0]),n=ng(a[1])}return{className:i,type:n}}setClassLabel(e,r){let n=St.sanitizeText(e,Fe());r&&(r=ng(r));let{className:i}=this.splitClassNameAndType(n);this.classes.get(i).label=r,this.classes.get(i).text=`${r}${this.classes.get(i).type?`<${this.classes.get(i).type}>`:""}`}addClass(e){let r=St.sanitizeText(e,Fe()),{className:n,type:i}=this.splitClassNameAndType(r);if(this.classes.has(n))return;let a=St.sanitizeText(n,Fe());this.classes.set(a,{id:a,type:i,label:a,text:`${a}${i?`<${i}>`:""}`,shape:"classBox",cssClasses:"default",methods:[],members:[],annotations:[],styles:[],domId:qL+a+"-"+e_e}),e_e++}addInterface(e,r){let n={id:`interface${this.interfaces.length}`,label:e,classId:r};this.interfaces.push(n)}lookUpDomId(e){let r=St.sanitizeText(e,Fe());if(this.classes.has(r))return this.classes.get(r).domId;throw new Error("Class not found: "+r)}clear(){this.relations=[],this.classes=new Map,this.notes=[],this.interfaces=[],this.functions=[],this.functions.push(this.setupToolTips.bind(this)),this.namespaces=new Map,this.namespaceCounter=0,this.direction="TB",Jr()}getClass(e){return this.classes.get(e)}getClasses(){return this.classes}getRelations(){return this.relations}getNotes(){return this.notes}addRelation(e){he.debug("Adding relation: "+JSON.stringify(e));let r=[this.relationType.LOLLIPOP,this.relationType.AGGREGATION,this.relationType.COMPOSITION,this.relationType.DEPENDENCY,this.relationType.EXTENSION];e.relation.type1===this.relationType.LOLLIPOP&&!r.includes(e.relation.type2)?(this.addClass(e.id2),this.addInterface(e.id1,e.id2),e.id1=`interface${this.interfaces.length-1}`):e.relation.type2===this.relationType.LOLLIPOP&&!r.includes(e.relation.type1)?(this.addClass(e.id1),this.addInterface(e.id2,e.id1),e.id2=`interface${this.interfaces.length-1}`):(this.addClass(e.id1),this.addClass(e.id2)),e.id1=this.splitClassNameAndType(e.id1).className,e.id2=this.splitClassNameAndType(e.id2).className,e.relationTitle1=St.sanitizeText(e.relationTitle1.trim(),Fe()),e.relationTitle2=St.sanitizeText(e.relationTitle2.trim(),Fe()),this.relations.push(e)}addAnnotation(e,r){let n=this.splitClassNameAndType(e).className;this.classes.get(n).annotations.push(r)}addMember(e,r){this.addClass(e);let n=this.splitClassNameAndType(e).className,i=this.classes.get(n);if(typeof r=="string"){let a=r.trim();a.startsWith("<<")&&a.endsWith(">>")?i.annotations.push(ng(a.substring(2,a.length-2))):a.indexOf(")")>0?i.methods.push(new JCe(a,"method")):a&&i.members.push(new JCe(a,"attribute"))}}addMembers(e,r){Array.isArray(r)&&(r.reverse(),r.forEach(n=>this.addMember(e,n)))}addNote(e,r){let n={id:`note${this.notes.length}`,class:r,text:e};this.notes.push(n)}cleanupLabel(e){return e.startsWith(":")&&(e=e.substring(1)),ng(e.trim())}setCssClass(e,r){e.split(",").forEach(n=>{let i=n;/\d/.exec(n[0])&&(i=qL+i);let a=this.classes.get(i);a&&(a.cssClasses+=" "+r)})}defineClass(e,r){for(let n of e){let i=this.styleClasses.get(n);i===void 0&&(i={id:n,styles:[],textStyles:[]},this.styleClasses.set(n,i)),r&&r.forEach(a=>{if(/color/.exec(a)){let s=a.replace("fill","bgFill");i.textStyles.push(s)}i.styles.push(a)}),this.classes.forEach(a=>{a.cssClasses.includes(n)&&a.styles.push(...r.flatMap(s=>s.split(",")))})}}setTooltip(e,r){e.split(",").forEach(n=>{r!==void 0&&(this.classes.get(n).tooltip=ng(r))})}getTooltip(e,r){return r&&this.namespaces.has(r)?this.namespaces.get(r).classes.get(e).tooltip:this.classes.get(e).tooltip}setLink(e,r,n){let i=Fe();e.split(",").forEach(a=>{let s=a;/\d/.exec(a[0])&&(s=qL+s);let o=this.classes.get(s);o&&(o.link=gr.formatUrl(r,i),i.securityLevel==="sandbox"?o.linkTarget="_top":typeof n=="string"?o.linkTarget=ng(n):o.linkTarget="_blank")}),this.setCssClass(e,"clickable")}setClickEvent(e,r,n){e.split(",").forEach(i=>{this.setClickFunc(i,r,n),this.classes.get(i).haveCallback=!0}),this.setCssClass(e,"clickable")}setClickFunc(e,r,n){let i=St.sanitizeText(e,Fe());if(Fe().securityLevel!=="loose"||r===void 0)return;let s=i;if(this.classes.has(s)){let o=this.lookUpDomId(s),l=[];if(typeof n=="string"){l=n.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let u=0;u{let u=document.querySelector(`[id="${o}"]`);u!==null&&u.addEventListener("click",()=>{gr.runFunc(r,...l)},!1)})}}bindFunctions(e){this.functions.forEach(r=>{r(e)})}getDirection(){return this.direction}setDirection(e){this.direction=e}addNamespace(e){this.namespaces.has(e)||(this.namespaces.set(e,{id:e,classes:new Map,children:{},domId:qL+e+"-"+this.namespaceCounter}),this.namespaceCounter++)}getNamespace(e){return this.namespaces.get(e)}getNamespaces(){return this.namespaces}addClassesToNamespace(e,r){if(this.namespaces.has(e))for(let n of r){let{className:i}=this.splitClassNameAndType(n);this.classes.get(i).parent=e,this.namespaces.get(e).classes.set(i,this.classes.get(i))}}setCssStyle(e,r){let n=this.classes.get(e);if(!(!r||!n))for(let i of r)i.includes(",")?n.styles.push(...i.split(",")):n.styles.push(i)}getArrowMarker(e){let r;switch(e){case 0:r="aggregation";break;case 1:r="extension";break;case 2:r="composition";break;case 3:r="dependency";break;case 4:r="lollipop";break;default:r="none"}return r}getData(){let e=[],r=[],n=Fe();for(let a of this.namespaces.keys()){let s=this.namespaces.get(a);if(s){let o={id:s.id,label:s.id,isGroup:!0,padding:n.class.padding??16,shape:"rect",cssStyles:["fill: none","stroke: black"],look:n.look};e.push(o)}}for(let a of this.classes.keys()){let s=this.classes.get(a);if(s){let o=s;o.parentId=s.parent,o.look=n.look,e.push(o)}}let i=0;for(let a of this.notes){i++;let s={id:a.id,label:a.text,isGroup:!1,shape:"note",padding:n.class.padding??6,cssStyles:["text-align: left","white-space: nowrap",`fill: ${n.themeVariables.noteBkgColor}`,`stroke: ${n.themeVariables.noteBorderColor}`],look:n.look};e.push(s);let o=this.classes.get(a.class)?.id??"";if(o){let l={id:`edgeNote${i}`,start:a.id,end:o,type:"normal",thickness:"normal",classes:"relation",arrowTypeStart:"none",arrowTypeEnd:"none",arrowheadStyle:"",labelStyle:[""],style:["fill: none"],pattern:"dotted",look:n.look};r.push(l)}}for(let a of this.interfaces){let s={id:a.id,label:a.label,isGroup:!1,shape:"rect",cssStyles:["opacity: 0;"],look:n.look};e.push(s)}i=0;for(let a of this.relations){i++;let s={id:Sd(a.id1,a.id2,{prefix:"id",counter:i}),start:a.id1,end:a.id2,type:"normal",label:a.title,labelpos:"c",thickness:"normal",classes:"relation",arrowTypeStart:this.getArrowMarker(a.relation.type1),arrowTypeEnd:this.getArrowMarker(a.relation.type2),startLabelRight:a.relationTitle1==="none"?"":a.relationTitle1,endLabelLeft:a.relationTitle2==="none"?"":a.relationTitle2,arrowheadStyle:"",labelStyle:["display: inline-block"],style:a.style||"",pattern:a.relation.lineType==1?"dashed":"solid",look:n.look};r.push(s)}return{nodes:e,edges:r,other:{},config:n,direction:this.getDirection()}}},b($4,"ClassDB"),$4),C6t=b(t=>`g.classGroup text { fill: ${t.nodeBorder||t.classText}; stroke: none; font-family: ${t.fontFamily}; @@ -1521,12 +1777,12 @@ g.classGroup line { font-size: 18px; fill: ${t.textColor}; } -`,"getStyles"),h9=jxt,Kxt=x((t,e="TB")=>{if(!t.doc)return e;let r=e;for(let n of t.doc)n.stmt==="dir"&&(r=n.value);return r},"getDir"),Zxt=x(function(t,e){return e.db.getClasses()},"getClasses"),Qxt=x(async function(t,e,r,n){te.info("REF0:"),te.info("Drawing class diagram (v3)",e);let{securityLevel:a,state:i,layout:s}=Te(),o=n.db.getData(),l=xc(e,a);o.type=n.type,o.layoutAlgorithm=Rd(s),o.nodeSpacing=i?.nodeSpacing||50,o.rankSpacing=i?.rankSpacing||50,o.markers=["aggregation","extension","composition","dependency","lollipop"],o.diagramId=e,await pc(o,l);let u=8;Wt.insertTitle(l,"classDiagramTitleText",i?.titleTopMargin??25,n.db.getDiagramTitle()),bc(l,u,"classDiagram",i?.useMaxWidth??!0)},"draw"),f9={getClasses:Zxt,draw:Qxt,getDir:Kxt}});var LSe={};lr(LSe,{diagram:()=>Jxt});var Jxt,RSe=A(()=>{Iq();wc();su();au();sl();Fo();eo();Mo();Fi();ln();ur();Jxt={parser:u9,get db(){return new c9},renderer:f9,styles:h9,init:x(t=>{t.class||(t.class={}),t.class.arrowMarkerAbsolute=t.arrowMarkerAbsolute},"init")}});var ISe={};lr(ISe,{diagram:()=>ebt});var ebt,DSe=A(()=>{Iq();wc();su();au();sl();Fo();eo();Mo();Fi();ln();ur();ebt={parser:u9,get db(){return new c9},renderer:f9,styles:h9,init:x(t=>{t.class||(t.class={}),t.class.arrowMarkerAbsolute=t.arrowMarkerAbsolute},"init")}});function g9(t="",e=0,r="",n=Fq){let a=r!==null&&r.length>0?`${n}${r}`:"";return`${xbt}-${t}${a}-${e}`}function i6(t,e,r){if(!e.id||e.id===""||e.id==="")return;e.cssClasses&&(Array.isArray(e.cssCompiledStyles)||(e.cssCompiledStyles=[]),e.cssClasses.split(" ").forEach(a=>{if(r.get(a)){let i=r.get(a);e.cssCompiledStyles=[...e.cssCompiledStyles,...i.styles]}}));let n=t.find(a=>a.id===e.id);n?Object.assign(n,e):t.push(e)}function r_e(t){return t?.classes?.join(" ")??""}function n_e(t){return t?.styles??[]}function Bq(){return new Map}var Mq,v9,tbt,VSe,NSe,p9,Oq,rbt,nbt,abt,o6,HSe,WSe,YSe,XSe,jSe,KSe,Dq,Nq,ibt,sbt,MSe,OSe,obt,lbt,l6,ubt,cbt,ZSe,hbt,fbt,dbt,pbt,mbt,gbt,vbt,ybt,QSe,JSe,xbt,Fq,bbt,PSe,e_e,wbt,kbt,t_e,m9,A0,Tbt,BSe,s6,Ebt,Pq,FSe,zSe,$Se,GSe,USe,Cbt,Sbt,qSe,d9,jm,mf,_bt,y9,zq=A(()=>{wc();su();ln();ur();Mq=(function(){var t=x(function(B,F,G,z){for(G=G||{},z=B.length;z--;G[B[z]]=F);return G},"o"),e=[1,2],r=[1,3],n=[1,4],a=[2,4],i=[1,9],s=[1,11],o=[1,16],l=[1,17],u=[1,18],h=[1,19],f=[1,32],d=[1,20],p=[1,21],m=[1,22],g=[1,23],v=[1,24],y=[1,26],b=[1,27],w=[1,28],C=[1,29],k=[1,30],E=[1,31],_=[1,34],S=[1,35],L=[1,36],M=[1,37],D=[1,33],T=[1,4,5,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,42,45,48,49,50,51,54],I=[1,4,5,14,15,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,42,45,48,49,50,51,54],N=[4,5,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,42,45,48,49,50,51,54],O={trace:x(function(){},"trace"),yy:{},symbols_:{error:2,start:3,SPACE:4,NL:5,SD:6,document:7,line:8,statement:9,classDefStatement:10,styleStatement:11,cssClassStatement:12,idStatement:13,DESCR:14,"-->":15,HIDE_EMPTY:16,scale:17,WIDTH:18,COMPOSIT_STATE:19,STRUCT_START:20,STRUCT_STOP:21,STATE_DESCR:22,AS:23,ID:24,FORK:25,JOIN:26,CHOICE:27,CONCURRENT:28,note:29,notePosition:30,NOTE_TEXT:31,direction:32,acc_title:33,acc_title_value:34,acc_descr:35,acc_descr_value:36,acc_descr_multiline_value:37,classDef:38,CLASSDEF_ID:39,CLASSDEF_STYLEOPTS:40,DEFAULT:41,style:42,STYLE_IDS:43,STYLEDEF_STYLEOPTS:44,class:45,CLASSENTITY_IDS:46,STYLECLASS:47,direction_tb:48,direction_bt:49,direction_rl:50,direction_lr:51,eol:52,";":53,EDGE_STATE:54,STYLE_SEPARATOR:55,left_of:56,right_of:57,$accept:0,$end:1},terminals_:{2:"error",4:"SPACE",5:"NL",6:"SD",14:"DESCR",15:"-->",16:"HIDE_EMPTY",17:"scale",18:"WIDTH",19:"COMPOSIT_STATE",20:"STRUCT_START",21:"STRUCT_STOP",22:"STATE_DESCR",23:"AS",24:"ID",25:"FORK",26:"JOIN",27:"CHOICE",28:"CONCURRENT",29:"note",31:"NOTE_TEXT",33:"acc_title",34:"acc_title_value",35:"acc_descr",36:"acc_descr_value",37:"acc_descr_multiline_value",38:"classDef",39:"CLASSDEF_ID",40:"CLASSDEF_STYLEOPTS",41:"DEFAULT",42:"style",43:"STYLE_IDS",44:"STYLEDEF_STYLEOPTS",45:"class",46:"CLASSENTITY_IDS",47:"STYLECLASS",48:"direction_tb",49:"direction_bt",50:"direction_rl",51:"direction_lr",53:";",54:"EDGE_STATE",55:"STYLE_SEPARATOR",56:"left_of",57:"right_of"},productions_:[0,[3,2],[3,2],[3,2],[7,0],[7,2],[8,2],[8,1],[8,1],[9,1],[9,1],[9,1],[9,1],[9,2],[9,3],[9,4],[9,1],[9,2],[9,1],[9,4],[9,3],[9,6],[9,1],[9,1],[9,1],[9,1],[9,4],[9,4],[9,1],[9,2],[9,2],[9,1],[10,3],[10,3],[11,3],[12,3],[32,1],[32,1],[32,1],[32,1],[52,1],[52,1],[13,1],[13,1],[13,3],[13,3],[30,1],[30,1]],performAction:x(function(F,G,z,H,Q,Y,ie){var se=Y.length-1;switch(Q){case 3:return H.setRootDoc(Y[se]),Y[se];break;case 4:this.$=[];break;case 5:Y[se]!="nl"&&(Y[se-1].push(Y[se]),this.$=Y[se-1]);break;case 6:case 7:this.$=Y[se];break;case 8:this.$="nl";break;case 12:this.$=Y[se];break;case 13:let j=Y[se-1];j.description=H.trimColon(Y[se]),this.$=j;break;case 14:this.$={stmt:"relation",state1:Y[se-2],state2:Y[se]};break;case 15:let Z=H.trimColon(Y[se]);this.$={stmt:"relation",state1:Y[se-3],state2:Y[se-1],description:Z};break;case 19:this.$={stmt:"state",id:Y[se-3],type:"default",description:"",doc:Y[se-1]};break;case 20:var oe=Y[se],pe=Y[se-2].trim();if(Y[se].match(":")){var J=Y[se].split(":");oe=J[0],pe=[pe,J[1]]}this.$={stmt:"state",id:oe,type:"default",description:pe};break;case 21:this.$={stmt:"state",id:Y[se-3],type:"default",description:Y[se-5],doc:Y[se-1]};break;case 22:this.$={stmt:"state",id:Y[se],type:"fork"};break;case 23:this.$={stmt:"state",id:Y[se],type:"join"};break;case 24:this.$={stmt:"state",id:Y[se],type:"choice"};break;case 25:this.$={stmt:"state",id:H.getDividerId(),type:"divider"};break;case 26:this.$={stmt:"state",id:Y[se-1].trim(),note:{position:Y[se-2].trim(),text:Y[se].trim()}};break;case 29:this.$=Y[se].trim(),H.setAccTitle(this.$);break;case 30:case 31:this.$=Y[se].trim(),H.setAccDescription(this.$);break;case 32:case 33:this.$={stmt:"classDef",id:Y[se-1].trim(),classes:Y[se].trim()};break;case 34:this.$={stmt:"style",id:Y[se-1].trim(),styleClass:Y[se].trim()};break;case 35:this.$={stmt:"applyClass",id:Y[se-1].trim(),styleClass:Y[se].trim()};break;case 36:H.setDirection("TB"),this.$={stmt:"dir",value:"TB"};break;case 37:H.setDirection("BT"),this.$={stmt:"dir",value:"BT"};break;case 38:H.setDirection("RL"),this.$={stmt:"dir",value:"RL"};break;case 39:H.setDirection("LR"),this.$={stmt:"dir",value:"LR"};break;case 42:case 43:this.$={stmt:"state",id:Y[se].trim(),type:"default",description:""};break;case 44:this.$={stmt:"state",id:Y[se-2].trim(),classes:[Y[se].trim()],type:"default",description:""};break;case 45:this.$={stmt:"state",id:Y[se-2].trim(),classes:[Y[se].trim()],type:"default",description:""};break}},"anonymous"),table:[{3:1,4:e,5:r,6:n},{1:[3]},{3:5,4:e,5:r,6:n},{3:6,4:e,5:r,6:n},t([1,4,5,16,17,19,22,24,25,26,27,28,29,33,35,37,38,42,45,48,49,50,51,54],a,{7:7}),{1:[2,1]},{1:[2,2]},{1:[2,3],4:i,5:s,8:8,9:10,10:12,11:13,12:14,13:15,16:o,17:l,19:u,22:h,24:f,25:d,26:p,27:m,28:g,29:v,32:25,33:y,35:b,37:w,38:C,42:k,45:E,48:_,49:S,50:L,51:M,54:D},t(T,[2,5]),{9:38,10:12,11:13,12:14,13:15,16:o,17:l,19:u,22:h,24:f,25:d,26:p,27:m,28:g,29:v,32:25,33:y,35:b,37:w,38:C,42:k,45:E,48:_,49:S,50:L,51:M,54:D},t(T,[2,7]),t(T,[2,8]),t(T,[2,9]),t(T,[2,10]),t(T,[2,11]),t(T,[2,12],{14:[1,39],15:[1,40]}),t(T,[2,16]),{18:[1,41]},t(T,[2,18],{20:[1,42]}),{23:[1,43]},t(T,[2,22]),t(T,[2,23]),t(T,[2,24]),t(T,[2,25]),{30:44,31:[1,45],56:[1,46],57:[1,47]},t(T,[2,28]),{34:[1,48]},{36:[1,49]},t(T,[2,31]),{39:[1,50],41:[1,51]},{43:[1,52]},{46:[1,53]},t(I,[2,42],{55:[1,54]}),t(I,[2,43],{55:[1,55]}),t(T,[2,36]),t(T,[2,37]),t(T,[2,38]),t(T,[2,39]),t(T,[2,6]),t(T,[2,13]),{13:56,24:f,54:D},t(T,[2,17]),t(N,a,{7:57}),{24:[1,58]},{24:[1,59]},{23:[1,60]},{24:[2,46]},{24:[2,47]},t(T,[2,29]),t(T,[2,30]),{40:[1,61]},{40:[1,62]},{44:[1,63]},{47:[1,64]},{24:[1,65]},{24:[1,66]},t(T,[2,14],{14:[1,67]}),{4:i,5:s,8:8,9:10,10:12,11:13,12:14,13:15,16:o,17:l,19:u,21:[1,68],22:h,24:f,25:d,26:p,27:m,28:g,29:v,32:25,33:y,35:b,37:w,38:C,42:k,45:E,48:_,49:S,50:L,51:M,54:D},t(T,[2,20],{20:[1,69]}),{31:[1,70]},{24:[1,71]},t(T,[2,32]),t(T,[2,33]),t(T,[2,34]),t(T,[2,35]),t(I,[2,44]),t(I,[2,45]),t(T,[2,15]),t(T,[2,19]),t(N,a,{7:72}),t(T,[2,26]),t(T,[2,27]),{4:i,5:s,8:8,9:10,10:12,11:13,12:14,13:15,16:o,17:l,19:u,21:[1,73],22:h,24:f,25:d,26:p,27:m,28:g,29:v,32:25,33:y,35:b,37:w,38:C,42:k,45:E,48:_,49:S,50:L,51:M,54:D},t(T,[2,21])],defaultActions:{5:[2,1],6:[2,2],46:[2,46],47:[2,47]},parseError:x(function(F,G){if(G.recoverable)this.trace(F);else{var z=new Error(F);throw z.hash=G,z}},"parseError"),parse:x(function(F){var G=this,z=[0],H=[],Q=[null],Y=[],ie=this.table,se="",oe=0,pe=0,J=0,j=2,Z=1,K=Y.slice.call(arguments,1),X=Object.create(this.lexer),ae={yy:{}};for(var W in this.yy)Object.prototype.hasOwnProperty.call(this.yy,W)&&(ae.yy[W]=this.yy[W]);X.setInput(F,ae.yy),ae.yy.lexer=X,ae.yy.parser=this,typeof X.yylloc>"u"&&(X.yylloc={});var Se=X.yylloc;Y.push(Se);var ne=X.options&&X.options.ranges;typeof ae.yy.parseError=="function"?this.parseError=ae.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function ee(le){z.length=z.length-2*le,Q.length=Q.length-le,Y.length=Y.length-le}x(ee,"popStack");function $e(){var le;return le=H.pop()||X.lex()||Z,typeof le!="number"&&(le instanceof Array&&(H=le,le=H.pop()),le=G.symbols_[le]||le),le}x($e,"lex");for(var me,Ie,Ue,Fe,Ae,Me,ke={},ve,_e,fe,ue;;){if(Ue=z[z.length-1],this.defaultActions[Ue]?Fe=this.defaultActions[Ue]:((me===null||typeof me>"u")&&(me=$e()),Fe=ie[Ue]&&ie[Ue][me]),typeof Fe>"u"||!Fe.length||!Fe[0]){var $="";ue=[];for(ve in ie[Ue])this.terminals_[ve]&&ve>j&&ue.push("'"+this.terminals_[ve]+"'");X.showPosition?$="Parse error on line "+(oe+1)+`: -`+X.showPosition()+` -Expecting `+ue.join(", ")+", got '"+(this.terminals_[me]||me)+"'":$="Parse error on line "+(oe+1)+": Unexpected "+(me==Z?"end of input":"'"+(this.terminals_[me]||me)+"'"),this.parseError($,{text:X.match,token:this.terminals_[me]||me,line:X.yylineno,loc:Se,expected:ue})}if(Fe[0]instanceof Array&&Fe.length>1)throw new Error("Parse Error: multiple actions possible at state: "+Ue+", token: "+me);switch(Fe[0]){case 1:z.push(me),Q.push(X.yytext),Y.push(X.yylloc),z.push(Fe[1]),me=null,Ie?(me=Ie,Ie=null):(pe=X.yyleng,se=X.yytext,oe=X.yylineno,Se=X.yylloc,J>0&&J--);break;case 2:if(_e=this.productions_[Fe[1]][1],ke.$=Q[Q.length-_e],ke._$={first_line:Y[Y.length-(_e||1)].first_line,last_line:Y[Y.length-1].last_line,first_column:Y[Y.length-(_e||1)].first_column,last_column:Y[Y.length-1].last_column},ne&&(ke._$.range=[Y[Y.length-(_e||1)].range[0],Y[Y.length-1].range[1]]),Me=this.performAction.apply(ke,[se,pe,oe,ae.yy,Fe[1],Q,Y].concat(K)),typeof Me<"u")return Me;_e&&(z=z.slice(0,-1*_e*2),Q=Q.slice(0,-1*_e),Y=Y.slice(0,-1*_e)),z.push(this.productions_[Fe[1]][0]),Q.push(ke.$),Y.push(ke._$),fe=ie[z[z.length-2]][z[z.length-1]],z.push(fe);break;case 3:return!0}}return!0},"parse")},R=(function(){var B={EOF:1,parseError:x(function(G,z){if(this.yy.parser)this.yy.parser.parseError(G,z);else throw new Error(G)},"parseError"),setInput:x(function(F,G){return this.yy=G||this.yy||{},this._input=F,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:x(function(){var F=this._input[0];this.yytext+=F,this.yyleng++,this.offset++,this.match+=F,this.matched+=F;var G=F.match(/(?:\r\n?|\n).*/g);return G?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),F},"input"),unput:x(function(F){var G=F.length,z=F.split(/(?:\r\n?|\n)/g);this._input=F+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-G),this.offset-=G;var H=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),z.length-1&&(this.yylineno-=z.length-1);var Q=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:z?(z.length===H.length?this.yylloc.first_column:0)+H[H.length-z.length].length-z[0].length:this.yylloc.first_column-G},this.options.ranges&&(this.yylloc.range=[Q[0],Q[0]+this.yyleng-G]),this.yyleng=this.yytext.length,this},"unput"),more:x(function(){return this._more=!0,this},"more"),reject:x(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). -`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:x(function(F){this.unput(this.match.slice(F))},"less"),pastInput:x(function(){var F=this.matched.substr(0,this.matched.length-this.match.length);return(F.length>20?"...":"")+F.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:x(function(){var F=this.match;return F.length<20&&(F+=this._input.substr(0,20-F.length)),(F.substr(0,20)+(F.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:x(function(){var F=this.pastInput(),G=new Array(F.length+1).join("-");return F+this.upcomingInput()+` -`+G+"^"},"showPosition"),test_match:x(function(F,G){var z,H,Q;if(this.options.backtrack_lexer&&(Q={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(Q.yylloc.range=this.yylloc.range.slice(0))),H=F[0].match(/(?:\r\n?|\n).*/g),H&&(this.yylineno+=H.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:H?H[H.length-1].length-H[H.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+F[0].length},this.yytext+=F[0],this.match+=F[0],this.matches=F,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(F[0].length),this.matched+=F[0],z=this.performAction.call(this,this.yy,this,G,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),z)return z;if(this._backtrack){for(var Y in Q)this[Y]=Q[Y];return!1}return!1},"test_match"),next:x(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var F,G,z,H;this._more||(this.yytext="",this.match="");for(var Q=this._currentRules(),Y=0;YG[0].length)){if(G=z,H=Y,this.options.backtrack_lexer){if(F=this.test_match(z,Q[Y]),F!==!1)return F;if(this._backtrack){G=!1;continue}else return!1}else if(!this.options.flex)break}return G?(F=this.test_match(G,Q[H]),F!==!1?F:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. -`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:x(function(){var G=this.next();return G||this.lex()},"lex"),begin:x(function(G){this.conditionStack.push(G)},"begin"),popState:x(function(){var G=this.conditionStack.length-1;return G>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:x(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:x(function(G){return G=this.conditionStack.length-1-Math.abs(G||0),G>=0?this.conditionStack[G]:"INITIAL"},"topState"),pushState:x(function(G){this.begin(G)},"pushState"),stateStackSize:x(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:x(function(G,z,H,Q){var Y=Q;switch(H){case 0:return 41;case 1:return 48;case 2:return 49;case 3:return 50;case 4:return 51;case 5:break;case 6:break;case 7:return 5;case 8:break;case 9:break;case 10:break;case 11:break;case 12:return this.pushState("SCALE"),17;break;case 13:return 18;case 14:this.popState();break;case 15:return this.begin("acc_title"),33;break;case 16:return this.popState(),"acc_title_value";break;case 17:return this.begin("acc_descr"),35;break;case 18:return this.popState(),"acc_descr_value";break;case 19:this.begin("acc_descr_multiline");break;case 20:this.popState();break;case 21:return"acc_descr_multiline_value";case 22:return this.pushState("CLASSDEF"),38;break;case 23:return this.popState(),this.pushState("CLASSDEFID"),"DEFAULT_CLASSDEF_ID";break;case 24:return this.popState(),this.pushState("CLASSDEFID"),39;break;case 25:return this.popState(),40;break;case 26:return this.pushState("CLASS"),45;break;case 27:return this.popState(),this.pushState("CLASS_STYLE"),46;break;case 28:return this.popState(),47;break;case 29:return this.pushState("STYLE"),42;break;case 30:return this.popState(),this.pushState("STYLEDEF_STYLES"),43;break;case 31:return this.popState(),44;break;case 32:return this.pushState("SCALE"),17;break;case 33:return 18;case 34:this.popState();break;case 35:this.pushState("STATE");break;case 36:return this.popState(),z.yytext=z.yytext.slice(0,-8).trim(),25;break;case 37:return this.popState(),z.yytext=z.yytext.slice(0,-8).trim(),26;break;case 38:return this.popState(),z.yytext=z.yytext.slice(0,-10).trim(),27;break;case 39:return this.popState(),z.yytext=z.yytext.slice(0,-8).trim(),25;break;case 40:return this.popState(),z.yytext=z.yytext.slice(0,-8).trim(),26;break;case 41:return this.popState(),z.yytext=z.yytext.slice(0,-10).trim(),27;break;case 42:return 48;case 43:return 49;case 44:return 50;case 45:return 51;case 46:this.pushState("STATE_STRING");break;case 47:return this.pushState("STATE_ID"),"AS";break;case 48:return this.popState(),"ID";break;case 49:this.popState();break;case 50:return"STATE_DESCR";case 51:return 19;case 52:this.popState();break;case 53:return this.popState(),this.pushState("struct"),20;break;case 54:break;case 55:return this.popState(),21;break;case 56:break;case 57:return this.begin("NOTE"),29;break;case 58:return this.popState(),this.pushState("NOTE_ID"),56;break;case 59:return this.popState(),this.pushState("NOTE_ID"),57;break;case 60:this.popState(),this.pushState("FLOATING_NOTE");break;case 61:return this.popState(),this.pushState("FLOATING_NOTE_ID"),"AS";break;case 62:break;case 63:return"NOTE_TEXT";case 64:return this.popState(),"ID";break;case 65:return this.popState(),this.pushState("NOTE_TEXT"),24;break;case 66:return this.popState(),z.yytext=z.yytext.substr(2).trim(),31;break;case 67:return this.popState(),z.yytext=z.yytext.slice(0,-8).trim(),31;break;case 68:return 6;case 69:return 6;case 70:return 16;case 71:return 54;case 72:return 24;case 73:return z.yytext=z.yytext.trim(),14;break;case 74:return 15;case 75:return 28;case 76:return 55;case 77:return 5;case 78:return"INVALID"}},"anonymous"),rules:[/^(?:default\b)/i,/^(?:.*direction\s+TB[^\n]*)/i,/^(?:.*direction\s+BT[^\n]*)/i,/^(?:.*direction\s+RL[^\n]*)/i,/^(?:.*direction\s+LR[^\n]*)/i,/^(?:%%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n]+)/i,/^(?:[\s]+)/i,/^(?:((?!\n)\s)+)/i,/^(?:#[^\n]*)/i,/^(?:%[^\n]*)/i,/^(?:scale\s+)/i,/^(?:\d+)/i,/^(?:\s+width\b)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:classDef\s+)/i,/^(?:DEFAULT\s+)/i,/^(?:\w+\s+)/i,/^(?:[^\n]*)/i,/^(?:class\s+)/i,/^(?:(\w+)+((,\s*\w+)*))/i,/^(?:[^\n]*)/i,/^(?:style\s+)/i,/^(?:[\w,]+\s+)/i,/^(?:[^\n]*)/i,/^(?:scale\s+)/i,/^(?:\d+)/i,/^(?:\s+width\b)/i,/^(?:state\s+)/i,/^(?:.*<>)/i,/^(?:.*<>)/i,/^(?:.*<>)/i,/^(?:.*\[\[fork\]\])/i,/^(?:.*\[\[join\]\])/i,/^(?:.*\[\[choice\]\])/i,/^(?:.*direction\s+TB[^\n]*)/i,/^(?:.*direction\s+BT[^\n]*)/i,/^(?:.*direction\s+RL[^\n]*)/i,/^(?:.*direction\s+LR[^\n]*)/i,/^(?:["])/i,/^(?:\s*as\s+)/i,/^(?:[^\n\{]*)/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[^\n\s\{]+)/i,/^(?:\n)/i,/^(?:\{)/i,/^(?:%%(?!\{)[^\n]*)/i,/^(?:\})/i,/^(?:[\n])/i,/^(?:note\s+)/i,/^(?:left of\b)/i,/^(?:right of\b)/i,/^(?:")/i,/^(?:\s*as\s*)/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[^\n]*)/i,/^(?:\s*[^:\n\s\-]+)/i,/^(?:\s*:[^:\n;]+)/i,/^(?:[\s\S]*?end note\b)/i,/^(?:stateDiagram\s+)/i,/^(?:stateDiagram-v2\s+)/i,/^(?:hide empty description\b)/i,/^(?:\[\*\])/i,/^(?:[^:\n\s\-\{]+)/i,/^(?:\s*:[^:\n;]+)/i,/^(?:-->)/i,/^(?:--)/i,/^(?::::)/i,/^(?:$)/i,/^(?:.)/i],conditions:{LINE:{rules:[9,10],inclusive:!1},struct:{rules:[9,10,22,26,29,35,42,43,44,45,54,55,56,57,71,72,73,74,75],inclusive:!1},FLOATING_NOTE_ID:{rules:[64],inclusive:!1},FLOATING_NOTE:{rules:[61,62,63],inclusive:!1},NOTE_TEXT:{rules:[66,67],inclusive:!1},NOTE_ID:{rules:[65],inclusive:!1},NOTE:{rules:[58,59,60],inclusive:!1},STYLEDEF_STYLEOPTS:{rules:[],inclusive:!1},STYLEDEF_STYLES:{rules:[31],inclusive:!1},STYLE_IDS:{rules:[],inclusive:!1},STYLE:{rules:[30],inclusive:!1},CLASS_STYLE:{rules:[28],inclusive:!1},CLASS:{rules:[27],inclusive:!1},CLASSDEFID:{rules:[25],inclusive:!1},CLASSDEF:{rules:[23,24],inclusive:!1},acc_descr_multiline:{rules:[20,21],inclusive:!1},acc_descr:{rules:[18],inclusive:!1},acc_title:{rules:[16],inclusive:!1},SCALE:{rules:[13,14,33,34],inclusive:!1},ALIAS:{rules:[],inclusive:!1},STATE_ID:{rules:[48],inclusive:!1},STATE_STRING:{rules:[49,50],inclusive:!1},FORK_STATE:{rules:[],inclusive:!1},STATE:{rules:[9,10,36,37,38,39,40,41,46,47,51,52,53],inclusive:!1},ID:{rules:[9,10],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,8,10,11,12,15,17,19,22,26,29,32,35,53,57,68,69,70,71,72,73,74,76,77,78],inclusive:!0}}};return B})();O.lexer=R;function P(){this.yy={}}return x(P,"Parser"),P.prototype=O,O.Parser=P,new P})();Mq.parser=Mq;v9=Mq,tbt="TB",VSe="TB",NSe="dir",p9="state",Oq="relation",rbt="classDef",nbt="style",abt="applyClass",o6="default",HSe="divider",WSe="fill:none",YSe="fill: #333",XSe="c",jSe="text",KSe="normal",Dq="rect",Nq="rectWithTitle",ibt="stateStart",sbt="stateEnd",MSe="divider",OSe="roundedWithTitle",obt="note",lbt="noteGroup",l6="statediagram",ubt="state",cbt=`${l6}-${ubt}`,ZSe="transition",hbt="note",fbt="note-edge",dbt=`${ZSe} ${fbt}`,pbt=`${l6}-${hbt}`,mbt="cluster",gbt=`${l6}-${mbt}`,vbt="cluster-alt",ybt=`${l6}-${vbt}`,QSe="parent",JSe="note",xbt="state",Fq="----",bbt=`${Fq}${JSe}`,PSe=`${Fq}${QSe}`,e_e=x((t,e=VSe)=>{if(!t.doc)return e;let r=e;for(let n of t.doc)n.stmt==="dir"&&(r=n.value);return r},"getDir"),wbt=x(function(t,e){return e.db.getClasses()},"getClasses"),kbt=x(async function(t,e,r,n){te.info("REF0:"),te.info("Drawing state diagram (v2)",e);let{securityLevel:a,state:i,layout:s}=Te();n.db.extract(n.db.getRootDocV2());let o=n.db.getData(),l=xc(e,a);o.type=n.type,o.layoutAlgorithm=s,o.nodeSpacing=i?.nodeSpacing||50,o.rankSpacing=i?.rankSpacing||50,o.markers=["barb"],o.diagramId=e,await pc(o,l);let u=8;Wt.insertTitle(l,"statediagramTitleText",i?.titleTopMargin??25,n.db.getDiagramTitle()),bc(l,u,l6,i?.useMaxWidth??!0)},"draw"),t_e={getClasses:wbt,draw:kbt,getDir:e_e},m9=new Map,A0=0;x(g9,"stateDomId");Tbt=x((t,e,r,n,a,i,s,o)=>{te.trace("items",e),e.forEach(l=>{switch(l.stmt){case p9:s6(t,l,r,n,a,i,s,o);break;case o6:s6(t,l,r,n,a,i,s,o);break;case Oq:{s6(t,l.state1,r,n,a,i,s,o),s6(t,l.state2,r,n,a,i,s,o);let u={id:"edge"+A0,start:l.state1.id,end:l.state2.id,arrowhead:"normal",arrowTypeEnd:"arrow_barb",style:WSe,labelStyle:"",label:Ze.sanitizeText(l.description,Te()),arrowheadStyle:YSe,labelpos:XSe,labelType:jSe,thickness:KSe,classes:ZSe,look:s};a.push(u),A0++}break}})},"setupDoc"),BSe=x((t,e=VSe)=>{let r=e;if(t.doc)for(let n of t.doc)n.stmt==="dir"&&(r=n.value);return r},"getDir");x(i6,"insertOrUpdateNode");x(r_e,"getClassesFromDbInfo");x(n_e,"getStylesFromDbInfo");s6=x((t,e,r,n,a,i,s,o)=>{let l=e.id,u=r.get(l),h=r_e(u),f=n_e(u);if(te.info("dataFetcher parsedItem",e,u,f),l!=="root"){let d=Dq;e.start===!0?d=ibt:e.start===!1&&(d=sbt),e.type!==o6&&(d=e.type),m9.get(l)||m9.set(l,{id:l,shape:d,description:Ze.sanitizeText(l,Te()),cssClasses:`${h} ${cbt}`,cssStyles:f});let p=m9.get(l);e.description&&(Array.isArray(p.description)?(p.shape=Nq,p.description.push(e.description)):p.description?.length>0?(p.shape=Nq,p.description===l?p.description=[e.description]:p.description=[p.description,e.description]):(p.shape=Dq,p.description=e.description),p.description=Ze.sanitizeTextOrArray(p.description,Te())),p.description?.length===1&&p.shape===Nq&&(p.type==="group"?p.shape=OSe:p.shape=Dq),!p.type&&e.doc&&(te.info("Setting cluster for XCX",l,BSe(e)),p.type="group",p.isGroup=!0,p.dir=BSe(e),p.shape=e.type===HSe?MSe:OSe,p.cssClasses=`${p.cssClasses} ${gbt} ${i?ybt:""}`);let m={labelStyle:"",shape:p.shape,label:p.description,cssClasses:p.cssClasses,cssCompiledStyles:[],cssStyles:p.cssStyles,id:l,dir:p.dir,domId:g9(l,A0),type:p.type,isGroup:p.type==="group",padding:8,rx:10,ry:10,look:s};if(m.shape===MSe&&(m.label=""),t&&t.id!=="root"&&(te.trace("Setting node ",l," to be child of its parent ",t.id),m.parentId=t.id),m.centerLabel=!0,e.note){let g={labelStyle:"",shape:obt,label:e.note.text,cssClasses:pbt,cssStyles:[],cssCompilesStyles:[],id:l+bbt+"-"+A0,domId:g9(l,A0,JSe),type:p.type,isGroup:p.type==="group",padding:Te().flowchart.padding,look:s,position:e.note.position},v=l+PSe,y={labelStyle:"",shape:lbt,label:e.note.text,cssClasses:p.cssClasses,cssStyles:[],id:l+PSe,domId:g9(l,A0,QSe),type:"group",isGroup:!0,padding:16,look:s,position:e.note.position};A0++,y.id=v,g.parentId=v,i6(n,y,o),i6(n,g,o),i6(n,m,o);let b=l,w=g.id;e.note.position==="left of"&&(b=g.id,w=l),a.push({id:b+"-"+w,start:b,end:w,arrowhead:"none",arrowTypeEnd:"",style:WSe,labelStyle:"",classes:dbt,arrowheadStyle:YSe,labelpos:XSe,labelType:jSe,thickness:KSe,look:s})}else i6(n,m,o)}e.doc&&(te.trace("Adding nodes children "),Tbt(e,e.doc,r,n,a,!i,s,o))},"dataFetcher"),Ebt=x(()=>{m9.clear(),A0=0},"reset"),Pq="[*]",FSe="start",zSe=Pq,$Se="end",GSe="color",USe="fill",Cbt="bgFill",Sbt=",";x(Bq,"newClassesList");qSe=x(()=>({relations:[],states:new Map,documents:{}}),"newDoc"),d9=x(t=>JSON.parse(JSON.stringify(t)),"clone"),mf=(jm=class{constructor(e){this.clear(),this.version=e,this.setRootDoc=this.setRootDoc.bind(this),this.getDividerId=this.getDividerId.bind(this),this.setDirection=this.setDirection.bind(this),this.trimColon=this.trimColon.bind(this)}version;nodes=[];edges=[];rootDoc=[];classes=Bq();documents={root:qSe()};currentDocument=this.documents.root;startEndCount=0;dividerCnt=0;setRootDoc(e){te.info("Setting root doc",e),this.rootDoc=e,this.version===1?this.extract(e):this.extract(this.getRootDocV2())}getRootDoc(){return this.rootDoc}docTranslator(e,r,n){if(r.stmt===Oq)this.docTranslator(e,r.state1,!0),this.docTranslator(e,r.state2,!1);else if(r.stmt===p9&&(r.id==="[*]"?(r.id=n?e.id+"_start":e.id+"_end",r.start=n):r.id=r.id.trim()),r.doc){let a=[],i=[],s;for(s=0;s0&&i.length>0){let o={stmt:p9,id:$O(),type:"divider",doc:d9(i)};a.push(d9(o)),r.doc=a}r.doc.forEach(o=>this.docTranslator(r,o,!0))}}getRootDocV2(){return this.docTranslator({id:"root"},{id:"root",doc:this.rootDoc},!0),{id:"root",doc:this.rootDoc}}extract(e){let r;e.doc?r=e.doc:r=e,te.info(r),this.clear(!0),te.info("Extract initial document:",r),r.forEach(s=>{switch(te.warn("Statement",s.stmt),s.stmt){case p9:this.addState(s.id.trim(),s.type,s.doc,s.description,s.note,s.classes,s.styles,s.textStyles);break;case Oq:this.addRelation(s.state1,s.state2,s.description);break;case rbt:this.addStyleClass(s.id.trim(),s.classes);break;case nbt:{let o=s.id.trim().split(","),l=s.styleClass.split(",");o.forEach(u=>{let h=this.getState(u);if(h===void 0){let f=u.trim();this.addState(f),h=this.getState(f)}h.styles=l.map(f=>f.replace(/;/g,"")?.trim())})}break;case abt:this.setCssClass(s.id.trim(),s.styleClass);break}});let n=this.getStates(),i=Te().look;Ebt(),s6(void 0,this.getRootDocV2(),n,this.nodes,this.edges,!0,i,this.classes),this.nodes.forEach(s=>{if(Array.isArray(s.label)){if(s.description=s.label.slice(1),s.isGroup&&s.description.length>0)throw new Error("Group nodes can only have label. Remove the additional description for node ["+s.id+"]");s.label=s.label[0]}})}addState(e,r=o6,n=null,a=null,i=null,s=null,o=null,l=null){let u=e?.trim();if(this.currentDocument.states.has(u)?(this.currentDocument.states.get(u).doc||(this.currentDocument.states.get(u).doc=n),this.currentDocument.states.get(u).type||(this.currentDocument.states.get(u).type=r)):(te.info("Adding state ",u,a),this.currentDocument.states.set(u,{id:u,descriptions:[],type:r,doc:n,note:i,classes:[],styles:[],textStyles:[]})),a&&(te.info("Setting state description",u,a),typeof a=="string"&&this.addDescription(u,a.trim()),typeof a=="object"&&a.forEach(h=>this.addDescription(u,h.trim()))),i){let h=this.currentDocument.states.get(u);h.note=i,h.note.text=Ze.sanitizeText(h.note.text,Te())}s&&(te.info("Setting state classes",u,s),(typeof s=="string"?[s]:s).forEach(f=>this.setCssClass(u,f.trim()))),o&&(te.info("Setting state styles",u,o),(typeof o=="string"?[o]:o).forEach(f=>this.setStyle(u,f.trim()))),l&&(te.info("Setting state styles",u,o),(typeof l=="string"?[l]:l).forEach(f=>this.setTextStyle(u,f.trim())))}clear(e){this.nodes=[],this.edges=[],this.documents={root:qSe()},this.currentDocument=this.documents.root,this.startEndCount=0,this.classes=Bq(),e||Cr()}getState(e){return this.currentDocument.states.get(e)}getStates(){return this.currentDocument.states}logDocuments(){te.info("Documents = ",this.documents)}getRelations(){return this.currentDocument.relations}startIdIfNeeded(e=""){let r=e;return e===Pq&&(this.startEndCount++,r=`${FSe}${this.startEndCount}`),r}startTypeIfNeeded(e="",r=o6){return e===Pq?FSe:r}endIdIfNeeded(e=""){let r=e;return e===zSe&&(this.startEndCount++,r=`${$Se}${this.startEndCount}`),r}endTypeIfNeeded(e="",r=o6){return e===zSe?$Se:r}addRelationObjs(e,r,n){let a=this.startIdIfNeeded(e.id.trim()),i=this.startTypeIfNeeded(e.id.trim(),e.type),s=this.startIdIfNeeded(r.id.trim()),o=this.startTypeIfNeeded(r.id.trim(),r.type);this.addState(a,i,e.doc,e.description,e.note,e.classes,e.styles,e.textStyles),this.addState(s,o,r.doc,r.description,r.note,r.classes,r.styles,r.textStyles),this.currentDocument.relations.push({id1:a,id2:s,relationTitle:Ze.sanitizeText(n,Te())})}addRelation(e,r,n){if(typeof e=="object")this.addRelationObjs(e,r,n);else{let a=this.startIdIfNeeded(e.trim()),i=this.startTypeIfNeeded(e),s=this.endIdIfNeeded(r.trim()),o=this.endTypeIfNeeded(r);this.addState(a,i),this.addState(s,o),this.currentDocument.relations.push({id1:a,id2:s,title:Ze.sanitizeText(n,Te())})}}addDescription(e,r){let n=this.currentDocument.states.get(e),a=r.startsWith(":")?r.replace(":","").trim():r;n.descriptions.push(Ze.sanitizeText(a,Te()))}cleanupLabel(e){return e.substring(0,1)===":"?e.substr(2).trim():e.trim()}getDividerId(){return this.dividerCnt++,"divider-id-"+this.dividerCnt}addStyleClass(e,r=""){this.classes.has(e)||this.classes.set(e,{id:e,styles:[],textStyles:[]});let n=this.classes.get(e);r?.split(Sbt).forEach(a=>{let i=a.replace(/([^;]*);/,"$1").trim();if(RegExp(GSe).exec(a)){let o=i.replace(USe,Cbt).replace(GSe,USe);n.textStyles.push(o)}n.styles.push(i)})}getClasses(){return this.classes}setCssClass(e,r){e.split(",").forEach(n=>{let a=this.getState(n);if(a===void 0){let i=n.trim();this.addState(i),a=this.getState(i)}a.classes.push(r)})}setStyle(e,r){let n=this.getState(e);n!==void 0&&n.styles.push(r)}setTextStyle(e,r){let n=this.getState(e);n!==void 0&&n.textStyles.push(r)}getDirectionStatement(){return this.rootDoc.find(e=>e.stmt===NSe)}getDirection(){return this.getDirectionStatement()?.value??tbt}setDirection(e){let r=this.getDirectionStatement();r?r.value=e:this.rootDoc.unshift({stmt:NSe,value:e})}trimColon(e){return e&&e[0]===":"?e.substr(1).trim():e.trim()}getData(){let e=Te();return{nodes:this.nodes,edges:this.edges,other:{},config:e,direction:e_e(this.getRootDocV2())}}getConfig(){return Te().state}getAccTitle=_r;setAccTitle=Sr;getAccDescription=Lr;setAccDescription=Ar;setDiagramTitle=Fr;getDiagramTitle=Rr},x(jm,"StateDB"),ck(jm,"relationType",{AGGREGATION:0,EXTENSION:1,COMPOSITION:2,DEPENDENCY:3}),jm),_bt=x(t=>` +`,"getStyles"),VL=C6t,_6t=b((t,e="TB")=>{if(!t.doc)return e;let r=e;for(let n of t.doc)n.stmt==="dir"&&(r=n.value);return r},"getDir"),A6t=b(function(t,e){return e.db.getClasses()},"getClasses"),L6t=b(async function(t,e,r,n){he.info("REF0:"),he.info("Drawing class diagram (v3)",e);let{securityLevel:i,state:a,layout:s}=Fe(),o=n.db.getData(),l=k0(e,i);o.type=n.type,o.layoutAlgorithm=Fd(s),o.nodeSpacing=a?.nodeSpacing||50,o.rankSpacing=a?.rankSpacing||50,o.markers=["aggregation","extension","composition","dependency","lollipop"],o.diagramId=e,await y0(o,l);let u=8;gr.insertTitle(l,"classDiagramTitleText",a?.titleTopMargin??25,n.db.getDiagramTitle()),T0(l,u,"classDiagram",a?.useMaxWidth??!0)},"draw"),WL={getClasses:A6t,draw:L6t,getDir:_6t}});var t_e={};Mr(t_e,{diagram:()=>R6t});var R6t,r_e=D(()=>{UV();E0();ac();nc();iu();Il();Wo();Al();As();Hn();Nr();R6t={parser:UL,get db(){return new HL},renderer:WL,styles:VL,init:b(t=>{t.class||(t.class={}),t.class.arrowMarkerAbsolute=t.arrowMarkerAbsolute},"init")}});var n_e={};Mr(n_e,{diagram:()=>D6t});var D6t,i_e=D(()=>{UV();E0();ac();nc();iu();Il();Wo();Al();As();Hn();Nr();D6t={parser:UL,get db(){return new HL},renderer:WL,styles:VL,init:b(t=>{t.class||(t.class={}),t.class.arrowMarkerAbsolute=t.arrowMarkerAbsolute},"init")}});function KL(t="",e=0,r="",n=KV){let i=r!==null&&r.length>0?`${n}${r}`:"";return`${K6t}-${t}${i}-${e}`}function k8(t,e,r){if(!e.id||e.id===""||e.id==="")return;e.cssClasses&&(Array.isArray(e.cssCompiledStyles)||(e.cssCompiledStyles=[]),e.cssClasses.split(" ").forEach(i=>{if(r.get(i)){let a=r.get(i);e.cssCompiledStyles=[...e.cssCompiledStyles,...a.styles]}}));let n=t.find(i=>i.id===e.id);n?Object.assign(n,e):t.push(e)}function A_e(t){return t?.classes?.join(" ")??""}function L_e(t){return t?.styles??[]}function jV(){return new Map}var WV,ZL,I6t,g_e,a_e,XL,YV,M6t,N6t,O6t,E8,y_e,v_e,x_e,b_e,w_e,k_e,HV,VV,P6t,B6t,s_e,o_e,F6t,z6t,S8,$6t,G6t,T_e,q6t,U6t,H6t,V6t,W6t,Y6t,X6t,j6t,E_e,S_e,K6t,KV,Z6t,l_e,C_e,Q6t,J6t,__e,jL,Pp,e7t,u_e,T8,t7t,XV,c_e,h_e,f_e,d_e,p_e,r7t,n7t,m_e,YL,ig,bf,i7t,QL,ZV=D(()=>{E0();ac();Hn();Nr();WV=(function(){var t=b(function(z,q,V,U){for(V=V||{},U=z.length;U--;V[z[U]]=q);return V},"o"),e=[1,2],r=[1,3],n=[1,4],i=[2,4],a=[1,9],s=[1,11],o=[1,16],l=[1,17],u=[1,18],h=[1,19],f=[1,32],d=[1,20],p=[1,21],m=[1,22],g=[1,23],y=[1,24],v=[1,26],x=[1,27],k=[1,28],_=[1,29],T=[1,30],S=[1,31],R=[1,34],A=[1,35],I=[1,36],P=[1,37],O=[1,33],C=[1,4,5,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,42,45,48,49,50,51,54],N=[1,4,5,14,15,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,42,45,48,49,50,51,54],B=[4,5,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,42,45,48,49,50,51,54],F={trace:b(function(){},"trace"),yy:{},symbols_:{error:2,start:3,SPACE:4,NL:5,SD:6,document:7,line:8,statement:9,classDefStatement:10,styleStatement:11,cssClassStatement:12,idStatement:13,DESCR:14,"-->":15,HIDE_EMPTY:16,scale:17,WIDTH:18,COMPOSIT_STATE:19,STRUCT_START:20,STRUCT_STOP:21,STATE_DESCR:22,AS:23,ID:24,FORK:25,JOIN:26,CHOICE:27,CONCURRENT:28,note:29,notePosition:30,NOTE_TEXT:31,direction:32,acc_title:33,acc_title_value:34,acc_descr:35,acc_descr_value:36,acc_descr_multiline_value:37,classDef:38,CLASSDEF_ID:39,CLASSDEF_STYLEOPTS:40,DEFAULT:41,style:42,STYLE_IDS:43,STYLEDEF_STYLEOPTS:44,class:45,CLASSENTITY_IDS:46,STYLECLASS:47,direction_tb:48,direction_bt:49,direction_rl:50,direction_lr:51,eol:52,";":53,EDGE_STATE:54,STYLE_SEPARATOR:55,left_of:56,right_of:57,$accept:0,$end:1},terminals_:{2:"error",4:"SPACE",5:"NL",6:"SD",14:"DESCR",15:"-->",16:"HIDE_EMPTY",17:"scale",18:"WIDTH",19:"COMPOSIT_STATE",20:"STRUCT_START",21:"STRUCT_STOP",22:"STATE_DESCR",23:"AS",24:"ID",25:"FORK",26:"JOIN",27:"CHOICE",28:"CONCURRENT",29:"note",31:"NOTE_TEXT",33:"acc_title",34:"acc_title_value",35:"acc_descr",36:"acc_descr_value",37:"acc_descr_multiline_value",38:"classDef",39:"CLASSDEF_ID",40:"CLASSDEF_STYLEOPTS",41:"DEFAULT",42:"style",43:"STYLE_IDS",44:"STYLEDEF_STYLEOPTS",45:"class",46:"CLASSENTITY_IDS",47:"STYLECLASS",48:"direction_tb",49:"direction_bt",50:"direction_rl",51:"direction_lr",53:";",54:"EDGE_STATE",55:"STYLE_SEPARATOR",56:"left_of",57:"right_of"},productions_:[0,[3,2],[3,2],[3,2],[7,0],[7,2],[8,2],[8,1],[8,1],[9,1],[9,1],[9,1],[9,1],[9,2],[9,3],[9,4],[9,1],[9,2],[9,1],[9,4],[9,3],[9,6],[9,1],[9,1],[9,1],[9,1],[9,4],[9,4],[9,1],[9,2],[9,2],[9,1],[10,3],[10,3],[11,3],[12,3],[32,1],[32,1],[32,1],[32,1],[52,1],[52,1],[13,1],[13,1],[13,3],[13,3],[30,1],[30,1]],performAction:b(function(q,V,U,J,se,re,me){var ge=re.length-1;switch(se){case 3:return J.setRootDoc(re[ge]),re[ge];break;case 4:this.$=[];break;case 5:re[ge]!="nl"&&(re[ge-1].push(re[ge]),this.$=re[ge-1]);break;case 6:case 7:this.$=re[ge];break;case 8:this.$="nl";break;case 12:this.$=re[ge];break;case 13:let ie=re[ge-1];ie.description=J.trimColon(re[ge]),this.$=ie;break;case 14:this.$={stmt:"relation",state1:re[ge-2],state2:re[ge]};break;case 15:let le=J.trimColon(re[ge]);this.$={stmt:"relation",state1:re[ge-3],state2:re[ge-1],description:le};break;case 19:this.$={stmt:"state",id:re[ge-3],type:"default",description:"",doc:re[ge-1]};break;case 20:var ye=re[ge],_e=re[ge-2].trim();if(re[ge].match(":")){var ue=re[ge].split(":");ye=ue[0],_e=[_e,ue[1]]}this.$={stmt:"state",id:ye,type:"default",description:_e};break;case 21:this.$={stmt:"state",id:re[ge-3],type:"default",description:re[ge-5],doc:re[ge-1]};break;case 22:this.$={stmt:"state",id:re[ge],type:"fork"};break;case 23:this.$={stmt:"state",id:re[ge],type:"join"};break;case 24:this.$={stmt:"state",id:re[ge],type:"choice"};break;case 25:this.$={stmt:"state",id:J.getDividerId(),type:"divider"};break;case 26:this.$={stmt:"state",id:re[ge-1].trim(),note:{position:re[ge-2].trim(),text:re[ge].trim()}};break;case 29:this.$=re[ge].trim(),J.setAccTitle(this.$);break;case 30:case 31:this.$=re[ge].trim(),J.setAccDescription(this.$);break;case 32:case 33:this.$={stmt:"classDef",id:re[ge-1].trim(),classes:re[ge].trim()};break;case 34:this.$={stmt:"style",id:re[ge-1].trim(),styleClass:re[ge].trim()};break;case 35:this.$={stmt:"applyClass",id:re[ge-1].trim(),styleClass:re[ge].trim()};break;case 36:J.setDirection("TB"),this.$={stmt:"dir",value:"TB"};break;case 37:J.setDirection("BT"),this.$={stmt:"dir",value:"BT"};break;case 38:J.setDirection("RL"),this.$={stmt:"dir",value:"RL"};break;case 39:J.setDirection("LR"),this.$={stmt:"dir",value:"LR"};break;case 42:case 43:this.$={stmt:"state",id:re[ge].trim(),type:"default",description:""};break;case 44:this.$={stmt:"state",id:re[ge-2].trim(),classes:[re[ge].trim()],type:"default",description:""};break;case 45:this.$={stmt:"state",id:re[ge-2].trim(),classes:[re[ge].trim()],type:"default",description:""};break}},"anonymous"),table:[{3:1,4:e,5:r,6:n},{1:[3]},{3:5,4:e,5:r,6:n},{3:6,4:e,5:r,6:n},t([1,4,5,16,17,19,22,24,25,26,27,28,29,33,35,37,38,42,45,48,49,50,51,54],i,{7:7}),{1:[2,1]},{1:[2,2]},{1:[2,3],4:a,5:s,8:8,9:10,10:12,11:13,12:14,13:15,16:o,17:l,19:u,22:h,24:f,25:d,26:p,27:m,28:g,29:y,32:25,33:v,35:x,37:k,38:_,42:T,45:S,48:R,49:A,50:I,51:P,54:O},t(C,[2,5]),{9:38,10:12,11:13,12:14,13:15,16:o,17:l,19:u,22:h,24:f,25:d,26:p,27:m,28:g,29:y,32:25,33:v,35:x,37:k,38:_,42:T,45:S,48:R,49:A,50:I,51:P,54:O},t(C,[2,7]),t(C,[2,8]),t(C,[2,9]),t(C,[2,10]),t(C,[2,11]),t(C,[2,12],{14:[1,39],15:[1,40]}),t(C,[2,16]),{18:[1,41]},t(C,[2,18],{20:[1,42]}),{23:[1,43]},t(C,[2,22]),t(C,[2,23]),t(C,[2,24]),t(C,[2,25]),{30:44,31:[1,45],56:[1,46],57:[1,47]},t(C,[2,28]),{34:[1,48]},{36:[1,49]},t(C,[2,31]),{39:[1,50],41:[1,51]},{43:[1,52]},{46:[1,53]},t(N,[2,42],{55:[1,54]}),t(N,[2,43],{55:[1,55]}),t(C,[2,36]),t(C,[2,37]),t(C,[2,38]),t(C,[2,39]),t(C,[2,6]),t(C,[2,13]),{13:56,24:f,54:O},t(C,[2,17]),t(B,i,{7:57}),{24:[1,58]},{24:[1,59]},{23:[1,60]},{24:[2,46]},{24:[2,47]},t(C,[2,29]),t(C,[2,30]),{40:[1,61]},{40:[1,62]},{44:[1,63]},{47:[1,64]},{24:[1,65]},{24:[1,66]},t(C,[2,14],{14:[1,67]}),{4:a,5:s,8:8,9:10,10:12,11:13,12:14,13:15,16:o,17:l,19:u,21:[1,68],22:h,24:f,25:d,26:p,27:m,28:g,29:y,32:25,33:v,35:x,37:k,38:_,42:T,45:S,48:R,49:A,50:I,51:P,54:O},t(C,[2,20],{20:[1,69]}),{31:[1,70]},{24:[1,71]},t(C,[2,32]),t(C,[2,33]),t(C,[2,34]),t(C,[2,35]),t(N,[2,44]),t(N,[2,45]),t(C,[2,15]),t(C,[2,19]),t(B,i,{7:72}),t(C,[2,26]),t(C,[2,27]),{4:a,5:s,8:8,9:10,10:12,11:13,12:14,13:15,16:o,17:l,19:u,21:[1,73],22:h,24:f,25:d,26:p,27:m,28:g,29:y,32:25,33:v,35:x,37:k,38:_,42:T,45:S,48:R,49:A,50:I,51:P,54:O},t(C,[2,21])],defaultActions:{5:[2,1],6:[2,2],46:[2,46],47:[2,47]},parseError:b(function(q,V){if(V.recoverable)this.trace(q);else{var U=new Error(q);throw U.hash=V,U}},"parseError"),parse:b(function(q){var V=this,U=[0],J=[],se=[null],re=[],me=this.table,ge="",ye=0,_e=0,ue=0,ie=2,le=1,oe=re.slice.call(arguments,1),ne=Object.create(this.lexer),pe={yy:{}};for(var te in this.yy)Object.prototype.hasOwnProperty.call(this.yy,te)&&(pe.yy[te]=this.yy[te]);ne.setInput(q,pe.yy),pe.yy.lexer=ne,pe.yy.parser=this,typeof ne.yylloc>"u"&&(ne.yylloc={});var He=ne.yylloc;re.push(He);var de=ne.options&&ne.options.ranges;typeof pe.yy.parseError=="function"?this.parseError=pe.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function ce(ve){U.length=U.length-2*ve,se.length=se.length-ve,re.length=re.length-ve}b(ce,"popStack");function st(){var ve;return ve=J.pop()||ne.lex()||le,typeof ve!="number"&&(ve instanceof Array&&(J=ve,ve=J.pop()),ve=V.symbols_[ve]||ve),ve}b(st,"lex");for(var Ae,Ye,Ge,rt,Xe,Ze,Pe={},Re,Ve,ke,xe;;){if(Ge=U[U.length-1],this.defaultActions[Ge]?rt=this.defaultActions[Ge]:((Ae===null||typeof Ae>"u")&&(Ae=st()),rt=me[Ge]&&me[Ge][Ae]),typeof rt>"u"||!rt.length||!rt[0]){var H="";xe=[];for(Re in me[Ge])this.terminals_[Re]&&Re>ie&&xe.push("'"+this.terminals_[Re]+"'");ne.showPosition?H="Parse error on line "+(ye+1)+`: +`+ne.showPosition()+` +Expecting `+xe.join(", ")+", got '"+(this.terminals_[Ae]||Ae)+"'":H="Parse error on line "+(ye+1)+": Unexpected "+(Ae==le?"end of input":"'"+(this.terminals_[Ae]||Ae)+"'"),this.parseError(H,{text:ne.match,token:this.terminals_[Ae]||Ae,line:ne.yylineno,loc:He,expected:xe})}if(rt[0]instanceof Array&&rt.length>1)throw new Error("Parse Error: multiple actions possible at state: "+Ge+", token: "+Ae);switch(rt[0]){case 1:U.push(Ae),se.push(ne.yytext),re.push(ne.yylloc),U.push(rt[1]),Ae=null,Ye?(Ae=Ye,Ye=null):(_e=ne.yyleng,ge=ne.yytext,ye=ne.yylineno,He=ne.yylloc,ue>0&&ue--);break;case 2:if(Ve=this.productions_[rt[1]][1],Pe.$=se[se.length-Ve],Pe._$={first_line:re[re.length-(Ve||1)].first_line,last_line:re[re.length-1].last_line,first_column:re[re.length-(Ve||1)].first_column,last_column:re[re.length-1].last_column},de&&(Pe._$.range=[re[re.length-(Ve||1)].range[0],re[re.length-1].range[1]]),Ze=this.performAction.apply(Pe,[ge,_e,ye,pe.yy,rt[1],se,re].concat(oe)),typeof Ze<"u")return Ze;Ve&&(U=U.slice(0,-1*Ve*2),se=se.slice(0,-1*Ve),re=re.slice(0,-1*Ve)),U.push(this.productions_[rt[1]][0]),se.push(Pe.$),re.push(Pe._$),ke=me[U[U.length-2]][U[U.length-1]],U.push(ke);break;case 3:return!0}}return!0},"parse")},M=(function(){var z={EOF:1,parseError:b(function(V,U){if(this.yy.parser)this.yy.parser.parseError(V,U);else throw new Error(V)},"parseError"),setInput:b(function(q,V){return this.yy=V||this.yy||{},this._input=q,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:b(function(){var q=this._input[0];this.yytext+=q,this.yyleng++,this.offset++,this.match+=q,this.matched+=q;var V=q.match(/(?:\r\n?|\n).*/g);return V?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),q},"input"),unput:b(function(q){var V=q.length,U=q.split(/(?:\r\n?|\n)/g);this._input=q+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-V),this.offset-=V;var J=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),U.length-1&&(this.yylineno-=U.length-1);var se=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:U?(U.length===J.length?this.yylloc.first_column:0)+J[J.length-U.length].length-U[0].length:this.yylloc.first_column-V},this.options.ranges&&(this.yylloc.range=[se[0],se[0]+this.yyleng-V]),this.yyleng=this.yytext.length,this},"unput"),more:b(function(){return this._more=!0,this},"more"),reject:b(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). +`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:b(function(q){this.unput(this.match.slice(q))},"less"),pastInput:b(function(){var q=this.matched.substr(0,this.matched.length-this.match.length);return(q.length>20?"...":"")+q.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:b(function(){var q=this.match;return q.length<20&&(q+=this._input.substr(0,20-q.length)),(q.substr(0,20)+(q.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:b(function(){var q=this.pastInput(),V=new Array(q.length+1).join("-");return q+this.upcomingInput()+` +`+V+"^"},"showPosition"),test_match:b(function(q,V){var U,J,se;if(this.options.backtrack_lexer&&(se={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(se.yylloc.range=this.yylloc.range.slice(0))),J=q[0].match(/(?:\r\n?|\n).*/g),J&&(this.yylineno+=J.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:J?J[J.length-1].length-J[J.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+q[0].length},this.yytext+=q[0],this.match+=q[0],this.matches=q,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(q[0].length),this.matched+=q[0],U=this.performAction.call(this,this.yy,this,V,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),U)return U;if(this._backtrack){for(var re in se)this[re]=se[re];return!1}return!1},"test_match"),next:b(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var q,V,U,J;this._more||(this.yytext="",this.match="");for(var se=this._currentRules(),re=0;reV[0].length)){if(V=U,J=re,this.options.backtrack_lexer){if(q=this.test_match(U,se[re]),q!==!1)return q;if(this._backtrack){V=!1;continue}else return!1}else if(!this.options.flex)break}return V?(q=this.test_match(V,se[J]),q!==!1?q:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. +`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:b(function(){var V=this.next();return V||this.lex()},"lex"),begin:b(function(V){this.conditionStack.push(V)},"begin"),popState:b(function(){var V=this.conditionStack.length-1;return V>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:b(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:b(function(V){return V=this.conditionStack.length-1-Math.abs(V||0),V>=0?this.conditionStack[V]:"INITIAL"},"topState"),pushState:b(function(V){this.begin(V)},"pushState"),stateStackSize:b(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:b(function(V,U,J,se){var re=se;switch(J){case 0:return 41;case 1:return 48;case 2:return 49;case 3:return 50;case 4:return 51;case 5:break;case 6:break;case 7:return 5;case 8:break;case 9:break;case 10:break;case 11:break;case 12:return this.pushState("SCALE"),17;break;case 13:return 18;case 14:this.popState();break;case 15:return this.begin("acc_title"),33;break;case 16:return this.popState(),"acc_title_value";break;case 17:return this.begin("acc_descr"),35;break;case 18:return this.popState(),"acc_descr_value";break;case 19:this.begin("acc_descr_multiline");break;case 20:this.popState();break;case 21:return"acc_descr_multiline_value";case 22:return this.pushState("CLASSDEF"),38;break;case 23:return this.popState(),this.pushState("CLASSDEFID"),"DEFAULT_CLASSDEF_ID";break;case 24:return this.popState(),this.pushState("CLASSDEFID"),39;break;case 25:return this.popState(),40;break;case 26:return this.pushState("CLASS"),45;break;case 27:return this.popState(),this.pushState("CLASS_STYLE"),46;break;case 28:return this.popState(),47;break;case 29:return this.pushState("STYLE"),42;break;case 30:return this.popState(),this.pushState("STYLEDEF_STYLES"),43;break;case 31:return this.popState(),44;break;case 32:return this.pushState("SCALE"),17;break;case 33:return 18;case 34:this.popState();break;case 35:this.pushState("STATE");break;case 36:return this.popState(),U.yytext=U.yytext.slice(0,-8).trim(),25;break;case 37:return this.popState(),U.yytext=U.yytext.slice(0,-8).trim(),26;break;case 38:return this.popState(),U.yytext=U.yytext.slice(0,-10).trim(),27;break;case 39:return this.popState(),U.yytext=U.yytext.slice(0,-8).trim(),25;break;case 40:return this.popState(),U.yytext=U.yytext.slice(0,-8).trim(),26;break;case 41:return this.popState(),U.yytext=U.yytext.slice(0,-10).trim(),27;break;case 42:return 48;case 43:return 49;case 44:return 50;case 45:return 51;case 46:this.pushState("STATE_STRING");break;case 47:return this.pushState("STATE_ID"),"AS";break;case 48:return this.popState(),"ID";break;case 49:this.popState();break;case 50:return"STATE_DESCR";case 51:return 19;case 52:this.popState();break;case 53:return this.popState(),this.pushState("struct"),20;break;case 54:break;case 55:return this.popState(),21;break;case 56:break;case 57:return this.begin("NOTE"),29;break;case 58:return this.popState(),this.pushState("NOTE_ID"),56;break;case 59:return this.popState(),this.pushState("NOTE_ID"),57;break;case 60:this.popState(),this.pushState("FLOATING_NOTE");break;case 61:return this.popState(),this.pushState("FLOATING_NOTE_ID"),"AS";break;case 62:break;case 63:return"NOTE_TEXT";case 64:return this.popState(),"ID";break;case 65:return this.popState(),this.pushState("NOTE_TEXT"),24;break;case 66:return this.popState(),U.yytext=U.yytext.substr(2).trim(),31;break;case 67:return this.popState(),U.yytext=U.yytext.slice(0,-8).trim(),31;break;case 68:return 6;case 69:return 6;case 70:return 16;case 71:return 54;case 72:return 24;case 73:return U.yytext=U.yytext.trim(),14;break;case 74:return 15;case 75:return 28;case 76:return 55;case 77:return 5;case 78:return"INVALID"}},"anonymous"),rules:[/^(?:default\b)/i,/^(?:.*direction\s+TB[^\n]*)/i,/^(?:.*direction\s+BT[^\n]*)/i,/^(?:.*direction\s+RL[^\n]*)/i,/^(?:.*direction\s+LR[^\n]*)/i,/^(?:%%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n]+)/i,/^(?:[\s]+)/i,/^(?:((?!\n)\s)+)/i,/^(?:#[^\n]*)/i,/^(?:%[^\n]*)/i,/^(?:scale\s+)/i,/^(?:\d+)/i,/^(?:\s+width\b)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:classDef\s+)/i,/^(?:DEFAULT\s+)/i,/^(?:\w+\s+)/i,/^(?:[^\n]*)/i,/^(?:class\s+)/i,/^(?:(\w+)+((,\s*\w+)*))/i,/^(?:[^\n]*)/i,/^(?:style\s+)/i,/^(?:[\w,]+\s+)/i,/^(?:[^\n]*)/i,/^(?:scale\s+)/i,/^(?:\d+)/i,/^(?:\s+width\b)/i,/^(?:state\s+)/i,/^(?:.*<>)/i,/^(?:.*<>)/i,/^(?:.*<>)/i,/^(?:.*\[\[fork\]\])/i,/^(?:.*\[\[join\]\])/i,/^(?:.*\[\[choice\]\])/i,/^(?:.*direction\s+TB[^\n]*)/i,/^(?:.*direction\s+BT[^\n]*)/i,/^(?:.*direction\s+RL[^\n]*)/i,/^(?:.*direction\s+LR[^\n]*)/i,/^(?:["])/i,/^(?:\s*as\s+)/i,/^(?:[^\n\{]*)/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[^\n\s\{]+)/i,/^(?:\n)/i,/^(?:\{)/i,/^(?:%%(?!\{)[^\n]*)/i,/^(?:\})/i,/^(?:[\n])/i,/^(?:note\s+)/i,/^(?:left of\b)/i,/^(?:right of\b)/i,/^(?:")/i,/^(?:\s*as\s*)/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[^\n]*)/i,/^(?:\s*[^:\n\s\-]+)/i,/^(?:\s*:[^:\n;]+)/i,/^(?:[\s\S]*?end note\b)/i,/^(?:stateDiagram\s+)/i,/^(?:stateDiagram-v2\s+)/i,/^(?:hide empty description\b)/i,/^(?:\[\*\])/i,/^(?:[^:\n\s\-\{]+)/i,/^(?:\s*:[^:\n;]+)/i,/^(?:-->)/i,/^(?:--)/i,/^(?::::)/i,/^(?:$)/i,/^(?:.)/i],conditions:{LINE:{rules:[9,10],inclusive:!1},struct:{rules:[9,10,22,26,29,35,42,43,44,45,54,55,56,57,71,72,73,74,75],inclusive:!1},FLOATING_NOTE_ID:{rules:[64],inclusive:!1},FLOATING_NOTE:{rules:[61,62,63],inclusive:!1},NOTE_TEXT:{rules:[66,67],inclusive:!1},NOTE_ID:{rules:[65],inclusive:!1},NOTE:{rules:[58,59,60],inclusive:!1},STYLEDEF_STYLEOPTS:{rules:[],inclusive:!1},STYLEDEF_STYLES:{rules:[31],inclusive:!1},STYLE_IDS:{rules:[],inclusive:!1},STYLE:{rules:[30],inclusive:!1},CLASS_STYLE:{rules:[28],inclusive:!1},CLASS:{rules:[27],inclusive:!1},CLASSDEFID:{rules:[25],inclusive:!1},CLASSDEF:{rules:[23,24],inclusive:!1},acc_descr_multiline:{rules:[20,21],inclusive:!1},acc_descr:{rules:[18],inclusive:!1},acc_title:{rules:[16],inclusive:!1},SCALE:{rules:[13,14,33,34],inclusive:!1},ALIAS:{rules:[],inclusive:!1},STATE_ID:{rules:[48],inclusive:!1},STATE_STRING:{rules:[49,50],inclusive:!1},FORK_STATE:{rules:[],inclusive:!1},STATE:{rules:[9,10,36,37,38,39,40,41,46,47,51,52,53],inclusive:!1},ID:{rules:[9,10],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,8,10,11,12,15,17,19,22,26,29,32,35,53,57,68,69,70,71,72,73,74,76,77,78],inclusive:!0}}};return z})();F.lexer=M;function $(){this.yy={}}return b($,"Parser"),$.prototype=F,F.Parser=$,new $})();WV.parser=WV;ZL=WV,I6t="TB",g_e="TB",a_e="dir",XL="state",YV="relation",M6t="classDef",N6t="style",O6t="applyClass",E8="default",y_e="divider",v_e="fill:none",x_e="fill: #333",b_e="c",w_e="text",k_e="normal",HV="rect",VV="rectWithTitle",P6t="stateStart",B6t="stateEnd",s_e="divider",o_e="roundedWithTitle",F6t="note",z6t="noteGroup",S8="statediagram",$6t="state",G6t=`${S8}-${$6t}`,T_e="transition",q6t="note",U6t="note-edge",H6t=`${T_e} ${U6t}`,V6t=`${S8}-${q6t}`,W6t="cluster",Y6t=`${S8}-${W6t}`,X6t="cluster-alt",j6t=`${S8}-${X6t}`,E_e="parent",S_e="note",K6t="state",KV="----",Z6t=`${KV}${S_e}`,l_e=`${KV}${E_e}`,C_e=b((t,e=g_e)=>{if(!t.doc)return e;let r=e;for(let n of t.doc)n.stmt==="dir"&&(r=n.value);return r},"getDir"),Q6t=b(function(t,e){return e.db.getClasses()},"getClasses"),J6t=b(async function(t,e,r,n){he.info("REF0:"),he.info("Drawing state diagram (v2)",e);let{securityLevel:i,state:a,layout:s}=Fe();n.db.extract(n.db.getRootDocV2());let o=n.db.getData(),l=k0(e,i);o.type=n.type,o.layoutAlgorithm=s,o.nodeSpacing=a?.nodeSpacing||50,o.rankSpacing=a?.rankSpacing||50,o.markers=["barb"],o.diagramId=e,await y0(o,l);let u=8;gr.insertTitle(l,"statediagramTitleText",a?.titleTopMargin??25,n.db.getDiagramTitle()),T0(l,u,S8,a?.useMaxWidth??!0)},"draw"),__e={getClasses:Q6t,draw:J6t,getDir:C_e},jL=new Map,Pp=0;b(KL,"stateDomId");e7t=b((t,e,r,n,i,a,s,o)=>{he.trace("items",e),e.forEach(l=>{switch(l.stmt){case XL:T8(t,l,r,n,i,a,s,o);break;case E8:T8(t,l,r,n,i,a,s,o);break;case YV:{T8(t,l.state1,r,n,i,a,s,o),T8(t,l.state2,r,n,i,a,s,o);let u={id:"edge"+Pp,start:l.state1.id,end:l.state2.id,arrowhead:"normal",arrowTypeEnd:"arrow_barb",style:v_e,labelStyle:"",label:St.sanitizeText(l.description,Fe()),arrowheadStyle:x_e,labelpos:b_e,labelType:w_e,thickness:k_e,classes:T_e,look:s};i.push(u),Pp++}break}})},"setupDoc"),u_e=b((t,e=g_e)=>{let r=e;if(t.doc)for(let n of t.doc)n.stmt==="dir"&&(r=n.value);return r},"getDir");b(k8,"insertOrUpdateNode");b(A_e,"getClassesFromDbInfo");b(L_e,"getStylesFromDbInfo");T8=b((t,e,r,n,i,a,s,o)=>{let l=e.id,u=r.get(l),h=A_e(u),f=L_e(u);if(he.info("dataFetcher parsedItem",e,u,f),l!=="root"){let d=HV;e.start===!0?d=P6t:e.start===!1&&(d=B6t),e.type!==E8&&(d=e.type),jL.get(l)||jL.set(l,{id:l,shape:d,description:St.sanitizeText(l,Fe()),cssClasses:`${h} ${G6t}`,cssStyles:f});let p=jL.get(l);e.description&&(Array.isArray(p.description)?(p.shape=VV,p.description.push(e.description)):p.description?.length>0?(p.shape=VV,p.description===l?p.description=[e.description]:p.description=[p.description,e.description]):(p.shape=HV,p.description=e.description),p.description=St.sanitizeTextOrArray(p.description,Fe())),p.description?.length===1&&p.shape===VV&&(p.type==="group"?p.shape=o_e:p.shape=HV),!p.type&&e.doc&&(he.info("Setting cluster for XCX",l,u_e(e)),p.type="group",p.isGroup=!0,p.dir=u_e(e),p.shape=e.type===y_e?s_e:o_e,p.cssClasses=`${p.cssClasses} ${Y6t} ${a?j6t:""}`);let m={labelStyle:"",shape:p.shape,label:p.description,cssClasses:p.cssClasses,cssCompiledStyles:[],cssStyles:p.cssStyles,id:l,dir:p.dir,domId:KL(l,Pp),type:p.type,isGroup:p.type==="group",padding:8,rx:10,ry:10,look:s};if(m.shape===s_e&&(m.label=""),t&&t.id!=="root"&&(he.trace("Setting node ",l," to be child of its parent ",t.id),m.parentId=t.id),m.centerLabel=!0,e.note){let g={labelStyle:"",shape:F6t,label:e.note.text,cssClasses:V6t,cssStyles:[],cssCompilesStyles:[],id:l+Z6t+"-"+Pp,domId:KL(l,Pp,S_e),type:p.type,isGroup:p.type==="group",padding:Fe().flowchart.padding,look:s,position:e.note.position},y=l+l_e,v={labelStyle:"",shape:z6t,label:e.note.text,cssClasses:p.cssClasses,cssStyles:[],id:l+l_e,domId:KL(l,Pp,E_e),type:"group",isGroup:!0,padding:16,look:s,position:e.note.position};Pp++,v.id=y,g.parentId=y,k8(n,v,o),k8(n,g,o),k8(n,m,o);let x=l,k=g.id;e.note.position==="left of"&&(x=g.id,k=l),i.push({id:x+"-"+k,start:x,end:k,arrowhead:"none",arrowTypeEnd:"",style:v_e,labelStyle:"",classes:H6t,arrowheadStyle:x_e,labelpos:b_e,labelType:w_e,thickness:k_e,look:s})}else k8(n,m,o)}e.doc&&(he.trace("Adding nodes children "),e7t(e,e.doc,r,n,i,!a,s,o))},"dataFetcher"),t7t=b(()=>{jL.clear(),Pp=0},"reset"),XV="[*]",c_e="start",h_e=XV,f_e="end",d_e="color",p_e="fill",r7t="bgFill",n7t=",";b(jV,"newClassesList");m_e=b(()=>({relations:[],states:new Map,documents:{}}),"newDoc"),YL=b(t=>JSON.parse(JSON.stringify(t)),"clone"),bf=(ig=class{constructor(e){this.clear(),this.version=e,this.setRootDoc=this.setRootDoc.bind(this),this.getDividerId=this.getDividerId.bind(this),this.setDirection=this.setDirection.bind(this),this.trimColon=this.trimColon.bind(this)}version;nodes=[];edges=[];rootDoc=[];classes=jV();documents={root:m_e()};currentDocument=this.documents.root;startEndCount=0;dividerCnt=0;setRootDoc(e){he.info("Setting root doc",e),this.rootDoc=e,this.version===1?this.extract(e):this.extract(this.getRootDocV2())}getRootDoc(){return this.rootDoc}docTranslator(e,r,n){if(r.stmt===YV)this.docTranslator(e,r.state1,!0),this.docTranslator(e,r.state2,!1);else if(r.stmt===XL&&(r.id==="[*]"?(r.id=n?e.id+"_start":e.id+"_end",r.start=n):r.id=r.id.trim()),r.doc){let i=[],a=[],s;for(s=0;s0&&a.length>0){let o={stmt:XL,id:QB(),type:"divider",doc:YL(a)};i.push(YL(o)),r.doc=i}r.doc.forEach(o=>this.docTranslator(r,o,!0))}}getRootDocV2(){return this.docTranslator({id:"root"},{id:"root",doc:this.rootDoc},!0),{id:"root",doc:this.rootDoc}}extract(e){let r;e.doc?r=e.doc:r=e,he.info(r),this.clear(!0),he.info("Extract initial document:",r),r.forEach(s=>{switch(he.warn("Statement",s.stmt),s.stmt){case XL:this.addState(s.id.trim(),s.type,s.doc,s.description,s.note,s.classes,s.styles,s.textStyles);break;case YV:this.addRelation(s.state1,s.state2,s.description);break;case M6t:this.addStyleClass(s.id.trim(),s.classes);break;case N6t:{let o=s.id.trim().split(","),l=s.styleClass.split(",");o.forEach(u=>{let h=this.getState(u);if(h===void 0){let f=u.trim();this.addState(f),h=this.getState(f)}h.styles=l.map(f=>f.replace(/;/g,"")?.trim())})}break;case O6t:this.setCssClass(s.id.trim(),s.styleClass);break}});let n=this.getStates(),a=Fe().look;t7t(),T8(void 0,this.getRootDocV2(),n,this.nodes,this.edges,!0,a,this.classes),this.nodes.forEach(s=>{if(Array.isArray(s.label)){if(s.description=s.label.slice(1),s.isGroup&&s.description.length>0)throw new Error("Group nodes can only have label. Remove the additional description for node ["+s.id+"]");s.label=s.label[0]}})}addState(e,r=E8,n=null,i=null,a=null,s=null,o=null,l=null){let u=e?.trim();if(this.currentDocument.states.has(u)?(this.currentDocument.states.get(u).doc||(this.currentDocument.states.get(u).doc=n),this.currentDocument.states.get(u).type||(this.currentDocument.states.get(u).type=r)):(he.info("Adding state ",u,i),this.currentDocument.states.set(u,{id:u,descriptions:[],type:r,doc:n,note:a,classes:[],styles:[],textStyles:[]})),i&&(he.info("Setting state description",u,i),typeof i=="string"&&this.addDescription(u,i.trim()),typeof i=="object"&&i.forEach(h=>this.addDescription(u,h.trim()))),a){let h=this.currentDocument.states.get(u);h.note=a,h.note.text=St.sanitizeText(h.note.text,Fe())}s&&(he.info("Setting state classes",u,s),(typeof s=="string"?[s]:s).forEach(f=>this.setCssClass(u,f.trim()))),o&&(he.info("Setting state styles",u,o),(typeof o=="string"?[o]:o).forEach(f=>this.setStyle(u,f.trim()))),l&&(he.info("Setting state styles",u,o),(typeof l=="string"?[l]:l).forEach(f=>this.setTextStyle(u,f.trim())))}clear(e){this.nodes=[],this.edges=[],this.documents={root:m_e()},this.currentDocument=this.documents.root,this.startEndCount=0,this.classes=jV(),e||Jr()}getState(e){return this.currentDocument.states.get(e)}getStates(){return this.currentDocument.states}logDocuments(){he.info("Documents = ",this.documents)}getRelations(){return this.currentDocument.relations}startIdIfNeeded(e=""){let r=e;return e===XV&&(this.startEndCount++,r=`${c_e}${this.startEndCount}`),r}startTypeIfNeeded(e="",r=E8){return e===XV?c_e:r}endIdIfNeeded(e=""){let r=e;return e===h_e&&(this.startEndCount++,r=`${f_e}${this.startEndCount}`),r}endTypeIfNeeded(e="",r=E8){return e===h_e?f_e:r}addRelationObjs(e,r,n){let i=this.startIdIfNeeded(e.id.trim()),a=this.startTypeIfNeeded(e.id.trim(),e.type),s=this.startIdIfNeeded(r.id.trim()),o=this.startTypeIfNeeded(r.id.trim(),r.type);this.addState(i,a,e.doc,e.description,e.note,e.classes,e.styles,e.textStyles),this.addState(s,o,r.doc,r.description,r.note,r.classes,r.styles,r.textStyles),this.currentDocument.relations.push({id1:i,id2:s,relationTitle:St.sanitizeText(n,Fe())})}addRelation(e,r,n){if(typeof e=="object")this.addRelationObjs(e,r,n);else{let i=this.startIdIfNeeded(e.trim()),a=this.startTypeIfNeeded(e),s=this.endIdIfNeeded(r.trim()),o=this.endTypeIfNeeded(r);this.addState(i,a),this.addState(s,o),this.currentDocument.relations.push({id1:i,id2:s,title:St.sanitizeText(n,Fe())})}}addDescription(e,r){let n=this.currentDocument.states.get(e),i=r.startsWith(":")?r.replace(":","").trim():r;n.descriptions.push(St.sanitizeText(i,Fe()))}cleanupLabel(e){return e.substring(0,1)===":"?e.substr(2).trim():e.trim()}getDividerId(){return this.dividerCnt++,"divider-id-"+this.dividerCnt}addStyleClass(e,r=""){this.classes.has(e)||this.classes.set(e,{id:e,styles:[],textStyles:[]});let n=this.classes.get(e);r?.split(n7t).forEach(i=>{let a=i.replace(/([^;]*);/,"$1").trim();if(RegExp(d_e).exec(i)){let o=a.replace(p_e,r7t).replace(d_e,p_e);n.textStyles.push(o)}n.styles.push(a)})}getClasses(){return this.classes}setCssClass(e,r){e.split(",").forEach(n=>{let i=this.getState(n);if(i===void 0){let a=n.trim();this.addState(a),i=this.getState(a)}i.classes.push(r)})}setStyle(e,r){let n=this.getState(e);n!==void 0&&n.styles.push(r)}setTextStyle(e,r){let n=this.getState(e);n!==void 0&&n.textStyles.push(r)}getDirectionStatement(){return this.rootDoc.find(e=>e.stmt===a_e)}getDirection(){return this.getDirectionStatement()?.value??I6t}setDirection(e){let r=this.getDirectionStatement();r?r.value=e:this.rootDoc.unshift({stmt:a_e,value:e})}trimColon(e){return e&&e[0]===":"?e.substr(1).trim():e.trim()}getData(){let e=Fe();return{nodes:this.nodes,edges:this.edges,other:{},config:e,direction:C_e(this.getRootDocV2())}}getConfig(){return Fe().state}getAccTitle=tn;setAccTitle=en;getAccDescription=nn;setAccDescription=rn;setDiagramTitle=pn;getDiagramTitle=an},b(ig,"StateDB"),Hw(ig,"relationType",{AGGREGATION:0,EXTENSION:1,COMPOSITION:2,DEPENDENCY:3}),ig),i7t=b(t=>` defs #statediagram-barbEnd { fill: ${t.transitionColor}; stroke: ${t.transitionColor}; @@ -1740,12 +1996,12 @@ g.stateGroup line { font-size: 18px; fill: ${t.textColor}; } -`,"getStyles"),y9=_bt});var l_e={};lr(l_e,{diagram:()=>Ybt});var Gq,Abt,Lbt,s_e,Rbt,Ibt,Dbt,Nbt,Mbt,Obt,Pbt,Bbt,Fbt,zbt,$bt,a_e,i_e,Gbt,Zo,$q,Ubt,qbt,Vbt,Hbt,o_e,Wbt,Ybt,u_e=A(()=>{zq();wc();su();au();sl();Fo();eo();Mo();Fi();ln();ur();cr();zB();pl();cr();Gq={},Abt=x((t,e)=>{Gq[t]=e},"set"),Lbt=x(t=>Gq[t],"get"),s_e=x(()=>Object.keys(Gq),"keys"),Rbt=x(()=>s_e().length,"size"),Ibt={get:Lbt,set:Abt,keys:s_e,size:Rbt},Dbt=x(t=>t.append("circle").attr("class","start-state").attr("r",Te().state.sizeUnit).attr("cx",Te().state.padding+Te().state.sizeUnit).attr("cy",Te().state.padding+Te().state.sizeUnit),"drawStartState"),Nbt=x(t=>t.append("line").style("stroke","grey").style("stroke-dasharray","3").attr("x1",Te().state.textHeight).attr("class","divider").attr("x2",Te().state.textHeight*2).attr("y1",0).attr("y2",0),"drawDivider"),Mbt=x((t,e)=>{let r=t.append("text").attr("x",2*Te().state.padding).attr("y",Te().state.textHeight+2*Te().state.padding).attr("font-size",Te().state.fontSize).attr("class","state-title").text(e.id),n=r.node().getBBox();return t.insert("rect",":first-child").attr("x",Te().state.padding).attr("y",Te().state.padding).attr("width",n.width+2*Te().state.padding).attr("height",n.height+2*Te().state.padding).attr("rx",Te().state.radius),r},"drawSimpleState"),Obt=x((t,e)=>{let r=x(function(d,p,m){let g=d.append("tspan").attr("x",2*Te().state.padding).text(p);m||g.attr("dy",Te().state.textHeight)},"addTspan"),a=t.append("text").attr("x",2*Te().state.padding).attr("y",Te().state.textHeight+1.3*Te().state.padding).attr("font-size",Te().state.fontSize).attr("class","state-title").text(e.descriptions[0]).node().getBBox(),i=a.height,s=t.append("text").attr("x",Te().state.padding).attr("y",i+Te().state.padding*.4+Te().state.dividerMargin+Te().state.textHeight).attr("class","state-description"),o=!0,l=!0;e.descriptions.forEach(function(d){o||(r(s,d,l),l=!1),o=!1});let u=t.append("line").attr("x1",Te().state.padding).attr("y1",Te().state.padding+i+Te().state.dividerMargin/2).attr("y2",Te().state.padding+i+Te().state.dividerMargin/2).attr("class","descr-divider"),h=s.node().getBBox(),f=Math.max(h.width,a.width);return u.attr("x2",f+3*Te().state.padding),t.insert("rect",":first-child").attr("x",Te().state.padding).attr("y",Te().state.padding).attr("width",f+2*Te().state.padding).attr("height",h.height+i+2*Te().state.padding).attr("rx",Te().state.radius),t},"drawDescrState"),Pbt=x((t,e,r)=>{let n=Te().state.padding,a=2*Te().state.padding,i=t.node().getBBox(),s=i.width,o=i.x,l=t.append("text").attr("x",0).attr("y",Te().state.titleShift).attr("font-size",Te().state.fontSize).attr("class","state-title").text(e.id),h=l.node().getBBox().width+a,f=Math.max(h,s);f===s&&(f=f+a);let d,p=t.node().getBBox();e.doc,d=o-n,h>s&&(d=(s-f)/2+n),Math.abs(o-p.x)s&&(d=o-(h-s)/2);let m=1-Te().state.textHeight;return t.insert("rect",":first-child").attr("x",d).attr("y",m).attr("class",r?"alt-composit":"composit").attr("width",f).attr("height",p.height+Te().state.textHeight+Te().state.titleShift+1).attr("rx","0"),l.attr("x",d+n),h<=s&&l.attr("x",o+(f-a)/2-h/2+n),t.insert("rect",":first-child").attr("x",d).attr("y",Te().state.titleShift-Te().state.textHeight-Te().state.padding).attr("width",f).attr("height",Te().state.textHeight*3).attr("rx",Te().state.radius),t.insert("rect",":first-child").attr("x",d).attr("y",Te().state.titleShift-Te().state.textHeight-Te().state.padding).attr("width",f).attr("height",p.height+3+2*Te().state.textHeight).attr("rx",Te().state.radius),t},"addTitleAndBox"),Bbt=x(t=>(t.append("circle").attr("class","end-state-outer").attr("r",Te().state.sizeUnit+Te().state.miniPadding).attr("cx",Te().state.padding+Te().state.sizeUnit+Te().state.miniPadding).attr("cy",Te().state.padding+Te().state.sizeUnit+Te().state.miniPadding),t.append("circle").attr("class","end-state-inner").attr("r",Te().state.sizeUnit).attr("cx",Te().state.padding+Te().state.sizeUnit+2).attr("cy",Te().state.padding+Te().state.sizeUnit+2)),"drawEndState"),Fbt=x((t,e)=>{let r=Te().state.forkWidth,n=Te().state.forkHeight;if(e.parentId){let a=r;r=n,n=a}return t.append("rect").style("stroke","black").style("fill","black").attr("width",r).attr("height",n).attr("x",Te().state.padding).attr("y",Te().state.padding)},"drawForkJoinState"),zbt=x((t,e,r,n)=>{let a=0,i=n.append("text");i.style("text-anchor","start"),i.attr("class","noteText");let s=t.replace(/\r\n/g,"
    ");s=s.replace(/\n/g,"
    ");let o=s.split(Ze.lineBreakRegex),l=1.25*Te().state.noteMargin;for(let u of o){let h=u.trim();if(h.length>0){let f=i.append("tspan");if(f.text(h),l===0){let d=f.node().getBBox();l+=d.height}a+=l,f.attr("x",e+Te().state.noteMargin),f.attr("y",r+a+1.25*Te().state.noteMargin)}}return{textWidth:i.node().getBBox().width,textHeight:a}},"_drawLongText"),$bt=x((t,e)=>{e.attr("class","state-note");let r=e.append("rect").attr("x",0).attr("y",Te().state.padding),n=e.append("g"),{textWidth:a,textHeight:i}=zbt(t,0,0,n);return r.attr("height",i+2*Te().state.noteMargin),r.attr("width",a+Te().state.noteMargin*2),r},"drawNote"),a_e=x(function(t,e){let r=e.id,n={id:r,label:e.id,width:0,height:0},a=t.append("g").attr("id",r).attr("class","stateGroup");e.type==="start"&&Dbt(a),e.type==="end"&&Bbt(a),(e.type==="fork"||e.type==="join")&&Fbt(a,e),e.type==="note"&&$bt(e.note.text,a),e.type==="divider"&&Nbt(a),e.type==="default"&&e.descriptions.length===0&&Mbt(a,e),e.type==="default"&&e.descriptions.length>0&&Obt(a,e);let i=a.node().getBBox();return n.width=i.width+2*Te().state.padding,n.height=i.height+2*Te().state.padding,Ibt.set(r,n),n},"drawState"),i_e=0,Gbt=x(function(t,e,r){let n=x(function(l){switch(l){case mf.relationType.AGGREGATION:return"aggregation";case mf.relationType.EXTENSION:return"extension";case mf.relationType.COMPOSITION:return"composition";case mf.relationType.DEPENDENCY:return"dependency"}},"getRelationType");e.points=e.points.filter(l=>!Number.isNaN(l.y));let a=e.points,i=tc().x(function(l){return l.x}).y(function(l){return l.y}).curve(eu),s=t.append("path").attr("d",i(a)).attr("id","edge"+i_e).attr("class","transition"),o="";if(Te().state.arrowMarkerAbsolute&&(o=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,o=o.replace(/\(/g,"\\("),o=o.replace(/\)/g,"\\)")),s.attr("marker-end","url("+o+"#"+n(mf.relationType.DEPENDENCY)+"End)"),r.title!==void 0){let l=t.append("g").attr("class","stateLabel"),{x:u,y:h}=Wt.calcLabelPosition(e.points),f=Ze.getRows(r.title),d=0,p=[],m=0,g=0;for(let b=0;b<=f.length;b++){let w=l.append("text").attr("text-anchor","middle").text(f[b]).attr("x",u).attr("y",h+d),C=w.node().getBBox();m=Math.max(m,C.width),g=Math.min(g,C.x),te.info(C.x,u,h+d),d===0&&(d=w.node().getBBox().height,te.info("Title height",d,h)),p.push(w)}let v=d*f.length;if(f.length>1){let b=(f.length-1)*d*.5;p.forEach((w,C)=>w.attr("y",h+C*d-b)),v=d*f.length}let y=l.node().getBBox();l.insert("rect",":first-child").attr("class","box").attr("x",u-m/2-Te().state.padding/2).attr("y",h-v/2-Te().state.padding/2-3.5).attr("width",m+Te().state.padding).attr("height",v+Te().state.padding),te.info(y)}i_e++},"drawEdge"),$q={},Ubt=x(function(){},"setConf"),qbt=x(function(t){t.append("defs").append("marker").attr("id","dependencyEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")},"insertMarkers"),Vbt=x(function(t,e,r,n){Zo=Te().state;let a=Te().securityLevel,i;a==="sandbox"&&(i=We("#i"+e));let s=a==="sandbox"?We(i.nodes()[0].contentDocument.body):We("body"),o=a==="sandbox"?i.nodes()[0].contentDocument:document;te.debug("Rendering diagram "+t);let l=s.select(`[id='${e}']`);qbt(l);let u=n.db.getRootDoc();o_e(u,l,void 0,!1,s,o,n);let h=Zo.padding,f=l.node().getBBox(),d=f.width+h*2,p=f.height+h*2,m=d*1.75;gn(l,p,m,Zo.useMaxWidth),l.attr("viewBox",`${f.x-Zo.padding} ${f.y-Zo.padding} `+d+" "+p)},"draw"),Hbt=x(t=>t?t.length*Zo.fontSizeFactor:1,"getLabelWidth"),o_e=x((t,e,r,n,a,i,s)=>{let o=new Jr({compound:!0,multigraph:!0}),l,u=!0;for(l=0;l{let k=C.parentElement,E=0,_=0;k&&(k.parentElement&&(E=k.parentElement.getBBox().width),_=parseInt(k.getAttribute("data-x-shift"),10),Number.isNaN(_)&&(_=0)),C.setAttribute("x1",0-_+8),C.setAttribute("x2",E-_-8)})):te.debug("No Node "+b+": "+JSON.stringify(o.node(b)))});let v=g.getBBox();o.edges().forEach(function(b){b!==void 0&&o.edge(b)!==void 0&&(te.debug("Edge "+b.v+" -> "+b.w+": "+JSON.stringify(o.edge(b))),Gbt(e,o.edge(b),o.edge(b).relation))}),v=g.getBBox();let y={id:r||"root",label:r||"root",width:0,height:0};return y.width=v.width+2*Zo.padding,y.height=v.height+2*Zo.padding,te.debug("Doc rendered",y,o),y},"renderDoc"),Wbt={setConf:Ubt,draw:Vbt},Ybt={parser:v9,get db(){return new mf(1)},renderer:Wbt,styles:y9,init:x(t=>{t.state||(t.state={}),t.state.arrowMarkerAbsolute=t.arrowMarkerAbsolute},"init")}});var c_e={};lr(c_e,{diagram:()=>Xbt});var Xbt,h_e=A(()=>{zq();wc();su();au();sl();Fo();eo();Mo();Fi();ln();ur();Xbt={parser:v9,get db(){return new mf(2)},renderer:t_e,styles:y9,init:x(t=>{t.state||(t.state={}),t.state.arrowMarkerAbsolute=t.arrowMarkerAbsolute},"init")}});var w_e={};lr(w_e,{diagram:()=>m4t});function b_e(t){let e=Te().journey,r=60;Object.keys(gf).forEach(n=>{let a=gf[n].color,i={cx:20,cy:r,r:7,fill:a,stroke:"#000",pos:gf[n].position};h6.drawCircle(t,i);let s={x:40,y:r+7,fill:"#666",text:n,textMargin:e.boxTextMargin|5};h6.drawText(t,s),r+=20})}var qq,jbt,Ax,Vq,u6,c6,Kbt,Zbt,Qbt,Jbt,e4t,t4t,r4t,f_e,n4t,d_e,a4t,i4t,Hq,s4t,v_e,y_e,o4t,l4t,p_e,u4t,c4t,x_e,h4t,h6,f4t,gf,x9,Km,d4t,Dl,Uq,m_e,p4t,g_e,m4t,k_e=A(()=>{f_();ur();cr();cr();qq=(function(){var t=x(function(f,d,p,m){for(p=p||{},m=f.length;m--;p[f[m]]=d);return p},"o"),e=[6,8,10,11,12,14,16,17,18],r=[1,9],n=[1,10],a=[1,11],i=[1,12],s=[1,13],o=[1,14],l={trace:x(function(){},"trace"),yy:{},symbols_:{error:2,start:3,journey:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NEWLINE:10,title:11,acc_title:12,acc_title_value:13,acc_descr:14,acc_descr_value:15,acc_descr_multiline_value:16,section:17,taskName:18,taskData:19,$accept:0,$end:1},terminals_:{2:"error",4:"journey",6:"EOF",8:"SPACE",10:"NEWLINE",11:"title",12:"acc_title",13:"acc_title_value",14:"acc_descr",15:"acc_descr_value",16:"acc_descr_multiline_value",17:"section",18:"taskName",19:"taskData"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[9,1],[9,2],[9,2],[9,1],[9,1],[9,2]],performAction:x(function(d,p,m,g,v,y,b){var w=y.length-1;switch(v){case 1:return y[w-1];case 2:this.$=[];break;case 3:y[w-1].push(y[w]),this.$=y[w-1];break;case 4:case 5:this.$=y[w];break;case 6:case 7:this.$=[];break;case 8:g.setDiagramTitle(y[w].substr(6)),this.$=y[w].substr(6);break;case 9:this.$=y[w].trim(),g.setAccTitle(this.$);break;case 10:case 11:this.$=y[w].trim(),g.setAccDescription(this.$);break;case 12:g.addSection(y[w].substr(8)),this.$=y[w].substr(8);break;case 13:g.addTask(y[w-1],y[w]),this.$="task";break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},t(e,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:r,12:n,14:a,16:i,17:s,18:o},t(e,[2,7],{1:[2,1]}),t(e,[2,3]),{9:15,11:r,12:n,14:a,16:i,17:s,18:o},t(e,[2,5]),t(e,[2,6]),t(e,[2,8]),{13:[1,16]},{15:[1,17]},t(e,[2,11]),t(e,[2,12]),{19:[1,18]},t(e,[2,4]),t(e,[2,9]),t(e,[2,10]),t(e,[2,13])],defaultActions:{},parseError:x(function(d,p){if(p.recoverable)this.trace(d);else{var m=new Error(d);throw m.hash=p,m}},"parseError"),parse:x(function(d){var p=this,m=[0],g=[],v=[null],y=[],b=this.table,w="",C=0,k=0,E=0,_=2,S=1,L=y.slice.call(arguments,1),M=Object.create(this.lexer),D={yy:{}};for(var T in this.yy)Object.prototype.hasOwnProperty.call(this.yy,T)&&(D.yy[T]=this.yy[T]);M.setInput(d,D.yy),D.yy.lexer=M,D.yy.parser=this,typeof M.yylloc>"u"&&(M.yylloc={});var I=M.yylloc;y.push(I);var N=M.options&&M.options.ranges;typeof D.yy.parseError=="function"?this.parseError=D.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function O(J){m.length=m.length-2*J,v.length=v.length-J,y.length=y.length-J}x(O,"popStack");function R(){var J;return J=g.pop()||M.lex()||S,typeof J!="number"&&(J instanceof Array&&(g=J,J=g.pop()),J=p.symbols_[J]||J),J}x(R,"lex");for(var P,B,F,G,z,H,Q={},Y,ie,se,oe;;){if(F=m[m.length-1],this.defaultActions[F]?G=this.defaultActions[F]:((P===null||typeof P>"u")&&(P=R()),G=b[F]&&b[F][P]),typeof G>"u"||!G.length||!G[0]){var pe="";oe=[];for(Y in b[F])this.terminals_[Y]&&Y>_&&oe.push("'"+this.terminals_[Y]+"'");M.showPosition?pe="Parse error on line "+(C+1)+`: -`+M.showPosition()+` -Expecting `+oe.join(", ")+", got '"+(this.terminals_[P]||P)+"'":pe="Parse error on line "+(C+1)+": Unexpected "+(P==S?"end of input":"'"+(this.terminals_[P]||P)+"'"),this.parseError(pe,{text:M.match,token:this.terminals_[P]||P,line:M.yylineno,loc:I,expected:oe})}if(G[0]instanceof Array&&G.length>1)throw new Error("Parse Error: multiple actions possible at state: "+F+", token: "+P);switch(G[0]){case 1:m.push(P),v.push(M.yytext),y.push(M.yylloc),m.push(G[1]),P=null,B?(P=B,B=null):(k=M.yyleng,w=M.yytext,C=M.yylineno,I=M.yylloc,E>0&&E--);break;case 2:if(ie=this.productions_[G[1]][1],Q.$=v[v.length-ie],Q._$={first_line:y[y.length-(ie||1)].first_line,last_line:y[y.length-1].last_line,first_column:y[y.length-(ie||1)].first_column,last_column:y[y.length-1].last_column},N&&(Q._$.range=[y[y.length-(ie||1)].range[0],y[y.length-1].range[1]]),H=this.performAction.apply(Q,[w,k,C,D.yy,G[1],v,y].concat(L)),typeof H<"u")return H;ie&&(m=m.slice(0,-1*ie*2),v=v.slice(0,-1*ie),y=y.slice(0,-1*ie)),m.push(this.productions_[G[1]][0]),v.push(Q.$),y.push(Q._$),se=b[m[m.length-2]][m[m.length-1]],m.push(se);break;case 3:return!0}}return!0},"parse")},u=(function(){var f={EOF:1,parseError:x(function(p,m){if(this.yy.parser)this.yy.parser.parseError(p,m);else throw new Error(p)},"parseError"),setInput:x(function(d,p){return this.yy=p||this.yy||{},this._input=d,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:x(function(){var d=this._input[0];this.yytext+=d,this.yyleng++,this.offset++,this.match+=d,this.matched+=d;var p=d.match(/(?:\r\n?|\n).*/g);return p?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),d},"input"),unput:x(function(d){var p=d.length,m=d.split(/(?:\r\n?|\n)/g);this._input=d+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-p),this.offset-=p;var g=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),m.length-1&&(this.yylineno-=m.length-1);var v=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:m?(m.length===g.length?this.yylloc.first_column:0)+g[g.length-m.length].length-m[0].length:this.yylloc.first_column-p},this.options.ranges&&(this.yylloc.range=[v[0],v[0]+this.yyleng-p]),this.yyleng=this.yytext.length,this},"unput"),more:x(function(){return this._more=!0,this},"more"),reject:x(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). -`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:x(function(d){this.unput(this.match.slice(d))},"less"),pastInput:x(function(){var d=this.matched.substr(0,this.matched.length-this.match.length);return(d.length>20?"...":"")+d.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:x(function(){var d=this.match;return d.length<20&&(d+=this._input.substr(0,20-d.length)),(d.substr(0,20)+(d.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:x(function(){var d=this.pastInput(),p=new Array(d.length+1).join("-");return d+this.upcomingInput()+` -`+p+"^"},"showPosition"),test_match:x(function(d,p){var m,g,v;if(this.options.backtrack_lexer&&(v={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(v.yylloc.range=this.yylloc.range.slice(0))),g=d[0].match(/(?:\r\n?|\n).*/g),g&&(this.yylineno+=g.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:g?g[g.length-1].length-g[g.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+d[0].length},this.yytext+=d[0],this.match+=d[0],this.matches=d,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(d[0].length),this.matched+=d[0],m=this.performAction.call(this,this.yy,this,p,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),m)return m;if(this._backtrack){for(var y in v)this[y]=v[y];return!1}return!1},"test_match"),next:x(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var d,p,m,g;this._more||(this.yytext="",this.match="");for(var v=this._currentRules(),y=0;yp[0].length)){if(p=m,g=y,this.options.backtrack_lexer){if(d=this.test_match(m,v[y]),d!==!1)return d;if(this._backtrack){p=!1;continue}else return!1}else if(!this.options.flex)break}return p?(d=this.test_match(p,v[g]),d!==!1?d:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. -`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:x(function(){var p=this.next();return p||this.lex()},"lex"),begin:x(function(p){this.conditionStack.push(p)},"begin"),popState:x(function(){var p=this.conditionStack.length-1;return p>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:x(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:x(function(p){return p=this.conditionStack.length-1-Math.abs(p||0),p>=0?this.conditionStack[p]:"INITIAL"},"topState"),pushState:x(function(p){this.begin(p)},"pushState"),stateStackSize:x(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:x(function(p,m,g,v){var y=v;switch(g){case 0:break;case 1:break;case 2:return 10;case 3:break;case 4:break;case 5:return 4;case 6:return 11;case 7:return this.begin("acc_title"),12;break;case 8:return this.popState(),"acc_title_value";break;case 9:return this.begin("acc_descr"),14;break;case 10:return this.popState(),"acc_descr_value";break;case 11:this.begin("acc_descr_multiline");break;case 12:this.popState();break;case 13:return"acc_descr_multiline_value";case 14:return 17;case 15:return 18;case 16:return 19;case 17:return":";case 18:return 6;case 19:return"INVALID"}},"anonymous"),rules:[/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:journey\b)/i,/^(?:title\s[^#\n;]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:section\s[^#:\n;]+)/i,/^(?:[^#:\n;]+)/i,/^(?::[^#\n;]+)/i,/^(?::)/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[12,13],inclusive:!1},acc_descr:{rules:[10],inclusive:!1},acc_title:{rules:[8],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,9,11,14,15,16,17,18,19],inclusive:!0}}};return f})();l.lexer=u;function h(){this.yy={}}return x(h,"Parser"),h.prototype=l,l.Parser=h,new h})();qq.parser=qq;jbt=qq,Ax="",Vq=[],u6=[],c6=[],Kbt=x(function(){Vq.length=0,u6.length=0,Ax="",c6.length=0,Cr()},"clear"),Zbt=x(function(t){Ax=t,Vq.push(t)},"addSection"),Qbt=x(function(){return Vq},"getSections"),Jbt=x(function(){let t=f_e(),e=100,r=0;for(;!t&&r{r.people&&t.push(...r.people)}),[...new Set(t)].sort()},"updateActors"),t4t=x(function(t,e){let r=e.substr(1).split(":"),n=0,a=[];r.length===1?(n=Number(r[0]),a=[]):(n=Number(r[0]),a=r[1].split(","));let i=a.map(o=>o.trim()),s={section:Ax,type:Ax,people:i,task:t,score:n};c6.push(s)},"addTask"),r4t=x(function(t){let e={section:Ax,type:Ax,description:t,task:t,classes:[]};u6.push(e)},"addTaskOrg"),f_e=x(function(){let t=x(function(r){return c6[r].processed},"compileTask"),e=!0;for(let[r,n]of c6.entries())t(r),e=e&&n.processed;return e},"compileTasks"),n4t=x(function(){return e4t()},"getActors"),d_e={getConfig:x(()=>Te().journey,"getConfig"),clear:Kbt,setDiagramTitle:Fr,getDiagramTitle:Rr,setAccTitle:Sr,getAccTitle:_r,setAccDescription:Ar,getAccDescription:Lr,addSection:Zbt,getSections:Qbt,getTasks:Jbt,addTask:t4t,addTaskOrg:r4t,getActors:n4t},a4t=x(t=>`.label { +`,"getStyles"),QL=i7t});var N_e={};Mr(N_e,{diagram:()=>E7t});var JV,a7t,s7t,I_e,o7t,l7t,u7t,c7t,h7t,f7t,d7t,p7t,m7t,g7t,y7t,R_e,D_e,v7t,Vl,QV,x7t,b7t,w7t,k7t,M_e,T7t,E7t,O_e=D(()=>{ZV();E0();ac();nc();iu();Il();Wo();Al();As();Hn();Nr();Or();Zz();fu();Or();JV={},a7t=b((t,e)=>{JV[t]=e},"set"),s7t=b(t=>JV[t],"get"),I_e=b(()=>Object.keys(JV),"keys"),o7t=b(()=>I_e().length,"size"),l7t={get:s7t,set:a7t,keys:I_e,size:o7t},u7t=b(t=>t.append("circle").attr("class","start-state").attr("r",Fe().state.sizeUnit).attr("cx",Fe().state.padding+Fe().state.sizeUnit).attr("cy",Fe().state.padding+Fe().state.sizeUnit),"drawStartState"),c7t=b(t=>t.append("line").style("stroke","grey").style("stroke-dasharray","3").attr("x1",Fe().state.textHeight).attr("class","divider").attr("x2",Fe().state.textHeight*2).attr("y1",0).attr("y2",0),"drawDivider"),h7t=b((t,e)=>{let r=t.append("text").attr("x",2*Fe().state.padding).attr("y",Fe().state.textHeight+2*Fe().state.padding).attr("font-size",Fe().state.fontSize).attr("class","state-title").text(e.id),n=r.node().getBBox();return t.insert("rect",":first-child").attr("x",Fe().state.padding).attr("y",Fe().state.padding).attr("width",n.width+2*Fe().state.padding).attr("height",n.height+2*Fe().state.padding).attr("rx",Fe().state.radius),r},"drawSimpleState"),f7t=b((t,e)=>{let r=b(function(d,p,m){let g=d.append("tspan").attr("x",2*Fe().state.padding).text(p);m||g.attr("dy",Fe().state.textHeight)},"addTspan"),i=t.append("text").attr("x",2*Fe().state.padding).attr("y",Fe().state.textHeight+1.3*Fe().state.padding).attr("font-size",Fe().state.fontSize).attr("class","state-title").text(e.descriptions[0]).node().getBBox(),a=i.height,s=t.append("text").attr("x",Fe().state.padding).attr("y",a+Fe().state.padding*.4+Fe().state.dividerMargin+Fe().state.textHeight).attr("class","state-description"),o=!0,l=!0;e.descriptions.forEach(function(d){o||(r(s,d,l),l=!1),o=!1});let u=t.append("line").attr("x1",Fe().state.padding).attr("y1",Fe().state.padding+a+Fe().state.dividerMargin/2).attr("y2",Fe().state.padding+a+Fe().state.dividerMargin/2).attr("class","descr-divider"),h=s.node().getBBox(),f=Math.max(h.width,i.width);return u.attr("x2",f+3*Fe().state.padding),t.insert("rect",":first-child").attr("x",Fe().state.padding).attr("y",Fe().state.padding).attr("width",f+2*Fe().state.padding).attr("height",h.height+a+2*Fe().state.padding).attr("rx",Fe().state.radius),t},"drawDescrState"),d7t=b((t,e,r)=>{let n=Fe().state.padding,i=2*Fe().state.padding,a=t.node().getBBox(),s=a.width,o=a.x,l=t.append("text").attr("x",0).attr("y",Fe().state.titleShift).attr("font-size",Fe().state.fontSize).attr("class","state-title").text(e.id),h=l.node().getBBox().width+i,f=Math.max(h,s);f===s&&(f=f+i);let d,p=t.node().getBBox();e.doc,d=o-n,h>s&&(d=(s-f)/2+n),Math.abs(o-p.x)s&&(d=o-(h-s)/2);let m=1-Fe().state.textHeight;return t.insert("rect",":first-child").attr("x",d).attr("y",m).attr("class",r?"alt-composit":"composit").attr("width",f).attr("height",p.height+Fe().state.textHeight+Fe().state.titleShift+1).attr("rx","0"),l.attr("x",d+n),h<=s&&l.attr("x",o+(f-i)/2-h/2+n),t.insert("rect",":first-child").attr("x",d).attr("y",Fe().state.titleShift-Fe().state.textHeight-Fe().state.padding).attr("width",f).attr("height",Fe().state.textHeight*3).attr("rx",Fe().state.radius),t.insert("rect",":first-child").attr("x",d).attr("y",Fe().state.titleShift-Fe().state.textHeight-Fe().state.padding).attr("width",f).attr("height",p.height+3+2*Fe().state.textHeight).attr("rx",Fe().state.radius),t},"addTitleAndBox"),p7t=b(t=>(t.append("circle").attr("class","end-state-outer").attr("r",Fe().state.sizeUnit+Fe().state.miniPadding).attr("cx",Fe().state.padding+Fe().state.sizeUnit+Fe().state.miniPadding).attr("cy",Fe().state.padding+Fe().state.sizeUnit+Fe().state.miniPadding),t.append("circle").attr("class","end-state-inner").attr("r",Fe().state.sizeUnit).attr("cx",Fe().state.padding+Fe().state.sizeUnit+2).attr("cy",Fe().state.padding+Fe().state.sizeUnit+2)),"drawEndState"),m7t=b((t,e)=>{let r=Fe().state.forkWidth,n=Fe().state.forkHeight;if(e.parentId){let i=r;r=n,n=i}return t.append("rect").style("stroke","black").style("fill","black").attr("width",r).attr("height",n).attr("x",Fe().state.padding).attr("y",Fe().state.padding)},"drawForkJoinState"),g7t=b((t,e,r,n)=>{let i=0,a=n.append("text");a.style("text-anchor","start"),a.attr("class","noteText");let s=t.replace(/\r\n/g,"
    ");s=s.replace(/\n/g,"
    ");let o=s.split(St.lineBreakRegex),l=1.25*Fe().state.noteMargin;for(let u of o){let h=u.trim();if(h.length>0){let f=a.append("tspan");if(f.text(h),l===0){let d=f.node().getBBox();l+=d.height}i+=l,f.attr("x",e+Fe().state.noteMargin),f.attr("y",r+i+1.25*Fe().state.noteMargin)}}return{textWidth:a.node().getBBox().width,textHeight:i}},"_drawLongText"),y7t=b((t,e)=>{e.attr("class","state-note");let r=e.append("rect").attr("x",0).attr("y",Fe().state.padding),n=e.append("g"),{textWidth:i,textHeight:a}=g7t(t,0,0,n);return r.attr("height",a+2*Fe().state.noteMargin),r.attr("width",i+Fe().state.noteMargin*2),r},"drawNote"),R_e=b(function(t,e){let r=e.id,n={id:r,label:e.id,width:0,height:0},i=t.append("g").attr("id",r).attr("class","stateGroup");e.type==="start"&&u7t(i),e.type==="end"&&p7t(i),(e.type==="fork"||e.type==="join")&&m7t(i,e),e.type==="note"&&y7t(e.note.text,i),e.type==="divider"&&c7t(i),e.type==="default"&&e.descriptions.length===0&&h7t(i,e),e.type==="default"&&e.descriptions.length>0&&f7t(i,e);let a=i.node().getBBox();return n.width=a.width+2*Fe().state.padding,n.height=a.height+2*Fe().state.padding,l7t.set(r,n),n},"drawState"),D_e=0,v7t=b(function(t,e,r){let n=b(function(l){switch(l){case bf.relationType.AGGREGATION:return"aggregation";case bf.relationType.EXTENSION:return"extension";case bf.relationType.COMPOSITION:return"composition";case bf.relationType.DEPENDENCY:return"dependency"}},"getRelationType");e.points=e.points.filter(l=>!Number.isNaN(l.y));let i=e.points,a=i0().x(function(l){return l.x}).y(function(l){return l.y}).curve(Ju),s=t.append("path").attr("d",a(i)).attr("id","edge"+D_e).attr("class","transition"),o="";if(Fe().state.arrowMarkerAbsolute&&(o=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,o=o.replace(/\(/g,"\\("),o=o.replace(/\)/g,"\\)")),s.attr("marker-end","url("+o+"#"+n(bf.relationType.DEPENDENCY)+"End)"),r.title!==void 0){let l=t.append("g").attr("class","stateLabel"),{x:u,y:h}=gr.calcLabelPosition(e.points),f=St.getRows(r.title),d=0,p=[],m=0,g=0;for(let x=0;x<=f.length;x++){let k=l.append("text").attr("text-anchor","middle").text(f[x]).attr("x",u).attr("y",h+d),_=k.node().getBBox();m=Math.max(m,_.width),g=Math.min(g,_.x),he.info(_.x,u,h+d),d===0&&(d=k.node().getBBox().height,he.info("Title height",d,h)),p.push(k)}let y=d*f.length;if(f.length>1){let x=(f.length-1)*d*.5;p.forEach((k,_)=>k.attr("y",h+_*d-x)),y=d*f.length}let v=l.node().getBBox();l.insert("rect",":first-child").attr("class","box").attr("x",u-m/2-Fe().state.padding/2).attr("y",h-y/2-Fe().state.padding/2-3.5).attr("width",m+Fe().state.padding).attr("height",y+Fe().state.padding),he.info(v)}D_e++},"drawEdge"),QV={},x7t=b(function(){},"setConf"),b7t=b(function(t){t.append("defs").append("marker").attr("id","dependencyEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")},"insertMarkers"),w7t=b(function(t,e,r,n){Vl=Fe().state;let i=Fe().securityLevel,a;i==="sandbox"&&(a=dt("#i"+e));let s=i==="sandbox"?dt(a.nodes()[0].contentDocument.body):dt("body"),o=i==="sandbox"?a.nodes()[0].contentDocument:document;he.debug("Rendering diagram "+t);let l=s.select(`[id='${e}']`);b7t(l);let u=n.db.getRootDoc();M_e(u,l,void 0,!1,s,o,n);let h=Vl.padding,f=l.node().getBBox(),d=f.width+h*2,p=f.height+h*2,m=d*1.75;ei(l,p,m,Vl.useMaxWidth),l.attr("viewBox",`${f.x-Vl.padding} ${f.y-Vl.padding} `+d+" "+p)},"draw"),k7t=b(t=>t?t.length*Vl.fontSizeFactor:1,"getLabelWidth"),M_e=b((t,e,r,n,i,a,s)=>{let o=new In({compound:!0,multigraph:!0}),l,u=!0;for(l=0;l{let T=_.parentElement,S=0,R=0;T&&(T.parentElement&&(S=T.parentElement.getBBox().width),R=parseInt(T.getAttribute("data-x-shift"),10),Number.isNaN(R)&&(R=0)),_.setAttribute("x1",0-R+8),_.setAttribute("x2",S-R-8)})):he.debug("No Node "+x+": "+JSON.stringify(o.node(x)))});let y=g.getBBox();o.edges().forEach(function(x){x!==void 0&&o.edge(x)!==void 0&&(he.debug("Edge "+x.v+" -> "+x.w+": "+JSON.stringify(o.edge(x))),v7t(e,o.edge(x),o.edge(x).relation))}),y=g.getBBox();let v={id:r||"root",label:r||"root",width:0,height:0};return v.width=y.width+2*Vl.padding,v.height=y.height+2*Vl.padding,he.debug("Doc rendered",v,o),v},"renderDoc"),T7t={setConf:x7t,draw:w7t},E7t={parser:ZL,get db(){return new bf(1)},renderer:T7t,styles:QL,init:b(t=>{t.state||(t.state={}),t.state.arrowMarkerAbsolute=t.arrowMarkerAbsolute},"init")}});var P_e={};Mr(P_e,{diagram:()=>S7t});var S7t,B_e=D(()=>{ZV();E0();ac();nc();iu();Il();Wo();Al();As();Hn();Nr();S7t={parser:ZL,get db(){return new bf(2)},renderer:__e,styles:QL,init:b(t=>{t.state||(t.state={}),t.state.arrowMarkerAbsolute=t.arrowMarkerAbsolute},"init")}});var Y_e={};Mr(Y_e,{diagram:()=>W7t});function W_e(t){let e=Fe().journey,r=60;Object.keys(wf).forEach(n=>{let i=wf[n].color,a={cx:20,cy:r,r:7,fill:i,stroke:"#000",pos:wf[n].position};A8.drawCircle(t,a);let s={x:40,y:r+7,fill:"#666",text:n,textMargin:e.boxTextMargin|5};A8.drawText(t,s),r+=20})}var tW,C7t,G4,rW,C8,_8,_7t,A7t,L7t,R7t,D7t,I7t,M7t,F_e,N7t,z_e,O7t,P7t,nW,B7t,U_e,H_e,F7t,z7t,$_e,$7t,G7t,V_e,q7t,A8,U7t,wf,JL,ag,H7t,Ru,eW,G_e,V7t,q_e,W7t,X_e=D(()=>{WS();Nr();Or();Or();tW=(function(){var t=b(function(f,d,p,m){for(p=p||{},m=f.length;m--;p[f[m]]=d);return p},"o"),e=[6,8,10,11,12,14,16,17,18],r=[1,9],n=[1,10],i=[1,11],a=[1,12],s=[1,13],o=[1,14],l={trace:b(function(){},"trace"),yy:{},symbols_:{error:2,start:3,journey:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NEWLINE:10,title:11,acc_title:12,acc_title_value:13,acc_descr:14,acc_descr_value:15,acc_descr_multiline_value:16,section:17,taskName:18,taskData:19,$accept:0,$end:1},terminals_:{2:"error",4:"journey",6:"EOF",8:"SPACE",10:"NEWLINE",11:"title",12:"acc_title",13:"acc_title_value",14:"acc_descr",15:"acc_descr_value",16:"acc_descr_multiline_value",17:"section",18:"taskName",19:"taskData"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[9,1],[9,2],[9,2],[9,1],[9,1],[9,2]],performAction:b(function(d,p,m,g,y,v,x){var k=v.length-1;switch(y){case 1:return v[k-1];case 2:this.$=[];break;case 3:v[k-1].push(v[k]),this.$=v[k-1];break;case 4:case 5:this.$=v[k];break;case 6:case 7:this.$=[];break;case 8:g.setDiagramTitle(v[k].substr(6)),this.$=v[k].substr(6);break;case 9:this.$=v[k].trim(),g.setAccTitle(this.$);break;case 10:case 11:this.$=v[k].trim(),g.setAccDescription(this.$);break;case 12:g.addSection(v[k].substr(8)),this.$=v[k].substr(8);break;case 13:g.addTask(v[k-1],v[k]),this.$="task";break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},t(e,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:r,12:n,14:i,16:a,17:s,18:o},t(e,[2,7],{1:[2,1]}),t(e,[2,3]),{9:15,11:r,12:n,14:i,16:a,17:s,18:o},t(e,[2,5]),t(e,[2,6]),t(e,[2,8]),{13:[1,16]},{15:[1,17]},t(e,[2,11]),t(e,[2,12]),{19:[1,18]},t(e,[2,4]),t(e,[2,9]),t(e,[2,10]),t(e,[2,13])],defaultActions:{},parseError:b(function(d,p){if(p.recoverable)this.trace(d);else{var m=new Error(d);throw m.hash=p,m}},"parseError"),parse:b(function(d){var p=this,m=[0],g=[],y=[null],v=[],x=this.table,k="",_=0,T=0,S=0,R=2,A=1,I=v.slice.call(arguments,1),P=Object.create(this.lexer),O={yy:{}};for(var C in this.yy)Object.prototype.hasOwnProperty.call(this.yy,C)&&(O.yy[C]=this.yy[C]);P.setInput(d,O.yy),O.yy.lexer=P,O.yy.parser=this,typeof P.yylloc>"u"&&(P.yylloc={});var N=P.yylloc;v.push(N);var B=P.options&&P.options.ranges;typeof O.yy.parseError=="function"?this.parseError=O.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function F(ue){m.length=m.length-2*ue,y.length=y.length-ue,v.length=v.length-ue}b(F,"popStack");function M(){var ue;return ue=g.pop()||P.lex()||A,typeof ue!="number"&&(ue instanceof Array&&(g=ue,ue=g.pop()),ue=p.symbols_[ue]||ue),ue}b(M,"lex");for(var $,z,q,V,U,J,se={},re,me,ge,ye;;){if(q=m[m.length-1],this.defaultActions[q]?V=this.defaultActions[q]:(($===null||typeof $>"u")&&($=M()),V=x[q]&&x[q][$]),typeof V>"u"||!V.length||!V[0]){var _e="";ye=[];for(re in x[q])this.terminals_[re]&&re>R&&ye.push("'"+this.terminals_[re]+"'");P.showPosition?_e="Parse error on line "+(_+1)+`: +`+P.showPosition()+` +Expecting `+ye.join(", ")+", got '"+(this.terminals_[$]||$)+"'":_e="Parse error on line "+(_+1)+": Unexpected "+($==A?"end of input":"'"+(this.terminals_[$]||$)+"'"),this.parseError(_e,{text:P.match,token:this.terminals_[$]||$,line:P.yylineno,loc:N,expected:ye})}if(V[0]instanceof Array&&V.length>1)throw new Error("Parse Error: multiple actions possible at state: "+q+", token: "+$);switch(V[0]){case 1:m.push($),y.push(P.yytext),v.push(P.yylloc),m.push(V[1]),$=null,z?($=z,z=null):(T=P.yyleng,k=P.yytext,_=P.yylineno,N=P.yylloc,S>0&&S--);break;case 2:if(me=this.productions_[V[1]][1],se.$=y[y.length-me],se._$={first_line:v[v.length-(me||1)].first_line,last_line:v[v.length-1].last_line,first_column:v[v.length-(me||1)].first_column,last_column:v[v.length-1].last_column},B&&(se._$.range=[v[v.length-(me||1)].range[0],v[v.length-1].range[1]]),J=this.performAction.apply(se,[k,T,_,O.yy,V[1],y,v].concat(I)),typeof J<"u")return J;me&&(m=m.slice(0,-1*me*2),y=y.slice(0,-1*me),v=v.slice(0,-1*me)),m.push(this.productions_[V[1]][0]),y.push(se.$),v.push(se._$),ge=x[m[m.length-2]][m[m.length-1]],m.push(ge);break;case 3:return!0}}return!0},"parse")},u=(function(){var f={EOF:1,parseError:b(function(p,m){if(this.yy.parser)this.yy.parser.parseError(p,m);else throw new Error(p)},"parseError"),setInput:b(function(d,p){return this.yy=p||this.yy||{},this._input=d,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:b(function(){var d=this._input[0];this.yytext+=d,this.yyleng++,this.offset++,this.match+=d,this.matched+=d;var p=d.match(/(?:\r\n?|\n).*/g);return p?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),d},"input"),unput:b(function(d){var p=d.length,m=d.split(/(?:\r\n?|\n)/g);this._input=d+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-p),this.offset-=p;var g=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),m.length-1&&(this.yylineno-=m.length-1);var y=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:m?(m.length===g.length?this.yylloc.first_column:0)+g[g.length-m.length].length-m[0].length:this.yylloc.first_column-p},this.options.ranges&&(this.yylloc.range=[y[0],y[0]+this.yyleng-p]),this.yyleng=this.yytext.length,this},"unput"),more:b(function(){return this._more=!0,this},"more"),reject:b(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). +`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:b(function(d){this.unput(this.match.slice(d))},"less"),pastInput:b(function(){var d=this.matched.substr(0,this.matched.length-this.match.length);return(d.length>20?"...":"")+d.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:b(function(){var d=this.match;return d.length<20&&(d+=this._input.substr(0,20-d.length)),(d.substr(0,20)+(d.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:b(function(){var d=this.pastInput(),p=new Array(d.length+1).join("-");return d+this.upcomingInput()+` +`+p+"^"},"showPosition"),test_match:b(function(d,p){var m,g,y;if(this.options.backtrack_lexer&&(y={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(y.yylloc.range=this.yylloc.range.slice(0))),g=d[0].match(/(?:\r\n?|\n).*/g),g&&(this.yylineno+=g.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:g?g[g.length-1].length-g[g.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+d[0].length},this.yytext+=d[0],this.match+=d[0],this.matches=d,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(d[0].length),this.matched+=d[0],m=this.performAction.call(this,this.yy,this,p,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),m)return m;if(this._backtrack){for(var v in y)this[v]=y[v];return!1}return!1},"test_match"),next:b(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var d,p,m,g;this._more||(this.yytext="",this.match="");for(var y=this._currentRules(),v=0;vp[0].length)){if(p=m,g=v,this.options.backtrack_lexer){if(d=this.test_match(m,y[v]),d!==!1)return d;if(this._backtrack){p=!1;continue}else return!1}else if(!this.options.flex)break}return p?(d=this.test_match(p,y[g]),d!==!1?d:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. +`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:b(function(){var p=this.next();return p||this.lex()},"lex"),begin:b(function(p){this.conditionStack.push(p)},"begin"),popState:b(function(){var p=this.conditionStack.length-1;return p>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:b(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:b(function(p){return p=this.conditionStack.length-1-Math.abs(p||0),p>=0?this.conditionStack[p]:"INITIAL"},"topState"),pushState:b(function(p){this.begin(p)},"pushState"),stateStackSize:b(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:b(function(p,m,g,y){var v=y;switch(g){case 0:break;case 1:break;case 2:return 10;case 3:break;case 4:break;case 5:return 4;case 6:return 11;case 7:return this.begin("acc_title"),12;break;case 8:return this.popState(),"acc_title_value";break;case 9:return this.begin("acc_descr"),14;break;case 10:return this.popState(),"acc_descr_value";break;case 11:this.begin("acc_descr_multiline");break;case 12:this.popState();break;case 13:return"acc_descr_multiline_value";case 14:return 17;case 15:return 18;case 16:return 19;case 17:return":";case 18:return 6;case 19:return"INVALID"}},"anonymous"),rules:[/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:journey\b)/i,/^(?:title\s[^#\n;]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:section\s[^#:\n;]+)/i,/^(?:[^#:\n;]+)/i,/^(?::[^#\n;]+)/i,/^(?::)/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[12,13],inclusive:!1},acc_descr:{rules:[10],inclusive:!1},acc_title:{rules:[8],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,9,11,14,15,16,17,18,19],inclusive:!0}}};return f})();l.lexer=u;function h(){this.yy={}}return b(h,"Parser"),h.prototype=l,l.Parser=h,new h})();tW.parser=tW;C7t=tW,G4="",rW=[],C8=[],_8=[],_7t=b(function(){rW.length=0,C8.length=0,G4="",_8.length=0,Jr()},"clear"),A7t=b(function(t){G4=t,rW.push(t)},"addSection"),L7t=b(function(){return rW},"getSections"),R7t=b(function(){let t=F_e(),e=100,r=0;for(;!t&&r{r.people&&t.push(...r.people)}),[...new Set(t)].sort()},"updateActors"),I7t=b(function(t,e){let r=e.substr(1).split(":"),n=0,i=[];r.length===1?(n=Number(r[0]),i=[]):(n=Number(r[0]),i=r[1].split(","));let a=i.map(o=>o.trim()),s={section:G4,type:G4,people:a,task:t,score:n};_8.push(s)},"addTask"),M7t=b(function(t){let e={section:G4,type:G4,description:t,task:t,classes:[]};C8.push(e)},"addTaskOrg"),F_e=b(function(){let t=b(function(r){return _8[r].processed},"compileTask"),e=!0;for(let[r,n]of _8.entries())t(r),e=e&&n.processed;return e},"compileTasks"),N7t=b(function(){return D7t()},"getActors"),z_e={getConfig:b(()=>Fe().journey,"getConfig"),clear:_7t,setDiagramTitle:pn,getDiagramTitle:an,setAccTitle:en,getAccTitle:tn,setAccDescription:rn,getAccDescription:nn,addSection:A7t,getSections:L7t,getTasks:R7t,addTask:I7t,addTaskOrg:M7t,getActors:N7t},O7t=b(t=>`.label { font-family: ${t.fontFamily}; color: ${t.textColor}; } @@ -1877,12 +2133,12 @@ Expecting `+oe.join(", ")+", got '"+(this.terminals_[P]||P)+"'":pe="Parse error .actor-5 { ${t.actor5?`fill: ${t.actor5}`:""}; } -`,"getStyles"),i4t=a4t,Hq=x(function(t,e){return sm(t,e)},"drawRect"),s4t=x(function(t,e){let n=t.append("circle").attr("cx",e.cx).attr("cy",e.cy).attr("class","face").attr("r",15).attr("stroke-width",2).attr("overflow","visible"),a=t.append("g");a.append("circle").attr("cx",e.cx-15/3).attr("cy",e.cy-15/3).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666"),a.append("circle").attr("cx",e.cx+15/3).attr("cy",e.cy-15/3).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666");function i(l){let u=ec().startAngle(Math.PI/2).endAngle(3*(Math.PI/2)).innerRadius(7.5).outerRadius(6.8181818181818175);l.append("path").attr("class","mouth").attr("d",u).attr("transform","translate("+e.cx+","+(e.cy+2)+")")}x(i,"smile");function s(l){let u=ec().startAngle(3*Math.PI/2).endAngle(5*(Math.PI/2)).innerRadius(7.5).outerRadius(6.8181818181818175);l.append("path").attr("class","mouth").attr("d",u).attr("transform","translate("+e.cx+","+(e.cy+7)+")")}x(s,"sad");function o(l){l.append("line").attr("class","mouth").attr("stroke",2).attr("x1",e.cx-5).attr("y1",e.cy+7).attr("x2",e.cx+5).attr("y2",e.cy+7).attr("class","mouth").attr("stroke-width","1px").attr("stroke","#666")}return x(o,"ambivalent"),e.score>3?i(a):e.score<3?s(a):o(a),n},"drawFace"),v_e=x(function(t,e){let r=t.append("circle");return r.attr("cx",e.cx),r.attr("cy",e.cy),r.attr("class","actor-"+e.pos),r.attr("fill",e.fill),r.attr("stroke",e.stroke),r.attr("r",e.r),r.class!==void 0&&r.attr("class",r.class),e.title!==void 0&&r.append("title").text(e.title),r},"drawCircle"),y_e=x(function(t,e){return Fme(t,e)},"drawText"),o4t=x(function(t,e){function r(a,i,s,o,l){return a+","+i+" "+(a+s)+","+i+" "+(a+s)+","+(i+o-l)+" "+(a+s-l*1.2)+","+(i+o)+" "+a+","+(i+o)}x(r,"genPoints");let n=t.append("polygon");n.attr("points",r(e.x,e.y,50,20,7)),n.attr("class","labelBox"),e.y=e.y+e.labelMargin,e.x=e.x+.5*e.labelMargin,y_e(t,e)},"drawLabel"),l4t=x(function(t,e,r){let n=t.append("g"),a=gc();a.x=e.x,a.y=e.y,a.fill=e.fill,a.width=r.width*e.taskCount+r.diagramMarginX*(e.taskCount-1),a.height=r.height,a.class="journey-section section-type-"+e.num,a.rx=3,a.ry=3,Hq(n,a),x_e(r)(e.text,n,a.x,a.y,a.width,a.height,{class:"journey-section section-type-"+e.num},r,e.colour)},"drawSection"),p_e=-1,u4t=x(function(t,e,r){let n=e.x+r.width/2,a=t.append("g");p_e++,a.append("line").attr("id","task"+p_e).attr("x1",n).attr("y1",e.y).attr("x2",n).attr("y2",450).attr("class","task-line").attr("stroke-width","1px").attr("stroke-dasharray","4 2").attr("stroke","#666"),s4t(a,{cx:n,cy:300+(5-e.score)*30,score:e.score});let s=gc();s.x=e.x,s.y=e.y,s.fill=e.fill,s.width=r.width,s.height=r.height,s.class="task task-type-"+e.num,s.rx=3,s.ry=3,Hq(a,s);let o=e.x+14;e.people.forEach(l=>{let u=e.actors[l].color,h={cx:o,cy:e.y,r:7,fill:u,stroke:"#000",title:l,pos:e.actors[l].position};v_e(a,h),o+=10}),x_e(r)(e.task,a,s.x,s.y,s.width,s.height,{class:"task"},r,e.colour)},"drawTask"),c4t=x(function(t,e){c_(t,e)},"drawBackgroundRect"),x_e=(function(){function t(a,i,s,o,l,u,h,f){let d=i.append("text").attr("x",s+l/2).attr("y",o+u/2+5).style("font-color",f).style("text-anchor","middle").text(a);n(d,h)}x(t,"byText");function e(a,i,s,o,l,u,h,f,d){let{taskFontSize:p,taskFontFamily:m}=f,g=a.split(//gi);for(let v=0;v{gf[y]={color:a.actorColours[d%a.actorColours.length],position:d},d++}),b_e(l),Dl.insert(0,0,Km,Object.keys(gf).length*50),p4t(l,u,0);let p=Dl.getBounds();h&&l.append("text").text(h).attr("x",Km).attr("font-size","4ex").attr("font-weight","bold").attr("y",25);let m=p.stopy-p.starty+2*a.diagramMarginY,g=Km+p.stopx+2*a.diagramMarginX;gn(l,m,g,a.useMaxWidth),l.append("line").attr("x1",Km).attr("y1",a.height*4).attr("x2",g-Km-4).attr("y2",a.height*4).attr("stroke-width",4).attr("stroke","black").attr("marker-end","url(#arrowhead)");let v=h?70:0;l.attr("viewBox",`${p.startx} -25 ${g} ${m+v}`),l.attr("preserveAspectRatio","xMinYMin meet"),l.attr("height",m+v+25)},"draw"),Dl={data:{startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},verticalPos:0,sequenceItems:[],init:x(function(){this.sequenceItems=[],this.data={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},this.verticalPos=0},"init"),updateVal:x(function(t,e,r,n){t[e]===void 0?t[e]=r:t[e]=n(r,t[e])},"updateVal"),updateBounds:x(function(t,e,r,n){let a=Te().journey,i=this,s=0;function o(l){return x(function(h){s++;let f=i.sequenceItems.length-s+1;i.updateVal(h,"starty",e-f*a.boxMargin,Math.min),i.updateVal(h,"stopy",n+f*a.boxMargin,Math.max),i.updateVal(Dl.data,"startx",t-f*a.boxMargin,Math.min),i.updateVal(Dl.data,"stopx",r+f*a.boxMargin,Math.max),l!=="activation"&&(i.updateVal(h,"startx",t-f*a.boxMargin,Math.min),i.updateVal(h,"stopx",r+f*a.boxMargin,Math.max),i.updateVal(Dl.data,"starty",e-f*a.boxMargin,Math.min),i.updateVal(Dl.data,"stopy",n+f*a.boxMargin,Math.max))},"updateItemBounds")}x(o,"updateFn"),this.sequenceItems.forEach(o())},"updateBounds"),insert:x(function(t,e,r,n){let a=Math.min(t,r),i=Math.max(t,r),s=Math.min(e,n),o=Math.max(e,n);this.updateVal(Dl.data,"startx",a,Math.min),this.updateVal(Dl.data,"starty",s,Math.min),this.updateVal(Dl.data,"stopx",i,Math.max),this.updateVal(Dl.data,"stopy",o,Math.max),this.updateBounds(a,s,i,o)},"insert"),bumpVerticalPos:x(function(t){this.verticalPos=this.verticalPos+t,this.data.stopy=this.verticalPos},"bumpVerticalPos"),getVerticalPos:x(function(){return this.verticalPos},"getVerticalPos"),getBounds:x(function(){return this.data},"getBounds")},Uq=x9.sectionFills,m_e=x9.sectionColours,p4t=x(function(t,e,r){let n=Te().journey,a="",i=n.height*2+n.diagramMarginY,s=r+i,o=0,l="#CCC",u="black",h=0;for(let[f,d]of e.entries()){if(a!==d.section){l=Uq[o%Uq.length],h=o%Uq.length,u=m_e[o%m_e.length];let m=0,g=d.section;for(let y=f;y(gf[g]&&(m[g]=gf[g]),m),{});d.x=f*n.taskMargin+f*n.width+Km,d.y=s,d.width=n.diagramMarginX,d.height=n.diagramMarginY,d.colour=u,d.fill=l,d.num=h,d.actors=p,h6.drawTask(t,d,n),Dl.insert(d.x,d.y,d.x+d.width+n.taskMargin,450)}},"drawTasks"),g_e={setConf:f4t,draw:d4t},m4t={parser:jbt,db:d_e,renderer:g_e,styles:i4t,init:x(t=>{g_e.setConf(t.journey),d_e.clear()},"init")}});var F_e={};lr(F_e,{diagram:()=>P4t});function jq(t,e){t.each(function(){var r=We(this),n=r.text().split(/(\s+|
    )/).reverse(),a,i=[],s=1.1,o=r.attr("y"),l=parseFloat(r.attr("dy")),u=r.text(null).append("tspan").attr("x",0).attr("y",o).attr("dy",l+"em");for(let h=0;he||a==="
    ")&&(i.pop(),u.text(i.join(" ").trim()),a==="
    "?i=[""]:i=[a],u=r.append("tspan").attr("x",0).attr("y",o).attr("dy",s+"em").text(a))})}var Wq,g4t,S_e,Lx,__e,Yq,b9,Rx,A_e,L_e,R_e,I_e,D_e,N_e,M_e,O_e,T_e,v4t,y4t,w9,x4t,b4t,P_e,w4t,k4t,E_e,T4t,E4t,C4t,Xq,B_e,S4t,_4t,A4t,L4t,Zm,R4t,C_e,I4t,D4t,N4t,M4t,O4t,P4t,z_e=A(()=>{ur();cr();cr();Lo();Wq=(function(){var t=x(function(d,p,m,g){for(m=m||{},g=d.length;g--;m[d[g]]=p);return m},"o"),e=[6,8,10,11,12,14,16,17,20,21],r=[1,9],n=[1,10],a=[1,11],i=[1,12],s=[1,13],o=[1,16],l=[1,17],u={trace:x(function(){},"trace"),yy:{},symbols_:{error:2,start:3,timeline:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NEWLINE:10,title:11,acc_title:12,acc_title_value:13,acc_descr:14,acc_descr_value:15,acc_descr_multiline_value:16,section:17,period_statement:18,event_statement:19,period:20,event:21,$accept:0,$end:1},terminals_:{2:"error",4:"timeline",6:"EOF",8:"SPACE",10:"NEWLINE",11:"title",12:"acc_title",13:"acc_title_value",14:"acc_descr",15:"acc_descr_value",16:"acc_descr_multiline_value",17:"section",20:"period",21:"event"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[9,1],[9,2],[9,2],[9,1],[9,1],[9,1],[9,1],[18,1],[19,1]],performAction:x(function(p,m,g,v,y,b,w){var C=b.length-1;switch(y){case 1:return b[C-1];case 2:this.$=[];break;case 3:b[C-1].push(b[C]),this.$=b[C-1];break;case 4:case 5:this.$=b[C];break;case 6:case 7:this.$=[];break;case 8:v.getCommonDb().setDiagramTitle(b[C].substr(6)),this.$=b[C].substr(6);break;case 9:this.$=b[C].trim(),v.getCommonDb().setAccTitle(this.$);break;case 10:case 11:this.$=b[C].trim(),v.getCommonDb().setAccDescription(this.$);break;case 12:v.addSection(b[C].substr(8)),this.$=b[C].substr(8);break;case 15:v.addTask(b[C],0,""),this.$=b[C];break;case 16:v.addEvent(b[C].substr(2)),this.$=b[C];break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},t(e,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:r,12:n,14:a,16:i,17:s,18:14,19:15,20:o,21:l},t(e,[2,7],{1:[2,1]}),t(e,[2,3]),{9:18,11:r,12:n,14:a,16:i,17:s,18:14,19:15,20:o,21:l},t(e,[2,5]),t(e,[2,6]),t(e,[2,8]),{13:[1,19]},{15:[1,20]},t(e,[2,11]),t(e,[2,12]),t(e,[2,13]),t(e,[2,14]),t(e,[2,15]),t(e,[2,16]),t(e,[2,4]),t(e,[2,9]),t(e,[2,10])],defaultActions:{},parseError:x(function(p,m){if(m.recoverable)this.trace(p);else{var g=new Error(p);throw g.hash=m,g}},"parseError"),parse:x(function(p){var m=this,g=[0],v=[],y=[null],b=[],w=this.table,C="",k=0,E=0,_=0,S=2,L=1,M=b.slice.call(arguments,1),D=Object.create(this.lexer),T={yy:{}};for(var I in this.yy)Object.prototype.hasOwnProperty.call(this.yy,I)&&(T.yy[I]=this.yy[I]);D.setInput(p,T.yy),T.yy.lexer=D,T.yy.parser=this,typeof D.yylloc>"u"&&(D.yylloc={});var N=D.yylloc;b.push(N);var O=D.options&&D.options.ranges;typeof T.yy.parseError=="function"?this.parseError=T.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function R(j){g.length=g.length-2*j,y.length=y.length-j,b.length=b.length-j}x(R,"popStack");function P(){var j;return j=v.pop()||D.lex()||L,typeof j!="number"&&(j instanceof Array&&(v=j,j=v.pop()),j=m.symbols_[j]||j),j}x(P,"lex");for(var B,F,G,z,H,Q,Y={},ie,se,oe,pe;;){if(G=g[g.length-1],this.defaultActions[G]?z=this.defaultActions[G]:((B===null||typeof B>"u")&&(B=P()),z=w[G]&&w[G][B]),typeof z>"u"||!z.length||!z[0]){var J="";pe=[];for(ie in w[G])this.terminals_[ie]&&ie>S&&pe.push("'"+this.terminals_[ie]+"'");D.showPosition?J="Parse error on line "+(k+1)+`: -`+D.showPosition()+` -Expecting `+pe.join(", ")+", got '"+(this.terminals_[B]||B)+"'":J="Parse error on line "+(k+1)+": Unexpected "+(B==L?"end of input":"'"+(this.terminals_[B]||B)+"'"),this.parseError(J,{text:D.match,token:this.terminals_[B]||B,line:D.yylineno,loc:N,expected:pe})}if(z[0]instanceof Array&&z.length>1)throw new Error("Parse Error: multiple actions possible at state: "+G+", token: "+B);switch(z[0]){case 1:g.push(B),y.push(D.yytext),b.push(D.yylloc),g.push(z[1]),B=null,F?(B=F,F=null):(E=D.yyleng,C=D.yytext,k=D.yylineno,N=D.yylloc,_>0&&_--);break;case 2:if(se=this.productions_[z[1]][1],Y.$=y[y.length-se],Y._$={first_line:b[b.length-(se||1)].first_line,last_line:b[b.length-1].last_line,first_column:b[b.length-(se||1)].first_column,last_column:b[b.length-1].last_column},O&&(Y._$.range=[b[b.length-(se||1)].range[0],b[b.length-1].range[1]]),Q=this.performAction.apply(Y,[C,E,k,T.yy,z[1],y,b].concat(M)),typeof Q<"u")return Q;se&&(g=g.slice(0,-1*se*2),y=y.slice(0,-1*se),b=b.slice(0,-1*se)),g.push(this.productions_[z[1]][0]),y.push(Y.$),b.push(Y._$),oe=w[g[g.length-2]][g[g.length-1]],g.push(oe);break;case 3:return!0}}return!0},"parse")},h=(function(){var d={EOF:1,parseError:x(function(m,g){if(this.yy.parser)this.yy.parser.parseError(m,g);else throw new Error(m)},"parseError"),setInput:x(function(p,m){return this.yy=m||this.yy||{},this._input=p,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:x(function(){var p=this._input[0];this.yytext+=p,this.yyleng++,this.offset++,this.match+=p,this.matched+=p;var m=p.match(/(?:\r\n?|\n).*/g);return m?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),p},"input"),unput:x(function(p){var m=p.length,g=p.split(/(?:\r\n?|\n)/g);this._input=p+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-m),this.offset-=m;var v=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),g.length-1&&(this.yylineno-=g.length-1);var y=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:g?(g.length===v.length?this.yylloc.first_column:0)+v[v.length-g.length].length-g[0].length:this.yylloc.first_column-m},this.options.ranges&&(this.yylloc.range=[y[0],y[0]+this.yyleng-m]),this.yyleng=this.yytext.length,this},"unput"),more:x(function(){return this._more=!0,this},"more"),reject:x(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). -`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:x(function(p){this.unput(this.match.slice(p))},"less"),pastInput:x(function(){var p=this.matched.substr(0,this.matched.length-this.match.length);return(p.length>20?"...":"")+p.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:x(function(){var p=this.match;return p.length<20&&(p+=this._input.substr(0,20-p.length)),(p.substr(0,20)+(p.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:x(function(){var p=this.pastInput(),m=new Array(p.length+1).join("-");return p+this.upcomingInput()+` -`+m+"^"},"showPosition"),test_match:x(function(p,m){var g,v,y;if(this.options.backtrack_lexer&&(y={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(y.yylloc.range=this.yylloc.range.slice(0))),v=p[0].match(/(?:\r\n?|\n).*/g),v&&(this.yylineno+=v.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:v?v[v.length-1].length-v[v.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+p[0].length},this.yytext+=p[0],this.match+=p[0],this.matches=p,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(p[0].length),this.matched+=p[0],g=this.performAction.call(this,this.yy,this,m,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),g)return g;if(this._backtrack){for(var b in y)this[b]=y[b];return!1}return!1},"test_match"),next:x(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var p,m,g,v;this._more||(this.yytext="",this.match="");for(var y=this._currentRules(),b=0;bm[0].length)){if(m=g,v=b,this.options.backtrack_lexer){if(p=this.test_match(g,y[b]),p!==!1)return p;if(this._backtrack){m=!1;continue}else return!1}else if(!this.options.flex)break}return m?(p=this.test_match(m,y[v]),p!==!1?p:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. -`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:x(function(){var m=this.next();return m||this.lex()},"lex"),begin:x(function(m){this.conditionStack.push(m)},"begin"),popState:x(function(){var m=this.conditionStack.length-1;return m>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:x(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:x(function(m){return m=this.conditionStack.length-1-Math.abs(m||0),m>=0?this.conditionStack[m]:"INITIAL"},"topState"),pushState:x(function(m){this.begin(m)},"pushState"),stateStackSize:x(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:x(function(m,g,v,y){var b=y;switch(v){case 0:break;case 1:break;case 2:return 10;case 3:break;case 4:break;case 5:return 4;case 6:return 11;case 7:return this.begin("acc_title"),12;break;case 8:return this.popState(),"acc_title_value";break;case 9:return this.begin("acc_descr"),14;break;case 10:return this.popState(),"acc_descr_value";break;case 11:this.begin("acc_descr_multiline");break;case 12:this.popState();break;case 13:return"acc_descr_multiline_value";case 14:return 17;case 15:return 21;case 16:return 20;case 17:return 6;case 18:return"INVALID"}},"anonymous"),rules:[/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:timeline\b)/i,/^(?:title\s[^\n]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:section\s[^:\n]+)/i,/^(?::\s[^:\n]+)/i,/^(?:[^#:\n]+)/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[12,13],inclusive:!1},acc_descr:{rules:[10],inclusive:!1},acc_title:{rules:[8],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,9,11,14,15,16,17,18],inclusive:!0}}};return d})();u.lexer=h;function f(){this.yy={}}return x(f,"Parser"),f.prototype=u,u.Parser=f,new f})();Wq.parser=Wq;g4t=Wq,S_e={};dp(S_e,{addEvent:()=>M_e,addSection:()=>R_e,addTask:()=>N_e,addTaskOrg:()=>O_e,clear:()=>L_e,default:()=>v4t,getCommonDb:()=>A_e,getSections:()=>I_e,getTasks:()=>D_e});Lx="",__e=0,Yq=[],b9=[],Rx=[],A_e=x(()=>DT,"getCommonDb"),L_e=x(function(){Yq.length=0,b9.length=0,Lx="",Rx.length=0,Cr()},"clear"),R_e=x(function(t){Lx=t,Yq.push(t)},"addSection"),I_e=x(function(){return Yq},"getSections"),D_e=x(function(){let t=T_e(),e=100,r=0;for(;!t&&rr.id===__e-1).events.push(t)},"addEvent"),O_e=x(function(t){let e={section:Lx,type:Lx,description:t,task:t,classes:[]};b9.push(e)},"addTaskOrg"),T_e=x(function(){let t=x(function(r){return Rx[r].processed},"compileTask"),e=!0;for(let[r,n]of Rx.entries())t(r),e=e&&n.processed;return e},"compileTasks"),v4t={clear:L_e,getCommonDb:A_e,addSection:R_e,getSections:I_e,getTasks:D_e,addTask:N_e,addTaskOrg:O_e,addEvent:M_e},y4t=12,w9=x(function(t,e){let r=t.append("rect");return r.attr("x",e.x),r.attr("y",e.y),r.attr("fill",e.fill),r.attr("stroke",e.stroke),r.attr("width",e.width),r.attr("height",e.height),r.attr("rx",e.rx),r.attr("ry",e.ry),e.class!==void 0&&r.attr("class",e.class),r},"drawRect"),x4t=x(function(t,e){let n=t.append("circle").attr("cx",e.cx).attr("cy",e.cy).attr("class","face").attr("r",15).attr("stroke-width",2).attr("overflow","visible"),a=t.append("g");a.append("circle").attr("cx",e.cx-15/3).attr("cy",e.cy-15/3).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666"),a.append("circle").attr("cx",e.cx+15/3).attr("cy",e.cy-15/3).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666");function i(l){let u=ec().startAngle(Math.PI/2).endAngle(3*(Math.PI/2)).innerRadius(7.5).outerRadius(6.8181818181818175);l.append("path").attr("class","mouth").attr("d",u).attr("transform","translate("+e.cx+","+(e.cy+2)+")")}x(i,"smile");function s(l){let u=ec().startAngle(3*Math.PI/2).endAngle(5*(Math.PI/2)).innerRadius(7.5).outerRadius(6.8181818181818175);l.append("path").attr("class","mouth").attr("d",u).attr("transform","translate("+e.cx+","+(e.cy+7)+")")}x(s,"sad");function o(l){l.append("line").attr("class","mouth").attr("stroke",2).attr("x1",e.cx-5).attr("y1",e.cy+7).attr("x2",e.cx+5).attr("y2",e.cy+7).attr("class","mouth").attr("stroke-width","1px").attr("stroke","#666")}return x(o,"ambivalent"),e.score>3?i(a):e.score<3?s(a):o(a),n},"drawFace"),b4t=x(function(t,e){let r=t.append("circle");return r.attr("cx",e.cx),r.attr("cy",e.cy),r.attr("class","actor-"+e.pos),r.attr("fill",e.fill),r.attr("stroke",e.stroke),r.attr("r",e.r),r.class!==void 0&&r.attr("class",r.class),e.title!==void 0&&r.append("title").text(e.title),r},"drawCircle"),P_e=x(function(t,e){let r=e.text.replace(//gi," "),n=t.append("text");n.attr("x",e.x),n.attr("y",e.y),n.attr("class","legend"),n.style("text-anchor",e.anchor),e.class!==void 0&&n.attr("class",e.class);let a=n.append("tspan");return a.attr("x",e.x+e.textMargin*2),a.text(r),n},"drawText"),w4t=x(function(t,e){function r(a,i,s,o,l){return a+","+i+" "+(a+s)+","+i+" "+(a+s)+","+(i+o-l)+" "+(a+s-l*1.2)+","+(i+o)+" "+a+","+(i+o)}x(r,"genPoints");let n=t.append("polygon");n.attr("points",r(e.x,e.y,50,20,7)),n.attr("class","labelBox"),e.y=e.y+e.labelMargin,e.x=e.x+.5*e.labelMargin,P_e(t,e)},"drawLabel"),k4t=x(function(t,e,r){let n=t.append("g"),a=Xq();a.x=e.x,a.y=e.y,a.fill=e.fill,a.width=r.width,a.height=r.height,a.class="journey-section section-type-"+e.num,a.rx=3,a.ry=3,w9(n,a),B_e(r)(e.text,n,a.x,a.y,a.width,a.height,{class:"journey-section section-type-"+e.num},r,e.colour)},"drawSection"),E_e=-1,T4t=x(function(t,e,r){let n=e.x+r.width/2,a=t.append("g");E_e++,a.append("line").attr("id","task"+E_e).attr("x1",n).attr("y1",e.y).attr("x2",n).attr("y2",450).attr("class","task-line").attr("stroke-width","1px").attr("stroke-dasharray","4 2").attr("stroke","#666"),x4t(a,{cx:n,cy:300+(5-e.score)*30,score:e.score});let s=Xq();s.x=e.x,s.y=e.y,s.fill=e.fill,s.width=r.width,s.height=r.height,s.class="task task-type-"+e.num,s.rx=3,s.ry=3,w9(a,s),B_e(r)(e.task,a,s.x,s.y,s.width,s.height,{class:"task"},r,e.colour)},"drawTask"),E4t=x(function(t,e){w9(t,{x:e.startx,y:e.starty,width:e.stopx-e.startx,height:e.stopy-e.starty,fill:e.fill,class:"rect"}).lower()},"drawBackgroundRect"),C4t=x(function(){return{x:0,y:0,fill:void 0,"text-anchor":"start",width:100,height:100,textMargin:0,rx:0,ry:0}},"getTextObj"),Xq=x(function(){return{x:0,y:0,width:100,anchor:"start",height:100,rx:0,ry:0}},"getNoteRect"),B_e=(function(){function t(a,i,s,o,l,u,h,f){let d=i.append("text").attr("x",s+l/2).attr("y",o+u/2+5).style("font-color",f).style("text-anchor","middle").text(a);n(d,h)}x(t,"byText");function e(a,i,s,o,l,u,h,f,d){let{taskFontSize:p,taskFontFamily:m}=f,g=a.split(//gi);for(let v=0;v0?d.forEach(L=>{let M=h.filter(N=>N.section===L),D={number:w,descr:L,section:w,width:200*Math.max(M.length,1)-50,padding:20,maxHeight:p};te.debug("sectionNode",D);let T=u.append("g"),I=Zm.drawNode(T,D,w,a);te.debug("sectionNode output",I),T.attr("transform",`translate(${y}, ${v})`),b+=p+50,M.length>0&&C_e(u,M,w,y,b,m,a,k,E,p,!1),y+=200*Math.max(M.length,1),b=v,w++}):(C=!1,C_e(u,h,w,y,b,m,a,k,E,p,!0));let _=u.node().getBBox();te.debug("bounds",_),f&&u.append("text").text(f).attr("x",_.width/2-i).attr("font-size","4ex").attr("font-weight","bold").attr("y",20),g=C?p+m+150:m+100,u.append("g").attr("class","lineWrapper").append("line").attr("x1",i).attr("y1",g).attr("x2",_.width+3*i).attr("y2",g).attr("stroke-width",4).attr("stroke","black").attr("marker-end","url(#arrowhead)"),Vl(void 0,u,a.timeline?.padding??50,a.timeline?.useMaxWidth??!1)},"draw"),C_e=x(function(t,e,r,n,a,i,s,o,l,u,h){for(let f of e){let d={descr:f.task,section:r,number:r,width:150,padding:20,maxHeight:i};te.debug("taskNode",d);let p=t.append("g").attr("class","taskWrapper"),g=Zm.drawNode(p,d,r,s).height;if(te.debug("taskHeight after draw",g),p.attr("transform",`translate(${n}, ${a})`),i=Math.max(i,g),f.events){let v=t.append("g").attr("class","lineWrapper"),y=i;a+=100,y=y+I4t(t,f.events,r,n,a,s),a-=100,v.append("line").attr("x1",n+190/2).attr("y1",a+i).attr("x2",n+190/2).attr("y2",a+i+(h?i:u)+l+120).attr("stroke-width",2).attr("stroke","black").attr("marker-end","url(#arrowhead)").attr("stroke-dasharray","5,5")}n=n+200,h&&!s.timeline?.disableMulticolor&&r++}a=a-10},"drawTasks"),I4t=x(function(t,e,r,n,a,i){let s=0,o=a;a=a+100;for(let l of e){let u={descr:l,section:r,number:r,width:150,padding:20,maxHeight:50};te.debug("eventNode",u);let h=t.append("g").attr("class","eventWrapper"),d=Zm.drawNode(h,u,r,i).height;s=s+d,h.attr("transform",`translate(${n}, ${a})`),a=a+10+d}return a=o,s},"drawEvents"),D4t={setConf:x(()=>{},"setConf"),draw:R4t},N4t=x(t=>{let e="";for(let r=0;r3?a(i):e.score<3?s(i):o(i),n},"drawFace"),U_e=b(function(t,e){let r=t.append("circle");return r.attr("cx",e.cx),r.attr("cy",e.cy),r.attr("class","actor-"+e.pos),r.attr("fill",e.fill),r.attr("stroke",e.stroke),r.attr("r",e.r),r.class!==void 0&&r.attr("class",r.class),e.title!==void 0&&r.append("title").text(e.title),r},"drawCircle"),H_e=b(function(t,e){return cye(t,e)},"drawText"),F7t=b(function(t,e){function r(i,a,s,o,l){return i+","+a+" "+(i+s)+","+a+" "+(i+s)+","+(a+o-l)+" "+(i+s-l*1.2)+","+(a+o)+" "+i+","+(a+o)}b(r,"genPoints");let n=t.append("polygon");n.attr("points",r(e.x,e.y,50,20,7)),n.attr("class","labelBox"),e.y=e.y+e.labelMargin,e.x=e.x+.5*e.labelMargin,H_e(t,e)},"drawLabel"),z7t=b(function(t,e,r){let n=t.append("g"),i=x0();i.x=e.x,i.y=e.y,i.fill=e.fill,i.width=r.width*e.taskCount+r.diagramMarginX*(e.taskCount-1),i.height=r.height,i.class="journey-section section-type-"+e.num,i.rx=3,i.ry=3,nW(n,i),V_e(r)(e.text,n,i.x,i.y,i.width,i.height,{class:"journey-section section-type-"+e.num},r,e.colour)},"drawSection"),$_e=-1,$7t=b(function(t,e,r){let n=e.x+r.width/2,i=t.append("g");$_e++,i.append("line").attr("id","task"+$_e).attr("x1",n).attr("y1",e.y).attr("x2",n).attr("y2",450).attr("class","task-line").attr("stroke-width","1px").attr("stroke-dasharray","4 2").attr("stroke","#666"),B7t(i,{cx:n,cy:300+(5-e.score)*30,score:e.score});let s=x0();s.x=e.x,s.y=e.y,s.fill=e.fill,s.width=r.width,s.height=r.height,s.class="task task-type-"+e.num,s.rx=3,s.ry=3,nW(i,s);let o=e.x+14;e.people.forEach(l=>{let u=e.actors[l].color,h={cx:o,cy:e.y,r:7,fill:u,stroke:"#000",title:l,pos:e.actors[l].position};U_e(i,h),o+=10}),V_e(r)(e.task,i,s.x,s.y,s.width,s.height,{class:"task"},r,e.colour)},"drawTask"),G7t=b(function(t,e){HS(t,e)},"drawBackgroundRect"),V_e=(function(){function t(i,a,s,o,l,u,h,f){let d=a.append("text").attr("x",s+l/2).attr("y",o+u/2+5).style("font-color",f).style("text-anchor","middle").text(i);n(d,h)}b(t,"byText");function e(i,a,s,o,l,u,h,f,d){let{taskFontSize:p,taskFontFamily:m}=f,g=i.split(//gi);for(let y=0;y{wf[v]={color:i.actorColours[d%i.actorColours.length],position:d},d++}),W_e(l),Ru.insert(0,0,ag,Object.keys(wf).length*50),V7t(l,u,0);let p=Ru.getBounds();h&&l.append("text").text(h).attr("x",ag).attr("font-size","4ex").attr("font-weight","bold").attr("y",25);let m=p.stopy-p.starty+2*i.diagramMarginY,g=ag+p.stopx+2*i.diagramMarginX;ei(l,m,g,i.useMaxWidth),l.append("line").attr("x1",ag).attr("y1",i.height*4).attr("x2",g-ag-4).attr("y2",i.height*4).attr("stroke-width",4).attr("stroke","black").attr("marker-end","url(#arrowhead)");let y=h?70:0;l.attr("viewBox",`${p.startx} -25 ${g} ${m+y}`),l.attr("preserveAspectRatio","xMinYMin meet"),l.attr("height",m+y+25)},"draw"),Ru={data:{startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},verticalPos:0,sequenceItems:[],init:b(function(){this.sequenceItems=[],this.data={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},this.verticalPos=0},"init"),updateVal:b(function(t,e,r,n){t[e]===void 0?t[e]=r:t[e]=n(r,t[e])},"updateVal"),updateBounds:b(function(t,e,r,n){let i=Fe().journey,a=this,s=0;function o(l){return b(function(h){s++;let f=a.sequenceItems.length-s+1;a.updateVal(h,"starty",e-f*i.boxMargin,Math.min),a.updateVal(h,"stopy",n+f*i.boxMargin,Math.max),a.updateVal(Ru.data,"startx",t-f*i.boxMargin,Math.min),a.updateVal(Ru.data,"stopx",r+f*i.boxMargin,Math.max),l!=="activation"&&(a.updateVal(h,"startx",t-f*i.boxMargin,Math.min),a.updateVal(h,"stopx",r+f*i.boxMargin,Math.max),a.updateVal(Ru.data,"starty",e-f*i.boxMargin,Math.min),a.updateVal(Ru.data,"stopy",n+f*i.boxMargin,Math.max))},"updateItemBounds")}b(o,"updateFn"),this.sequenceItems.forEach(o())},"updateBounds"),insert:b(function(t,e,r,n){let i=Math.min(t,r),a=Math.max(t,r),s=Math.min(e,n),o=Math.max(e,n);this.updateVal(Ru.data,"startx",i,Math.min),this.updateVal(Ru.data,"starty",s,Math.min),this.updateVal(Ru.data,"stopx",a,Math.max),this.updateVal(Ru.data,"stopy",o,Math.max),this.updateBounds(i,s,a,o)},"insert"),bumpVerticalPos:b(function(t){this.verticalPos=this.verticalPos+t,this.data.stopy=this.verticalPos},"bumpVerticalPos"),getVerticalPos:b(function(){return this.verticalPos},"getVerticalPos"),getBounds:b(function(){return this.data},"getBounds")},eW=JL.sectionFills,G_e=JL.sectionColours,V7t=b(function(t,e,r){let n=Fe().journey,i="",a=n.height*2+n.diagramMarginY,s=r+a,o=0,l="#CCC",u="black",h=0;for(let[f,d]of e.entries()){if(i!==d.section){l=eW[o%eW.length],h=o%eW.length,u=G_e[o%G_e.length];let m=0,g=d.section;for(let v=f;v(wf[g]&&(m[g]=wf[g]),m),{});d.x=f*n.taskMargin+f*n.width+ag,d.y=s,d.width=n.diagramMarginX,d.height=n.diagramMarginY,d.colour=u,d.fill=l,d.num=h,d.actors=p,A8.drawTask(t,d,n),Ru.insert(d.x,d.y,d.x+d.width+n.taskMargin,450)}},"drawTasks"),q_e={setConf:U7t,draw:H7t},W7t={parser:C7t,db:z_e,renderer:q_e,styles:P7t,init:b(t=>{q_e.setConf(t.journey),z_e.clear()},"init")}});var cAe={};Mr(cAe,{diagram:()=>d8t});function oW(t,e){t.each(function(){var r=dt(this),n=r.text().split(/(\s+|
    )/).reverse(),i,a=[],s=1.1,o=r.attr("y"),l=parseFloat(r.attr("dy")),u=r.text(null).append("tspan").attr("x",0).attr("y",o).attr("dy",l+"em");for(let h=0;he||i==="
    ")&&(a.pop(),u.text(a.join(" ").trim()),i==="
    "?a=[""]:a=[i],u=r.append("tspan").attr("x",0).attr("y",o).attr("dy",s+"em").text(i))})}var iW,Y7t,Q_e,q4,J_e,aW,eR,U4,eAe,tAe,rAe,nAe,iAe,aAe,sAe,oAe,j_e,X7t,j7t,tR,K7t,Z7t,lAe,Q7t,J7t,K_e,e8t,t8t,r8t,sW,uAe,n8t,i8t,a8t,s8t,sg,o8t,Z_e,l8t,u8t,c8t,h8t,f8t,d8t,hAe=D(()=>{Nr();Or();Or();Cl();iW=(function(){var t=b(function(d,p,m,g){for(m=m||{},g=d.length;g--;m[d[g]]=p);return m},"o"),e=[6,8,10,11,12,14,16,17,20,21],r=[1,9],n=[1,10],i=[1,11],a=[1,12],s=[1,13],o=[1,16],l=[1,17],u={trace:b(function(){},"trace"),yy:{},symbols_:{error:2,start:3,timeline:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NEWLINE:10,title:11,acc_title:12,acc_title_value:13,acc_descr:14,acc_descr_value:15,acc_descr_multiline_value:16,section:17,period_statement:18,event_statement:19,period:20,event:21,$accept:0,$end:1},terminals_:{2:"error",4:"timeline",6:"EOF",8:"SPACE",10:"NEWLINE",11:"title",12:"acc_title",13:"acc_title_value",14:"acc_descr",15:"acc_descr_value",16:"acc_descr_multiline_value",17:"section",20:"period",21:"event"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[9,1],[9,2],[9,2],[9,1],[9,1],[9,1],[9,1],[18,1],[19,1]],performAction:b(function(p,m,g,y,v,x,k){var _=x.length-1;switch(v){case 1:return x[_-1];case 2:this.$=[];break;case 3:x[_-1].push(x[_]),this.$=x[_-1];break;case 4:case 5:this.$=x[_];break;case 6:case 7:this.$=[];break;case 8:y.getCommonDb().setDiagramTitle(x[_].substr(6)),this.$=x[_].substr(6);break;case 9:this.$=x[_].trim(),y.getCommonDb().setAccTitle(this.$);break;case 10:case 11:this.$=x[_].trim(),y.getCommonDb().setAccDescription(this.$);break;case 12:y.addSection(x[_].substr(8)),this.$=x[_].substr(8);break;case 15:y.addTask(x[_],0,""),this.$=x[_];break;case 16:y.addEvent(x[_].substr(2)),this.$=x[_];break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},t(e,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:r,12:n,14:i,16:a,17:s,18:14,19:15,20:o,21:l},t(e,[2,7],{1:[2,1]}),t(e,[2,3]),{9:18,11:r,12:n,14:i,16:a,17:s,18:14,19:15,20:o,21:l},t(e,[2,5]),t(e,[2,6]),t(e,[2,8]),{13:[1,19]},{15:[1,20]},t(e,[2,11]),t(e,[2,12]),t(e,[2,13]),t(e,[2,14]),t(e,[2,15]),t(e,[2,16]),t(e,[2,4]),t(e,[2,9]),t(e,[2,10])],defaultActions:{},parseError:b(function(p,m){if(m.recoverable)this.trace(p);else{var g=new Error(p);throw g.hash=m,g}},"parseError"),parse:b(function(p){var m=this,g=[0],y=[],v=[null],x=[],k=this.table,_="",T=0,S=0,R=0,A=2,I=1,P=x.slice.call(arguments,1),O=Object.create(this.lexer),C={yy:{}};for(var N in this.yy)Object.prototype.hasOwnProperty.call(this.yy,N)&&(C.yy[N]=this.yy[N]);O.setInput(p,C.yy),C.yy.lexer=O,C.yy.parser=this,typeof O.yylloc>"u"&&(O.yylloc={});var B=O.yylloc;x.push(B);var F=O.options&&O.options.ranges;typeof C.yy.parseError=="function"?this.parseError=C.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function M(ie){g.length=g.length-2*ie,v.length=v.length-ie,x.length=x.length-ie}b(M,"popStack");function $(){var ie;return ie=y.pop()||O.lex()||I,typeof ie!="number"&&(ie instanceof Array&&(y=ie,ie=y.pop()),ie=m.symbols_[ie]||ie),ie}b($,"lex");for(var z,q,V,U,J,se,re={},me,ge,ye,_e;;){if(V=g[g.length-1],this.defaultActions[V]?U=this.defaultActions[V]:((z===null||typeof z>"u")&&(z=$()),U=k[V]&&k[V][z]),typeof U>"u"||!U.length||!U[0]){var ue="";_e=[];for(me in k[V])this.terminals_[me]&&me>A&&_e.push("'"+this.terminals_[me]+"'");O.showPosition?ue="Parse error on line "+(T+1)+`: +`+O.showPosition()+` +Expecting `+_e.join(", ")+", got '"+(this.terminals_[z]||z)+"'":ue="Parse error on line "+(T+1)+": Unexpected "+(z==I?"end of input":"'"+(this.terminals_[z]||z)+"'"),this.parseError(ue,{text:O.match,token:this.terminals_[z]||z,line:O.yylineno,loc:B,expected:_e})}if(U[0]instanceof Array&&U.length>1)throw new Error("Parse Error: multiple actions possible at state: "+V+", token: "+z);switch(U[0]){case 1:g.push(z),v.push(O.yytext),x.push(O.yylloc),g.push(U[1]),z=null,q?(z=q,q=null):(S=O.yyleng,_=O.yytext,T=O.yylineno,B=O.yylloc,R>0&&R--);break;case 2:if(ge=this.productions_[U[1]][1],re.$=v[v.length-ge],re._$={first_line:x[x.length-(ge||1)].first_line,last_line:x[x.length-1].last_line,first_column:x[x.length-(ge||1)].first_column,last_column:x[x.length-1].last_column},F&&(re._$.range=[x[x.length-(ge||1)].range[0],x[x.length-1].range[1]]),se=this.performAction.apply(re,[_,S,T,C.yy,U[1],v,x].concat(P)),typeof se<"u")return se;ge&&(g=g.slice(0,-1*ge*2),v=v.slice(0,-1*ge),x=x.slice(0,-1*ge)),g.push(this.productions_[U[1]][0]),v.push(re.$),x.push(re._$),ye=k[g[g.length-2]][g[g.length-1]],g.push(ye);break;case 3:return!0}}return!0},"parse")},h=(function(){var d={EOF:1,parseError:b(function(m,g){if(this.yy.parser)this.yy.parser.parseError(m,g);else throw new Error(m)},"parseError"),setInput:b(function(p,m){return this.yy=m||this.yy||{},this._input=p,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:b(function(){var p=this._input[0];this.yytext+=p,this.yyleng++,this.offset++,this.match+=p,this.matched+=p;var m=p.match(/(?:\r\n?|\n).*/g);return m?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),p},"input"),unput:b(function(p){var m=p.length,g=p.split(/(?:\r\n?|\n)/g);this._input=p+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-m),this.offset-=m;var y=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),g.length-1&&(this.yylineno-=g.length-1);var v=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:g?(g.length===y.length?this.yylloc.first_column:0)+y[y.length-g.length].length-g[0].length:this.yylloc.first_column-m},this.options.ranges&&(this.yylloc.range=[v[0],v[0]+this.yyleng-m]),this.yyleng=this.yytext.length,this},"unput"),more:b(function(){return this._more=!0,this},"more"),reject:b(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). +`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:b(function(p){this.unput(this.match.slice(p))},"less"),pastInput:b(function(){var p=this.matched.substr(0,this.matched.length-this.match.length);return(p.length>20?"...":"")+p.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:b(function(){var p=this.match;return p.length<20&&(p+=this._input.substr(0,20-p.length)),(p.substr(0,20)+(p.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:b(function(){var p=this.pastInput(),m=new Array(p.length+1).join("-");return p+this.upcomingInput()+` +`+m+"^"},"showPosition"),test_match:b(function(p,m){var g,y,v;if(this.options.backtrack_lexer&&(v={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(v.yylloc.range=this.yylloc.range.slice(0))),y=p[0].match(/(?:\r\n?|\n).*/g),y&&(this.yylineno+=y.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:y?y[y.length-1].length-y[y.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+p[0].length},this.yytext+=p[0],this.match+=p[0],this.matches=p,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(p[0].length),this.matched+=p[0],g=this.performAction.call(this,this.yy,this,m,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),g)return g;if(this._backtrack){for(var x in v)this[x]=v[x];return!1}return!1},"test_match"),next:b(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var p,m,g,y;this._more||(this.yytext="",this.match="");for(var v=this._currentRules(),x=0;xm[0].length)){if(m=g,y=x,this.options.backtrack_lexer){if(p=this.test_match(g,v[x]),p!==!1)return p;if(this._backtrack){m=!1;continue}else return!1}else if(!this.options.flex)break}return m?(p=this.test_match(m,v[y]),p!==!1?p:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. +`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:b(function(){var m=this.next();return m||this.lex()},"lex"),begin:b(function(m){this.conditionStack.push(m)},"begin"),popState:b(function(){var m=this.conditionStack.length-1;return m>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:b(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:b(function(m){return m=this.conditionStack.length-1-Math.abs(m||0),m>=0?this.conditionStack[m]:"INITIAL"},"topState"),pushState:b(function(m){this.begin(m)},"pushState"),stateStackSize:b(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:b(function(m,g,y,v){var x=v;switch(y){case 0:break;case 1:break;case 2:return 10;case 3:break;case 4:break;case 5:return 4;case 6:return 11;case 7:return this.begin("acc_title"),12;break;case 8:return this.popState(),"acc_title_value";break;case 9:return this.begin("acc_descr"),14;break;case 10:return this.popState(),"acc_descr_value";break;case 11:this.begin("acc_descr_multiline");break;case 12:this.popState();break;case 13:return"acc_descr_multiline_value";case 14:return 17;case 15:return 21;case 16:return 20;case 17:return 6;case 18:return"INVALID"}},"anonymous"),rules:[/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:timeline\b)/i,/^(?:title\s[^\n]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:section\s[^:\n]+)/i,/^(?::\s[^:\n]+)/i,/^(?:[^#:\n]+)/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[12,13],inclusive:!1},acc_descr:{rules:[10],inclusive:!1},acc_title:{rules:[8],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,9,11,14,15,16,17,18],inclusive:!0}}};return d})();u.lexer=h;function f(){this.yy={}}return b(f,"Parser"),f.prototype=u,u.Parser=f,new f})();iW.parser=iW;Y7t=iW,Q_e={};k1(Q_e,{addEvent:()=>sAe,addSection:()=>rAe,addTask:()=>aAe,addTaskOrg:()=>oAe,clear:()=>tAe,default:()=>X7t,getCommonDb:()=>eAe,getSections:()=>nAe,getTasks:()=>iAe});q4="",J_e=0,aW=[],eR=[],U4=[],eAe=b(()=>fT,"getCommonDb"),tAe=b(function(){aW.length=0,eR.length=0,q4="",U4.length=0,Jr()},"clear"),rAe=b(function(t){q4=t,aW.push(t)},"addSection"),nAe=b(function(){return aW},"getSections"),iAe=b(function(){let t=j_e(),e=100,r=0;for(;!t&&rr.id===J_e-1).events.push(t)},"addEvent"),oAe=b(function(t){let e={section:q4,type:q4,description:t,task:t,classes:[]};eR.push(e)},"addTaskOrg"),j_e=b(function(){let t=b(function(r){return U4[r].processed},"compileTask"),e=!0;for(let[r,n]of U4.entries())t(r),e=e&&n.processed;return e},"compileTasks"),X7t={clear:tAe,getCommonDb:eAe,addSection:rAe,getSections:nAe,getTasks:iAe,addTask:aAe,addTaskOrg:oAe,addEvent:sAe},j7t=12,tR=b(function(t,e){let r=t.append("rect");return r.attr("x",e.x),r.attr("y",e.y),r.attr("fill",e.fill),r.attr("stroke",e.stroke),r.attr("width",e.width),r.attr("height",e.height),r.attr("rx",e.rx),r.attr("ry",e.ry),e.class!==void 0&&r.attr("class",e.class),r},"drawRect"),K7t=b(function(t,e){let n=t.append("circle").attr("cx",e.cx).attr("cy",e.cy).attr("class","face").attr("r",15).attr("stroke-width",2).attr("overflow","visible"),i=t.append("g");i.append("circle").attr("cx",e.cx-15/3).attr("cy",e.cy-15/3).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666"),i.append("circle").attr("cx",e.cx+15/3).attr("cy",e.cy-15/3).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666");function a(l){let u=n0().startAngle(Math.PI/2).endAngle(3*(Math.PI/2)).innerRadius(7.5).outerRadius(6.8181818181818175);l.append("path").attr("class","mouth").attr("d",u).attr("transform","translate("+e.cx+","+(e.cy+2)+")")}b(a,"smile");function s(l){let u=n0().startAngle(3*Math.PI/2).endAngle(5*(Math.PI/2)).innerRadius(7.5).outerRadius(6.8181818181818175);l.append("path").attr("class","mouth").attr("d",u).attr("transform","translate("+e.cx+","+(e.cy+7)+")")}b(s,"sad");function o(l){l.append("line").attr("class","mouth").attr("stroke",2).attr("x1",e.cx-5).attr("y1",e.cy+7).attr("x2",e.cx+5).attr("y2",e.cy+7).attr("class","mouth").attr("stroke-width","1px").attr("stroke","#666")}return b(o,"ambivalent"),e.score>3?a(i):e.score<3?s(i):o(i),n},"drawFace"),Z7t=b(function(t,e){let r=t.append("circle");return r.attr("cx",e.cx),r.attr("cy",e.cy),r.attr("class","actor-"+e.pos),r.attr("fill",e.fill),r.attr("stroke",e.stroke),r.attr("r",e.r),r.class!==void 0&&r.attr("class",r.class),e.title!==void 0&&r.append("title").text(e.title),r},"drawCircle"),lAe=b(function(t,e){let r=e.text.replace(//gi," "),n=t.append("text");n.attr("x",e.x),n.attr("y",e.y),n.attr("class","legend"),n.style("text-anchor",e.anchor),e.class!==void 0&&n.attr("class",e.class);let i=n.append("tspan");return i.attr("x",e.x+e.textMargin*2),i.text(r),n},"drawText"),Q7t=b(function(t,e){function r(i,a,s,o,l){return i+","+a+" "+(i+s)+","+a+" "+(i+s)+","+(a+o-l)+" "+(i+s-l*1.2)+","+(a+o)+" "+i+","+(a+o)}b(r,"genPoints");let n=t.append("polygon");n.attr("points",r(e.x,e.y,50,20,7)),n.attr("class","labelBox"),e.y=e.y+e.labelMargin,e.x=e.x+.5*e.labelMargin,lAe(t,e)},"drawLabel"),J7t=b(function(t,e,r){let n=t.append("g"),i=sW();i.x=e.x,i.y=e.y,i.fill=e.fill,i.width=r.width,i.height=r.height,i.class="journey-section section-type-"+e.num,i.rx=3,i.ry=3,tR(n,i),uAe(r)(e.text,n,i.x,i.y,i.width,i.height,{class:"journey-section section-type-"+e.num},r,e.colour)},"drawSection"),K_e=-1,e8t=b(function(t,e,r){let n=e.x+r.width/2,i=t.append("g");K_e++,i.append("line").attr("id","task"+K_e).attr("x1",n).attr("y1",e.y).attr("x2",n).attr("y2",450).attr("class","task-line").attr("stroke-width","1px").attr("stroke-dasharray","4 2").attr("stroke","#666"),K7t(i,{cx:n,cy:300+(5-e.score)*30,score:e.score});let s=sW();s.x=e.x,s.y=e.y,s.fill=e.fill,s.width=r.width,s.height=r.height,s.class="task task-type-"+e.num,s.rx=3,s.ry=3,tR(i,s),uAe(r)(e.task,i,s.x,s.y,s.width,s.height,{class:"task"},r,e.colour)},"drawTask"),t8t=b(function(t,e){tR(t,{x:e.startx,y:e.starty,width:e.stopx-e.startx,height:e.stopy-e.starty,fill:e.fill,class:"rect"}).lower()},"drawBackgroundRect"),r8t=b(function(){return{x:0,y:0,fill:void 0,"text-anchor":"start",width:100,height:100,textMargin:0,rx:0,ry:0}},"getTextObj"),sW=b(function(){return{x:0,y:0,width:100,anchor:"start",height:100,rx:0,ry:0}},"getNoteRect"),uAe=(function(){function t(i,a,s,o,l,u,h,f){let d=a.append("text").attr("x",s+l/2).attr("y",o+u/2+5).style("font-color",f).style("text-anchor","middle").text(i);n(d,h)}b(t,"byText");function e(i,a,s,o,l,u,h,f,d){let{taskFontSize:p,taskFontFamily:m}=f,g=i.split(//gi);for(let y=0;y0?d.forEach(I=>{let P=h.filter(B=>B.section===I),O={number:k,descr:I,section:k,width:200*Math.max(P.length,1)-50,padding:20,maxHeight:p};he.debug("sectionNode",O);let C=u.append("g"),N=sg.drawNode(C,O,k,i);he.debug("sectionNode output",N),C.attr("transform",`translate(${v}, ${y})`),x+=p+50,P.length>0&&Z_e(u,P,k,v,x,m,i,T,S,p,!1),v+=200*Math.max(P.length,1),x=y,k++}):(_=!1,Z_e(u,h,k,v,x,m,i,T,S,p,!0));let R=u.node().getBBox();he.debug("bounds",R),f&&u.append("text").text(f).attr("x",R.width/2-a).attr("font-size","4ex").attr("font-weight","bold").attr("y",20),g=_?p+m+150:m+100,u.append("g").attr("class","lineWrapper").append("line").attr("x1",a).attr("y1",g).attr("x2",R.width+3*a).attr("y2",g).attr("stroke-width",4).attr("stroke","black").attr("marker-end","url(#arrowhead)"),Uu(void 0,u,i.timeline?.padding??50,i.timeline?.useMaxWidth??!1)},"draw"),Z_e=b(function(t,e,r,n,i,a,s,o,l,u,h){for(let f of e){let d={descr:f.task,section:r,number:r,width:150,padding:20,maxHeight:a};he.debug("taskNode",d);let p=t.append("g").attr("class","taskWrapper"),g=sg.drawNode(p,d,r,s).height;if(he.debug("taskHeight after draw",g),p.attr("transform",`translate(${n}, ${i})`),a=Math.max(a,g),f.events){let y=t.append("g").attr("class","lineWrapper"),v=a;i+=100,v=v+l8t(t,f.events,r,n,i,s),i-=100,y.append("line").attr("x1",n+190/2).attr("y1",i+a).attr("x2",n+190/2).attr("y2",i+a+(h?a:u)+l+120).attr("stroke-width",2).attr("stroke","black").attr("marker-end","url(#arrowhead)").attr("stroke-dasharray","5,5")}n=n+200,h&&!s.timeline?.disableMulticolor&&r++}i=i-10},"drawTasks"),l8t=b(function(t,e,r,n,i,a){let s=0,o=i;i=i+100;for(let l of e){let u={descr:l,section:r,number:r,width:150,padding:20,maxHeight:50};he.debug("eventNode",u);let h=t.append("g").attr("class","eventWrapper"),d=sg.drawNode(h,u,r,a).height;s=s+d,h.attr("transform",`translate(${n}, ${i})`),i=i+10+d}return i=o,s},"drawEvents"),u8t={setConf:b(()=>{},"setConf"),draw:o8t},c8t=b(t=>{let e="";for(let r=0;r` + `}return e},"genSections"),h8t=b(t=>` .edge { stroke-width: 3; } - ${N4t(t)} + ${c8t(t)} .section-root rect, .section-root path, .section-root circle { fill: ${t.git0}; } @@ -1937,29 +2193,29 @@ Expecting `+pe.join(", ")+", got '"+(this.terminals_[B]||B)+"'":J="Parse error o .eventWrapper { filter: brightness(120%); } -`,"getStyles"),O4t=M4t,P4t={db:S_e,renderer:D4t,parser:g4t,styles:O4t}});function SH(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(l){throw l},f:a}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var i,s=!0,o=!1;return{s:function(){r=r.call(t)},n:function(){var l=r.next();return s=l.done,l},e:function(l){o=!0,i=l},f:function(){try{s||r.return==null||r.return()}finally{if(o)throw i}}}}function pAe(t,e,r){return(e=mAe(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function $4t(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function G4t(t,e){var r=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(r!=null){var n,a,i,s,o=[],l=!0,u=!1;try{if(i=(r=r.call(t)).next,e===0){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=i.call(r)).done)&&(o.push(n.value),o.length!==e);l=!0);}catch(h){u=!0,a=h}finally{try{if(!l&&r.return!=null&&(s=r.return(),Object(s)!==s))return}finally{if(u)throw a}}return o}}function U4t(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function q4t(){throw new TypeError(`Invalid attempt to spread non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function $a(t,e){return B4t(t)||G4t(t,e)||WH(t,e)||U4t()}function W9(t){return F4t(t)||$4t(t)||WH(t)||q4t()}function V4t(t,e){if(typeof t!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}function mAe(t){var e=V4t(t,"string");return typeof e=="symbol"?e:e+""}function ei(t){"@babel/helpers - typeof";return ei=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ei(t)}function WH(t,e){if(t){if(typeof t=="string")return SH(t,e);var r={}.toString.call(t).slice(8,-1);return r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set"?Array.from(t):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?SH(t,e):void 0}}function B6(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function F6(){if(U_e)return Kq;U_e=1;function t(e){var r=typeof e;return e!=null&&(r=="object"||r=="function")}return Kq=t,Kq}function d3t(){if(q_e)return Zq;q_e=1;var t=typeof k9=="object"&&k9&&k9.Object===Object&&k9;return Zq=t,Zq}function oL(){if(V_e)return Qq;V_e=1;var t=d3t(),e=typeof self=="object"&&self&&self.Object===Object&&self,r=t||e||Function("return this")();return Qq=r,Qq}function p3t(){if(H_e)return Jq;H_e=1;var t=oL(),e=function(){return t.Date.now()};return Jq=e,Jq}function m3t(){if(W_e)return eV;W_e=1;var t=/\s/;function e(r){for(var n=r.length;n--&&t.test(r.charAt(n)););return n}return eV=e,eV}function g3t(){if(Y_e)return tV;Y_e=1;var t=m3t(),e=/^\s+/;function r(n){return n&&n.slice(0,t(n)+1).replace(e,"")}return tV=r,tV}function jH(){if(X_e)return rV;X_e=1;var t=oL(),e=t.Symbol;return rV=e,rV}function v3t(){if(j_e)return nV;j_e=1;var t=jH(),e=Object.prototype,r=e.hasOwnProperty,n=e.toString,a=t?t.toStringTag:void 0;function i(s){var o=r.call(s,a),l=s[a];try{s[a]=void 0;var u=!0}catch{}var h=n.call(s);return u&&(o?s[a]=l:delete s[a]),h}return nV=i,nV}function y3t(){if(K_e)return aV;K_e=1;var t=Object.prototype,e=t.toString;function r(n){return e.call(n)}return aV=r,aV}function EAe(){if(Z_e)return iV;Z_e=1;var t=jH(),e=v3t(),r=y3t(),n="[object Null]",a="[object Undefined]",i=t?t.toStringTag:void 0;function s(o){return o==null?o===void 0?a:n:i&&i in Object(o)?e(o):r(o)}return iV=s,iV}function x3t(){if(Q_e)return sV;Q_e=1;function t(e){return e!=null&&typeof e=="object"}return sV=t,sV}function z6(){if(J_e)return oV;J_e=1;var t=EAe(),e=x3t(),r="[object Symbol]";function n(a){return typeof a=="symbol"||e(a)&&t(a)==r}return oV=n,oV}function b3t(){if(e8e)return lV;e8e=1;var t=g3t(),e=F6(),r=z6(),n=NaN,a=/^[-+]0x[0-9a-f]+$/i,i=/^0b[01]+$/i,s=/^0o[0-7]+$/i,o=parseInt;function l(u){if(typeof u=="number")return u;if(r(u))return n;if(e(u)){var h=typeof u.valueOf=="function"?u.valueOf():u;u=e(h)?h+"":h}if(typeof u!="string")return u===0?u:+u;u=t(u);var f=i.test(u);return f||s.test(u)?o(u.slice(2),f?2:8):a.test(u)?n:+u}return lV=l,lV}function w3t(){if(t8e)return uV;t8e=1;var t=F6(),e=p3t(),r=b3t(),n="Expected a function",a=Math.max,i=Math.min;function s(o,l,u){var h,f,d,p,m,g,v=0,y=!1,b=!1,w=!0;if(typeof o!="function")throw new TypeError(n);l=r(l)||0,t(u)&&(y=!!u.leading,b="maxWait"in u,d=b?a(r(u.maxWait)||0,l):d,w="trailing"in u?!!u.trailing:w);function C(I){var N=h,O=f;return h=f=void 0,v=I,p=o.apply(O,N),p}function k(I){return v=I,m=setTimeout(S,l),y?C(I):p}function E(I){var N=I-g,O=I-v,R=l-N;return b?i(R,d-O):R}function _(I){var N=I-g,O=I-v;return g===void 0||N>=l||N<0||b&&O>=d}function S(){var I=e();if(_(I))return L(I);m=setTimeout(S,E(I))}function L(I){return m=void 0,w&&h?C(I):(h=f=void 0,p)}function M(){m!==void 0&&clearTimeout(m),v=0,h=g=f=m=void 0}function D(){return m===void 0?p:L(e())}function T(){var I=e(),N=_(I);if(h=arguments,f=this,g=I,N){if(m===void 0)return k(g);if(b)return clearTimeout(m),m=setTimeout(S,l),C(g)}return m===void 0&&(m=setTimeout(S,l)),p}return T.cancel=M,T.flush=D,T}return uV=s,uV}function S3t(t,e,r,n,a){var i=a*Math.PI/180,s=Math.cos(i)*(t-r)-Math.sin(i)*(e-n)+r,o=Math.sin(i)*(t-r)+Math.cos(i)*(e-n)+n;return{x:s,y:o}}function A3t(t,e,r){if(r===0)return t;var n=(e.x1+e.x2)/2,a=(e.y1+e.y2)/2,i=e.w/e.h,s=1/i,o=S3t(t.x,t.y,n,a,r),l=_3t(o.x,o.y,n,a,i,s);return{x:l.x,y:l.y}}function z3t(){return s8e||(s8e=1,(function(t,e){(function(){var r,n,a,i,s,o,l,u,h,f,d,p,m,g,v;a=Math.floor,f=Math.min,n=function(y,b){return yb?1:0},h=function(y,b,w,C,k){var E;if(w==null&&(w=0),k==null&&(k=n),w<0)throw new Error("lo must be non-negative");for(C==null&&(C=y.length);wM;0<=M?L++:L--)S.push(L);return S}).apply(this).reverse(),_=[],C=0,k=E.length;CD;0<=D?++S:--S)T.push(s(y,w));return T},g=function(y,b,w,C){var k,E,_;for(C==null&&(C=n),k=y[w];w>b;){if(_=w-1>>1,E=y[_],C(k,E)<0){y[w]=E,w=_;continue}break}return y[w]=k},v=function(y,b,w){var C,k,E,_,S;for(w==null&&(w=n),k=y.length,S=b,E=y[b],C=2*b+1;C-1}return FV=e,FV}function Dwt(){if(Y8e)return zV;Y8e=1;var t=dL();function e(r,n){var a=this.__data__,i=t(a,r);return i<0?(++this.size,a.push([r,n])):a[i][1]=n,this}return zV=e,zV}function Nwt(){if(X8e)return $V;X8e=1;var t=Awt(),e=Lwt(),r=Rwt(),n=Iwt(),a=Dwt();function i(s){var o=-1,l=s==null?0:s.length;for(this.clear();++o-1&&n%1==0&&n0;){var h=a.shift();e(h),i.add(h.id()),o&&n(a,i,h)}return t}function t9e(t,e,r){if(r.isParent())for(var n=r._private.children,a=0;a0&&arguments[0]!==void 0?arguments[0]:V6t,e=arguments.length>1?arguments[1]:void 0,r=0;r0?T=N:D=N;while(Math.abs(I)>s&&++O=i?b(M,O):R===0?O:C(M,D,D+u)}var E=!1;function _(){E=!0,(t!==e||r!==n)&&w()}var S=function(D){return E||_(),t===e&&r===n?D:D===0?0:D===1?1:v(k(D),e,n)};S.getControlPoints=function(){return[{x:t,y:e},{x:r,y:n}]};var L="generateBezier("+[t,e,r,n]+")";return S.toString=function(){return L},S}function B7e(t,e,r,n,a){if(n===1||e===r)return r;var i=a(e,r,n);return t==null||((t.roundValue||t.color)&&(i=Math.round(i)),t.min!==void 0&&(i=Math.max(i,t.min)),t.max!==void 0&&(i=Math.min(i,t.max))),i}function F7e(t,e){return t.pfValue!=null||t.value!=null?t.pfValue!=null&&(e==null||e.type.units!=="%")?t.pfValue:t.value:t}function Nx(t,e,r,n,a){var i=a!=null?a.type:null;r<0?r=0:r>1&&(r=1);var s=F7e(t,a),o=F7e(e,a);if(xt(s)&&xt(o))return B7e(i,s,o,r,n);if(kn(s)&&kn(o)){for(var l=[],u=0;u0?(p==="spring"&&m.push(s.duration),s.easingImpl=$9[p].apply(null,m)):s.easingImpl=$9[p]}var g=s.easingImpl,v;if(s.duration===0?v=1:v=(r-l)/s.duration,s.applying&&(v=s.progress),v<0?v=0:v>1&&(v=1),s.delay==null){var y=s.startPosition,b=s.position;if(b&&a&&!t.locked()){var w={};m6(y.x,b.x)&&(w.x=Nx(y.x,b.x,v,g)),m6(y.y,b.y)&&(w.y=Nx(y.y,b.y,v,g)),t.position(w)}var C=s.startPan,k=s.pan,E=i.pan,_=k!=null&&n;_&&(m6(C.x,k.x)&&(E.x=Nx(C.x,k.x,v,g)),m6(C.y,k.y)&&(E.y=Nx(C.y,k.y,v,g)),t.emit("pan"));var S=s.startZoom,L=s.zoom,M=L!=null&&n;M&&(m6(S,L)&&(i.zoom=A6(i.minZoom,Nx(S,L,v,g),i.maxZoom)),t.emit("zoom")),(_||M)&&t.emit("viewport");var D=s.style;if(D&&D.length>0&&a){for(var T=0;T=0;_--){var S=E[_];S()}E.splice(0,E.length)},b=p.length-1;b>=0;b--){var w=p[b],C=w._private;if(C.stopped){p.splice(b,1),C.hooked=!1,C.playing=!1,C.started=!1,y(C.frames);continue}!C.playing&&!C.applying||(C.playing&&C.applying&&(C.applying=!1),C.started||akt(h,w,t),nkt(h,w,t,f),C.applying&&(C.applying=!1),y(C.frames),C.step!=null&&C.step(t),w.completed()&&(p.splice(b,1),C.hooked=!1,C.playing=!1,C.started=!1,y(C.completes)),g=!0)}return!f&&p.length===0&&m.length===0&&n.push(h),g}for(var i=!1,s=0;s0?e.notify("draw",r):e.notify("draw")),r.unmerge(n),e.emit("step")}function x9e(t){this.options=jt({},fkt,dkt,t)}function b9e(t){this.options=jt({},pkt,t)}function w9e(t){this.options=jt({},mkt,t)}function wL(t){this.options=jt({},gkt,t),this.options.layout=this;var e=this.options.eles.nodes(),r=this.options.eles.edges(),n=r.filter(function(a){var i=a.source().data("id"),s=a.target().data("id"),o=e.some(function(u){return u.data("id")===i}),l=e.some(function(u){return u.data("id")===s});return!o||!l});this.options.eles=this.options.eles.not(n)}function C9e(t){this.options=jt({},Ikt,t)}function hW(t){this.options=jt({},Dkt,t)}function S9e(t){this.options=jt({},Nkt,t)}function _9e(t){this.options=jt({},Mkt,t)}function A9e(t){this.options=t,this.notifications=0}function I9e(t,e){e.radius===0?t.lineTo(e.cx,e.cy):t.arc(e.cx,e.cy,e.radius,e.startAngle,e.endAngle,e.counterClockwise)}function dW(t,e,r,n){var a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0;return n===0||e.radius===0?{cx:e.x,cy:e.y,radius:0,startX:e.x,startY:e.y,stopX:e.x,stopY:e.y,startAngle:void 0,endAngle:void 0,counterClockwise:void 0}:(Bkt(t,e,r,n,a),{cx:BH,cy:FH,radius:rg,startX:L9e,startY:R9e,stopX:zH,stopY:$H,startAngle:eh.ang+Math.PI/2*ag,endAngle:Nl.ang-Math.PI/2*ag,counterClockwise:q9})}function D9e(t){var e=[];if(t!=null){for(var r=0;r5&&arguments[5]!==void 0?arguments[5]:5,s=Math.min(i,n/2,a/2);t.beginPath(),t.moveTo(e+s,r),t.lineTo(e+n-s,r),t.quadraticCurveTo(e+n,r,e+n,r+s),t.lineTo(e+n,r+a-s),t.quadraticCurveTo(e+n,r+a,e+n-s,r+a),t.lineTo(e+s,r+a),t.quadraticCurveTo(e,r+a,e,r+a-s),t.lineTo(e,r+s),t.quadraticCurveTo(e,r,e+s,r),t.closePath()}function iAe(t,e,r){var n=t.createShader(e);if(t.shaderSource(n,r),t.compileShader(n),!t.getShaderParameter(n,t.COMPILE_STATUS))throw new Error(t.getShaderInfoLog(n));return n}function ATt(t,e,r){var n=iAe(t,t.VERTEX_SHADER,e),a=iAe(t,t.FRAGMENT_SHADER,r),i=t.createProgram();if(t.attachShader(i,n),t.attachShader(i,a),t.linkProgram(i),!t.getProgramParameter(i,t.LINK_STATUS))throw new Error("Could not initialize shaders");return i}function LTt(t,e,r){r===void 0&&(r=e);var n=t.makeOffscreenCanvas(e,r),a=n.context=n.getContext("2d");return n.clear=function(){return a.clearRect(0,0,n.width,n.height)},n.clear(),n}function gW(t){var e=t.pixelRatio,r=t.cy.zoom(),n=t.cy.pan();return{zoom:r*e,pan:{x:n.x*e,y:n.y*e}}}function RTt(t){var e=t.pixelRatio,r=t.cy.zoom();return r*e}function ITt(t,e,r,n,a){var i=n*r+e.x,s=a*r+e.y;return s=Math.round(t.canvasHeight-s),[i,s]}function DTt(t,e){return e.picking?!0:t.pstyle("background-fill").value!=="solid"||t.pstyle("background-image").strValue!=="none"?!1:t.pstyle("border-width").value===0||t.pstyle("border-opacity").value===0?!0:t.pstyle("border-style").value==="solid"}function NTt(t,e){if(t.length!==e.length)return!1;for(var r=0;r>0&255)/255,r[1]=(t>>8&255)/255,r[2]=(t>>16&255)/255,r[3]=(t>>24&255)/255,r}function MTt(t){return t[0]+(t[1]<<8)+(t[2]<<16)+(t[3]<<24)}function OTt(t,e){var r=t.createTexture();return r.buffer=function(n){t.bindTexture(t.TEXTURE_2D,r),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_S,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_T,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MAG_FILTER,t.LINEAR),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,t.LINEAR_MIPMAP_NEAREST),t.pixelStorei(t.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!0),t.texImage2D(t.TEXTURE_2D,0,t.RGBA,t.RGBA,t.UNSIGNED_BYTE,n),t.generateMipmap(t.TEXTURE_2D),t.bindTexture(t.TEXTURE_2D,null)},r.deleteTexture=function(){t.deleteTexture(r)},r}function W9e(t,e){switch(e){case"float":return[1,t.FLOAT,4];case"vec2":return[2,t.FLOAT,4];case"vec3":return[3,t.FLOAT,4];case"vec4":return[4,t.FLOAT,4];case"int":return[1,t.INT,4];case"ivec2":return[2,t.INT,4]}}function Y9e(t,e,r){switch(e){case t.FLOAT:return new Float32Array(r);case t.INT:return new Int32Array(r)}}function PTt(t,e,r,n,a,i){switch(e){case t.FLOAT:return new Float32Array(r.buffer,i*n,a);case t.INT:return new Int32Array(r.buffer,i*n,a)}}function BTt(t,e,r,n){var a=W9e(t,e),i=$a(a,2),s=i[0],o=i[1],l=Y9e(t,o,n),u=t.createBuffer();return t.bindBuffer(t.ARRAY_BUFFER,u),t.bufferData(t.ARRAY_BUFFER,l,t.STATIC_DRAW),o===t.FLOAT?t.vertexAttribPointer(r,s,o,!1,0,0):o===t.INT&&t.vertexAttribIPointer(r,s,o,0,0),t.enableVertexAttribArray(r),t.bindBuffer(t.ARRAY_BUFFER,null),u}function Jc(t,e,r,n){var a=W9e(t,r),i=$a(a,3),s=i[0],o=i[1],l=i[2],u=Y9e(t,o,e*s),h=s*l,f=t.createBuffer();t.bindBuffer(t.ARRAY_BUFFER,f),t.bufferData(t.ARRAY_BUFFER,e*h,t.DYNAMIC_DRAW),t.enableVertexAttribArray(n),o===t.FLOAT?t.vertexAttribPointer(n,s,o,!1,h,0):o===t.INT&&t.vertexAttribIPointer(n,s,o,h,0),t.vertexAttribDivisor(n,1),t.bindBuffer(t.ARRAY_BUFFER,null);for(var d=new Array(e),p=0;pG9e?(eEt(t),e.call(t,i)):(tEt(t),Z9e(t,i,E6.SCREEN)))}}{var r=t.matchCanvasSize;t.matchCanvasSize=function(i){r.call(t,i),t.pickingFrameBuffer.setFramebufferAttachmentSizes(t.canvasWidth,t.canvasHeight),t.pickingFrameBuffer.needsDraw=!0}}t.findNearestElements=function(i,s,o,l){return oEt(t,i,s)};{var n=t.invalidateCachedZSortedEles;t.invalidateCachedZSortedEles=function(){n.call(t),t.pickingFrameBuffer.needsDraw=!0}}{var a=t.notify;t.notify=function(i,s){a.call(t,i,s),i==="viewport"||i==="bounds"?t.pickingFrameBuffer.needsDraw=!0:i==="background"&&t.drawing.invalidate(s,{type:"node-body"})}}}function eEt(t){var e=t.data.contexts[t.WEBGL];e.clear(e.COLOR_BUFFER_BIT|e.DEPTH_BUFFER_BIT)}function tEt(t){var e=function(n){n.save(),n.setTransform(1,0,0,1,0,0),n.clearRect(0,0,t.canvasWidth,t.canvasHeight),n.restore()};e(t.data.contexts[t.NODE]),e(t.data.contexts[t.DRAG])}function rEt(t){var e=t.canvasWidth,r=t.canvasHeight,n=gW(t),a=n.pan,i=n.zoom,s=bH();H9(s,s,[a.x,a.y]),UH(s,s,[i,i]);var o=bH();GTt(o,e,r);var l=bH();return $Tt(l,o,s),l}function K9e(t,e){var r=t.canvasWidth,n=t.canvasHeight,a=gW(t),i=a.pan,s=a.zoom;e.setTransform(1,0,0,1,0,0),e.clearRect(0,0,r,n),e.translate(i.x,i.y),e.scale(s,s)}function nEt(t,e){t.drawSelectionRectangle(e,function(r){return K9e(t,r)})}function aEt(t){var e=t.data.contexts[t.NODE];e.save(),K9e(t,e),e.strokeStyle="rgba(0, 0, 0, 0.3)",e.beginPath(),e.moveTo(-1e3,0),e.lineTo(1e3,0),e.stroke(),e.beginPath(),e.moveTo(0,-1e3),e.lineTo(0,1e3),e.stroke(),e.restore()}function iEt(t){var e=function(a,i,s){for(var o=a.atlasManager.getAtlasCollection(i),l=t.data.contexts[t.NODE],u=o.atlases,h=0;h=0&&C.add(_)}return C}function oEt(t,e,r){var n=sEt(t,e,r),a=t.getCachedZSortedEles(),i,s,o=So(n),l;try{for(o.s();!(l=o.n()).done;){var u=l.value,h=a[u];if(!i&&h.isNode()&&(i=h),!s&&h.isEdge()&&(s=h),i&&s)break}}catch(f){o.e(f)}finally{o.f()}return[i,s].filter(Boolean)}function CH(t,e,r){var n=t.drawing;e+=1,r.isNode()?(n.drawNode(r,e,"node-underlay"),n.drawNode(r,e,"node-body"),n.drawTexture(r,e,"label"),n.drawNode(r,e,"node-overlay")):(n.drawEdgeLine(r,e),n.drawEdgeArrow(r,e,"source"),n.drawEdgeArrow(r,e,"target"),n.drawTexture(r,e,"label"),n.drawTexture(r,e,"edge-source-label"),n.drawTexture(r,e,"edge-target-label"))}function Z9e(t,e,r){var n;t.webglDebug&&(n=performance.now());var a=t.drawing,i=0;if(r.screen&&t.data.canvasNeedsRedraw[t.SELECT_BOX]&&nEt(t,e),t.data.canvasNeedsRedraw[t.NODE]||r.picking){var s=t.data.contexts[t.WEBGL];r.screen?(s.clearColor(0,0,0,0),s.enable(s.BLEND),s.blendFunc(s.ONE,s.ONE_MINUS_SRC_ALPHA)):s.disable(s.BLEND),s.clear(s.COLOR_BUFFER_BIT|s.DEPTH_BUFFER_BIT),s.viewport(0,0,s.canvas.width,s.canvas.height);var o=rEt(t),l=t.getCachedZSortedEles();if(i=l.length,a.startFrame(o,r),r.screen){for(var u=0;u{Qa=typeof window>"u"?null:window,$_e=Qa?Qa.navigator:null;Qa&&Qa.document;H4t=ei(""),gAe=ei({}),W4t=ei(function(){}),Y4t=typeof HTMLElement>"u"?"undefined":ei(HTMLElement),O6=function(e){return e&&e.instanceString&&sa(e.instanceString)?e.instanceString():null},Yt=function(e){return e!=null&&ei(e)==H4t},sa=function(e){return e!=null&&ei(e)===W4t},kn=function(e){return!Qo(e)&&(Array.isArray?Array.isArray(e):e!=null&&e instanceof Array)},Gr=function(e){return e!=null&&ei(e)===gAe&&!kn(e)&&e.constructor===Object},X4t=function(e){return e!=null&&ei(e)===gAe},xt=function(e){return e!=null&&ei(e)===ei(1)&&!isNaN(e)},j4t=function(e){return xt(e)&&Math.floor(e)===e},Y9=function(e){if(Y4t!=="undefined")return e!=null&&e instanceof HTMLElement},Qo=function(e){return P6(e)||vAe(e)},P6=function(e){return O6(e)==="collection"&&e._private.single},vAe=function(e){return O6(e)==="collection"&&!e._private.single},YH=function(e){return O6(e)==="core"},yAe=function(e){return O6(e)==="stylesheet"},K4t=function(e){return O6(e)==="event"},B0=function(e){return e==null?!0:!!(e===""||e.match(/^\s+$/))},Z4t=function(e){return typeof HTMLElement>"u"?!1:e instanceof HTMLElement},Q4t=function(e){return Gr(e)&&xt(e.x1)&&xt(e.x2)&&xt(e.y1)&&xt(e.y2)},J4t=function(e){return X4t(e)&&sa(e.then)},e3t=function(){return $_e&&$_e.userAgent.match(/msie|trident|edge/i)},Wx=function(e,r){r||(r=function(){if(arguments.length===1)return arguments[0];if(arguments.length===0)return"undefined";for(var i=[],s=0;sr?1:0},o3t=function(e,r){return-1*bAe(e,r)},jt=Object.assign!=null?Object.assign.bind(Object):function(t){for(var e=arguments,r=1;r1&&(v-=1),v<1/6?m+(g-m)*6*v:v<1/2?g:v<2/3?m+(g-m)*(2/3-v)*6:m}var f=new RegExp("^"+n3t+"$").exec(e);if(f){if(n=parseInt(f[1]),n<0?n=(360- -1*n%360)%360:n>360&&(n=n%360),n/=360,a=parseFloat(f[2]),a<0||a>100||(a=a/100,i=parseFloat(f[3]),i<0||i>100)||(i=i/100,s=f[4],s!==void 0&&(s=parseFloat(s),s<0||s>1)))return;if(a===0)o=l=u=Math.round(i*255);else{var d=i<.5?i*(1+a):i+a-i*a,p=2*i-d;o=Math.round(255*h(p,d,n+1/3)),l=Math.round(255*h(p,d,n)),u=Math.round(255*h(p,d,n-1/3))}r=[o,l,u,s]}return r},c3t=function(e){var r,n=new RegExp("^"+t3t+"$").exec(e);if(n){r=[];for(var a=[],i=1;i<=3;i++){var s=n[i];if(s[s.length-1]==="%"&&(a[i]=!0),s=parseFloat(s),a[i]&&(s=s/100*255),s<0||s>255)return;r.push(Math.floor(s))}var o=a[1]||a[2]||a[3],l=a[1]&&a[2]&&a[3];if(o&&!l)return;var u=n[4];if(u!==void 0){if(u=parseFloat(u),u<0||u>1)return;r.push(u)}}return r},h3t=function(e){return f3t[e.toLowerCase()]},wAe=function(e){return(kn(e)?e:null)||h3t(e)||l3t(e)||c3t(e)||u3t(e)},f3t={transparent:[0,0,0,0],aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],grey:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]},kAe=function(e){for(var r=e.map,n=e.keys,a=n.length,i=0;i1&&arguments[1]!==void 0?arguments[1]:ng,n=r,a;a=e.next(),!a.done;)n=n*SAe+a.value|0;return n},C6=function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:ng;return r*SAe+e|0},S6=function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Fx;return(r<<5)+r+e|0},E3t=function(e,r){return e*2097152+r},L0=function(e){return e[0]*2097152+e[1]},T9=function(e,r){return[C6(e[0],r[0]),S6(e[1],r[1])]},r8e=function(e,r){var n={value:0,done:!1},a=0,i=e.length,s={next:function(){return a=0;a--)e[a]===r&&e.splice(a,1)},QH=function(e){e.splice(0,e.length)},M3t=function(e,r){for(var n=0;n"u"?"undefined":ei(Set))!==P3t?Set:B3t,lL=function(e,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(e===void 0||r===void 0||!YH(e)){jn("An element must have a core reference and parameters set");return}var a=r.group;if(a==null&&(r.data&&r.data.source!=null&&r.data.target!=null?a="edges":a="nodes"),a!=="nodes"&&a!=="edges"){jn("An element must be of type `nodes` or `edges`; you specified `"+a+"`");return}this.length=1,this[0]=this;var i=this._private={cy:e,single:!0,data:r.data||{},position:r.position||{x:0,y:0},autoWidth:void 0,autoHeight:void 0,autoPadding:void 0,compoundBoundsClean:!1,listeners:[],group:a,style:{},rstyle:{},styleCxts:[],styleKeys:{},removed:!0,selected:!!r.selected,selectable:r.selectable===void 0?!0:!!r.selectable,locked:!!r.locked,grabbed:!1,grabbable:r.grabbable===void 0?!0:!!r.grabbable,pannable:r.pannable===void 0?a==="edges":!!r.pannable,active:!1,classes:new Zx,animation:{current:[],queue:[]},rscratch:{},scratch:r.scratch||{},edges:[],children:[],parent:r.parent&&r.parent.isNode()?r.parent:null,traversalCache:{},backgrounding:!1,bbCache:null,bbCacheShift:{x:0,y:0},bodyBounds:null,overlayBounds:null,labelBounds:{all:null,source:null,target:null,main:null},arrowBounds:{source:null,target:null,"mid-source":null,"mid-target":null}};if(i.position.x==null&&(i.position.x=0),i.position.y==null&&(i.position.y=0),r.renderedPosition){var s=r.renderedPosition,o=e.pan(),l=e.zoom();i.position={x:(s.x-o.x)/l,y:(s.y-o.y)/l}}var u=[];kn(r.classes)?u=r.classes:Yt(r.classes)&&(u=r.classes.split(/\s+/));for(var h=0,f=u.length;h0;){var E=b.pop(),_=v(E),S=E.id();if(d[S]=_,_!==1/0)for(var L=E.neighborhood().intersect(m),M=0;M0)for(B.unshift(P);f[G];){var z=f[G];B.unshift(z.edge),B.unshift(z.node),F=z.node,G=F.id()}return o.spawn(B)}}}},V3t={kruskal:function(e){e=e||function(w){return 1};for(var r=this.byGroup(),n=r.nodes,a=r.edges,i=n.length,s=new Array(i),o=n,l=function(C){for(var k=0;k0;){if(k(),_++,C===h){for(var S=[],L=i,M=h,D=y[M];S.unshift(L),D!=null&&S.unshift(D),L=v[M],L!=null;)M=L.id(),D=y[M];return{found:!0,distance:f[C],path:this.spawn(S),steps:_}}p[C]=!0;for(var T=w._private.edges,I=0;ID&&(m[M]=D,b[M]=L,w[M]=k),!i){var T=L*h+S;!i&&m[T]>D&&(m[T]=D,b[T]=S,w[T]=k)}}}for(var I=0;I1&&arguments[1]!==void 0?arguments[1]:s,me=w(ee),Ie=[],Ue=me;;){if(Ue==null)return r.spawn();var Fe=b(Ue),Ae=Fe.edge,Me=Fe.pred;if(Ie.unshift(Ue[0]),Ue.same($e)&&Ie.length>0)break;Ae!=null&&Ie.unshift(Ae),Ue=Me}return l.spawn(Ie)},E=0;E=0;h--){var f=u[h],d=f[1],p=f[2];(r[d]===o&&r[p]===l||r[d]===l&&r[p]===o)&&u.splice(h,1)}for(var m=0;ma;){var i=Math.floor(Math.random()*r.length);r=Q3t(i,e,r),n--}return r},J3t={kargerStein:function(){var e=this,r=this.byGroup(),n=r.nodes,a=r.edges;a.unmergeBy(function(B){return B.isLoop()});var i=n.length,s=a.length,o=Math.ceil(Math.pow(Math.log(i)/Math.LN2,2)),l=Math.floor(i/Z3t);if(i<2){jn("At least 2 nodes are required for Karger-Stein algorithm");return}for(var u=[],h=0;h1&&arguments[1]!==void 0?arguments[1]:0,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:e.length,a=1/0,i=r;i1&&arguments[1]!==void 0?arguments[1]:0,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:e.length,a=-1/0,i=r;i1&&arguments[1]!==void 0?arguments[1]:0,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:e.length,a=0,i=0,s=r;s1&&arguments[1]!==void 0?arguments[1]:0,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:e.length,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!0,i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,s=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!0;a?e=e.slice(r,n):(n0&&e.splice(0,r));for(var o=0,l=e.length-1;l>=0;l--){var u=e[l];s?isFinite(u)||(e[l]=-1/0,o++):e.splice(l,1)}i&&e.sort(function(d,p){return d-p});var h=e.length,f=Math.floor(h/2);return h%2!==0?e[f+1+o]:(e[f-1+o]+e[f+o])/2},i5t=function(e){return Math.PI*e/180},E9=function(e,r){return Math.atan2(r,e)-Math.PI/2},JH=Math.log2||function(t){return Math.log(t)/Math.log(2)},eW=function(e){return e>0?1:e<0?-1:0},og=function(e,r){return Math.sqrt(tg(e,r))},tg=function(e,r){var n=r.x-e.x,a=r.y-e.y;return n*n+a*a},s5t=function(e){for(var r=e.length,n=0,a=0;a=e.x1&&e.y2>=e.y1)return{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2,w:e.x2-e.x1,h:e.y2-e.y1};if(e.w!=null&&e.h!=null&&e.w>=0&&e.h>=0)return{x1:e.x1,y1:e.y1,x2:e.x1+e.w,y2:e.y1+e.h,w:e.w,h:e.h}}},l5t=function(e){return{x1:e.x1,x2:e.x2,w:e.w,y1:e.y1,y2:e.y2,h:e.h}},u5t=function(e){e.x1=1/0,e.y1=1/0,e.x2=-1/0,e.y2=-1/0,e.w=0,e.h=0},c5t=function(e,r){e.x1=Math.min(e.x1,r.x1),e.x2=Math.max(e.x2,r.x2),e.w=e.x2-e.x1,e.y1=Math.min(e.y1,r.y1),e.y2=Math.max(e.y2,r.y2),e.h=e.y2-e.y1},MAe=function(e,r,n){e.x1=Math.min(e.x1,r),e.x2=Math.max(e.x2,r),e.w=e.x2-e.x1,e.y1=Math.min(e.y1,n),e.y2=Math.max(e.y2,n),e.h=e.y2-e.y1},P9=function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return e.x1-=r,e.x2+=r,e.y1-=r,e.y2+=r,e.w=e.x2-e.x1,e.h=e.y2-e.y1,e},B9=function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[0],n,a,i,s;if(r.length===1)n=a=i=s=r[0];else if(r.length===2)n=i=r[0],s=a=r[1];else if(r.length===4){var o=$a(r,4);n=o[0],a=o[1],i=o[2],s=o[3]}return e.x1-=s,e.x2+=a,e.y1-=n,e.y2+=i,e.w=e.x2-e.x1,e.h=e.y2-e.y1,e},l8e=function(e,r){e.x1=r.x1,e.y1=r.y1,e.x2=r.x2,e.y2=r.y2,e.w=e.x2-e.x1,e.h=e.y2-e.y1},tW=function(e,r){return!(e.x1>r.x2||r.x1>e.x2||e.x2r.y2||r.y1>e.y2)},N0=function(e,r,n){return e.x1<=r&&r<=e.x2&&e.y1<=n&&n<=e.y2},u8e=function(e,r){return N0(e,r.x,r.y)},OAe=function(e,r){return N0(e,r.x1,r.y1)&&N0(e,r.x2,r.y2)},h5t=(dV=Math.hypot)!==null&&dV!==void 0?dV:function(t,e){return Math.sqrt(t*t+e*e)};PAe=function(e,r,n,a,i,s,o){var l=arguments.length>7&&arguments[7]!==void 0?arguments[7]:"auto",u=l==="auto"?z0(i,s):l,h=i/2,f=s/2;u=Math.min(u,h,f);var d=u!==h,p=u!==f,m;if(d){var g=n-h+u-o,v=a-f-o,y=n+h-u+o,b=v;if(m=M0(e,r,n,a,g,v,y,b,!1),m.length>0)return m}if(p){var w=n+h+o,C=a-f+u-o,k=w,E=a+f-u+o;if(m=M0(e,r,n,a,w,C,k,E,!1),m.length>0)return m}if(d){var _=n-h+u-o,S=a+f+o,L=n+h-u+o,M=S;if(m=M0(e,r,n,a,_,S,L,M,!1),m.length>0)return m}if(p){var D=n-h-o,T=a-f+u-o,I=D,N=a+f-u+o;if(m=M0(e,r,n,a,D,T,I,N,!1),m.length>0)return m}var O;{var R=n-h+u,P=a-f+u;if(O=x6(e,r,n,a,R,P,u+o),O.length>0&&O[0]<=R&&O[1]<=P)return[O[0],O[1]]}{var B=n+h-u,F=a-f+u;if(O=x6(e,r,n,a,B,F,u+o),O.length>0&&O[0]>=B&&O[1]<=F)return[O[0],O[1]]}{var G=n+h-u,z=a+f-u;if(O=x6(e,r,n,a,G,z,u+o),O.length>0&&O[0]>=G&&O[1]>=z)return[O[0],O[1]]}{var H=n-h+u,Q=a+f-u;if(O=x6(e,r,n,a,H,Q,u+o),O.length>0&&O[0]<=H&&O[1]>=Q)return[O[0],O[1]]}return[]},p5t=function(e,r,n,a,i,s,o){var l=o,u=Math.min(n,i),h=Math.max(n,i),f=Math.min(a,s),d=Math.max(a,s);return u-l<=e&&e<=h+l&&f-l<=r&&r<=d+l},m5t=function(e,r,n,a,i,s,o,l,u){var h={x1:Math.min(n,o,i)-u,x2:Math.max(n,o,i)+u,y1:Math.min(a,l,s)-u,y2:Math.max(a,l,s)+u};return!(eh.x2||rh.y2)},g5t=function(e,r,n,a){n-=a;var i=r*r-4*e*n;if(i<0)return[];var s=Math.sqrt(i),o=2*e,l=(-r+s)/o,u=(-r-s)/o;return[l,u]},v5t=function(e,r,n,a,i){var s=1e-5;e===0&&(e=s),r/=e,n/=e,a/=e;var o,l,u,h,f,d,p,m;if(l=(3*n-r*r)/9,u=-(27*a)+r*(9*n-2*(r*r)),u/=54,o=l*l*l+u*u,i[1]=0,p=r/3,o>0){f=u+Math.sqrt(o),f=f<0?-Math.pow(-f,1/3):Math.pow(f,1/3),d=u-Math.sqrt(o),d=d<0?-Math.pow(-d,1/3):Math.pow(d,1/3),i[0]=-p+f+d,p+=(f+d)/2,i[4]=i[2]=-p,p=Math.sqrt(3)*(-d+f)/2,i[3]=p,i[5]=-p;return}if(i[5]=i[3]=0,o===0){m=u<0?-Math.pow(-u,1/3):Math.pow(u,1/3),i[0]=-p+2*m,i[4]=i[2]=-(m+p);return}l=-l,h=l*l*l,h=Math.acos(u/Math.sqrt(h)),m=2*Math.sqrt(l),i[0]=-p+m*Math.cos(h/3),i[2]=-p+m*Math.cos((h+2*Math.PI)/3),i[4]=-p+m*Math.cos((h+4*Math.PI)/3)},y5t=function(e,r,n,a,i,s,o,l){var u=1*n*n-4*n*i+2*n*o+4*i*i-4*i*o+o*o+a*a-4*a*s+2*a*l+4*s*s-4*s*l+l*l,h=9*n*i-3*n*n-3*n*o-6*i*i+3*i*o+9*a*s-3*a*a-3*a*l-6*s*s+3*s*l,f=3*n*n-6*n*i+n*o-n*e+2*i*i+2*i*e-o*e+3*a*a-6*a*s+a*l-a*r+2*s*s+2*s*r-l*r,d=1*n*i-n*n+n*e-i*e+a*s-a*a+a*r-s*r,p=[];v5t(u,h,f,d,p);for(var m=1e-7,g=[],v=0;v<6;v+=2)Math.abs(p[v+1])=0&&p[v]<=1&&g.push(p[v]);g.push(1),g.push(0);for(var y=-1,b,w,C,k=0;k=0?Cu?(e-i)*(e-i)+(r-s)*(r-s):h-d},Co=function(e,r,n){for(var a,i,s,o,l,u=0,h=0;h=e&&e>=s||a<=e&&e<=s)l=(e-a)/(s-a)*(o-i)+i,l>r&&u++;else continue;return u%2!==0},bf=function(e,r,n,a,i,s,o,l,u){var h=new Array(n.length),f;l[0]!=null?(f=Math.atan(l[1]/l[0]),l[0]<0?f=f+Math.PI/2:f=-f-Math.PI/2):f=l;for(var d=Math.cos(-f),p=Math.sin(-f),m=0;m0){var v=Z9(h,-u);g=K9(v)}else g=h;return Co(e,r,g)},b5t=function(e,r,n,a,i,s,o,l){for(var u=new Array(n.length*2),h=0;h=0&&v<=1&&b.push(v),y>=0&&y<=1&&b.push(y),b.length===0)return[];var w=b[0]*l[0]+e,C=b[0]*l[1]+r;if(b.length>1){if(b[0]==b[1])return[w,C];var k=b[1]*l[0]+e,E=b[1]*l[1]+r;return[w,C,k,E]}else return[w,C]},pV=function(e,r,n){return r<=e&&e<=n||n<=e&&e<=r?e:e<=r&&r<=n||n<=r&&r<=e?r:n},M0=function(e,r,n,a,i,s,o,l,u){var h=e-i,f=n-e,d=o-i,p=r-s,m=a-r,g=l-s,v=d*p-g*h,y=f*p-m*h,b=g*f-d*m;if(b!==0){var w=v/b,C=y/b,k=.001,E=0-k,_=1+k;return E<=w&&w<=_&&E<=C&&C<=_?[e+w*f,r+w*m]:u?[e+w*f,r+w*m]:[]}else return v===0||y===0?pV(e,n,o)===o?[o,l]:pV(e,n,i)===i?[i,s]:pV(i,o,n)===n?[n,a]:[]:[]},k5t=function(e,r,n,a,i){var s=[],o=a/2,l=i/2,u=r,h=n;s.push({x:u+o*e[0],y:h+l*e[1]});for(var f=1;f0){var g=Z9(f,-l);p=K9(g)}else p=f}else p=n;for(var v,y,b,w,C=0;C2){for(var m=[h[0],h[1]],g=Math.pow(m[0]-e,2)+Math.pow(m[1]-r,2),v=1;vh&&(h=C)},get:function(w){return u[w]}},d=0;d0?O=N.edgesTo(I)[0]:O=I.edgesTo(N)[0];var R=a(O);I=I.id(),_[I]>_[D]+R&&(_[I]=_[D]+R,S.nodes.indexOf(I)<0?S.push(I):S.updateItem(I),E[I]=0,k[I]=[]),_[I]==_[D]+R&&(E[I]=E[I]+E[D],k[I].push(D))}else for(var P=0;P0;){for(var z=C.pop(),H=0;H0&&o.push(n[l]);o.length!==0&&i.push(a.collection(o))}return i},B5t=function(e,r){for(var n=0;n5&&arguments[5]!==void 0?arguments[5]:$5t,o=a,l,u,h=0;h=2?f6(e,r,n,0,p8e,G5t):f6(e,r,n,0,d8e)},squaredEuclidean:function(e,r,n){return f6(e,r,n,0,p8e)},manhattan:function(e,r,n){return f6(e,r,n,0,d8e)},max:function(e,r,n){return f6(e,r,n,-1/0,U5t)}};Yx["squared-euclidean"]=Yx.squaredEuclidean;Yx.squaredeuclidean=Yx.squaredEuclidean;q5t=Yi({k:2,m:2,sensitivityThreshold:1e-4,distance:"euclidean",maxIterations:10,attributes:[],testMode:!1,testCentroids:null}),nW=function(e){return q5t(e)},Q9=function(e,r,n,a,i){var s=i!=="kMedoids",o=s?function(f){return n[f]}:function(f){return a[f](n)},l=function(d){return a[d](r)},u=n,h=r;return cL(e,a.length,o,l,u,h)},gV=function(e,r,n){for(var a=n.length,i=new Array(a),s=new Array(a),o=new Array(r),l=null,u=0;un)return!1}return!0},W5t=function(e,r,n){for(var a=0;ao&&(o=r[u][h],l=h);i[l].push(e[u])}for(var f=0;f=i.threshold||i.mode==="dendrogram"&&e.length===1)return!1;var m=r[s],g=r[a[s]],v;i.mode==="dendrogram"?v={left:m,right:g,key:m.key}:v={value:m.value.concat(g.value),key:m.key},e[m.index]=v,e.splice(g.index,1),r[m.key]=v;for(var y=0;yn[g.key][b.key]&&(l=n[g.key][b.key])):i.linkage==="max"?(l=n[m.key][b.key],n[m.key][b.key]0&&a.push(i);return a},b8e=function(e,r,n){for(var a=[],i=0;io&&(s=u,o=r[i*e+u])}s>0&&a.push(s)}for(var h=0;hu&&(l=h,u=f)}n[i]=s[l]}return a=b8e(e,r,n),a},w8e=function(e){for(var r=this.cy(),n=this.nodes(),a=awt(e),i={},s=0;s=D?(T=D,D=N,I=O):N>T&&(T=N);for(var R=0;R0?1:0;_[L%a.minIterations*o+H]=Q,z+=Q}if(z>0&&(L>=a.minIterations-1||L==a.maxIterations-1)){for(var Y=0,ie=0;ie1||E>1)&&(o=!0),f[w]=[],b.outgoers().forEach(function(S){S.isEdge()&&f[w].push(S.id())})}else d[w]=[void 0,b.target().id()]}):s.forEach(function(b){var w=b.id();if(b.isNode()){var C=b.degree(!0);C%2&&(l?u?o=!0:u=w:l=w),f[w]=[],b.connectedEdges().forEach(function(k){return f[w].push(k.id())})}else d[w]=[b.source().id(),b.target().id()]});var p={found:!1,trail:void 0};if(o)return p;if(u&&l)if(i){if(h&&u!=h)return p;h=u}else{if(h&&u!=h&&l!=h)return p;h||(h=u)}else h||(h=s[0].id());var m=function(w){for(var C=w,k=[w],E,_,S;f[C].length;)E=f[C].shift(),_=d[E][0],S=d[E][1],C!=S?(f[S]=f[S].filter(function(L){return L!=E}),C=S):!i&&C!=_&&(f[_]=f[_].filter(function(L){return L!=E}),C=_),k.unshift(E),k.unshift(C);return k},g=[],v=[];for(v=m(h);v.length!=1;)f[v[0]].length==0?(g.unshift(s.getElementById(v.shift())),g.unshift(s.getElementById(v.shift()))):v=m(v.shift()).concat(v);g.unshift(s.getElementById(v.shift()));for(var y in f)if(f[y].length)return p;return p.found=!0,p.trail=this.spawn(g,!0),p}},S9=function(){var e=this,r={},n=0,a=0,i=[],s=[],o={},l=function(d,p){for(var m=s.length-1,g=[],v=e.spawn();s[m].x!=d||s[m].y!=p;)g.push(s.pop().edge),m--;g.push(s.pop().edge),g.forEach(function(y){var b=y.connectedNodes().intersection(e);v.merge(y),b.forEach(function(w){var C=w.id(),k=w.connectedEdges().intersection(e);v.merge(w),r[C].cutVertex?v.merge(k.filter(function(E){return E.isLoop()})):v.merge(k)})}),i.push(v)},u=function(d,p,m){d===m&&(a+=1),r[p]={id:n,low:n++,cutVertex:!1};var g=e.getElementById(p).connectedEdges().intersection(e);if(g.size()===0)i.push(e.spawn(e.getElementById(p)));else{var v,y,b,w;g.forEach(function(C){v=C.source().id(),y=C.target().id(),b=v===p?y:v,b!==m&&(w=C.id(),o[w]||(o[w]=!0,s.push({x:p,y:b,edge:C})),b in r?r[p].low=Math.min(r[p].low,r[b].id):(u(d,b,p),r[p].low=Math.min(r[p].low,r[b].low),r[p].id<=r[b].low&&(r[p].cutVertex=!0,l(p,b))))})}};e.forEach(function(f){if(f.isNode()){var d=f.id();d in r||(a=0,u(d,d),r[d].cutVertex=a>1)}});var h=Object.keys(r).filter(function(f){return r[f].cutVertex}).map(function(f){return e.getElementById(f)});return{cut:e.spawn(h),components:i}},fwt={hopcroftTarjanBiconnected:S9,htbc:S9,htb:S9,hopcroftTarjanBiconnectedComponents:S9},_9=function(){var e=this,r={},n=0,a=[],i=[],s=e.spawn(e),o=function(u){i.push(u),r[u]={index:n,low:n++,explored:!1};var h=e.getElementById(u).connectedEdges().intersection(e);if(h.forEach(function(g){var v=g.target().id();v!==u&&(v in r||o(v),r[v].explored||(r[u].low=Math.min(r[u].low,r[v].low)))}),r[u].index===r[u].low){for(var f=e.spawn();;){var d=i.pop();if(f.merge(e.getElementById(d)),r[d].low=r[u].index,r[d].explored=!0,d===u)break}var p=f.edgesWith(f),m=f.merge(p);a.push(m),s=s.difference(m)}};return e.forEach(function(l){if(l.isNode()){var u=l.id();u in r||o(u)}}),{cut:s,components:a}},dwt={tarjanStronglyConnected:_9,tsc:_9,tscc:_9,tarjanStronglyConnectedComponents:_9},qAe={};[_6,q3t,V3t,W3t,X3t,K3t,J3t,S5t,qx,Vx,LH,z5t,Q5t,rwt,uwt,hwt,fwt,dwt].forEach(function(t){jt(qAe,t)});VAe=0,HAe=1,WAe=2,Au=function(e){if(!(this instanceof Au))return new Au(e);this.id="Thenable/1.0.7",this.state=VAe,this.fulfillValue=void 0,this.rejectReason=void 0,this.onFulfilled=[],this.onRejected=[],this.proxy={then:this.then.bind(this)},typeof e=="function"&&e.call(this,this.fulfill.bind(this),this.reject.bind(this))};Au.prototype={fulfill:function(e){return k8e(this,HAe,"fulfillValue",e)},reject:function(e){return k8e(this,WAe,"rejectReason",e)},then:function(e,r){var n=this,a=new Au;return n.onFulfilled.push(E8e(e,a,"fulfill")),n.onRejected.push(E8e(r,a,"reject")),YAe(n),a.proxy}};k8e=function(e,r,n,a){return e.state===VAe&&(e.state=r,e[n]=a,YAe(e)),e},YAe=function(e){e.state===HAe?T8e(e,"onFulfilled",e.fulfillValue):e.state===WAe&&T8e(e,"onRejected",e.rejectReason)},T8e=function(e,r,n){if(e[r].length!==0){var a=e[r];e[r]=[];var i=function(){for(var o=0;o0}},clearQueue:function(){return function(){var r=this,n=r.length!==void 0,a=n?r:[r],i=this._private.cy||this;if(!i.styleEnabled())return this;for(var s=0;s0&&this.spawn(a).updateStyle().emit("class"),r},addClass:function(e){return this.toggleClass(e,!0)},hasClass:function(e){var r=this[0];return r!=null&&r._private.classes.has(e)},toggleClass:function(e,r){kn(e)||(e=e.match(/\S+/g)||[]);for(var n=this,a=r===void 0,i=[],s=0,o=n.length;s0&&this.spawn(i).updateStyle().emit("class"),n},removeClass:function(e){return this.toggleClass(e,!1)},flashClass:function(e,r){var n=this;if(r==null)r=250;else if(r===0)return n;return n.addClass(e),setTimeout(function(){n.removeClass(e)},r),n}};F9.className=F9.classNames=F9.classes;$r={metaChar:"[\\!\\\"\\#\\$\\%\\&\\'\\(\\)\\*\\+\\,\\.\\/\\:\\;\\<\\=\\>\\?\\@\\[\\]\\^\\`\\{\\|\\}\\~]",comparatorOp:"=|\\!=|>|>=|<|<=|\\$=|\\^=|\\*=",boolOp:"\\?|\\!|\\^",string:`"(?:\\\\"|[^"])*"|'(?:\\\\'|[^'])*'`,number:Ja,meta:"degree|indegree|outdegree",separator:"\\s*,\\s*",descendant:"\\s+",child:"\\s+>\\s+",subject:"\\$",group:"node|edge|\\*",directedEdge:"\\s+->\\s+",undirectedEdge:"\\s+<->\\s+"};$r.variable="(?:[\\w-.]|(?:\\\\"+$r.metaChar+"))+";$r.className="(?:[\\w-]|(?:\\\\"+$r.metaChar+"))+";$r.value=$r.string+"|"+$r.number;$r.id=$r.variable;(function(){var t,e,r;for(t=$r.comparatorOp.split("|"),r=0;r=0)&&e!=="="&&($r.comparatorOp+="|\\!"+e)})();fn=function(){return{checks:[]}},Dt={GROUP:0,COLLECTION:1,FILTER:2,DATA_COMPARE:3,DATA_EXIST:4,DATA_BOOL:5,META_COMPARE:6,STATE:7,ID:8,CLASS:9,UNDIRECTED_EDGE:10,DIRECTED_EDGE:11,NODE_SOURCE:12,NODE_TARGET:13,NODE_NEIGHBOR:14,CHILD:15,DESCENDANT:16,PARENT:17,ANCESTOR:18,COMPOUND_SPLIT:19,TRUE:20},NH=[{selector:":selected",matches:function(e){return e.selected()}},{selector:":unselected",matches:function(e){return!e.selected()}},{selector:":selectable",matches:function(e){return e.selectable()}},{selector:":unselectable",matches:function(e){return!e.selectable()}},{selector:":locked",matches:function(e){return e.locked()}},{selector:":unlocked",matches:function(e){return!e.locked()}},{selector:":visible",matches:function(e){return e.visible()}},{selector:":hidden",matches:function(e){return!e.visible()}},{selector:":transparent",matches:function(e){return e.transparent()}},{selector:":grabbed",matches:function(e){return e.grabbed()}},{selector:":free",matches:function(e){return!e.grabbed()}},{selector:":removed",matches:function(e){return e.removed()}},{selector:":inside",matches:function(e){return!e.removed()}},{selector:":grabbable",matches:function(e){return e.grabbable()}},{selector:":ungrabbable",matches:function(e){return!e.grabbable()}},{selector:":animated",matches:function(e){return e.animated()}},{selector:":unanimated",matches:function(e){return!e.animated()}},{selector:":parent",matches:function(e){return e.isParent()}},{selector:":childless",matches:function(e){return e.isChildless()}},{selector:":child",matches:function(e){return e.isChild()}},{selector:":orphan",matches:function(e){return e.isOrphan()}},{selector:":nonorphan",matches:function(e){return e.isChild()}},{selector:":compound",matches:function(e){return e.isNode()?e.isParent():e.source().isParent()||e.target().isParent()}},{selector:":loop",matches:function(e){return e.isLoop()}},{selector:":simple",matches:function(e){return e.isSimple()}},{selector:":active",matches:function(e){return e.active()}},{selector:":inactive",matches:function(e){return!e.active()}},{selector:":backgrounding",matches:function(e){return e.backgrounding()}},{selector:":nonbackgrounding",matches:function(e){return!e.backgrounding()}}].sort(function(t,e){return o3t(t.selector,e.selector)}),c6t=(function(){for(var t={},e,r=0;r0&&h.edgeCount>0)return nn("The selector `"+e+"` is invalid because it uses both a compound selector and an edge selector"),!1;if(h.edgeCount>1)return nn("The selector `"+e+"` is invalid because it uses multiple edge selectors"),!1;h.edgeCount===1&&nn("The selector `"+e+"` is deprecated. Edge selectors do not take effect on changes to source and target nodes after an edge is added, for performance reasons. Use a class or data selector on edges instead, updating the class or data of an edge when your app detects a change in source or target nodes.")}return!0},g6t=function(){if(this.toStringCache!=null)return this.toStringCache;for(var e=function(h){return h??""},r=function(h){return Yt(h)?'"'+h+'"':e(h)},n=function(h){return" "+h+" "},a=function(h,f){var d=h.type,p=h.value;switch(d){case Dt.GROUP:{var m=e(p);return m.substring(0,m.length-1)}case Dt.DATA_COMPARE:{var g=h.field,v=h.operator;return"["+g+n(e(v))+r(p)+"]"}case Dt.DATA_BOOL:{var y=h.operator,b=h.field;return"["+e(y)+b+"]"}case Dt.DATA_EXIST:{var w=h.field;return"["+w+"]"}case Dt.META_COMPARE:{var C=h.operator,k=h.field;return"[["+k+n(e(C))+r(p)+"]]"}case Dt.STATE:return p;case Dt.ID:return"#"+p;case Dt.CLASS:return"."+p;case Dt.PARENT:case Dt.CHILD:return i(h.parent,f)+n(">")+i(h.child,f);case Dt.ANCESTOR:case Dt.DESCENDANT:return i(h.ancestor,f)+" "+i(h.descendant,f);case Dt.COMPOUND_SPLIT:{var E=i(h.left,f),_=i(h.subject,f),S=i(h.right,f);return E+(E.length>0?" ":"")+_+S}case Dt.TRUE:return""}},i=function(h,f){return h.checks.reduce(function(d,p,m){return d+(f===h&&m===0?"$":"")+a(p,f)},"")},s="",o=0;o1&&o=0&&(r=r.replace("!",""),f=!0),r.indexOf("@")>=0&&(r=r.replace("@",""),h=!0),(i||o||h)&&(l=!i&&!s?"":""+e,u=""+n),h&&(e=l=l.toLowerCase(),n=u=u.toLowerCase()),r){case"*=":a=l.indexOf(u)>=0;break;case"$=":a=l.indexOf(u,l.length-u.length)>=0;break;case"^=":a=l.indexOf(u)===0;break;case"=":a=e===n;break;case">":d=!0,a=e>n;break;case">=":d=!0,a=e>=n;break;case"<":d=!0,a=e1&&arguments[1]!==void 0?arguments[1]:!0;return oW(this,t,e,t9e)};Xx.forEachUp=function(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;return oW(this,t,e,r9e)};Xx.forEachUpAndDown=function(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;return oW(this,t,e,E6t)};Xx.ancestors=Xx.parents;R6=n9e={data:rn.data({field:"data",bindingEvent:"data",allowBinding:!0,allowSetting:!0,settingEvent:"data",settingTriggersEvent:!0,triggerFnName:"trigger",allowGetting:!0,immutableKeys:{id:!0,source:!0,target:!0,parent:!0},updateStyle:!0}),removeData:rn.removeData({field:"data",event:"data",triggerFnName:"trigger",triggerEvent:!0,immutableKeys:{id:!0,source:!0,target:!0,parent:!0},updateStyle:!0}),scratch:rn.data({field:"scratch",bindingEvent:"scratch",allowBinding:!0,allowSetting:!0,settingEvent:"scratch",settingTriggersEvent:!0,triggerFnName:"trigger",allowGetting:!0,updateStyle:!0}),removeScratch:rn.removeData({field:"scratch",event:"scratch",triggerFnName:"trigger",triggerEvent:!0,updateStyle:!0}),rscratch:rn.data({field:"rscratch",allowBinding:!1,allowSetting:!0,settingTriggersEvent:!1,allowGetting:!0}),removeRscratch:rn.removeData({field:"rscratch",triggerEvent:!1}),id:function(){var e=this[0];if(e)return e._private.data.id}};R6.attr=R6.data;R6.removeAttr=R6.removeData;C6t=n9e,mL={};jt(mL,{degree:pH(function(t,e){return e.source().same(e.target())?2:1}),indegree:pH(function(t,e){return e.target().same(t)?1:0}),outdegree:pH(function(t,e){return e.source().same(t)?1:0})});jt(mL,{minDegree:Dx("degree",function(t,e){return te}),minIndegree:Dx("indegree",function(t,e){return te}),minOutdegree:Dx("outdegree",function(t,e){return te})});jt(mL,{totalDegree:function(e){for(var r=0,n=this.nodes(),a=0;a0,d=f;f&&(h=h[0]);var p=d?h.position():{x:0,y:0};r!==void 0?u.position(e,r+p[e]):i!==void 0&&u.position({x:i.x+p.x,y:i.y+p.y})}else{var m=n.position(),g=o?n.parent():null,v=g&&g.length>0,y=v;v&&(g=g[0]);var b=y?g.position():{x:0,y:0};return i={x:m.x-b.x,y:m.y-b.y},e===void 0?i:i[e]}else if(!s)return;return this}};_u.modelPosition=_u.point=_u.position;_u.modelPositions=_u.points=_u.positions;_u.renderedPoint=_u.renderedPosition;_u.relativePoint=_u.relativePosition;S6t=a9e,jx=function(e){switch(e){case"left":case"right-inside":return"left";case"right":case"left-inside":return"right";default:return"center"}},Kx=function(e){switch(e){case"top":case"bottom-inside":return"top";case"bottom":case"top-inside":return"bottom";default:return"center"}},_6t=function(e){switch(e){case"left":return"right";case"right":return"left";case"left-inside":return"left";case"right-inside":return"right";default:return"center"}};Hx=H0={};H0.renderedBoundingBox=function(t){var e=this.boundingBox(t),r=this.cy(),n=r.zoom(),a=r.pan(),i=e.x1*n+a.x,s=e.x2*n+a.x,o=e.y1*n+a.y,l=e.y2*n+a.y;return{x1:i,x2:s,y1:o,y2:l,w:s-i,h:l-o}};H0.dirtyCompoundBoundsCache=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,e=this.cy();return!e.styleEnabled()||!e.hasCompoundNodes()?this:(this.forEachUp(function(r){if(r.isParent()){var n=r._private;n.compoundBoundsClean=!1,n.bbCache=null,t||r.emitAndNotify("bounds")}}),this)};H0.updateCompoundBounds=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,e=this.cy();if(!e.styleEnabled()||!e.hasCompoundNodes())return this;if(!t&&e.batching())return this;function r(s){if(!s.isParent())return;var o=s._private,l=s.children(),u=s.pstyle("compound-sizing-wrt-labels").value==="include",h={width:{val:s.pstyle("min-width").pfValue,left:s.pstyle("min-width-bias-left"),right:s.pstyle("min-width-bias-right")},height:{val:s.pstyle("min-height").pfValue,top:s.pstyle("min-height-bias-top"),bottom:s.pstyle("min-height-bias-bottom")}},f=l.boundingBox({includeLabels:u,includeOverlays:!1,useCache:!1}),d=o.position;(f.w===0||f.h===0)&&(f={w:s.pstyle("width").pfValue,h:s.pstyle("height").pfValue},f.x1=d.x-f.w/2,f.x2=d.x+f.w/2,f.y1=d.y-f.h/2,f.y2=d.y+f.h/2);function p(L,M,D){var T=0,I=0,N=M+D;return L>0&&N>0&&(T=M/N*L,I=D/N*L),{biasDiff:T,biasComplementDiff:I}}function m(L,M,D,T){if(D.units==="%")switch(T){case"width":return L>0?D.pfValue*L:0;case"height":return M>0?D.pfValue*M:0;case"average":return L>0&&M>0?D.pfValue*(L+M)/2:0;case"min":return L>0&&M>0?L>M?D.pfValue*M:D.pfValue*L:0;case"max":return L>0&&M>0?L>M?D.pfValue*L:D.pfValue*M:0;default:return 0}else return D.units==="px"?D.pfValue:0}var g=h.width.left.value;h.width.left.units==="px"&&h.width.val>0&&(g=g*100/h.width.val);var v=h.width.right.value;h.width.right.units==="px"&&h.width.val>0&&(v=v*100/h.width.val);var y=h.height.top.value;h.height.top.units==="px"&&h.height.val>0&&(y=y*100/h.height.val);var b=h.height.bottom.value;h.height.bottom.units==="px"&&h.height.val>0&&(b=b*100/h.height.val);var w=p(h.width.val-f.w,g,v),C=w.biasDiff,k=w.biasComplementDiff,E=p(h.height.val-f.h,y,b),_=E.biasDiff,S=E.biasComplementDiff;o.autoPadding=m(f.w,f.h,s.pstyle("padding"),s.pstyle("padding-relative-to").value),o.autoWidth=Math.max(f.w,h.width.val),d.x=(-C+f.x1+f.x2+k)/2,o.autoHeight=Math.max(f.h,h.height.val),d.y=(-_+f.y1+f.y2+S)/2}for(var n=0;ne.x2?a:e.x2,e.y1=ne.y2?i:e.y2,e.w=e.x2-e.x1,e.h=e.y2-e.y1)},I0=function(e,r){return r==null?e:Su(e,r.x1,r.y1,r.x2,r.y2)},d6=function(e,r,n){return Ws(e,r,n)},A9=function(e,r,n){if(!r.cy().headless()){var a=r._private,i=a.rstyle,s=i.arrowWidth/2,o=r.pstyle(n+"-arrow-shape").value,l,u;if(o!=="none"){n==="source"?(l=i.srcX,u=i.srcY):n==="target"?(l=i.tgtX,u=i.tgtY):(l=i.midX,u=i.midY);var h=a.arrowBounds=a.arrowBounds||{},f=h[n]=h[n]||{};f.x1=l-s,f.y1=u-s,f.x2=l+s,f.y2=u+s,f.w=f.x2-f.x1,f.h=f.y2-f.y1,P9(f,1),Su(e,f.x1,f.y1,f.x2,f.y2)}}},mH=function(e,r,n){if(!r.cy().headless()){var a;n?a=n+"-":a="";var i=r._private,s=i.rstyle,o=r.pstyle(a+"label").strValue;if(o){var l=r.pstyle("text-halign"),u=r.pstyle("text-valign"),h=d6(s,"labelWidth",n),f=d6(s,"labelHeight",n),d=d6(s,"labelX",n),p=d6(s,"labelY",n),m=r.pstyle(a+"text-margin-x").pfValue,g=r.pstyle(a+"text-margin-y").pfValue,v=r.isEdge(),y=r.pstyle(a+"text-rotation"),b=r.pstyle("text-outline-width").pfValue,w=r.pstyle("text-border-width").pfValue,C=w/2,k=r.pstyle("text-background-padding").pfValue,E=2,_=f,S=h,L=S/2,M=_/2,D,T,I,N;if(v)D=d-L,T=d+L,I=p-M,N=p+M;else{switch(jx(l.value)){case"left":D=d-S,T=d;break;case"center":D=d-L,T=d+L;break;case"right":D=d,T=d+S;break}switch(Kx(u.value)){case"top":I=p-_,N=p;break;case"center":I=p-M,N=p+M;break;case"bottom":I=p,N=p+_;break}}var O=m-Math.max(b,C)-k-E,R=m+Math.max(b,C)+k+E,P=g-Math.max(b,C)-k-E,B=g+Math.max(b,C)+k+E;D+=O,T+=R,I+=P,N+=B;var F=n||"main",G=i.labelBounds,z=G[F]=G[F]||{};z.x1=D,z.y1=I,z.x2=T,z.y2=N,z.w=T-D,z.h=N-I,z.leftPad=O,z.rightPad=R,z.topPad=P,z.botPad=B;var H=v&&y.strValue==="autorotate",Q=y.pfValue!=null&&y.pfValue!==0;if(H||Q){var Y=H?d6(i.rstyle,"labelAngle",n):y.pfValue,ie=Math.cos(Y),se=Math.sin(Y),oe=(D+T)/2,pe=(I+N)/2;if(!v){switch(jx(l.value)){case"left":oe=T;break;case"right":oe=D;break}switch(Kx(u.value)){case"top":pe=N;break;case"bottom":pe=I;break}}var J=function(ne,ee){return ne=ne-oe,ee=ee-pe,{x:ne*ie-ee*se+oe,y:ne*se+ee*ie+pe}},j=J(D,I),Z=J(D,N),K=J(T,I),X=J(T,N);D=Math.min(j.x,Z.x,K.x,X.x),T=Math.max(j.x,Z.x,K.x,X.x),I=Math.min(j.y,Z.y,K.y,X.y),N=Math.max(j.y,Z.y,K.y,X.y)}var ae=F+"Rot",W=G[ae]=G[ae]||{};W.x1=D,W.y1=I,W.x2=T,W.y2=N,W.w=T-D,W.h=N-I,Su(e,D,I,T,N),Su(i.labelBounds.all,D,I,T,N)}return e}},T7e=function(e,r){if(!r.cy().headless()){var n=r.pstyle("outline-opacity").value,a=r.pstyle("outline-width").value,i=r.pstyle("outline-offset").value,s=a+i;s9e(e,r,n,s,"outside",s/2)}},s9e=function(e,r,n,a,i,s){if(!(n===0||a<=0||i==="inside")){var o=r.cy(),l=o.renderer(),u=l.nodeShapes[l.getNodeShape(r)];if(u){var h=r.position(),f=h.x,d=h.y,p=r.width(),m=r.height();if(u.hasMiterBounds){i==="center"&&(a/=2);var g=u.miterBounds(f,d,p,m,a);I0(e,g)}else s!=null&&s>0&&B9(e,[s,s,s,s])}}},A6t=function(e,r){if(!r.cy().headless()){var n=r.pstyle("border-opacity").value,a=r.pstyle("border-width").pfValue,i=r.pstyle("border-position").value;s9e(e,r,n,a,i)}},L6t=function(e,r){var n=e._private.cy,a=n.styleEnabled(),i=n.headless(),s=Ys(),o=e._private,l=e.isNode(),u=e.isEdge(),h,f,d,p,m,g,v=o.rstyle,y=l&&a?e.pstyle("bounds-expansion").pfValue:[0],b=function(Se){return Se.pstyle("display").value!=="none"},w=!a||b(e)&&(!u||b(e.source())&&b(e.target()));if(w){var C=0,k=0;a&&r.includeOverlays&&(C=e.pstyle("overlay-opacity").value,C!==0&&(k=e.pstyle("overlay-padding").value));var E=0,_=0;a&&r.includeUnderlays&&(E=e.pstyle("underlay-opacity").value,E!==0&&(_=e.pstyle("underlay-padding").value));var S=Math.max(k,_),L=0,M=0;if(a&&(L=e.pstyle("width").pfValue,M=L/2),l&&r.includeNodes){var D=e.position();m=D.x,g=D.y;var T=e.outerWidth(),I=T/2,N=e.outerHeight(),O=N/2;h=m-I,f=m+I,d=g-O,p=g+O,Su(s,h,d,f,p),a&&T7e(s,e),a&&r.includeOutlines&&!i&&T7e(s,e),a&&A6t(s,e)}else if(u&&r.includeEdges)if(a&&!i){var R=e.pstyle("curve-style").strValue;if(h=Math.min(v.srcX,v.midX,v.tgtX),f=Math.max(v.srcX,v.midX,v.tgtX),d=Math.min(v.srcY,v.midY,v.tgtY),p=Math.max(v.srcY,v.midY,v.tgtY),h-=M,f+=M,d-=M,p+=M,Su(s,h,d,f,p),R==="haystack"){var P=v.haystackPts;if(P&&P.length===2){if(h=P[0].x,d=P[0].y,f=P[1].x,p=P[1].y,h>f){var B=h;h=f,f=B}if(d>p){var F=d;d=p,p=F}Su(s,h-M,d-M,f+M,p+M)}}else if(R==="bezier"||R==="unbundled-bezier"||D0(R,"segments")||D0(R,"taxi")){var G;switch(R){case"bezier":case"unbundled-bezier":G=v.bezierPts;break;case"segments":case"taxi":case"round-segments":case"round-taxi":G=v.linePts;break}if(G!=null)for(var z=0;zf){var oe=h;h=f,f=oe}if(d>p){var pe=d;d=p,p=pe}h-=M,f+=M,d-=M,p+=M,Su(s,h,d,f,p)}if(a&&r.includeEdges&&u&&(A9(s,e,"mid-source"),A9(s,e,"mid-target"),A9(s,e,"source"),A9(s,e,"target")),a){var J=e.pstyle("ghost").value==="yes";if(J){var j=e.pstyle("ghost-offset-x").pfValue,Z=e.pstyle("ghost-offset-y").pfValue;Su(s,s.x1+j,s.y1+Z,s.x2+j,s.y2+Z)}}var K=o.bodyBounds=o.bodyBounds||{};l8e(K,s),B9(K,y),P9(K,1),a&&(h=s.x1,f=s.x2,d=s.y1,p=s.y2,Su(s,h-S,d-S,f+S,p+S));var X=o.overlayBounds=o.overlayBounds||{};l8e(X,s),B9(X,y),P9(X,1);var ae=o.labelBounds=o.labelBounds||{};ae.all!=null?u5t(ae.all):ae.all=Ys(),a&&r.includeLabels&&(r.includeMainLabels&&mH(s,e,null),u&&(r.includeSourceLabels&&mH(s,e,"source"),r.includeTargetLabels&&mH(s,e,"target")))}return s.x1=Ml(s.x1),s.y1=Ml(s.y1),s.x2=Ml(s.x2),s.y2=Ml(s.y2),s.w=Ml(s.x2-s.x1),s.h=Ml(s.y2-s.y1),s.w>0&&s.h>0&&w&&(B9(s,y),P9(s,1)),s},o9e=function(e){var r=0,n=function(s){return(s?1:0)<=0;o--)s(o);return this};U0.removeAllListeners=function(){return this.removeListener("*")};U0.emit=U0.trigger=function(t,e,r){var n=this.listeners,a=n.length;return this.emitting++,kn(e)||(e=[e]),H6t(this,function(i,s){r!=null&&(n=[{event:s.event,type:s.type,namespace:s.namespace,callback:r}],a=n.length);for(var o=function(){var h=n[l];if(h.type===s.type&&(!h.namespace||h.namespace===s.namespace||h.namespace===q6t)&&i.eventMatches(i.context,h,s)){var f=[s];e!=null&&M3t(f,e),i.beforeEmit(i.context,h,s),h.conf&&h.conf.one&&(i.listeners=i.listeners.filter(function(m){return m!==h}));var d=i.callbackContext(i.context,h,s),p=h.callback.apply(d,f);i.afterEmit(i.context,h,s),p===!1&&(s.stopPropagation(),s.preventDefault())}},l=0;l1&&!s){var o=this.length-1,l=this[o],u=l._private.data.id;this[o]=void 0,this[e]=l,i.set(u,{ele:l,index:e})}return this.length--,this},unmergeOne:function(e){e=e[0];var r=this._private,n=e._private.data.id,a=r.map,i=a.get(n);if(!i)return this;var s=i.index;return this.unmergeAt(s),this},unmerge:function(e){var r=this._private.cy;if(!e)return this;if(e&&Yt(e)){var n=e;e=r.mutableElements().filter(n)}for(var a=0;a=0;r--){var n=this[r];e(n)&&this.unmergeAt(r)}return this},map:function(e,r){for(var n=[],a=this,i=0;in&&(n=l,a=o)}return{value:n,ele:a}},min:function(e,r){for(var n=1/0,a,i=this,s=0;s=0&&i"u"?"undefined":ei(Symbol))!=e&&ei(Symbol.iterator)!=e;r&&(J9[Symbol.iterator]=function(){var n=this,a={value:void 0,done:!1},i=0,s=this.length;return pAe({next:function(){return i1&&arguments[1]!==void 0?arguments[1]:!0,n=this[0],a=n.cy();if(a.styleEnabled()&&n){n._private.styleDirty&&(n._private.styleDirty=!1,a.style().apply(n));var i=n._private.style[e];return i??(r?a.style().getDefaultProperty(e):null)}},numericStyle:function(e){var r=this[0];if(r.cy().styleEnabled()&&r){var n=r.pstyle(e);return n.pfValue!==void 0?n.pfValue:n.value}},numericStyleUnits:function(e){var r=this[0];if(r.cy().styleEnabled()&&r)return r.pstyle(e).units},renderedStyle:function(e){var r=this.cy();if(!r.styleEnabled())return this;var n=this[0];if(n)return r.style().getRenderedStyle(n,e)},style:function(e,r){var n=this.cy();if(!n.styleEnabled())return this;var a=!1,i=n.style();if(Gr(e)){var s=e;i.applyBypass(this,s,a),this.emitAndNotify("style")}else if(Yt(e))if(r===void 0){var o=this[0];return o?i.getStylePropertyValue(o,e):void 0}else i.applyBypass(this,e,r,a),this.emitAndNotify("style");else if(e===void 0){var l=this[0];return l?i.getRawStyle(l):void 0}return this},removeStyle:function(e){var r=this.cy();if(!r.styleEnabled())return this;var n=!1,a=r.style(),i=this;if(e===void 0)for(var s=0;s0&&e.push(h[0]),e.push(o[0])}return this.spawn(e,!0).filter(t)},"neighborhood"),closedNeighborhood:function(e){return this.neighborhood().add(this).filter(e)},openNeighborhood:function(e){return this.neighborhood(e)}});hs.neighbourhood=hs.neighborhood;hs.closedNeighbourhood=hs.closedNeighborhood;hs.openNeighbourhood=hs.openNeighborhood;jt(hs,{source:Ol(function(e){var r=this[0],n;return r&&(n=r._private.source||r.cy().collection()),n&&e?n.filter(e):n},"source"),target:Ol(function(e){var r=this[0],n;return r&&(n=r._private.target||r.cy().collection()),n&&e?n.filter(e):n},"target"),sources:M7e({attr:"source"}),targets:M7e({attr:"target"})});jt(hs,{edgesWith:Ol(O7e(),"edgesWith"),edgesTo:Ol(O7e({thisIsSrc:!0}),"edgesTo")});jt(hs,{connectedEdges:Ol(function(t){for(var e=[],r=this,n=0;n0);return s},component:function(){var e=this[0];return e.cy().mutableElements().components(e)[0]}});hs.componentsOf=hs.components;Wi=function(e,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(e===void 0){jn("A collection must have a reference to the core");return}var i=new yf,s=!1;if(!r)r=[];else if(r.length>0&&Gr(r[0])&&!P6(r[0])){s=!0;for(var o=[],l=new Zx,u=0,h=r.length;u0&&arguments[0]!==void 0?arguments[0]:!0,e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,r=this,n=r.cy(),a=n._private,i=[],s=[],o,l=0,u=r.length;l0){for(var F=o.length===r.length?r:new Wi(n,o),G=0;G0&&arguments[0]!==void 0?arguments[0]:!0,e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,r=this,n=[],a={},i=r._private.cy;function s(N){for(var O=N._private.edges,R=0;R0&&(t?D.emitAndNotify("remove"):e&&D.emit("remove"));for(var T=0;Th&&Math.abs(m.v)>h;);return d?function(g){return l[g*(l.length-1)|0]}:u}})(),Dn=function(e,r,n,a){var i=tkt(e,r,n,a);return function(s,o,l){return s+(o-s)*i(l)}},$9={linear:function(e,r,n){return e+(r-e)*n},ease:Dn(.25,.1,.25,1),"ease-in":Dn(.42,0,1,1),"ease-out":Dn(0,0,.58,1),"ease-in-out":Dn(.42,0,.58,1),"ease-in-sine":Dn(.47,0,.745,.715),"ease-out-sine":Dn(.39,.575,.565,1),"ease-in-out-sine":Dn(.445,.05,.55,.95),"ease-in-quad":Dn(.55,.085,.68,.53),"ease-out-quad":Dn(.25,.46,.45,.94),"ease-in-out-quad":Dn(.455,.03,.515,.955),"ease-in-cubic":Dn(.55,.055,.675,.19),"ease-out-cubic":Dn(.215,.61,.355,1),"ease-in-out-cubic":Dn(.645,.045,.355,1),"ease-in-quart":Dn(.895,.03,.685,.22),"ease-out-quart":Dn(.165,.84,.44,1),"ease-in-out-quart":Dn(.77,0,.175,1),"ease-in-quint":Dn(.755,.05,.855,.06),"ease-out-quint":Dn(.23,1,.32,1),"ease-in-out-quint":Dn(.86,0,.07,1),"ease-in-expo":Dn(.95,.05,.795,.035),"ease-out-expo":Dn(.19,1,.22,1),"ease-in-out-expo":Dn(1,0,0,1),"ease-in-circ":Dn(.6,.04,.98,.335),"ease-out-circ":Dn(.075,.82,.165,1),"ease-in-out-circ":Dn(.785,.135,.15,.86),spring:function(e,r,n){if(n===0)return $9.linear;var a=rkt(e,r,n);return function(i,s,o){return i+(s-i)*a(o)}},"cubic-bezier":Dn};ikt={animate:rn.animate(),animation:rn.animation(),animated:rn.animated(),clearQueue:rn.clearQueue(),delay:rn.delay(),delayAnimation:rn.delayAnimation(),stop:rn.stop(),addToAnimationPool:function(e){var r=this;r.styleEnabled()&&r._private.aniEles.merge(e)},stopAnimationLoop:function(){this._private.animationsRunning=!1},startAnimationLoop:function(){var e=this;if(e._private.animationsRunning=!0,!e.styleEnabled())return;function r(){e._private.animationsRunning&&X9(function(i){z7e(i,e),r()})}var n=e.renderer();n&&n.beforeRender?n.beforeRender(function(i,s){z7e(s,e)},n.beforeRenderPriorities.animations):r()}},skt={qualifierCompare:function(e,r){return e==null||r==null?e==null&&r==null:e.sameText(r)},eventMatches:function(e,r,n){var a=r.qualifier;return a!=null?e!==n.target&&P6(n.target)&&a.matches(n.target):!0},addEventFields:function(e,r){r.cy=e,r.target=e},callbackContext:function(e,r,n){return r.qualifier!=null?n.target:e}},I9=function(e){return Yt(e)?new $0(e):e},y9e={createEmitter:function(){var e=this._private;return e.emitter||(e.emitter=new gL(skt,this)),this},emitter:function(){return this._private.emitter},on:function(e,r,n){return this.emitter().on(e,I9(r),n),this},removeListener:function(e,r,n){return this.emitter().removeListener(e,I9(r),n),this},removeAllListeners:function(){return this.emitter().removeAllListeners(),this},one:function(e,r,n){return this.emitter().one(e,I9(r),n),this},once:function(e,r,n){return this.emitter().one(e,I9(r),n),this},emit:function(e,r){return this.emitter().emit(e,r),this},emitAndNotify:function(e,r){return this.emit(e),this.notify(e,r),this}};rn.eventAliasesOn(y9e);OH={png:function(e){var r=this._private.renderer;return e=e||{},r.png(e)},jpg:function(e){var r=this._private.renderer;return e=e||{},e.bg=e.bg||"#fff",r.jpg(e)}};OH.jpeg=OH.jpg;G9={layout:function(e){var r=this;if(e==null){jn("Layout options must be specified to make a layout");return}if(e.name==null){jn("A `name` must be specified to make a layout");return}var n=e.name,a=r.extension("layout",n);if(a==null){jn("No such layout `"+n+"` found. Did you forget to import it and `cytoscape.use()` it?");return}var i;Yt(e.eles)?i=r.$(e.eles):i=e.eles!=null?e.eles:r.$();var s=new a(jt({},e,{cy:r,eles:i}));return s}};G9.createLayout=G9.makeLayout=G9.layout;okt={notify:function(e,r){var n=this._private;if(this.batching()){n.batchNotifications=n.batchNotifications||{};var a=n.batchNotifications[e]=n.batchNotifications[e]||this.collection();r!=null&&a.merge(r);return}if(n.notificationsEnabled){var i=this.renderer();this.destroyed()||!i||i.notify(e,r)}},notifications:function(e){var r=this._private;return e===void 0?r.notificationsEnabled:(r.notificationsEnabled=!!e,this)},noNotifications:function(e){this.notifications(!1),e(),this.notifications(!0)},batching:function(){return this._private.batchCount>0},startBatch:function(){var e=this._private;return e.batchCount==null&&(e.batchCount=0),e.batchCount===0&&(e.batchStyleEles=this.collection(),e.batchNotifications={}),e.batchCount++,this},endBatch:function(){var e=this._private;if(e.batchCount===0)return this;if(e.batchCount--,e.batchCount===0){e.batchStyleEles.updateStyle();var r=this.renderer();Object.keys(e.batchNotifications).forEach(function(n){var a=e.batchNotifications[n];a.empty()?r.notify(n):r.notify(n,a)})}return this},batch:function(e){return this.startBatch(),e(),this.endBatch(),this},batchData:function(e){var r=this;return this.batch(function(){for(var n=Object.keys(e),a=0;a0;)r.removeChild(r.childNodes[0]);e._private.renderer=null,e.mutableElements().forEach(function(n){var a=n._private;a.rscratch={},a.rstyle={},a.animation.current=[],a.animation.queue=[]})},onRender:function(e){return this.on("render",e)},offRender:function(e){return this.off("render",e)}};PH.invalidateDimensions=PH.resize;U9={collection:function(e,r){return Yt(e)?this.$(e):Qo(e)?e.collection():kn(e)?(r||(r={}),new Wi(this,e,r.unique,r.removed)):new Wi(this)},nodes:function(e){var r=this.$(function(n){return n.isNode()});return e?r.filter(e):r},edges:function(e){var r=this.$(function(n){return n.isEdge()});return e?r.filter(e):r},$:function(e){var r=this._private.elements;return e?r.filter(e):r.spawnSelf()},mutableElements:function(){return this._private.elements}};U9.elements=U9.filter=U9.$;Ci={},k6="t",ukt="f";Ci.apply=function(t){for(var e=this,r=e._private,n=r.cy,a=n.collection(),i=0;i0;if(d||f&&p){var m=void 0;d&&p||d?m=u.properties:p&&(m=u.mappedProperties);for(var g=0;g1&&(C=1),o.color){var E=n.valueMin[0],_=n.valueMax[0],S=n.valueMin[1],L=n.valueMax[1],M=n.valueMin[2],D=n.valueMax[2],T=n.valueMin[3]==null?1:n.valueMin[3],I=n.valueMax[3]==null?1:n.valueMax[3],N=[Math.round(E+(_-E)*C),Math.round(S+(L-S)*C),Math.round(M+(D-M)*C),Math.round(T+(I-T)*C)];i={bypass:n.bypass,name:n.name,value:N,strValue:"rgb("+N[0]+", "+N[1]+", "+N[2]+")"}}else if(o.number){var O=n.valueMin+(n.valueMax-n.valueMin)*C;i=this.parse(n.name,O,n.bypass,d)}else return!1;if(!i)return g(),!1;i.mapping=n,n=i;break}case s.data:{for(var R=n.field.split("."),P=f.data,B=0;B0&&i>0){for(var o={},l=!1,u=0;u0?t.delayAnimation(s).play().promise().then(w):w()}).then(function(){return t.animation({style:o,duration:i,easing:t.pstyle("transition-timing-function").value,queue:!1}).play().promise()}).then(function(){r.removeBypasses(t,a),t.emitAndNotify("style"),n.transitioning=!1})}else n.transitioning&&(this.removeBypasses(t,a),t.emitAndNotify("style"),n.transitioning=!1)};Ci.checkTrigger=function(t,e,r,n,a,i){var s=this.properties[e],o=a(s);t.removed()||o!=null&&o(r,n,t)&&i(s)};Ci.checkZOrderTrigger=function(t,e,r,n){var a=this;this.checkTrigger(t,e,r,n,function(i){return i.triggersZOrder},function(){a._private.cy.notify("zorder",t)})};Ci.checkBoundsTrigger=function(t,e,r,n){this.checkTrigger(t,e,r,n,function(a){return a.triggersBounds},function(a){t.dirtyCompoundBoundsCache(),t.dirtyBoundingBoxCache()})};Ci.checkConnectedEdgesBoundsTrigger=function(t,e,r,n){this.checkTrigger(t,e,r,n,function(a){return a.triggersBoundsOfConnectedEdges},function(a){t.connectedEdges().forEach(function(i){i.dirtyBoundingBoxCache()})})};Ci.checkParallelEdgesBoundsTrigger=function(t,e,r,n){this.checkTrigger(t,e,r,n,function(a){return a.triggersBoundsOfParallelEdges},function(a){t.parallelEdges().forEach(function(i){i.dirtyBoundingBoxCache()})})};Ci.checkTriggers=function(t,e,r,n){t.dirtyStyleCache(),this.checkZOrderTrigger(t,e,r,n),this.checkBoundsTrigger(t,e,r,n),this.checkConnectedEdgesBoundsTrigger(t,e,r,n),this.checkParallelEdgesBoundsTrigger(t,e,r,n)};q6={};q6.applyBypass=function(t,e,r,n){var a=this,i=[],s=!0;if(e==="*"||e==="**"){if(r!==void 0)for(var o=0;oa.length?n=n.substr(a.length):n=""}function l(){i.length>s.length?i=i.substr(s.length):i=""}for(;;){var u=n.match(/^\s*$/);if(u)break;var h=n.match(/^\s*((?:.|\s)+?)\s*\{((?:.|\s)+?)\}/);if(!h){nn("Halting stylesheet parsing: String stylesheet contains more to parse but no selector and block found in: "+n);break}a=h[0];var f=h[1];if(f!=="core"){var d=new $0(f);if(d.invalid){nn("Skipping parsing of block: Invalid selector found in string stylesheet: "+f),o();continue}}var p=h[2],m=!1;i=p;for(var g=[];;){var v=i.match(/^\s*$/);if(v)break;var y=i.match(/^\s*(.+?)\s*:\s*(.+?)(?:\s*;|\s*$)/);if(!y){nn("Skipping parsing of block: Invalid formatting of style property and value definitions found in:"+p),m=!0;break}s=y[0];var b=y[1],w=y[2],C=e.properties[b];if(!C){nn("Skipping property: Invalid property name in: "+s),l();continue}var k=r.parse(b,w);if(!k){nn("Skipping property: Invalid property definition in: "+s),l();continue}g.push({name:b,val:w}),l()}if(m){o();break}r.selector(f);for(var E=0;E=7&&e[0]==="d"&&(h=new RegExp(o.data.regex).exec(e))){if(r)return!1;var d=o.data;return{name:t,value:h,strValue:""+e,mapped:d,field:h[1],bypass:r}}else if(e.length>=10&&e[0]==="m"&&(f=new RegExp(o.mapData.regex).exec(e))){if(r||u.multiple)return!1;var p=o.mapData;if(!(u.color||u.number))return!1;var m=this.parse(t,f[4]);if(!m||m.mapped)return!1;var g=this.parse(t,f[5]);if(!g||g.mapped)return!1;if(m.pfValue===g.pfValue||m.strValue===g.strValue)return nn("`"+t+": "+e+"` is not a valid mapper because the output range is zero; converting to `"+t+": "+m.strValue+"`"),this.parse(t,m.strValue);if(u.color){var v=m.value,y=g.value,b=v[0]===y[0]&&v[1]===y[1]&&v[2]===y[2]&&(v[3]===y[3]||(v[3]==null||v[3]===1)&&(y[3]==null||y[3]===1));if(b)return!1}return{name:t,value:f,strValue:""+e,mapped:p,field:f[1],fieldMin:parseFloat(f[2]),fieldMax:parseFloat(f[3]),valueMin:m.value,valueMax:g.value,bypass:r}}}if(u.multiple&&n!=="multiple"){var w;if(l?w=e.split(/\s+/):kn(e)?w=e:w=[e],u.evenMultiple&&w.length%2!==0)return null;for(var C=[],k=[],E=[],_="",S=!1,L=0;L0?" ":"")+M.strValue}return u.validate&&!u.validate(C,k)?null:u.singleEnum&&S?C.length===1&&Yt(C[0])?{name:t,value:C[0],strValue:C[0],bypass:r}:null:{name:t,value:C,pfValue:E,strValue:_,bypass:r,units:k}}var D=function(){for(var J=0;Ju.max||u.strictMax&&e===u.max))return null;var R={name:t,value:e,strValue:""+e+(T||""),units:T,bypass:r};return u.unitless||T!=="px"&&T!=="em"?R.pfValue=e:R.pfValue=T==="px"||!T?e:this.getEmSizeInPixels()*e,(T==="ms"||T==="s")&&(R.pfValue=T==="ms"?e:1e3*e),(T==="deg"||T==="rad")&&(R.pfValue=T==="rad"?e:i5t(e)),T==="%"&&(R.pfValue=e/100),R}else if(u.propList){var P=[],B=""+e;if(B!=="none"){for(var F=B.split(/\s*,\s*|\s+/),G=0;G0&&o>0&&!isNaN(n.w)&&!isNaN(n.h)&&n.w>0&&n.h>0){l=Math.min((s-2*r)/n.w,(o-2*r)/n.h),l=l>this._private.maxZoom?this._private.maxZoom:l,l=l=n.minZoom&&(n.maxZoom=r),this},minZoom:function(e){return e===void 0?this._private.minZoom:this.zoomRange({min:e})},maxZoom:function(e){return e===void 0?this._private.maxZoom:this.zoomRange({max:e})},getZoomedViewport:function(e){var r=this._private,n=r.pan,a=r.zoom,i,s,o=!1;if(r.zoomingEnabled||(o=!0),xt(e)?s=e:Gr(e)&&(s=e.level,e.position!=null?i=uL(e.position,a,n):e.renderedPosition!=null&&(i=e.renderedPosition),i!=null&&!r.panningEnabled&&(o=!0)),s=s>r.maxZoom?r.maxZoom:s,s=sr.maxZoom||!r.zoomingEnabled?s=!0:(r.zoom=l,i.push("zoom"))}if(a&&(!s||!e.cancelOnFailedZoom)&&r.panningEnabled){var u=e.pan;xt(u.x)&&(r.pan.x=u.x,o=!1),xt(u.y)&&(r.pan.y=u.y,o=!1),o||i.push("pan")}return i.length>0&&(i.push("viewport"),this.emit(i.join(" ")),this.notify("viewport")),this},center:function(e){var r=this.getCenterPan(e);return r&&(this._private.pan=r,this.emit("pan viewport"),this.notify("viewport")),this},getCenterPan:function(e,r){if(this._private.panningEnabled){if(Yt(e)){var n=e;e=this.mutableElements().filter(n)}else Qo(e)||(e=this.mutableElements());if(e.length!==0){var a=e.boundingBox(),i=this.width(),s=this.height();r=r===void 0?this._private.zoom:r;var o={x:(i-r*(a.x1+a.x2))/2,y:(s-r*(a.y1+a.y2))/2};return o}}},reset:function(){return!this._private.panningEnabled||!this._private.zoomingEnabled?this:(this.viewport({pan:{x:0,y:0},zoom:1}),this)},invalidateSize:function(){this._private.sizeCache=null},size:function(){var e=this._private,r=e.container,n=this;return e.sizeCache=e.sizeCache||(r?(function(){var a=n.window().getComputedStyle(r),i=function(o){return parseFloat(a.getPropertyValue(o))};return{width:r.clientWidth-i("padding-left")-i("padding-right"),height:r.clientHeight-i("padding-top")-i("padding-bottom")}})():{width:1,height:1})},width:function(){return this.size().width},height:function(){return this.size().height},extent:function(){var e=this._private.pan,r=this._private.zoom,n=this.renderedExtent(),a={x1:(n.x1-e.x)/r,x2:(n.x2-e.x)/r,y1:(n.y1-e.y)/r,y2:(n.y2-e.y)/r};return a.w=a.x2-a.x1,a.h=a.y2-a.y1,a},renderedExtent:function(){var e=this.width(),r=this.height();return{x1:0,y1:0,x2:e,y2:r,w:e,h:r}},multiClickDebounceTime:function(e){if(e)this._private.multiClickDebounceTime=e;else return this._private.multiClickDebounceTime;return this}};ug.centre=ug.center;ug.autolockNodes=ug.autolock;ug.autoungrabifyNodes=ug.autoungrabify;D6={data:rn.data({field:"data",bindingEvent:"data",allowBinding:!0,allowSetting:!0,settingEvent:"data",settingTriggersEvent:!0,triggerFnName:"trigger",allowGetting:!0,updateStyle:!0}),removeData:rn.removeData({field:"data",event:"data",triggerFnName:"trigger",triggerEvent:!0,updateStyle:!0}),scratch:rn.data({field:"scratch",bindingEvent:"scratch",allowBinding:!0,allowSetting:!0,settingEvent:"scratch",settingTriggersEvent:!0,triggerFnName:"trigger",allowGetting:!0,updateStyle:!0}),removeScratch:rn.removeData({field:"scratch",event:"scratch",triggerFnName:"trigger",triggerEvent:!0,updateStyle:!0})};D6.attr=D6.data;D6.removeAttr=D6.removeData;N6=function(e){var r=this;e=jt({},e);var n=e.container;n&&!Y9(n)&&Y9(n[0])&&(n=n[0]);var a=n?n._cyreg:null;a=a||{},a&&a.cy&&(a.cy.destroy(),a={});var i=a.readies=a.readies||[];n&&(n._cyreg=a),a.cy=r;var s=Qa!==void 0&&n!==void 0&&!e.headless,o=e;o.layout=jt({name:s?"grid":"null"},o.layout),o.renderer=jt({name:s?"canvas":"null"},o.renderer);var l=function(m,g,v){return g!==void 0?g:v!==void 0?v:m},u=this._private={container:n,ready:!1,options:o,elements:new Wi(this),listeners:[],aniEles:new Wi(this),data:o.data||{},scratch:{},layout:null,renderer:null,destroyed:!1,notificationsEnabled:!0,minZoom:1e-50,maxZoom:1e50,zoomingEnabled:l(!0,o.zoomingEnabled),userZoomingEnabled:l(!0,o.userZoomingEnabled),panningEnabled:l(!0,o.panningEnabled),userPanningEnabled:l(!0,o.userPanningEnabled),boxSelectionEnabled:l(!0,o.boxSelectionEnabled),autolock:l(!1,o.autolock,o.autolockNodes),autoungrabify:l(!1,o.autoungrabify,o.autoungrabifyNodes),autounselectify:l(!1,o.autounselectify),styleEnabled:o.styleEnabled===void 0?s:o.styleEnabled,zoom:xt(o.zoom)?o.zoom:1,pan:{x:Gr(o.pan)&&xt(o.pan.x)?o.pan.x:0,y:Gr(o.pan)&&xt(o.pan.y)?o.pan.y:0},animation:{current:[],queue:[]},hasCompoundNodes:!1,multiClickDebounceTime:l(250,o.multiClickDebounceTime)};this.createEmitter(),this.selectionType(o.selectionType),this.zoomRange({min:o.minZoom,max:o.maxZoom});var h=function(m,g){var v=m.some(J4t);if(v)return Qx.all(m).then(g);g(m)};u.styleEnabled&&r.setStyle([]);var f=jt({},o,o.renderer);r.initRenderer(f);var d=function(m,g,v){r.notifications(!1);var y=r.mutableElements();y.length>0&&y.remove(),m!=null&&(Gr(m)||kn(m))&&r.add(m),r.one("layoutready",function(w){r.notifications(!0),r.emit(w),r.one("load",g),r.emitAndNotify("load")}).one("layoutstop",function(){r.one("done",v),r.emit("done")});var b=jt({},r._private.options.layout);b.eles=r.elements(),r.layout(b).run()};h([o.style,o.elements],function(p){var m=p[0],g=p[1];u.styleEnabled&&r.style().append(m),d(g,function(){r.startAnimationLoop(),u.ready=!0,sa(o.ready)&&r.on("ready",o.ready);for(var v=0;v0,o=!!t.boundingBox,l=Ys(o?t.boundingBox:structuredClone(e.extent())),u;if(Qo(t.roots))u=t.roots;else if(kn(t.roots)){for(var h=[],f=0;f0;){var N=I(),O=L(N,D);if(O)N.outgoers().filter(function($e){return $e.isNode()&&r.has($e)}).forEach(T);else if(O===null){nn("Detected double maximal shift for node `"+N.id()+"`. Bailing maximal adjustment due to cycle. Use `options.maximal: true` only on DAGs.");break}}}var R=0;if(t.avoidOverlap)for(var P=0;P0&&y[0].length<=3?Ae/2:0),ke=2*Math.PI/y[Ue].length*Fe;return Ue===0&&y[0].length===1&&(Me=1),{x:K.x+Me*Math.cos(ke),y:K.y+Me*Math.sin(ke)}}else{var ve=y[Ue].length,_e=Math.max(ve===1?0:o?(l.w-t.padding*2-X.w)/((t.grid?W:ve)-1):(l.w-t.padding*2-X.w)/((t.grid?W:ve)+1),R),fe={x:K.x+(Fe+1-(ve+1)/2)*_e,y:K.y+(Ue+1-(ie+1)/2)*ae};return fe}},ne={downward:0,leftward:90,upward:180,rightward:-90};Object.keys(ne).indexOf(t.direction)===-1&&jn("Invalid direction '".concat(t.direction,"' specified for breadthfirst layout. Valid values are: ").concat(Object.keys(ne).join(", ")));var ee=function(me){return A3t(Se(me),l,ne[t.direction])};return r.nodes().layoutPositions(this,t,ee),this};pkt={fit:!0,padding:30,boundingBox:void 0,avoidOverlap:!0,nodeDimensionsIncludeLabels:!1,spacingFactor:void 0,radius:void 0,startAngle:3/2*Math.PI,sweep:void 0,clockwise:!0,sort:void 0,animate:!1,animationDuration:500,animationEasing:void 0,animateFilter:function(e,r){return!0},ready:void 0,stop:void 0,transform:function(e,r){return r}};b9e.prototype.run=function(){var t=this.options,e=t,r=t.cy,n=e.eles,a=e.counterclockwise!==void 0?!e.counterclockwise:e.clockwise,i=n.nodes().not(":parent");e.sort&&(i=i.sort(e.sort));for(var s=Ys(e.boundingBox?e.boundingBox:{x1:0,y1:0,w:r.width(),h:r.height()}),o={x:s.x1+s.w/2,y:s.y1+s.h/2},l=e.sweep===void 0?2*Math.PI-2*Math.PI/i.length:e.sweep,u=l/Math.max(1,i.length-1),h,f=0,d=0;d1&&e.avoidOverlap){f*=1.75;var y=Math.cos(u)-Math.cos(0),b=Math.sin(u)-Math.sin(0),w=Math.sqrt(f*f/(y*y+b*b));h=Math.max(w,h)}var C=function(E,_){var S=e.startAngle+_*u*(a?1:-1),L=h*Math.cos(S),M=h*Math.sin(S),D={x:o.x+L,y:o.y+M};return D};return n.nodes().layoutPositions(this,e,C),this};mkt={fit:!0,padding:30,startAngle:3/2*Math.PI,sweep:void 0,clockwise:!0,equidistant:!1,minNodeSpacing:10,boundingBox:void 0,avoidOverlap:!0,nodeDimensionsIncludeLabels:!1,height:void 0,width:void 0,spacingFactor:void 0,concentric:function(e){return e.degree()},levelWidth:function(e){return e.maxDegree()/4},animate:!1,animationDuration:500,animationEasing:void 0,animateFilter:function(e,r){return!0},ready:void 0,stop:void 0,transform:function(e,r){return r}};w9e.prototype.run=function(){for(var t=this.options,e=t,r=e.counterclockwise!==void 0?!e.counterclockwise:e.clockwise,n=t.cy,a=e.eles,i=a.nodes().not(":parent"),s=Ys(e.boundingBox?e.boundingBox:{x1:0,y1:0,w:n.width(),h:n.height()}),o={x:s.x1+s.w/2,y:s.y1+s.h/2},l=[],u=0,h=0;h0){var k=Math.abs(b[0].value-C.value);k>=v&&(b=[],y.push(b))}b.push(C)}var E=u+e.minNodeSpacing;if(!e.avoidOverlap){var _=y.length>0&&y[0].length>1,S=Math.min(s.w,s.h)/2-E,L=S/(y.length+_?1:0);E=Math.min(E,L)}for(var M=0,D=0;D1&&e.avoidOverlap){var O=Math.cos(N)-Math.cos(0),R=Math.sin(N)-Math.sin(0),P=Math.sqrt(E*E/(O*O+R*R));M=Math.max(P,M)}T.r=M,M+=E}if(e.equidistant){for(var B=0,F=0,G=0;G=t.numIter||(kkt(n,t),n.temperature=n.temperature*t.coolingFactor,n.temperature=t.animationThreshold&&i(),X9(h)}};h()}else{for(;u;)u=s(l),l++;U7e(n,t),o()}return this};wL.prototype.stop=function(){return this.stopped=!0,this.thread&&this.thread.stop(),this.emit("layoutstop"),this};wL.prototype.destroy=function(){return this.thread&&this.thread.stop(),this};vkt=function(e,r,n){for(var a=n.eles.edges(),i=n.eles.nodes(),s=Ys(n.boundingBox?n.boundingBox:{x1:0,y1:0,w:e.width(),h:e.height()}),o={isCompound:e.hasCompoundNodes(),layoutNodes:[],idToIndex:{},nodeSize:i.size(),graphSet:[],indexToGraph:[],layoutEdges:[],edgeSize:a.size(),temperature:n.initialTemp,clientWidth:s.w,clientHeight:s.h,boundingBox:s},l=n.eles.components(),u={},h=0;h0){o.graphSet.push(S);for(var h=0;ha.count?0:a.graph},k9e=function(e,r,n,a){var i=a.graphSet[n];if(-10)var f=a.nodeOverlap*h,d=Math.sqrt(o*o+l*l),p=f*o/d,m=f*l/d;else var g=tL(e,o,l),v=tL(r,-1*o,-1*l),y=v.x-g.x,b=v.y-g.y,w=y*y+b*b,d=Math.sqrt(w),f=(e.nodeRepulsion+r.nodeRepulsion)/w,p=f*y/d,m=f*b/d;e.isLocked||(e.offsetX-=p,e.offsetY-=m),r.isLocked||(r.offsetX+=p,r.offsetY+=m)}},Ckt=function(e,r,n,a){if(n>0)var i=e.maxX-r.minX;else var i=r.maxX-e.minX;if(a>0)var s=e.maxY-r.minY;else var s=r.maxY-e.minY;return i>=0&&s>=0?Math.sqrt(i*i+s*s):0},tL=function(e,r,n){var a=e.positionX,i=e.positionY,s=e.height||1,o=e.width||1,l=n/r,u=s/o,h={};return r===0&&0n?(h.x=a,h.y=i+s/2,h):0r&&-1*u<=l&&l<=u?(h.x=a-o/2,h.y=i-o*n/2/r,h):0=u)?(h.x=a+s*r/2/n,h.y=i+s/2,h):(0>n&&(l<=-1*u||l>=u)&&(h.x=a-s*r/2/n,h.y=i-s/2),h)},Skt=function(e,r){for(var n=0;nn){var v=r.gravity*p/g,y=r.gravity*m/g;d.offsetX+=v,d.offsetY+=y}}}}},Akt=function(e,r){var n=[],a=0,i=-1;for(n.push.apply(n,e.graphSet[0]),i+=e.graphSet[0].length;a<=i;){var s=n[a++],o=e.idToIndex[s],l=e.layoutNodes[o],u=l.children;if(0n)var i={x:n*e/a,y:n*r/a};else var i={x:e,y:r};return i},E9e=function(e,r){var n=e.parentId;if(n!=null){var a=r.layoutNodes[r.idToIndex[n]],i=!1;if((a.maxX==null||e.maxX+a.padRight>a.maxX)&&(a.maxX=e.maxX+a.padRight,i=!0),(a.minX==null||e.minX-a.padLefta.maxY)&&(a.maxY=e.maxY+a.padBottom,i=!0),(a.minY==null||e.minY-a.padTopy&&(m+=v+r.componentSpacing,p=0,g=0,v=0)}}},Ikt={fit:!0,padding:30,boundingBox:void 0,avoidOverlap:!0,avoidOverlapPadding:10,nodeDimensionsIncludeLabels:!1,spacingFactor:void 0,condense:!1,rows:void 0,cols:void 0,position:function(e){},sort:void 0,animate:!1,animationDuration:500,animationEasing:void 0,animateFilter:function(e,r){return!0},ready:void 0,stop:void 0,transform:function(e,r){return r}};C9e.prototype.run=function(){var t=this.options,e=t,r=t.cy,n=e.eles,a=n.nodes().not(":parent");e.sort&&(a=a.sort(e.sort));var i=Ys(e.boundingBox?e.boundingBox:{x1:0,y1:0,w:r.width(),h:r.height()});if(i.h===0||i.w===0)n.nodes().layoutPositions(this,e,function(Q){return{x:i.x1,y:i.y1}});else{var s=a.size(),o=Math.sqrt(s*i.h/i.w),l=Math.round(o),u=Math.round(i.w/i.h*o),h=function(Y){if(Y==null)return Math.min(l,u);var ie=Math.min(l,u);ie==l?l=Y:u=Y},f=function(Y){if(Y==null)return Math.max(l,u);var ie=Math.max(l,u);ie==l?l=Y:u=Y},d=e.rows,p=e.cols!=null?e.cols:e.columns;if(d!=null&&p!=null)l=d,u=p;else if(d!=null&&p==null)l=d,u=Math.ceil(s/l);else if(d==null&&p!=null)u=p,l=Math.ceil(s/u);else if(u*l>s){var m=h(),g=f();(m-1)*g>=s?h(m-1):(g-1)*m>=s&&f(g-1)}else for(;u*l=s?f(y+1):h(v+1)}var b=i.w/u,w=i.h/l;if(e.condense&&(b=0,w=0),e.avoidOverlap)for(var C=0;C=u&&(O=0,N++)},P={},B=0;B(O=x5t(t,e,R[P],R[P+1],R[P+2],R[P+3])))return v(_,O),!0}else if(L.edgeType==="bezier"||L.edgeType==="multibezier"||L.edgeType==="self"||L.edgeType==="compound"){for(var R=L.allpts,P=0;P+5(O=y5t(t,e,R[P],R[P+1],R[P+2],R[P+3],R[P+4],R[P+5])))return v(_,O),!0}for(var B=B||S.source,F=F||S.target,G=a.getArrowWidth(M,D),z=[{name:"source",x:L.arrowStartX,y:L.arrowStartY,angle:L.srcArrowAngle},{name:"target",x:L.arrowEndX,y:L.arrowEndY,angle:L.tgtArrowAngle},{name:"mid-source",x:L.midX,y:L.midY,angle:L.midsrcArrowAngle},{name:"mid-target",x:L.midX,y:L.midY,angle:L.midtgtArrowAngle}],P=0;P0&&(y(B),y(F))}function w(_,S,L){return Ws(_,S,L)}function C(_,S){var L=_._private,M=d,D;S?D=S+"-":D="",_.boundingBox();var T=L.labelBounds[S||"main"],I=_.pstyle(D+"label").value,N=_.pstyle("text-events").strValue==="yes";if(!(!N||!I)){var O=w(L.rscratch,"labelX",S),R=w(L.rscratch,"labelY",S),P=w(L.rscratch,"labelAngle",S),B=_.pstyle(D+"text-margin-x").pfValue,F=_.pstyle(D+"text-margin-y").pfValue,G=T.x1-M-B,z=T.x2+M-B,H=T.y1-M-F,Q=T.y2+M-F;if(P){var Y=Math.cos(P),ie=Math.sin(P),se=function(X,ae){return X=X-O,ae=ae-R,{x:X*Y-ae*ie+O,y:X*ie+ae*Y+R}},oe=se(G,H),pe=se(G,Q),J=se(z,H),j=se(z,Q),Z=[oe.x+B,oe.y+F,J.x+B,J.y+F,j.x+B,j.y+F,pe.x+B,pe.y+F];if(Co(t,e,Z))return v(_),!0}else if(N0(T,t,e))return v(_),!0}}for(var k=s.length-1;k>=0;k--){var E=s[k];E.isNode()?y(E)||C(E):b(E)||C(E)||C(E,"source")||C(E,"target")}return o};hg.getAllInBox=function(t,e,r,n){var a=this.getCachedZSortedEles().interactive,i=this.cy.zoom(),s=2/i,o=[],l=Math.min(t,r),u=Math.max(t,r),h=Math.min(e,n),f=Math.max(e,n);t=l,r=u,e=h,n=f;var d=Ys({x1:t,y1:e,x2:r,y2:n}),p=[{x:d.x1,y:d.y1},{x:d.x2,y:d.y1},{x:d.x2,y:d.y2},{x:d.x1,y:d.y2}],m=[[p[0],p[1]],[p[1],p[2]],[p[2],p[3]],[p[3],p[0]]];function g(X,ae,W){return Ws(X,ae,W)}function v(X,ae){var W=X._private,Se=s,ne="";X.boundingBox();var ee=W.labelBounds.main;if(!ee)return null;var $e=g(W.rscratch,"labelX",ae),me=g(W.rscratch,"labelY",ae),Ie=g(W.rscratch,"labelAngle",ae),Ue=X.pstyle(ne+"text-margin-x").pfValue,Fe=X.pstyle(ne+"text-margin-y").pfValue,Ae=ee.x1-Se-Ue,Me=ee.x2+Se-Ue,ke=ee.y1-Se-Fe,ve=ee.y2+Se-Fe;if(Ie){var _e=Math.cos(Ie),fe=Math.sin(Ie),ue=function(le,V){return le=le-$e,V=V-me,{x:le*_e-V*fe+$e,y:le*fe+V*_e+me}};return[ue(Ae,ke),ue(Me,ke),ue(Me,ve),ue(Ae,ve)]}else return[{x:Ae,y:ke},{x:Me,y:ke},{x:Me,y:ve},{x:Ae,y:ve}]}function y(X,ae,W,Se){function ne(ee,$e,me){return(me.y-ee.y)*($e.x-ee.x)>($e.y-ee.y)*(me.x-ee.x)}return ne(X,W,Se)!==ne(ae,W,Se)&&ne(X,ae,W)!==ne(X,ae,Se)}for(var b=0;b0?-(Math.PI-e.ang):Math.PI+e.ang},Bkt=function(e,r,n,a,i){if(e!==Y7e?X7e(r,e,eh):Pkt(Nl,eh),X7e(r,n,Nl),H7e=eh.nx*Nl.ny-eh.ny*Nl.nx,W7e=eh.nx*Nl.nx-eh.ny*-Nl.ny,vf=Math.asin(Math.max(-1,Math.min(1,H7e))),Math.abs(vf)<1e-6){BH=r.x,FH=r.y,rg=Ox=0;return}ag=1,q9=!1,W7e<0?vf<0?vf=Math.PI+vf:(vf=Math.PI-vf,ag=-1,q9=!0):vf>0&&(ag=-1,q9=!0),r.radius!==void 0?Ox=r.radius:Ox=a,Qm=vf/2,D9=Math.min(eh.len/2,Nl.len/2),i?(Qc=Math.abs(Math.cos(Qm)*Ox/Math.sin(Qm)),Qc>D9?(Qc=D9,rg=Math.abs(Qc*Math.sin(Qm)/Math.cos(Qm))):rg=Ox):(Qc=Math.min(D9,Ox),rg=Math.abs(Qc*Math.sin(Qm)/Math.cos(Qm))),zH=r.x+Nl.nx*Qc,$H=r.y+Nl.ny*Qc,BH=zH-Nl.ny*rg*ag,FH=$H+Nl.nx*rg*ag,L9e=r.x+eh.nx*Qc,R9e=r.y+eh.ny*Qc,Y7e=r};M6=.01,Fkt=Math.sqrt(2*M6),ds={};ds.findMidptPtsEtc=function(t,e){var r=e.posPts,n=e.intersectionPts,a=e.vectorNormInverse,i,s=t.pstyle("source-endpoint"),o=t.pstyle("target-endpoint"),l=s.units!=null&&o.units!=null,u=function(k,E,_,S){var L=S-E,M=_-k,D=Math.sqrt(M*M+L*L);return{x:-L/D,y:M/D}},h=t.pstyle("edge-distances").value;switch(h){case"node-position":i=r;break;case"intersection":i=n;break;case"endpoints":{if(l){var f=this.manualEndptToPx(t.source()[0],s),d=$a(f,2),p=d[0],m=d[1],g=this.manualEndptToPx(t.target()[0],o),v=$a(g,2),y=v[0],b=v[1],w={x1:p,y1:m,x2:y,y2:b};a=u(p,m,y,b),i=w}else nn("Edge ".concat(t.id()," has edge-distances:endpoints specified without manual endpoints specified via source-endpoint and target-endpoint. Falling back on edge-distances:intersection (default).")),i=n;break}}return{midptPts:i,vectorNormInverse:a}};ds.findHaystackPoints=function(t){for(var e=0;e0?Math.max(V-he,0):Math.min(V+he,0)},I=T(M,S),N=T(D,L),O=!1;b===u?y=Math.abs(I)>Math.abs(N)?a:n:b===l||b===o?(y=n,O=!0):(b===i||b===s)&&(y=a,O=!0);var R=y===n,P=R?N:I,B=R?D:M,F=eW(B),G=!1;!(O&&(C||E))&&(b===o&&B<0||b===l&&B>0||b===i&&B>0||b===s&&B<0)&&(F*=-1,P=F*Math.abs(P),G=!0);var z;if(C){var H=k<0?1+k:k;z=H*P}else{var Q=k<0?P:0;z=Q+k*F}var Y=function(V){return Math.abs(V)<_||Math.abs(V)>=Math.abs(P)},ie=Y(z),se=Y(Math.abs(P)-Math.abs(z)),oe=ie||se;if(oe&&!G)if(R){var pe=Math.abs(B)<=d/2,J=Math.abs(M)<=p/2;if(pe){var j=(h.x1+h.x2)/2,Z=h.y1,K=h.y2;r.segpts=[j,Z,j,K]}else if(J){var X=(h.y1+h.y2)/2,ae=h.x1,W=h.x2;r.segpts=[ae,X,W,X]}else r.segpts=[h.x1,h.y2]}else{var Se=Math.abs(B)<=f/2,ne=Math.abs(D)<=m/2;if(Se){var ee=(h.y1+h.y2)/2,$e=h.x1,me=h.x2;r.segpts=[$e,ee,me,ee]}else if(ne){var Ie=(h.x1+h.x2)/2,Ue=h.y1,Fe=h.y2;r.segpts=[Ie,Ue,Ie,Fe]}else r.segpts=[h.x2,h.y1]}else if(R){var Ae=h.y1+z+(v?d/2*F:0),Me=h.x1,ke=h.x2;r.segpts=[Me,Ae,ke,Ae]}else{var ve=h.x1+z+(v?f/2*F:0),_e=h.y1,fe=h.y2;r.segpts=[ve,_e,ve,fe]}if(r.isRound){var ue=t.pstyle("taxi-radius").value,$=t.pstyle("radius-type").value[0]==="arc-radius";r.radii=new Array(r.segpts.length/2).fill(ue),r.isArcRadius=new Array(r.segpts.length/2).fill($)}};ds.tryToCorrectInvalidPoints=function(t,e){var r=t._private.rscratch;if(r.edgeType==="bezier"){var n=e.srcPos,a=e.tgtPos,i=e.srcW,s=e.srcH,o=e.tgtW,l=e.tgtH,u=e.srcShape,h=e.tgtShape,f=e.srcCornerRadius,d=e.tgtCornerRadius,p=e.srcRs,m=e.tgtRs,g=!xt(r.startX)||!xt(r.startY),v=!xt(r.arrowStartX)||!xt(r.arrowStartY),y=!xt(r.endX)||!xt(r.endY),b=!xt(r.arrowEndX)||!xt(r.arrowEndY),w=3,C=this.getArrowWidth(t.pstyle("width").pfValue,t.pstyle("arrow-scale").value)*this.arrowShapeWidth,k=w*C,E=og({x:r.ctrlpts[0],y:r.ctrlpts[1]},{x:r.startX,y:r.startY}),_=EB.poolIndex()){var F=P;P=B,B=F}var G=I.srcPos=P.position(),z=I.tgtPos=B.position(),H=I.srcW=P.outerWidth(),Q=I.srcH=P.outerHeight(),Y=I.tgtW=B.outerWidth(),ie=I.tgtH=B.outerHeight(),se=I.srcShape=r.nodeShapes[e.getNodeShape(P)],oe=I.tgtShape=r.nodeShapes[e.getNodeShape(B)],pe=I.srcCornerRadius=P.pstyle("corner-radius").value==="auto"?"auto":P.pstyle("corner-radius").pfValue,J=I.tgtCornerRadius=B.pstyle("corner-radius").value==="auto"?"auto":B.pstyle("corner-radius").pfValue,j=I.tgtRs=B._private.rscratch,Z=I.srcRs=P._private.rscratch;I.dirCounts={north:0,west:0,south:0,east:0,northwest:0,southwest:0,northeast:0,southeast:0};for(var K=0;K=Fkt||(ke=Math.sqrt(Math.max(Me*Me,M6)+Math.max(Ae*Ae,M6)));var ve=I.vector={x:Me,y:Ae},_e=I.vectorNorm={x:ve.x/ke,y:ve.y/ke},fe={x:-_e.y,y:_e.x};I.nodesOverlap=!xt(ke)||oe.checkPoint(ee[0],ee[1],0,Y,ie,z.x,z.y,J,j)||se.checkPoint(me[0],me[1],0,H,Q,G.x,G.y,pe,Z),I.vectorNormInverse=fe,N={nodesOverlap:I.nodesOverlap,dirCounts:I.dirCounts,calculatedIntersection:!0,hasBezier:I.hasBezier,hasUnbundled:I.hasUnbundled,eles:I.eles,srcPos:z,srcRs:j,tgtPos:G,tgtRs:Z,srcW:Y,srcH:ie,tgtW:H,tgtH:Q,srcIntn:Ie,tgtIntn:$e,srcShape:oe,tgtShape:se,posPts:{x1:Fe.x2,y1:Fe.y2,x2:Fe.x1,y2:Fe.y1},intersectionPts:{x1:Ue.x2,y1:Ue.y2,x2:Ue.x1,y2:Ue.y1},vector:{x:-ve.x,y:-ve.y},vectorNorm:{x:-_e.x,y:-_e.y},vectorNormInverse:{x:-fe.x,y:-fe.y}}}var ue=ne?N:I;ae.nodesOverlap=ue.nodesOverlap,ae.srcIntn=ue.srcIntn,ae.tgtIntn=ue.tgtIntn,ae.isRound=W.startsWith("round"),a&&(P.isParent()||P.isChild()||B.isParent()||B.isChild())&&(P.parents().anySame(B)||B.parents().anySame(P)||P.same(B)&&P.isParent())?e.findCompoundLoopPoints(X,ue,K,Se):P===B?e.findLoopPoints(X,ue,K,Se):W.endsWith("segments")?e.findSegmentsPoints(X,ue):W.endsWith("taxi")?e.findTaxiPoints(X,ue):W==="straight"||!Se&&I.eles.length%2===1&&K===Math.floor(I.eles.length/2)?e.findStraightEdgePoints(X):e.findBezierPoints(X,ue,K,Se,ne),e.findEndpoints(X),e.tryToCorrectInvalidPoints(X,ue),e.checkForInvalidEdgeWarning(X),e.storeAllpts(X),e.storeEdgeProjections(X),e.calculateArrowAngles(X),e.recalculateEdgeLabelProjections(X),e.calculateLabelAngles(X)}},_=0;_0){var ee=u,$e=tg(ee,zx(s)),me=tg(ee,zx(ne)),Ie=$e;if(me<$e&&(s=ne,Ie=me),ne.length>2){var Ue=tg(ee,{x:ne[2],y:ne[3]});Ue0){var de=h,Ne=tg(de,zx(s)),we=tg(de,zx(he)),ye=Ne;if(we2){var Be=tg(de,{x:he[2],y:he[3]});Be=m||_){v={cp:C,segment:E};break}}if(v)break}var S=v.cp,L=v.segment,M=(m-y)/L.length,D=L.t1-L.t0,T=p?L.t0+D*M:L.t1-D*M;T=A6(0,T,1),e=Ux(S.p0,S.p1,S.p2,T),d=$kt(S.p0,S.p1,S.p2,T);break}case"straight":case"segments":case"haystack":{for(var I=0,N,O,R,P,B=n.allpts.length,F=0;F+3=m));F+=2);var G=m-O,z=G/N;z=A6(0,z,1),e=o5t(R,P,z),d=M9e(R,P);break}}s("labelX",f,e.x),s("labelY",f,e.y),s("labelAutoAngle",f,d)}};u("source"),u("target"),this.applyLabelDimensions(t)}};ah.applyLabelDimensions=function(t){this.applyPrefixedLabelDimensions(t),t.isEdge()&&(this.applyPrefixedLabelDimensions(t,"source"),this.applyPrefixedLabelDimensions(t,"target"))};ah.applyPrefixedLabelDimensions=function(t,e){var r=t._private,n=this.getLabelText(t,e),a=sg(n,t._private.labelDimsKey);if(Ws(r.rscratch,"prefixedLabelDimsKey",e)!==a){th(r.rscratch,"prefixedLabelDimsKey",e,a);var i=this.calculateLabelDimensions(t,n),s=t.pstyle("line-height").pfValue,o=t.pstyle("font-size").pfValue,l=t.pstyle("text-wrap").strValue,u=Ws(r.rscratch,"labelWrapCachedLines",e)||[],h=l!=="wrap"?1:Math.max(u.length,1),f=o*s,d=i.width,p=i.height+(h-1)*(s-1)*o;th(r.rstyle,"labelWidth",e,d),th(r.rscratch,"labelWidth",e,d),th(r.rstyle,"labelHeight",e,p),th(r.rscratch,"labelHeight",e,p),th(r.rscratch,"labelLineHeight",e,f),th(r.rscratch,"labelActualDescent",e,i.labelActualDescent)}};ah.getLabelText=function(t,e){var r=t._private,n=e?e+"-":"",a=t.pstyle(n+"label").strValue,i=t.pstyle("text-transform").value,s=function(Q,Y){return Y?(th(r.rscratch,Q,e,Y),Y):Ws(r.rscratch,Q,e)};if(!a)return"";i=="none"||(i=="uppercase"?a=a.toUpperCase():i=="lowercase"&&(a=a.toLowerCase()));var o=t.pstyle("text-wrap").value;if(o==="wrap"){var l=s("labelKey");if(l!=null&&s("labelWrapKey")===l)return s("labelWrapCachedText");for(var u="\u200B",h=a.split(` -`),f=t.pstyle("text-max-width").pfValue,d=t.pstyle("text-overflow-wrap").value,p=d==="anywhere",m=[],g=/[\s\u200b]+|$/g,v=0;vf){var k=y.matchAll(g),E="",_=0,S=So(k),L;try{for(S.s();!(L=S.n()).done;){var M=L.value,D=M[0],T=y.substring(_,M.index);_=M.index+D.length;var I=E.length===0?T:E+T+D,N=this.calculateLabelDimensions(t,I),O=N.width;O<=f?E+=T+D:(E&&m.push(E),E=T+D)}}catch(H){S.e(H)}finally{S.f()}E.match(/^[\s\u200b]+$/)||m.push(E)}else m.push(y)}s("labelWrapCachedLines",m),a=s("labelWrapCachedText",m.join(` -`)),s("labelWrapKey",l)}else if(o==="ellipsis"){var R=t.pstyle("text-max-width").pfValue,P="",B="\u2026",F=!1;if(this.calculateLabelDimensions(t,a).widthR)break;P+=a[G],G===a.length-1&&(F=!0)}return F||(P+=B),P}return a};ah.getLabelJustification=function(t){var e=t.pstyle("text-justification").strValue,r=t.pstyle("text-halign").strValue;return e==="auto"?t.isNode()?_6t(r):"center":e};ah.calculateLabelDimensions=function(t,e){var r=this,n=r.cy.window(),a=n.document,i=0,s=t.pstyle("font-style").strValue,o=t.pstyle("font-size").pfValue,l=t.pstyle("font-family").strValue,u=t.pstyle("font-weight").strValue,h=t.pstyle("text-metrics").strValue||"font",f=this.labelCalcCanvas,d=this.labelCalcCanvasContext;if(!f){f=this.labelCalcCanvas=a.createElement("canvas"),d=this.labelCalcCanvasContext=f.getContext("2d");var p=f.style;p.position="absolute",p.left="-9999px",p.top="-9999px",p.zIndex="-1",p.visibility="hidden",p.pointerEvents="none"}d.font="".concat(s," ").concat(u," ").concat(o,"px ").concat(l);for(var m=0,g=0,v=e.split(` -`),y=v.length,b=0,w=0,C=0;C1&&arguments[1]!==void 0?arguments[1]:!0;if(e.merge(s),o)for(var l=0;l=t.desktopTapThreshold2}var lt=i($);ot&&(t.hoverData.tapholdCancelled=!0);var ct=function(){var xr=t.hoverData.dragDelta=t.hoverData.dragDelta||[];xr.length===0?(xr.push(Xe[0]),xr.push(Xe[1])):(xr[0]+=Xe[0],xr[1]+=Xe[1])};V=!0,a(qe,["mousemove","vmousemove","tapdrag"],$,{x:we[0],y:we[1]});var ft=function(xr){return{originalEvent:$,type:xr,position:{x:we[0],y:we[1]}}},dt=function(){t.data.bgActivePosistion=void 0,t.hoverData.selecting||he.emit(ft("boxstart")),Le[4]=1,t.hoverData.selecting=!0,t.redrawHint("select",!0),t.redraw()};if(t.hoverData.which===3){if(ot){var yt=ft("cxtdrag");Ye?Ye.emit(yt):he.emit(yt),t.hoverData.cxtDragged=!0,(!t.hoverData.cxtOver||qe!==t.hoverData.cxtOver)&&(t.hoverData.cxtOver&&t.hoverData.cxtOver.emit(ft("cxtdragout")),t.hoverData.cxtOver=qe,qe&&qe.emit(ft("cxtdragover")))}}else if(t.hoverData.dragging){if(V=!0,he.panningEnabled()&&he.userPanningEnabled()){var at;if(t.hoverData.justStartedPan){var dn=t.hoverData.mdownPos;at={x:(we[0]-dn[0])*de,y:(we[1]-dn[1])*de},t.hoverData.justStartedPan=!1}else at={x:Xe[0]*de,y:Xe[1]*de};he.panBy(at),he.emit(ft("dragpan")),t.hoverData.dragged=!0}we=t.projectIntoViewport($.clientX,$.clientY)}else if(Le[4]==1&&(Ye==null||Ye.pannable())){if(ot){if(!t.hoverData.dragging&&he.boxSelectionEnabled()&&(lt||!he.panningEnabled()||!he.userPanningEnabled()))dt();else if(!t.hoverData.selecting&&he.panningEnabled()&&he.userPanningEnabled()){var Ct=s(Ye,t.hoverData.downs);Ct&&(t.hoverData.dragging=!0,t.hoverData.justStartedPan=!0,Le[4]=0,t.data.bgActivePosistion=zx(ye),t.redrawHint("select",!0),t.redraw())}Ye&&Ye.pannable()&&Ye.active()&&Ye.unactivate()}}else{if(Ye&&Ye.pannable()&&Ye.active()&&Ye.unactivate(),(!Ye||!Ye.grabbed())&&qe!=Ke&&(Ke&&a(Ke,["mouseout","tapdragout"],$,{x:we[0],y:we[1]}),qe&&a(qe,["mouseover","tapdragover"],$,{x:we[0],y:we[1]}),t.hoverData.last=qe),Ye)if(ot){if(he.boxSelectionEnabled()&<)Ye&&Ye.grabbed()&&(g(Ve),Ye.emit(ft("freeon")),Ve.emit(ft("free")),t.dragData.didDrag&&(Ye.emit(ft("dragfreeon")),Ve.emit(ft("dragfree")))),dt();else if(Ye&&Ye.grabbed()&&t.nodeIsDraggable(Ye)){var Ut=!t.dragData.didDrag;Ut&&t.redrawHint("eles",!0),t.dragData.didDrag=!0,t.hoverData.draggingEles||p(Ve,{inDragLayer:!0});var Qt={x:0,y:0};if(xt(Xe[0])&&xt(Xe[1])&&(Qt.x+=Xe[0],Qt.y+=Xe[1],Ut)){var er=t.hoverData.dragDelta;er&&xt(er[0])&&xt(er[1])&&(Qt.x+=er[0],Qt.y+=er[1])}t.hoverData.draggingEles=!0,Ve.silentShift(Qt).emit(ft("position")).emit(ft("drag")),t.redrawHint("drag",!0),t.redraw()}}else ct();V=!0}if(Le[2]=we[0],Le[3]=we[1],V)return $.stopPropagation&&$.stopPropagation(),$.preventDefault&&$.preventDefault(),!1}},!1);var M,D,T;t.registerBinding(e,"mouseup",function($){if(!(t.hoverData.which===1&&$.which!==1&&t.hoverData.capture)){var le=t.hoverData.capture;if(le){t.hoverData.capture=!1;var V=t.cy,he=t.projectIntoViewport($.clientX,$.clientY),de=t.selection,Ne=t.findNearestElement(he[0],he[1],!0,!1),we=t.dragData.possibleDragElements,ye=t.hoverData.down,Be=i($);t.data.bgActivePosistion&&(t.redrawHint("select",!0),t.redraw()),t.hoverData.tapholdCancelled=!0,t.data.bgActivePosistion=void 0,ye&&ye.unactivate();var Le=function(He){return{originalEvent:$,type:He,position:{x:he[0],y:he[1]}}};if(t.hoverData.which===3){var qe=Le("cxttapend");if(ye?ye.emit(qe):V.emit(qe),!t.hoverData.cxtDragged){var Ke=Le("cxttap");ye?ye.emit(Ke):V.emit(Ke)}t.hoverData.cxtDragged=!1,t.hoverData.which=null}else if(t.hoverData.which===1){if(a(Ne,["mouseup","tapend","vmouseup"],$,{x:he[0],y:he[1]}),!t.dragData.didDrag&&!t.hoverData.dragged&&!t.hoverData.selecting&&!t.hoverData.isOverThresholdDrag&&(a(ye,["click","tap","vclick"],$,{x:he[0],y:he[1]}),D=!1,$.timeStamp-T<=V.multiClickDebounceTime()?(M&&clearTimeout(M),D=!0,T=null,a(ye,["dblclick","dbltap","vdblclick"],$,{x:he[0],y:he[1]})):(M=setTimeout(function(){D||a(ye,["oneclick","onetap","voneclick"],$,{x:he[0],y:he[1]})},V.multiClickDebounceTime()),T=$.timeStamp)),ye==null&&!t.dragData.didDrag&&!t.hoverData.selecting&&!t.hoverData.dragged&&!i($)&&(V.$(r).unselect(["tapunselect"]),we.length>0&&t.redrawHint("eles",!0),t.dragData.possibleDragElements=we=V.collection()),Ne==ye&&!t.dragData.didDrag&&!t.hoverData.selecting&&Ne!=null&&Ne._private.selectable&&(t.hoverData.dragging||(V.selectionType()==="additive"||Be?Ne.selected()?Ne.unselect(["tapunselect"]):Ne.select(["tapselect"]):Be||(V.$(r).unmerge(Ne).unselect(["tapunselect"]),Ne.select(["tapselect"]))),t.redrawHint("eles",!0)),t.hoverData.selecting){var Ye=V.collection(t.getAllInBox(de[0],de[1],de[2],de[3]));t.redrawHint("select",!0),Ye.length>0&&t.redrawHint("eles",!0),V.emit(Le("boxend"));var Xe=function(He){return He.selectable()&&!He.selected()};V.selectionType()==="additive"||Be||V.$(r).unmerge(Ye).unselect(),Ye.emit(Le("box")).stdFilter(Xe).select().emit(Le("boxselect")),t.redraw()}if(t.hoverData.dragging&&(t.hoverData.dragging=!1,t.redrawHint("select",!0),t.redrawHint("eles",!0),t.redraw()),!de[4]){t.redrawHint("drag",!0),t.redrawHint("eles",!0);var Ve=ye&&ye.grabbed();g(we),Ve&&(ye.emit(Le("freeon")),we.emit(Le("free")),t.dragData.didDrag&&(ye.emit(Le("dragfreeon")),we.emit(Le("dragfree"))))}}de[4]=0,t.hoverData.down=null,t.hoverData.cxtStarted=!1,t.hoverData.draggingEles=!1,t.hoverData.selecting=!1,t.hoverData.isOverThresholdDrag=!1,t.dragData.didDrag=!1,t.hoverData.dragged=!1,t.hoverData.dragDelta=[],t.hoverData.mdownPos=null,t.hoverData.mdownGPos=null,t.hoverData.which=null}}},!1);var I=[],N=4,O,R=1e5,P=function($,le){for(var V=0;V<$.length;V++)if($[V]%le!==0)return!1;return!0},B=function($){for(var le=Math.abs($[0]),V=1;V<$.length;V++)if(Math.abs($[V])!==le)return!1;return!0},F=function($){var le=!1,V=$.deltaY;if(V==null&&($.wheelDeltaY!=null?V=$.wheelDeltaY/4:$.wheelDelta!=null&&(V=$.wheelDelta/4)),V!==0){if(O==null)if(I.length>=N){var he=I;if(O=P(he,5),!O){var de=Math.abs(he[0]);O=B(he)&&de>5}if(O)for(var Ne=0;Ne5&&(V=eW(V)*5),Ke=V/-250,O&&(Ke/=R,Ke*=3),Ke=Ke*t.wheelSensitivity;var Ye=$.deltaMode===1;Ye&&(Ke*=33);var Xe=we.zoom()*Math.pow(10,Ke);$.type==="gesturechange"&&(Xe=t.gestureStartZoom*$.scale),we.zoom({level:Xe,renderedPosition:{x:qe[0],y:qe[1]}}),we.emit({type:$.type==="gesturechange"?"pinchzoom":"scrollzoom",originalEvent:$,position:{x:Le[0],y:Le[1]}})}}}};t.registerBinding(t.container,"wheel",F,!0),t.registerBinding(e,"scroll",function($){t.scrollingPage=!0,clearTimeout(t.scrollingPageTimeout),t.scrollingPageTimeout=setTimeout(function(){t.scrollingPage=!1},250)},!0),t.registerBinding(t.container,"gesturestart",function($){t.gestureStartZoom=t.cy.zoom(),t.hasTouchStarted||$.preventDefault()},!0),t.registerBinding(t.container,"gesturechange",function(ue){t.hasTouchStarted||F(ue)},!0),t.registerBinding(t.container,"mouseout",function($){var le=t.projectIntoViewport($.clientX,$.clientY);t.cy.emit({originalEvent:$,type:"mouseout",position:{x:le[0],y:le[1]}})},!1),t.registerBinding(t.container,"mouseover",function($){var le=t.projectIntoViewport($.clientX,$.clientY);t.cy.emit({originalEvent:$,type:"mouseover",position:{x:le[0],y:le[1]}})},!1);var G,z,H,Q,Y,ie,se,oe,pe,J,j,Z,K,X=function($,le,V,he){return Math.sqrt((V-$)*(V-$)+(he-le)*(he-le))},ae=function($,le,V,he){return(V-$)*(V-$)+(he-le)*(he-le)},W;t.registerBinding(t.container,"touchstart",W=function($){if(t.hasTouchStarted=!0,!!S($)){y(),t.touchData.capture=!0,t.data.bgActivePosistion=void 0;var le=t.cy,V=t.touchData.now,he=t.touchData.earlier;if($.touches[0]){var de=t.projectIntoViewport($.touches[0].clientX,$.touches[0].clientY);V[0]=de[0],V[1]=de[1]}if($.touches[1]){var de=t.projectIntoViewport($.touches[1].clientX,$.touches[1].clientY);V[2]=de[0],V[3]=de[1]}if($.touches[2]){var de=t.projectIntoViewport($.touches[2].clientX,$.touches[2].clientY);V[4]=de[0],V[5]=de[1]}var Ne=function(lt){return{originalEvent:$,type:lt,position:{x:V[0],y:V[1]}}};if($.touches[1]){t.touchData.singleTouchMoved=!0,g(t.dragData.touchDragEles);var we=t.findContainerClientCoords();pe=we[0],J=we[1],j=we[2],Z=we[3],G=$.touches[0].clientX-pe,z=$.touches[0].clientY-J,H=$.touches[1].clientX-pe,Q=$.touches[1].clientY-J,K=0<=G&&G<=j&&0<=H&&H<=j&&0<=z&&z<=Z&&0<=Q&&Q<=Z;var ye=le.pan(),Be=le.zoom();Y=X(G,z,H,Q),ie=ae(G,z,H,Q),se=[(G+H)/2,(z+Q)/2],oe=[(se[0]-ye.x)/Be,(se[1]-ye.y)/Be];var Le=200,qe=Le*Le;if(ie=1){for(var nt=t.touchData.startPosition=[null,null,null,null,null,null],It=0;It=t.touchTapThreshold2}if(le&&t.touchData.cxt){$.preventDefault();var It=$.touches[0].clientX-pe,it=$.touches[0].clientY-J,Tt=$.touches[1].clientX-pe,lt=$.touches[1].clientY-J,ct=ae(It,it,Tt,lt),ft=ct/ie,dt=150,yt=dt*dt,at=1.5,dn=at*at;if(ft>=dn||ct>=yt){t.touchData.cxt=!1,t.data.bgActivePosistion=void 0,t.redrawHint("select",!0);var Ct=Be("cxttapend");t.touchData.start?(t.touchData.start.unactivate().emit(Ct),t.touchData.start=null):he.emit(Ct)}}if(le&&t.touchData.cxt){var Ct=Be("cxtdrag");t.data.bgActivePosistion=void 0,t.redrawHint("select",!0),t.touchData.start?t.touchData.start.emit(Ct):he.emit(Ct),t.touchData.start&&(t.touchData.start._private.grabbed=!1),t.touchData.cxtDragged=!0;var Ut=t.findNearestElement(de[0],de[1],!0,!0);(!t.touchData.cxtOver||Ut!==t.touchData.cxtOver)&&(t.touchData.cxtOver&&t.touchData.cxtOver.emit(Be("cxtdragout")),t.touchData.cxtOver=Ut,Ut&&Ut.emit(Be("cxtdragover")))}else if(le&&$.touches[2]&&he.boxSelectionEnabled())$.preventDefault(),t.data.bgActivePosistion=void 0,this.lastThreeTouch=+new Date,t.touchData.selecting||he.emit(Be("boxstart")),t.touchData.selecting=!0,t.touchData.didSelect=!0,V[4]=1,!V||V.length===0||V[0]===void 0?(V[0]=(de[0]+de[2]+de[4])/3,V[1]=(de[1]+de[3]+de[5])/3,V[2]=(de[0]+de[2]+de[4])/3+1,V[3]=(de[1]+de[3]+de[5])/3+1):(V[2]=(de[0]+de[2]+de[4])/3,V[3]=(de[1]+de[3]+de[5])/3),t.redrawHint("select",!0),t.redraw();else if(le&&$.touches[1]&&!t.touchData.didSelect&&he.zoomingEnabled()&&he.panningEnabled()&&he.userZoomingEnabled()&&he.userPanningEnabled()){$.preventDefault(),t.data.bgActivePosistion=void 0,t.redrawHint("select",!0);var Qt=t.dragData.touchDragEles;if(Qt){t.redrawHint("drag",!0);for(var er=0;er0&&!t.hoverData.draggingEles&&!t.swipePanning&&t.data.bgActivePosistion!=null&&(t.data.bgActivePosistion=void 0,t.redrawHint("select",!0),t.redraw())}},!1);var ne;t.registerBinding(e,"touchcancel",ne=function($){var le=t.touchData.start;t.touchData.capture=!1,le&&le.unactivate()});var ee,$e,me,Ie;if(t.registerBinding(e,"touchend",ee=function($){var le=t.touchData.start,V=t.touchData.capture;if(V)$.touches.length===0&&(t.touchData.capture=!1),$.preventDefault();else return;var he=t.selection;t.swipePanning=!1,t.hoverData.draggingEles=!1;var de=t.cy,Ne=de.zoom(),we=t.touchData.now,ye=t.touchData.earlier;if($.touches[0]){var Be=t.projectIntoViewport($.touches[0].clientX,$.touches[0].clientY);we[0]=Be[0],we[1]=Be[1]}if($.touches[1]){var Be=t.projectIntoViewport($.touches[1].clientX,$.touches[1].clientY);we[2]=Be[0],we[3]=Be[1]}if($.touches[2]){var Be=t.projectIntoViewport($.touches[2].clientX,$.touches[2].clientY);we[4]=Be[0],we[5]=Be[1]}var Le=function(yt){return{originalEvent:$,type:yt,position:{x:we[0],y:we[1]}}};le&&le.unactivate();var qe;if(t.touchData.cxt){if(qe=Le("cxttapend"),le?le.emit(qe):de.emit(qe),!t.touchData.cxtDragged){var Ke=Le("cxttap");le?le.emit(Ke):de.emit(Ke)}t.touchData.start&&(t.touchData.start._private.grabbed=!1),t.touchData.cxt=!1,t.touchData.start=null,t.redraw();return}if(!$.touches[2]&&de.boxSelectionEnabled()&&t.touchData.selecting){t.touchData.selecting=!1;var Ye=de.collection(t.getAllInBox(he[0],he[1],he[2],he[3]));he[0]=void 0,he[1]=void 0,he[2]=void 0,he[3]=void 0,he[4]=0,t.redrawHint("select",!0),de.emit(Le("boxend"));var Xe=function(yt){return yt.selectable()&&!yt.selected()};Ye.emit(Le("box")).stdFilter(Xe).select().emit(Le("boxselect")),Ye.nonempty()&&t.redrawHint("eles",!0),t.redraw()}if(le?.unactivate(),$.touches[2])t.data.bgActivePosistion=void 0,t.redrawHint("select",!0);else if(!$.touches[1]){if(!$.touches[0]){if(!$.touches[0]){t.data.bgActivePosistion=void 0,t.redrawHint("select",!0);var Ve=t.dragData.touchDragEles;if(le!=null){var ot=le._private.grabbed;g(Ve),t.redrawHint("drag",!0),t.redrawHint("eles",!0),ot&&(le.emit(Le("freeon")),Ve.emit(Le("free")),t.dragData.didDrag&&(le.emit(Le("dragfreeon")),Ve.emit(Le("dragfree")))),a(le,["touchend","tapend","vmouseup","tapdragout"],$,{x:we[0],y:we[1]}),le.unactivate(),t.touchData.start=null}else{var He=t.findNearestElement(we[0],we[1],!0,!0);a(He,["touchend","tapend","vmouseup","tapdragout"],$,{x:we[0],y:we[1]})}var nt=t.touchData.startPosition[0]-we[0],It=nt*nt,it=t.touchData.startPosition[1]-we[1],Tt=it*it,lt=It+Tt,ct=lt*Ne*Ne;t.touchData.singleTouchMoved||(le||de.$(":selected").unselect(["tapunselect"]),a(le,["tap","vclick"],$,{x:we[0],y:we[1]}),$e=!1,$.timeStamp-Ie<=de.multiClickDebounceTime()?(me&&clearTimeout(me),$e=!0,Ie=null,a(le,["dbltap","vdblclick"],$,{x:we[0],y:we[1]})):(me=setTimeout(function(){$e||a(le,["onetap","voneclick"],$,{x:we[0],y:we[1]})},de.multiClickDebounceTime()),Ie=$.timeStamp)),le!=null&&!t.dragData.didDrag&&le._private.selectable&&ct"u"){var Ue=[],Fe=function($){return{clientX:$.clientX,clientY:$.clientY,force:1,identifier:$.pointerId,pageX:$.pageX,pageY:$.pageY,radiusX:$.width/2,radiusY:$.height/2,screenX:$.screenX,screenY:$.screenY,target:$.target}},Ae=function($){return{event:$,touch:Fe($)}},Me=function($){Ue.push(Ae($))},ke=function($){for(var le=0;le0)return H[0]}return null},m=Object.keys(d),g=0;g0?p:PAe(i,s,e,r,n,a,o,l)},checkPoint:function(e,r,n,a,i,s,o,l){l=l==="auto"?z0(a,i):l;var u=2*l;if(bf(e,r,this.points,s,o,a,i-u,[0,-1],n)||bf(e,r,this.points,s,o,a-u,i,[0,-1],n))return!0;var h=a/2+2*n,f=i/2+2*n,d=[s-h,o-f,s-h,o,s+h,o,s+h,o-f];return!!(Co(e,r,d)||ig(e,r,u,u,s+a/2-l,o+i/2-l,n)||ig(e,r,u,u,s-a/2+l,o+i/2-l,n))}}};wf.registerNodeShapes=function(){var t=this.nodeShapes={},e=this;this.generateEllipse(),this.generatePolygon("triangle",Hs(3,0)),this.generateRoundPolygon("round-triangle",Hs(3,0)),this.generatePolygon("rectangle",Hs(4,0)),t.square=t.rectangle,this.generateRoundRectangle(),this.generateCutRectangle(),this.generateBarrel(),this.generateBottomRoundrectangle();{var r=[0,1,1,0,0,-1,-1,0];this.generatePolygon("diamond",r),this.generateRoundPolygon("round-diamond",r)}this.generatePolygon("pentagon",Hs(5,0)),this.generateRoundPolygon("round-pentagon",Hs(5,0)),this.generatePolygon("hexagon",Hs(6,0)),this.generateRoundPolygon("round-hexagon",Hs(6,0)),this.generatePolygon("heptagon",Hs(7,0)),this.generateRoundPolygon("round-heptagon",Hs(7,0)),this.generatePolygon("octagon",Hs(8,0)),this.generateRoundPolygon("round-octagon",Hs(8,0));var n=new Array(20);{var a=_H(5,0),i=_H(5,Math.PI/5),s=.5*(3-Math.sqrt(5));s*=1.57;for(var o=0;o=e.deqFastCost*C)break}else if(u){if(b>=e.deqCost*p||b>=e.deqAvgCost*d)break}else if(w>=e.deqNoDrawCost*yH)break;var k=e.deq(n,v,g);if(k.length>0)for(var E=0;E0&&(e.onDeqd(n,m),!u&&e.shouldRedraw(n,m,v,g)&&i())},o=e.priority||ZH;a.beforeRender(s,o(n))}}}},Vkt=(function(){function t(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:j9;q0(this,t),this.idsByKey=new yf,this.keyForId=new yf,this.cachesByLvl=new yf,this.lvls=[],this.getKey=e,this.doesEleInvalidateKey=r}return V0(t,[{key:"getIdsFor",value:function(r){r==null&&jn("Can not get id list for null key");var n=this.idsByKey,a=this.idsByKey.get(r);return a||(a=new Zx,n.set(r,a)),a}},{key:"addIdForKey",value:function(r,n){r!=null&&this.getIdsFor(r).add(n)}},{key:"deleteIdForKey",value:function(r,n){r!=null&&this.getIdsFor(r).delete(n)}},{key:"getNumberOfIdsForKey",value:function(r){return r==null?0:this.getIdsFor(r).size}},{key:"updateKeyMappingFor",value:function(r){var n=r.id(),a=this.keyForId.get(n),i=this.getKey(r);this.deleteIdForKey(a,n),this.addIdForKey(i,n),this.keyForId.set(n,i)}},{key:"deleteKeyMappingFor",value:function(r){var n=r.id(),a=this.keyForId.get(n);this.deleteIdForKey(a,n),this.keyForId.delete(n)}},{key:"keyHasChangedFor",value:function(r){var n=r.id(),a=this.keyForId.get(n),i=this.getKey(r);return a!==i}},{key:"isInvalid",value:function(r){return this.keyHasChangedFor(r)||this.doesEleInvalidateKey(r)}},{key:"getCachesAt",value:function(r){var n=this.cachesByLvl,a=this.lvls,i=n.get(r);return i||(i=new yf,n.set(r,i),a.push(r)),i}},{key:"getCache",value:function(r,n){return this.getCachesAt(n).get(r)}},{key:"get",value:function(r,n){var a=this.getKey(r),i=this.getCache(a,n);return i!=null&&this.updateKeyMappingFor(r),i}},{key:"getForCachedKey",value:function(r,n){var a=this.keyForId.get(r.id()),i=this.getCache(a,n);return i}},{key:"hasCache",value:function(r,n){return this.getCachesAt(n).has(r)}},{key:"has",value:function(r,n){var a=this.getKey(r);return this.hasCache(a,n)}},{key:"setCache",value:function(r,n,a){a.key=r,this.getCachesAt(n).set(r,a)}},{key:"set",value:function(r,n,a){var i=this.getKey(r);this.setCache(i,n,a),this.updateKeyMappingFor(r)}},{key:"deleteCache",value:function(r,n){this.getCachesAt(n).delete(r)}},{key:"delete",value:function(r,n){var a=this.getKey(r);this.deleteCache(a,n)}},{key:"invalidateKey",value:function(r){var n=this;this.lvls.forEach(function(a){return n.deleteCache(r,a)})}},{key:"invalidate",value:function(r){var n=r.id(),a=this.keyForId.get(n);this.deleteKeyMappingFor(r);var i=this.doesEleInvalidateKey(r);return i&&this.invalidateKey(a),i||this.getNumberOfIdsForKey(a)===0}}])})(),Q7e=25,N9=50,V9=-4,GH=3,G9e=7.99,Hkt=8,Wkt=1024,Ykt=1024,Xkt=1024,jkt=.2,Kkt=.8,Zkt=10,Qkt=.15,Jkt=.1,eTt=.9,tTt=.9,rTt=100,nTt=1,Gx={dequeue:"dequeue",downscale:"downscale",highQuality:"highQuality"},aTt=Yi({getKey:null,doesEleInvalidateKey:j9,drawElement:null,getBoundingBox:null,getRotationPoint:null,getRotationOffset:null,isVisible:LAe,allowEdgeTxrCaching:!0,allowParentTxrCaching:!0}),w6=function(e,r){var n=this;n.renderer=e,n.onDequeues=[];var a=aTt(r);jt(n,a),n.lookup=new Vkt(a.getKey,a.doesEleInvalidateKey),n.setupDequeueing()},ti=w6.prototype;ti.reasons=Gx;ti.getTextureQueue=function(t){var e=this;return e.eleImgCaches=e.eleImgCaches||{},e.eleImgCaches[t]=e.eleImgCaches[t]||[]};ti.getRetiredTextureQueue=function(t){var e=this,r=e.eleImgCaches.retired=e.eleImgCaches.retired||{},n=r[t]=r[t]||[];return n};ti.getElementQueue=function(){var t=this,e=t.eleCacheQueue=t.eleCacheQueue||new G6(function(r,n){return n.reqs-r.reqs});return e};ti.getElementKeyToQueue=function(){var t=this,e=t.eleKeyToCacheQueue=t.eleKeyToCacheQueue||{};return e};ti.getElement=function(t,e,r,n,a){var i=this,s=this.renderer,o=s.cy.zoom(),l=this.lookup;if(!e||e.w===0||e.h===0||isNaN(e.w)||isNaN(e.h)||!t.visible()||t.removed()||!i.allowEdgeTxrCaching&&t.isEdge()||!i.allowParentTxrCaching&&t.isParent())return null;if(n==null&&(n=Math.ceil(JH(o*r))),n=G9e||n>GH)return null;var u=Math.pow(2,n),h=e.h*u,f=e.w*u,d=s.eleTextBiggerThanMin(t,u);if(!this.isVisible(t,d))return null;var p=l.get(t,n);if(p&&p.invalidated&&(p.invalidated=!1,p.texture.invalidatedWidth-=p.width),p)return p;var m;if(h<=Q7e?m=Q7e:h<=N9?m=N9:m=Math.ceil(h/N9)*N9,h>Xkt||f>Ykt)return null;var g=i.getTextureQueue(m),v=g[g.length-2],y=function(){return i.recycleTexture(m,f)||i.addTexture(m,f)};v||(v=g[g.length-1]),v||(v=y()),v.width-v.usedWidthn;D--)L=i.getElement(t,e,r,D,Gx.downscale);M()}else return i.queueElement(t,E.level-1),E;else{var T;if(!w&&!C&&!k)for(var I=n-1;I>=V9;I--){var N=l.get(t,I);if(N){T=N;break}}if(b(T))return i.queueElement(t,n),T;v.context.translate(v.usedWidth,0),v.context.scale(u,u),this.drawElement(v.context,t,e,d,!1),v.context.scale(1/u,1/u),v.context.translate(-v.usedWidth,0)}return p={x:v.usedWidth,texture:v,level:n,scale:u,width:f,height:h,scaledLabelShown:d},v.usedWidth+=Math.ceil(f+Hkt),v.eleCaches.push(p),l.set(t,n,p),i.checkTextureFullness(v),p};ti.invalidateElements=function(t){for(var e=0;e=jkt*t.width&&this.retireTexture(t)};ti.checkTextureFullness=function(t){var e=this,r=e.getTextureQueue(t.height);t.usedWidth/t.width>Kkt&&t.fullnessChecks>=Zkt?F0(r,t):t.fullnessChecks++};ti.retireTexture=function(t){var e=this,r=t.height,n=e.getTextureQueue(r),a=this.lookup;F0(n,t),t.retired=!0;for(var i=t.eleCaches,s=0;s=e)return s.retired=!1,s.usedWidth=0,s.invalidatedWidth=0,s.fullnessChecks=0,QH(s.eleCaches),s.context.setTransform(1,0,0,1,0,0),s.context.clearRect(0,0,s.width,s.height),F0(a,s),n.push(s),s}};ti.queueElement=function(t,e){var r=this,n=r.getElementQueue(),a=r.getElementKeyToQueue(),i=this.getKey(t),s=a[i];if(s)s.level=Math.max(s.level,e),s.eles.merge(t),s.reqs++,n.updateItem(s);else{var o={eles:t.spawn().merge(t),level:e,reqs:1,key:i};n.push(o),a[i]=o}};ti.dequeue=function(t){for(var e=this,r=e.getElementQueue(),n=e.getElementKeyToQueue(),a=[],i=e.lookup,s=0;s0;s++){var o=r.pop(),l=o.key,u=o.eles[0],h=i.hasCache(u,o.level);if(n[l]=null,h)continue;a.push(o);var f=e.getBoundingBox(u);e.getElement(u,f,t,o.level,Gx.dequeue)}return a};ti.removeFromQueue=function(t){var e=this,r=e.getElementQueue(),n=e.getElementKeyToQueue(),a=this.getKey(t),i=n[a];i!=null&&(i.eles.length===1?(i.reqs=KH,r.updateItem(i),r.pop(),n[a]=null):i.eles.unmerge(t))};ti.onDequeue=function(t){this.onDequeues.push(t)};ti.offDequeue=function(t){F0(this.onDequeues,t)};ti.setupDequeueing=$9e.setupDequeueing({deqRedrawThreshold:rTt,deqCost:Qkt,deqAvgCost:Jkt,deqNoDrawCost:eTt,deqFastCost:tTt,deq:function(e,r,n){return e.dequeue(r,n)},onDeqd:function(e,r){for(var n=0;n=sTt||r>nL)return null}n.validateLayersElesOrdering(r,t);var l=n.layersByLevel,u=Math.pow(2,r),h=l[r]=l[r]||[],f,d=n.levelIsComplete(r,t),p,m=function(){var M=function(O){if(n.validateLayersElesOrdering(O,t),n.levelIsComplete(O,t))return p=l[O],!0},D=function(O){if(!p)for(var R=r+O;T6<=R&&R<=nL&&!M(R);R+=O);};D(1),D(-1);for(var T=h.length-1;T>=0;T--){var I=h[T];I.invalid&&F0(h,I)}};if(!d)m();else return h;var g=function(){if(!f){f=Ys();for(var M=0;MeAe||I>eAe)return null;var N=T*I;if(N>pTt)return null;var O=n.makeLayer(f,r);if(D!=null){var R=h.indexOf(D)+1;h.splice(R,0,O)}else(M.insert===void 0||M.insert)&&h.unshift(O);return O};if(n.skipping&&!o)return null;for(var y=null,b=t.length/iTt,w=!o,C=0;C=b||!OAe(y.bb,k.boundingBox()))&&(y=v({insert:!0,after:y}),!y))return null;p||w?n.queueLayer(y,k):n.drawEleInLayer(y,k,r,e),y.eles.push(k),_[r]=y}return p||(w?null:h)};Xi.getEleLevelForLayerLevel=function(t,e){return t};Xi.drawEleInLayer=function(t,e,r,n){var a=this,i=this.renderer,s=t.context,o=e.boundingBox();o.w===0||o.h===0||!e.visible()||(r=a.getEleLevelForLayerLevel(r,n),i.setImgSmoothing(s,!1),i.drawCachedElement(s,e,null,null,r,mTt),i.setImgSmoothing(s,!0))};Xi.levelIsComplete=function(t,e){var r=this,n=r.layersByLevel[t];if(!n||n.length===0)return!1;for(var a=0,i=0;i0||s.invalid)return!1;a+=s.eles.length}return a===e.length};Xi.validateLayersElesOrdering=function(t,e){var r=this.layersByLevel[t];if(r)for(var n=0;n0){e=!0;break}}return e};Xi.invalidateElements=function(t){var e=this;t.length!==0&&(e.lastInvalidationTime=xf(),!(t.length===0||!e.haveLayers())&&e.updateElementsInLayers(t,function(n,a,i){e.invalidateLayer(n)}))};Xi.invalidateLayer=function(t){if(this.lastInvalidationTime=xf(),!t.invalid){var e=t.level,r=t.eles,n=this.layersByLevel[e];F0(n,t),t.elesQueue=[],t.invalid=!0,t.replacement&&(t.replacement.invalid=!0);for(var a=0;a3&&arguments[3]!==void 0?arguments[3]:!0,a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,i=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!0,s=this,o=e._private.rscratch;if(!(i&&!e.visible())&&!(o.badLine||o.allpts==null||isNaN(o.allpts[0]))){var l;r&&(l=r,t.translate(-l.x1,-l.y1));var u=i?e.pstyle("opacity").value:1,h=i?e.pstyle("line-opacity").value:1,f=e.pstyle("curve-style").value,d=e.pstyle("line-style").value,p=e.pstyle("width").pfValue,m=e.pstyle("line-cap").value,g=e.pstyle("line-outline-width").value,v=e.pstyle("line-outline-color").value,y=u*h,b=u*h,w=function(){var O=arguments.length>0&&arguments[0]!==void 0?arguments[0]:y;f==="straight-triangle"?(s.eleStrokeStyle(t,e,O),s.drawEdgeTrianglePath(e,t,o.allpts)):(t.lineWidth=p,t.lineCap=m,s.eleStrokeStyle(t,e,O),s.drawEdgePath(e,t,o.allpts,d),t.lineCap="butt")},C=function(){var O=arguments.length>0&&arguments[0]!==void 0?arguments[0]:y;if(t.lineWidth=p+g,t.lineCap=m,g>0)s.colorStrokeStyle(t,v[0],v[1],v[2],O);else{t.lineCap="butt";return}f==="straight-triangle"?s.drawEdgeTrianglePath(e,t,o.allpts):(s.drawEdgePath(e,t,o.allpts,d),t.lineCap="butt")},k=function(){a&&s.drawEdgeOverlay(t,e)},E=function(){a&&s.drawEdgeUnderlay(t,e)},_=function(){var O=arguments.length>0&&arguments[0]!==void 0?arguments[0]:b;s.drawArrowheads(t,e,O)},S=function(){s.drawElementText(t,e,null,n)};t.lineJoin="round";var L=e.pstyle("ghost").value==="yes";if(L){var M=e.pstyle("ghost-offset-x").pfValue,D=e.pstyle("ghost-offset-y").pfValue,T=e.pstyle("ghost-opacity").value,I=y*T;t.translate(M,D),w(I),_(I),t.translate(-M,-D)}else C();E(),w(),_(),k(),S(),r&&t.translate(l.x1,l.y1)}};V9e=function(e){if(!["overlay","underlay"].includes(e))throw new Error("Invalid state");return function(r,n){if(n.visible()){var a=n.pstyle("".concat(e,"-opacity")).value;if(a!==0){var i=this,s=i.usePaths(),o=n._private.rscratch,l=n.pstyle("".concat(e,"-padding")).pfValue,u=2*l,h=n.pstyle("".concat(e,"-color")).value;r.lineWidth=u,o.edgeType==="self"&&!s?r.lineCap="butt":r.lineCap="round",i.colorStrokeStyle(r,h[0],h[1],h[2],a),i.drawEdgePath(n,r,o.allpts,"solid")}}}};kf.drawEdgeOverlay=V9e("overlay");kf.drawEdgeUnderlay=V9e("underlay");kf.drawEdgePath=function(t,e,r,n){var a=t._private.rscratch,i=e,s,o=!1,l=this.usePaths(),u=t.pstyle("line-dash-pattern").pfValue,h=t.pstyle("line-dash-offset").pfValue;if(l){var f=r.join("$"),d=a.pathCacheKey&&a.pathCacheKey===f;d?(s=e=a.pathCache,o=!0):(s=e=new Path2D,a.pathCacheKey=f,a.pathCache=s)}if(i.setLineDash)switch(n){case"dotted":i.setLineDash([1,1]);break;case"dashed":i.setLineDash(u),i.lineDashOffset=h;break;case"solid":i.setLineDash([]);break}if(!o&&!a.badLine)switch(e.beginPath&&e.beginPath(),e.moveTo(r[0],r[1]),a.edgeType){case"bezier":case"self":case"compound":case"multibezier":for(var p=2;p+35&&arguments[5]!==void 0?arguments[5]:!0,s=this;if(n==null){if(i&&!s.eleTextBiggerThanMin(e))return}else if(n===!1)return;if(e.isNode()){var o=e.pstyle("label");if(!o||!o.value)return;var l=s.getLabelJustification(e),u=e.pstyle("text-metrics").strValue==="glyph";t.textAlign=l,t.textBaseline=u?"alphabetic":"bottom"}else{var h=e.element()._private.rscratch.badLine,f=e.pstyle("label"),d=e.pstyle("source-label"),p=e.pstyle("target-label");if(h||(!f||!f.value)&&(!d||!d.value)&&(!p||!p.value))return;t.textAlign="center",t.textBaseline="bottom"}var m=!r,g;r&&(g=r,t.translate(-g.x1,-g.y1)),a==null?(s.drawText(t,e,null,m,i),e.isEdge()&&(s.drawText(t,e,"source",m,i),s.drawText(t,e,"target",m,i))):s.drawText(t,e,a,m,i),r&&t.translate(g.x1,g.y1)};fg.getFontCache=function(t){var e;this.fontCaches=this.fontCaches||[];for(var r=0;r2&&arguments[2]!==void 0?arguments[2]:!0,n=e.pstyle("font-style").strValue,a=e.pstyle("font-size").pfValue+"px",i=e.pstyle("font-family").strValue,s=e.pstyle("font-weight").strValue,o=r?e.effectiveOpacity()*e.pstyle("text-opacity").value:1,l=e.pstyle("text-outline-opacity").value*o,u=e.pstyle("color").value,h=e.pstyle("text-outline-color").value;t.font=n+" "+s+" "+a+" "+i,t.lineJoin="round",this.colorFillStyle(t,u[0],u[1],u[2],o),this.colorStrokeStyle(t,h[0],h[1],h[2],l)};fg.getTextAngle=function(t,e){var r,n=t._private,a=n.rscratch,i=e?e+"-":"",s=t.pstyle(i+"text-rotation");if(s.strValue==="autorotate"){var o=Ws(a,"labelAngle",e);r=t.isEdge()?o:0}else s.strValue==="none"?r=0:r=s.pfValue;return r};fg.drawText=function(t,e,r){var n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!0,a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,i=e._private,s=i.rscratch,o=a?e.effectiveOpacity():1;if(!(a&&(o===0||e.pstyle("text-opacity").value===0))){r==="main"&&(r=null);var l=Ws(s,"labelX",r),u=Ws(s,"labelY",r),h,f,d=this.getLabelText(e,r);if(d!=null&&d!==""&&!isNaN(l)&&!isNaN(u)){this.setupTextStyle(t,e,a);var p=r?r+"-":"",m=Ws(s,"labelWidth",r),g=Ws(s,"labelHeight",r),v=Ws(s,"labelActualDescent",r),y=e.pstyle(p+"text-margin-x").pfValue,b=e.pstyle(p+"text-margin-y").pfValue,w=e.isEdge(),C=e.pstyle("text-halign").value,k=e.pstyle("text-valign").value;w&&(C="center",k="center"),l+=y,u+=b;var E;n?E=this.getTextAngle(e,r):E=0,E!==0&&(h=l,f=u,t.translate(h,f),t.rotate(E),l=0,u=0);var _=jx(C),S=Kx(k);switch(S){case"top":break;case"center":u+=g/2;break;case"bottom":u+=g;break}var L=e.pstyle("text-background-opacity").value,M=e.pstyle("text-border-opacity").value,D=e.pstyle("text-border-width").pfValue,T=e.pstyle("text-background-padding").pfValue,I=e.pstyle("text-background-shape").strValue,N=I==="round-rectangle"||I==="roundrectangle",O=I==="circle",R=2;if(L>0||D>0&&M>0){var P=t.fillStyle,B=t.strokeStyle,F=t.lineWidth,G=e.pstyle("text-background-color").value,z=e.pstyle("text-border-color").value,H=e.pstyle("text-border-style").value,Q=L>0,Y=D>0&&M>0,ie=l-T;switch(_){case"left":ie-=m;break;case"center":ie-=m/2;break}var se=u-g-T,oe=m+2*T,pe=g+2*T;if(Q&&(t.fillStyle="rgba(".concat(G[0],",").concat(G[1],",").concat(G[2],",").concat(L*o,")")),Y&&(t.strokeStyle="rgba(".concat(z[0],",").concat(z[1],",").concat(z[2],",").concat(M*o,")"),t.lineWidth=D,t.setLineDash))switch(H){case"dotted":t.setLineDash([1,1]);break;case"dashed":t.setLineDash([4,2]);break;case"double":t.lineWidth=D/4,t.setLineDash([]);break;case"solid":default:t.setLineDash([]);break}if(N?(t.beginPath(),aAe(t,ie,se,oe,pe,R)):O?(t.beginPath(),STt(t,ie,se,oe,pe)):(t.beginPath(),t.rect(ie,se,oe,pe)),Q&&t.fill(),Y&&t.stroke(),Y&&H==="double"){var J=D/2;t.beginPath(),N?aAe(t,ie+J,se+J,oe-2*J,pe-2*J,R):t.rect(ie+J,se+J,oe-2*J,pe-2*J),t.stroke()}t.fillStyle=P,t.strokeStyle=B,t.lineWidth=F,t.setLineDash&&t.setLineDash([])}var j=2*e.pstyle("text-outline-width").pfValue;if(j>0&&(t.lineWidth=j),u-=v,e.pstyle("text-wrap").value==="wrap"){var Z=Ws(s,"labelWrapCachedLines",r),K=Ws(s,"labelLineHeight",r),X=m/2,ae=this.getLabelJustification(e);switch(ae==="auto"||(_==="left"?ae==="left"?l+=-m:ae==="center"&&(l+=-X):_==="center"?ae==="left"?l+=-X:ae==="right"&&(l+=X):_==="right"&&(ae==="center"?l+=X:ae==="right"&&(l+=m))),S){case"top":u-=(Z.length-1)*K;break;case"center":case"bottom":u-=(Z.length-1)*K;break}for(var W=0;W0&&t.strokeText(Z[W],l,u),t.fillText(Z[W],l,u),u+=K}else j>0&&t.strokeText(d,l,u),t.fillText(d,l,u);E!==0&&(t.rotate(-E),t.translate(-h,-f))}}};W0={};W0.drawNode=function(t,e,r){var n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!0,a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,i=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!0,s=this,o,l,u=e._private,h=u.rscratch,f=e.position();if(!(!xt(f.x)||!xt(f.y))&&!(i&&!e.visible())){var d=i?e.effectiveOpacity():1,p=s.usePaths(),m,g=!1,v=e.padding();o=e.width()+2*v,l=e.height()+2*v;var y;r&&(y=r,t.translate(-y.x1,-y.y1));for(var b=e.pstyle("background-image"),w=b.value,C=new Array(w.length),k=new Array(w.length),E=0,_=0;_0&&arguments[0]!==void 0?arguments[0]:I;s.eleFillStyle(t,e,$)},J=function(){var $=arguments.length>0&&arguments[0]!==void 0?arguments[0]:z;s.colorStrokeStyle(t,N[0],N[1],N[2],$)},j=function(){var $=arguments.length>0&&arguments[0]!==void 0?arguments[0]:ie;s.colorStrokeStyle(t,Q[0],Q[1],Q[2],$)},Z=function($,le,V,he){var de=s.nodePathCache=s.nodePathCache||[],Ne=AAe(V==="polygon"?V+","+he.join(","):V,""+le,""+$,""+oe),we=de[Ne],ye,Be=!1;return we!=null?(ye=we,Be=!0,h.pathCache=ye):(ye=new Path2D,de[Ne]=h.pathCache=ye),{path:ye,cacheHit:Be}},K=e.pstyle("shape").strValue,X=e.pstyle("shape-polygon-points").pfValue;if(p){t.translate(f.x,f.y);var ae=Z(o,l,K,X);m=ae.path,g=ae.cacheHit}var W=function(){if(!g){var $=f;p&&($={x:0,y:0}),s.nodeShapes[s.getNodeShape(e)].draw(m||t,$.x,$.y,o,l,oe,h)}p?t.fill(m):t.fill()},Se=function(){for(var $=arguments.length>0&&arguments[0]!==void 0?arguments[0]:d,le=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,V=u.backgrounding,he=0,de=0;de0&&arguments[0]!==void 0?arguments[0]:!1,le=arguments.length>1&&arguments[1]!==void 0?arguments[1]:d;s.hasPie(e)&&(s.drawPie(t,e,le),$&&(p||s.nodeShapes[s.getNodeShape(e)].draw(t,f.x,f.y,o,l,oe,h)))},ee=function(){var $=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,le=arguments.length>1&&arguments[1]!==void 0?arguments[1]:d;s.hasStripe(e)&&(t.save(),p?t.clip(h.pathCache):(s.nodeShapes[s.getNodeShape(e)].draw(t,f.x,f.y,o,l,oe,h),t.clip()),s.drawStripe(t,e,le),t.restore(),$&&(p||s.nodeShapes[s.getNodeShape(e)].draw(t,f.x,f.y,o,l,oe,h)))},$e=function(){var $=arguments.length>0&&arguments[0]!==void 0?arguments[0]:d,le=(D>0?D:-D)*$,V=D>0?0:255;D!==0&&(s.colorFillStyle(t,V,V,V,le),p?t.fill(m):t.fill())},me=function(){if(T>0){if(t.lineWidth=T,t.lineCap=P,t.lineJoin=R,t.setLineDash)switch(O){case"dotted":t.setLineDash([1,1]);break;case"dashed":t.setLineDash(F),t.lineDashOffset=G;break;case"solid":case"double":t.setLineDash([]);break}if(B!=="center"){if(t.save(),t.lineWidth*=2,B==="inside")p?t.clip(m):t.clip();else{var $=new Path2D;$.rect(-o/2-T,-l/2-T,o+2*T,l+2*T),$.addPath(m),t.clip($,"evenodd")}p?t.stroke(m):t.stroke(),t.restore()}else p?t.stroke(m):t.stroke();if(O==="double"){t.lineWidth=T/3;var le=t.globalCompositeOperation;t.globalCompositeOperation="destination-out",p?t.stroke(m):t.stroke(),t.globalCompositeOperation=le}t.setLineDash&&t.setLineDash([])}},Ie=function(){if(H>0){if(t.lineWidth=H,t.lineCap="butt",t.setLineDash)switch(Y){case"dotted":t.setLineDash([1,1]);break;case"dashed":t.setLineDash([4,2]);break;case"solid":case"double":t.setLineDash([]);break}var $=f;p&&($={x:0,y:0});var le=s.getNodeShape(e),V=T;B==="inside"&&(V=0),B==="outside"&&(V*=2);var he=(o+V+(H+se))/o,de=(l+V+(H+se))/l,Ne=o*he,we=l*de,ye=s.nodeShapes[le].points,Be;if(p){var Le=Z(Ne,we,le,ye);Be=Le.path}if(le==="ellipse")s.drawEllipsePath(Be||t,$.x,$.y,Ne,we);else if(["round-diamond","round-heptagon","round-hexagon","round-octagon","round-pentagon","round-polygon","round-triangle","round-tag"].includes(le)){var qe=0,Ke=0,Ye=0;le==="round-diamond"?qe=(V+se+H)*1.4:le==="round-heptagon"?(qe=(V+se+H)*1.075,Ye=-(V/2+se+H)/35):le==="round-hexagon"?qe=(V+se+H)*1.12:le==="round-pentagon"?(qe=(V+se+H)*1.13,Ye=-(V/2+se+H)/15):le==="round-tag"?(qe=(V+se+H)*1.12,Ke=(V/2+H+se)*.07):le==="round-triangle"&&(qe=(V+se+H)*(Math.PI/2),Ye=-(V+se/2+H)/Math.PI),qe!==0&&(he=(o+qe)/o,Ne=o*he,["round-hexagon","round-tag"].includes(le)||(de=(l+qe)/l,we=l*de)),oe=oe==="auto"?FAe(Ne,we):oe;for(var Xe=Ne/2,Ve=we/2,ot=oe+(V+H+se)/2,He=new Array(ye.length/2),nt=new Array(ye.length/2),It=0;It0){if(a=a||n.position(),i==null||s==null){var p=n.padding();i=n.width()+2*p,s=n.height()+2*p}o.colorFillStyle(r,h[0],h[1],h[2],u),o.nodeShapes[f].draw(r,a.x,a.y,i+l*2,s+l*2,d),r.fill()}}}};W0.drawNodeOverlay=H9e("overlay");W0.drawNodeUnderlay=H9e("underlay");W0.hasPie=function(t){return t=t[0],t._private.hasPie};W0.hasStripe=function(t){return t=t[0],t._private.hasStripe};W0.drawPie=function(t,e,r,n){e=e[0],n=n||e.position();var a=e.cy().style(),i=e.pstyle("pie-size"),s=e.pstyle("pie-hole"),o=e.pstyle("pie-start-angle").pfValue,l=n.x,u=n.y,h=e.width(),f=e.height(),d=Math.min(h,f)/2,p,m=0,g=this.usePaths();if(g&&(l=0,u=0),i.units==="%"?d=d*i.pfValue:i.pfValue!==void 0&&(d=i.pfValue/2),s.units==="%"?p=d*s.pfValue:s.pfValue!==void 0&&(p=s.pfValue/2),!(p>=d))for(var v=1;v<=a.pieBackgroundN;v++){var y=e.pstyle("pie-"+v+"-background-size").value,b=e.pstyle("pie-"+v+"-background-color").value,w=e.pstyle("pie-"+v+"-background-opacity").value*r,C=y/100;C+m>1&&(C=1-m);var k=1.5*Math.PI+2*Math.PI*m;k+=o;var E=2*Math.PI*C,_=k+E;y===0||m>=1||m+C>1||(p===0?(t.beginPath(),t.moveTo(l,u),t.arc(l,u,d,k,_),t.closePath()):(t.beginPath(),t.arc(l,u,d,k,_),t.arc(l,u,p,_,k,!0),t.closePath()),this.colorFillStyle(t,b[0],b[1],b[2],w),t.fill(),m+=C)}};W0.drawStripe=function(t,e,r,n){e=e[0],n=n||e.position();var a=e.cy().style(),i=n.x,s=n.y,o=e.width(),l=e.height(),u=0,h=this.usePaths();t.save();var f=e.pstyle("stripe-direction").value,d=e.pstyle("stripe-size");switch(f){case"vertical":break;case"righward":t.rotate(-Math.PI/2);break}var p=o,m=l;d.units==="%"?(p=p*d.pfValue,m=m*d.pfValue):d.pfValue!==void 0&&(p=d.pfValue,m=d.pfValue),h&&(i=0,s=0),s-=p/2,i-=m/2;for(var g=1;g<=a.stripeBackgroundN;g++){var v=e.pstyle("stripe-"+g+"-background-size").value,y=e.pstyle("stripe-"+g+"-background-color").value,b=e.pstyle("stripe-"+g+"-background-opacity").value*r,w=v/100;w+u>1&&(w=1-u),!(v===0||u>=1||u+w>1)&&(t.beginPath(),t.rect(i,s+m*u,p,m*w),t.closePath(),this.colorFillStyle(t,y[0],y[1],y[2],b),t.fill(),u+=w)}t.restore()};Xs={},_Tt=100;Xs.getPixelRatio=function(){var t=this.data.contexts[0];if(this.forcedPixelRatio!=null)return this.forcedPixelRatio;var e=this.cy.window(),r=t.backingStorePixelRatio||t.webkitBackingStorePixelRatio||t.mozBackingStorePixelRatio||t.msBackingStorePixelRatio||t.oBackingStorePixelRatio||t.backingStorePixelRatio||1;return(e.devicePixelRatio||1)/r};Xs.paintCache=function(t){for(var e=this.paintCaches=this.paintCaches||[],r=!0,n,a=0;ae.minMbLowQualFrames&&(e.motionBlurPxRatio=e.mbPxRBlurry)),e.clearingMotionBlur&&(e.motionBlurPxRatio=1),e.textureDrawLastFrame&&!f&&(h[e.NODE]=!0,h[e.SELECT_BOX]=!0);var b=r.style(),w=r.zoom(),C=s!==void 0?s:w,k=r.pan(),E={x:k.x,y:k.y},_={zoom:w,pan:{x:k.x,y:k.y}},S=e.prevViewport,L=S===void 0||_.zoom!==S.zoom||_.pan.x!==S.pan.x||_.pan.y!==S.pan.y;!L&&!(g&&!m)&&(e.motionBlurPxRatio=1),o&&(E=o),C*=l,E.x*=l,E.y*=l;var M=e.getCachedZSortedEles();function D(J,j,Z,K,X){var ae=J.globalCompositeOperation;J.globalCompositeOperation="destination-out",e.colorFillStyle(J,255,255,255,e.motionBlurTransparency),J.fillRect(j,Z,K,X),J.globalCompositeOperation=ae}function T(J,j){var Z,K,X,ae;!e.clearingMotionBlur&&(J===u.bufferContexts[e.MOTIONBLUR_BUFFER_NODE]||J===u.bufferContexts[e.MOTIONBLUR_BUFFER_DRAG])?(Z={x:k.x*p,y:k.y*p},K=w*p,X=e.canvasWidth*p,ae=e.canvasHeight*p):(Z=E,K=C,X=e.canvasWidth,ae=e.canvasHeight),J.setTransform(1,0,0,1,0,0),j==="motionBlur"?D(J,0,0,X,ae):!n&&(j===void 0||j)&&J.clearRect(0,0,X,ae),a||(J.translate(Z.x,Z.y),J.scale(K,K)),o&&J.translate(o.x,o.y),s&&J.scale(s,s)}if(f||(e.textureDrawLastFrame=!1),f){if(e.textureDrawLastFrame=!0,!e.textureCache){e.textureCache={},e.textureCache.bb=r.mutableElements().boundingBox(),e.textureCache.texture=e.data.bufferCanvases[e.TEXTURE_BUFFER];var I=e.data.bufferContexts[e.TEXTURE_BUFFER];I.setTransform(1,0,0,1,0,0),I.clearRect(0,0,e.canvasWidth*e.textureMult,e.canvasHeight*e.textureMult),e.render({forcedContext:I,drawOnlyNodeLayer:!0,forcedPxRatio:l*e.textureMult});var _=e.textureCache.viewport={zoom:r.zoom(),pan:r.pan(),width:e.canvasWidth,height:e.canvasHeight};_.mpan={x:(0-_.pan.x)/_.zoom,y:(0-_.pan.y)/_.zoom}}h[e.DRAG]=!1,h[e.NODE]=!1;var N=u.contexts[e.NODE],O=e.textureCache.texture,_=e.textureCache.viewport;N.setTransform(1,0,0,1,0,0),d?D(N,0,0,_.width,_.height):N.clearRect(0,0,_.width,_.height);var R=b.core("outside-texture-bg-color").value,P=b.core("outside-texture-bg-opacity").value;e.colorFillStyle(N,R[0],R[1],R[2],P),N.fillRect(0,0,_.width,_.height);var w=r.zoom();T(N,!1),N.clearRect(_.mpan.x,_.mpan.y,_.width/_.zoom/l,_.height/_.zoom/l),N.drawImage(O,_.mpan.x,_.mpan.y,_.width/_.zoom/l,_.height/_.zoom/l)}else e.textureOnViewport&&!n&&(e.textureCache=null);var B=r.extent(),F=e.pinching||e.hoverData.dragging||e.swipePanning||e.data.wheelZooming||e.hoverData.draggingEles||e.cy.animated(),G=e.hideEdgesOnViewport&&F,z=[];if(z[e.NODE]=!h[e.NODE]&&d&&!e.clearedForMotionBlur[e.NODE]||e.clearingMotionBlur,z[e.NODE]&&(e.clearedForMotionBlur[e.NODE]=!0),z[e.DRAG]=!h[e.DRAG]&&d&&!e.clearedForMotionBlur[e.DRAG]||e.clearingMotionBlur,z[e.DRAG]&&(e.clearedForMotionBlur[e.DRAG]=!0),h[e.NODE]||a||i||z[e.NODE]){var H=d&&!z[e.NODE]&&p!==1,N=n||(H?e.data.bufferContexts[e.MOTIONBLUR_BUFFER_NODE]:u.contexts[e.NODE]),Q=d&&!H?"motionBlur":void 0;T(N,Q),G?e.drawCachedNodes(N,M.nondrag,l,B):e.drawLayeredElements(N,M.nondrag,l,B),e.debug&&e.drawDebugPoints(N,M.nondrag),!a&&!d&&(h[e.NODE]=!1)}if(!i&&(h[e.DRAG]||a||z[e.DRAG])){var H=d&&!z[e.DRAG]&&p!==1,N=n||(H?e.data.bufferContexts[e.MOTIONBLUR_BUFFER_DRAG]:u.contexts[e.DRAG]);T(N,d&&!H?"motionBlur":void 0),G?e.drawCachedNodes(N,M.drag,l,B):e.drawCachedElements(N,M.drag,l,B),e.debug&&e.drawDebugPoints(N,M.drag),!a&&!d&&(h[e.DRAG]=!1)}if(this.drawSelectionRectangle(t,T),d&&p!==1){var Y=u.contexts[e.NODE],ie=e.data.bufferCanvases[e.MOTIONBLUR_BUFFER_NODE],se=u.contexts[e.DRAG],oe=e.data.bufferCanvases[e.MOTIONBLUR_BUFFER_DRAG],pe=function(j,Z,K){j.setTransform(1,0,0,1,0,0),K||!y?j.clearRect(0,0,e.canvasWidth,e.canvasHeight):D(j,0,0,e.canvasWidth,e.canvasHeight);var X=p;j.drawImage(Z,0,0,e.canvasWidth*X,e.canvasHeight*X,0,0,e.canvasWidth,e.canvasHeight)};(h[e.NODE]||z[e.NODE])&&(pe(Y,ie,z[e.NODE]),h[e.NODE]=!1),(h[e.DRAG]||z[e.DRAG])&&(pe(se,oe,z[e.DRAG]),h[e.DRAG]=!1)}e.prevViewport=_,e.clearingMotionBlur&&(e.clearingMotionBlur=!1,e.motionBlurCleared=!0,e.motionBlur=!0),d&&(e.motionBlurTimeout=setTimeout(function(){e.motionBlurTimeout=null,e.clearedForMotionBlur[e.NODE]=!1,e.clearedForMotionBlur[e.DRAG]=!1,e.motionBlur=!1,e.clearingMotionBlur=!f,e.mbFrames=0,h[e.NODE]=!0,h[e.DRAG]=!0,e.redraw()},_Tt)),n||r.emit("render")};Xs.drawSelectionRectangle=function(t,e){var r=this,n=r.cy,a=r.data,i=n.style(),s=t.drawOnlyNodeLayer,o=t.drawAllLayers,l=a.canvasNeedsRedraw,u=t.forcedContext;if(r.showFps||!s&&l[r.SELECT_BOX]&&!o){var h=u||a.contexts[r.SELECT_BOX];if(e(h),r.selection[4]==1&&(r.hoverData.selecting||r.touchData.selecting)){var f=r.cy.zoom(),d=i.core("selection-box-border-width").value/f;h.lineWidth=d,h.fillStyle="rgba("+i.core("selection-box-color").value[0]+","+i.core("selection-box-color").value[1]+","+i.core("selection-box-color").value[2]+","+i.core("selection-box-opacity").value+")",h.fillRect(r.selection[0],r.selection[1],r.selection[2]-r.selection[0],r.selection[3]-r.selection[1]),d>0&&(h.strokeStyle="rgba("+i.core("selection-box-border-color").value[0]+","+i.core("selection-box-border-color").value[1]+","+i.core("selection-box-border-color").value[2]+","+i.core("selection-box-opacity").value+")",h.strokeRect(r.selection[0],r.selection[1],r.selection[2]-r.selection[0],r.selection[3]-r.selection[1]))}if(a.bgActivePosistion&&!r.hoverData.selecting){var f=r.cy.zoom(),p=a.bgActivePosistion;h.fillStyle="rgba("+i.core("active-bg-color").value[0]+","+i.core("active-bg-color").value[1]+","+i.core("active-bg-color").value[2]+","+i.core("active-bg-opacity").value+")",h.beginPath(),h.arc(p.x,p.y,i.core("active-bg-size").pfValue/f,0,2*Math.PI),h.fill()}var m=r.lastRedrawTime;if(r.showFps&&m){m=Math.round(m);var g=Math.round(1e3/m),v="1 frame = "+m+" ms = "+g+" fps";if(h.setTransform(1,0,0,1,0,0),h.fillStyle="rgba(255, 0, 0, 0.75)",h.strokeStyle="rgba(255, 0, 0, 0.75)",h.font="30px Arial",!g6){var y=h.measureText(v);g6=y.actualBoundingBoxAscent}h.fillText(v,0,g6);var b=60;h.strokeRect(0,g6+10,250,20),h.fillRect(0,g6+10,250*Math.min(g/b,1),20)}o||(l[r.SELECT_BOX]=!1)}};sAe=typeof Float32Array<"u"?Float32Array:Array;Math.hypot||(Math.hypot=function(){for(var t=0,e=arguments.length;e--;)t+=arguments[e]*arguments[e];return Math.sqrt(t)});UTt=(function(){function t(e,r,n,a){q0(this,t),this.debugID=Math.floor(Math.random()*1e4),this.r=e,this.texSize=r,this.texRows=n,this.texHeight=Math.floor(r/n),this.enableWrapping=!0,this.locked=!1,this.texture=null,this.needsBuffer=!0,this.freePointer={x:0,row:0},this.keyToLocation=new Map,this.canvas=a(e,r,r),this.scratch=a(e,r,this.texHeight,"scratch")}return V0(t,[{key:"lock",value:function(){this.locked=!0}},{key:"getKeys",value:function(){return new Set(this.keyToLocation.keys())}},{key:"getScale",value:function(r){var n=r.w,a=r.h,i=this.texHeight,s=this.texSize,o=i/a,l=n*o,u=a*o;return l>s&&(o=s/n,l=n*o,u=a*o),{scale:o,texW:l,texH:u}}},{key:"draw",value:function(r,n,a){var i=this;if(this.locked)throw new Error("can't draw, atlas is locked");var s=this.texSize,o=this.texRows,l=this.texHeight,u=this.getScale(n),h=u.scale,f=u.texW,d=u.texH,p=function(w,C){if(a&&C){var k=C.context,E=w.x,_=w.row,S=E,L=l*_;k.save(),k.translate(S,L),k.scale(h,h),a(k,n),k.restore()}},m=[null,null],g=function(){p(i.freePointer,i.canvas),m[0]={x:i.freePointer.x,y:i.freePointer.row*l,w:f,h:d},m[1]={x:i.freePointer.x+f,y:i.freePointer.row*l,w:0,h:d},i.freePointer.x+=f,i.freePointer.x==s&&(i.freePointer.x=0,i.freePointer.row++)},v=function(){var w=i.scratch,C=i.canvas;w.clear(),p({x:0,row:0},w);var k=s-i.freePointer.x,E=f-k,_=l;{var S=i.freePointer.x,L=i.freePointer.row*l,M=k;C.context.drawImage(w,0,0,M,_,S,L,M,_),m[0]={x:S,y:L,w:M,h:d}}{var D=k,T=(i.freePointer.row+1)*l,I=E;C&&C.context.drawImage(w,D,0,I,_,0,T,I,_),m[1]={x:0,y:T,w:I,h:d}}i.freePointer.x=E,i.freePointer.row++},y=function(){i.freePointer.x=0,i.freePointer.row++};if(this.freePointer.x+f<=s)g();else{if(this.freePointer.row>=o-1)return!1;this.freePointer.x===s?(y(),g()):this.enableWrapping?v():(y(),g())}return this.keyToLocation.set(r,m),this.needsBuffer=!0,m}},{key:"getOffsets",value:function(r){return this.keyToLocation.get(r)}},{key:"isEmpty",value:function(){return this.freePointer.x===0&&this.freePointer.row===0}},{key:"canFit",value:function(r){if(this.locked)return!1;var n=this.texSize,a=this.texRows,i=this.getScale(r),s=i.texW;return this.freePointer.x+s>n?this.freePointer.row1&&arguments[1]!==void 0?arguments[1]:{},i=a.forceRedraw,s=i===void 0?!1:i,o=a.filterEle,l=o===void 0?function(){return!0}:o,u=a.filterType,h=u===void 0?function(){return!0}:u,f=!1,d=!1,p=So(r),m;try{for(p.s();!(m=p.n()).done;){var g=m.value;if(l(g)){var v=So(this.renderTypes.values()),y;try{var b=function(){var C=y.value,k=C.type;if(h(k)){var E=n.collections.get(C.collection),_=C.getKey(g),S=Array.isArray(_)?_:[_];if(s)S.forEach(function(T){return E.markKeyForGC(T)}),d=!0;else{var L=C.getID?C.getID(g):g.id(),M=n._key(k,L),D=n.typeAndIdToKey.get(M);D!==void 0&&!NTt(S,D)&&(f=!0,n.typeAndIdToKey.delete(M),D.forEach(function(T){return E.markKeyForGC(T)}))}}};for(v.s();!(y=v.n()).done;)b()}catch(w){v.e(w)}finally{v.f()}}}}catch(w){p.e(w)}finally{p.f()}return d&&(this.gc(),f=!1),f}},{key:"gc",value:function(){var r=So(this.collections.values()),n;try{for(r.s();!(n=r.n()).done;){var a=n.value;a.gc()}}catch(i){r.e(i)}finally{r.f()}}},{key:"getOrCreateAtlas",value:function(r,n,a,i){var s=this.renderTypes.get(n),o=this.collections.get(s.collection),l=!1,u=o.draw(i,a,function(d){s.drawClipped?(d.save(),d.beginPath(),d.rect(0,0,a.w,a.h),d.clip(),s.drawElement(d,r,a,!0,!0),d.restore()):s.drawElement(d,r,a,!0,!0),l=!0});if(l){var h=s.getID?s.getID(r):r.id(),f=this._key(n,h);this.typeAndIdToKey.has(f)?this.typeAndIdToKey.get(f).push(i):this.typeAndIdToKey.set(f,[i])}return u}},{key:"getAtlasInfo",value:function(r,n){var a=this,i=this.renderTypes.get(n),s=i.getKey(r),o=Array.isArray(s)?s:[s];return o.map(function(l){var u=i.getBoundingBox(r,l),h=a.getOrCreateAtlas(r,n,u,l),f=h.getOffsets(l),d=$a(f,2),p=d[0],m=d[1];return{atlas:h,tex:p,tex1:p,tex2:m,bb:u}})}},{key:"getDebugInfo",value:function(){var r=[],n=So(this.collections),a;try{for(n.s();!(a=n.n()).done;){var i=$a(a.value,2),s=i[0],o=i[1],l=o.getCounts(),u=l.keyCount,h=l.atlasCount;r.push({type:s,keyCount:u,atlasCount:h})}}catch(f){n.e(f)}finally{n.f()}return r}}])})(),WTt=(function(){function t(e){q0(this,t),this.globalOptions=e,this.atlasSize=e.webglTexSize,this.maxAtlasesPerBatch=e.webglTexPerBatch,this.batchAtlases=[]}return V0(t,[{key:"getMaxAtlasesPerBatch",value:function(){return this.maxAtlasesPerBatch}},{key:"getAtlasSize",value:function(){return this.atlasSize}},{key:"getIndexArray",value:function(){return Array.from({length:this.maxAtlasesPerBatch},function(r,n){return n})}},{key:"startBatch",value:function(){this.batchAtlases=[]}},{key:"getAtlasCount",value:function(){return this.batchAtlases.length}},{key:"getAtlases",value:function(){return this.batchAtlases}},{key:"canAddToCurrentBatch",value:function(r){return this.batchAtlases.length===this.maxAtlasesPerBatch?this.batchAtlases.includes(r):!0}},{key:"getAtlasIndexForBatch",value:function(r){var n=this.batchAtlases.indexOf(r);if(n<0){if(this.batchAtlases.length===this.maxAtlasesPerBatch)throw new Error("cannot add more atlases to batch");this.batchAtlases.push(r),n=this.batchAtlases.length-1}return n}}])})(),YTt=` +`,"getStyles"),f8t=h8t,d8t={db:Q_e,renderer:u8t,parser:Y7t,styles:f8t}});function FY(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(l){throw l},f:i}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var a,s=!0,o=!1;return{s:function(){r=r.call(t)},n:function(){var l=r.next();return s=l.done,l},e:function(l){o=!0,a=l},f:function(){try{s||r.return==null||r.return()}finally{if(o)throw a}}}}function $Re(t,e,r){return(e=GRe(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function y8t(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function v8t(t,e){var r=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(r!=null){var n,i,a,s,o=[],l=!0,u=!1;try{if(a=(r=r.call(t)).next,e===0){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=a.call(r)).done)&&(o.push(n.value),o.length!==e);l=!0);}catch(h){u=!0,i=h}finally{try{if(!l&&r.return!=null&&(s=r.return(),Object(s)!==s))return}finally{if(u)throw i}}return o}}function x8t(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function b8t(){throw new TypeError(`Invalid attempt to spread non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Da(t,e){return p8t(t)||v8t(t,e)||iX(t,e)||x8t()}function CR(t){return m8t(t)||y8t(t)||iX(t)||b8t()}function w8t(t,e){if(typeof t!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}function GRe(t){var e=w8t(t,"string");return typeof e=="symbol"?e:e+""}function Xa(t){"@babel/helpers - typeof";return Xa=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Xa(t)}function iX(t,e){if(t){if(typeof t=="string")return FY(t,e);var r={}.toString.call(t).slice(8,-1);return r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set"?Array.from(t):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?FY(t,e):void 0}}function ew(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function tw(){if(pAe)return lW;pAe=1;function t(e){var r=typeof e;return e!=null&&(r=="object"||r=="function")}return lW=t,lW}function H8t(){if(mAe)return uW;mAe=1;var t=typeof rR=="object"&&rR&&rR.Object===Object&&rR;return uW=t,uW}function GR(){if(gAe)return cW;gAe=1;var t=H8t(),e=typeof self=="object"&&self&&self.Object===Object&&self,r=t||e||Function("return this")();return cW=r,cW}function V8t(){if(yAe)return hW;yAe=1;var t=GR(),e=function(){return t.Date.now()};return hW=e,hW}function W8t(){if(vAe)return fW;vAe=1;var t=/\s/;function e(r){for(var n=r.length;n--&&t.test(r.charAt(n)););return n}return fW=e,fW}function Y8t(){if(xAe)return dW;xAe=1;var t=W8t(),e=/^\s+/;function r(n){return n&&n.slice(0,t(n)+1).replace(e,"")}return dW=r,dW}function oX(){if(bAe)return pW;bAe=1;var t=GR(),e=t.Symbol;return pW=e,pW}function X8t(){if(wAe)return mW;wAe=1;var t=oX(),e=Object.prototype,r=e.hasOwnProperty,n=e.toString,i=t?t.toStringTag:void 0;function a(s){var o=r.call(s,i),l=s[i];try{s[i]=void 0;var u=!0}catch{}var h=n.call(s);return u&&(o?s[i]=l:delete s[i]),h}return mW=a,mW}function j8t(){if(kAe)return gW;kAe=1;var t=Object.prototype,e=t.toString;function r(n){return e.call(n)}return gW=r,gW}function KRe(){if(TAe)return yW;TAe=1;var t=oX(),e=X8t(),r=j8t(),n="[object Null]",i="[object Undefined]",a=t?t.toStringTag:void 0;function s(o){return o==null?o===void 0?i:n:a&&a in Object(o)?e(o):r(o)}return yW=s,yW}function K8t(){if(EAe)return vW;EAe=1;function t(e){return e!=null&&typeof e=="object"}return vW=t,vW}function rw(){if(SAe)return xW;SAe=1;var t=KRe(),e=K8t(),r="[object Symbol]";function n(i){return typeof i=="symbol"||e(i)&&t(i)==r}return xW=n,xW}function Z8t(){if(CAe)return bW;CAe=1;var t=Y8t(),e=tw(),r=rw(),n=NaN,i=/^[-+]0x[0-9a-f]+$/i,a=/^0b[01]+$/i,s=/^0o[0-7]+$/i,o=parseInt;function l(u){if(typeof u=="number")return u;if(r(u))return n;if(e(u)){var h=typeof u.valueOf=="function"?u.valueOf():u;u=e(h)?h+"":h}if(typeof u!="string")return u===0?u:+u;u=t(u);var f=a.test(u);return f||s.test(u)?o(u.slice(2),f?2:8):i.test(u)?n:+u}return bW=l,bW}function Q8t(){if(_Ae)return wW;_Ae=1;var t=tw(),e=V8t(),r=Z8t(),n="Expected a function",i=Math.max,a=Math.min;function s(o,l,u){var h,f,d,p,m,g,y=0,v=!1,x=!1,k=!0;if(typeof o!="function")throw new TypeError(n);l=r(l)||0,t(u)&&(v=!!u.leading,x="maxWait"in u,d=x?i(r(u.maxWait)||0,l):d,k="trailing"in u?!!u.trailing:k);function _(N){var B=h,F=f;return h=f=void 0,y=N,p=o.apply(F,B),p}function T(N){return y=N,m=setTimeout(A,l),v?_(N):p}function S(N){var B=N-g,F=N-y,M=l-B;return x?a(M,d-F):M}function R(N){var B=N-g,F=N-y;return g===void 0||B>=l||B<0||x&&F>=d}function A(){var N=e();if(R(N))return I(N);m=setTimeout(A,S(N))}function I(N){return m=void 0,k&&h?_(N):(h=f=void 0,p)}function P(){m!==void 0&&clearTimeout(m),y=0,h=g=f=m=void 0}function O(){return m===void 0?p:I(e())}function C(){var N=e(),B=R(N);if(h=arguments,f=this,g=N,B){if(m===void 0)return T(g);if(x)return clearTimeout(m),m=setTimeout(A,l),_(g)}return m===void 0&&(m=setTimeout(A,l)),p}return C.cancel=P,C.flush=O,C}return wW=s,wW}function nwt(t,e,r,n,i){var a=i*Math.PI/180,s=Math.cos(a)*(t-r)-Math.sin(a)*(e-n)+r,o=Math.sin(a)*(t-r)+Math.cos(a)*(e-n)+n;return{x:s,y:o}}function awt(t,e,r){if(r===0)return t;var n=(e.x1+e.x2)/2,i=(e.y1+e.y2)/2,a=e.w/e.h,s=1/a,o=nwt(t.x,t.y,n,i,r),l=iwt(o.x,o.y,n,i,a,s);return{x:l.x,y:l.y}}function gwt(){return IAe||(IAe=1,(function(t,e){(function(){var r,n,i,a,s,o,l,u,h,f,d,p,m,g,y;i=Math.floor,f=Math.min,n=function(v,x){return vx?1:0},h=function(v,x,k,_,T){var S;if(k==null&&(k=0),T==null&&(T=n),k<0)throw new Error("lo must be non-negative");for(_==null&&(_=v.length);k<_;)S=i((k+_)/2),T(x,v[S])<0?_=S:k=S+1;return[].splice.apply(v,[k,k-k].concat(x)),x},o=function(v,x,k){return k==null&&(k=n),v.push(x),g(v,0,v.length-1,k)},s=function(v,x){var k,_;return x==null&&(x=n),k=v.pop(),v.length?(_=v[0],v[0]=k,y(v,0,x)):_=k,_},u=function(v,x,k){var _;return k==null&&(k=n),_=v[0],v[0]=x,y(v,0,k),_},l=function(v,x,k){var _;return k==null&&(k=n),v.length&&k(v[0],x)<0&&(_=[v[0],x],x=_[0],v[0]=_[1],y(v,0,k)),x},a=function(v,x){var k,_,T,S,R,A;for(x==null&&(x=n),S=(function(){A=[];for(var I=0,P=i(v.length/2);0<=P?IP;0<=P?I++:I--)A.push(I);return A}).apply(this).reverse(),R=[],_=0,T=S.length;_O;0<=O?++A:--A)C.push(s(v,k));return C},g=function(v,x,k,_){var T,S,R;for(_==null&&(_=n),T=v[k];k>x;){if(R=k-1>>1,S=v[R],_(T,S)<0){v[k]=S,k=R;continue}break}return v[k]=T},y=function(v,x,k){var _,T,S,R,A;for(k==null&&(k=n),T=v.length,A=x,S=v[x],_=2*x+1;_-1}return KW=e,KW}function uTt(){if(xLe)return ZW;xLe=1;var t=YR();function e(r,n){var i=this.__data__,a=t(i,r);return a<0?(++this.size,i.push([r,n])):i[a][1]=n,this}return ZW=e,ZW}function cTt(){if(bLe)return QW;bLe=1;var t=aTt(),e=sTt(),r=oTt(),n=lTt(),i=uTt();function a(s){var o=-1,l=s==null?0:s.length;for(this.clear();++o-1&&n%1==0&&n0;){var h=i.shift();e(h),a.add(h.id()),o&&n(i,a,h)}return t}function _De(t,e,r){if(r.isParent())for(var n=r._private.children,i=0;i0&&arguments[0]!==void 0?arguments[0]:w9t,e=arguments.length>1?arguments[1]:void 0,r=0;r0?C=B:O=B;while(Math.abs(N)>s&&++F=a?x(P,F):M===0?F:_(P,O,O+u)}var S=!1;function R(){S=!0,(t!==e||r!==n)&&k()}var A=function(O){return S||R(),t===e&&r===n?O:O===0?0:O===1?1:y(T(O),e,n)};A.getControlPoints=function(){return[{x:t,y:e},{x:r,y:n}]};var I="generateBezier("+[t,e,r,n]+")";return A.toString=function(){return I},A}function uRe(t,e,r,n,i){if(n===1||e===r)return r;var a=i(e,r,n);return t==null||((t.roundValue||t.color)&&(a=Math.round(a)),t.min!==void 0&&(a=Math.max(a,t.min)),t.max!==void 0&&(a=Math.min(a,t.max))),a}function cRe(t,e){return t.pfValue!=null||t.value!=null?t.pfValue!=null&&(e==null||e.type.units!=="%")?t.pfValue:t.value:t}function W4(t,e,r,n,i){var a=i!=null?i.type:null;r<0?r=0:r>1&&(r=1);var s=cRe(t,i),o=cRe(e,i);if(Ht(s)&&Ht(o))return uRe(a,s,o,r,n);if(si(s)&&si(o)){for(var l=[],u=0;u0?(p==="spring"&&m.push(s.duration),s.easingImpl=bR[p].apply(null,m)):s.easingImpl=bR[p]}var g=s.easingImpl,y;if(s.duration===0?y=1:y=(r-l)/s.duration,s.applying&&(y=s.progress),y<0?y=0:y>1&&(y=1),s.delay==null){var v=s.startPosition,x=s.position;if(x&&i&&!t.locked()){var k={};I8(v.x,x.x)&&(k.x=W4(v.x,x.x,y,g)),I8(v.y,x.y)&&(k.y=W4(v.y,x.y,y,g)),t.position(k)}var _=s.startPan,T=s.pan,S=a.pan,R=T!=null&&n;R&&(I8(_.x,T.x)&&(S.x=W4(_.x,T.x,y,g)),I8(_.y,T.y)&&(S.y=W4(_.y,T.y,y,g)),t.emit("pan"));var A=s.startZoom,I=s.zoom,P=I!=null&&n;P&&(I8(A,I)&&(a.zoom=V8(a.minZoom,W4(A,I,y,g),a.maxZoom)),t.emit("zoom")),(R||P)&&t.emit("viewport");var O=s.style;if(O&&O.length>0&&i){for(var C=0;C=0;R--){var A=S[R];A()}S.splice(0,S.length)},x=p.length-1;x>=0;x--){var k=p[x],_=k._private;if(_.stopped){p.splice(x,1),_.hooked=!1,_.playing=!1,_.started=!1,v(_.frames);continue}!_.playing&&!_.applying||(_.playing&&_.applying&&(_.applying=!1),_.started||O9t(h,k,t),N9t(h,k,t,f),_.applying&&(_.applying=!1),v(_.frames),_.step!=null&&_.step(t),k.completed()&&(p.splice(x,1),_.hooked=!1,_.playing=!1,_.started=!1,v(_.completes)),g=!0)}return!f&&p.length===0&&m.length===0&&n.push(h),g}for(var a=!1,s=0;s0?e.notify("draw",r):e.notify("draw")),r.unmerge(n),e.emit("step")}function VDe(t){this.options=br({},U9t,H9t,t)}function WDe(t){this.options=br({},V9t,t)}function YDe(t){this.options=br({},W9t,t)}function tD(t){this.options=br({},Y9t,t),this.options.layout=this;var e=this.options.eles.nodes(),r=this.options.eles.edges(),n=r.filter(function(i){var a=i.source().data("id"),s=i.target().data("id"),o=e.some(function(u){return u.data("id")===a}),l=e.some(function(u){return u.data("id")===s});return!o||!l});this.options.eles=this.options.eles.not(n)}function ZDe(t){this.options=br({},lEt,t)}function TX(t){this.options=br({},uEt,t)}function QDe(t){this.options=br({},cEt,t)}function JDe(t){this.options=br({},hEt,t)}function eIe(t){this.options=t,this.notifications=0}function nIe(t,e){e.radius===0?t.lineTo(e.cx,e.cy):t.arc(e.cx,e.cy,e.radius,e.startAngle,e.endAngle,e.counterClockwise)}function SX(t,e,r,n){var i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0;return n===0||e.radius===0?{cx:e.x,cy:e.y,radius:0,startX:e.x,startY:e.y,stopX:e.x,stopY:e.y,startAngle:void 0,endAngle:void 0,counterClockwise:void 0}:(pEt(t,e,r,n,i),{cx:jY,cy:KY,radius:hg,startX:tIe,startY:rIe,stopX:ZY,stopY:QY,startAngle:nh.ang+Math.PI/2*dg,endAngle:Du.ang-Math.PI/2*dg,counterClockwise:TR})}function iIe(t){var e=[];if(t!=null){for(var r=0;r5&&arguments[5]!==void 0?arguments[5]:5,s=Math.min(a,n/2,i/2);t.beginPath(),t.moveTo(e+s,r),t.lineTo(e+n-s,r),t.quadraticCurveTo(e+n,r,e+n,r+s),t.lineTo(e+n,r+i-s),t.quadraticCurveTo(e+n,r+i,e+n-s,r+i),t.lineTo(e+s,r+i),t.quadraticCurveTo(e,r+i,e,r+i-s),t.lineTo(e,r+s),t.quadraticCurveTo(e,r,e+s,r),t.closePath()}function DRe(t,e,r){var n=t.createShader(e);if(t.shaderSource(n,r),t.compileShader(n),!t.getShaderParameter(n,t.COMPILE_STATUS))throw new Error(t.getShaderInfoLog(n));return n}function aSt(t,e,r){var n=DRe(t,t.VERTEX_SHADER,e),i=DRe(t,t.FRAGMENT_SHADER,r),a=t.createProgram();if(t.attachShader(a,n),t.attachShader(a,i),t.linkProgram(a),!t.getProgramParameter(a,t.LINK_STATUS))throw new Error("Could not initialize shaders");return a}function sSt(t,e,r){r===void 0&&(r=e);var n=t.makeOffscreenCanvas(e,r),i=n.context=n.getContext("2d");return n.clear=function(){return i.clearRect(0,0,n.width,n.height)},n.clear(),n}function AX(t){var e=t.pixelRatio,r=t.cy.zoom(),n=t.cy.pan();return{zoom:r*e,pan:{x:n.x*e,y:n.y*e}}}function oSt(t){var e=t.pixelRatio,r=t.cy.zoom();return r*e}function lSt(t,e,r,n,i){var a=n*r+e.x,s=i*r+e.y;return s=Math.round(t.canvasHeight-s),[a,s]}function uSt(t,e){return e.picking?!0:t.pstyle("background-fill").value!=="solid"||t.pstyle("background-image").strValue!=="none"?!1:t.pstyle("border-width").value===0||t.pstyle("border-opacity").value===0?!0:t.pstyle("border-style").value==="solid"}function cSt(t,e){if(t.length!==e.length)return!1;for(var r=0;r>0&255)/255,r[1]=(t>>8&255)/255,r[2]=(t>>16&255)/255,r[3]=(t>>24&255)/255,r}function hSt(t){return t[0]+(t[1]<<8)+(t[2]<<16)+(t[3]<<24)}function fSt(t,e){var r=t.createTexture();return r.buffer=function(n){t.bindTexture(t.TEXTURE_2D,r),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_S,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_T,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MAG_FILTER,t.LINEAR),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,t.LINEAR_MIPMAP_NEAREST),t.pixelStorei(t.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!0),t.texImage2D(t.TEXTURE_2D,0,t.RGBA,t.RGBA,t.UNSIGNED_BYTE,n),t.generateMipmap(t.TEXTURE_2D),t.bindTexture(t.TEXTURE_2D,null)},r.deleteTexture=function(){t.deleteTexture(r)},r}function vIe(t,e){switch(e){case"float":return[1,t.FLOAT,4];case"vec2":return[2,t.FLOAT,4];case"vec3":return[3,t.FLOAT,4];case"vec4":return[4,t.FLOAT,4];case"int":return[1,t.INT,4];case"ivec2":return[2,t.INT,4]}}function xIe(t,e,r){switch(e){case t.FLOAT:return new Float32Array(r);case t.INT:return new Int32Array(r)}}function dSt(t,e,r,n,i,a){switch(e){case t.FLOAT:return new Float32Array(r.buffer,a*n,i);case t.INT:return new Int32Array(r.buffer,a*n,i)}}function pSt(t,e,r,n){var i=vIe(t,e),a=Da(i,2),s=a[0],o=a[1],l=xIe(t,o,n),u=t.createBuffer();return t.bindBuffer(t.ARRAY_BUFFER,u),t.bufferData(t.ARRAY_BUFFER,l,t.STATIC_DRAW),o===t.FLOAT?t.vertexAttribPointer(r,s,o,!1,0,0):o===t.INT&&t.vertexAttribIPointer(r,s,o,0,0),t.enableVertexAttribArray(r),t.bindBuffer(t.ARRAY_BUFFER,null),u}function rh(t,e,r,n){var i=vIe(t,r),a=Da(i,3),s=a[0],o=a[1],l=a[2],u=xIe(t,o,e*s),h=s*l,f=t.createBuffer();t.bindBuffer(t.ARRAY_BUFFER,f),t.bufferData(t.ARRAY_BUFFER,e*h,t.DYNAMIC_DRAW),t.enableVertexAttribArray(n),o===t.FLOAT?t.vertexAttribPointer(n,s,o,!1,h,0):o===t.INT&&t.vertexAttribIPointer(n,s,o,h,0),t.vertexAttribDivisor(n,1),t.bindBuffer(t.ARRAY_BUFFER,null);for(var d=new Array(e),p=0;pdIe?(DSt(t),e.call(t,a)):(ISt(t),TIe(t,a,G8.SCREEN)))}}{var r=t.matchCanvasSize;t.matchCanvasSize=function(a){r.call(t,a),t.pickingFrameBuffer.setFramebufferAttachmentSizes(t.canvasWidth,t.canvasHeight),t.pickingFrameBuffer.needsDraw=!0}}t.findNearestElements=function(a,s,o,l){return FSt(t,a,s)};{var n=t.invalidateCachedZSortedEles;t.invalidateCachedZSortedEles=function(){n.call(t),t.pickingFrameBuffer.needsDraw=!0}}{var i=t.notify;t.notify=function(a,s){i.call(t,a,s),a==="viewport"||a==="bounds"?t.pickingFrameBuffer.needsDraw=!0:a==="background"&&t.drawing.invalidate(s,{type:"node-body"})}}}function DSt(t){var e=t.data.contexts[t.WEBGL];e.clear(e.COLOR_BUFFER_BIT|e.DEPTH_BUFFER_BIT)}function ISt(t){var e=function(n){n.save(),n.setTransform(1,0,0,1,0,0),n.clearRect(0,0,t.canvasWidth,t.canvasHeight),n.restore()};e(t.data.contexts[t.NODE]),e(t.data.contexts[t.DRAG])}function MSt(t){var e=t.canvasWidth,r=t.canvasHeight,n=AX(t),i=n.pan,a=n.zoom,s=IY();SR(s,s,[i.x,i.y]),eX(s,s,[a,a]);var o=IY();vSt(o,e,r);var l=IY();return ySt(l,o,s),l}function kIe(t,e){var r=t.canvasWidth,n=t.canvasHeight,i=AX(t),a=i.pan,s=i.zoom;e.setTransform(1,0,0,1,0,0),e.clearRect(0,0,r,n),e.translate(a.x,a.y),e.scale(s,s)}function NSt(t,e){t.drawSelectionRectangle(e,function(r){return kIe(t,r)})}function OSt(t){var e=t.data.contexts[t.NODE];e.save(),kIe(t,e),e.strokeStyle="rgba(0, 0, 0, 0.3)",e.beginPath(),e.moveTo(-1e3,0),e.lineTo(1e3,0),e.stroke(),e.beginPath(),e.moveTo(0,-1e3),e.lineTo(0,1e3),e.stroke(),e.restore()}function PSt(t){var e=function(i,a,s){for(var o=i.atlasManager.getAtlasCollection(a),l=t.data.contexts[t.NODE],u=o.atlases,h=0;h=0&&_.add(R)}return _}function FSt(t,e,r){var n=BSt(t,e,r),i=t.getCachedZSortedEles(),a,s,o=yl(n),l;try{for(o.s();!(l=o.n()).done;){var u=l.value,h=i[u];if(!a&&h.isNode()&&(a=h),!s&&h.isEdge()&&(s=h),a&&s)break}}catch(f){o.e(f)}finally{o.f()}return[a,s].filter(Boolean)}function BY(t,e,r){var n=t.drawing;e+=1,r.isNode()?(n.drawNode(r,e,"node-underlay"),n.drawNode(r,e,"node-body"),n.drawTexture(r,e,"label"),n.drawNode(r,e,"node-overlay")):(n.drawEdgeLine(r,e),n.drawEdgeArrow(r,e,"source"),n.drawEdgeArrow(r,e,"target"),n.drawTexture(r,e,"label"),n.drawTexture(r,e,"edge-source-label"),n.drawTexture(r,e,"edge-target-label"))}function TIe(t,e,r){var n;t.webglDebug&&(n=performance.now());var i=t.drawing,a=0;if(r.screen&&t.data.canvasNeedsRedraw[t.SELECT_BOX]&&NSt(t,e),t.data.canvasNeedsRedraw[t.NODE]||r.picking){var s=t.data.contexts[t.WEBGL];r.screen?(s.clearColor(0,0,0,0),s.enable(s.BLEND),s.blendFunc(s.ONE,s.ONE_MINUS_SRC_ALPHA)):s.disable(s.BLEND),s.clear(s.COLOR_BUFFER_BIT|s.DEPTH_BUFFER_BIT),s.viewport(0,0,s.canvas.width,s.canvas.height);var o=MSt(t),l=t.getCachedZSortedEles();if(a=l.length,i.startFrame(o,r),r.screen){for(var u=0;u{Wa=typeof window>"u"?null:window,fAe=Wa?Wa.navigator:null;Wa&&Wa.document;k8t=Xa(""),qRe=Xa({}),T8t=Xa(function(){}),E8t=typeof HTMLElement>"u"?"undefined":Xa(HTMLElement),Q8=function(e){return e&&e.instanceString&&Vi(e.instanceString)?e.instanceString():null},yr=function(e){return e!=null&&Xa(e)==k8t},Vi=function(e){return e!=null&&Xa(e)===T8t},si=function(e){return!Wl(e)&&(Array.isArray?Array.isArray(e):e!=null&&e instanceof Array)},yn=function(e){return e!=null&&Xa(e)===qRe&&!si(e)&&e.constructor===Object},S8t=function(e){return e!=null&&Xa(e)===qRe},Ht=function(e){return e!=null&&Xa(e)===Xa(1)&&!isNaN(e)},C8t=function(e){return Ht(e)&&Math.floor(e)===e},_R=function(e){if(E8t!=="undefined")return e!=null&&e instanceof HTMLElement},Wl=function(e){return J8(e)||URe(e)},J8=function(e){return Q8(e)==="collection"&&e._private.single},URe=function(e){return Q8(e)==="collection"&&!e._private.single},aX=function(e){return Q8(e)==="core"},HRe=function(e){return Q8(e)==="stylesheet"},_8t=function(e){return Q8(e)==="event"},Vp=function(e){return e==null?!0:!!(e===""||e.match(/^\s+$/))},A8t=function(e){return typeof HTMLElement>"u"?!1:e instanceof HTMLElement},L8t=function(e){return yn(e)&&Ht(e.x1)&&Ht(e.x2)&&Ht(e.y1)&&Ht(e.y2)},R8t=function(e){return S8t(e)&&Vi(e.then)},D8t=function(){return fAe&&fAe.userAgent.match(/msie|trident|edge/i)},ab=function(e,r){r||(r=function(){if(arguments.length===1)return arguments[0];if(arguments.length===0)return"undefined";for(var a=[],s=0;sr?1:0},F8t=function(e,r){return-1*WRe(e,r)},br=Object.assign!=null?Object.assign.bind(Object):function(t){for(var e=arguments,r=1;r1&&(y-=1),y<1/6?m+(g-m)*6*y:y<1/2?g:y<2/3?m+(g-m)*(2/3-y)*6:m}var f=new RegExp("^"+N8t+"$").exec(e);if(f){if(n=parseInt(f[1]),n<0?n=(360- -1*n%360)%360:n>360&&(n=n%360),n/=360,i=parseFloat(f[2]),i<0||i>100||(i=i/100,a=parseFloat(f[3]),a<0||a>100)||(a=a/100,s=f[4],s!==void 0&&(s=parseFloat(s),s<0||s>1)))return;if(i===0)o=l=u=Math.round(a*255);else{var d=a<.5?a*(1+i):a+i-a*i,p=2*a-d;o=Math.round(255*h(p,d,n+1/3)),l=Math.round(255*h(p,d,n)),u=Math.round(255*h(p,d,n-1/3))}r=[o,l,u,s]}return r},G8t=function(e){var r,n=new RegExp("^"+I8t+"$").exec(e);if(n){r=[];for(var i=[],a=1;a<=3;a++){var s=n[a];if(s[s.length-1]==="%"&&(i[a]=!0),s=parseFloat(s),i[a]&&(s=s/100*255),s<0||s>255)return;r.push(Math.floor(s))}var o=i[1]||i[2]||i[3],l=i[1]&&i[2]&&i[3];if(o&&!l)return;var u=n[4];if(u!==void 0){if(u=parseFloat(u),u<0||u>1)return;r.push(u)}}return r},q8t=function(e){return U8t[e.toLowerCase()]},YRe=function(e){return(si(e)?e:null)||q8t(e)||z8t(e)||G8t(e)||$8t(e)},U8t={transparent:[0,0,0,0],aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],grey:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]},XRe=function(e){for(var r=e.map,n=e.keys,i=n.length,a=0;a1&&arguments[1]!==void 0?arguments[1]:fg,n=r,i;i=e.next(),!i.done;)n=n*QRe+i.value|0;return n},q8=function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:fg;return r*QRe+e|0},U8=function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Z4;return(r<<5)+r+e|0},twt=function(e,r){return e*2097152+r},Bp=function(e){return e[0]*2097152+e[1]},nR=function(e,r){return[q8(e[0],r[0]),U8(e[1],r[1])]},AAe=function(e,r){var n={value:0,done:!1},i=0,a=e.length,s={next:function(){return i=0;i--)e[i]===r&&e.splice(i,1)},cX=function(e){e.splice(0,e.length)},hwt=function(e,r){for(var n=0;n"u"?"undefined":Xa(Set))!==dwt?Set:pwt,qR=function(e,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(e===void 0||r===void 0||!aX(e)){Mi("An element must have a core reference and parameters set");return}var i=r.group;if(i==null&&(r.data&&r.data.source!=null&&r.data.target!=null?i="edges":i="nodes"),i!=="nodes"&&i!=="edges"){Mi("An element must be of type `nodes` or `edges`; you specified `"+i+"`");return}this.length=1,this[0]=this;var a=this._private={cy:e,single:!0,data:r.data||{},position:r.position||{x:0,y:0},autoWidth:void 0,autoHeight:void 0,autoPadding:void 0,compoundBoundsClean:!1,listeners:[],group:i,style:{},rstyle:{},styleCxts:[],styleKeys:{},removed:!0,selected:!!r.selected,selectable:r.selectable===void 0?!0:!!r.selectable,locked:!!r.locked,grabbed:!1,grabbable:r.grabbable===void 0?!0:!!r.grabbable,pannable:r.pannable===void 0?i==="edges":!!r.pannable,active:!1,classes:new cb,animation:{current:[],queue:[]},rscratch:{},scratch:r.scratch||{},edges:[],children:[],parent:r.parent&&r.parent.isNode()?r.parent:null,traversalCache:{},backgrounding:!1,bbCache:null,bbCacheShift:{x:0,y:0},bodyBounds:null,overlayBounds:null,labelBounds:{all:null,source:null,target:null,main:null},arrowBounds:{source:null,target:null,"mid-source":null,"mid-target":null}};if(a.position.x==null&&(a.position.x=0),a.position.y==null&&(a.position.y=0),r.renderedPosition){var s=r.renderedPosition,o=e.pan(),l=e.zoom();a.position={x:(s.x-o.x)/l,y:(s.y-o.y)/l}}var u=[];si(r.classes)?u=r.classes:yr(r.classes)&&(u=r.classes.split(/\s+/));for(var h=0,f=u.length;h0;){var S=x.pop(),R=y(S),A=S.id();if(d[A]=R,R!==1/0)for(var I=S.neighborhood().intersect(m),P=0;P0)for(z.unshift($);f[V];){var U=f[V];z.unshift(U.edge),z.unshift(U.node),q=U.node,V=q.id()}return o.spawn(z)}}}},wwt={kruskal:function(e){e=e||function(k){return 1};for(var r=this.byGroup(),n=r.nodes,i=r.edges,a=n.length,s=new Array(a),o=n,l=function(_){for(var T=0;T0;){if(T(),R++,_===h){for(var A=[],I=a,P=h,O=v[P];A.unshift(I),O!=null&&A.unshift(O),I=y[P],I!=null;)P=I.id(),O=v[P];return{found:!0,distance:f[_],path:this.spawn(A),steps:R}}p[_]=!0;for(var C=k._private.edges,N=0;NO&&(m[P]=O,x[P]=I,k[P]=T),!a){var C=I*h+A;!a&&m[C]>O&&(m[C]=O,x[C]=A,k[C]=T)}}}for(var N=0;N1&&arguments[1]!==void 0?arguments[1]:s,Ae=k(ce),Ye=[],Ge=Ae;;){if(Ge==null)return r.spawn();var rt=x(Ge),Xe=rt.edge,Ze=rt.pred;if(Ye.unshift(Ge[0]),Ge.same(st)&&Ye.length>0)break;Xe!=null&&Ye.unshift(Xe),Ge=Ze}return l.spawn(Ye)},S=0;S=0;h--){var f=u[h],d=f[1],p=f[2];(r[d]===o&&r[p]===l||r[d]===l&&r[p]===o)&&u.splice(h,1)}for(var m=0;mi;){var a=Math.floor(Math.random()*r.length);r=Lwt(a,e,r),n--}return r},Rwt={kargerStein:function(){var e=this,r=this.byGroup(),n=r.nodes,i=r.edges;i.unmergeBy(function(z){return z.isLoop()});var a=n.length,s=i.length,o=Math.ceil(Math.pow(Math.log(a)/Math.LN2,2)),l=Math.floor(a/Awt);if(a<2){Mi("At least 2 nodes are required for Karger-Stein algorithm");return}for(var u=[],h=0;h1&&arguments[1]!==void 0?arguments[1]:0,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:e.length,i=1/0,a=r;a1&&arguments[1]!==void 0?arguments[1]:0,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:e.length,i=-1/0,a=r;a1&&arguments[1]!==void 0?arguments[1]:0,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:e.length,i=0,a=0,s=r;s1&&arguments[1]!==void 0?arguments[1]:0,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:e.length,i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!0,a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,s=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!0;i?e=e.slice(r,n):(n0&&e.splice(0,r));for(var o=0,l=e.length-1;l>=0;l--){var u=e[l];s?isFinite(u)||(e[l]=-1/0,o++):e.splice(l,1)}a&&e.sort(function(d,p){return d-p});var h=e.length,f=Math.floor(h/2);return h%2!==0?e[f+1+o]:(e[f-1+o]+e[f+o])/2},Pwt=function(e){return Math.PI*e/180},iR=function(e,r){return Math.atan2(r,e)-Math.PI/2},hX=Math.log2||function(t){return Math.log(t)/Math.log(2)},fX=function(e){return e>0?1:e<0?-1:0},gg=function(e,r){return Math.sqrt(cg(e,r))},cg=function(e,r){var n=r.x-e.x,i=r.y-e.y;return n*n+i*i},Bwt=function(e){for(var r=e.length,n=0,i=0;i=e.x1&&e.y2>=e.y1)return{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2,w:e.x2-e.x1,h:e.y2-e.y1};if(e.w!=null&&e.h!=null&&e.w>=0&&e.h>=0)return{x1:e.x1,y1:e.y1,x2:e.x1+e.w,y2:e.y1+e.h,w:e.w,h:e.h}}},zwt=function(e){return{x1:e.x1,x2:e.x2,w:e.w,y1:e.y1,y2:e.y2,h:e.h}},$wt=function(e){e.x1=1/0,e.y1=1/0,e.x2=-1/0,e.y2=-1/0,e.w=0,e.h=0},Gwt=function(e,r){e.x1=Math.min(e.x1,r.x1),e.x2=Math.max(e.x2,r.x2),e.w=e.x2-e.x1,e.y1=Math.min(e.y1,r.y1),e.y2=Math.max(e.y2,r.y2),e.h=e.y2-e.y1},sDe=function(e,r,n){e.x1=Math.min(e.x1,r),e.x2=Math.max(e.x2,r),e.w=e.x2-e.x1,e.y1=Math.min(e.y1,n),e.y2=Math.max(e.y2,n),e.h=e.y2-e.y1},gR=function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return e.x1-=r,e.x2+=r,e.y1-=r,e.y2+=r,e.w=e.x2-e.x1,e.h=e.y2-e.y1,e},yR=function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[0],n,i,a,s;if(r.length===1)n=i=a=s=r[0];else if(r.length===2)n=a=r[0],s=i=r[1];else if(r.length===4){var o=Da(r,4);n=o[0],i=o[1],a=o[2],s=o[3]}return e.x1-=s,e.x2+=i,e.y1-=n,e.y2+=a,e.w=e.x2-e.x1,e.h=e.y2-e.y1,e},NAe=function(e,r){e.x1=r.x1,e.y1=r.y1,e.x2=r.x2,e.y2=r.y2,e.w=e.x2-e.x1,e.h=e.y2-e.y1},dX=function(e,r){return!(e.x1>r.x2||r.x1>e.x2||e.x2r.y2||r.y1>e.y2)},Gp=function(e,r,n){return e.x1<=r&&r<=e.x2&&e.y1<=n&&n<=e.y2},OAe=function(e,r){return Gp(e,r.x,r.y)},oDe=function(e,r){return Gp(e,r.x1,r.y1)&&Gp(e,r.x2,r.y2)},qwt=(SW=Math.hypot)!==null&&SW!==void 0?SW:function(t,e){return Math.sqrt(t*t+e*e)};lDe=function(e,r,n,i,a,s,o){var l=arguments.length>7&&arguments[7]!==void 0?arguments[7]:"auto",u=l==="auto"?Yp(a,s):l,h=a/2,f=s/2;u=Math.min(u,h,f);var d=u!==h,p=u!==f,m;if(d){var g=n-h+u-o,y=i-f-o,v=n+h-u+o,x=y;if(m=qp(e,r,n,i,g,y,v,x,!1),m.length>0)return m}if(p){var k=n+h+o,_=i-f+u-o,T=k,S=i+f-u+o;if(m=qp(e,r,n,i,k,_,T,S,!1),m.length>0)return m}if(d){var R=n-h+u-o,A=i+f+o,I=n+h-u+o,P=A;if(m=qp(e,r,n,i,R,A,I,P,!1),m.length>0)return m}if(p){var O=n-h-o,C=i-f+u-o,N=O,B=i+f-u+o;if(m=qp(e,r,n,i,O,C,N,B,!1),m.length>0)return m}var F;{var M=n-h+u,$=i-f+u;if(F=P8(e,r,n,i,M,$,u+o),F.length>0&&F[0]<=M&&F[1]<=$)return[F[0],F[1]]}{var z=n+h-u,q=i-f+u;if(F=P8(e,r,n,i,z,q,u+o),F.length>0&&F[0]>=z&&F[1]<=q)return[F[0],F[1]]}{var V=n+h-u,U=i+f-u;if(F=P8(e,r,n,i,V,U,u+o),F.length>0&&F[0]>=V&&F[1]>=U)return[F[0],F[1]]}{var J=n-h+u,se=i+f-u;if(F=P8(e,r,n,i,J,se,u+o),F.length>0&&F[0]<=J&&F[1]>=se)return[F[0],F[1]]}return[]},Vwt=function(e,r,n,i,a,s,o){var l=o,u=Math.min(n,a),h=Math.max(n,a),f=Math.min(i,s),d=Math.max(i,s);return u-l<=e&&e<=h+l&&f-l<=r&&r<=d+l},Wwt=function(e,r,n,i,a,s,o,l,u){var h={x1:Math.min(n,o,a)-u,x2:Math.max(n,o,a)+u,y1:Math.min(i,l,s)-u,y2:Math.max(i,l,s)+u};return!(eh.x2||rh.y2)},Ywt=function(e,r,n,i){n-=i;var a=r*r-4*e*n;if(a<0)return[];var s=Math.sqrt(a),o=2*e,l=(-r+s)/o,u=(-r-s)/o;return[l,u]},Xwt=function(e,r,n,i,a){var s=1e-5;e===0&&(e=s),r/=e,n/=e,i/=e;var o,l,u,h,f,d,p,m;if(l=(3*n-r*r)/9,u=-(27*i)+r*(9*n-2*(r*r)),u/=54,o=l*l*l+u*u,a[1]=0,p=r/3,o>0){f=u+Math.sqrt(o),f=f<0?-Math.pow(-f,1/3):Math.pow(f,1/3),d=u-Math.sqrt(o),d=d<0?-Math.pow(-d,1/3):Math.pow(d,1/3),a[0]=-p+f+d,p+=(f+d)/2,a[4]=a[2]=-p,p=Math.sqrt(3)*(-d+f)/2,a[3]=p,a[5]=-p;return}if(a[5]=a[3]=0,o===0){m=u<0?-Math.pow(-u,1/3):Math.pow(u,1/3),a[0]=-p+2*m,a[4]=a[2]=-(m+p);return}l=-l,h=l*l*l,h=Math.acos(u/Math.sqrt(h)),m=2*Math.sqrt(l),a[0]=-p+m*Math.cos(h/3),a[2]=-p+m*Math.cos((h+2*Math.PI)/3),a[4]=-p+m*Math.cos((h+4*Math.PI)/3)},jwt=function(e,r,n,i,a,s,o,l){var u=1*n*n-4*n*a+2*n*o+4*a*a-4*a*o+o*o+i*i-4*i*s+2*i*l+4*s*s-4*s*l+l*l,h=9*n*a-3*n*n-3*n*o-6*a*a+3*a*o+9*i*s-3*i*i-3*i*l-6*s*s+3*s*l,f=3*n*n-6*n*a+n*o-n*e+2*a*a+2*a*e-o*e+3*i*i-6*i*s+i*l-i*r+2*s*s+2*s*r-l*r,d=1*n*a-n*n+n*e-a*e+i*s-i*i+i*r-s*r,p=[];Xwt(u,h,f,d,p);for(var m=1e-7,g=[],y=0;y<6;y+=2)Math.abs(p[y+1])=0&&p[y]<=1&&g.push(p[y]);g.push(1),g.push(0);for(var v=-1,x,k,_,T=0;T=0?_u?(e-a)*(e-a)+(r-s)*(r-s):h-d},gl=function(e,r,n){for(var i,a,s,o,l,u=0,h=0;h=e&&e>=s||i<=e&&e<=s)l=(e-i)/(s-i)*(o-a)+a,l>r&&u++;else continue;return u%2!==0},Sf=function(e,r,n,i,a,s,o,l,u){var h=new Array(n.length),f;l[0]!=null?(f=Math.atan(l[1]/l[0]),l[0]<0?f=f+Math.PI/2:f=-f-Math.PI/2):f=l;for(var d=Math.cos(-f),p=Math.sin(-f),m=0;m0){var y=DR(h,-u);g=RR(y)}else g=h;return gl(e,r,g)},Zwt=function(e,r,n,i,a,s,o,l){for(var u=new Array(n.length*2),h=0;h=0&&y<=1&&x.push(y),v>=0&&v<=1&&x.push(v),x.length===0)return[];var k=x[0]*l[0]+e,_=x[0]*l[1]+r;if(x.length>1){if(x[0]==x[1])return[k,_];var T=x[1]*l[0]+e,S=x[1]*l[1]+r;return[k,_,T,S]}else return[k,_]},CW=function(e,r,n){return r<=e&&e<=n||n<=e&&e<=r?e:e<=r&&r<=n||n<=r&&r<=e?r:n},qp=function(e,r,n,i,a,s,o,l,u){var h=e-a,f=n-e,d=o-a,p=r-s,m=i-r,g=l-s,y=d*p-g*h,v=f*p-m*h,x=g*f-d*m;if(x!==0){var k=y/x,_=v/x,T=.001,S=0-T,R=1+T;return S<=k&&k<=R&&S<=_&&_<=R?[e+k*f,r+k*m]:u?[e+k*f,r+k*m]:[]}else return y===0||v===0?CW(e,n,o)===o?[o,l]:CW(e,n,a)===a?[a,s]:CW(a,o,n)===n?[n,i]:[]:[]},Jwt=function(e,r,n,i,a){var s=[],o=i/2,l=a/2,u=r,h=n;s.push({x:u+o*e[0],y:h+l*e[1]});for(var f=1;f0){var g=DR(f,-l);p=RR(g)}else p=f}else p=n;for(var y,v,x,k,_=0;_2){for(var m=[h[0],h[1]],g=Math.pow(m[0]-e,2)+Math.pow(m[1]-r,2),y=1;yh&&(h=_)},get:function(k){return u[k]}},d=0;d0?F=B.edgesTo(N)[0]:F=N.edgesTo(B)[0];var M=i(F);N=N.id(),R[N]>R[O]+M&&(R[N]=R[O]+M,A.nodes.indexOf(N)<0?A.push(N):A.updateItem(N),S[N]=0,T[N]=[]),R[N]==R[O]+M&&(S[N]=S[N]+S[O],T[N].push(O))}else for(var $=0;$0;){for(var U=_.pop(),J=0;J0&&o.push(n[l]);o.length!==0&&a.push(i.collection(o))}return a},pkt=function(e,r){for(var n=0;n5&&arguments[5]!==void 0?arguments[5]:ykt,o=i,l,u,h=0;h=2?L8(e,r,n,0,$Ae,vkt):L8(e,r,n,0,zAe)},squaredEuclidean:function(e,r,n){return L8(e,r,n,0,$Ae)},manhattan:function(e,r,n){return L8(e,r,n,0,zAe)},max:function(e,r,n){return L8(e,r,n,-1/0,xkt)}};sb["squared-euclidean"]=sb.squaredEuclidean;sb.squaredeuclidean=sb.squaredEuclidean;bkt=Bs({k:2,m:2,sensitivityThreshold:1e-4,distance:"euclidean",maxIterations:10,attributes:[],testMode:!1,testCentroids:null}),mX=function(e){return bkt(e)},IR=function(e,r,n,i,a){var s=a!=="kMedoids",o=s?function(f){return n[f]}:function(f){return i[f](n)},l=function(d){return i[d](r)},u=n,h=r;return HR(e,i.length,o,l,u,h)},AW=function(e,r,n){for(var i=n.length,a=new Array(i),s=new Array(i),o=new Array(r),l=null,u=0;un)return!1}return!0},Tkt=function(e,r,n){for(var i=0;io&&(o=r[u][h],l=h);a[l].push(e[u])}for(var f=0;f=a.threshold||a.mode==="dendrogram"&&e.length===1)return!1;var m=r[s],g=r[i[s]],y;a.mode==="dendrogram"?y={left:m,right:g,key:m.key}:y={value:m.value.concat(g.value),key:m.key},e[m.index]=y,e.splice(g.index,1),r[m.key]=y;for(var v=0;vn[g.key][x.key]&&(l=n[g.key][x.key])):a.linkage==="max"?(l=n[m.key][x.key],n[m.key][x.key]0&&i.push(a);return i},WAe=function(e,r,n){for(var i=[],a=0;ao&&(s=u,o=r[a*e+u])}s>0&&i.push(s)}for(var h=0;hu&&(l=h,u=f)}n[a]=s[l]}return i=WAe(e,r,n),i},YAe=function(e){for(var r=this.cy(),n=this.nodes(),i=Okt(e),a={},s=0;s=O?(C=O,O=B,N=F):B>C&&(C=B);for(var M=0;M0?1:0;R[I%i.minIterations*o+J]=se,U+=se}if(U>0&&(I>=i.minIterations-1||I==i.maxIterations-1)){for(var re=0,me=0;me1||S>1)&&(o=!0),f[k]=[],x.outgoers().forEach(function(A){A.isEdge()&&f[k].push(A.id())})}else d[k]=[void 0,x.target().id()]}):s.forEach(function(x){var k=x.id();if(x.isNode()){var _=x.degree(!0);_%2&&(l?u?o=!0:u=k:l=k),f[k]=[],x.connectedEdges().forEach(function(T){return f[k].push(T.id())})}else d[k]=[x.source().id(),x.target().id()]});var p={found:!1,trail:void 0};if(o)return p;if(u&&l)if(a){if(h&&u!=h)return p;h=u}else{if(h&&u!=h&&l!=h)return p;h||(h=u)}else h||(h=s[0].id());var m=function(k){for(var _=k,T=[k],S,R,A;f[_].length;)S=f[_].shift(),R=d[S][0],A=d[S][1],_!=A?(f[A]=f[A].filter(function(I){return I!=S}),_=A):!a&&_!=R&&(f[R]=f[R].filter(function(I){return I!=S}),_=R),T.unshift(S),T.unshift(_);return T},g=[],y=[];for(y=m(h);y.length!=1;)f[y[0]].length==0?(g.unshift(s.getElementById(y.shift())),g.unshift(s.getElementById(y.shift()))):y=m(y.shift()).concat(y);g.unshift(s.getElementById(y.shift()));for(var v in f)if(f[v].length)return p;return p.found=!0,p.trail=this.spawn(g,!0),p}},sR=function(){var e=this,r={},n=0,i=0,a=[],s=[],o={},l=function(d,p){for(var m=s.length-1,g=[],y=e.spawn();s[m].x!=d||s[m].y!=p;)g.push(s.pop().edge),m--;g.push(s.pop().edge),g.forEach(function(v){var x=v.connectedNodes().intersection(e);y.merge(v),x.forEach(function(k){var _=k.id(),T=k.connectedEdges().intersection(e);y.merge(k),r[_].cutVertex?y.merge(T.filter(function(S){return S.isLoop()})):y.merge(T)})}),a.push(y)},u=function(d,p,m){d===m&&(i+=1),r[p]={id:n,low:n++,cutVertex:!1};var g=e.getElementById(p).connectedEdges().intersection(e);if(g.size()===0)a.push(e.spawn(e.getElementById(p)));else{var y,v,x,k;g.forEach(function(_){y=_.source().id(),v=_.target().id(),x=y===p?v:y,x!==m&&(k=_.id(),o[k]||(o[k]=!0,s.push({x:p,y:x,edge:_})),x in r?r[p].low=Math.min(r[p].low,r[x].id):(u(d,x,p),r[p].low=Math.min(r[p].low,r[x].low),r[p].id<=r[x].low&&(r[p].cutVertex=!0,l(p,x))))})}};e.forEach(function(f){if(f.isNode()){var d=f.id();d in r||(i=0,u(d,d),r[d].cutVertex=i>1)}});var h=Object.keys(r).filter(function(f){return r[f].cutVertex}).map(function(f){return e.getElementById(f)});return{cut:e.spawn(h),components:a}},Ukt={hopcroftTarjanBiconnected:sR,htbc:sR,htb:sR,hopcroftTarjanBiconnectedComponents:sR},oR=function(){var e=this,r={},n=0,i=[],a=[],s=e.spawn(e),o=function(u){a.push(u),r[u]={index:n,low:n++,explored:!1};var h=e.getElementById(u).connectedEdges().intersection(e);if(h.forEach(function(g){var y=g.target().id();y!==u&&(y in r||o(y),r[y].explored||(r[u].low=Math.min(r[u].low,r[y].low)))}),r[u].index===r[u].low){for(var f=e.spawn();;){var d=a.pop();if(f.merge(e.getElementById(d)),r[d].low=r[u].index,r[d].explored=!0,d===u)break}var p=f.edgesWith(f),m=f.merge(p);i.push(m),s=s.difference(m)}};return e.forEach(function(l){if(l.isNode()){var u=l.id();u in r||o(u)}}),{cut:s,components:i}},Hkt={tarjanStronglyConnected:oR,tsc:oR,tscc:oR,tarjanStronglyConnectedComponents:oR},mDe={};[H8,bwt,wwt,Twt,Swt,_wt,Rwt,nkt,rb,nb,GY,gkt,Lkt,Mkt,$kt,qkt,Ukt,Hkt].forEach(function(t){br(mDe,t)});gDe=0,yDe=1,vDe=2,_c=function(e){if(!(this instanceof _c))return new _c(e);this.id="Thenable/1.0.7",this.state=gDe,this.fulfillValue=void 0,this.rejectReason=void 0,this.onFulfilled=[],this.onRejected=[],this.proxy={then:this.then.bind(this)},typeof e=="function"&&e.call(this,this.fulfill.bind(this),this.reject.bind(this))};_c.prototype={fulfill:function(e){return XAe(this,yDe,"fulfillValue",e)},reject:function(e){return XAe(this,vDe,"rejectReason",e)},then:function(e,r){var n=this,i=new _c;return n.onFulfilled.push(KAe(e,i,"fulfill")),n.onRejected.push(KAe(r,i,"reject")),xDe(n),i.proxy}};XAe=function(e,r,n,i){return e.state===gDe&&(e.state=r,e[n]=i,xDe(e)),e},xDe=function(e){e.state===yDe?jAe(e,"onFulfilled",e.fulfillValue):e.state===vDe&&jAe(e,"onRejected",e.rejectReason)},jAe=function(e,r,n){if(e[r].length!==0){var i=e[r];e[r]=[];var a=function(){for(var o=0;o0}},clearQueue:function(){return function(){var r=this,n=r.length!==void 0,i=n?r:[r],a=this._private.cy||this;if(!a.styleEnabled())return this;for(var s=0;s0&&this.spawn(i).updateStyle().emit("class"),r},addClass:function(e){return this.toggleClass(e,!0)},hasClass:function(e){var r=this[0];return r!=null&&r._private.classes.has(e)},toggleClass:function(e,r){si(e)||(e=e.match(/\S+/g)||[]);for(var n=this,i=r===void 0,a=[],s=0,o=n.length;s0&&this.spawn(a).updateStyle().emit("class"),n},removeClass:function(e){return this.toggleClass(e,!1)},flashClass:function(e,r){var n=this;if(r==null)r=250;else if(r===0)return n;return n.addClass(e),setTimeout(function(){n.removeClass(e)},r),n}};vR.className=vR.classNames=vR.classes;gn={metaChar:"[\\!\\\"\\#\\$\\%\\&\\'\\(\\)\\*\\+\\,\\.\\/\\:\\;\\<\\=\\>\\?\\@\\[\\]\\^\\`\\{\\|\\}\\~]",comparatorOp:"=|\\!=|>|>=|<|<=|\\$=|\\^=|\\*=",boolOp:"\\?|\\!|\\^",string:`"(?:\\\\"|[^"])*"|'(?:\\\\'|[^'])*'`,number:Ya,meta:"degree|indegree|outdegree",separator:"\\s*,\\s*",descendant:"\\s+",child:"\\s+>\\s+",subject:"\\$",group:"node|edge|\\*",directedEdge:"\\s+->\\s+",undirectedEdge:"\\s+<->\\s+"};gn.variable="(?:[\\w-.]|(?:\\\\"+gn.metaChar+"))+";gn.className="(?:[\\w-]|(?:\\\\"+gn.metaChar+"))+";gn.value=gn.string+"|"+gn.number;gn.id=gn.variable;(function(){var t,e,r;for(t=gn.comparatorOp.split("|"),r=0;r=0)&&e!=="="&&(gn.comparatorOp+="|\\!"+e)})();Xn=function(){return{checks:[]}},ir={GROUP:0,COLLECTION:1,FILTER:2,DATA_COMPARE:3,DATA_EXIST:4,DATA_BOOL:5,META_COMPARE:6,STATE:7,ID:8,CLASS:9,UNDIRECTED_EDGE:10,DIRECTED_EDGE:11,NODE_SOURCE:12,NODE_TARGET:13,NODE_NEIGHBOR:14,CHILD:15,DESCENDANT:16,PARENT:17,ANCESTOR:18,COMPOUND_SPLIT:19,TRUE:20},VY=[{selector:":selected",matches:function(e){return e.selected()}},{selector:":unselected",matches:function(e){return!e.selected()}},{selector:":selectable",matches:function(e){return e.selectable()}},{selector:":unselectable",matches:function(e){return!e.selectable()}},{selector:":locked",matches:function(e){return e.locked()}},{selector:":unlocked",matches:function(e){return!e.locked()}},{selector:":visible",matches:function(e){return e.visible()}},{selector:":hidden",matches:function(e){return!e.visible()}},{selector:":transparent",matches:function(e){return e.transparent()}},{selector:":grabbed",matches:function(e){return e.grabbed()}},{selector:":free",matches:function(e){return!e.grabbed()}},{selector:":removed",matches:function(e){return e.removed()}},{selector:":inside",matches:function(e){return!e.removed()}},{selector:":grabbable",matches:function(e){return e.grabbable()}},{selector:":ungrabbable",matches:function(e){return!e.grabbable()}},{selector:":animated",matches:function(e){return e.animated()}},{selector:":unanimated",matches:function(e){return!e.animated()}},{selector:":parent",matches:function(e){return e.isParent()}},{selector:":childless",matches:function(e){return e.isChildless()}},{selector:":child",matches:function(e){return e.isChild()}},{selector:":orphan",matches:function(e){return e.isOrphan()}},{selector:":nonorphan",matches:function(e){return e.isChild()}},{selector:":compound",matches:function(e){return e.isNode()?e.isParent():e.source().isParent()||e.target().isParent()}},{selector:":loop",matches:function(e){return e.isLoop()}},{selector:":simple",matches:function(e){return e.isSimple()}},{selector:":active",matches:function(e){return e.active()}},{selector:":inactive",matches:function(e){return!e.active()}},{selector:":backgrounding",matches:function(e){return e.backgrounding()}},{selector:":nonbackgrounding",matches:function(e){return!e.backgrounding()}}].sort(function(t,e){return F8t(t.selector,e.selector)}),GTt=(function(){for(var t={},e,r=0;r0&&h.edgeCount>0)return Pn("The selector `"+e+"` is invalid because it uses both a compound selector and an edge selector"),!1;if(h.edgeCount>1)return Pn("The selector `"+e+"` is invalid because it uses multiple edge selectors"),!1;h.edgeCount===1&&Pn("The selector `"+e+"` is deprecated. Edge selectors do not take effect on changes to source and target nodes after an edge is added, for performance reasons. Use a class or data selector on edges instead, updating the class or data of an edge when your app detects a change in source or target nodes.")}return!0},YTt=function(){if(this.toStringCache!=null)return this.toStringCache;for(var e=function(h){return h??""},r=function(h){return yr(h)?'"'+h+'"':e(h)},n=function(h){return" "+h+" "},i=function(h,f){var d=h.type,p=h.value;switch(d){case ir.GROUP:{var m=e(p);return m.substring(0,m.length-1)}case ir.DATA_COMPARE:{var g=h.field,y=h.operator;return"["+g+n(e(y))+r(p)+"]"}case ir.DATA_BOOL:{var v=h.operator,x=h.field;return"["+e(v)+x+"]"}case ir.DATA_EXIST:{var k=h.field;return"["+k+"]"}case ir.META_COMPARE:{var _=h.operator,T=h.field;return"[["+T+n(e(_))+r(p)+"]]"}case ir.STATE:return p;case ir.ID:return"#"+p;case ir.CLASS:return"."+p;case ir.PARENT:case ir.CHILD:return a(h.parent,f)+n(">")+a(h.child,f);case ir.ANCESTOR:case ir.DESCENDANT:return a(h.ancestor,f)+" "+a(h.descendant,f);case ir.COMPOUND_SPLIT:{var S=a(h.left,f),R=a(h.subject,f),A=a(h.right,f);return S+(S.length>0?" ":"")+R+A}case ir.TRUE:return""}},a=function(h,f){return h.checks.reduce(function(d,p,m){return d+(f===h&&m===0?"$":"")+i(p,f)},"")},s="",o=0;o1&&o=0&&(r=r.replace("!",""),f=!0),r.indexOf("@")>=0&&(r=r.replace("@",""),h=!0),(a||o||h)&&(l=!a&&!s?"":""+e,u=""+n),h&&(e=l=l.toLowerCase(),n=u=u.toLowerCase()),r){case"*=":i=l.indexOf(u)>=0;break;case"$=":i=l.indexOf(u,l.length-u.length)>=0;break;case"^=":i=l.indexOf(u)===0;break;case"=":i=e===n;break;case">":d=!0,i=e>n;break;case">=":d=!0,i=e>=n;break;case"<":d=!0,i=e1&&arguments[1]!==void 0?arguments[1]:!0;return xX(this,t,e,_De)};ob.forEachUp=function(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;return xX(this,t,e,ADe)};ob.forEachUpAndDown=function(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;return xX(this,t,e,t9t)};ob.ancestors=ob.parents;Y8=LDe={data:On.data({field:"data",bindingEvent:"data",allowBinding:!0,allowSetting:!0,settingEvent:"data",settingTriggersEvent:!0,triggerFnName:"trigger",allowGetting:!0,immutableKeys:{id:!0,source:!0,target:!0,parent:!0},updateStyle:!0}),removeData:On.removeData({field:"data",event:"data",triggerFnName:"trigger",triggerEvent:!0,immutableKeys:{id:!0,source:!0,target:!0,parent:!0},updateStyle:!0}),scratch:On.data({field:"scratch",bindingEvent:"scratch",allowBinding:!0,allowSetting:!0,settingEvent:"scratch",settingTriggersEvent:!0,triggerFnName:"trigger",allowGetting:!0,updateStyle:!0}),removeScratch:On.removeData({field:"scratch",event:"scratch",triggerFnName:"trigger",triggerEvent:!0,updateStyle:!0}),rscratch:On.data({field:"rscratch",allowBinding:!1,allowSetting:!0,settingTriggersEvent:!1,allowGetting:!0}),removeRscratch:On.removeData({field:"rscratch",triggerEvent:!1}),id:function(){var e=this[0];if(e)return e._private.data.id}};Y8.attr=Y8.data;Y8.removeAttr=Y8.removeData;r9t=LDe,jR={};br(jR,{degree:CY(function(t,e){return e.source().same(e.target())?2:1}),indegree:CY(function(t,e){return e.target().same(t)?1:0}),outdegree:CY(function(t,e){return e.source().same(t)?1:0})});br(jR,{minDegree:V4("degree",function(t,e){return te}),minIndegree:V4("indegree",function(t,e){return te}),minOutdegree:V4("outdegree",function(t,e){return te})});br(jR,{totalDegree:function(e){for(var r=0,n=this.nodes(),i=0;i0,d=f;f&&(h=h[0]);var p=d?h.position():{x:0,y:0};r!==void 0?u.position(e,r+p[e]):a!==void 0&&u.position({x:a.x+p.x,y:a.y+p.y})}else{var m=n.position(),g=o?n.parent():null,y=g&&g.length>0,v=y;y&&(g=g[0]);var x=v?g.position():{x:0,y:0};return a={x:m.x-x.x,y:m.y-x.y},e===void 0?a:a[e]}else if(!s)return;return this}};Cc.modelPosition=Cc.point=Cc.position;Cc.modelPositions=Cc.points=Cc.positions;Cc.renderedPoint=Cc.renderedPosition;Cc.relativePoint=Cc.relativePosition;n9t=RDe,lb=function(e){switch(e){case"left":case"right-inside":return"left";case"right":case"left-inside":return"right";default:return"center"}},ub=function(e){switch(e){case"top":case"bottom-inside":return"top";case"bottom":case"top-inside":return"bottom";default:return"center"}},i9t=function(e){switch(e){case"left":return"right";case"right":return"left";case"left-inside":return"left";case"right-inside":return"right";default:return"center"}};ib=Jp={};Jp.renderedBoundingBox=function(t){var e=this.boundingBox(t),r=this.cy(),n=r.zoom(),i=r.pan(),a=e.x1*n+i.x,s=e.x2*n+i.x,o=e.y1*n+i.y,l=e.y2*n+i.y;return{x1:a,x2:s,y1:o,y2:l,w:s-a,h:l-o}};Jp.dirtyCompoundBoundsCache=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,e=this.cy();return!e.styleEnabled()||!e.hasCompoundNodes()?this:(this.forEachUp(function(r){if(r.isParent()){var n=r._private;n.compoundBoundsClean=!1,n.bbCache=null,t||r.emitAndNotify("bounds")}}),this)};Jp.updateCompoundBounds=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,e=this.cy();if(!e.styleEnabled()||!e.hasCompoundNodes())return this;if(!t&&e.batching())return this;function r(s){if(!s.isParent())return;var o=s._private,l=s.children(),u=s.pstyle("compound-sizing-wrt-labels").value==="include",h={width:{val:s.pstyle("min-width").pfValue,left:s.pstyle("min-width-bias-left"),right:s.pstyle("min-width-bias-right")},height:{val:s.pstyle("min-height").pfValue,top:s.pstyle("min-height-bias-top"),bottom:s.pstyle("min-height-bias-bottom")}},f=l.boundingBox({includeLabels:u,includeOverlays:!1,useCache:!1}),d=o.position;(f.w===0||f.h===0)&&(f={w:s.pstyle("width").pfValue,h:s.pstyle("height").pfValue},f.x1=d.x-f.w/2,f.x2=d.x+f.w/2,f.y1=d.y-f.h/2,f.y2=d.y+f.h/2);function p(I,P,O){var C=0,N=0,B=P+O;return I>0&&B>0&&(C=P/B*I,N=O/B*I),{biasDiff:C,biasComplementDiff:N}}function m(I,P,O,C){if(O.units==="%")switch(C){case"width":return I>0?O.pfValue*I:0;case"height":return P>0?O.pfValue*P:0;case"average":return I>0&&P>0?O.pfValue*(I+P)/2:0;case"min":return I>0&&P>0?I>P?O.pfValue*P:O.pfValue*I:0;case"max":return I>0&&P>0?I>P?O.pfValue*I:O.pfValue*P:0;default:return 0}else return O.units==="px"?O.pfValue:0}var g=h.width.left.value;h.width.left.units==="px"&&h.width.val>0&&(g=g*100/h.width.val);var y=h.width.right.value;h.width.right.units==="px"&&h.width.val>0&&(y=y*100/h.width.val);var v=h.height.top.value;h.height.top.units==="px"&&h.height.val>0&&(v=v*100/h.height.val);var x=h.height.bottom.value;h.height.bottom.units==="px"&&h.height.val>0&&(x=x*100/h.height.val);var k=p(h.width.val-f.w,g,y),_=k.biasDiff,T=k.biasComplementDiff,S=p(h.height.val-f.h,v,x),R=S.biasDiff,A=S.biasComplementDiff;o.autoPadding=m(f.w,f.h,s.pstyle("padding"),s.pstyle("padding-relative-to").value),o.autoWidth=Math.max(f.w,h.width.val),d.x=(-_+f.x1+f.x2+T)/2,o.autoHeight=Math.max(f.h,h.height.val),d.y=(-R+f.y1+f.y2+A)/2}for(var n=0;ne.x2?i:e.x2,e.y1=ne.y2?a:e.y2,e.w=e.x2-e.x1,e.h=e.y2-e.y1)},zp=function(e,r){return r==null?e:Sc(e,r.x1,r.y1,r.x2,r.y2)},R8=function(e,r,n){return Bo(e,r,n)},lR=function(e,r,n){if(!r.cy().headless()){var i=r._private,a=i.rstyle,s=a.arrowWidth/2,o=r.pstyle(n+"-arrow-shape").value,l,u;if(o!=="none"){n==="source"?(l=a.srcX,u=a.srcY):n==="target"?(l=a.tgtX,u=a.tgtY):(l=a.midX,u=a.midY);var h=i.arrowBounds=i.arrowBounds||{},f=h[n]=h[n]||{};f.x1=l-s,f.y1=u-s,f.x2=l+s,f.y2=u+s,f.w=f.x2-f.x1,f.h=f.y2-f.y1,gR(f,1),Sc(e,f.x1,f.y1,f.x2,f.y2)}}},_Y=function(e,r,n){if(!r.cy().headless()){var i;n?i=n+"-":i="";var a=r._private,s=a.rstyle,o=r.pstyle(i+"label").strValue;if(o){var l=r.pstyle("text-halign"),u=r.pstyle("text-valign"),h=R8(s,"labelWidth",n),f=R8(s,"labelHeight",n),d=R8(s,"labelX",n),p=R8(s,"labelY",n),m=r.pstyle(i+"text-margin-x").pfValue,g=r.pstyle(i+"text-margin-y").pfValue,y=r.isEdge(),v=r.pstyle(i+"text-rotation"),x=r.pstyle("text-outline-width").pfValue,k=r.pstyle("text-border-width").pfValue,_=k/2,T=r.pstyle("text-background-padding").pfValue,S=2,R=f,A=h,I=A/2,P=R/2,O,C,N,B;if(y)O=d-I,C=d+I,N=p-P,B=p+P;else{switch(lb(l.value)){case"left":O=d-A,C=d;break;case"center":O=d-I,C=d+I;break;case"right":O=d,C=d+A;break}switch(ub(u.value)){case"top":N=p-R,B=p;break;case"center":N=p-P,B=p+P;break;case"bottom":N=p,B=p+R;break}}var F=m-Math.max(x,_)-T-S,M=m+Math.max(x,_)+T+S,$=g-Math.max(x,_)-T-S,z=g+Math.max(x,_)+T+S;O+=F,C+=M,N+=$,B+=z;var q=n||"main",V=a.labelBounds,U=V[q]=V[q]||{};U.x1=O,U.y1=N,U.x2=C,U.y2=B,U.w=C-O,U.h=B-N,U.leftPad=F,U.rightPad=M,U.topPad=$,U.botPad=z;var J=y&&v.strValue==="autorotate",se=v.pfValue!=null&&v.pfValue!==0;if(J||se){var re=J?R8(a.rstyle,"labelAngle",n):v.pfValue,me=Math.cos(re),ge=Math.sin(re),ye=(O+C)/2,_e=(N+B)/2;if(!y){switch(lb(l.value)){case"left":ye=C;break;case"right":ye=O;break}switch(ub(u.value)){case"top":_e=B;break;case"bottom":_e=N;break}}var ue=function(de,ce){return de=de-ye,ce=ce-_e,{x:de*me-ce*ge+ye,y:de*ge+ce*me+_e}},ie=ue(O,N),le=ue(O,B),oe=ue(C,N),ne=ue(C,B);O=Math.min(ie.x,le.x,oe.x,ne.x),C=Math.max(ie.x,le.x,oe.x,ne.x),N=Math.min(ie.y,le.y,oe.y,ne.y),B=Math.max(ie.y,le.y,oe.y,ne.y)}var pe=q+"Rot",te=V[pe]=V[pe]||{};te.x1=O,te.y1=N,te.x2=C,te.y2=B,te.w=C-O,te.h=B-N,Sc(e,O,N,C,B),Sc(a.labelBounds.all,O,N,C,B)}return e}},jLe=function(e,r){if(!r.cy().headless()){var n=r.pstyle("outline-opacity").value,i=r.pstyle("outline-width").value,a=r.pstyle("outline-offset").value,s=i+a;IDe(e,r,n,s,"outside",s/2)}},IDe=function(e,r,n,i,a,s){if(!(n===0||i<=0||a==="inside")){var o=r.cy(),l=o.renderer(),u=l.nodeShapes[l.getNodeShape(r)];if(u){var h=r.position(),f=h.x,d=h.y,p=r.width(),m=r.height();if(u.hasMiterBounds){a==="center"&&(i/=2);var g=u.miterBounds(f,d,p,m,i);zp(e,g)}else s!=null&&s>0&&yR(e,[s,s,s,s])}}},a9t=function(e,r){if(!r.cy().headless()){var n=r.pstyle("border-opacity").value,i=r.pstyle("border-width").pfValue,a=r.pstyle("border-position").value;IDe(e,r,n,i,a)}},s9t=function(e,r){var n=e._private.cy,i=n.styleEnabled(),a=n.headless(),s=Fo(),o=e._private,l=e.isNode(),u=e.isEdge(),h,f,d,p,m,g,y=o.rstyle,v=l&&i?e.pstyle("bounds-expansion").pfValue:[0],x=function(He){return He.pstyle("display").value!=="none"},k=!i||x(e)&&(!u||x(e.source())&&x(e.target()));if(k){var _=0,T=0;i&&r.includeOverlays&&(_=e.pstyle("overlay-opacity").value,_!==0&&(T=e.pstyle("overlay-padding").value));var S=0,R=0;i&&r.includeUnderlays&&(S=e.pstyle("underlay-opacity").value,S!==0&&(R=e.pstyle("underlay-padding").value));var A=Math.max(T,R),I=0,P=0;if(i&&(I=e.pstyle("width").pfValue,P=I/2),l&&r.includeNodes){var O=e.position();m=O.x,g=O.y;var C=e.outerWidth(),N=C/2,B=e.outerHeight(),F=B/2;h=m-N,f=m+N,d=g-F,p=g+F,Sc(s,h,d,f,p),i&&jLe(s,e),i&&r.includeOutlines&&!a&&jLe(s,e),i&&a9t(s,e)}else if(u&&r.includeEdges)if(i&&!a){var M=e.pstyle("curve-style").strValue;if(h=Math.min(y.srcX,y.midX,y.tgtX),f=Math.max(y.srcX,y.midX,y.tgtX),d=Math.min(y.srcY,y.midY,y.tgtY),p=Math.max(y.srcY,y.midY,y.tgtY),h-=P,f+=P,d-=P,p+=P,Sc(s,h,d,f,p),M==="haystack"){var $=y.haystackPts;if($&&$.length===2){if(h=$[0].x,d=$[0].y,f=$[1].x,p=$[1].y,h>f){var z=h;h=f,f=z}if(d>p){var q=d;d=p,p=q}Sc(s,h-P,d-P,f+P,p+P)}}else if(M==="bezier"||M==="unbundled-bezier"||$p(M,"segments")||$p(M,"taxi")){var V;switch(M){case"bezier":case"unbundled-bezier":V=y.bezierPts;break;case"segments":case"taxi":case"round-segments":case"round-taxi":V=y.linePts;break}if(V!=null)for(var U=0;Uf){var ye=h;h=f,f=ye}if(d>p){var _e=d;d=p,p=_e}h-=P,f+=P,d-=P,p+=P,Sc(s,h,d,f,p)}if(i&&r.includeEdges&&u&&(lR(s,e,"mid-source"),lR(s,e,"mid-target"),lR(s,e,"source"),lR(s,e,"target")),i){var ue=e.pstyle("ghost").value==="yes";if(ue){var ie=e.pstyle("ghost-offset-x").pfValue,le=e.pstyle("ghost-offset-y").pfValue;Sc(s,s.x1+ie,s.y1+le,s.x2+ie,s.y2+le)}}var oe=o.bodyBounds=o.bodyBounds||{};NAe(oe,s),yR(oe,v),gR(oe,1),i&&(h=s.x1,f=s.x2,d=s.y1,p=s.y2,Sc(s,h-A,d-A,f+A,p+A));var ne=o.overlayBounds=o.overlayBounds||{};NAe(ne,s),yR(ne,v),gR(ne,1);var pe=o.labelBounds=o.labelBounds||{};pe.all!=null?$wt(pe.all):pe.all=Fo(),i&&r.includeLabels&&(r.includeMainLabels&&_Y(s,e,null),u&&(r.includeSourceLabels&&_Y(s,e,"source"),r.includeTargetLabels&&_Y(s,e,"target")))}return s.x1=Iu(s.x1),s.y1=Iu(s.y1),s.x2=Iu(s.x2),s.y2=Iu(s.y2),s.w=Iu(s.x2-s.x1),s.h=Iu(s.y2-s.y1),s.w>0&&s.h>0&&k&&(yR(s,v),gR(s,1)),s},MDe=function(e){var r=0,n=function(s){return(s?1:0)<=0;o--)s(o);return this};Kp.removeAllListeners=function(){return this.removeListener("*")};Kp.emit=Kp.trigger=function(t,e,r){var n=this.listeners,i=n.length;return this.emitting++,si(e)||(e=[e]),k9t(this,function(a,s){r!=null&&(n=[{event:s.event,type:s.type,namespace:s.namespace,callback:r}],i=n.length);for(var o=function(){var h=n[l];if(h.type===s.type&&(!h.namespace||h.namespace===s.namespace||h.namespace===b9t)&&a.eventMatches(a.context,h,s)){var f=[s];e!=null&&hwt(f,e),a.beforeEmit(a.context,h,s),h.conf&&h.conf.one&&(a.listeners=a.listeners.filter(function(m){return m!==h}));var d=a.callbackContext(a.context,h,s),p=h.callback.apply(d,f);a.afterEmit(a.context,h,s),p===!1&&(s.stopPropagation(),s.preventDefault())}},l=0;l1&&!s){var o=this.length-1,l=this[o],u=l._private.data.id;this[o]=void 0,this[e]=l,a.set(u,{ele:l,index:e})}return this.length--,this},unmergeOne:function(e){e=e[0];var r=this._private,n=e._private.data.id,i=r.map,a=i.get(n);if(!a)return this;var s=a.index;return this.unmergeAt(s),this},unmerge:function(e){var r=this._private.cy;if(!e)return this;if(e&&yr(e)){var n=e;e=r.mutableElements().filter(n)}for(var i=0;i=0;r--){var n=this[r];e(n)&&this.unmergeAt(r)}return this},map:function(e,r){for(var n=[],i=this,a=0;an&&(n=l,i=o)}return{value:n,ele:i}},min:function(e,r){for(var n=1/0,i,a=this,s=0;s=0&&a"u"?"undefined":Xa(Symbol))!=e&&Xa(Symbol.iterator)!=e;r&&(MR[Symbol.iterator]=function(){var n=this,i={value:void 0,done:!1},a=0,s=this.length;return $Re({next:function(){return a1&&arguments[1]!==void 0?arguments[1]:!0,n=this[0],i=n.cy();if(i.styleEnabled()&&n){n._private.styleDirty&&(n._private.styleDirty=!1,i.style().apply(n));var a=n._private.style[e];return a??(r?i.style().getDefaultProperty(e):null)}},numericStyle:function(e){var r=this[0];if(r.cy().styleEnabled()&&r){var n=r.pstyle(e);return n.pfValue!==void 0?n.pfValue:n.value}},numericStyleUnits:function(e){var r=this[0];if(r.cy().styleEnabled()&&r)return r.pstyle(e).units},renderedStyle:function(e){var r=this.cy();if(!r.styleEnabled())return this;var n=this[0];if(n)return r.style().getRenderedStyle(n,e)},style:function(e,r){var n=this.cy();if(!n.styleEnabled())return this;var i=!1,a=n.style();if(yn(e)){var s=e;a.applyBypass(this,s,i),this.emitAndNotify("style")}else if(yr(e))if(r===void 0){var o=this[0];return o?a.getStylePropertyValue(o,e):void 0}else a.applyBypass(this,e,r,i),this.emitAndNotify("style");else if(e===void 0){var l=this[0];return l?a.getRawStyle(l):void 0}return this},removeStyle:function(e){var r=this.cy();if(!r.styleEnabled())return this;var n=!1,i=r.style(),a=this;if(e===void 0)for(var s=0;s0&&e.push(h[0]),e.push(o[0])}return this.spawn(e,!0).filter(t)},"neighborhood"),closedNeighborhood:function(e){return this.neighborhood().add(this).filter(e)},openNeighborhood:function(e){return this.neighborhood(e)}});Js.neighbourhood=Js.neighborhood;Js.closedNeighbourhood=Js.closedNeighborhood;Js.openNeighbourhood=Js.openNeighborhood;br(Js,{source:Mu(function(e){var r=this[0],n;return r&&(n=r._private.source||r.cy().collection()),n&&e?n.filter(e):n},"source"),target:Mu(function(e){var r=this[0],n;return r&&(n=r._private.target||r.cy().collection()),n&&e?n.filter(e):n},"target"),sources:sRe({attr:"source"}),targets:sRe({attr:"target"})});br(Js,{edgesWith:Mu(oRe(),"edgesWith"),edgesTo:Mu(oRe({thisIsSrc:!0}),"edgesTo")});br(Js,{connectedEdges:Mu(function(t){for(var e=[],r=this,n=0;n0);return s},component:function(){var e=this[0];return e.cy().mutableElements().components(e)[0]}});Js.componentsOf=Js.components;Ps=function(e,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(e===void 0){Mi("A collection must have a reference to the core");return}var a=new Tf,s=!1;if(!r)r=[];else if(r.length>0&&yn(r[0])&&!J8(r[0])){s=!0;for(var o=[],l=new cb,u=0,h=r.length;u0&&arguments[0]!==void 0?arguments[0]:!0,e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,r=this,n=r.cy(),i=n._private,a=[],s=[],o,l=0,u=r.length;l0){for(var q=o.length===r.length?r:new Ps(n,o),V=0;V0&&arguments[0]!==void 0?arguments[0]:!0,e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,r=this,n=[],i={},a=r._private.cy;function s(B){for(var F=B._private.edges,M=0;M0&&(t?O.emitAndNotify("remove"):e&&O.emit("remove"));for(var C=0;Ch&&Math.abs(m.v)>h;);return d?function(g){return l[g*(l.length-1)|0]}:u}})(),pi=function(e,r,n,i){var a=I9t(e,r,n,i);return function(s,o,l){return s+(o-s)*a(l)}},bR={linear:function(e,r,n){return e+(r-e)*n},ease:pi(.25,.1,.25,1),"ease-in":pi(.42,0,1,1),"ease-out":pi(0,0,.58,1),"ease-in-out":pi(.42,0,.58,1),"ease-in-sine":pi(.47,0,.745,.715),"ease-out-sine":pi(.39,.575,.565,1),"ease-in-out-sine":pi(.445,.05,.55,.95),"ease-in-quad":pi(.55,.085,.68,.53),"ease-out-quad":pi(.25,.46,.45,.94),"ease-in-out-quad":pi(.455,.03,.515,.955),"ease-in-cubic":pi(.55,.055,.675,.19),"ease-out-cubic":pi(.215,.61,.355,1),"ease-in-out-cubic":pi(.645,.045,.355,1),"ease-in-quart":pi(.895,.03,.685,.22),"ease-out-quart":pi(.165,.84,.44,1),"ease-in-out-quart":pi(.77,0,.175,1),"ease-in-quint":pi(.755,.05,.855,.06),"ease-out-quint":pi(.23,1,.32,1),"ease-in-out-quint":pi(.86,0,.07,1),"ease-in-expo":pi(.95,.05,.795,.035),"ease-out-expo":pi(.19,1,.22,1),"ease-in-out-expo":pi(1,0,0,1),"ease-in-circ":pi(.6,.04,.98,.335),"ease-out-circ":pi(.075,.82,.165,1),"ease-in-out-circ":pi(.785,.135,.15,.86),spring:function(e,r,n){if(n===0)return bR.linear;var i=M9t(e,r,n);return function(a,s,o){return a+(s-a)*i(o)}},"cubic-bezier":pi};P9t={animate:On.animate(),animation:On.animation(),animated:On.animated(),clearQueue:On.clearQueue(),delay:On.delay(),delayAnimation:On.delayAnimation(),stop:On.stop(),addToAnimationPool:function(e){var r=this;r.styleEnabled()&&r._private.aniEles.merge(e)},stopAnimationLoop:function(){this._private.animationsRunning=!1},startAnimationLoop:function(){var e=this;if(e._private.animationsRunning=!0,!e.styleEnabled())return;function r(){e._private.animationsRunning&&AR(function(a){hRe(a,e),r()})}var n=e.renderer();n&&n.beforeRender?n.beforeRender(function(a,s){hRe(s,e)},n.beforeRenderPriorities.animations):r()}},B9t={qualifierCompare:function(e,r){return e==null||r==null?e==null&&r==null:e.sameText(r)},eventMatches:function(e,r,n){var i=r.qualifier;return i!=null?e!==n.target&&J8(n.target)&&i.matches(n.target):!0},addEventFields:function(e,r){r.cy=e,r.target=e},callbackContext:function(e,r,n){return r.qualifier!=null?n.target:e}},hR=function(e){return yr(e)?new Xp(e):e},HDe={createEmitter:function(){var e=this._private;return e.emitter||(e.emitter=new KR(B9t,this)),this},emitter:function(){return this._private.emitter},on:function(e,r,n){return this.emitter().on(e,hR(r),n),this},removeListener:function(e,r,n){return this.emitter().removeListener(e,hR(r),n),this},removeAllListeners:function(){return this.emitter().removeAllListeners(),this},one:function(e,r,n){return this.emitter().one(e,hR(r),n),this},once:function(e,r,n){return this.emitter().one(e,hR(r),n),this},emit:function(e,r){return this.emitter().emit(e,r),this},emitAndNotify:function(e,r){return this.emit(e),this.notify(e,r),this}};On.eventAliasesOn(HDe);YY={png:function(e){var r=this._private.renderer;return e=e||{},r.png(e)},jpg:function(e){var r=this._private.renderer;return e=e||{},e.bg=e.bg||"#fff",r.jpg(e)}};YY.jpeg=YY.jpg;wR={layout:function(e){var r=this;if(e==null){Mi("Layout options must be specified to make a layout");return}if(e.name==null){Mi("A `name` must be specified to make a layout");return}var n=e.name,i=r.extension("layout",n);if(i==null){Mi("No such layout `"+n+"` found. Did you forget to import it and `cytoscape.use()` it?");return}var a;yr(e.eles)?a=r.$(e.eles):a=e.eles!=null?e.eles:r.$();var s=new i(br({},e,{cy:r,eles:a}));return s}};wR.createLayout=wR.makeLayout=wR.layout;F9t={notify:function(e,r){var n=this._private;if(this.batching()){n.batchNotifications=n.batchNotifications||{};var i=n.batchNotifications[e]=n.batchNotifications[e]||this.collection();r!=null&&i.merge(r);return}if(n.notificationsEnabled){var a=this.renderer();this.destroyed()||!a||a.notify(e,r)}},notifications:function(e){var r=this._private;return e===void 0?r.notificationsEnabled:(r.notificationsEnabled=!!e,this)},noNotifications:function(e){this.notifications(!1),e(),this.notifications(!0)},batching:function(){return this._private.batchCount>0},startBatch:function(){var e=this._private;return e.batchCount==null&&(e.batchCount=0),e.batchCount===0&&(e.batchStyleEles=this.collection(),e.batchNotifications={}),e.batchCount++,this},endBatch:function(){var e=this._private;if(e.batchCount===0)return this;if(e.batchCount--,e.batchCount===0){e.batchStyleEles.updateStyle();var r=this.renderer();Object.keys(e.batchNotifications).forEach(function(n){var i=e.batchNotifications[n];i.empty()?r.notify(n):r.notify(n,i)})}return this},batch:function(e){return this.startBatch(),e(),this.endBatch(),this},batchData:function(e){var r=this;return this.batch(function(){for(var n=Object.keys(e),i=0;i0;)r.removeChild(r.childNodes[0]);e._private.renderer=null,e.mutableElements().forEach(function(n){var i=n._private;i.rscratch={},i.rstyle={},i.animation.current=[],i.animation.queue=[]})},onRender:function(e){return this.on("render",e)},offRender:function(e){return this.off("render",e)}};XY.invalidateDimensions=XY.resize;kR={collection:function(e,r){return yr(e)?this.$(e):Wl(e)?e.collection():si(e)?(r||(r={}),new Ps(this,e,r.unique,r.removed)):new Ps(this)},nodes:function(e){var r=this.$(function(n){return n.isNode()});return e?r.filter(e):r},edges:function(e){var r=this.$(function(n){return n.isEdge()});return e?r.filter(e):r},$:function(e){var r=this._private.elements;return e?r.filter(e):r.spawnSelf()},mutableElements:function(){return this._private.elements}};kR.elements=kR.filter=kR.$;ys={},z8="t",$9t="f";ys.apply=function(t){for(var e=this,r=e._private,n=r.cy,i=n.collection(),a=0;a0;if(d||f&&p){var m=void 0;d&&p||d?m=u.properties:p&&(m=u.mappedProperties);for(var g=0;g1&&(_=1),o.color){var S=n.valueMin[0],R=n.valueMax[0],A=n.valueMin[1],I=n.valueMax[1],P=n.valueMin[2],O=n.valueMax[2],C=n.valueMin[3]==null?1:n.valueMin[3],N=n.valueMax[3]==null?1:n.valueMax[3],B=[Math.round(S+(R-S)*_),Math.round(A+(I-A)*_),Math.round(P+(O-P)*_),Math.round(C+(N-C)*_)];a={bypass:n.bypass,name:n.name,value:B,strValue:"rgb("+B[0]+", "+B[1]+", "+B[2]+")"}}else if(o.number){var F=n.valueMin+(n.valueMax-n.valueMin)*_;a=this.parse(n.name,F,n.bypass,d)}else return!1;if(!a)return g(),!1;a.mapping=n,n=a;break}case s.data:{for(var M=n.field.split("."),$=f.data,z=0;z0&&a>0){for(var o={},l=!1,u=0;u0?t.delayAnimation(s).play().promise().then(k):k()}).then(function(){return t.animation({style:o,duration:a,easing:t.pstyle("transition-timing-function").value,queue:!1}).play().promise()}).then(function(){r.removeBypasses(t,i),t.emitAndNotify("style"),n.transitioning=!1})}else n.transitioning&&(this.removeBypasses(t,i),t.emitAndNotify("style"),n.transitioning=!1)};ys.checkTrigger=function(t,e,r,n,i,a){var s=this.properties[e],o=i(s);t.removed()||o!=null&&o(r,n,t)&&a(s)};ys.checkZOrderTrigger=function(t,e,r,n){var i=this;this.checkTrigger(t,e,r,n,function(a){return a.triggersZOrder},function(){i._private.cy.notify("zorder",t)})};ys.checkBoundsTrigger=function(t,e,r,n){this.checkTrigger(t,e,r,n,function(i){return i.triggersBounds},function(i){t.dirtyCompoundBoundsCache(),t.dirtyBoundingBoxCache()})};ys.checkConnectedEdgesBoundsTrigger=function(t,e,r,n){this.checkTrigger(t,e,r,n,function(i){return i.triggersBoundsOfConnectedEdges},function(i){t.connectedEdges().forEach(function(a){a.dirtyBoundingBoxCache()})})};ys.checkParallelEdgesBoundsTrigger=function(t,e,r,n){this.checkTrigger(t,e,r,n,function(i){return i.triggersBoundsOfParallelEdges},function(i){t.parallelEdges().forEach(function(a){a.dirtyBoundingBoxCache()})})};ys.checkTriggers=function(t,e,r,n){t.dirtyStyleCache(),this.checkZOrderTrigger(t,e,r,n),this.checkBoundsTrigger(t,e,r,n),this.checkConnectedEdgesBoundsTrigger(t,e,r,n),this.checkParallelEdgesBoundsTrigger(t,e,r,n)};sw={};sw.applyBypass=function(t,e,r,n){var i=this,a=[],s=!0;if(e==="*"||e==="**"){if(r!==void 0)for(var o=0;oi.length?n=n.substr(i.length):n=""}function l(){a.length>s.length?a=a.substr(s.length):a=""}for(;;){var u=n.match(/^\s*$/);if(u)break;var h=n.match(/^\s*((?:.|\s)+?)\s*\{((?:.|\s)+?)\}/);if(!h){Pn("Halting stylesheet parsing: String stylesheet contains more to parse but no selector and block found in: "+n);break}i=h[0];var f=h[1];if(f!=="core"){var d=new Xp(f);if(d.invalid){Pn("Skipping parsing of block: Invalid selector found in string stylesheet: "+f),o();continue}}var p=h[2],m=!1;a=p;for(var g=[];;){var y=a.match(/^\s*$/);if(y)break;var v=a.match(/^\s*(.+?)\s*:\s*(.+?)(?:\s*;|\s*$)/);if(!v){Pn("Skipping parsing of block: Invalid formatting of style property and value definitions found in:"+p),m=!0;break}s=v[0];var x=v[1],k=v[2],_=e.properties[x];if(!_){Pn("Skipping property: Invalid property name in: "+s),l();continue}var T=r.parse(x,k);if(!T){Pn("Skipping property: Invalid property definition in: "+s),l();continue}g.push({name:x,val:k}),l()}if(m){o();break}r.selector(f);for(var S=0;S=7&&e[0]==="d"&&(h=new RegExp(o.data.regex).exec(e))){if(r)return!1;var d=o.data;return{name:t,value:h,strValue:""+e,mapped:d,field:h[1],bypass:r}}else if(e.length>=10&&e[0]==="m"&&(f=new RegExp(o.mapData.regex).exec(e))){if(r||u.multiple)return!1;var p=o.mapData;if(!(u.color||u.number))return!1;var m=this.parse(t,f[4]);if(!m||m.mapped)return!1;var g=this.parse(t,f[5]);if(!g||g.mapped)return!1;if(m.pfValue===g.pfValue||m.strValue===g.strValue)return Pn("`"+t+": "+e+"` is not a valid mapper because the output range is zero; converting to `"+t+": "+m.strValue+"`"),this.parse(t,m.strValue);if(u.color){var y=m.value,v=g.value,x=y[0]===v[0]&&y[1]===v[1]&&y[2]===v[2]&&(y[3]===v[3]||(y[3]==null||y[3]===1)&&(v[3]==null||v[3]===1));if(x)return!1}return{name:t,value:f,strValue:""+e,mapped:p,field:f[1],fieldMin:parseFloat(f[2]),fieldMax:parseFloat(f[3]),valueMin:m.value,valueMax:g.value,bypass:r}}}if(u.multiple&&n!=="multiple"){var k;if(l?k=e.split(/\s+/):si(e)?k=e:k=[e],u.evenMultiple&&k.length%2!==0)return null;for(var _=[],T=[],S=[],R="",A=!1,I=0;I0?" ":"")+P.strValue}return u.validate&&!u.validate(_,T)?null:u.singleEnum&&A?_.length===1&&yr(_[0])?{name:t,value:_[0],strValue:_[0],bypass:r}:null:{name:t,value:_,pfValue:S,strValue:R,bypass:r,units:T}}var O=function(){for(var ue=0;ueu.max||u.strictMax&&e===u.max))return null;var M={name:t,value:e,strValue:""+e+(C||""),units:C,bypass:r};return u.unitless||C!=="px"&&C!=="em"?M.pfValue=e:M.pfValue=C==="px"||!C?e:this.getEmSizeInPixels()*e,(C==="ms"||C==="s")&&(M.pfValue=C==="ms"?e:1e3*e),(C==="deg"||C==="rad")&&(M.pfValue=C==="rad"?e:Pwt(e)),C==="%"&&(M.pfValue=e/100),M}else if(u.propList){var $=[],z=""+e;if(z!=="none"){for(var q=z.split(/\s*,\s*|\s+/),V=0;V0&&o>0&&!isNaN(n.w)&&!isNaN(n.h)&&n.w>0&&n.h>0){l=Math.min((s-2*r)/n.w,(o-2*r)/n.h),l=l>this._private.maxZoom?this._private.maxZoom:l,l=l=n.minZoom&&(n.maxZoom=r),this},minZoom:function(e){return e===void 0?this._private.minZoom:this.zoomRange({min:e})},maxZoom:function(e){return e===void 0?this._private.maxZoom:this.zoomRange({max:e})},getZoomedViewport:function(e){var r=this._private,n=r.pan,i=r.zoom,a,s,o=!1;if(r.zoomingEnabled||(o=!0),Ht(e)?s=e:yn(e)&&(s=e.level,e.position!=null?a=UR(e.position,i,n):e.renderedPosition!=null&&(a=e.renderedPosition),a!=null&&!r.panningEnabled&&(o=!0)),s=s>r.maxZoom?r.maxZoom:s,s=sr.maxZoom||!r.zoomingEnabled?s=!0:(r.zoom=l,a.push("zoom"))}if(i&&(!s||!e.cancelOnFailedZoom)&&r.panningEnabled){var u=e.pan;Ht(u.x)&&(r.pan.x=u.x,o=!1),Ht(u.y)&&(r.pan.y=u.y,o=!1),o||a.push("pan")}return a.length>0&&(a.push("viewport"),this.emit(a.join(" ")),this.notify("viewport")),this},center:function(e){var r=this.getCenterPan(e);return r&&(this._private.pan=r,this.emit("pan viewport"),this.notify("viewport")),this},getCenterPan:function(e,r){if(this._private.panningEnabled){if(yr(e)){var n=e;e=this.mutableElements().filter(n)}else Wl(e)||(e=this.mutableElements());if(e.length!==0){var i=e.boundingBox(),a=this.width(),s=this.height();r=r===void 0?this._private.zoom:r;var o={x:(a-r*(i.x1+i.x2))/2,y:(s-r*(i.y1+i.y2))/2};return o}}},reset:function(){return!this._private.panningEnabled||!this._private.zoomingEnabled?this:(this.viewport({pan:{x:0,y:0},zoom:1}),this)},invalidateSize:function(){this._private.sizeCache=null},size:function(){var e=this._private,r=e.container,n=this;return e.sizeCache=e.sizeCache||(r?(function(){var i=n.window().getComputedStyle(r),a=function(o){return parseFloat(i.getPropertyValue(o))};return{width:r.clientWidth-a("padding-left")-a("padding-right"),height:r.clientHeight-a("padding-top")-a("padding-bottom")}})():{width:1,height:1})},width:function(){return this.size().width},height:function(){return this.size().height},extent:function(){var e=this._private.pan,r=this._private.zoom,n=this.renderedExtent(),i={x1:(n.x1-e.x)/r,x2:(n.x2-e.x)/r,y1:(n.y1-e.y)/r,y2:(n.y2-e.y)/r};return i.w=i.x2-i.x1,i.h=i.y2-i.y1,i},renderedExtent:function(){var e=this.width(),r=this.height();return{x1:0,y1:0,x2:e,y2:r,w:e,h:r}},multiClickDebounceTime:function(e){if(e)this._private.multiClickDebounceTime=e;else return this._private.multiClickDebounceTime;return this}};vg.centre=vg.center;vg.autolockNodes=vg.autolock;vg.autoungrabifyNodes=vg.autoungrabify;j8={data:On.data({field:"data",bindingEvent:"data",allowBinding:!0,allowSetting:!0,settingEvent:"data",settingTriggersEvent:!0,triggerFnName:"trigger",allowGetting:!0,updateStyle:!0}),removeData:On.removeData({field:"data",event:"data",triggerFnName:"trigger",triggerEvent:!0,updateStyle:!0}),scratch:On.data({field:"scratch",bindingEvent:"scratch",allowBinding:!0,allowSetting:!0,settingEvent:"scratch",settingTriggersEvent:!0,triggerFnName:"trigger",allowGetting:!0,updateStyle:!0}),removeScratch:On.removeData({field:"scratch",event:"scratch",triggerFnName:"trigger",triggerEvent:!0,updateStyle:!0})};j8.attr=j8.data;j8.removeAttr=j8.removeData;K8=function(e){var r=this;e=br({},e);var n=e.container;n&&!_R(n)&&_R(n[0])&&(n=n[0]);var i=n?n._cyreg:null;i=i||{},i&&i.cy&&(i.cy.destroy(),i={});var a=i.readies=i.readies||[];n&&(n._cyreg=i),i.cy=r;var s=Wa!==void 0&&n!==void 0&&!e.headless,o=e;o.layout=br({name:s?"grid":"null"},o.layout),o.renderer=br({name:s?"canvas":"null"},o.renderer);var l=function(m,g,y){return g!==void 0?g:y!==void 0?y:m},u=this._private={container:n,ready:!1,options:o,elements:new Ps(this),listeners:[],aniEles:new Ps(this),data:o.data||{},scratch:{},layout:null,renderer:null,destroyed:!1,notificationsEnabled:!0,minZoom:1e-50,maxZoom:1e50,zoomingEnabled:l(!0,o.zoomingEnabled),userZoomingEnabled:l(!0,o.userZoomingEnabled),panningEnabled:l(!0,o.panningEnabled),userPanningEnabled:l(!0,o.userPanningEnabled),boxSelectionEnabled:l(!0,o.boxSelectionEnabled),autolock:l(!1,o.autolock,o.autolockNodes),autoungrabify:l(!1,o.autoungrabify,o.autoungrabifyNodes),autounselectify:l(!1,o.autounselectify),styleEnabled:o.styleEnabled===void 0?s:o.styleEnabled,zoom:Ht(o.zoom)?o.zoom:1,pan:{x:yn(o.pan)&&Ht(o.pan.x)?o.pan.x:0,y:yn(o.pan)&&Ht(o.pan.y)?o.pan.y:0},animation:{current:[],queue:[]},hasCompoundNodes:!1,multiClickDebounceTime:l(250,o.multiClickDebounceTime)};this.createEmitter(),this.selectionType(o.selectionType),this.zoomRange({min:o.minZoom,max:o.maxZoom});var h=function(m,g){var y=m.some(R8t);if(y)return hb.all(m).then(g);g(m)};u.styleEnabled&&r.setStyle([]);var f=br({},o,o.renderer);r.initRenderer(f);var d=function(m,g,y){r.notifications(!1);var v=r.mutableElements();v.length>0&&v.remove(),m!=null&&(yn(m)||si(m))&&r.add(m),r.one("layoutready",function(k){r.notifications(!0),r.emit(k),r.one("load",g),r.emitAndNotify("load")}).one("layoutstop",function(){r.one("done",y),r.emit("done")});var x=br({},r._private.options.layout);x.eles=r.elements(),r.layout(x).run()};h([o.style,o.elements],function(p){var m=p[0],g=p[1];u.styleEnabled&&r.style().append(m),d(g,function(){r.startAnimationLoop(),u.ready=!0,Vi(o.ready)&&r.on("ready",o.ready);for(var y=0;y0,o=!!t.boundingBox,l=Fo(o?t.boundingBox:structuredClone(e.extent())),u;if(Wl(t.roots))u=t.roots;else if(si(t.roots)){for(var h=[],f=0;f0;){var B=N(),F=I(B,O);if(F)B.outgoers().filter(function(st){return st.isNode()&&r.has(st)}).forEach(C);else if(F===null){Pn("Detected double maximal shift for node `"+B.id()+"`. Bailing maximal adjustment due to cycle. Use `options.maximal: true` only on DAGs.");break}}}var M=0;if(t.avoidOverlap)for(var $=0;$0&&v[0].length<=3?Xe/2:0),Pe=2*Math.PI/v[Ge].length*rt;return Ge===0&&v[0].length===1&&(Ze=1),{x:oe.x+Ze*Math.cos(Pe),y:oe.y+Ze*Math.sin(Pe)}}else{var Re=v[Ge].length,Ve=Math.max(Re===1?0:o?(l.w-t.padding*2-ne.w)/((t.grid?te:Re)-1):(l.w-t.padding*2-ne.w)/((t.grid?te:Re)+1),M),ke={x:oe.x+(rt+1-(Re+1)/2)*Ve,y:oe.y+(Ge+1-(me+1)/2)*pe};return ke}},de={downward:0,leftward:90,upward:180,rightward:-90};Object.keys(de).indexOf(t.direction)===-1&&Mi("Invalid direction '".concat(t.direction,"' specified for breadthfirst layout. Valid values are: ").concat(Object.keys(de).join(", ")));var ce=function(Ae){return awt(He(Ae),l,de[t.direction])};return r.nodes().layoutPositions(this,t,ce),this};V9t={fit:!0,padding:30,boundingBox:void 0,avoidOverlap:!0,nodeDimensionsIncludeLabels:!1,spacingFactor:void 0,radius:void 0,startAngle:3/2*Math.PI,sweep:void 0,clockwise:!0,sort:void 0,animate:!1,animationDuration:500,animationEasing:void 0,animateFilter:function(e,r){return!0},ready:void 0,stop:void 0,transform:function(e,r){return r}};WDe.prototype.run=function(){var t=this.options,e=t,r=t.cy,n=e.eles,i=e.counterclockwise!==void 0?!e.counterclockwise:e.clockwise,a=n.nodes().not(":parent");e.sort&&(a=a.sort(e.sort));for(var s=Fo(e.boundingBox?e.boundingBox:{x1:0,y1:0,w:r.width(),h:r.height()}),o={x:s.x1+s.w/2,y:s.y1+s.h/2},l=e.sweep===void 0?2*Math.PI-2*Math.PI/a.length:e.sweep,u=l/Math.max(1,a.length-1),h,f=0,d=0;d1&&e.avoidOverlap){f*=1.75;var v=Math.cos(u)-Math.cos(0),x=Math.sin(u)-Math.sin(0),k=Math.sqrt(f*f/(v*v+x*x));h=Math.max(k,h)}var _=function(S,R){var A=e.startAngle+R*u*(i?1:-1),I=h*Math.cos(A),P=h*Math.sin(A),O={x:o.x+I,y:o.y+P};return O};return n.nodes().layoutPositions(this,e,_),this};W9t={fit:!0,padding:30,startAngle:3/2*Math.PI,sweep:void 0,clockwise:!0,equidistant:!1,minNodeSpacing:10,boundingBox:void 0,avoidOverlap:!0,nodeDimensionsIncludeLabels:!1,height:void 0,width:void 0,spacingFactor:void 0,concentric:function(e){return e.degree()},levelWidth:function(e){return e.maxDegree()/4},animate:!1,animationDuration:500,animationEasing:void 0,animateFilter:function(e,r){return!0},ready:void 0,stop:void 0,transform:function(e,r){return r}};YDe.prototype.run=function(){for(var t=this.options,e=t,r=e.counterclockwise!==void 0?!e.counterclockwise:e.clockwise,n=t.cy,i=e.eles,a=i.nodes().not(":parent"),s=Fo(e.boundingBox?e.boundingBox:{x1:0,y1:0,w:n.width(),h:n.height()}),o={x:s.x1+s.w/2,y:s.y1+s.h/2},l=[],u=0,h=0;h0){var T=Math.abs(x[0].value-_.value);T>=y&&(x=[],v.push(x))}x.push(_)}var S=u+e.minNodeSpacing;if(!e.avoidOverlap){var R=v.length>0&&v[0].length>1,A=Math.min(s.w,s.h)/2-S,I=A/(v.length+R?1:0);S=Math.min(S,I)}for(var P=0,O=0;O1&&e.avoidOverlap){var F=Math.cos(B)-Math.cos(0),M=Math.sin(B)-Math.sin(0),$=Math.sqrt(S*S/(F*F+M*M));P=Math.max($,P)}C.r=P,P+=S}if(e.equidistant){for(var z=0,q=0,V=0;V=t.numIter||(J9t(n,t),n.temperature=n.temperature*t.coolingFactor,n.temperature=t.animationThreshold&&a(),AR(h)}};h()}else{for(;u;)u=s(l),l++;pRe(n,t),o()}return this};tD.prototype.stop=function(){return this.stopped=!0,this.thread&&this.thread.stop(),this.emit("layoutstop"),this};tD.prototype.destroy=function(){return this.thread&&this.thread.stop(),this};X9t=function(e,r,n){for(var i=n.eles.edges(),a=n.eles.nodes(),s=Fo(n.boundingBox?n.boundingBox:{x1:0,y1:0,w:e.width(),h:e.height()}),o={isCompound:e.hasCompoundNodes(),layoutNodes:[],idToIndex:{},nodeSize:a.size(),graphSet:[],indexToGraph:[],layoutEdges:[],edgeSize:i.size(),temperature:n.initialTemp,clientWidth:s.w,clientHeight:s.h,boundingBox:s},l=n.eles.components(),u={},h=0;h0){o.graphSet.push(A);for(var h=0;hi.count?0:i.graph},XDe=function(e,r,n,i){var a=i.graphSet[n];if(-10)var f=i.nodeOverlap*h,d=Math.sqrt(o*o+l*l),p=f*o/d,m=f*l/d;else var g=OR(e,o,l),y=OR(r,-1*o,-1*l),v=y.x-g.x,x=y.y-g.y,k=v*v+x*x,d=Math.sqrt(k),f=(e.nodeRepulsion+r.nodeRepulsion)/k,p=f*v/d,m=f*x/d;e.isLocked||(e.offsetX-=p,e.offsetY-=m),r.isLocked||(r.offsetX+=p,r.offsetY+=m)}},rEt=function(e,r,n,i){if(n>0)var a=e.maxX-r.minX;else var a=r.maxX-e.minX;if(i>0)var s=e.maxY-r.minY;else var s=r.maxY-e.minY;return a>=0&&s>=0?Math.sqrt(a*a+s*s):0},OR=function(e,r,n){var i=e.positionX,a=e.positionY,s=e.height||1,o=e.width||1,l=n/r,u=s/o,h={};return r===0&&0n?(h.x=i,h.y=a+s/2,h):0r&&-1*u<=l&&l<=u?(h.x=i-o/2,h.y=a-o*n/2/r,h):0=u)?(h.x=i+s*r/2/n,h.y=a+s/2,h):(0>n&&(l<=-1*u||l>=u)&&(h.x=i-s*r/2/n,h.y=a-s/2),h)},nEt=function(e,r){for(var n=0;nn){var y=r.gravity*p/g,v=r.gravity*m/g;d.offsetX+=y,d.offsetY+=v}}}}},aEt=function(e,r){var n=[],i=0,a=-1;for(n.push.apply(n,e.graphSet[0]),a+=e.graphSet[0].length;i<=a;){var s=n[i++],o=e.idToIndex[s],l=e.layoutNodes[o],u=l.children;if(0n)var a={x:n*e/i,y:n*r/i};else var a={x:e,y:r};return a},KDe=function(e,r){var n=e.parentId;if(n!=null){var i=r.layoutNodes[r.idToIndex[n]],a=!1;if((i.maxX==null||e.maxX+i.padRight>i.maxX)&&(i.maxX=e.maxX+i.padRight,a=!0),(i.minX==null||e.minX-i.padLefti.maxY)&&(i.maxY=e.maxY+i.padBottom,a=!0),(i.minY==null||e.minY-i.padTopv&&(m+=y+r.componentSpacing,p=0,g=0,y=0)}}},lEt={fit:!0,padding:30,boundingBox:void 0,avoidOverlap:!0,avoidOverlapPadding:10,nodeDimensionsIncludeLabels:!1,spacingFactor:void 0,condense:!1,rows:void 0,cols:void 0,position:function(e){},sort:void 0,animate:!1,animationDuration:500,animationEasing:void 0,animateFilter:function(e,r){return!0},ready:void 0,stop:void 0,transform:function(e,r){return r}};ZDe.prototype.run=function(){var t=this.options,e=t,r=t.cy,n=e.eles,i=n.nodes().not(":parent");e.sort&&(i=i.sort(e.sort));var a=Fo(e.boundingBox?e.boundingBox:{x1:0,y1:0,w:r.width(),h:r.height()});if(a.h===0||a.w===0)n.nodes().layoutPositions(this,e,function(se){return{x:a.x1,y:a.y1}});else{var s=i.size(),o=Math.sqrt(s*a.h/a.w),l=Math.round(o),u=Math.round(a.w/a.h*o),h=function(re){if(re==null)return Math.min(l,u);var me=Math.min(l,u);me==l?l=re:u=re},f=function(re){if(re==null)return Math.max(l,u);var me=Math.max(l,u);me==l?l=re:u=re},d=e.rows,p=e.cols!=null?e.cols:e.columns;if(d!=null&&p!=null)l=d,u=p;else if(d!=null&&p==null)l=d,u=Math.ceil(s/l);else if(d==null&&p!=null)u=p,l=Math.ceil(s/u);else if(u*l>s){var m=h(),g=f();(m-1)*g>=s?h(m-1):(g-1)*m>=s&&f(g-1)}else for(;u*l=s?f(v+1):h(y+1)}var x=a.w/u,k=a.h/l;if(e.condense&&(x=0,k=0),e.avoidOverlap)for(var _=0;_=u&&(F=0,B++)},$={},z=0;z(F=Kwt(t,e,M[$],M[$+1],M[$+2],M[$+3])))return y(R,F),!0}else if(I.edgeType==="bezier"||I.edgeType==="multibezier"||I.edgeType==="self"||I.edgeType==="compound"){for(var M=I.allpts,$=0;$+5(F=jwt(t,e,M[$],M[$+1],M[$+2],M[$+3],M[$+4],M[$+5])))return y(R,F),!0}for(var z=z||A.source,q=q||A.target,V=i.getArrowWidth(P,O),U=[{name:"source",x:I.arrowStartX,y:I.arrowStartY,angle:I.srcArrowAngle},{name:"target",x:I.arrowEndX,y:I.arrowEndY,angle:I.tgtArrowAngle},{name:"mid-source",x:I.midX,y:I.midY,angle:I.midsrcArrowAngle},{name:"mid-target",x:I.midX,y:I.midY,angle:I.midtgtArrowAngle}],$=0;$0&&(v(z),v(q))}function k(R,A,I){return Bo(R,A,I)}function _(R,A){var I=R._private,P=d,O;A?O=A+"-":O="",R.boundingBox();var C=I.labelBounds[A||"main"],N=R.pstyle(O+"label").value,B=R.pstyle("text-events").strValue==="yes";if(!(!B||!N)){var F=k(I.rscratch,"labelX",A),M=k(I.rscratch,"labelY",A),$=k(I.rscratch,"labelAngle",A),z=R.pstyle(O+"text-margin-x").pfValue,q=R.pstyle(O+"text-margin-y").pfValue,V=C.x1-P-z,U=C.x2+P-z,J=C.y1-P-q,se=C.y2+P-q;if($){var re=Math.cos($),me=Math.sin($),ge=function(ne,pe){return ne=ne-F,pe=pe-M,{x:ne*re-pe*me+F,y:ne*me+pe*re+M}},ye=ge(V,J),_e=ge(V,se),ue=ge(U,J),ie=ge(U,se),le=[ye.x+z,ye.y+q,ue.x+z,ue.y+q,ie.x+z,ie.y+q,_e.x+z,_e.y+q];if(gl(t,e,le))return y(R),!0}else if(Gp(C,t,e))return y(R),!0}}for(var T=s.length-1;T>=0;T--){var S=s[T];S.isNode()?v(S)||_(S):x(S)||_(S)||_(S,"source")||_(S,"target")}return o};bg.getAllInBox=function(t,e,r,n){var i=this.getCachedZSortedEles().interactive,a=this.cy.zoom(),s=2/a,o=[],l=Math.min(t,r),u=Math.max(t,r),h=Math.min(e,n),f=Math.max(e,n);t=l,r=u,e=h,n=f;var d=Fo({x1:t,y1:e,x2:r,y2:n}),p=[{x:d.x1,y:d.y1},{x:d.x2,y:d.y1},{x:d.x2,y:d.y2},{x:d.x1,y:d.y2}],m=[[p[0],p[1]],[p[1],p[2]],[p[2],p[3]],[p[3],p[0]]];function g(ne,pe,te){return Bo(ne,pe,te)}function y(ne,pe){var te=ne._private,He=s,de="";ne.boundingBox();var ce=te.labelBounds.main;if(!ce)return null;var st=g(te.rscratch,"labelX",pe),Ae=g(te.rscratch,"labelY",pe),Ye=g(te.rscratch,"labelAngle",pe),Ge=ne.pstyle(de+"text-margin-x").pfValue,rt=ne.pstyle(de+"text-margin-y").pfValue,Xe=ce.x1-He-Ge,Ze=ce.x2+He-Ge,Pe=ce.y1-He-rt,Re=ce.y2+He-rt;if(Ye){var Ve=Math.cos(Ye),ke=Math.sin(Ye),xe=function(ve,K){return ve=ve-st,K=K-Ae,{x:ve*Ve-K*ke+st,y:ve*ke+K*Ve+Ae}};return[xe(Xe,Pe),xe(Ze,Pe),xe(Ze,Re),xe(Xe,Re)]}else return[{x:Xe,y:Pe},{x:Ze,y:Pe},{x:Ze,y:Re},{x:Xe,y:Re}]}function v(ne,pe,te,He){function de(ce,st,Ae){return(Ae.y-ce.y)*(st.x-ce.x)>(st.y-ce.y)*(Ae.x-ce.x)}return de(ne,te,He)!==de(pe,te,He)&&de(ne,pe,te)!==de(ne,pe,He)}for(var x=0;x0?-(Math.PI-e.ang):Math.PI+e.ang},pEt=function(e,r,n,i,a){if(e!==xRe?bRe(r,e,nh):dEt(Du,nh),bRe(r,n,Du),yRe=nh.nx*Du.ny-nh.ny*Du.nx,vRe=nh.nx*Du.nx-nh.ny*-Du.ny,kf=Math.asin(Math.max(-1,Math.min(1,yRe))),Math.abs(kf)<1e-6){jY=r.x,KY=r.y,hg=X4=0;return}dg=1,TR=!1,vRe<0?kf<0?kf=Math.PI+kf:(kf=Math.PI-kf,dg=-1,TR=!0):kf>0&&(dg=-1,TR=!0),r.radius!==void 0?X4=r.radius:X4=i,og=kf/2,fR=Math.min(nh.len/2,Du.len/2),a?(th=Math.abs(Math.cos(og)*X4/Math.sin(og)),th>fR?(th=fR,hg=Math.abs(th*Math.sin(og)/Math.cos(og))):hg=X4):(th=Math.min(fR,X4),hg=Math.abs(th*Math.sin(og)/Math.cos(og))),ZY=r.x+Du.nx*th,QY=r.y+Du.ny*th,jY=ZY-Du.ny*hg*dg,KY=QY+Du.nx*hg*dg,tIe=r.x+nh.nx*th,rIe=r.y+nh.ny*th,xRe=r};Z8=.01,mEt=Math.sqrt(2*Z8),to={};to.findMidptPtsEtc=function(t,e){var r=e.posPts,n=e.intersectionPts,i=e.vectorNormInverse,a,s=t.pstyle("source-endpoint"),o=t.pstyle("target-endpoint"),l=s.units!=null&&o.units!=null,u=function(T,S,R,A){var I=A-S,P=R-T,O=Math.sqrt(P*P+I*I);return{x:-I/O,y:P/O}},h=t.pstyle("edge-distances").value;switch(h){case"node-position":a=r;break;case"intersection":a=n;break;case"endpoints":{if(l){var f=this.manualEndptToPx(t.source()[0],s),d=Da(f,2),p=d[0],m=d[1],g=this.manualEndptToPx(t.target()[0],o),y=Da(g,2),v=y[0],x=y[1],k={x1:p,y1:m,x2:v,y2:x};i=u(p,m,v,x),a=k}else Pn("Edge ".concat(t.id()," has edge-distances:endpoints specified without manual endpoints specified via source-endpoint and target-endpoint. Falling back on edge-distances:intersection (default).")),a=n;break}}return{midptPts:a,vectorNormInverse:i}};to.findHaystackPoints=function(t){for(var e=0;e0?Math.max(K-we,0):Math.min(K+we,0)},N=C(P,A),B=C(O,I),F=!1;x===u?v=Math.abs(N)>Math.abs(B)?i:n:x===l||x===o?(v=n,F=!0):(x===a||x===s)&&(v=i,F=!0);var M=v===n,$=M?B:N,z=M?O:P,q=fX(z),V=!1;!(F&&(_||S))&&(x===o&&z<0||x===l&&z>0||x===a&&z>0||x===s&&z<0)&&(q*=-1,$=q*Math.abs($),V=!0);var U;if(_){var J=T<0?1+T:T;U=J*$}else{var se=T<0?$:0;U=se+T*q}var re=function(K){return Math.abs(K)=Math.abs($)},me=re(U),ge=re(Math.abs($)-Math.abs(U)),ye=me||ge;if(ye&&!V)if(M){var _e=Math.abs(z)<=d/2,ue=Math.abs(P)<=p/2;if(_e){var ie=(h.x1+h.x2)/2,le=h.y1,oe=h.y2;r.segpts=[ie,le,ie,oe]}else if(ue){var ne=(h.y1+h.y2)/2,pe=h.x1,te=h.x2;r.segpts=[pe,ne,te,ne]}else r.segpts=[h.x1,h.y2]}else{var He=Math.abs(z)<=f/2,de=Math.abs(O)<=m/2;if(He){var ce=(h.y1+h.y2)/2,st=h.x1,Ae=h.x2;r.segpts=[st,ce,Ae,ce]}else if(de){var Ye=(h.x1+h.x2)/2,Ge=h.y1,rt=h.y2;r.segpts=[Ye,Ge,Ye,rt]}else r.segpts=[h.x2,h.y1]}else if(M){var Xe=h.y1+U+(y?d/2*q:0),Ze=h.x1,Pe=h.x2;r.segpts=[Ze,Xe,Pe,Xe]}else{var Re=h.x1+U+(y?f/2*q:0),Ve=h.y1,ke=h.y2;r.segpts=[Re,Ve,Re,ke]}if(r.isRound){var xe=t.pstyle("taxi-radius").value,H=t.pstyle("radius-type").value[0]==="arc-radius";r.radii=new Array(r.segpts.length/2).fill(xe),r.isArcRadius=new Array(r.segpts.length/2).fill(H)}};to.tryToCorrectInvalidPoints=function(t,e){var r=t._private.rscratch;if(r.edgeType==="bezier"){var n=e.srcPos,i=e.tgtPos,a=e.srcW,s=e.srcH,o=e.tgtW,l=e.tgtH,u=e.srcShape,h=e.tgtShape,f=e.srcCornerRadius,d=e.tgtCornerRadius,p=e.srcRs,m=e.tgtRs,g=!Ht(r.startX)||!Ht(r.startY),y=!Ht(r.arrowStartX)||!Ht(r.arrowStartY),v=!Ht(r.endX)||!Ht(r.endY),x=!Ht(r.arrowEndX)||!Ht(r.arrowEndY),k=3,_=this.getArrowWidth(t.pstyle("width").pfValue,t.pstyle("arrow-scale").value)*this.arrowShapeWidth,T=k*_,S=gg({x:r.ctrlpts[0],y:r.ctrlpts[1]},{x:r.startX,y:r.startY}),R=Sz.poolIndex()){var q=$;$=z,z=q}var V=N.srcPos=$.position(),U=N.tgtPos=z.position(),J=N.srcW=$.outerWidth(),se=N.srcH=$.outerHeight(),re=N.tgtW=z.outerWidth(),me=N.tgtH=z.outerHeight(),ge=N.srcShape=r.nodeShapes[e.getNodeShape($)],ye=N.tgtShape=r.nodeShapes[e.getNodeShape(z)],_e=N.srcCornerRadius=$.pstyle("corner-radius").value==="auto"?"auto":$.pstyle("corner-radius").pfValue,ue=N.tgtCornerRadius=z.pstyle("corner-radius").value==="auto"?"auto":z.pstyle("corner-radius").pfValue,ie=N.tgtRs=z._private.rscratch,le=N.srcRs=$._private.rscratch;N.dirCounts={north:0,west:0,south:0,east:0,northwest:0,southwest:0,northeast:0,southeast:0};for(var oe=0;oe=mEt||(Pe=Math.sqrt(Math.max(Ze*Ze,Z8)+Math.max(Xe*Xe,Z8)));var Re=N.vector={x:Ze,y:Xe},Ve=N.vectorNorm={x:Re.x/Pe,y:Re.y/Pe},ke={x:-Ve.y,y:Ve.x};N.nodesOverlap=!Ht(Pe)||ye.checkPoint(ce[0],ce[1],0,re,me,U.x,U.y,ue,ie)||ge.checkPoint(Ae[0],Ae[1],0,J,se,V.x,V.y,_e,le),N.vectorNormInverse=ke,B={nodesOverlap:N.nodesOverlap,dirCounts:N.dirCounts,calculatedIntersection:!0,hasBezier:N.hasBezier,hasUnbundled:N.hasUnbundled,eles:N.eles,srcPos:U,srcRs:ie,tgtPos:V,tgtRs:le,srcW:re,srcH:me,tgtW:J,tgtH:se,srcIntn:Ye,tgtIntn:st,srcShape:ye,tgtShape:ge,posPts:{x1:rt.x2,y1:rt.y2,x2:rt.x1,y2:rt.y1},intersectionPts:{x1:Ge.x2,y1:Ge.y2,x2:Ge.x1,y2:Ge.y1},vector:{x:-Re.x,y:-Re.y},vectorNorm:{x:-Ve.x,y:-Ve.y},vectorNormInverse:{x:-ke.x,y:-ke.y}}}var xe=de?B:N;pe.nodesOverlap=xe.nodesOverlap,pe.srcIntn=xe.srcIntn,pe.tgtIntn=xe.tgtIntn,pe.isRound=te.startsWith("round"),i&&($.isParent()||$.isChild()||z.isParent()||z.isChild())&&($.parents().anySame(z)||z.parents().anySame($)||$.same(z)&&$.isParent())?e.findCompoundLoopPoints(ne,xe,oe,He):$===z?e.findLoopPoints(ne,xe,oe,He):te.endsWith("segments")?e.findSegmentsPoints(ne,xe):te.endsWith("taxi")?e.findTaxiPoints(ne,xe):te==="straight"||!He&&N.eles.length%2===1&&oe===Math.floor(N.eles.length/2)?e.findStraightEdgePoints(ne):e.findBezierPoints(ne,xe,oe,He,de),e.findEndpoints(ne),e.tryToCorrectInvalidPoints(ne,xe),e.checkForInvalidEdgeWarning(ne),e.storeAllpts(ne),e.storeEdgeProjections(ne),e.calculateArrowAngles(ne),e.recalculateEdgeLabelProjections(ne),e.calculateLabelAngles(ne)}},R=0;R0){var ce=u,st=cg(ce,Q4(s)),Ae=cg(ce,Q4(de)),Ye=st;if(Ae2){var Ge=cg(ce,{x:de[2],y:de[3]});Ge0){var Ee=h,Ke=cg(Ee,Q4(s)),Be=cg(Ee,Q4(we)),De=Ke;if(Be2){var nt=cg(Ee,{x:we[2],y:we[3]});nt=m||R){y={cp:_,segment:S};break}}if(y)break}var A=y.cp,I=y.segment,P=(m-v)/I.length,O=I.t1-I.t0,C=p?I.t0+O*P:I.t1-O*P;C=V8(0,C,1),e=tb(A.p0,A.p1,A.p2,C),d=yEt(A.p0,A.p1,A.p2,C);break}case"straight":case"segments":case"haystack":{for(var N=0,B,F,M,$,z=n.allpts.length,q=0;q+3=m));q+=2);var V=m-F,U=V/B;U=V8(0,U,1),e=Fwt(M,$,U),d=sIe(M,$);break}}s("labelX",f,e.x),s("labelY",f,e.y),s("labelAutoAngle",f,d)}};u("source"),u("target"),this.applyLabelDimensions(t)}};oh.applyLabelDimensions=function(t){this.applyPrefixedLabelDimensions(t),t.isEdge()&&(this.applyPrefixedLabelDimensions(t,"source"),this.applyPrefixedLabelDimensions(t,"target"))};oh.applyPrefixedLabelDimensions=function(t,e){var r=t._private,n=this.getLabelText(t,e),i=mg(n,t._private.labelDimsKey);if(Bo(r.rscratch,"prefixedLabelDimsKey",e)!==i){ih(r.rscratch,"prefixedLabelDimsKey",e,i);var a=this.calculateLabelDimensions(t,n),s=t.pstyle("line-height").pfValue,o=t.pstyle("font-size").pfValue,l=t.pstyle("text-wrap").strValue,u=Bo(r.rscratch,"labelWrapCachedLines",e)||[],h=l!=="wrap"?1:Math.max(u.length,1),f=o*s,d=a.width,p=a.height+(h-1)*(s-1)*o;ih(r.rstyle,"labelWidth",e,d),ih(r.rscratch,"labelWidth",e,d),ih(r.rstyle,"labelHeight",e,p),ih(r.rscratch,"labelHeight",e,p),ih(r.rscratch,"labelLineHeight",e,f),ih(r.rscratch,"labelActualDescent",e,a.labelActualDescent)}};oh.getLabelText=function(t,e){var r=t._private,n=e?e+"-":"",i=t.pstyle(n+"label").strValue,a=t.pstyle("text-transform").value,s=function(se,re){return re?(ih(r.rscratch,se,e,re),re):Bo(r.rscratch,se,e)};if(!i)return"";a=="none"||(a=="uppercase"?i=i.toUpperCase():a=="lowercase"&&(i=i.toLowerCase()));var o=t.pstyle("text-wrap").value;if(o==="wrap"){var l=s("labelKey");if(l!=null&&s("labelWrapKey")===l)return s("labelWrapCachedText");for(var u="\u200B",h=i.split(` +`),f=t.pstyle("text-max-width").pfValue,d=t.pstyle("text-overflow-wrap").value,p=d==="anywhere",m=[],g=/[\s\u200b]+|$/g,y=0;yf){var T=v.matchAll(g),S="",R=0,A=yl(T),I;try{for(A.s();!(I=A.n()).done;){var P=I.value,O=P[0],C=v.substring(R,P.index);R=P.index+O.length;var N=S.length===0?C:S+C+O,B=this.calculateLabelDimensions(t,N),F=B.width;F<=f?S+=C+O:(S&&m.push(S),S=C+O)}}catch(J){A.e(J)}finally{A.f()}S.match(/^[\s\u200b]+$/)||m.push(S)}else m.push(v)}s("labelWrapCachedLines",m),i=s("labelWrapCachedText",m.join(` +`)),s("labelWrapKey",l)}else if(o==="ellipsis"){var M=t.pstyle("text-max-width").pfValue,$="",z="\u2026",q=!1;if(this.calculateLabelDimensions(t,i).widthM)break;$+=i[V],V===i.length-1&&(q=!0)}return q||($+=z),$}return i};oh.getLabelJustification=function(t){var e=t.pstyle("text-justification").strValue,r=t.pstyle("text-halign").strValue;return e==="auto"?t.isNode()?i9t(r):"center":e};oh.calculateLabelDimensions=function(t,e){var r=this,n=r.cy.window(),i=n.document,a=0,s=t.pstyle("font-style").strValue,o=t.pstyle("font-size").pfValue,l=t.pstyle("font-family").strValue,u=t.pstyle("font-weight").strValue,h=t.pstyle("text-metrics").strValue||"font",f=this.labelCalcCanvas,d=this.labelCalcCanvasContext;if(!f){f=this.labelCalcCanvas=i.createElement("canvas"),d=this.labelCalcCanvasContext=f.getContext("2d");var p=f.style;p.position="absolute",p.left="-9999px",p.top="-9999px",p.zIndex="-1",p.visibility="hidden",p.pointerEvents="none"}d.font="".concat(s," ").concat(u," ").concat(o,"px ").concat(l);for(var m=0,g=0,y=e.split(` +`),v=y.length,x=0,k=0,_=0;_1&&arguments[1]!==void 0?arguments[1]:!0;if(e.merge(s),o)for(var l=0;l=t.desktopTapThreshold2}var ee=a(H);Dt&&(t.hoverData.tapholdCancelled=!0);var Te=function(){var Ue=t.hoverData.dragDelta=t.hoverData.dragDelta||[];Ue.length===0?(Ue.push(mt[0]),Ue.push(mt[1])):(Ue[0]+=mt[0],Ue[1]+=mt[1])};K=!0,i(ut,["mousemove","vmousemove","tapdrag"],H,{x:Be[0],y:Be[1]});var bt=function(Ue){return{originalEvent:H,type:Ue,position:{x:Be[0],y:Be[1]}}},at=function(){t.data.bgActivePosistion=void 0,t.hoverData.selecting||we.emit(bt("boxstart")),We[4]=1,t.hoverData.selecting=!0,t.redrawHint("select",!0),t.redraw()};if(t.hoverData.which===3){if(Dt){var It=bt("cxtdrag");gt?gt.emit(It):we.emit(It),t.hoverData.cxtDragged=!0,(!t.hoverData.cxtOver||ut!==t.hoverData.cxtOver)&&(t.hoverData.cxtOver&&t.hoverData.cxtOver.emit(bt("cxtdragout")),t.hoverData.cxtOver=ut,ut&&ut.emit(bt("cxtdragover")))}}else if(t.hoverData.dragging){if(K=!0,we.panningEnabled()&&we.userPanningEnabled()){var At;if(t.hoverData.justStartedPan){var Ut=t.hoverData.mdownPos;At={x:(Be[0]-Ut[0])*Ee,y:(Be[1]-Ut[1])*Ee},t.hoverData.justStartedPan=!1}else At={x:mt[0]*Ee,y:mt[1]*Ee};we.panBy(At),we.emit(bt("dragpan")),t.hoverData.dragged=!0}Be=t.projectIntoViewport(H.clientX,H.clientY)}else if(We[4]==1&&(gt==null||gt.pannable())){if(Dt){if(!t.hoverData.dragging&&we.boxSelectionEnabled()&&(ee||!we.panningEnabled()||!we.userPanningEnabled()))at();else if(!t.hoverData.selecting&&we.panningEnabled()&&we.userPanningEnabled()){var Bt=s(gt,t.hoverData.downs);Bt&&(t.hoverData.dragging=!0,t.hoverData.justStartedPan=!0,We[4]=0,t.data.bgActivePosistion=Q4(De),t.redrawHint("select",!0),t.redraw())}gt&>.pannable()&>.active()&>.unactivate()}}else{if(gt&>.pannable()&>.active()&>.unactivate(),(!gt||!gt.grabbed())&&ut!=vt&&(vt&&i(vt,["mouseout","tapdragout"],H,{x:Be[0],y:Be[1]}),ut&&i(ut,["mouseover","tapdragover"],H,{x:Be[0],y:Be[1]}),t.hoverData.last=ut),gt)if(Dt){if(we.boxSelectionEnabled()&&ee)gt&>.grabbed()&&(g(ft),gt.emit(bt("freeon")),ft.emit(bt("free")),t.dragData.didDrag&&(gt.emit(bt("dragfreeon")),ft.emit(bt("dragfree")))),at();else if(gt&>.grabbed()&&t.nodeIsDraggable(gt)){var Kt=!t.dragData.didDrag;Kt&&t.redrawHint("eles",!0),t.dragData.didDrag=!0,t.hoverData.draggingEles||p(ft,{inDragLayer:!0});var vr={x:0,y:0};if(Ht(mt[0])&&Ht(mt[1])&&(vr.x+=mt[0],vr.y+=mt[1],Kt)){var Me=t.hoverData.dragDelta;Me&&Ht(Me[0])&&Ht(Me[1])&&(vr.x+=Me[0],vr.y+=Me[1])}t.hoverData.draggingEles=!0,ft.silentShift(vr).emit(bt("position")).emit(bt("drag")),t.redrawHint("drag",!0),t.redraw()}}else Te();K=!0}if(We[2]=Be[0],We[3]=Be[1],K)return H.stopPropagation&&H.stopPropagation(),H.preventDefault&&H.preventDefault(),!1}},!1);var P,O,C;t.registerBinding(e,"mouseup",function(H){if(!(t.hoverData.which===1&&H.which!==1&&t.hoverData.capture)){var ve=t.hoverData.capture;if(ve){t.hoverData.capture=!1;var K=t.cy,we=t.projectIntoViewport(H.clientX,H.clientY),Ee=t.selection,Ke=t.findNearestElement(we[0],we[1],!0,!1),Be=t.dragData.possibleDragElements,De=t.hoverData.down,nt=a(H);t.data.bgActivePosistion&&(t.redrawHint("select",!0),t.redraw()),t.hoverData.tapholdCancelled=!0,t.data.bgActivePosistion=void 0,De&&De.unactivate();var We=function(ht){return{originalEvent:H,type:ht,position:{x:we[0],y:we[1]}}};if(t.hoverData.which===3){var ut=We("cxttapend");if(De?De.emit(ut):K.emit(ut),!t.hoverData.cxtDragged){var vt=We("cxttap");De?De.emit(vt):K.emit(vt)}t.hoverData.cxtDragged=!1,t.hoverData.which=null}else if(t.hoverData.which===1){if(i(Ke,["mouseup","tapend","vmouseup"],H,{x:we[0],y:we[1]}),!t.dragData.didDrag&&!t.hoverData.dragged&&!t.hoverData.selecting&&!t.hoverData.isOverThresholdDrag&&(i(De,["click","tap","vclick"],H,{x:we[0],y:we[1]}),O=!1,H.timeStamp-C<=K.multiClickDebounceTime()?(P&&clearTimeout(P),O=!0,C=null,i(De,["dblclick","dbltap","vdblclick"],H,{x:we[0],y:we[1]})):(P=setTimeout(function(){O||i(De,["oneclick","onetap","voneclick"],H,{x:we[0],y:we[1]})},K.multiClickDebounceTime()),C=H.timeStamp)),De==null&&!t.dragData.didDrag&&!t.hoverData.selecting&&!t.hoverData.dragged&&!a(H)&&(K.$(r).unselect(["tapunselect"]),Be.length>0&&t.redrawHint("eles",!0),t.dragData.possibleDragElements=Be=K.collection()),Ke==De&&!t.dragData.didDrag&&!t.hoverData.selecting&&Ke!=null&&Ke._private.selectable&&(t.hoverData.dragging||(K.selectionType()==="additive"||nt?Ke.selected()?Ke.unselect(["tapunselect"]):Ke.select(["tapselect"]):nt||(K.$(r).unmerge(Ke).unselect(["tapunselect"]),Ke.select(["tapselect"]))),t.redrawHint("eles",!0)),t.hoverData.selecting){var gt=K.collection(t.getAllInBox(Ee[0],Ee[1],Ee[2],Ee[3]));t.redrawHint("select",!0),gt.length>0&&t.redrawHint("eles",!0),K.emit(We("boxend"));var mt=function(ht){return ht.selectable()&&!ht.selected()};K.selectionType()==="additive"||nt||K.$(r).unmerge(gt).unselect(),gt.emit(We("box")).stdFilter(mt).select().emit(We("boxselect")),t.redraw()}if(t.hoverData.dragging&&(t.hoverData.dragging=!1,t.redrawHint("select",!0),t.redrawHint("eles",!0),t.redraw()),!Ee[4]){t.redrawHint("drag",!0),t.redrawHint("eles",!0);var ft=De&&De.grabbed();g(Be),ft&&(De.emit(We("freeon")),Be.emit(We("free")),t.dragData.didDrag&&(De.emit(We("dragfreeon")),Be.emit(We("dragfree"))))}}Ee[4]=0,t.hoverData.down=null,t.hoverData.cxtStarted=!1,t.hoverData.draggingEles=!1,t.hoverData.selecting=!1,t.hoverData.isOverThresholdDrag=!1,t.dragData.didDrag=!1,t.hoverData.dragged=!1,t.hoverData.dragDelta=[],t.hoverData.mdownPos=null,t.hoverData.mdownGPos=null,t.hoverData.which=null}}},!1);var N=[],B=4,F,M=1e5,$=function(H,ve){for(var K=0;K=B){var we=N;if(F=$(we,5),!F){var Ee=Math.abs(we[0]);F=z(we)&&Ee>5}if(F)for(var Ke=0;Ke5&&(K=fX(K)*5),vt=K/-250,F&&(vt/=M,vt*=3),vt=vt*t.wheelSensitivity;var gt=H.deltaMode===1;gt&&(vt*=33);var mt=Be.zoom()*Math.pow(10,vt);H.type==="gesturechange"&&(mt=t.gestureStartZoom*H.scale),Be.zoom({level:mt,renderedPosition:{x:ut[0],y:ut[1]}}),Be.emit({type:H.type==="gesturechange"?"pinchzoom":"scrollzoom",originalEvent:H,position:{x:We[0],y:We[1]}})}}}};t.registerBinding(t.container,"wheel",q,!0),t.registerBinding(e,"scroll",function(H){t.scrollingPage=!0,clearTimeout(t.scrollingPageTimeout),t.scrollingPageTimeout=setTimeout(function(){t.scrollingPage=!1},250)},!0),t.registerBinding(t.container,"gesturestart",function(H){t.gestureStartZoom=t.cy.zoom(),t.hasTouchStarted||H.preventDefault()},!0),t.registerBinding(t.container,"gesturechange",function(xe){t.hasTouchStarted||q(xe)},!0),t.registerBinding(t.container,"mouseout",function(H){var ve=t.projectIntoViewport(H.clientX,H.clientY);t.cy.emit({originalEvent:H,type:"mouseout",position:{x:ve[0],y:ve[1]}})},!1),t.registerBinding(t.container,"mouseover",function(H){var ve=t.projectIntoViewport(H.clientX,H.clientY);t.cy.emit({originalEvent:H,type:"mouseover",position:{x:ve[0],y:ve[1]}})},!1);var V,U,J,se,re,me,ge,ye,_e,ue,ie,le,oe,ne=function(H,ve,K,we){return Math.sqrt((K-H)*(K-H)+(we-ve)*(we-ve))},pe=function(H,ve,K,we){return(K-H)*(K-H)+(we-ve)*(we-ve)},te;t.registerBinding(t.container,"touchstart",te=function(H){if(t.hasTouchStarted=!0,!!A(H)){v(),t.touchData.capture=!0,t.data.bgActivePosistion=void 0;var ve=t.cy,K=t.touchData.now,we=t.touchData.earlier;if(H.touches[0]){var Ee=t.projectIntoViewport(H.touches[0].clientX,H.touches[0].clientY);K[0]=Ee[0],K[1]=Ee[1]}if(H.touches[1]){var Ee=t.projectIntoViewport(H.touches[1].clientX,H.touches[1].clientY);K[2]=Ee[0],K[3]=Ee[1]}if(H.touches[2]){var Ee=t.projectIntoViewport(H.touches[2].clientX,H.touches[2].clientY);K[4]=Ee[0],K[5]=Ee[1]}var Ke=function(ee){return{originalEvent:H,type:ee,position:{x:K[0],y:K[1]}}};if(H.touches[1]){t.touchData.singleTouchMoved=!0,g(t.dragData.touchDragEles);var Be=t.findContainerClientCoords();_e=Be[0],ue=Be[1],ie=Be[2],le=Be[3],V=H.touches[0].clientX-_e,U=H.touches[0].clientY-ue,J=H.touches[1].clientX-_e,se=H.touches[1].clientY-ue,oe=0<=V&&V<=ie&&0<=J&&J<=ie&&0<=U&&U<=le&&0<=se&&se<=le;var De=ve.pan(),nt=ve.zoom();re=ne(V,U,J,se),me=pe(V,U,J,se),ge=[(V+J)/2,(U+se)/2],ye=[(ge[0]-De.x)/nt,(ge[1]-De.y)/nt];var We=200,ut=We*We;if(me=1){for(var yt=t.touchData.startPosition=[null,null,null,null,null,null],W=0;W=t.touchTapThreshold2}if(ve&&t.touchData.cxt){H.preventDefault();var W=H.touches[0].clientX-_e,j=H.touches[0].clientY-ue,Je=H.touches[1].clientX-_e,ee=H.touches[1].clientY-ue,Te=pe(W,j,Je,ee),bt=Te/me,at=150,It=at*at,At=1.5,Ut=At*At;if(bt>=Ut||Te>=It){t.touchData.cxt=!1,t.data.bgActivePosistion=void 0,t.redrawHint("select",!0);var Bt=nt("cxttapend");t.touchData.start?(t.touchData.start.unactivate().emit(Bt),t.touchData.start=null):we.emit(Bt)}}if(ve&&t.touchData.cxt){var Bt=nt("cxtdrag");t.data.bgActivePosistion=void 0,t.redrawHint("select",!0),t.touchData.start?t.touchData.start.emit(Bt):we.emit(Bt),t.touchData.start&&(t.touchData.start._private.grabbed=!1),t.touchData.cxtDragged=!0;var Kt=t.findNearestElement(Ee[0],Ee[1],!0,!0);(!t.touchData.cxtOver||Kt!==t.touchData.cxtOver)&&(t.touchData.cxtOver&&t.touchData.cxtOver.emit(nt("cxtdragout")),t.touchData.cxtOver=Kt,Kt&&Kt.emit(nt("cxtdragover")))}else if(ve&&H.touches[2]&&we.boxSelectionEnabled())H.preventDefault(),t.data.bgActivePosistion=void 0,this.lastThreeTouch=+new Date,t.touchData.selecting||we.emit(nt("boxstart")),t.touchData.selecting=!0,t.touchData.didSelect=!0,K[4]=1,!K||K.length===0||K[0]===void 0?(K[0]=(Ee[0]+Ee[2]+Ee[4])/3,K[1]=(Ee[1]+Ee[3]+Ee[5])/3,K[2]=(Ee[0]+Ee[2]+Ee[4])/3+1,K[3]=(Ee[1]+Ee[3]+Ee[5])/3+1):(K[2]=(Ee[0]+Ee[2]+Ee[4])/3,K[3]=(Ee[1]+Ee[3]+Ee[5])/3),t.redrawHint("select",!0),t.redraw();else if(ve&&H.touches[1]&&!t.touchData.didSelect&&we.zoomingEnabled()&&we.panningEnabled()&&we.userZoomingEnabled()&&we.userPanningEnabled()){H.preventDefault(),t.data.bgActivePosistion=void 0,t.redrawHint("select",!0);var vr=t.dragData.touchDragEles;if(vr){t.redrawHint("drag",!0);for(var Me=0;Me0&&!t.hoverData.draggingEles&&!t.swipePanning&&t.data.bgActivePosistion!=null&&(t.data.bgActivePosistion=void 0,t.redrawHint("select",!0),t.redraw())}},!1);var de;t.registerBinding(e,"touchcancel",de=function(H){var ve=t.touchData.start;t.touchData.capture=!1,ve&&ve.unactivate()});var ce,st,Ae,Ye;if(t.registerBinding(e,"touchend",ce=function(H){var ve=t.touchData.start,K=t.touchData.capture;if(K)H.touches.length===0&&(t.touchData.capture=!1),H.preventDefault();else return;var we=t.selection;t.swipePanning=!1,t.hoverData.draggingEles=!1;var Ee=t.cy,Ke=Ee.zoom(),Be=t.touchData.now,De=t.touchData.earlier;if(H.touches[0]){var nt=t.projectIntoViewport(H.touches[0].clientX,H.touches[0].clientY);Be[0]=nt[0],Be[1]=nt[1]}if(H.touches[1]){var nt=t.projectIntoViewport(H.touches[1].clientX,H.touches[1].clientY);Be[2]=nt[0],Be[3]=nt[1]}if(H.touches[2]){var nt=t.projectIntoViewport(H.touches[2].clientX,H.touches[2].clientY);Be[4]=nt[0],Be[5]=nt[1]}var We=function(It){return{originalEvent:H,type:It,position:{x:Be[0],y:Be[1]}}};ve&&ve.unactivate();var ut;if(t.touchData.cxt){if(ut=We("cxttapend"),ve?ve.emit(ut):Ee.emit(ut),!t.touchData.cxtDragged){var vt=We("cxttap");ve?ve.emit(vt):Ee.emit(vt)}t.touchData.start&&(t.touchData.start._private.grabbed=!1),t.touchData.cxt=!1,t.touchData.start=null,t.redraw();return}if(!H.touches[2]&&Ee.boxSelectionEnabled()&&t.touchData.selecting){t.touchData.selecting=!1;var gt=Ee.collection(t.getAllInBox(we[0],we[1],we[2],we[3]));we[0]=void 0,we[1]=void 0,we[2]=void 0,we[3]=void 0,we[4]=0,t.redrawHint("select",!0),Ee.emit(We("boxend"));var mt=function(It){return It.selectable()&&!It.selected()};gt.emit(We("box")).stdFilter(mt).select().emit(We("boxselect")),gt.nonempty()&&t.redrawHint("eles",!0),t.redraw()}if(ve?.unactivate(),H.touches[2])t.data.bgActivePosistion=void 0,t.redrawHint("select",!0);else if(!H.touches[1]){if(!H.touches[0]){if(!H.touches[0]){t.data.bgActivePosistion=void 0,t.redrawHint("select",!0);var ft=t.dragData.touchDragEles;if(ve!=null){var Dt=ve._private.grabbed;g(ft),t.redrawHint("drag",!0),t.redrawHint("eles",!0),Dt&&(ve.emit(We("freeon")),ft.emit(We("free")),t.dragData.didDrag&&(ve.emit(We("dragfreeon")),ft.emit(We("dragfree")))),i(ve,["touchend","tapend","vmouseup","tapdragout"],H,{x:Be[0],y:Be[1]}),ve.unactivate(),t.touchData.start=null}else{var ht=t.findNearestElement(Be[0],Be[1],!0,!0);i(ht,["touchend","tapend","vmouseup","tapdragout"],H,{x:Be[0],y:Be[1]})}var yt=t.touchData.startPosition[0]-Be[0],W=yt*yt,j=t.touchData.startPosition[1]-Be[1],Je=j*j,ee=W+Je,Te=ee*Ke*Ke;t.touchData.singleTouchMoved||(ve||Ee.$(":selected").unselect(["tapunselect"]),i(ve,["tap","vclick"],H,{x:Be[0],y:Be[1]}),st=!1,H.timeStamp-Ye<=Ee.multiClickDebounceTime()?(Ae&&clearTimeout(Ae),st=!0,Ye=null,i(ve,["dbltap","vdblclick"],H,{x:Be[0],y:Be[1]})):(Ae=setTimeout(function(){st||i(ve,["onetap","voneclick"],H,{x:Be[0],y:Be[1]})},Ee.multiClickDebounceTime()),Ye=H.timeStamp)),ve!=null&&!t.dragData.didDrag&&ve._private.selectable&&Te"u"){var Ge=[],rt=function(H){return{clientX:H.clientX,clientY:H.clientY,force:1,identifier:H.pointerId,pageX:H.pageX,pageY:H.pageY,radiusX:H.width/2,radiusY:H.height/2,screenX:H.screenX,screenY:H.screenY,target:H.target}},Xe=function(H){return{event:H,touch:rt(H)}},Ze=function(H){Ge.push(Xe(H))},Pe=function(H){for(var ve=0;ve0)return J[0]}return null},m=Object.keys(d),g=0;g0?p:lDe(a,s,e,r,n,i,o,l)},checkPoint:function(e,r,n,i,a,s,o,l){l=l==="auto"?Yp(i,a):l;var u=2*l;if(Sf(e,r,this.points,s,o,i,a-u,[0,-1],n)||Sf(e,r,this.points,s,o,i-u,a,[0,-1],n))return!0;var h=i/2+2*n,f=a/2+2*n,d=[s-h,o-f,s-h,o,s+h,o,s+h,o-f];return!!(gl(e,r,d)||pg(e,r,u,u,s+i/2-l,o+a/2-l,n)||pg(e,r,u,u,s-i/2+l,o+a/2-l,n))}}};Cf.registerNodeShapes=function(){var t=this.nodeShapes={},e=this;this.generateEllipse(),this.generatePolygon("triangle",Po(3,0)),this.generateRoundPolygon("round-triangle",Po(3,0)),this.generatePolygon("rectangle",Po(4,0)),t.square=t.rectangle,this.generateRoundRectangle(),this.generateCutRectangle(),this.generateBarrel(),this.generateBottomRoundrectangle();{var r=[0,1,1,0,0,-1,-1,0];this.generatePolygon("diamond",r),this.generateRoundPolygon("round-diamond",r)}this.generatePolygon("pentagon",Po(5,0)),this.generateRoundPolygon("round-pentagon",Po(5,0)),this.generatePolygon("hexagon",Po(6,0)),this.generateRoundPolygon("round-hexagon",Po(6,0)),this.generatePolygon("heptagon",Po(7,0)),this.generateRoundPolygon("round-heptagon",Po(7,0)),this.generatePolygon("octagon",Po(8,0)),this.generateRoundPolygon("round-octagon",Po(8,0));var n=new Array(20);{var i=zY(5,0),a=zY(5,Math.PI/5),s=.5*(3-Math.sqrt(5));s*=1.57;for(var o=0;o=e.deqFastCost*_)break}else if(u){if(x>=e.deqCost*p||x>=e.deqAvgCost*d)break}else if(k>=e.deqNoDrawCost*RY)break;var T=e.deq(n,y,g);if(T.length>0)for(var S=0;S0&&(e.onDeqd(n,m),!u&&e.shouldRedraw(n,m,y,g)&&a())},o=e.priority||uX;i.beforeRender(s,o(n))}}}},wEt=(function(){function t(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:LR;Zp(this,t),this.idsByKey=new Tf,this.keyForId=new Tf,this.cachesByLvl=new Tf,this.lvls=[],this.getKey=e,this.doesEleInvalidateKey=r}return Qp(t,[{key:"getIdsFor",value:function(r){r==null&&Mi("Can not get id list for null key");var n=this.idsByKey,i=this.idsByKey.get(r);return i||(i=new cb,n.set(r,i)),i}},{key:"addIdForKey",value:function(r,n){r!=null&&this.getIdsFor(r).add(n)}},{key:"deleteIdForKey",value:function(r,n){r!=null&&this.getIdsFor(r).delete(n)}},{key:"getNumberOfIdsForKey",value:function(r){return r==null?0:this.getIdsFor(r).size}},{key:"updateKeyMappingFor",value:function(r){var n=r.id(),i=this.keyForId.get(n),a=this.getKey(r);this.deleteIdForKey(i,n),this.addIdForKey(a,n),this.keyForId.set(n,a)}},{key:"deleteKeyMappingFor",value:function(r){var n=r.id(),i=this.keyForId.get(n);this.deleteIdForKey(i,n),this.keyForId.delete(n)}},{key:"keyHasChangedFor",value:function(r){var n=r.id(),i=this.keyForId.get(n),a=this.getKey(r);return i!==a}},{key:"isInvalid",value:function(r){return this.keyHasChangedFor(r)||this.doesEleInvalidateKey(r)}},{key:"getCachesAt",value:function(r){var n=this.cachesByLvl,i=this.lvls,a=n.get(r);return a||(a=new Tf,n.set(r,a),i.push(r)),a}},{key:"getCache",value:function(r,n){return this.getCachesAt(n).get(r)}},{key:"get",value:function(r,n){var i=this.getKey(r),a=this.getCache(i,n);return a!=null&&this.updateKeyMappingFor(r),a}},{key:"getForCachedKey",value:function(r,n){var i=this.keyForId.get(r.id()),a=this.getCache(i,n);return a}},{key:"hasCache",value:function(r,n){return this.getCachesAt(n).has(r)}},{key:"has",value:function(r,n){var i=this.getKey(r);return this.hasCache(i,n)}},{key:"setCache",value:function(r,n,i){i.key=r,this.getCachesAt(n).set(r,i)}},{key:"set",value:function(r,n,i){var a=this.getKey(r);this.setCache(a,n,i),this.updateKeyMappingFor(r)}},{key:"deleteCache",value:function(r,n){this.getCachesAt(n).delete(r)}},{key:"delete",value:function(r,n){var i=this.getKey(r);this.deleteCache(i,n)}},{key:"invalidateKey",value:function(r){var n=this;this.lvls.forEach(function(i){return n.deleteCache(r,i)})}},{key:"invalidate",value:function(r){var n=r.id(),i=this.keyForId.get(n);this.deleteKeyMappingFor(r);var a=this.doesEleInvalidateKey(r);return a&&this.invalidateKey(i),a||this.getNumberOfIdsForKey(i)===0}}])})(),ERe=25,dR=50,ER=-4,JY=3,dIe=7.99,kEt=8,TEt=1024,EEt=1024,SEt=1024,CEt=.2,_Et=.8,AEt=10,LEt=.15,REt=.1,DEt=.9,IEt=.9,MEt=100,NEt=1,eb={dequeue:"dequeue",downscale:"downscale",highQuality:"highQuality"},OEt=Bs({getKey:null,doesEleInvalidateKey:LR,drawElement:null,getBoundingBox:null,getRotationPoint:null,getRotationOffset:null,isVisible:tDe,allowEdgeTxrCaching:!0,allowParentTxrCaching:!0}),F8=function(e,r){var n=this;n.renderer=e,n.onDequeues=[];var i=OEt(r);br(n,i),n.lookup=new wEt(i.getKey,i.doesEleInvalidateKey),n.setupDequeueing()},ja=F8.prototype;ja.reasons=eb;ja.getTextureQueue=function(t){var e=this;return e.eleImgCaches=e.eleImgCaches||{},e.eleImgCaches[t]=e.eleImgCaches[t]||[]};ja.getRetiredTextureQueue=function(t){var e=this,r=e.eleImgCaches.retired=e.eleImgCaches.retired||{},n=r[t]=r[t]||[];return n};ja.getElementQueue=function(){var t=this,e=t.eleCacheQueue=t.eleCacheQueue||new iw(function(r,n){return n.reqs-r.reqs});return e};ja.getElementKeyToQueue=function(){var t=this,e=t.eleKeyToCacheQueue=t.eleKeyToCacheQueue||{};return e};ja.getElement=function(t,e,r,n,i){var a=this,s=this.renderer,o=s.cy.zoom(),l=this.lookup;if(!e||e.w===0||e.h===0||isNaN(e.w)||isNaN(e.h)||!t.visible()||t.removed()||!a.allowEdgeTxrCaching&&t.isEdge()||!a.allowParentTxrCaching&&t.isParent())return null;if(n==null&&(n=Math.ceil(hX(o*r))),n=dIe||n>JY)return null;var u=Math.pow(2,n),h=e.h*u,f=e.w*u,d=s.eleTextBiggerThanMin(t,u);if(!this.isVisible(t,d))return null;var p=l.get(t,n);if(p&&p.invalidated&&(p.invalidated=!1,p.texture.invalidatedWidth-=p.width),p)return p;var m;if(h<=ERe?m=ERe:h<=dR?m=dR:m=Math.ceil(h/dR)*dR,h>SEt||f>EEt)return null;var g=a.getTextureQueue(m),y=g[g.length-2],v=function(){return a.recycleTexture(m,f)||a.addTexture(m,f)};y||(y=g[g.length-1]),y||(y=v()),y.width-y.usedWidthn;O--)I=a.getElement(t,e,r,O,eb.downscale);P()}else return a.queueElement(t,S.level-1),S;else{var C;if(!k&&!_&&!T)for(var N=n-1;N>=ER;N--){var B=l.get(t,N);if(B){C=B;break}}if(x(C))return a.queueElement(t,n),C;y.context.translate(y.usedWidth,0),y.context.scale(u,u),this.drawElement(y.context,t,e,d,!1),y.context.scale(1/u,1/u),y.context.translate(-y.usedWidth,0)}return p={x:y.usedWidth,texture:y,level:n,scale:u,width:f,height:h,scaledLabelShown:d},y.usedWidth+=Math.ceil(f+kEt),y.eleCaches.push(p),l.set(t,n,p),a.checkTextureFullness(y),p};ja.invalidateElements=function(t){for(var e=0;e=CEt*t.width&&this.retireTexture(t)};ja.checkTextureFullness=function(t){var e=this,r=e.getTextureQueue(t.height);t.usedWidth/t.width>_Et&&t.fullnessChecks>=AEt?Wp(r,t):t.fullnessChecks++};ja.retireTexture=function(t){var e=this,r=t.height,n=e.getTextureQueue(r),i=this.lookup;Wp(n,t),t.retired=!0;for(var a=t.eleCaches,s=0;s=e)return s.retired=!1,s.usedWidth=0,s.invalidatedWidth=0,s.fullnessChecks=0,cX(s.eleCaches),s.context.setTransform(1,0,0,1,0,0),s.context.clearRect(0,0,s.width,s.height),Wp(i,s),n.push(s),s}};ja.queueElement=function(t,e){var r=this,n=r.getElementQueue(),i=r.getElementKeyToQueue(),a=this.getKey(t),s=i[a];if(s)s.level=Math.max(s.level,e),s.eles.merge(t),s.reqs++,n.updateItem(s);else{var o={eles:t.spawn().merge(t),level:e,reqs:1,key:a};n.push(o),i[a]=o}};ja.dequeue=function(t){for(var e=this,r=e.getElementQueue(),n=e.getElementKeyToQueue(),i=[],a=e.lookup,s=0;s0;s++){var o=r.pop(),l=o.key,u=o.eles[0],h=a.hasCache(u,o.level);if(n[l]=null,h)continue;i.push(o);var f=e.getBoundingBox(u);e.getElement(u,f,t,o.level,eb.dequeue)}return i};ja.removeFromQueue=function(t){var e=this,r=e.getElementQueue(),n=e.getElementKeyToQueue(),i=this.getKey(t),a=n[i];a!=null&&(a.eles.length===1?(a.reqs=lX,r.updateItem(a),r.pop(),n[i]=null):a.eles.unmerge(t))};ja.onDequeue=function(t){this.onDequeues.push(t)};ja.offDequeue=function(t){Wp(this.onDequeues,t)};ja.setupDequeueing=fIe.setupDequeueing({deqRedrawThreshold:MEt,deqCost:LEt,deqAvgCost:REt,deqNoDrawCost:DEt,deqFastCost:IEt,deq:function(e,r,n){return e.dequeue(r,n)},onDeqd:function(e,r){for(var n=0;n=BEt||r>BR)return null}n.validateLayersElesOrdering(r,t);var l=n.layersByLevel,u=Math.pow(2,r),h=l[r]=l[r]||[],f,d=n.levelIsComplete(r,t),p,m=function(){var P=function(F){if(n.validateLayersElesOrdering(F,t),n.levelIsComplete(F,t))return p=l[F],!0},O=function(F){if(!p)for(var M=r+F;$8<=M&&M<=BR&&!P(M);M+=F);};O(1),O(-1);for(var C=h.length-1;C>=0;C--){var N=h[C];N.invalid&&Wp(h,N)}};if(!d)m();else return h;var g=function(){if(!f){f=Fo();for(var P=0;PCRe||N>CRe)return null;var B=C*N;if(B>VEt)return null;var F=n.makeLayer(f,r);if(O!=null){var M=h.indexOf(O)+1;h.splice(M,0,F)}else(P.insert===void 0||P.insert)&&h.unshift(F);return F};if(n.skipping&&!o)return null;for(var v=null,x=t.length/PEt,k=!o,_=0;_=x||!oDe(v.bb,T.boundingBox()))&&(v=y({insert:!0,after:v}),!v))return null;p||k?n.queueLayer(v,T):n.drawEleInLayer(v,T,r,e),v.eles.push(T),R[r]=v}return p||(k?null:h)};Fs.getEleLevelForLayerLevel=function(t,e){return t};Fs.drawEleInLayer=function(t,e,r,n){var i=this,a=this.renderer,s=t.context,o=e.boundingBox();o.w===0||o.h===0||!e.visible()||(r=i.getEleLevelForLayerLevel(r,n),a.setImgSmoothing(s,!1),a.drawCachedElement(s,e,null,null,r,WEt),a.setImgSmoothing(s,!0))};Fs.levelIsComplete=function(t,e){var r=this,n=r.layersByLevel[t];if(!n||n.length===0)return!1;for(var i=0,a=0;a0||s.invalid)return!1;i+=s.eles.length}return i===e.length};Fs.validateLayersElesOrdering=function(t,e){var r=this.layersByLevel[t];if(r)for(var n=0;n0){e=!0;break}}return e};Fs.invalidateElements=function(t){var e=this;t.length!==0&&(e.lastInvalidationTime=Ef(),!(t.length===0||!e.haveLayers())&&e.updateElementsInLayers(t,function(n,i,a){e.invalidateLayer(n)}))};Fs.invalidateLayer=function(t){if(this.lastInvalidationTime=Ef(),!t.invalid){var e=t.level,r=t.eles,n=this.layersByLevel[e];Wp(n,t),t.elesQueue=[],t.invalid=!0,t.replacement&&(t.replacement.invalid=!0);for(var i=0;i3&&arguments[3]!==void 0?arguments[3]:!0,i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,a=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!0,s=this,o=e._private.rscratch;if(!(a&&!e.visible())&&!(o.badLine||o.allpts==null||isNaN(o.allpts[0]))){var l;r&&(l=r,t.translate(-l.x1,-l.y1));var u=a?e.pstyle("opacity").value:1,h=a?e.pstyle("line-opacity").value:1,f=e.pstyle("curve-style").value,d=e.pstyle("line-style").value,p=e.pstyle("width").pfValue,m=e.pstyle("line-cap").value,g=e.pstyle("line-outline-width").value,y=e.pstyle("line-outline-color").value,v=u*h,x=u*h,k=function(){var F=arguments.length>0&&arguments[0]!==void 0?arguments[0]:v;f==="straight-triangle"?(s.eleStrokeStyle(t,e,F),s.drawEdgeTrianglePath(e,t,o.allpts)):(t.lineWidth=p,t.lineCap=m,s.eleStrokeStyle(t,e,F),s.drawEdgePath(e,t,o.allpts,d),t.lineCap="butt")},_=function(){var F=arguments.length>0&&arguments[0]!==void 0?arguments[0]:v;if(t.lineWidth=p+g,t.lineCap=m,g>0)s.colorStrokeStyle(t,y[0],y[1],y[2],F);else{t.lineCap="butt";return}f==="straight-triangle"?s.drawEdgeTrianglePath(e,t,o.allpts):(s.drawEdgePath(e,t,o.allpts,d),t.lineCap="butt")},T=function(){i&&s.drawEdgeOverlay(t,e)},S=function(){i&&s.drawEdgeUnderlay(t,e)},R=function(){var F=arguments.length>0&&arguments[0]!==void 0?arguments[0]:x;s.drawArrowheads(t,e,F)},A=function(){s.drawElementText(t,e,null,n)};t.lineJoin="round";var I=e.pstyle("ghost").value==="yes";if(I){var P=e.pstyle("ghost-offset-x").pfValue,O=e.pstyle("ghost-offset-y").pfValue,C=e.pstyle("ghost-opacity").value,N=v*C;t.translate(P,O),k(N),R(N),t.translate(-P,-O)}else _();S(),k(),R(),T(),A(),r&&t.translate(l.x1,l.y1)}};gIe=function(e){if(!["overlay","underlay"].includes(e))throw new Error("Invalid state");return function(r,n){if(n.visible()){var i=n.pstyle("".concat(e,"-opacity")).value;if(i!==0){var a=this,s=a.usePaths(),o=n._private.rscratch,l=n.pstyle("".concat(e,"-padding")).pfValue,u=2*l,h=n.pstyle("".concat(e,"-color")).value;r.lineWidth=u,o.edgeType==="self"&&!s?r.lineCap="butt":r.lineCap="round",a.colorStrokeStyle(r,h[0],h[1],h[2],i),a.drawEdgePath(n,r,o.allpts,"solid")}}}};_f.drawEdgeOverlay=gIe("overlay");_f.drawEdgeUnderlay=gIe("underlay");_f.drawEdgePath=function(t,e,r,n){var i=t._private.rscratch,a=e,s,o=!1,l=this.usePaths(),u=t.pstyle("line-dash-pattern").pfValue,h=t.pstyle("line-dash-offset").pfValue;if(l){var f=r.join("$"),d=i.pathCacheKey&&i.pathCacheKey===f;d?(s=e=i.pathCache,o=!0):(s=e=new Path2D,i.pathCacheKey=f,i.pathCache=s)}if(a.setLineDash)switch(n){case"dotted":a.setLineDash([1,1]);break;case"dashed":a.setLineDash(u),a.lineDashOffset=h;break;case"solid":a.setLineDash([]);break}if(!o&&!i.badLine)switch(e.beginPath&&e.beginPath(),e.moveTo(r[0],r[1]),i.edgeType){case"bezier":case"self":case"compound":case"multibezier":for(var p=2;p+35&&arguments[5]!==void 0?arguments[5]:!0,s=this;if(n==null){if(a&&!s.eleTextBiggerThanMin(e))return}else if(n===!1)return;if(e.isNode()){var o=e.pstyle("label");if(!o||!o.value)return;var l=s.getLabelJustification(e),u=e.pstyle("text-metrics").strValue==="glyph";t.textAlign=l,t.textBaseline=u?"alphabetic":"bottom"}else{var h=e.element()._private.rscratch.badLine,f=e.pstyle("label"),d=e.pstyle("source-label"),p=e.pstyle("target-label");if(h||(!f||!f.value)&&(!d||!d.value)&&(!p||!p.value))return;t.textAlign="center",t.textBaseline="bottom"}var m=!r,g;r&&(g=r,t.translate(-g.x1,-g.y1)),i==null?(s.drawText(t,e,null,m,a),e.isEdge()&&(s.drawText(t,e,"source",m,a),s.drawText(t,e,"target",m,a))):s.drawText(t,e,i,m,a),r&&t.translate(g.x1,g.y1)};wg.getFontCache=function(t){var e;this.fontCaches=this.fontCaches||[];for(var r=0;r2&&arguments[2]!==void 0?arguments[2]:!0,n=e.pstyle("font-style").strValue,i=e.pstyle("font-size").pfValue+"px",a=e.pstyle("font-family").strValue,s=e.pstyle("font-weight").strValue,o=r?e.effectiveOpacity()*e.pstyle("text-opacity").value:1,l=e.pstyle("text-outline-opacity").value*o,u=e.pstyle("color").value,h=e.pstyle("text-outline-color").value;t.font=n+" "+s+" "+i+" "+a,t.lineJoin="round",this.colorFillStyle(t,u[0],u[1],u[2],o),this.colorStrokeStyle(t,h[0],h[1],h[2],l)};wg.getTextAngle=function(t,e){var r,n=t._private,i=n.rscratch,a=e?e+"-":"",s=t.pstyle(a+"text-rotation");if(s.strValue==="autorotate"){var o=Bo(i,"labelAngle",e);r=t.isEdge()?o:0}else s.strValue==="none"?r=0:r=s.pfValue;return r};wg.drawText=function(t,e,r){var n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!0,i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,a=e._private,s=a.rscratch,o=i?e.effectiveOpacity():1;if(!(i&&(o===0||e.pstyle("text-opacity").value===0))){r==="main"&&(r=null);var l=Bo(s,"labelX",r),u=Bo(s,"labelY",r),h,f,d=this.getLabelText(e,r);if(d!=null&&d!==""&&!isNaN(l)&&!isNaN(u)){this.setupTextStyle(t,e,i);var p=r?r+"-":"",m=Bo(s,"labelWidth",r),g=Bo(s,"labelHeight",r),y=Bo(s,"labelActualDescent",r),v=e.pstyle(p+"text-margin-x").pfValue,x=e.pstyle(p+"text-margin-y").pfValue,k=e.isEdge(),_=e.pstyle("text-halign").value,T=e.pstyle("text-valign").value;k&&(_="center",T="center"),l+=v,u+=x;var S;n?S=this.getTextAngle(e,r):S=0,S!==0&&(h=l,f=u,t.translate(h,f),t.rotate(S),l=0,u=0);var R=lb(_),A=ub(T);switch(A){case"top":break;case"center":u+=g/2;break;case"bottom":u+=g;break}var I=e.pstyle("text-background-opacity").value,P=e.pstyle("text-border-opacity").value,O=e.pstyle("text-border-width").pfValue,C=e.pstyle("text-background-padding").pfValue,N=e.pstyle("text-background-shape").strValue,B=N==="round-rectangle"||N==="roundrectangle",F=N==="circle",M=2;if(I>0||O>0&&P>0){var $=t.fillStyle,z=t.strokeStyle,q=t.lineWidth,V=e.pstyle("text-background-color").value,U=e.pstyle("text-border-color").value,J=e.pstyle("text-border-style").value,se=I>0,re=O>0&&P>0,me=l-C;switch(R){case"left":me-=m;break;case"center":me-=m/2;break}var ge=u-g-C,ye=m+2*C,_e=g+2*C;if(se&&(t.fillStyle="rgba(".concat(V[0],",").concat(V[1],",").concat(V[2],",").concat(I*o,")")),re&&(t.strokeStyle="rgba(".concat(U[0],",").concat(U[1],",").concat(U[2],",").concat(P*o,")"),t.lineWidth=O,t.setLineDash))switch(J){case"dotted":t.setLineDash([1,1]);break;case"dashed":t.setLineDash([4,2]);break;case"double":t.lineWidth=O/4,t.setLineDash([]);break;case"solid":default:t.setLineDash([]);break}if(B?(t.beginPath(),RRe(t,me,ge,ye,_e,M)):F?(t.beginPath(),nSt(t,me,ge,ye,_e)):(t.beginPath(),t.rect(me,ge,ye,_e)),se&&t.fill(),re&&t.stroke(),re&&J==="double"){var ue=O/2;t.beginPath(),B?RRe(t,me+ue,ge+ue,ye-2*ue,_e-2*ue,M):t.rect(me+ue,ge+ue,ye-2*ue,_e-2*ue),t.stroke()}t.fillStyle=$,t.strokeStyle=z,t.lineWidth=q,t.setLineDash&&t.setLineDash([])}var ie=2*e.pstyle("text-outline-width").pfValue;if(ie>0&&(t.lineWidth=ie),u-=y,e.pstyle("text-wrap").value==="wrap"){var le=Bo(s,"labelWrapCachedLines",r),oe=Bo(s,"labelLineHeight",r),ne=m/2,pe=this.getLabelJustification(e);switch(pe==="auto"||(R==="left"?pe==="left"?l+=-m:pe==="center"&&(l+=-ne):R==="center"?pe==="left"?l+=-ne:pe==="right"&&(l+=ne):R==="right"&&(pe==="center"?l+=ne:pe==="right"&&(l+=m))),A){case"top":u-=(le.length-1)*oe;break;case"center":case"bottom":u-=(le.length-1)*oe;break}for(var te=0;te0&&t.strokeText(le[te],l,u),t.fillText(le[te],l,u),u+=oe}else ie>0&&t.strokeText(d,l,u),t.fillText(d,l,u);S!==0&&(t.rotate(-S),t.translate(-h,-f))}}};e1={};e1.drawNode=function(t,e,r){var n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!0,i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,a=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!0,s=this,o,l,u=e._private,h=u.rscratch,f=e.position();if(!(!Ht(f.x)||!Ht(f.y))&&!(a&&!e.visible())){var d=a?e.effectiveOpacity():1,p=s.usePaths(),m,g=!1,y=e.padding();o=e.width()+2*y,l=e.height()+2*y;var v;r&&(v=r,t.translate(-v.x1,-v.y1));for(var x=e.pstyle("background-image"),k=x.value,_=new Array(k.length),T=new Array(k.length),S=0,R=0;R0&&arguments[0]!==void 0?arguments[0]:N;s.eleFillStyle(t,e,H)},ue=function(){var H=arguments.length>0&&arguments[0]!==void 0?arguments[0]:U;s.colorStrokeStyle(t,B[0],B[1],B[2],H)},ie=function(){var H=arguments.length>0&&arguments[0]!==void 0?arguments[0]:me;s.colorStrokeStyle(t,se[0],se[1],se[2],H)},le=function(H,ve,K,we){var Ee=s.nodePathCache=s.nodePathCache||[],Ke=eDe(K==="polygon"?K+","+we.join(","):K,""+ve,""+H,""+ye),Be=Ee[Ke],De,nt=!1;return Be!=null?(De=Be,nt=!0,h.pathCache=De):(De=new Path2D,Ee[Ke]=h.pathCache=De),{path:De,cacheHit:nt}},oe=e.pstyle("shape").strValue,ne=e.pstyle("shape-polygon-points").pfValue;if(p){t.translate(f.x,f.y);var pe=le(o,l,oe,ne);m=pe.path,g=pe.cacheHit}var te=function(){if(!g){var H=f;p&&(H={x:0,y:0}),s.nodeShapes[s.getNodeShape(e)].draw(m||t,H.x,H.y,o,l,ye,h)}p?t.fill(m):t.fill()},He=function(){for(var H=arguments.length>0&&arguments[0]!==void 0?arguments[0]:d,ve=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,K=u.backgrounding,we=0,Ee=0;Ee0&&arguments[0]!==void 0?arguments[0]:!1,ve=arguments.length>1&&arguments[1]!==void 0?arguments[1]:d;s.hasPie(e)&&(s.drawPie(t,e,ve),H&&(p||s.nodeShapes[s.getNodeShape(e)].draw(t,f.x,f.y,o,l,ye,h)))},ce=function(){var H=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,ve=arguments.length>1&&arguments[1]!==void 0?arguments[1]:d;s.hasStripe(e)&&(t.save(),p?t.clip(h.pathCache):(s.nodeShapes[s.getNodeShape(e)].draw(t,f.x,f.y,o,l,ye,h),t.clip()),s.drawStripe(t,e,ve),t.restore(),H&&(p||s.nodeShapes[s.getNodeShape(e)].draw(t,f.x,f.y,o,l,ye,h)))},st=function(){var H=arguments.length>0&&arguments[0]!==void 0?arguments[0]:d,ve=(O>0?O:-O)*H,K=O>0?0:255;O!==0&&(s.colorFillStyle(t,K,K,K,ve),p?t.fill(m):t.fill())},Ae=function(){if(C>0){if(t.lineWidth=C,t.lineCap=$,t.lineJoin=M,t.setLineDash)switch(F){case"dotted":t.setLineDash([1,1]);break;case"dashed":t.setLineDash(q),t.lineDashOffset=V;break;case"solid":case"double":t.setLineDash([]);break}if(z!=="center"){if(t.save(),t.lineWidth*=2,z==="inside")p?t.clip(m):t.clip();else{var H=new Path2D;H.rect(-o/2-C,-l/2-C,o+2*C,l+2*C),H.addPath(m),t.clip(H,"evenodd")}p?t.stroke(m):t.stroke(),t.restore()}else p?t.stroke(m):t.stroke();if(F==="double"){t.lineWidth=C/3;var ve=t.globalCompositeOperation;t.globalCompositeOperation="destination-out",p?t.stroke(m):t.stroke(),t.globalCompositeOperation=ve}t.setLineDash&&t.setLineDash([])}},Ye=function(){if(J>0){if(t.lineWidth=J,t.lineCap="butt",t.setLineDash)switch(re){case"dotted":t.setLineDash([1,1]);break;case"dashed":t.setLineDash([4,2]);break;case"solid":case"double":t.setLineDash([]);break}var H=f;p&&(H={x:0,y:0});var ve=s.getNodeShape(e),K=C;z==="inside"&&(K=0),z==="outside"&&(K*=2);var we=(o+K+(J+ge))/o,Ee=(l+K+(J+ge))/l,Ke=o*we,Be=l*Ee,De=s.nodeShapes[ve].points,nt;if(p){var We=le(Ke,Be,ve,De);nt=We.path}if(ve==="ellipse")s.drawEllipsePath(nt||t,H.x,H.y,Ke,Be);else if(["round-diamond","round-heptagon","round-hexagon","round-octagon","round-pentagon","round-polygon","round-triangle","round-tag"].includes(ve)){var ut=0,vt=0,gt=0;ve==="round-diamond"?ut=(K+ge+J)*1.4:ve==="round-heptagon"?(ut=(K+ge+J)*1.075,gt=-(K/2+ge+J)/35):ve==="round-hexagon"?ut=(K+ge+J)*1.12:ve==="round-pentagon"?(ut=(K+ge+J)*1.13,gt=-(K/2+ge+J)/15):ve==="round-tag"?(ut=(K+ge+J)*1.12,vt=(K/2+J+ge)*.07):ve==="round-triangle"&&(ut=(K+ge+J)*(Math.PI/2),gt=-(K+ge/2+J)/Math.PI),ut!==0&&(we=(o+ut)/o,Ke=o*we,["round-hexagon","round-tag"].includes(ve)||(Ee=(l+ut)/l,Be=l*Ee)),ye=ye==="auto"?cDe(Ke,Be):ye;for(var mt=Ke/2,ft=Be/2,Dt=ye+(K+J+ge)/2,ht=new Array(De.length/2),yt=new Array(De.length/2),W=0;W0){if(i=i||n.position(),a==null||s==null){var p=n.padding();a=n.width()+2*p,s=n.height()+2*p}o.colorFillStyle(r,h[0],h[1],h[2],u),o.nodeShapes[f].draw(r,i.x,i.y,a+l*2,s+l*2,d),r.fill()}}}};e1.drawNodeOverlay=yIe("overlay");e1.drawNodeUnderlay=yIe("underlay");e1.hasPie=function(t){return t=t[0],t._private.hasPie};e1.hasStripe=function(t){return t=t[0],t._private.hasStripe};e1.drawPie=function(t,e,r,n){e=e[0],n=n||e.position();var i=e.cy().style(),a=e.pstyle("pie-size"),s=e.pstyle("pie-hole"),o=e.pstyle("pie-start-angle").pfValue,l=n.x,u=n.y,h=e.width(),f=e.height(),d=Math.min(h,f)/2,p,m=0,g=this.usePaths();if(g&&(l=0,u=0),a.units==="%"?d=d*a.pfValue:a.pfValue!==void 0&&(d=a.pfValue/2),s.units==="%"?p=d*s.pfValue:s.pfValue!==void 0&&(p=s.pfValue/2),!(p>=d))for(var y=1;y<=i.pieBackgroundN;y++){var v=e.pstyle("pie-"+y+"-background-size").value,x=e.pstyle("pie-"+y+"-background-color").value,k=e.pstyle("pie-"+y+"-background-opacity").value*r,_=v/100;_+m>1&&(_=1-m);var T=1.5*Math.PI+2*Math.PI*m;T+=o;var S=2*Math.PI*_,R=T+S;v===0||m>=1||m+_>1||(p===0?(t.beginPath(),t.moveTo(l,u),t.arc(l,u,d,T,R),t.closePath()):(t.beginPath(),t.arc(l,u,d,T,R),t.arc(l,u,p,R,T,!0),t.closePath()),this.colorFillStyle(t,x[0],x[1],x[2],k),t.fill(),m+=_)}};e1.drawStripe=function(t,e,r,n){e=e[0],n=n||e.position();var i=e.cy().style(),a=n.x,s=n.y,o=e.width(),l=e.height(),u=0,h=this.usePaths();t.save();var f=e.pstyle("stripe-direction").value,d=e.pstyle("stripe-size");switch(f){case"vertical":break;case"righward":t.rotate(-Math.PI/2);break}var p=o,m=l;d.units==="%"?(p=p*d.pfValue,m=m*d.pfValue):d.pfValue!==void 0&&(p=d.pfValue,m=d.pfValue),h&&(a=0,s=0),s-=p/2,a-=m/2;for(var g=1;g<=i.stripeBackgroundN;g++){var y=e.pstyle("stripe-"+g+"-background-size").value,v=e.pstyle("stripe-"+g+"-background-color").value,x=e.pstyle("stripe-"+g+"-background-opacity").value*r,k=y/100;k+u>1&&(k=1-u),!(y===0||u>=1||u+k>1)&&(t.beginPath(),t.rect(a,s+m*u,p,m*k),t.closePath(),this.colorFillStyle(t,v[0],v[1],v[2],x),t.fill(),u+=k)}t.restore()};zo={},iSt=100;zo.getPixelRatio=function(){var t=this.data.contexts[0];if(this.forcedPixelRatio!=null)return this.forcedPixelRatio;var e=this.cy.window(),r=t.backingStorePixelRatio||t.webkitBackingStorePixelRatio||t.mozBackingStorePixelRatio||t.msBackingStorePixelRatio||t.oBackingStorePixelRatio||t.backingStorePixelRatio||1;return(e.devicePixelRatio||1)/r};zo.paintCache=function(t){for(var e=this.paintCaches=this.paintCaches||[],r=!0,n,i=0;ie.minMbLowQualFrames&&(e.motionBlurPxRatio=e.mbPxRBlurry)),e.clearingMotionBlur&&(e.motionBlurPxRatio=1),e.textureDrawLastFrame&&!f&&(h[e.NODE]=!0,h[e.SELECT_BOX]=!0);var x=r.style(),k=r.zoom(),_=s!==void 0?s:k,T=r.pan(),S={x:T.x,y:T.y},R={zoom:k,pan:{x:T.x,y:T.y}},A=e.prevViewport,I=A===void 0||R.zoom!==A.zoom||R.pan.x!==A.pan.x||R.pan.y!==A.pan.y;!I&&!(g&&!m)&&(e.motionBlurPxRatio=1),o&&(S=o),_*=l,S.x*=l,S.y*=l;var P=e.getCachedZSortedEles();function O(ue,ie,le,oe,ne){var pe=ue.globalCompositeOperation;ue.globalCompositeOperation="destination-out",e.colorFillStyle(ue,255,255,255,e.motionBlurTransparency),ue.fillRect(ie,le,oe,ne),ue.globalCompositeOperation=pe}function C(ue,ie){var le,oe,ne,pe;!e.clearingMotionBlur&&(ue===u.bufferContexts[e.MOTIONBLUR_BUFFER_NODE]||ue===u.bufferContexts[e.MOTIONBLUR_BUFFER_DRAG])?(le={x:T.x*p,y:T.y*p},oe=k*p,ne=e.canvasWidth*p,pe=e.canvasHeight*p):(le=S,oe=_,ne=e.canvasWidth,pe=e.canvasHeight),ue.setTransform(1,0,0,1,0,0),ie==="motionBlur"?O(ue,0,0,ne,pe):!n&&(ie===void 0||ie)&&ue.clearRect(0,0,ne,pe),i||(ue.translate(le.x,le.y),ue.scale(oe,oe)),o&&ue.translate(o.x,o.y),s&&ue.scale(s,s)}if(f||(e.textureDrawLastFrame=!1),f){if(e.textureDrawLastFrame=!0,!e.textureCache){e.textureCache={},e.textureCache.bb=r.mutableElements().boundingBox(),e.textureCache.texture=e.data.bufferCanvases[e.TEXTURE_BUFFER];var N=e.data.bufferContexts[e.TEXTURE_BUFFER];N.setTransform(1,0,0,1,0,0),N.clearRect(0,0,e.canvasWidth*e.textureMult,e.canvasHeight*e.textureMult),e.render({forcedContext:N,drawOnlyNodeLayer:!0,forcedPxRatio:l*e.textureMult});var R=e.textureCache.viewport={zoom:r.zoom(),pan:r.pan(),width:e.canvasWidth,height:e.canvasHeight};R.mpan={x:(0-R.pan.x)/R.zoom,y:(0-R.pan.y)/R.zoom}}h[e.DRAG]=!1,h[e.NODE]=!1;var B=u.contexts[e.NODE],F=e.textureCache.texture,R=e.textureCache.viewport;B.setTransform(1,0,0,1,0,0),d?O(B,0,0,R.width,R.height):B.clearRect(0,0,R.width,R.height);var M=x.core("outside-texture-bg-color").value,$=x.core("outside-texture-bg-opacity").value;e.colorFillStyle(B,M[0],M[1],M[2],$),B.fillRect(0,0,R.width,R.height);var k=r.zoom();C(B,!1),B.clearRect(R.mpan.x,R.mpan.y,R.width/R.zoom/l,R.height/R.zoom/l),B.drawImage(F,R.mpan.x,R.mpan.y,R.width/R.zoom/l,R.height/R.zoom/l)}else e.textureOnViewport&&!n&&(e.textureCache=null);var z=r.extent(),q=e.pinching||e.hoverData.dragging||e.swipePanning||e.data.wheelZooming||e.hoverData.draggingEles||e.cy.animated(),V=e.hideEdgesOnViewport&&q,U=[];if(U[e.NODE]=!h[e.NODE]&&d&&!e.clearedForMotionBlur[e.NODE]||e.clearingMotionBlur,U[e.NODE]&&(e.clearedForMotionBlur[e.NODE]=!0),U[e.DRAG]=!h[e.DRAG]&&d&&!e.clearedForMotionBlur[e.DRAG]||e.clearingMotionBlur,U[e.DRAG]&&(e.clearedForMotionBlur[e.DRAG]=!0),h[e.NODE]||i||a||U[e.NODE]){var J=d&&!U[e.NODE]&&p!==1,B=n||(J?e.data.bufferContexts[e.MOTIONBLUR_BUFFER_NODE]:u.contexts[e.NODE]),se=d&&!J?"motionBlur":void 0;C(B,se),V?e.drawCachedNodes(B,P.nondrag,l,z):e.drawLayeredElements(B,P.nondrag,l,z),e.debug&&e.drawDebugPoints(B,P.nondrag),!i&&!d&&(h[e.NODE]=!1)}if(!a&&(h[e.DRAG]||i||U[e.DRAG])){var J=d&&!U[e.DRAG]&&p!==1,B=n||(J?e.data.bufferContexts[e.MOTIONBLUR_BUFFER_DRAG]:u.contexts[e.DRAG]);C(B,d&&!J?"motionBlur":void 0),V?e.drawCachedNodes(B,P.drag,l,z):e.drawCachedElements(B,P.drag,l,z),e.debug&&e.drawDebugPoints(B,P.drag),!i&&!d&&(h[e.DRAG]=!1)}if(this.drawSelectionRectangle(t,C),d&&p!==1){var re=u.contexts[e.NODE],me=e.data.bufferCanvases[e.MOTIONBLUR_BUFFER_NODE],ge=u.contexts[e.DRAG],ye=e.data.bufferCanvases[e.MOTIONBLUR_BUFFER_DRAG],_e=function(ie,le,oe){ie.setTransform(1,0,0,1,0,0),oe||!v?ie.clearRect(0,0,e.canvasWidth,e.canvasHeight):O(ie,0,0,e.canvasWidth,e.canvasHeight);var ne=p;ie.drawImage(le,0,0,e.canvasWidth*ne,e.canvasHeight*ne,0,0,e.canvasWidth,e.canvasHeight)};(h[e.NODE]||U[e.NODE])&&(_e(re,me,U[e.NODE]),h[e.NODE]=!1),(h[e.DRAG]||U[e.DRAG])&&(_e(ge,ye,U[e.DRAG]),h[e.DRAG]=!1)}e.prevViewport=R,e.clearingMotionBlur&&(e.clearingMotionBlur=!1,e.motionBlurCleared=!0,e.motionBlur=!0),d&&(e.motionBlurTimeout=setTimeout(function(){e.motionBlurTimeout=null,e.clearedForMotionBlur[e.NODE]=!1,e.clearedForMotionBlur[e.DRAG]=!1,e.motionBlur=!1,e.clearingMotionBlur=!f,e.mbFrames=0,h[e.NODE]=!0,h[e.DRAG]=!0,e.redraw()},iSt)),n||r.emit("render")};zo.drawSelectionRectangle=function(t,e){var r=this,n=r.cy,i=r.data,a=n.style(),s=t.drawOnlyNodeLayer,o=t.drawAllLayers,l=i.canvasNeedsRedraw,u=t.forcedContext;if(r.showFps||!s&&l[r.SELECT_BOX]&&!o){var h=u||i.contexts[r.SELECT_BOX];if(e(h),r.selection[4]==1&&(r.hoverData.selecting||r.touchData.selecting)){var f=r.cy.zoom(),d=a.core("selection-box-border-width").value/f;h.lineWidth=d,h.fillStyle="rgba("+a.core("selection-box-color").value[0]+","+a.core("selection-box-color").value[1]+","+a.core("selection-box-color").value[2]+","+a.core("selection-box-opacity").value+")",h.fillRect(r.selection[0],r.selection[1],r.selection[2]-r.selection[0],r.selection[3]-r.selection[1]),d>0&&(h.strokeStyle="rgba("+a.core("selection-box-border-color").value[0]+","+a.core("selection-box-border-color").value[1]+","+a.core("selection-box-border-color").value[2]+","+a.core("selection-box-opacity").value+")",h.strokeRect(r.selection[0],r.selection[1],r.selection[2]-r.selection[0],r.selection[3]-r.selection[1]))}if(i.bgActivePosistion&&!r.hoverData.selecting){var f=r.cy.zoom(),p=i.bgActivePosistion;h.fillStyle="rgba("+a.core("active-bg-color").value[0]+","+a.core("active-bg-color").value[1]+","+a.core("active-bg-color").value[2]+","+a.core("active-bg-opacity").value+")",h.beginPath(),h.arc(p.x,p.y,a.core("active-bg-size").pfValue/f,0,2*Math.PI),h.fill()}var m=r.lastRedrawTime;if(r.showFps&&m){m=Math.round(m);var g=Math.round(1e3/m),y="1 frame = "+m+" ms = "+g+" fps";if(h.setTransform(1,0,0,1,0,0),h.fillStyle="rgba(255, 0, 0, 0.75)",h.strokeStyle="rgba(255, 0, 0, 0.75)",h.font="30px Arial",!M8){var v=h.measureText(y);M8=v.actualBoundingBoxAscent}h.fillText(y,0,M8);var x=60;h.strokeRect(0,M8+10,250,20),h.fillRect(0,M8+10,250*Math.min(g/x,1),20)}o||(l[r.SELECT_BOX]=!1)}};IRe=typeof Float32Array<"u"?Float32Array:Array;Math.hypot||(Math.hypot=function(){for(var t=0,e=arguments.length;e--;)t+=arguments[e]*arguments[e];return Math.sqrt(t)});xSt=(function(){function t(e,r,n,i){Zp(this,t),this.debugID=Math.floor(Math.random()*1e4),this.r=e,this.texSize=r,this.texRows=n,this.texHeight=Math.floor(r/n),this.enableWrapping=!0,this.locked=!1,this.texture=null,this.needsBuffer=!0,this.freePointer={x:0,row:0},this.keyToLocation=new Map,this.canvas=i(e,r,r),this.scratch=i(e,r,this.texHeight,"scratch")}return Qp(t,[{key:"lock",value:function(){this.locked=!0}},{key:"getKeys",value:function(){return new Set(this.keyToLocation.keys())}},{key:"getScale",value:function(r){var n=r.w,i=r.h,a=this.texHeight,s=this.texSize,o=a/i,l=n*o,u=i*o;return l>s&&(o=s/n,l=n*o,u=i*o),{scale:o,texW:l,texH:u}}},{key:"draw",value:function(r,n,i){var a=this;if(this.locked)throw new Error("can't draw, atlas is locked");var s=this.texSize,o=this.texRows,l=this.texHeight,u=this.getScale(n),h=u.scale,f=u.texW,d=u.texH,p=function(k,_){if(i&&_){var T=_.context,S=k.x,R=k.row,A=S,I=l*R;T.save(),T.translate(A,I),T.scale(h,h),i(T,n),T.restore()}},m=[null,null],g=function(){p(a.freePointer,a.canvas),m[0]={x:a.freePointer.x,y:a.freePointer.row*l,w:f,h:d},m[1]={x:a.freePointer.x+f,y:a.freePointer.row*l,w:0,h:d},a.freePointer.x+=f,a.freePointer.x==s&&(a.freePointer.x=0,a.freePointer.row++)},y=function(){var k=a.scratch,_=a.canvas;k.clear(),p({x:0,row:0},k);var T=s-a.freePointer.x,S=f-T,R=l;{var A=a.freePointer.x,I=a.freePointer.row*l,P=T;_.context.drawImage(k,0,0,P,R,A,I,P,R),m[0]={x:A,y:I,w:P,h:d}}{var O=T,C=(a.freePointer.row+1)*l,N=S;_&&_.context.drawImage(k,O,0,N,R,0,C,N,R),m[1]={x:0,y:C,w:N,h:d}}a.freePointer.x=S,a.freePointer.row++},v=function(){a.freePointer.x=0,a.freePointer.row++};if(this.freePointer.x+f<=s)g();else{if(this.freePointer.row>=o-1)return!1;this.freePointer.x===s?(v(),g()):this.enableWrapping?y():(v(),g())}return this.keyToLocation.set(r,m),this.needsBuffer=!0,m}},{key:"getOffsets",value:function(r){return this.keyToLocation.get(r)}},{key:"isEmpty",value:function(){return this.freePointer.x===0&&this.freePointer.row===0}},{key:"canFit",value:function(r){if(this.locked)return!1;var n=this.texSize,i=this.texRows,a=this.getScale(r),s=a.texW;return this.freePointer.x+s>n?this.freePointer.row1&&arguments[1]!==void 0?arguments[1]:{},a=i.forceRedraw,s=a===void 0?!1:a,o=i.filterEle,l=o===void 0?function(){return!0}:o,u=i.filterType,h=u===void 0?function(){return!0}:u,f=!1,d=!1,p=yl(r),m;try{for(p.s();!(m=p.n()).done;){var g=m.value;if(l(g)){var y=yl(this.renderTypes.values()),v;try{var x=function(){var _=v.value,T=_.type;if(h(T)){var S=n.collections.get(_.collection),R=_.getKey(g),A=Array.isArray(R)?R:[R];if(s)A.forEach(function(C){return S.markKeyForGC(C)}),d=!0;else{var I=_.getID?_.getID(g):g.id(),P=n._key(T,I),O=n.typeAndIdToKey.get(P);O!==void 0&&!cSt(A,O)&&(f=!0,n.typeAndIdToKey.delete(P),O.forEach(function(C){return S.markKeyForGC(C)}))}}};for(y.s();!(v=y.n()).done;)x()}catch(k){y.e(k)}finally{y.f()}}}}catch(k){p.e(k)}finally{p.f()}return d&&(this.gc(),f=!1),f}},{key:"gc",value:function(){var r=yl(this.collections.values()),n;try{for(r.s();!(n=r.n()).done;){var i=n.value;i.gc()}}catch(a){r.e(a)}finally{r.f()}}},{key:"getOrCreateAtlas",value:function(r,n,i,a){var s=this.renderTypes.get(n),o=this.collections.get(s.collection),l=!1,u=o.draw(a,i,function(d){s.drawClipped?(d.save(),d.beginPath(),d.rect(0,0,i.w,i.h),d.clip(),s.drawElement(d,r,i,!0,!0),d.restore()):s.drawElement(d,r,i,!0,!0),l=!0});if(l){var h=s.getID?s.getID(r):r.id(),f=this._key(n,h);this.typeAndIdToKey.has(f)?this.typeAndIdToKey.get(f).push(a):this.typeAndIdToKey.set(f,[a])}return u}},{key:"getAtlasInfo",value:function(r,n){var i=this,a=this.renderTypes.get(n),s=a.getKey(r),o=Array.isArray(s)?s:[s];return o.map(function(l){var u=a.getBoundingBox(r,l),h=i.getOrCreateAtlas(r,n,u,l),f=h.getOffsets(l),d=Da(f,2),p=d[0],m=d[1];return{atlas:h,tex:p,tex1:p,tex2:m,bb:u}})}},{key:"getDebugInfo",value:function(){var r=[],n=yl(this.collections),i;try{for(n.s();!(i=n.n()).done;){var a=Da(i.value,2),s=a[0],o=a[1],l=o.getCounts(),u=l.keyCount,h=l.atlasCount;r.push({type:s,keyCount:u,atlasCount:h})}}catch(f){n.e(f)}finally{n.f()}return r}}])})(),TSt=(function(){function t(e){Zp(this,t),this.globalOptions=e,this.atlasSize=e.webglTexSize,this.maxAtlasesPerBatch=e.webglTexPerBatch,this.batchAtlases=[]}return Qp(t,[{key:"getMaxAtlasesPerBatch",value:function(){return this.maxAtlasesPerBatch}},{key:"getAtlasSize",value:function(){return this.atlasSize}},{key:"getIndexArray",value:function(){return Array.from({length:this.maxAtlasesPerBatch},function(r,n){return n})}},{key:"startBatch",value:function(){this.batchAtlases=[]}},{key:"getAtlasCount",value:function(){return this.batchAtlases.length}},{key:"getAtlases",value:function(){return this.batchAtlases}},{key:"canAddToCurrentBatch",value:function(r){return this.batchAtlases.length===this.maxAtlasesPerBatch?this.batchAtlases.includes(r):!0}},{key:"getAtlasIndexForBatch",value:function(r){var n=this.batchAtlases.indexOf(r);if(n<0){if(this.batchAtlases.length===this.maxAtlasesPerBatch)throw new Error("cannot add more atlases to batch");this.batchAtlases.push(r),n=this.batchAtlases.length-1}return n}}])})(),ESt=` float circleSD(vec2 p, float r) { return distance(vec2(0), p) - r; // signed distance } -`,XTt=` +`,SSt=` float rectangleSD(vec2 p, vec2 b) { vec2 d = abs(p)-b; return distance(vec2(0),max(d,0.0)) + min(max(d.x,d.y),0.0); } -`,jTt=` +`,CSt=` float roundRectangleSD(vec2 p, vec2 b, vec4 cr) { cr.xy = (p.x > 0.0) ? cr.xy : cr.zw; cr.x = (p.y > 0.0) ? cr.x : cr.y; vec2 q = abs(p) - b + cr.x; return min(max(q.x, q.y), 0.0) + distance(vec2(0), max(q, 0.0)) - cr.x; } -`,KTt=` +`,_St=` float ellipseSD(vec2 p, vec2 ab) { p = abs( p ); // symmetry @@ -1972,28 +2228,28 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho vec2 v = ab*vec2(-cs.y,cs.x); w = w + dot(p-u,v)/(dot(p-u,u)+dot(v,v)); } - + // compute final point and distance float d = length(p-ab*vec2(cos(w),sin(w))); - + // return signed distance return (dot(p/ab,p/ab)>1.0) ? d : -d; } -`,E6={SCREEN:{name:"screen",screen:!0},PICKING:{name:"picking",picking:!0}},aL={IGNORE:1,USE_BB:2},wH=0,uAe=1,cAe=2,kH=3,Bx=4,M9=5,v6=6,y6=7,ZTt=(function(){function t(e,r,n){q0(this,t),this.r=e,this.gl=r,this.maxInstances=n.webglBatchSize,this.atlasSize=n.webglTexSize,this.bgColor=n.bgColor,this.debug=n.webglDebug,this.batchDebugInfo=[],n.enableWrapping=!0,n.createTextureCanvas=LTt,this.atlasManager=new HTt(e,n),this.batchManager=new WTt(n),this.simpleShapeOptions=new Map,this.program=this._createShaderProgram(E6.SCREEN),this.pickingProgram=this._createShaderProgram(E6.PICKING),this.vao=this._createVAO()}return V0(t,[{key:"addAtlasCollection",value:function(r,n){this.atlasManager.addAtlasCollection(r,n)}},{key:"addTextureAtlasRenderType",value:function(r,n){this.atlasManager.addRenderType(r,n)}},{key:"addSimpleShapeRenderType",value:function(r,n){this.simpleShapeOptions.set(r,n)}},{key:"invalidate",value:function(r){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},a=n.type,i=this.atlasManager;return a?i.invalidate(r,{filterType:function(o){return o===a},forceRedraw:!0}):i.invalidate(r)}},{key:"gc",value:function(){this.atlasManager.gc()}},{key:"_createShaderProgram",value:function(r){var n=this.gl,a=`#version 300 es +`,G8={SCREEN:{name:"screen",screen:!0},PICKING:{name:"picking",picking:!0}},FR={IGNORE:1,USE_BB:2},MY=0,ORe=1,PRe=2,NY=3,K4=4,pR=5,N8=6,O8=7,ASt=(function(){function t(e,r,n){Zp(this,t),this.r=e,this.gl=r,this.maxInstances=n.webglBatchSize,this.atlasSize=n.webglTexSize,this.bgColor=n.bgColor,this.debug=n.webglDebug,this.batchDebugInfo=[],n.enableWrapping=!0,n.createTextureCanvas=sSt,this.atlasManager=new kSt(e,n),this.batchManager=new TSt(n),this.simpleShapeOptions=new Map,this.program=this._createShaderProgram(G8.SCREEN),this.pickingProgram=this._createShaderProgram(G8.PICKING),this.vao=this._createVAO()}return Qp(t,[{key:"addAtlasCollection",value:function(r,n){this.atlasManager.addAtlasCollection(r,n)}},{key:"addTextureAtlasRenderType",value:function(r,n){this.atlasManager.addRenderType(r,n)}},{key:"addSimpleShapeRenderType",value:function(r,n){this.simpleShapeOptions.set(r,n)}},{key:"invalidate",value:function(r){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=n.type,a=this.atlasManager;return i?a.invalidate(r,{filterType:function(o){return o===i},forceRedraw:!0}):a.invalidate(r)}},{key:"gc",value:function(){this.atlasManager.gc()}},{key:"_createShaderProgram",value:function(r){var n=this.gl,i=`#version 300 es precision highp float; uniform mat3 uPanZoomMatrix; uniform int uAtlasSize; - + // instanced in vec2 aPosition; // a vertex from the unit square - + in mat3 aTransform; // used to transform verticies, eg into a bounding box in int aVertType; // the type of thing we are rendering // the z-index that is output when using picking mode in vec4 aIndex; - + // For textures in int aAtlasId; // which shader unit/atlas to use in vec4 aTex; // x/y/w/h of texture in atlas @@ -2013,7 +2269,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho out vec4 vColor; out vec2 vPosition; // flat values are not interpolated - flat out int vAtlasId; + flat out int vAtlasId; flat out int vVertType; flat out vec2 vTopRight; flat out vec2 vBotLeft; @@ -2021,12 +2277,12 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho flat out vec4 vBorderColor; flat out vec2 vBorderWidth; flat out vec4 vIndex; - + void main(void) { int vid = gl_VertexID; vec2 position = aPosition; // TODO make this a vec3, simplifies some code below - if(aVertType == `.concat(wH,`) { + if(aVertType == `.concat(MY,`) { float texX = aTex.x; // texture coordinates float texY = aTex.y; float texW = aTex.z; @@ -2044,8 +2300,8 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho gl_Position = vec4(uPanZoomMatrix * aTransform * vec3(position, 1.0), 1.0); } - else if(aVertType == `).concat(Bx," || aVertType == ").concat(y6,` - || aVertType == `).concat(M9," || aVertType == ").concat(v6,`) { // simple shapes + else if(aVertType == `).concat(K4," || aVertType == ").concat(O8,` + || aVertType == `).concat(pR," || aVertType == ").concat(N8,`) { // simple shapes // the bounding box is needed by the fragment shader vBotLeft = (aTransform * vec3(0, 0, 1)).xy; // flat @@ -2060,7 +2316,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho gl_Position = vec4(uPanZoomMatrix * aTransform * vec3(position, 1.0), 1.0); } - else if(aVertType == `).concat(uAe,`) { + else if(aVertType == `).concat(ORe,`) { vec2 source = aPointAPointB.xy; vec2 target = aPointAPointB.zw; @@ -2074,8 +2330,8 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho gl_Position = vec4(uPanZoomMatrix * vec3(point, 1.0), 1.0); vColor = aColor; - } - else if(aVertType == `).concat(cAe,`) { + } + else if(aVertType == `).concat(PRe,`) { vec2 pointA = aPointAPointB.xy; vec2 pointB = aPointAPointB.zw; vec2 pointC = aPointCPointD.xy; @@ -2123,8 +2379,8 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho } vColor = aColor; - } - else if(aVertType == `).concat(kH,` && vid < 3) { + } + else if(aVertType == `).concat(NY,` && vid < 3) { // massage the first triangle into an edge arrow if(vid == 0) position = vec2(-0.15, -0.3); @@ -2144,11 +2400,11 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho vVertType = aVertType; vIndex = aIndex; } - `),i=this.batchManager.getIndexArray(),s=`#version 300 es + `),a=this.batchManager.getIndexArray(),s=`#version 300 es precision highp float; // declare texture unit for each texture atlas in the batch - `.concat(i.map(function(u){return"uniform sampler2D uTexture".concat(u,";")}).join(` + `.concat(a.map(function(u){return"uniform sampler2D uTexture".concat(u,";")}).join(` `),` uniform vec4 uBGColor; @@ -2169,40 +2425,40 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho out vec4 outColor; - `).concat(YTt,` - `).concat(XTt,` - `).concat(jTt,` - `).concat(KTt,` + `).concat(ESt,` + `).concat(SSt,` + `).concat(CSt,` + `).concat(_St,` vec4 blend(vec4 top, vec4 bot) { // blend colors with premultiplied alpha - return vec4( + return vec4( top.rgb + (bot.rgb * (1.0 - top.a)), - top.a + (bot.a * (1.0 - top.a)) + top.a + (bot.a * (1.0 - top.a)) ); } vec4 distInterp(vec4 cA, vec4 cB, float d) { // interpolate color using Signed Distance // scale to the zoom level so that borders don't look blurry when zoomed in // note 1.5 is an aribitrary value chosen because it looks good - return mix(cA, cB, 1.0 - smoothstep(0.0, 1.5 / uZoom, abs(d))); + return mix(cA, cB, 1.0 - smoothstep(0.0, 1.5 / uZoom, abs(d))); } void main(void) { - if(vVertType == `).concat(wH,`) { + if(vVertType == `).concat(MY,`) { // look up the texel from the texture unit - `).concat(i.map(function(u){return"if(vAtlasId == ".concat(u,") outColor = texture(uTexture").concat(u,", vTexCoord);")}).join(` + `).concat(a.map(function(u){return"if(vAtlasId == ".concat(u,") outColor = texture(uTexture").concat(u,", vTexCoord);")}).join(` else `),` - } - else if(vVertType == `).concat(kH,`) { + } + else if(vVertType == `).concat(NY,`) { // mimics how canvas renderer uses context.globalCompositeOperation = 'destination-out'; outColor = blend(vColor, uBGColor); outColor.a = 1.0; // make opaque, masks out line under arrow } - else if(vVertType == `).concat(Bx,` && vBorderWidth == vec2(0.0)) { // simple rectangle with no border + else if(vVertType == `).concat(K4,` && vBorderWidth == vec2(0.0)) { // simple rectangle with no border outColor = vColor; // unit square is already transformed to the rectangle, nothing else needs to be done } - else if(vVertType == `).concat(Bx," || vVertType == ").concat(y6,` - || vVertType == `).concat(M9," || vVertType == ").concat(v6,`) { // use SDF + else if(vVertType == `).concat(K4," || vVertType == ").concat(O8,` + || vVertType == `).concat(pR," || vVertType == ").concat(N8,`) { // use SDF float outerBorder = vBorderWidth[0]; float innerBorder = vBorderWidth[1]; @@ -2213,11 +2469,11 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho vec2 p = vPosition - vec2(vTopRight.x - b[0] - outerBorder, vTopRight.y - b[1] - outerBorder); // translate to center float d; // signed distance - if(vVertType == `).concat(Bx,`) { + if(vVertType == `).concat(K4,`) { d = rectangleSD(p, b); - } else if(vVertType == `).concat(y6,` && w == h) { + } else if(vVertType == `).concat(O8,` && w == h) { d = circleSD(p, b.x); // faster than ellipse - } else if(vVertType == `).concat(y6,`) { + } else if(vVertType == `).concat(O8,`) { d = ellipseSD(p, b); } else { d = roundRectangleSD(p, b, vCornerRadius.wzyx); @@ -2236,7 +2492,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho vec4 outerColor = outerBorder == 0.0 ? vec4(0) : vBorderColor; vec4 innerBorderColor = blend(vBorderColor, vColor); outColor = distInterp(innerBorderColor, outerColor, d); - } + } else { vec4 outerColor; if(innerBorder == 0.0 && outerBorder == 0.0) { @@ -2257,46 +2513,46 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho `).concat(r.picking?`if(outColor.a == 0.0) discard; else outColor = vIndex;`:"",` } - `),o=ATt(n,a,s);o.aPosition=n.getAttribLocation(o,"aPosition"),o.aIndex=n.getAttribLocation(o,"aIndex"),o.aVertType=n.getAttribLocation(o,"aVertType"),o.aTransform=n.getAttribLocation(o,"aTransform"),o.aAtlasId=n.getAttribLocation(o,"aAtlasId"),o.aTex=n.getAttribLocation(o,"aTex"),o.aPointAPointB=n.getAttribLocation(o,"aPointAPointB"),o.aPointCPointD=n.getAttribLocation(o,"aPointCPointD"),o.aLineWidth=n.getAttribLocation(o,"aLineWidth"),o.aColor=n.getAttribLocation(o,"aColor"),o.aCornerRadius=n.getAttribLocation(o,"aCornerRadius"),o.aBorderColor=n.getAttribLocation(o,"aBorderColor"),o.uPanZoomMatrix=n.getUniformLocation(o,"uPanZoomMatrix"),o.uAtlasSize=n.getUniformLocation(o,"uAtlasSize"),o.uBGColor=n.getUniformLocation(o,"uBGColor"),o.uZoom=n.getUniformLocation(o,"uZoom"),o.uTextures=[];for(var l=0;l1&&arguments[1]!==void 0?arguments[1]:E6.SCREEN;this.panZoomMatrix=r,this.renderTarget=n,this.batchDebugInfo=[],this.wrappedCount=0,this.simpleCount=0,this.startBatch()}},{key:"startBatch",value:function(){this.instanceCount=0,this.batchManager.startBatch()}},{key:"endFrame",value:function(){this.endBatch()}},{key:"_isVisible",value:function(r,n){return r.visible()?n&&n.isVisible?n.isVisible(r):!0:!1}},{key:"drawTexture",value:function(r,n,a){var i=this.atlasManager,s=this.batchManager,o=i.getRenderTypeOpts(a);if(this._isVisible(r,o)&&!(r.isEdge()&&!this._isValidEdge(r))){if(this.renderTarget.picking&&o.getTexPickingMode){var l=o.getTexPickingMode(r);if(l===aL.IGNORE)return;if(l==aL.USE_BB){this.drawPickingRectangle(r,n,a);return}}var u=i.getAtlasInfo(r,a),h=So(u),f;try{for(h.s();!(f=h.n()).done;){var d=f.value,p=d.atlas,m=d.tex1,g=d.tex2;s.canAddToCurrentBatch(p)||this.endBatch();for(var v=s.getAtlasIndexForBatch(p),y=0,b=[[m,!0],[g,!1]];y=this.maxInstances&&this.endBatch()}}}}catch(D){h.e(D)}finally{h.f()}}}},{key:"setTransformMatrix",value:function(r,n,a,i){var s=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,o=0;if(a.shapeProps&&a.shapeProps.padding&&(o=r.pstyle(a.shapeProps.padding).pfValue),i){var l=i.bb,u=i.tex1,h=i.tex2,f=u.w/(u.w+h.w);s||(f=1-f);var d=this._getAdjustedBB(l,o,s,f);this._applyTransformMatrix(n,d,a,r)}else{var p=a.getBoundingBox(r),m=this._getAdjustedBB(p,o,!0,1);this._applyTransformMatrix(n,m,a,r)}}},{key:"_applyTransformMatrix",value:function(r,n,a,i){var s,o;oAe(r);var l=a.getRotation?a.getRotation(i):0;if(l!==0){var u=a.getRotationPoint(i),h=u.x,f=u.y;H9(r,r,[h,f]),lAe(r,r,l);var d=a.getRotationOffset(i);s=d.x+(n.xOffset||0),o=d.y+(n.yOffset||0)}else s=n.x1,o=n.y1;H9(r,r,[s,o]),UH(r,r,[n.w,n.h])}},{key:"_getAdjustedBB",value:function(r,n,a,i){var s=r.x1,o=r.y1,l=r.w,u=r.h,h=r.yOffset;n&&(s-=n,o-=n,l+=2*n,u+=2*n);var f=0,d=l*i;return a&&i<1?l=d:!a&&i<1&&(f=l-d,s+=f,l=d),{x1:s,y1:o,w:l,h:u,xOffset:f,yOffset:h}}},{key:"drawPickingRectangle",value:function(r,n,a){var i=this.atlasManager.getRenderTypeOpts(a),s=this.instanceCount;this.vertTypeBuffer.getView(s)[0]=Bx;var o=this.indexBuffer.getView(s);Px(n,o);var l=this.colorBuffer.getView(s);Jm([0,0,0],1,l);var u=this.transformBuffer.getMatrixView(s);this.setTransformMatrix(r,u,i),this.simpleCount++,this.instanceCount++,this.instanceCount>=this.maxInstances&&this.endBatch()}},{key:"drawNode",value:function(r,n,a){var i=this.simpleShapeOptions.get(a);if(this._isVisible(r,i)){var s=i.shapeProps,o=this._getVertTypeForShape(r,s.shape);if(o===void 0||i.isSimple&&!i.isSimple(r,this.renderTarget)){this.drawTexture(r,n,a);return}var l=this.instanceCount;if(this.vertTypeBuffer.getView(l)[0]=o,o===M9||o===v6){var u=i.getBoundingBox(r),h=this._getCornerRadius(r,s.radius,u),f=this.cornerRadiusBuffer.getView(l);f[0]=h,f[1]=h,f[2]=h,f[3]=h,o===v6&&(f[0]=0,f[2]=0)}var d=this.indexBuffer.getView(l);Px(n,d);var p=this.renderTarget.picking?1:a==="node-body"?r.effectiveOpacity():1,m=this.renderTarget.picking?1:r.pstyle(s.opacity).value*p,g=r.pstyle(s.color).value,v=this.colorBuffer.getView(l);Jm(g,m,v);var y=this.lineWidthBuffer.getView(l);if(y[0]=0,y[1]=0,s.border){var b=r.pstyle("border-width").value;if(b>0){var w=r.pstyle("border-color").value,C=p*r.pstyle("border-opacity").value,k=this.borderColorBuffer.getView(l);Jm(w,C,k);var E=r.pstyle("border-position").value;if(E==="inside")y[0]=0,y[1]=-b;else if(E==="outside")y[0]=b,y[1]=0;else{var _=b/2;y[0]=_,y[1]=-_}}}var S=this.transformBuffer.getMatrixView(l);this.setTransformMatrix(r,S,i),this.simpleCount++,this.instanceCount++,this.instanceCount>=this.maxInstances&&this.endBatch()}}},{key:"_getVertTypeForShape",value:function(r,n){var a=r.pstyle(n).value;switch(a){case"rectangle":return Bx;case"ellipse":return y6;case"roundrectangle":case"round-rectangle":return M9;case"bottom-round-rectangle":return v6;default:return}}},{key:"_getCornerRadius",value:function(r,n,a){var i=a.w,s=a.h;if(r.pstyle(n).value==="auto")return z0(i,s);var o=r.pstyle(n).pfValue,l=i/2,u=s/2;return Math.min(o,u,l)}},{key:"drawEdgeArrow",value:function(r,n,a){if(r.visible()){var i=r._private.rscratch,s,o,l;if(a==="source"?(s=i.arrowStartX,o=i.arrowStartY,l=i.srcArrowAngle):(s=i.arrowEndX,o=i.arrowEndY,l=i.tgtArrowAngle),!(isNaN(s)||s==null||isNaN(o)||o==null||isNaN(l)||l==null)){var u=r.pstyle(a+"-arrow-shape").value;if(u!=="none"){var h=r.pstyle(a+"-arrow-color").value,f=r.pstyle("opacity").value,d=r.pstyle("line-opacity").value,p=f*d,m=r.pstyle("width").pfValue,g=r.pstyle("arrow-scale").value,v=this.r.getArrowWidth(m,g),y=this.instanceCount,b=this.transformBuffer.getMatrixView(y);oAe(b),H9(b,b,[s,o]),UH(b,b,[v,v]),lAe(b,b,l),this.vertTypeBuffer.getView(y)[0]=kH;var w=this.indexBuffer.getView(y);Px(n,w);var C=this.colorBuffer.getView(y);Jm(h,p,C),this.instanceCount++,this.instanceCount>=this.maxInstances&&this.endBatch()}}}}},{key:"drawEdgeLine",value:function(r,n){if(r.visible()){var a=this._getEdgePoints(r);if(a){var i=r.pstyle("opacity").value,s=r.pstyle("line-opacity").value,o=r.pstyle("width").pfValue,l=r.pstyle("line-color").value,u=i*s;if(a.length/2+this.instanceCount>this.maxInstances&&this.endBatch(),a.length==4){var h=this.instanceCount;this.vertTypeBuffer.getView(h)[0]=uAe;var f=this.indexBuffer.getView(h);Px(n,f);var d=this.colorBuffer.getView(h);Jm(l,u,d);var p=this.lineWidthBuffer.getView(h);p[0]=o;var m=this.pointAPointBBuffer.getView(h);m[0]=a[0],m[1]=a[1],m[2]=a[2],m[3]=a[3],this.instanceCount++,this.instanceCount>=this.maxInstances&&this.endBatch()}else for(var g=0;g=this.maxInstances&&this.endBatch()}}}}},{key:"_isValidEdge",value:function(r){var n=r._private.rscratch;return!(n.badLine||n.allpts==null||isNaN(n.allpts[0]))}},{key:"_getEdgePoints",value:function(r){var n=r._private.rscratch;if(this._isValidEdge(r)){var a=n.allpts;if(a.length==4)return a;var i=this._getNumSegments(r);return this._getCurveSegmentPoints(a,i)}}},{key:"_getNumSegments",value:function(r){var n=15;return Math.min(Math.max(n,5),this.maxInstances)}},{key:"_getCurveSegmentPoints",value:function(r,n){if(r.length==4)return r;for(var a=Array((n+1)*2),i=0;i<=n;i++)if(i==0)a[0]=r[0],a[1]=r[1];else if(i==n)a[i*2]=r[r.length-2],a[i*2+1]=r[r.length-1];else{var s=i/n;this._setCurvePoint(r,s,a,i*2)}return a}},{key:"_setCurvePoint",value:function(r,n,a,i){if(r.length<=2)a[i]=r[0],a[i+1]=r[1];else{for(var s=Array(r.length-2),o=0;o0}},o=function(f){var d=f.pstyle("text-events").strValue==="yes";return d?aL.USE_BB:aL.IGNORE},l=function(f){var d=f.position(),p=d.x,m=d.y,g=f.outerWidth(),v=f.outerHeight();return{w:g,h:v,x1:p-g/2,y1:m-v/2}};r.drawing.addAtlasCollection("node",{texRows:t.webglTexRowsNodes}),r.drawing.addAtlasCollection("label",{texRows:t.webglTexRows}),r.drawing.addTextureAtlasRenderType("node-body",{collection:"node",getKey:e.getStyleKey,getBoundingBox:e.getElementBox,drawElement:e.drawElement}),r.drawing.addSimpleShapeRenderType("node-body",{getBoundingBox:l,isSimple:DTt,shapeProps:{shape:"shape",color:"background-color",opacity:"background-opacity",radius:"corner-radius",border:!0}}),r.drawing.addSimpleShapeRenderType("node-overlay",{getBoundingBox:l,isVisible:s("overlay"),shapeProps:{shape:"overlay-shape",color:"overlay-color",opacity:"overlay-opacity",padding:"overlay-padding",radius:"overlay-corner-radius"}}),r.drawing.addSimpleShapeRenderType("node-underlay",{getBoundingBox:l,isVisible:s("underlay"),shapeProps:{shape:"underlay-shape",color:"underlay-color",opacity:"underlay-opacity",padding:"underlay-padding",radius:"underlay-corner-radius"}}),r.drawing.addTextureAtlasRenderType("label",{collection:"label",getTexPickingMode:o,getKey:TH(e.getLabelKey,null),getBoundingBox:EH(e.getLabelBox,null),drawClipped:!0,drawElement:e.drawLabel,getRotation:a(null),getRotationPoint:e.getLabelRotationPoint,getRotationOffset:e.getLabelRotationOffset,isVisible:i("label")}),r.drawing.addTextureAtlasRenderType("edge-source-label",{collection:"label",getTexPickingMode:o,getKey:TH(e.getSourceLabelKey,"source"),getBoundingBox:EH(e.getSourceLabelBox,"source"),drawClipped:!0,drawElement:e.drawSourceLabel,getRotation:a("source"),getRotationPoint:e.getSourceLabelRotationPoint,getRotationOffset:e.getSourceLabelRotationOffset,isVisible:i("source-label")}),r.drawing.addTextureAtlasRenderType("edge-target-label",{collection:"label",getTexPickingMode:o,getKey:TH(e.getTargetLabelKey,"target"),getBoundingBox:EH(e.getTargetLabelBox,"target"),drawClipped:!0,drawElement:e.drawTargetLabel,getRotation:a("target"),getRotationPoint:e.getTargetLabelRotationPoint,getRotationOffset:e.getTargetLabelRotationOffset,isVisible:i("target-label")});var u=$6(function(){console.log("garbage collect flag set"),r.data.gc=!0},1e4);r.onUpdateEleCalcs(function(h,f){var d=!1;f&&f.length>0&&(d|=r.drawing.invalidate(f)),d&&u()}),JTt(r)};TH=function(e,r){return function(n){var a=e(n),i=j9e(n,r);return i.length>1?i.map(function(s,o){return"".concat(a,"_").concat(o)}):a}},EH=function(e,r){return function(n,a){var i=e(n);if(typeof a=="string"){var s=a.indexOf("_");if(s>0){var o=Number(a.substring(s+1)),l=j9e(n,r),u=i.h/l.length,h=u*o,f=i.y1+h;return{x1:i.x1,w:i.w,y1:f,h:u,yOffset:h}}}return i}};Y0={};Y0.drawPolygonPath=function(t,e,r,n,a,i){var s=n/2,o=a/2;t.beginPath&&t.beginPath(),t.moveTo(e+s*i[0],r+o*i[1]);for(var l=1;l0&&s>0){p.clearRect(0,0,i,s),p.globalCompositeOperation="source-over";var m=this.getCachedZSortedEles();if(t.full)p.translate(-n.x1*u,-n.y1*u),p.scale(u,u),this.drawElements(p,m),p.scale(1/u,1/u),p.translate(n.x1*u,n.y1*u);else{var g=e.pan(),v={x:g.x*u,y:g.y*u};u*=e.zoom(),p.translate(v.x,v.y),p.scale(u,u),this.drawElements(p,m),p.scale(1/u,1/u),p.translate(-v.x,-v.y)}t.bg&&(p.globalCompositeOperation="destination-over",p.fillStyle=t.bg,p.rect(0,0,i,s),p.fill())}return d};W6.png=function(t){return J9e(t,this.bufferCanvasImage(t),"image/png")};W6.jpg=function(t){return J9e(t,this.bufferCanvasImage(t),"image/jpeg")};eLe={};eLe.nodeShapeImpl=function(t,e,r,n,a,i,s,o){switch(t){case"ellipse":return this.drawEllipsePath(e,r,n,a,i);case"polygon":return this.drawPolygonPath(e,r,n,a,i,s);case"round-polygon":return this.drawRoundPolygonPath(e,r,n,a,i,s,o);case"roundrectangle":case"round-rectangle":return this.drawRoundRectanglePath(e,r,n,a,i,o);case"cutrectangle":case"cut-rectangle":return this.drawCutRectanglePath(e,r,n,a,i,s,o);case"bottomroundrectangle":case"bottom-round-rectangle":return this.drawBottomRoundRectanglePath(e,r,n,a,i,o);case"barrel":return this.drawBarrelPath(e,r,n,a,i)}};uEt=tLe,yr=tLe.prototype;yr.CANVAS_LAYERS=3;yr.SELECT_BOX=0;yr.DRAG=1;yr.NODE=2;yr.WEBGL=3;yr.CANVAS_TYPES=["2d","2d","2d","webgl2"];yr.BUFFER_COUNT=3;yr.TEXTURE_BUFFER=0;yr.MOTIONBLUR_BUFFER_NODE=1;yr.MOTIONBLUR_BUFFER_DRAG=2;yr.redrawHint=function(t,e){var r=this;switch(t){case"eles":r.data.canvasNeedsRedraw[yr.NODE]=e;break;case"drag":r.data.canvasNeedsRedraw[yr.DRAG]=e;break;case"select":r.data.canvasNeedsRedraw[yr.SELECT_BOX]=e;break;case"gc":r.data.gc=!0;break}};cEt=typeof Path2D<"u";yr.path2dEnabled=function(t){if(t===void 0)return this.pathsEnabled;this.pathsEnabled=!!t};yr.usePaths=function(){return cEt&&this.pathsEnabled};yr.setImgSmoothing=function(t,e){t.imageSmoothingEnabled!=null?t.imageSmoothingEnabled=e:(t.webkitImageSmoothingEnabled=e,t.mozImageSmoothingEnabled=e,t.msImageSmoothingEnabled=e)};yr.getImgSmoothing=function(t){return t.imageSmoothingEnabled!=null?t.imageSmoothingEnabled:t.webkitImageSmoothingEnabled||t.mozImageSmoothingEnabled||t.msImageSmoothingEnabled};yr.makeOffscreenCanvas=function(t,e){var r;if((typeof OffscreenCanvas>"u"?"undefined":ei(OffscreenCanvas))!=="undefined")r=new OffscreenCanvas(t,e);else{var n=this.cy.window(),a=n.document;r=a.createElement("canvas"),r.width=t,r.height=e}return r};[q9e,ih,kf,mW,fg,W0,Xs,X9e,Y0,W6,eLe].forEach(function(t){jt(yr,t)});hEt=[{name:"null",impl:A9e},{name:"base",impl:z9e},{name:"canvas",impl:uEt}],fEt=[{type:"layout",extensions:Okt},{type:"renderer",extensions:hEt}],rLe={},nLe={};HH=function(){if(arguments.length===2)return iLe.apply(null,arguments);if(arguments.length===3)return aLe.apply(null,arguments);if(arguments.length===4)return pEt.apply(null,arguments);if(arguments.length===5)return dEt.apply(null,arguments);jn("Invalid extension access syntax")};N6.prototype.extension=HH;fEt.forEach(function(t){t.extensions.forEach(function(e){aLe(t.type,e.name,e.impl)})});iL=function(){if(!(this instanceof iL))return new iL;this.length=0},cg=iL.prototype;cg.instanceString=function(){return"stylesheet"};cg.selector=function(t){var e=this.length++;return this[e]={selector:t,properties:[]},this};cg.css=function(t,e){var r=this.length-1;if(Yt(t))this[r].properties.push({name:t,value:e});else if(Gr(t))for(var n=t,a=Object.keys(n),i=0;i{(function(e,r){typeof Y6=="object"&&typeof yW=="object"?yW.exports=r():typeof define=="function"&&define.amd?define([],r):typeof Y6=="object"?Y6.layoutBase=r():e.layoutBase=r()})(Y6,function(){return(function(t){var e={};function r(n){if(e[n])return e[n].exports;var a=e[n]={i:n,l:!1,exports:{}};return t[n].call(a.exports,a,a.exports,r),a.l=!0,a.exports}return r.m=t,r.c=e,r.i=function(n){return n},r.d=function(n,a,i){r.o(n,a)||Object.defineProperty(n,a,{configurable:!1,enumerable:!0,get:i})},r.n=function(n){var a=n&&n.__esModule?function(){return n.default}:function(){return n};return r.d(a,"a",a),a},r.o=function(n,a){return Object.prototype.hasOwnProperty.call(n,a)},r.p="",r(r.s=26)})([(function(t,e,r){"use strict";function n(){}n.QUALITY=1,n.DEFAULT_CREATE_BENDS_AS_NEEDED=!1,n.DEFAULT_INCREMENTAL=!1,n.DEFAULT_ANIMATION_ON_LAYOUT=!0,n.DEFAULT_ANIMATION_DURING_LAYOUT=!1,n.DEFAULT_ANIMATION_PERIOD=50,n.DEFAULT_UNIFORM_LEAF_NODE_SIZES=!1,n.DEFAULT_GRAPH_MARGIN=15,n.NODE_DIMENSIONS_INCLUDE_LABELS=!1,n.SIMPLE_NODE_SIZE=40,n.SIMPLE_NODE_HALF_SIZE=n.SIMPLE_NODE_SIZE/2,n.EMPTY_COMPOUND_NODE_SIZE=40,n.MIN_EDGE_LENGTH=1,n.WORLD_BOUNDARY=1e6,n.INITIAL_WORLD_BOUNDARY=n.WORLD_BOUNDARY/1e3,n.WORLD_CENTER_X=1200,n.WORLD_CENTER_Y=900,t.exports=n}),(function(t,e,r){"use strict";var n=r(2),a=r(8),i=r(9);function s(l,u,h){n.call(this,h),this.isOverlapingSourceAndTarget=!1,this.vGraphObject=h,this.bendpoints=[],this.source=l,this.target=u}s.prototype=Object.create(n.prototype);for(var o in n)s[o]=n[o];s.prototype.getSource=function(){return this.source},s.prototype.getTarget=function(){return this.target},s.prototype.isInterGraph=function(){return this.isInterGraph},s.prototype.getLength=function(){return this.length},s.prototype.isOverlapingSourceAndTarget=function(){return this.isOverlapingSourceAndTarget},s.prototype.getBendpoints=function(){return this.bendpoints},s.prototype.getLca=function(){return this.lca},s.prototype.getSourceInLca=function(){return this.sourceInLca},s.prototype.getTargetInLca=function(){return this.targetInLca},s.prototype.getOtherEnd=function(l){if(this.source===l)return this.target;if(this.target===l)return this.source;throw"Node is not incident with this edge"},s.prototype.getOtherEndInGraph=function(l,u){for(var h=this.getOtherEnd(l),f=u.getGraphManager().getRoot();;){if(h.getOwner()==u)return h;if(h.getOwner()==f)break;h=h.getOwner().getParent()}return null},s.prototype.updateLength=function(){var l=new Array(4);this.isOverlapingSourceAndTarget=a.getIntersection(this.target.getRect(),this.source.getRect(),l),this.isOverlapingSourceAndTarget||(this.lengthX=l[0]-l[2],this.lengthY=l[1]-l[3],Math.abs(this.lengthX)<1&&(this.lengthX=i.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=i.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY))},s.prototype.updateLengthSimple=function(){this.lengthX=this.target.getCenterX()-this.source.getCenterX(),this.lengthY=this.target.getCenterY()-this.source.getCenterY(),Math.abs(this.lengthX)<1&&(this.lengthX=i.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=i.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY)},t.exports=s}),(function(t,e,r){"use strict";function n(a){this.vGraphObject=a}t.exports=n}),(function(t,e,r){"use strict";var n=r(2),a=r(10),i=r(13),s=r(0),o=r(16),l=r(4);function u(f,d,p,m){p==null&&m==null&&(m=d),n.call(this,m),f.graphManager!=null&&(f=f.graphManager),this.estimatedSize=a.MIN_VALUE,this.inclusionTreeDepth=a.MAX_VALUE,this.vGraphObject=m,this.edges=[],this.graphManager=f,p!=null&&d!=null?this.rect=new i(d.x,d.y,p.width,p.height):this.rect=new i}u.prototype=Object.create(n.prototype);for(var h in n)u[h]=n[h];u.prototype.getEdges=function(){return this.edges},u.prototype.getChild=function(){return this.child},u.prototype.getOwner=function(){return this.owner},u.prototype.getWidth=function(){return this.rect.width},u.prototype.setWidth=function(f){this.rect.width=f},u.prototype.getHeight=function(){return this.rect.height},u.prototype.setHeight=function(f){this.rect.height=f},u.prototype.getCenterX=function(){return this.rect.x+this.rect.width/2},u.prototype.getCenterY=function(){return this.rect.y+this.rect.height/2},u.prototype.getCenter=function(){return new l(this.rect.x+this.rect.width/2,this.rect.y+this.rect.height/2)},u.prototype.getLocation=function(){return new l(this.rect.x,this.rect.y)},u.prototype.getRect=function(){return this.rect},u.prototype.getDiagonal=function(){return Math.sqrt(this.rect.width*this.rect.width+this.rect.height*this.rect.height)},u.prototype.getHalfTheDiagonal=function(){return Math.sqrt(this.rect.height*this.rect.height+this.rect.width*this.rect.width)/2},u.prototype.setRect=function(f,d){this.rect.x=f.x,this.rect.y=f.y,this.rect.width=d.width,this.rect.height=d.height},u.prototype.setCenter=function(f,d){this.rect.x=f-this.rect.width/2,this.rect.y=d-this.rect.height/2},u.prototype.setLocation=function(f,d){this.rect.x=f,this.rect.y=d},u.prototype.moveBy=function(f,d){this.rect.x+=f,this.rect.y+=d},u.prototype.getEdgeListToNode=function(f){var d=[],p,m=this;return m.edges.forEach(function(g){if(g.target==f){if(g.source!=m)throw"Incorrect edge source!";d.push(g)}}),d},u.prototype.getEdgesBetween=function(f){var d=[],p,m=this;return m.edges.forEach(function(g){if(!(g.source==m||g.target==m))throw"Incorrect edge source and/or target";(g.target==f||g.source==f)&&d.push(g)}),d},u.prototype.getNeighborsList=function(){var f=new Set,d=this;return d.edges.forEach(function(p){if(p.source==d)f.add(p.target);else{if(p.target!=d)throw"Incorrect incidency!";f.add(p.source)}}),f},u.prototype.withChildren=function(){var f=new Set,d,p;if(f.add(this),this.child!=null)for(var m=this.child.getNodes(),g=0;gd&&(this.rect.x-=(this.labelWidth-d)/2,this.setWidth(this.labelWidth)),this.labelHeight>p&&(this.labelPos=="center"?this.rect.y-=(this.labelHeight-p)/2:this.labelPos=="top"&&(this.rect.y-=this.labelHeight-p),this.setHeight(this.labelHeight))}}},u.prototype.getInclusionTreeDepth=function(){if(this.inclusionTreeDepth==a.MAX_VALUE)throw"assert failed";return this.inclusionTreeDepth},u.prototype.transform=function(f){var d=this.rect.x;d>s.WORLD_BOUNDARY?d=s.WORLD_BOUNDARY:d<-s.WORLD_BOUNDARY&&(d=-s.WORLD_BOUNDARY);var p=this.rect.y;p>s.WORLD_BOUNDARY?p=s.WORLD_BOUNDARY:p<-s.WORLD_BOUNDARY&&(p=-s.WORLD_BOUNDARY);var m=new l(d,p),g=f.inverseTransformPoint(m);this.setLocation(g.x,g.y)},u.prototype.getLeft=function(){return this.rect.x},u.prototype.getRight=function(){return this.rect.x+this.rect.width},u.prototype.getTop=function(){return this.rect.y},u.prototype.getBottom=function(){return this.rect.y+this.rect.height},u.prototype.getParent=function(){return this.owner==null?null:this.owner.getParent()},t.exports=u}),(function(t,e,r){"use strict";function n(a,i){a==null&&i==null?(this.x=0,this.y=0):(this.x=a,this.y=i)}n.prototype.getX=function(){return this.x},n.prototype.getY=function(){return this.y},n.prototype.setX=function(a){this.x=a},n.prototype.setY=function(a){this.y=a},n.prototype.getDifference=function(a){return new DimensionD(this.x-a.x,this.y-a.y)},n.prototype.getCopy=function(){return new n(this.x,this.y)},n.prototype.translate=function(a){return this.x+=a.width,this.y+=a.height,this},t.exports=n}),(function(t,e,r){"use strict";var n=r(2),a=r(10),i=r(0),s=r(6),o=r(3),l=r(1),u=r(13),h=r(12),f=r(11);function d(m,g,v){n.call(this,v),this.estimatedSize=a.MIN_VALUE,this.margin=i.DEFAULT_GRAPH_MARGIN,this.edges=[],this.nodes=[],this.isConnected=!1,this.parent=m,g!=null&&g instanceof s?this.graphManager=g:g!=null&&g instanceof Layout&&(this.graphManager=g.graphManager)}d.prototype=Object.create(n.prototype);for(var p in n)d[p]=n[p];d.prototype.getNodes=function(){return this.nodes},d.prototype.getEdges=function(){return this.edges},d.prototype.getGraphManager=function(){return this.graphManager},d.prototype.getParent=function(){return this.parent},d.prototype.getLeft=function(){return this.left},d.prototype.getRight=function(){return this.right},d.prototype.getTop=function(){return this.top},d.prototype.getBottom=function(){return this.bottom},d.prototype.isConnected=function(){return this.isConnected},d.prototype.add=function(m,g,v){if(g==null&&v==null){var y=m;if(this.graphManager==null)throw"Graph has no graph mgr!";if(this.getNodes().indexOf(y)>-1)throw"Node already in graph!";return y.owner=this,this.getNodes().push(y),y}else{var b=m;if(!(this.getNodes().indexOf(g)>-1&&this.getNodes().indexOf(v)>-1))throw"Source or target not in graph!";if(!(g.owner==v.owner&&g.owner==this))throw"Both owners must be this graph!";return g.owner!=v.owner?null:(b.source=g,b.target=v,b.isInterGraph=!1,this.getEdges().push(b),g.edges.push(b),v!=g&&v.edges.push(b),b)}},d.prototype.remove=function(m){var g=m;if(m instanceof o){if(g==null)throw"Node is null!";if(!(g.owner!=null&&g.owner==this))throw"Owner graph is invalid!";if(this.graphManager==null)throw"Owner graph manager is invalid!";for(var v=g.edges.slice(),y,b=v.length,w=0;w-1&&E>-1))throw"Source and/or target doesn't know this edge!";y.source.edges.splice(k,1),y.target!=y.source&&y.target.edges.splice(E,1);var C=y.source.owner.getEdges().indexOf(y);if(C==-1)throw"Not in owner's edge list!";y.source.owner.getEdges().splice(C,1)}},d.prototype.updateLeftTop=function(){for(var m=a.MAX_VALUE,g=a.MAX_VALUE,v,y,b,w=this.getNodes(),C=w.length,k=0;kv&&(m=v),g>y&&(g=y)}return m==a.MAX_VALUE?null:(w[0].getParent().paddingLeft!=null?b=w[0].getParent().paddingLeft:b=this.margin,this.left=g-b,this.top=m-b,new h(this.left,this.top))},d.prototype.updateBounds=function(m){for(var g=a.MAX_VALUE,v=-a.MAX_VALUE,y=a.MAX_VALUE,b=-a.MAX_VALUE,w,C,k,E,_,S=this.nodes,L=S.length,M=0;Mw&&(g=w),vk&&(y=k),bw&&(g=w),vk&&(y=k),b=this.nodes.length){var L=0;v.forEach(function(M){M.owner==m&&L++}),L==this.nodes.length&&(this.isConnected=!0)}},t.exports=d}),(function(t,e,r){"use strict";var n,a=r(1);function i(s){n=r(5),this.layout=s,this.graphs=[],this.edges=[]}i.prototype.addRoot=function(){var s=this.layout.newGraph(),o=this.layout.newNode(null),l=this.add(s,o);return this.setRootGraph(l),this.rootGraph},i.prototype.add=function(s,o,l,u,h){if(l==null&&u==null&&h==null){if(s==null)throw"Graph is null!";if(o==null)throw"Parent node is null!";if(this.graphs.indexOf(s)>-1)throw"Graph already in this graph mgr!";if(this.graphs.push(s),s.parent!=null)throw"Already has a parent!";if(o.child!=null)throw"Already has a child!";return s.parent=o,o.child=s,s}else{h=l,u=o,l=s;var f=u.getOwner(),d=h.getOwner();if(!(f!=null&&f.getGraphManager()==this))throw"Source not in this graph mgr!";if(!(d!=null&&d.getGraphManager()==this))throw"Target not in this graph mgr!";if(f==d)return l.isInterGraph=!1,f.add(l,u,h);if(l.isInterGraph=!0,l.source=u,l.target=h,this.edges.indexOf(l)>-1)throw"Edge already in inter-graph edge list!";if(this.edges.push(l),!(l.source!=null&&l.target!=null))throw"Edge source and/or target is null!";if(!(l.source.edges.indexOf(l)==-1&&l.target.edges.indexOf(l)==-1))throw"Edge already in source and/or target incidency list!";return l.source.edges.push(l),l.target.edges.push(l),l}},i.prototype.remove=function(s){if(s instanceof n){var o=s;if(o.getGraphManager()!=this)throw"Graph not in this graph mgr";if(!(o==this.rootGraph||o.parent!=null&&o.parent.graphManager==this))throw"Invalid parent node!";var l=[];l=l.concat(o.getEdges());for(var u,h=l.length,f=0;f=s.getRight()?o[0]+=Math.min(s.getX()-i.getX(),i.getRight()-s.getRight()):s.getX()<=i.getX()&&s.getRight()>=i.getRight()&&(o[0]+=Math.min(i.getX()-s.getX(),s.getRight()-i.getRight())),i.getY()<=s.getY()&&i.getBottom()>=s.getBottom()?o[1]+=Math.min(s.getY()-i.getY(),i.getBottom()-s.getBottom()):s.getY()<=i.getY()&&s.getBottom()>=i.getBottom()&&(o[1]+=Math.min(i.getY()-s.getY(),s.getBottom()-i.getBottom()));var h=Math.abs((s.getCenterY()-i.getCenterY())/(s.getCenterX()-i.getCenterX()));s.getCenterY()===i.getCenterY()&&s.getCenterX()===i.getCenterX()&&(h=1);var f=h*o[0],d=o[1]/h;o[0]f)return o[0]=l,o[1]=p,o[2]=h,o[3]=S,!1;if(uh)return o[0]=d,o[1]=u,o[2]=E,o[3]=f,!1;if(lh?(o[0]=g,o[1]=v,T=!0):(o[0]=m,o[1]=p,T=!0):N===R&&(l>h?(o[0]=d,o[1]=p,T=!0):(o[0]=y,o[1]=v,T=!0)),-O===R?h>l?(o[2]=_,o[3]=S,I=!0):(o[2]=E,o[3]=k,I=!0):O===R&&(h>l?(o[2]=C,o[3]=k,I=!0):(o[2]=L,o[3]=S,I=!0)),T&&I)return!1;if(l>h?u>f?(P=this.getCardinalDirection(N,R,4),B=this.getCardinalDirection(O,R,2)):(P=this.getCardinalDirection(-N,R,3),B=this.getCardinalDirection(-O,R,1)):u>f?(P=this.getCardinalDirection(-N,R,1),B=this.getCardinalDirection(-O,R,3)):(P=this.getCardinalDirection(N,R,2),B=this.getCardinalDirection(O,R,4)),!T)switch(P){case 1:G=p,F=l+-w/R,o[0]=F,o[1]=G;break;case 2:F=y,G=u+b*R,o[0]=F,o[1]=G;break;case 3:G=v,F=l+w/R,o[0]=F,o[1]=G;break;case 4:F=g,G=u+-b*R,o[0]=F,o[1]=G;break}if(!I)switch(B){case 1:H=k,z=h+-D/R,o[2]=z,o[3]=H;break;case 2:z=L,H=f+M*R,o[2]=z,o[3]=H;break;case 3:H=S,z=h+D/R,o[2]=z,o[3]=H;break;case 4:z=_,H=f+-M*R,o[2]=z,o[3]=H;break}}return!1},a.getCardinalDirection=function(i,s,o){return i>s?o:1+o%4},a.getIntersection=function(i,s,o,l){if(l==null)return this.getIntersection2(i,s,o);var u=i.x,h=i.y,f=s.x,d=s.y,p=o.x,m=o.y,g=l.x,v=l.y,y=void 0,b=void 0,w=void 0,C=void 0,k=void 0,E=void 0,_=void 0,S=void 0,L=void 0;return w=d-h,k=u-f,_=f*h-u*d,C=v-m,E=p-g,S=g*m-p*v,L=w*E-C*k,L===0?null:(y=(k*S-E*_)/L,b=(C*_-w*S)/L,new n(y,b))},a.angleOfVector=function(i,s,o,l){var u=void 0;return i!==o?(u=Math.atan((l-s)/(o-i)),o0?1:a<0?-1:0},n.floor=function(a){return a<0?Math.ceil(a):Math.floor(a)},n.ceil=function(a){return a<0?Math.floor(a):Math.ceil(a)},t.exports=n}),(function(t,e,r){"use strict";function n(){}n.MAX_VALUE=2147483647,n.MIN_VALUE=-2147483648,t.exports=n}),(function(t,e,r){"use strict";var n=(function(){function u(h,f){for(var d=0;d"u"?"undefined":n(i);return i==null||s!="object"&&s!="function"},t.exports=a}),(function(t,e,r){"use strict";function n(p){if(Array.isArray(p)){for(var m=0,g=Array(p.length);m0&&m;){for(w.push(k[0]);w.length>0&&m;){var E=w[0];w.splice(0,1),b.add(E);for(var _=E.getEdges(),y=0;y<_.length;y++){var S=_[y].getOtherEnd(E);if(C.get(E)!=S)if(!b.has(S))w.push(S),C.set(S,E);else{m=!1;break}}}if(!m)p=[];else{var L=[].concat(n(b));p.push(L);for(var y=0;y-1&&k.splice(D,1)}b=new Set,C=new Map}}return p},d.prototype.createDummyNodesForBendpoints=function(p){for(var m=[],g=p.source,v=this.graphManager.calcLowestCommonAncestor(p.source,p.target),y=0;y0){for(var v=this.edgeToDummyNodes.get(g),y=0;y=0&&m.splice(S,1);var L=C.getNeighborsList();L.forEach(function(T){if(g.indexOf(T)<0){var I=v.get(T),N=I-1;N==1&&E.push(T),v.set(T,N)}})}g=g.concat(E),(m.length==1||m.length==2)&&(y=!0,b=m[0])}return b},d.prototype.setGraphManager=function(p){this.graphManager=p},t.exports=d}),(function(t,e,r){"use strict";function n(){}n.seed=1,n.x=0,n.nextDouble=function(){return n.x=Math.sin(n.seed++)*1e4,n.x-Math.floor(n.x)},t.exports=n}),(function(t,e,r){"use strict";var n=r(4);function a(i,s){this.lworldOrgX=0,this.lworldOrgY=0,this.ldeviceOrgX=0,this.ldeviceOrgY=0,this.lworldExtX=1,this.lworldExtY=1,this.ldeviceExtX=1,this.ldeviceExtY=1}a.prototype.getWorldOrgX=function(){return this.lworldOrgX},a.prototype.setWorldOrgX=function(i){this.lworldOrgX=i},a.prototype.getWorldOrgY=function(){return this.lworldOrgY},a.prototype.setWorldOrgY=function(i){this.lworldOrgY=i},a.prototype.getWorldExtX=function(){return this.lworldExtX},a.prototype.setWorldExtX=function(i){this.lworldExtX=i},a.prototype.getWorldExtY=function(){return this.lworldExtY},a.prototype.setWorldExtY=function(i){this.lworldExtY=i},a.prototype.getDeviceOrgX=function(){return this.ldeviceOrgX},a.prototype.setDeviceOrgX=function(i){this.ldeviceOrgX=i},a.prototype.getDeviceOrgY=function(){return this.ldeviceOrgY},a.prototype.setDeviceOrgY=function(i){this.ldeviceOrgY=i},a.prototype.getDeviceExtX=function(){return this.ldeviceExtX},a.prototype.setDeviceExtX=function(i){this.ldeviceExtX=i},a.prototype.getDeviceExtY=function(){return this.ldeviceExtY},a.prototype.setDeviceExtY=function(i){this.ldeviceExtY=i},a.prototype.transformX=function(i){var s=0,o=this.lworldExtX;return o!=0&&(s=this.ldeviceOrgX+(i-this.lworldOrgX)*this.ldeviceExtX/o),s},a.prototype.transformY=function(i){var s=0,o=this.lworldExtY;return o!=0&&(s=this.ldeviceOrgY+(i-this.lworldOrgY)*this.ldeviceExtY/o),s},a.prototype.inverseTransformX=function(i){var s=0,o=this.ldeviceExtX;return o!=0&&(s=this.lworldOrgX+(i-this.ldeviceOrgX)*this.lworldExtX/o),s},a.prototype.inverseTransformY=function(i){var s=0,o=this.ldeviceExtY;return o!=0&&(s=this.lworldOrgY+(i-this.ldeviceOrgY)*this.lworldExtY/o),s},a.prototype.inverseTransformPoint=function(i){var s=new n(this.inverseTransformX(i.x),this.inverseTransformY(i.y));return s},t.exports=a}),(function(t,e,r){"use strict";function n(f){if(Array.isArray(f)){for(var d=0,p=Array(f.length);di.ADAPTATION_LOWER_NODE_LIMIT&&(this.coolingFactor=Math.max(this.coolingFactor*i.COOLING_ADAPTATION_FACTOR,this.coolingFactor-(f-i.ADAPTATION_LOWER_NODE_LIMIT)/(i.ADAPTATION_UPPER_NODE_LIMIT-i.ADAPTATION_LOWER_NODE_LIMIT)*this.coolingFactor*(1-i.COOLING_ADAPTATION_FACTOR))),this.maxNodeDisplacement=i.MAX_NODE_DISPLACEMENT_INCREMENTAL):(f>i.ADAPTATION_LOWER_NODE_LIMIT?this.coolingFactor=Math.max(i.COOLING_ADAPTATION_FACTOR,1-(f-i.ADAPTATION_LOWER_NODE_LIMIT)/(i.ADAPTATION_UPPER_NODE_LIMIT-i.ADAPTATION_LOWER_NODE_LIMIT)*(1-i.COOLING_ADAPTATION_FACTOR)):this.coolingFactor=1,this.initialCoolingFactor=this.coolingFactor,this.maxNodeDisplacement=i.MAX_NODE_DISPLACEMENT),this.maxIterations=Math.max(this.getAllNodes().length*5,this.maxIterations),this.totalDisplacementThreshold=this.displacementThresholdPerNode*this.getAllNodes().length,this.repulsionRange=this.calcRepulsionRange()},u.prototype.calcSpringForces=function(){for(var f=this.getAllEdges(),d,p=0;p0&&arguments[0]!==void 0?arguments[0]:!0,d=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,p,m,g,v,y=this.getAllNodes(),b;if(this.useFRGridVariant)for(this.totalIterations%i.GRID_CALCULATION_CHECK_PERIOD==1&&f&&this.updateGrid(),b=new Set,p=0;pw||b>w)&&(f.gravitationForceX=-this.gravityConstant*g,f.gravitationForceY=-this.gravityConstant*v)):(w=d.getEstimatedSize()*this.compoundGravityRangeFactor,(y>w||b>w)&&(f.gravitationForceX=-this.gravityConstant*g*this.compoundGravityConstant,f.gravitationForceY=-this.gravityConstant*v*this.compoundGravityConstant))},u.prototype.isConverged=function(){var f,d=!1;return this.totalIterations>this.maxIterations/3&&(d=Math.abs(this.totalDisplacement-this.oldTotalDisplacement)<2),f=this.totalDisplacement=y.length||w>=y[0].length)){for(var C=0;Cu}}]),o})();t.exports=s}),(function(t,e,r){"use strict";var n=(function(){function s(o,l){for(var u=0;u2&&arguments[2]!==void 0?arguments[2]:1,h=arguments.length>3&&arguments[3]!==void 0?arguments[3]:-1,f=arguments.length>4&&arguments[4]!==void 0?arguments[4]:-1;a(this,s),this.sequence1=o,this.sequence2=l,this.match_score=u,this.mismatch_penalty=h,this.gap_penalty=f,this.iMax=o.length+1,this.jMax=l.length+1,this.grid=new Array(this.iMax);for(var d=0;d=0;o--){var l=this.listeners[o];l.event===i&&l.callback===s&&this.listeners.splice(o,1)}},a.emit=function(i,s){for(var o=0;o{(function(e,r){typeof X6=="object"&&typeof bW=="object"?bW.exports=r(xW()):typeof define=="function"&&define.amd?define(["layout-base"],r):typeof X6=="object"?X6.coseBase=r(xW()):e.coseBase=r(e.layoutBase)})(X6,function(t){return(function(e){var r={};function n(a){if(r[a])return r[a].exports;var i=r[a]={i:a,l:!1,exports:{}};return e[a].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=r,n.i=function(a){return a},n.d=function(a,i,s){n.o(a,i)||Object.defineProperty(a,i,{configurable:!1,enumerable:!0,get:s})},n.n=function(a){var i=a&&a.__esModule?function(){return a.default}:function(){return a};return n.d(i,"a",i),i},n.o=function(a,i){return Object.prototype.hasOwnProperty.call(a,i)},n.p="",n(n.s=7)})([(function(e,r){e.exports=t}),(function(e,r,n){"use strict";var a=n(0).FDLayoutConstants;function i(){}for(var s in a)i[s]=a[s];i.DEFAULT_USE_MULTI_LEVEL_SCALING=!1,i.DEFAULT_RADIAL_SEPARATION=a.DEFAULT_EDGE_LENGTH,i.DEFAULT_COMPONENT_SEPERATION=60,i.TILE=!0,i.TILING_PADDING_VERTICAL=10,i.TILING_PADDING_HORIZONTAL=10,i.TREE_REDUCTION_ON_INCREMENTAL=!1,e.exports=i}),(function(e,r,n){"use strict";var a=n(0).FDLayoutEdge;function i(o,l,u){a.call(this,o,l,u)}i.prototype=Object.create(a.prototype);for(var s in a)i[s]=a[s];e.exports=i}),(function(e,r,n){"use strict";var a=n(0).LGraph;function i(o,l,u){a.call(this,o,l,u)}i.prototype=Object.create(a.prototype);for(var s in a)i[s]=a[s];e.exports=i}),(function(e,r,n){"use strict";var a=n(0).LGraphManager;function i(o){a.call(this,o)}i.prototype=Object.create(a.prototype);for(var s in a)i[s]=a[s];e.exports=i}),(function(e,r,n){"use strict";var a=n(0).FDLayoutNode,i=n(0).IMath;function s(l,u,h,f){a.call(this,l,u,h,f)}s.prototype=Object.create(a.prototype);for(var o in a)s[o]=a[o];s.prototype.move=function(){var l=this.graphManager.getLayout();this.displacementX=l.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.noOfChildren,this.displacementY=l.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.noOfChildren,Math.abs(this.displacementX)>l.coolingFactor*l.maxNodeDisplacement&&(this.displacementX=l.coolingFactor*l.maxNodeDisplacement*i.sign(this.displacementX)),Math.abs(this.displacementY)>l.coolingFactor*l.maxNodeDisplacement&&(this.displacementY=l.coolingFactor*l.maxNodeDisplacement*i.sign(this.displacementY)),this.child==null?this.moveBy(this.displacementX,this.displacementY):this.child.getNodes().length==0?this.moveBy(this.displacementX,this.displacementY):this.propogateDisplacementToChildren(this.displacementX,this.displacementY),l.totalDisplacement+=Math.abs(this.displacementX)+Math.abs(this.displacementY),this.springForceX=0,this.springForceY=0,this.repulsionForceX=0,this.repulsionForceY=0,this.gravitationForceX=0,this.gravitationForceY=0,this.displacementX=0,this.displacementY=0},s.prototype.propogateDisplacementToChildren=function(l,u){for(var h=this.getChild().getNodes(),f,d=0;d0)this.positionNodesRadially(k);else{this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var E=new Set(this.getAllNodes()),_=this.nodesWithGravity.filter(function(S){return E.has(S)});this.graphManager.setAllNodesToApplyGravitation(_),this.positionNodesRandomly()}}return this.initSpringEmbedder(),this.runSpringEmbedder(),!0},w.prototype.tick=function(){if(this.totalIterations++,this.totalIterations===this.maxIterations&&!this.isTreeGrowing&&!this.isGrowthFinished)if(this.prunedNodesAll.length>0)this.isTreeGrowing=!0;else return!0;if(this.totalIterations%h.CONVERGENCE_CHECK_PERIOD==0&&!this.isTreeGrowing&&!this.isGrowthFinished){if(this.isConverged())if(this.prunedNodesAll.length>0)this.isTreeGrowing=!0;else return!0;this.coolingCycle++,this.layoutQuality==0?this.coolingAdjuster=this.coolingCycle:this.layoutQuality==1&&(this.coolingAdjuster=this.coolingCycle/3),this.coolingFactor=Math.max(this.initialCoolingFactor-Math.pow(this.coolingCycle,Math.log(100*(this.initialCoolingFactor-this.finalTemperature))/Math.log(this.maxCoolingCycle))/100*this.coolingAdjuster,this.finalTemperature),this.animationPeriod=Math.ceil(this.initialAnimationPeriod*Math.sqrt(this.coolingFactor))}if(this.isTreeGrowing){if(this.growTreeIterations%10==0)if(this.prunedNodesAll.length>0){this.graphManager.updateBounds(),this.updateGrid(),this.growTree(this.prunedNodesAll),this.graphManager.resetAllNodesToApplyGravitation();var k=new Set(this.getAllNodes()),E=this.nodesWithGravity.filter(function(L){return k.has(L)});this.graphManager.setAllNodesToApplyGravitation(E),this.graphManager.updateBounds(),this.updateGrid(),this.coolingFactor=h.DEFAULT_COOLING_FACTOR_INCREMENTAL}else this.isTreeGrowing=!1,this.isGrowthFinished=!0;this.growTreeIterations++}if(this.isGrowthFinished){if(this.isConverged())return!0;this.afterGrowthIterations%10==0&&(this.graphManager.updateBounds(),this.updateGrid()),this.coolingFactor=h.DEFAULT_COOLING_FACTOR_INCREMENTAL*((100-this.afterGrowthIterations)/100),this.afterGrowthIterations++}var _=!this.isTreeGrowing&&!this.isGrowthFinished,S=this.growTreeIterations%10==1&&this.isTreeGrowing||this.afterGrowthIterations%10==1&&this.isGrowthFinished;return this.totalDisplacement=0,this.graphManager.updateBounds(),this.calcSpringForces(),this.calcRepulsionForces(_,S),this.calcGravitationalForces(),this.moveNodes(),this.animate(),!1},w.prototype.getPositionsData=function(){for(var k=this.graphManager.getAllNodes(),E={},_=0;_1){var T;for(T=0;TS&&(S=Math.floor(D.y)),M=Math.floor(D.x+u.DEFAULT_COMPONENT_SEPERATION)}this.transform(new p(f.WORLD_CENTER_X-D.x/2,f.WORLD_CENTER_Y-D.y/2))},w.radialLayout=function(k,E,_){var S=Math.max(this.maxDiagonalInTree(k),u.DEFAULT_RADIAL_SEPARATION);w.branchRadialLayout(E,null,0,359,0,S);var L=y.calculateBounds(k),M=new b;M.setDeviceOrgX(L.getMinX()),M.setDeviceOrgY(L.getMinY()),M.setWorldOrgX(_.x),M.setWorldOrgY(_.y);for(var D=0;D1;){var Q=H[0];H.splice(0,1);var Y=P.indexOf(Q);Y>=0&&P.splice(Y,1),G--,B--}E!=null?z=(P.indexOf(H[0])+1)%G:z=0;for(var ie=Math.abs(S-_)/B,se=z;F!=B;se=++se%G){var oe=P[se].getOtherEnd(k);if(oe!=E){var pe=(_+F*ie)%360,J=(pe+ie)%360;w.branchRadialLayout(oe,k,pe,J,L+M,M),F++}}},w.maxDiagonalInTree=function(k){for(var E=g.MIN_VALUE,_=0;_E&&(E=L)}return E},w.prototype.calcRepulsionRange=function(){return 2*(this.level+1)*this.idealEdgeLength},w.prototype.groupZeroDegreeMembers=function(){var k=this,E={};this.memberGroups={},this.idToDummyNode={};for(var _=[],S=this.graphManager.getAllNodes(),L=0;L"u"&&(E[T]=[]),E[T]=E[T].concat(M)}Object.keys(E).forEach(function(I){if(E[I].length>1){var N="DummyCompound_"+I;k.memberGroups[N]=E[I];var O=E[I][0].getParent(),R=new o(k.graphManager);R.id=N,R.paddingLeft=O.paddingLeft||0,R.paddingRight=O.paddingRight||0,R.paddingBottom=O.paddingBottom||0,R.paddingTop=O.paddingTop||0,k.idToDummyNode[N]=R;var P=k.getGraphManager().add(k.newGraph(),R),B=O.getChild();B.add(R);for(var F=0;F=0;k--){var E=this.compoundOrder[k],_=E.id,S=E.paddingLeft,L=E.paddingTop;this.adjustLocations(this.tiledMemberPack[_],E.rect.x,E.rect.y,S,L)}},w.prototype.repopulateZeroDegreeMembers=function(){var k=this,E=this.tiledZeroDegreePack;Object.keys(E).forEach(function(_){var S=k.idToDummyNode[_],L=S.paddingLeft,M=S.paddingTop;k.adjustLocations(E[_],S.rect.x,S.rect.y,L,M)})},w.prototype.getToBeTiled=function(k){var E=k.id;if(this.toBeTiled[E]!=null)return this.toBeTiled[E];var _=k.getChild();if(_==null)return this.toBeTiled[E]=!1,!1;for(var S=_.getNodes(),L=0;L0)return this.toBeTiled[E]=!1,!1;if(M.getChild()==null){this.toBeTiled[M.id]=!1;continue}if(!this.getToBeTiled(M))return this.toBeTiled[E]=!1,!1}return this.toBeTiled[E]=!0,!0},w.prototype.getNodeDegree=function(k){for(var E=k.id,_=k.getEdges(),S=0,L=0;L<_.length;L++){var M=_[L];M.getSource().id!==M.getTarget().id&&(S=S+1)}return S},w.prototype.getNodeDegreeWithChildren=function(k){var E=this.getNodeDegree(k);if(k.getChild()==null)return E;for(var _=k.getChild().getNodes(),S=0;S<_.length;S++){var L=_[S];E+=this.getNodeDegreeWithChildren(L)}return E},w.prototype.performDFSOnCompounds=function(){this.compoundOrder=[],this.fillCompexOrderByDFS(this.graphManager.getRoot().getNodes())},w.prototype.fillCompexOrderByDFS=function(k){for(var E=0;EI&&(I=O.rect.height)}_+=I+k.verticalPadding}},w.prototype.tileCompoundMembers=function(k,E){var _=this;this.tiledMemberPack=[],Object.keys(k).forEach(function(S){var L=E[S];_.tiledMemberPack[S]=_.tileNodes(k[S],L.paddingLeft+L.paddingRight),L.rect.width=_.tiledMemberPack[S].width,L.rect.height=_.tiledMemberPack[S].height})},w.prototype.tileNodes=function(k,E){var _=u.TILING_PADDING_VERTICAL,S=u.TILING_PADDING_HORIZONTAL,L={rows:[],rowWidth:[],rowHeight:[],width:0,height:E,verticalPadding:_,horizontalPadding:S};k.sort(function(T,I){return T.rect.width*T.rect.height>I.rect.width*I.rect.height?-1:T.rect.width*T.rect.height0&&(D+=k.horizontalPadding),k.rowWidth[_]=D,k.width0&&(T+=k.verticalPadding);var I=0;T>k.rowHeight[_]&&(I=k.rowHeight[_],k.rowHeight[_]=T,I=k.rowHeight[_]-I),k.height+=I,k.rows[_].push(E)},w.prototype.getShortestRowIndex=function(k){for(var E=-1,_=Number.MAX_VALUE,S=0;S_&&(E=S,_=k.rowWidth[S]);return E},w.prototype.canAddHorizontal=function(k,E,_){var S=this.getShortestRowIndex(k);if(S<0)return!0;var L=k.rowWidth[S];if(L+k.horizontalPadding+E<=k.width)return!0;var M=0;k.rowHeight[S]<_&&S>0&&(M=_+k.verticalPadding-k.rowHeight[S]);var D;k.width-L>=E+k.horizontalPadding?D=(k.height+M)/(L+E+k.horizontalPadding):D=(k.height+M)/k.width,M=_+k.verticalPadding;var T;return k.widthM&&E!=_){S.splice(-1,1),k.rows[_].push(L),k.rowWidth[E]=k.rowWidth[E]-M,k.rowWidth[_]=k.rowWidth[_]+M,k.width=k.rowWidth[instance.getLongestRowIndex(k)];for(var D=Number.MIN_VALUE,T=0;TD&&(D=S[T].height);E>0&&(D+=k.verticalPadding);var I=k.rowHeight[E]+k.rowHeight[_];k.rowHeight[E]=D,k.rowHeight[_]0)for(var B=L;B<=M;B++)P[0]+=this.grid[B][D-1].length+this.grid[B][D].length-1;if(M0)for(var B=D;B<=T;B++)P[3]+=this.grid[L-1][B].length+this.grid[L][B].length-1;for(var F=g.MAX_VALUE,G,z,H=0;H{(function(e,r){typeof j6=="object"&&typeof kW=="object"?kW.exports=r(wW()):typeof define=="function"&&define.amd?define(["cose-base"],r):typeof j6=="object"?j6.cytoscapeCoseBilkent=r(wW()):e.cytoscapeCoseBilkent=r(e.coseBase)})(j6,function(t){return(function(e){var r={};function n(a){if(r[a])return r[a].exports;var i=r[a]={i:a,l:!1,exports:{}};return e[a].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=r,n.i=function(a){return a},n.d=function(a,i,s){n.o(a,i)||Object.defineProperty(a,i,{configurable:!1,enumerable:!0,get:s})},n.n=function(a){var i=a&&a.__esModule?function(){return a.default}:function(){return a};return n.d(i,"a",i),i},n.o=function(a,i){return Object.prototype.hasOwnProperty.call(a,i)},n.p="",n(n.s=1)})([(function(e,r){e.exports=t}),(function(e,r,n){"use strict";var a=n(0).layoutBase.LayoutConstants,i=n(0).layoutBase.FDLayoutConstants,s=n(0).CoSEConstants,o=n(0).CoSELayout,l=n(0).CoSENode,u=n(0).layoutBase.PointD,h=n(0).layoutBase.DimensionD,f={ready:function(){},stop:function(){},quality:"default",nodeDimensionsIncludeLabels:!1,refresh:30,fit:!0,padding:10,randomize:!0,nodeRepulsion:4500,idealEdgeLength:50,edgeElasticity:.45,nestingFactor:.1,gravity:.25,numIter:2500,tile:!0,animate:"end",animationDuration:500,tilingPaddingVertical:10,tilingPaddingHorizontal:10,gravityRangeCompound:1.5,gravityCompound:1,gravityRange:3.8,initialEnergyOnIncremental:.5};function d(v,y){var b={};for(var w in v)b[w]=v[w];for(var w in y)b[w]=y[w];return b}function p(v){this.options=d(f,v),m(this.options)}var m=function(y){y.nodeRepulsion!=null&&(s.DEFAULT_REPULSION_STRENGTH=i.DEFAULT_REPULSION_STRENGTH=y.nodeRepulsion),y.idealEdgeLength!=null&&(s.DEFAULT_EDGE_LENGTH=i.DEFAULT_EDGE_LENGTH=y.idealEdgeLength),y.edgeElasticity!=null&&(s.DEFAULT_SPRING_STRENGTH=i.DEFAULT_SPRING_STRENGTH=y.edgeElasticity),y.nestingFactor!=null&&(s.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=i.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=y.nestingFactor),y.gravity!=null&&(s.DEFAULT_GRAVITY_STRENGTH=i.DEFAULT_GRAVITY_STRENGTH=y.gravity),y.numIter!=null&&(s.MAX_ITERATIONS=i.MAX_ITERATIONS=y.numIter),y.gravityRange!=null&&(s.DEFAULT_GRAVITY_RANGE_FACTOR=i.DEFAULT_GRAVITY_RANGE_FACTOR=y.gravityRange),y.gravityCompound!=null&&(s.DEFAULT_COMPOUND_GRAVITY_STRENGTH=i.DEFAULT_COMPOUND_GRAVITY_STRENGTH=y.gravityCompound),y.gravityRangeCompound!=null&&(s.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=i.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=y.gravityRangeCompound),y.initialEnergyOnIncremental!=null&&(s.DEFAULT_COOLING_FACTOR_INCREMENTAL=i.DEFAULT_COOLING_FACTOR_INCREMENTAL=y.initialEnergyOnIncremental),y.quality=="draft"?a.QUALITY=0:y.quality=="proof"?a.QUALITY=2:a.QUALITY=1,s.NODE_DIMENSIONS_INCLUDE_LABELS=i.NODE_DIMENSIONS_INCLUDE_LABELS=a.NODE_DIMENSIONS_INCLUDE_LABELS=y.nodeDimensionsIncludeLabels,s.DEFAULT_INCREMENTAL=i.DEFAULT_INCREMENTAL=a.DEFAULT_INCREMENTAL=!y.randomize,s.ANIMATE=i.ANIMATE=a.ANIMATE=y.animate,s.TILE=y.tile,s.TILING_PADDING_VERTICAL=typeof y.tilingPaddingVertical=="function"?y.tilingPaddingVertical.call():y.tilingPaddingVertical,s.TILING_PADDING_HORIZONTAL=typeof y.tilingPaddingHorizontal=="function"?y.tilingPaddingHorizontal.call():y.tilingPaddingHorizontal};p.prototype.run=function(){var v,y,b=this.options,w=this.idToLNode={},C=this.layout=new o,k=this;k.stopped=!1,this.cy=this.options.cy,this.cy.trigger({type:"layoutstart",layout:this});var E=C.newGraphManager();this.gm=E;var _=this.options.eles.nodes(),S=this.options.eles.edges();this.root=E.addRoot(),this.processChildrenList(this.root,this.getTopMostNodes(_),C);for(var L=0;L0){var T;T=b.getGraphManager().add(b.newGraph(),_),this.processChildrenList(T,E,b)}}},p.prototype.stop=function(){return this.stopped=!0,this};var g=function(y){y("layout","cose-bilkent",p)};typeof cytoscape<"u"&&g(cytoscape),e.exports=g})])})});var dLe={};lr(dLe,{diagram:()=>VEt});function uLe(t,e,r,n,a){return t.insert("polygon",":first-child").attr("points",n.map(function(i){return i.x+","+i.y}).join(" ")).attr("transform","translate("+(a.width-e)/2+", "+r+")")}async function CW(t,e,r,n,a){await BEt(t,e,r,n,a),r.children&&await Promise.all(r.children.map((i,s)=>CW(t,e,i,n<0?s:n,a)))}function cLe(t,e){e.edges().map((r,n)=>{let a=r.data();if(r[0]._private.bodyBounds){let i=r[0]._private.rscratch;te.trace("Edge: ",n,a),t.insert("path").attr("d",`M ${i.startX},${i.startY} L ${i.midX},${i.midY} L${i.endX},${i.endY} `).attr("class","edge section-edge-"+a.section+" edge-depth-"+a.depth)}})}function SW(t,e,r,n){e.add({group:"nodes",data:{id:t.id.toString(),labelText:t.descr,height:t.height,width:t.width,level:n,nodeId:t.id,padding:t.padding,type:t.type},position:{x:t.x,y:t.y}}),t.children&&t.children.forEach(a=>{SW(a,e,r,n+1),e.add({group:"edges",data:{id:`${t.id}_${a.id}`,source:t.id,target:a.id,depth:n,section:a.section}})})}function hLe(t,e){return new Promise(r=>{let n=We("body").append("div").attr("id","cy").attr("style","display:none"),a=Pl({container:document.getElementById("cy"),style:[{selector:"edge",style:{"curve-style":"bezier"}}]});n.remove(),SW(t,a,e,0),a.nodes().forEach(function(i){i.layoutDimensions=()=>{let s=i.data();return{w:s.width,h:s.height}}}),a.layout({name:"cose-bilkent",quality:"proof",styleEnabled:!1,animate:!1}).run(),a.ready(i=>{te.info("Ready",i),r(a)})})}function fLe(t,e){e.nodes().map((r,n)=>{let a=r.data();a.x=r.position().x,a.y=r.position().y,FEt(t,a);let i=t.getElementById(a.nodeId);te.info("Id:",n,"Position: (",r.position().x,", ",r.position().y,")",a),i.attr("transform",`translate(${r.position().x-a.width/2}, ${r.position().y-a.height/2})`),i.attr("attr",`apa-${n})`)})}var lLe,TW,gEt,Lu,oLe,EW,vEt,yEt,xEt,bEt,ri,wEt,kEt,TEt,EEt,CEt,SEt,_Et,AEt,LEt,REt,IEt,DEt,NEt,MEt,OEt,PEt,BEt,FEt,zEt,$Et,GEt,UEt,qEt,VEt,pLe=A(()=>{Fi();ln();mc();ur();vW();lLe=ii(sLe(),1);cr();Lo();TW=(function(){var t=x(function(C,k,E,_){for(E=E||{},_=C.length;_--;E[C[_]]=k);return E},"o"),e=[1,4],r=[1,13],n=[1,12],a=[1,15],i=[1,16],s=[1,20],o=[1,19],l=[6,7,8],u=[1,26],h=[1,24],f=[1,25],d=[6,7,11],p=[1,6,13,15,16,19,22],m=[1,33],g=[1,34],v=[1,6,7,11,13,15,16,19,22],y={trace:x(function(){},"trace"),yy:{},symbols_:{error:2,start:3,mindMap:4,spaceLines:5,SPACELINE:6,NL:7,MINDMAP:8,document:9,stop:10,EOF:11,statement:12,SPACELIST:13,node:14,ICON:15,CLASS:16,nodeWithId:17,nodeWithoutId:18,NODE_DSTART:19,NODE_DESCR:20,NODE_DEND:21,NODE_ID:22,$accept:0,$end:1},terminals_:{2:"error",6:"SPACELINE",7:"NL",8:"MINDMAP",11:"EOF",13:"SPACELIST",15:"ICON",16:"CLASS",19:"NODE_DSTART",20:"NODE_DESCR",21:"NODE_DEND",22:"NODE_ID"},productions_:[0,[3,1],[3,2],[5,1],[5,2],[5,2],[4,2],[4,3],[10,1],[10,1],[10,1],[10,2],[10,2],[9,3],[9,2],[12,2],[12,2],[12,2],[12,1],[12,1],[12,1],[12,1],[12,1],[14,1],[14,1],[18,3],[17,1],[17,4]],performAction:x(function(k,E,_,S,L,M,D){var T=M.length-1;switch(L){case 6:case 7:return S;case 8:S.getLogger().trace("Stop NL ");break;case 9:S.getLogger().trace("Stop EOF ");break;case 11:S.getLogger().trace("Stop NL2 ");break;case 12:S.getLogger().trace("Stop EOF2 ");break;case 15:S.getLogger().info("Node: ",M[T].id),S.addNode(M[T-1].length,M[T].id,M[T].descr,M[T].type);break;case 16:S.getLogger().trace("Icon: ",M[T]),S.decorateNode({icon:M[T]});break;case 17:case 21:S.decorateNode({class:M[T]});break;case 18:S.getLogger().trace("SPACELIST");break;case 19:S.getLogger().trace("Node: ",M[T].id),S.addNode(0,M[T].id,M[T].descr,M[T].type);break;case 20:S.decorateNode({icon:M[T]});break;case 25:S.getLogger().trace("node found ..",M[T-2]),this.$={id:M[T-1],descr:M[T-1],type:S.getType(M[T-2],M[T])};break;case 26:this.$={id:M[T],descr:M[T],type:S.nodeType.DEFAULT};break;case 27:S.getLogger().trace("node found ..",M[T-3]),this.$={id:M[T-3],descr:M[T-1],type:S.getType(M[T-2],M[T])};break}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],8:e},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:e},{6:r,7:[1,10],9:9,12:11,13:n,14:14,15:a,16:i,17:17,18:18,19:s,22:o},t(l,[2,3]),{1:[2,2]},t(l,[2,4]),t(l,[2,5]),{1:[2,6],6:r,12:21,13:n,14:14,15:a,16:i,17:17,18:18,19:s,22:o},{6:r,9:22,12:11,13:n,14:14,15:a,16:i,17:17,18:18,19:s,22:o},{6:u,7:h,10:23,11:f},t(d,[2,22],{17:17,18:18,14:27,15:[1,28],16:[1,29],19:s,22:o}),t(d,[2,18]),t(d,[2,19]),t(d,[2,20]),t(d,[2,21]),t(d,[2,23]),t(d,[2,24]),t(d,[2,26],{19:[1,30]}),{20:[1,31]},{6:u,7:h,10:32,11:f},{1:[2,7],6:r,12:21,13:n,14:14,15:a,16:i,17:17,18:18,19:s,22:o},t(p,[2,14],{7:m,11:g}),t(v,[2,8]),t(v,[2,9]),t(v,[2,10]),t(d,[2,15]),t(d,[2,16]),t(d,[2,17]),{20:[1,35]},{21:[1,36]},t(p,[2,13],{7:m,11:g}),t(v,[2,11]),t(v,[2,12]),{21:[1,37]},t(d,[2,25]),t(d,[2,27])],defaultActions:{2:[2,1],6:[2,2]},parseError:x(function(k,E){if(E.recoverable)this.trace(k);else{var _=new Error(k);throw _.hash=E,_}},"parseError"),parse:x(function(k){var E=this,_=[0],S=[],L=[null],M=[],D=this.table,T="",I=0,N=0,O=0,R=2,P=1,B=M.slice.call(arguments,1),F=Object.create(this.lexer),G={yy:{}};for(var z in this.yy)Object.prototype.hasOwnProperty.call(this.yy,z)&&(G.yy[z]=this.yy[z]);F.setInput(k,G.yy),G.yy.lexer=F,G.yy.parser=this,typeof F.yylloc>"u"&&(F.yylloc={});var H=F.yylloc;M.push(H);var Q=F.options&&F.options.ranges;typeof G.yy.parseError=="function"?this.parseError=G.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Y(ee){_.length=_.length-2*ee,L.length=L.length-ee,M.length=M.length-ee}x(Y,"popStack");function ie(){var ee;return ee=S.pop()||F.lex()||P,typeof ee!="number"&&(ee instanceof Array&&(S=ee,ee=S.pop()),ee=E.symbols_[ee]||ee),ee}x(ie,"lex");for(var se,oe,pe,J,j,Z,K={},X,ae,W,Se;;){if(pe=_[_.length-1],this.defaultActions[pe]?J=this.defaultActions[pe]:((se===null||typeof se>"u")&&(se=ie()),J=D[pe]&&D[pe][se]),typeof J>"u"||!J.length||!J[0]){var ne="";Se=[];for(X in D[pe])this.terminals_[X]&&X>R&&Se.push("'"+this.terminals_[X]+"'");F.showPosition?ne="Parse error on line "+(I+1)+`: -`+F.showPosition()+` -Expecting `+Se.join(", ")+", got '"+(this.terminals_[se]||se)+"'":ne="Parse error on line "+(I+1)+": Unexpected "+(se==P?"end of input":"'"+(this.terminals_[se]||se)+"'"),this.parseError(ne,{text:F.match,token:this.terminals_[se]||se,line:F.yylineno,loc:H,expected:Se})}if(J[0]instanceof Array&&J.length>1)throw new Error("Parse Error: multiple actions possible at state: "+pe+", token: "+se);switch(J[0]){case 1:_.push(se),L.push(F.yytext),M.push(F.yylloc),_.push(J[1]),se=null,oe?(se=oe,oe=null):(N=F.yyleng,T=F.yytext,I=F.yylineno,H=F.yylloc,O>0&&O--);break;case 2:if(ae=this.productions_[J[1]][1],K.$=L[L.length-ae],K._$={first_line:M[M.length-(ae||1)].first_line,last_line:M[M.length-1].last_line,first_column:M[M.length-(ae||1)].first_column,last_column:M[M.length-1].last_column},Q&&(K._$.range=[M[M.length-(ae||1)].range[0],M[M.length-1].range[1]]),Z=this.performAction.apply(K,[T,N,I,G.yy,J[1],L,M].concat(B)),typeof Z<"u")return Z;ae&&(_=_.slice(0,-1*ae*2),L=L.slice(0,-1*ae),M=M.slice(0,-1*ae)),_.push(this.productions_[J[1]][0]),L.push(K.$),M.push(K._$),W=D[_[_.length-2]][_[_.length-1]],_.push(W);break;case 3:return!0}}return!0},"parse")},b=(function(){var C={EOF:1,parseError:x(function(E,_){if(this.yy.parser)this.yy.parser.parseError(E,_);else throw new Error(E)},"parseError"),setInput:x(function(k,E){return this.yy=E||this.yy||{},this._input=k,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:x(function(){var k=this._input[0];this.yytext+=k,this.yyleng++,this.offset++,this.match+=k,this.matched+=k;var E=k.match(/(?:\r\n?|\n).*/g);return E?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),k},"input"),unput:x(function(k){var E=k.length,_=k.split(/(?:\r\n?|\n)/g);this._input=k+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-E),this.offset-=E;var S=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),_.length-1&&(this.yylineno-=_.length-1);var L=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:_?(_.length===S.length?this.yylloc.first_column:0)+S[S.length-_.length].length-_[0].length:this.yylloc.first_column-E},this.options.ranges&&(this.yylloc.range=[L[0],L[0]+this.yyleng-E]),this.yyleng=this.yytext.length,this},"unput"),more:x(function(){return this._more=!0,this},"more"),reject:x(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). -`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:x(function(k){this.unput(this.match.slice(k))},"less"),pastInput:x(function(){var k=this.matched.substr(0,this.matched.length-this.match.length);return(k.length>20?"...":"")+k.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:x(function(){var k=this.match;return k.length<20&&(k+=this._input.substr(0,20-k.length)),(k.substr(0,20)+(k.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:x(function(){var k=this.pastInput(),E=new Array(k.length+1).join("-");return k+this.upcomingInput()+` -`+E+"^"},"showPosition"),test_match:x(function(k,E){var _,S,L;if(this.options.backtrack_lexer&&(L={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(L.yylloc.range=this.yylloc.range.slice(0))),S=k[0].match(/(?:\r\n?|\n).*/g),S&&(this.yylineno+=S.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:S?S[S.length-1].length-S[S.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+k[0].length},this.yytext+=k[0],this.match+=k[0],this.matches=k,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(k[0].length),this.matched+=k[0],_=this.performAction.call(this,this.yy,this,E,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),_)return _;if(this._backtrack){for(var M in L)this[M]=L[M];return!1}return!1},"test_match"),next:x(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var k,E,_,S;this._more||(this.yytext="",this.match="");for(var L=this._currentRules(),M=0;ME[0].length)){if(E=_,S=M,this.options.backtrack_lexer){if(k=this.test_match(_,L[M]),k!==!1)return k;if(this._backtrack){E=!1;continue}else return!1}else if(!this.options.flex)break}return E?(k=this.test_match(E,L[S]),k!==!1?k:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. -`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:x(function(){var E=this.next();return E||this.lex()},"lex"),begin:x(function(E){this.conditionStack.push(E)},"begin"),popState:x(function(){var E=this.conditionStack.length-1;return E>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:x(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:x(function(E){return E=this.conditionStack.length-1-Math.abs(E||0),E>=0?this.conditionStack[E]:"INITIAL"},"topState"),pushState:x(function(E){this.begin(E)},"pushState"),stateStackSize:x(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:x(function(E,_,S,L){var M=L;switch(S){case 0:return E.getLogger().trace("Found comment",_.yytext),6;break;case 1:return 8;case 2:this.begin("CLASS");break;case 3:return this.popState(),16;break;case 4:this.popState();break;case 5:E.getLogger().trace("Begin icon"),this.begin("ICON");break;case 6:return E.getLogger().trace("SPACELINE"),6;break;case 7:return 7;case 8:return 15;case 9:E.getLogger().trace("end icon"),this.popState();break;case 10:return E.getLogger().trace("Exploding node"),this.begin("NODE"),19;break;case 11:return E.getLogger().trace("Cloud"),this.begin("NODE"),19;break;case 12:return E.getLogger().trace("Explosion Bang"),this.begin("NODE"),19;break;case 13:return E.getLogger().trace("Cloud Bang"),this.begin("NODE"),19;break;case 14:return this.begin("NODE"),19;break;case 15:return this.begin("NODE"),19;break;case 16:return this.begin("NODE"),19;break;case 17:return this.begin("NODE"),19;break;case 18:return 13;case 19:return 22;case 20:return 11;case 21:this.begin("NSTR2");break;case 22:return"NODE_DESCR";case 23:this.popState();break;case 24:E.getLogger().trace("Starting NSTR"),this.begin("NSTR");break;case 25:return E.getLogger().trace("description:",_.yytext),"NODE_DESCR";break;case 26:this.popState();break;case 27:return this.popState(),E.getLogger().trace("node end ))"),"NODE_DEND";break;case 28:return this.popState(),E.getLogger().trace("node end )"),"NODE_DEND";break;case 29:return this.popState(),E.getLogger().trace("node end ...",_.yytext),"NODE_DEND";break;case 30:return this.popState(),E.getLogger().trace("node end (("),"NODE_DEND";break;case 31:return this.popState(),E.getLogger().trace("node end (-"),"NODE_DEND";break;case 32:return this.popState(),E.getLogger().trace("node end (-"),"NODE_DEND";break;case 33:return this.popState(),E.getLogger().trace("node end (("),"NODE_DEND";break;case 34:return this.popState(),E.getLogger().trace("node end (("),"NODE_DEND";break;case 35:return E.getLogger().trace("Long description:",_.yytext),20;break;case 36:return E.getLogger().trace("Long description:",_.yytext),20;break}},"anonymous"),rules:[/^(?:\s*%%.*)/i,/^(?:mindmap\b)/i,/^(?::::)/i,/^(?:.+)/i,/^(?:\n)/i,/^(?:::icon\()/i,/^(?:[\s]+[\n])/i,/^(?:[\n]+)/i,/^(?:[^\)]+)/i,/^(?:\))/i,/^(?:-\))/i,/^(?:\(-)/i,/^(?:\)\))/i,/^(?:\))/i,/^(?:\(\()/i,/^(?:\{\{)/i,/^(?:\()/i,/^(?:\[)/i,/^(?:[\s]+)/i,/^(?:[^\(\[\n\)\{\}]+)/i,/^(?:$)/i,/^(?:["][`])/i,/^(?:[^`"]+)/i,/^(?:[`]["])/i,/^(?:["])/i,/^(?:[^"]+)/i,/^(?:["])/i,/^(?:[\)]\))/i,/^(?:[\)])/i,/^(?:[\]])/i,/^(?:\}\})/i,/^(?:\(-)/i,/^(?:-\))/i,/^(?:\(\()/i,/^(?:\()/i,/^(?:[^\)\]\(\}]+)/i,/^(?:.+(?!\(\())/i],conditions:{CLASS:{rules:[3,4],inclusive:!1},ICON:{rules:[8,9],inclusive:!1},NSTR2:{rules:[22,23],inclusive:!1},NSTR:{rules:[25,26],inclusive:!1},NODE:{rules:[21,24,27,28,29,30,31,32,33,34,35,36],inclusive:!1},INITIAL:{rules:[0,1,2,5,6,7,10,11,12,13,14,15,16,17,18,19,20],inclusive:!0}}};return C})();y.lexer=b;function w(){this.yy={}}return x(w,"Parser"),w.prototype=y,y.Parser=w,new w})();TW.parser=TW;gEt=TW,Lu=[],oLe=0,EW={},vEt=x(()=>{Lu=[],oLe=0,EW={}},"clear"),yEt=x(function(t){for(let e=Lu.length-1;e>=0;e--)if(Lu[e].levelLu.length>0?Lu[0]:null,"getMindmap"),bEt=x((t,e,r,n)=>{te.info("addNode",t,e,r,n);let a=Te(),i=a.mindmap?.padding??or.mindmap.padding;switch(n){case ri.ROUNDED_RECT:case ri.RECT:case ri.HEXAGON:i*=2}let s={id:oLe++,nodeId:Er(e,a),level:t,descr:Er(r,a),type:n,children:[],width:a.mindmap?.maxNodeWidth??or.mindmap.maxNodeWidth,padding:i},o=yEt(t);if(o)o.children.push(s),Lu.push(s);else if(Lu.length===0)Lu.push(s);else throw new Error('There can be only one root. No parent could be found for ("'+s.descr+'")')},"addNode"),ri={DEFAULT:0,NO_BORDER:0,ROUNDED_RECT:1,RECT:2,CIRCLE:3,CLOUD:4,BANG:5,HEXAGON:6},wEt=x((t,e)=>{switch(te.debug("In get type",t,e),t){case"[":return ri.RECT;case"(":return e===")"?ri.ROUNDED_RECT:ri.CLOUD;case"((":return ri.CIRCLE;case")":return ri.CLOUD;case"))":return ri.BANG;case"{{":return ri.HEXAGON;default:return ri.DEFAULT}},"getType"),kEt=x((t,e)=>{EW[t]=e},"setElementForId"),TEt=x(t=>{if(!t)return;let e=Te(),r=Lu[Lu.length-1];t.icon&&(r.icon=Er(t.icon,e)),t.class&&(r.class=Er(t.class,e))},"decorateNode"),EEt=x(t=>{switch(t){case ri.DEFAULT:return"no-border";case ri.RECT:return"rect";case ri.ROUNDED_RECT:return"rounded-rect";case ri.CIRCLE:return"circle";case ri.CLOUD:return"cloud";case ri.BANG:return"bang";case ri.HEXAGON:return"hexgon";default:return"no-border"}},"type2Str"),CEt=x(()=>te,"getLogger"),SEt=x(t=>EW[t],"getElementById"),_Et={clear:vEt,addNode:bEt,getMindmap:xEt,nodeType:ri,getType:wEt,setElementForId:kEt,decorateNode:TEt,type2Str:EEt,getLogger:CEt,getElementById:SEt},AEt=_Et,LEt=12,REt=x(function(t,e,r,n){e.append("path").attr("id","node-"+r.id).attr("class","node-bkg node-"+t.type2Str(r.type)).attr("d",`M0 ${r.height-5} v${-r.height+10} q0,-5 5,-5 h${r.width-10} q5,0 5,5 v${r.height-5} H0 Z`),e.append("line").attr("class","node-line-"+n).attr("x1",0).attr("y1",r.height).attr("x2",r.width).attr("y2",r.height)},"defaultBkg"),IEt=x(function(t,e,r){e.append("rect").attr("id","node-"+r.id).attr("class","node-bkg node-"+t.type2Str(r.type)).attr("height",r.height).attr("width",r.width)},"rectBkg"),DEt=x(function(t,e,r){let n=r.width,a=r.height,i=.15*n,s=.25*n,o=.35*n,l=.2*n;e.append("path").attr("id","node-"+r.id).attr("class","node-bkg node-"+t.type2Str(r.type)).attr("d",`M0 0 a${i},${i} 0 0,1 ${n*.25},${-1*n*.1} + `),o=aSt(n,i,s);o.aPosition=n.getAttribLocation(o,"aPosition"),o.aIndex=n.getAttribLocation(o,"aIndex"),o.aVertType=n.getAttribLocation(o,"aVertType"),o.aTransform=n.getAttribLocation(o,"aTransform"),o.aAtlasId=n.getAttribLocation(o,"aAtlasId"),o.aTex=n.getAttribLocation(o,"aTex"),o.aPointAPointB=n.getAttribLocation(o,"aPointAPointB"),o.aPointCPointD=n.getAttribLocation(o,"aPointCPointD"),o.aLineWidth=n.getAttribLocation(o,"aLineWidth"),o.aColor=n.getAttribLocation(o,"aColor"),o.aCornerRadius=n.getAttribLocation(o,"aCornerRadius"),o.aBorderColor=n.getAttribLocation(o,"aBorderColor"),o.uPanZoomMatrix=n.getUniformLocation(o,"uPanZoomMatrix"),o.uAtlasSize=n.getUniformLocation(o,"uAtlasSize"),o.uBGColor=n.getUniformLocation(o,"uBGColor"),o.uZoom=n.getUniformLocation(o,"uZoom"),o.uTextures=[];for(var l=0;l1&&arguments[1]!==void 0?arguments[1]:G8.SCREEN;this.panZoomMatrix=r,this.renderTarget=n,this.batchDebugInfo=[],this.wrappedCount=0,this.simpleCount=0,this.startBatch()}},{key:"startBatch",value:function(){this.instanceCount=0,this.batchManager.startBatch()}},{key:"endFrame",value:function(){this.endBatch()}},{key:"_isVisible",value:function(r,n){return r.visible()?n&&n.isVisible?n.isVisible(r):!0:!1}},{key:"drawTexture",value:function(r,n,i){var a=this.atlasManager,s=this.batchManager,o=a.getRenderTypeOpts(i);if(this._isVisible(r,o)&&!(r.isEdge()&&!this._isValidEdge(r))){if(this.renderTarget.picking&&o.getTexPickingMode){var l=o.getTexPickingMode(r);if(l===FR.IGNORE)return;if(l==FR.USE_BB){this.drawPickingRectangle(r,n,i);return}}var u=a.getAtlasInfo(r,i),h=yl(u),f;try{for(h.s();!(f=h.n()).done;){var d=f.value,p=d.atlas,m=d.tex1,g=d.tex2;s.canAddToCurrentBatch(p)||this.endBatch();for(var y=s.getAtlasIndexForBatch(p),v=0,x=[[m,!0],[g,!1]];v=this.maxInstances&&this.endBatch()}}}}catch(O){h.e(O)}finally{h.f()}}}},{key:"setTransformMatrix",value:function(r,n,i,a){var s=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,o=0;if(i.shapeProps&&i.shapeProps.padding&&(o=r.pstyle(i.shapeProps.padding).pfValue),a){var l=a.bb,u=a.tex1,h=a.tex2,f=u.w/(u.w+h.w);s||(f=1-f);var d=this._getAdjustedBB(l,o,s,f);this._applyTransformMatrix(n,d,i,r)}else{var p=i.getBoundingBox(r),m=this._getAdjustedBB(p,o,!0,1);this._applyTransformMatrix(n,m,i,r)}}},{key:"_applyTransformMatrix",value:function(r,n,i,a){var s,o;MRe(r);var l=i.getRotation?i.getRotation(a):0;if(l!==0){var u=i.getRotationPoint(a),h=u.x,f=u.y;SR(r,r,[h,f]),NRe(r,r,l);var d=i.getRotationOffset(a);s=d.x+(n.xOffset||0),o=d.y+(n.yOffset||0)}else s=n.x1,o=n.y1;SR(r,r,[s,o]),eX(r,r,[n.w,n.h])}},{key:"_getAdjustedBB",value:function(r,n,i,a){var s=r.x1,o=r.y1,l=r.w,u=r.h,h=r.yOffset;n&&(s-=n,o-=n,l+=2*n,u+=2*n);var f=0,d=l*a;return i&&a<1?l=d:!i&&a<1&&(f=l-d,s+=f,l=d),{x1:s,y1:o,w:l,h:u,xOffset:f,yOffset:h}}},{key:"drawPickingRectangle",value:function(r,n,i){var a=this.atlasManager.getRenderTypeOpts(i),s=this.instanceCount;this.vertTypeBuffer.getView(s)[0]=K4;var o=this.indexBuffer.getView(s);j4(n,o);var l=this.colorBuffer.getView(s);lg([0,0,0],1,l);var u=this.transformBuffer.getMatrixView(s);this.setTransformMatrix(r,u,a),this.simpleCount++,this.instanceCount++,this.instanceCount>=this.maxInstances&&this.endBatch()}},{key:"drawNode",value:function(r,n,i){var a=this.simpleShapeOptions.get(i);if(this._isVisible(r,a)){var s=a.shapeProps,o=this._getVertTypeForShape(r,s.shape);if(o===void 0||a.isSimple&&!a.isSimple(r,this.renderTarget)){this.drawTexture(r,n,i);return}var l=this.instanceCount;if(this.vertTypeBuffer.getView(l)[0]=o,o===pR||o===N8){var u=a.getBoundingBox(r),h=this._getCornerRadius(r,s.radius,u),f=this.cornerRadiusBuffer.getView(l);f[0]=h,f[1]=h,f[2]=h,f[3]=h,o===N8&&(f[0]=0,f[2]=0)}var d=this.indexBuffer.getView(l);j4(n,d);var p=this.renderTarget.picking?1:i==="node-body"?r.effectiveOpacity():1,m=this.renderTarget.picking?1:r.pstyle(s.opacity).value*p,g=r.pstyle(s.color).value,y=this.colorBuffer.getView(l);lg(g,m,y);var v=this.lineWidthBuffer.getView(l);if(v[0]=0,v[1]=0,s.border){var x=r.pstyle("border-width").value;if(x>0){var k=r.pstyle("border-color").value,_=p*r.pstyle("border-opacity").value,T=this.borderColorBuffer.getView(l);lg(k,_,T);var S=r.pstyle("border-position").value;if(S==="inside")v[0]=0,v[1]=-x;else if(S==="outside")v[0]=x,v[1]=0;else{var R=x/2;v[0]=R,v[1]=-R}}}var A=this.transformBuffer.getMatrixView(l);this.setTransformMatrix(r,A,a),this.simpleCount++,this.instanceCount++,this.instanceCount>=this.maxInstances&&this.endBatch()}}},{key:"_getVertTypeForShape",value:function(r,n){var i=r.pstyle(n).value;switch(i){case"rectangle":return K4;case"ellipse":return O8;case"roundrectangle":case"round-rectangle":return pR;case"bottom-round-rectangle":return N8;default:return}}},{key:"_getCornerRadius",value:function(r,n,i){var a=i.w,s=i.h;if(r.pstyle(n).value==="auto")return Yp(a,s);var o=r.pstyle(n).pfValue,l=a/2,u=s/2;return Math.min(o,u,l)}},{key:"drawEdgeArrow",value:function(r,n,i){if(r.visible()){var a=r._private.rscratch,s,o,l;if(i==="source"?(s=a.arrowStartX,o=a.arrowStartY,l=a.srcArrowAngle):(s=a.arrowEndX,o=a.arrowEndY,l=a.tgtArrowAngle),!(isNaN(s)||s==null||isNaN(o)||o==null||isNaN(l)||l==null)){var u=r.pstyle(i+"-arrow-shape").value;if(u!=="none"){var h=r.pstyle(i+"-arrow-color").value,f=r.pstyle("opacity").value,d=r.pstyle("line-opacity").value,p=f*d,m=r.pstyle("width").pfValue,g=r.pstyle("arrow-scale").value,y=this.r.getArrowWidth(m,g),v=this.instanceCount,x=this.transformBuffer.getMatrixView(v);MRe(x),SR(x,x,[s,o]),eX(x,x,[y,y]),NRe(x,x,l),this.vertTypeBuffer.getView(v)[0]=NY;var k=this.indexBuffer.getView(v);j4(n,k);var _=this.colorBuffer.getView(v);lg(h,p,_),this.instanceCount++,this.instanceCount>=this.maxInstances&&this.endBatch()}}}}},{key:"drawEdgeLine",value:function(r,n){if(r.visible()){var i=this._getEdgePoints(r);if(i){var a=r.pstyle("opacity").value,s=r.pstyle("line-opacity").value,o=r.pstyle("width").pfValue,l=r.pstyle("line-color").value,u=a*s;if(i.length/2+this.instanceCount>this.maxInstances&&this.endBatch(),i.length==4){var h=this.instanceCount;this.vertTypeBuffer.getView(h)[0]=ORe;var f=this.indexBuffer.getView(h);j4(n,f);var d=this.colorBuffer.getView(h);lg(l,u,d);var p=this.lineWidthBuffer.getView(h);p[0]=o;var m=this.pointAPointBBuffer.getView(h);m[0]=i[0],m[1]=i[1],m[2]=i[2],m[3]=i[3],this.instanceCount++,this.instanceCount>=this.maxInstances&&this.endBatch()}else for(var g=0;g=this.maxInstances&&this.endBatch()}}}}},{key:"_isValidEdge",value:function(r){var n=r._private.rscratch;return!(n.badLine||n.allpts==null||isNaN(n.allpts[0]))}},{key:"_getEdgePoints",value:function(r){var n=r._private.rscratch;if(this._isValidEdge(r)){var i=n.allpts;if(i.length==4)return i;var a=this._getNumSegments(r);return this._getCurveSegmentPoints(i,a)}}},{key:"_getNumSegments",value:function(r){var n=15;return Math.min(Math.max(n,5),this.maxInstances)}},{key:"_getCurveSegmentPoints",value:function(r,n){if(r.length==4)return r;for(var i=Array((n+1)*2),a=0;a<=n;a++)if(a==0)i[0]=r[0],i[1]=r[1];else if(a==n)i[a*2]=r[r.length-2],i[a*2+1]=r[r.length-1];else{var s=a/n;this._setCurvePoint(r,s,i,a*2)}return i}},{key:"_setCurvePoint",value:function(r,n,i,a){if(r.length<=2)i[a]=r[0],i[a+1]=r[1];else{for(var s=Array(r.length-2),o=0;o0}},o=function(f){var d=f.pstyle("text-events").strValue==="yes";return d?FR.USE_BB:FR.IGNORE},l=function(f){var d=f.position(),p=d.x,m=d.y,g=f.outerWidth(),y=f.outerHeight();return{w:g,h:y,x1:p-g/2,y1:m-y/2}};r.drawing.addAtlasCollection("node",{texRows:t.webglTexRowsNodes}),r.drawing.addAtlasCollection("label",{texRows:t.webglTexRows}),r.drawing.addTextureAtlasRenderType("node-body",{collection:"node",getKey:e.getStyleKey,getBoundingBox:e.getElementBox,drawElement:e.drawElement}),r.drawing.addSimpleShapeRenderType("node-body",{getBoundingBox:l,isSimple:uSt,shapeProps:{shape:"shape",color:"background-color",opacity:"background-opacity",radius:"corner-radius",border:!0}}),r.drawing.addSimpleShapeRenderType("node-overlay",{getBoundingBox:l,isVisible:s("overlay"),shapeProps:{shape:"overlay-shape",color:"overlay-color",opacity:"overlay-opacity",padding:"overlay-padding",radius:"overlay-corner-radius"}}),r.drawing.addSimpleShapeRenderType("node-underlay",{getBoundingBox:l,isVisible:s("underlay"),shapeProps:{shape:"underlay-shape",color:"underlay-color",opacity:"underlay-opacity",padding:"underlay-padding",radius:"underlay-corner-radius"}}),r.drawing.addTextureAtlasRenderType("label",{collection:"label",getTexPickingMode:o,getKey:OY(e.getLabelKey,null),getBoundingBox:PY(e.getLabelBox,null),drawClipped:!0,drawElement:e.drawLabel,getRotation:i(null),getRotationPoint:e.getLabelRotationPoint,getRotationOffset:e.getLabelRotationOffset,isVisible:a("label")}),r.drawing.addTextureAtlasRenderType("edge-source-label",{collection:"label",getTexPickingMode:o,getKey:OY(e.getSourceLabelKey,"source"),getBoundingBox:PY(e.getSourceLabelBox,"source"),drawClipped:!0,drawElement:e.drawSourceLabel,getRotation:i("source"),getRotationPoint:e.getSourceLabelRotationPoint,getRotationOffset:e.getSourceLabelRotationOffset,isVisible:a("source-label")}),r.drawing.addTextureAtlasRenderType("edge-target-label",{collection:"label",getTexPickingMode:o,getKey:OY(e.getTargetLabelKey,"target"),getBoundingBox:PY(e.getTargetLabelBox,"target"),drawClipped:!0,drawElement:e.drawTargetLabel,getRotation:i("target"),getRotationPoint:e.getTargetLabelRotationPoint,getRotationOffset:e.getTargetLabelRotationOffset,isVisible:a("target-label")});var u=nw(function(){console.log("garbage collect flag set"),r.data.gc=!0},1e4);r.onUpdateEleCalcs(function(h,f){var d=!1;f&&f.length>0&&(d|=r.drawing.invalidate(f)),d&&u()}),RSt(r)};OY=function(e,r){return function(n){var i=e(n),a=wIe(n,r);return a.length>1?a.map(function(s,o){return"".concat(i,"_").concat(o)}):i}},PY=function(e,r){return function(n,i){var a=e(n);if(typeof i=="string"){var s=i.indexOf("_");if(s>0){var o=Number(i.substring(s+1)),l=wIe(n,r),u=a.h/l.length,h=u*o,f=a.y1+h;return{x1:a.x1,w:a.w,y1:f,h:u,yOffset:h}}}return a}};t1={};t1.drawPolygonPath=function(t,e,r,n,i,a){var s=n/2,o=i/2;t.beginPath&&t.beginPath(),t.moveTo(e+s*a[0],r+o*a[1]);for(var l=1;l0&&s>0){p.clearRect(0,0,a,s),p.globalCompositeOperation="source-over";var m=this.getCachedZSortedEles();if(t.full)p.translate(-n.x1*u,-n.y1*u),p.scale(u,u),this.drawElements(p,m),p.scale(1/u,1/u),p.translate(n.x1*u,n.y1*u);else{var g=e.pan(),y={x:g.x*u,y:g.y*u};u*=e.zoom(),p.translate(y.x,y.y),p.scale(u,u),this.drawElements(p,m),p.scale(1/u,1/u),p.translate(-y.x,-y.y)}t.bg&&(p.globalCompositeOperation="destination-over",p.fillStyle=t.bg,p.rect(0,0,a,s),p.fill())}return d};uw.png=function(t){return SIe(t,this.bufferCanvasImage(t),"image/png")};uw.jpg=function(t){return SIe(t,this.bufferCanvasImage(t),"image/jpeg")};CIe={};CIe.nodeShapeImpl=function(t,e,r,n,i,a,s,o){switch(t){case"ellipse":return this.drawEllipsePath(e,r,n,i,a);case"polygon":return this.drawPolygonPath(e,r,n,i,a,s);case"round-polygon":return this.drawRoundPolygonPath(e,r,n,i,a,s,o);case"roundrectangle":case"round-rectangle":return this.drawRoundRectanglePath(e,r,n,i,a,o);case"cutrectangle":case"cut-rectangle":return this.drawCutRectanglePath(e,r,n,i,a,s,o);case"bottomroundrectangle":case"bottom-round-rectangle":return this.drawBottomRoundRectanglePath(e,r,n,i,a,o);case"barrel":return this.drawBarrelPath(e,r,n,i,a)}};$St=_Ie,Hr=_Ie.prototype;Hr.CANVAS_LAYERS=3;Hr.SELECT_BOX=0;Hr.DRAG=1;Hr.NODE=2;Hr.WEBGL=3;Hr.CANVAS_TYPES=["2d","2d","2d","webgl2"];Hr.BUFFER_COUNT=3;Hr.TEXTURE_BUFFER=0;Hr.MOTIONBLUR_BUFFER_NODE=1;Hr.MOTIONBLUR_BUFFER_DRAG=2;Hr.redrawHint=function(t,e){var r=this;switch(t){case"eles":r.data.canvasNeedsRedraw[Hr.NODE]=e;break;case"drag":r.data.canvasNeedsRedraw[Hr.DRAG]=e;break;case"select":r.data.canvasNeedsRedraw[Hr.SELECT_BOX]=e;break;case"gc":r.data.gc=!0;break}};GSt=typeof Path2D<"u";Hr.path2dEnabled=function(t){if(t===void 0)return this.pathsEnabled;this.pathsEnabled=!!t};Hr.usePaths=function(){return GSt&&this.pathsEnabled};Hr.setImgSmoothing=function(t,e){t.imageSmoothingEnabled!=null?t.imageSmoothingEnabled=e:(t.webkitImageSmoothingEnabled=e,t.mozImageSmoothingEnabled=e,t.msImageSmoothingEnabled=e)};Hr.getImgSmoothing=function(t){return t.imageSmoothingEnabled!=null?t.imageSmoothingEnabled:t.webkitImageSmoothingEnabled||t.mozImageSmoothingEnabled||t.msImageSmoothingEnabled};Hr.makeOffscreenCanvas=function(t,e){var r;if((typeof OffscreenCanvas>"u"?"undefined":Xa(OffscreenCanvas))!=="undefined")r=new OffscreenCanvas(t,e);else{var n=this.cy.window(),i=n.document;r=i.createElement("canvas"),r.width=t,r.height=e}return r};[mIe,lh,_f,_X,wg,e1,zo,bIe,t1,uw,CIe].forEach(function(t){br(Hr,t)});qSt=[{name:"null",impl:eIe},{name:"base",impl:hIe},{name:"canvas",impl:$St}],USt=[{type:"layout",extensions:fEt},{type:"renderer",extensions:qSt}],AIe={},LIe={};nX=function(){if(arguments.length===2)return DIe.apply(null,arguments);if(arguments.length===3)return RIe.apply(null,arguments);if(arguments.length===4)return VSt.apply(null,arguments);if(arguments.length===5)return HSt.apply(null,arguments);Mi("Invalid extension access syntax")};K8.prototype.extension=nX;USt.forEach(function(t){t.extensions.forEach(function(e){RIe(t.type,e.name,e.impl)})});zR=function(){if(!(this instanceof zR))return new zR;this.length=0},xg=zR.prototype;xg.instanceString=function(){return"stylesheet"};xg.selector=function(t){var e=this.length++;return this[e]={selector:t,properties:[]},this};xg.css=function(t,e){var r=this.length-1;if(yr(t))this[r].properties.push({name:t,value:e});else if(yn(t))for(var n=t,i=Object.keys(n),a=0;a{(function(e,r){typeof cw=="object"&&typeof RX=="object"?RX.exports=r():typeof define=="function"&&define.amd?define([],r):typeof cw=="object"?cw.layoutBase=r():e.layoutBase=r()})(cw,function(){return(function(t){var e={};function r(n){if(e[n])return e[n].exports;var i=e[n]={i:n,l:!1,exports:{}};return t[n].call(i.exports,i,i.exports,r),i.l=!0,i.exports}return r.m=t,r.c=e,r.i=function(n){return n},r.d=function(n,i,a){r.o(n,i)||Object.defineProperty(n,i,{configurable:!1,enumerable:!0,get:a})},r.n=function(n){var i=n&&n.__esModule?function(){return n.default}:function(){return n};return r.d(i,"a",i),i},r.o=function(n,i){return Object.prototype.hasOwnProperty.call(n,i)},r.p="",r(r.s=26)})([(function(t,e,r){"use strict";function n(){}n.QUALITY=1,n.DEFAULT_CREATE_BENDS_AS_NEEDED=!1,n.DEFAULT_INCREMENTAL=!1,n.DEFAULT_ANIMATION_ON_LAYOUT=!0,n.DEFAULT_ANIMATION_DURING_LAYOUT=!1,n.DEFAULT_ANIMATION_PERIOD=50,n.DEFAULT_UNIFORM_LEAF_NODE_SIZES=!1,n.DEFAULT_GRAPH_MARGIN=15,n.NODE_DIMENSIONS_INCLUDE_LABELS=!1,n.SIMPLE_NODE_SIZE=40,n.SIMPLE_NODE_HALF_SIZE=n.SIMPLE_NODE_SIZE/2,n.EMPTY_COMPOUND_NODE_SIZE=40,n.MIN_EDGE_LENGTH=1,n.WORLD_BOUNDARY=1e6,n.INITIAL_WORLD_BOUNDARY=n.WORLD_BOUNDARY/1e3,n.WORLD_CENTER_X=1200,n.WORLD_CENTER_Y=900,t.exports=n}),(function(t,e,r){"use strict";var n=r(2),i=r(8),a=r(9);function s(l,u,h){n.call(this,h),this.isOverlapingSourceAndTarget=!1,this.vGraphObject=h,this.bendpoints=[],this.source=l,this.target=u}s.prototype=Object.create(n.prototype);for(var o in n)s[o]=n[o];s.prototype.getSource=function(){return this.source},s.prototype.getTarget=function(){return this.target},s.prototype.isInterGraph=function(){return this.isInterGraph},s.prototype.getLength=function(){return this.length},s.prototype.isOverlapingSourceAndTarget=function(){return this.isOverlapingSourceAndTarget},s.prototype.getBendpoints=function(){return this.bendpoints},s.prototype.getLca=function(){return this.lca},s.prototype.getSourceInLca=function(){return this.sourceInLca},s.prototype.getTargetInLca=function(){return this.targetInLca},s.prototype.getOtherEnd=function(l){if(this.source===l)return this.target;if(this.target===l)return this.source;throw"Node is not incident with this edge"},s.prototype.getOtherEndInGraph=function(l,u){for(var h=this.getOtherEnd(l),f=u.getGraphManager().getRoot();;){if(h.getOwner()==u)return h;if(h.getOwner()==f)break;h=h.getOwner().getParent()}return null},s.prototype.updateLength=function(){var l=new Array(4);this.isOverlapingSourceAndTarget=i.getIntersection(this.target.getRect(),this.source.getRect(),l),this.isOverlapingSourceAndTarget||(this.lengthX=l[0]-l[2],this.lengthY=l[1]-l[3],Math.abs(this.lengthX)<1&&(this.lengthX=a.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=a.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY))},s.prototype.updateLengthSimple=function(){this.lengthX=this.target.getCenterX()-this.source.getCenterX(),this.lengthY=this.target.getCenterY()-this.source.getCenterY(),Math.abs(this.lengthX)<1&&(this.lengthX=a.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=a.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY)},t.exports=s}),(function(t,e,r){"use strict";function n(i){this.vGraphObject=i}t.exports=n}),(function(t,e,r){"use strict";var n=r(2),i=r(10),a=r(13),s=r(0),o=r(16),l=r(4);function u(f,d,p,m){p==null&&m==null&&(m=d),n.call(this,m),f.graphManager!=null&&(f=f.graphManager),this.estimatedSize=i.MIN_VALUE,this.inclusionTreeDepth=i.MAX_VALUE,this.vGraphObject=m,this.edges=[],this.graphManager=f,p!=null&&d!=null?this.rect=new a(d.x,d.y,p.width,p.height):this.rect=new a}u.prototype=Object.create(n.prototype);for(var h in n)u[h]=n[h];u.prototype.getEdges=function(){return this.edges},u.prototype.getChild=function(){return this.child},u.prototype.getOwner=function(){return this.owner},u.prototype.getWidth=function(){return this.rect.width},u.prototype.setWidth=function(f){this.rect.width=f},u.prototype.getHeight=function(){return this.rect.height},u.prototype.setHeight=function(f){this.rect.height=f},u.prototype.getCenterX=function(){return this.rect.x+this.rect.width/2},u.prototype.getCenterY=function(){return this.rect.y+this.rect.height/2},u.prototype.getCenter=function(){return new l(this.rect.x+this.rect.width/2,this.rect.y+this.rect.height/2)},u.prototype.getLocation=function(){return new l(this.rect.x,this.rect.y)},u.prototype.getRect=function(){return this.rect},u.prototype.getDiagonal=function(){return Math.sqrt(this.rect.width*this.rect.width+this.rect.height*this.rect.height)},u.prototype.getHalfTheDiagonal=function(){return Math.sqrt(this.rect.height*this.rect.height+this.rect.width*this.rect.width)/2},u.prototype.setRect=function(f,d){this.rect.x=f.x,this.rect.y=f.y,this.rect.width=d.width,this.rect.height=d.height},u.prototype.setCenter=function(f,d){this.rect.x=f-this.rect.width/2,this.rect.y=d-this.rect.height/2},u.prototype.setLocation=function(f,d){this.rect.x=f,this.rect.y=d},u.prototype.moveBy=function(f,d){this.rect.x+=f,this.rect.y+=d},u.prototype.getEdgeListToNode=function(f){var d=[],p,m=this;return m.edges.forEach(function(g){if(g.target==f){if(g.source!=m)throw"Incorrect edge source!";d.push(g)}}),d},u.prototype.getEdgesBetween=function(f){var d=[],p,m=this;return m.edges.forEach(function(g){if(!(g.source==m||g.target==m))throw"Incorrect edge source and/or target";(g.target==f||g.source==f)&&d.push(g)}),d},u.prototype.getNeighborsList=function(){var f=new Set,d=this;return d.edges.forEach(function(p){if(p.source==d)f.add(p.target);else{if(p.target!=d)throw"Incorrect incidency!";f.add(p.source)}}),f},u.prototype.withChildren=function(){var f=new Set,d,p;if(f.add(this),this.child!=null)for(var m=this.child.getNodes(),g=0;gd&&(this.rect.x-=(this.labelWidth-d)/2,this.setWidth(this.labelWidth)),this.labelHeight>p&&(this.labelPos=="center"?this.rect.y-=(this.labelHeight-p)/2:this.labelPos=="top"&&(this.rect.y-=this.labelHeight-p),this.setHeight(this.labelHeight))}}},u.prototype.getInclusionTreeDepth=function(){if(this.inclusionTreeDepth==i.MAX_VALUE)throw"assert failed";return this.inclusionTreeDepth},u.prototype.transform=function(f){var d=this.rect.x;d>s.WORLD_BOUNDARY?d=s.WORLD_BOUNDARY:d<-s.WORLD_BOUNDARY&&(d=-s.WORLD_BOUNDARY);var p=this.rect.y;p>s.WORLD_BOUNDARY?p=s.WORLD_BOUNDARY:p<-s.WORLD_BOUNDARY&&(p=-s.WORLD_BOUNDARY);var m=new l(d,p),g=f.inverseTransformPoint(m);this.setLocation(g.x,g.y)},u.prototype.getLeft=function(){return this.rect.x},u.prototype.getRight=function(){return this.rect.x+this.rect.width},u.prototype.getTop=function(){return this.rect.y},u.prototype.getBottom=function(){return this.rect.y+this.rect.height},u.prototype.getParent=function(){return this.owner==null?null:this.owner.getParent()},t.exports=u}),(function(t,e,r){"use strict";function n(i,a){i==null&&a==null?(this.x=0,this.y=0):(this.x=i,this.y=a)}n.prototype.getX=function(){return this.x},n.prototype.getY=function(){return this.y},n.prototype.setX=function(i){this.x=i},n.prototype.setY=function(i){this.y=i},n.prototype.getDifference=function(i){return new DimensionD(this.x-i.x,this.y-i.y)},n.prototype.getCopy=function(){return new n(this.x,this.y)},n.prototype.translate=function(i){return this.x+=i.width,this.y+=i.height,this},t.exports=n}),(function(t,e,r){"use strict";var n=r(2),i=r(10),a=r(0),s=r(6),o=r(3),l=r(1),u=r(13),h=r(12),f=r(11);function d(m,g,y){n.call(this,y),this.estimatedSize=i.MIN_VALUE,this.margin=a.DEFAULT_GRAPH_MARGIN,this.edges=[],this.nodes=[],this.isConnected=!1,this.parent=m,g!=null&&g instanceof s?this.graphManager=g:g!=null&&g instanceof Layout&&(this.graphManager=g.graphManager)}d.prototype=Object.create(n.prototype);for(var p in n)d[p]=n[p];d.prototype.getNodes=function(){return this.nodes},d.prototype.getEdges=function(){return this.edges},d.prototype.getGraphManager=function(){return this.graphManager},d.prototype.getParent=function(){return this.parent},d.prototype.getLeft=function(){return this.left},d.prototype.getRight=function(){return this.right},d.prototype.getTop=function(){return this.top},d.prototype.getBottom=function(){return this.bottom},d.prototype.isConnected=function(){return this.isConnected},d.prototype.add=function(m,g,y){if(g==null&&y==null){var v=m;if(this.graphManager==null)throw"Graph has no graph mgr!";if(this.getNodes().indexOf(v)>-1)throw"Node already in graph!";return v.owner=this,this.getNodes().push(v),v}else{var x=m;if(!(this.getNodes().indexOf(g)>-1&&this.getNodes().indexOf(y)>-1))throw"Source or target not in graph!";if(!(g.owner==y.owner&&g.owner==this))throw"Both owners must be this graph!";return g.owner!=y.owner?null:(x.source=g,x.target=y,x.isInterGraph=!1,this.getEdges().push(x),g.edges.push(x),y!=g&&y.edges.push(x),x)}},d.prototype.remove=function(m){var g=m;if(m instanceof o){if(g==null)throw"Node is null!";if(!(g.owner!=null&&g.owner==this))throw"Owner graph is invalid!";if(this.graphManager==null)throw"Owner graph manager is invalid!";for(var y=g.edges.slice(),v,x=y.length,k=0;k-1&&S>-1))throw"Source and/or target doesn't know this edge!";v.source.edges.splice(T,1),v.target!=v.source&&v.target.edges.splice(S,1);var _=v.source.owner.getEdges().indexOf(v);if(_==-1)throw"Not in owner's edge list!";v.source.owner.getEdges().splice(_,1)}},d.prototype.updateLeftTop=function(){for(var m=i.MAX_VALUE,g=i.MAX_VALUE,y,v,x,k=this.getNodes(),_=k.length,T=0;T<_;T++){var S=k[T];y=S.getTop(),v=S.getLeft(),m>y&&(m=y),g>v&&(g=v)}return m==i.MAX_VALUE?null:(k[0].getParent().paddingLeft!=null?x=k[0].getParent().paddingLeft:x=this.margin,this.left=g-x,this.top=m-x,new h(this.left,this.top))},d.prototype.updateBounds=function(m){for(var g=i.MAX_VALUE,y=-i.MAX_VALUE,v=i.MAX_VALUE,x=-i.MAX_VALUE,k,_,T,S,R,A=this.nodes,I=A.length,P=0;Pk&&(g=k),y<_&&(y=_),v>T&&(v=T),xk&&(g=k),y<_&&(y=_),v>T&&(v=T),x=this.nodes.length){var I=0;y.forEach(function(P){P.owner==m&&I++}),I==this.nodes.length&&(this.isConnected=!0)}},t.exports=d}),(function(t,e,r){"use strict";var n,i=r(1);function a(s){n=r(5),this.layout=s,this.graphs=[],this.edges=[]}a.prototype.addRoot=function(){var s=this.layout.newGraph(),o=this.layout.newNode(null),l=this.add(s,o);return this.setRootGraph(l),this.rootGraph},a.prototype.add=function(s,o,l,u,h){if(l==null&&u==null&&h==null){if(s==null)throw"Graph is null!";if(o==null)throw"Parent node is null!";if(this.graphs.indexOf(s)>-1)throw"Graph already in this graph mgr!";if(this.graphs.push(s),s.parent!=null)throw"Already has a parent!";if(o.child!=null)throw"Already has a child!";return s.parent=o,o.child=s,s}else{h=l,u=o,l=s;var f=u.getOwner(),d=h.getOwner();if(!(f!=null&&f.getGraphManager()==this))throw"Source not in this graph mgr!";if(!(d!=null&&d.getGraphManager()==this))throw"Target not in this graph mgr!";if(f==d)return l.isInterGraph=!1,f.add(l,u,h);if(l.isInterGraph=!0,l.source=u,l.target=h,this.edges.indexOf(l)>-1)throw"Edge already in inter-graph edge list!";if(this.edges.push(l),!(l.source!=null&&l.target!=null))throw"Edge source and/or target is null!";if(!(l.source.edges.indexOf(l)==-1&&l.target.edges.indexOf(l)==-1))throw"Edge already in source and/or target incidency list!";return l.source.edges.push(l),l.target.edges.push(l),l}},a.prototype.remove=function(s){if(s instanceof n){var o=s;if(o.getGraphManager()!=this)throw"Graph not in this graph mgr";if(!(o==this.rootGraph||o.parent!=null&&o.parent.graphManager==this))throw"Invalid parent node!";var l=[];l=l.concat(o.getEdges());for(var u,h=l.length,f=0;f=s.getRight()?o[0]+=Math.min(s.getX()-a.getX(),a.getRight()-s.getRight()):s.getX()<=a.getX()&&s.getRight()>=a.getRight()&&(o[0]+=Math.min(a.getX()-s.getX(),s.getRight()-a.getRight())),a.getY()<=s.getY()&&a.getBottom()>=s.getBottom()?o[1]+=Math.min(s.getY()-a.getY(),a.getBottom()-s.getBottom()):s.getY()<=a.getY()&&s.getBottom()>=a.getBottom()&&(o[1]+=Math.min(a.getY()-s.getY(),s.getBottom()-a.getBottom()));var h=Math.abs((s.getCenterY()-a.getCenterY())/(s.getCenterX()-a.getCenterX()));s.getCenterY()===a.getCenterY()&&s.getCenterX()===a.getCenterX()&&(h=1);var f=h*o[0],d=o[1]/h;o[0]f)return o[0]=l,o[1]=p,o[2]=h,o[3]=A,!1;if(uh)return o[0]=d,o[1]=u,o[2]=S,o[3]=f,!1;if(lh?(o[0]=g,o[1]=y,C=!0):(o[0]=m,o[1]=p,C=!0):B===M&&(l>h?(o[0]=d,o[1]=p,C=!0):(o[0]=v,o[1]=y,C=!0)),-F===M?h>l?(o[2]=R,o[3]=A,N=!0):(o[2]=S,o[3]=T,N=!0):F===M&&(h>l?(o[2]=_,o[3]=T,N=!0):(o[2]=I,o[3]=A,N=!0)),C&&N)return!1;if(l>h?u>f?($=this.getCardinalDirection(B,M,4),z=this.getCardinalDirection(F,M,2)):($=this.getCardinalDirection(-B,M,3),z=this.getCardinalDirection(-F,M,1)):u>f?($=this.getCardinalDirection(-B,M,1),z=this.getCardinalDirection(-F,M,3)):($=this.getCardinalDirection(B,M,2),z=this.getCardinalDirection(F,M,4)),!C)switch($){case 1:V=p,q=l+-k/M,o[0]=q,o[1]=V;break;case 2:q=v,V=u+x*M,o[0]=q,o[1]=V;break;case 3:V=y,q=l+k/M,o[0]=q,o[1]=V;break;case 4:q=g,V=u+-x*M,o[0]=q,o[1]=V;break}if(!N)switch(z){case 1:J=T,U=h+-O/M,o[2]=U,o[3]=J;break;case 2:U=I,J=f+P*M,o[2]=U,o[3]=J;break;case 3:J=A,U=h+O/M,o[2]=U,o[3]=J;break;case 4:U=R,J=f+-P*M,o[2]=U,o[3]=J;break}}return!1},i.getCardinalDirection=function(a,s,o){return a>s?o:1+o%4},i.getIntersection=function(a,s,o,l){if(l==null)return this.getIntersection2(a,s,o);var u=a.x,h=a.y,f=s.x,d=s.y,p=o.x,m=o.y,g=l.x,y=l.y,v=void 0,x=void 0,k=void 0,_=void 0,T=void 0,S=void 0,R=void 0,A=void 0,I=void 0;return k=d-h,T=u-f,R=f*h-u*d,_=y-m,S=p-g,A=g*m-p*y,I=k*S-_*T,I===0?null:(v=(T*A-S*R)/I,x=(_*R-k*A)/I,new n(v,x))},i.angleOfVector=function(a,s,o,l){var u=void 0;return a!==o?(u=Math.atan((l-s)/(o-a)),o0?1:i<0?-1:0},n.floor=function(i){return i<0?Math.ceil(i):Math.floor(i)},n.ceil=function(i){return i<0?Math.floor(i):Math.ceil(i)},t.exports=n}),(function(t,e,r){"use strict";function n(){}n.MAX_VALUE=2147483647,n.MIN_VALUE=-2147483648,t.exports=n}),(function(t,e,r){"use strict";var n=(function(){function u(h,f){for(var d=0;d"u"?"undefined":n(a);return a==null||s!="object"&&s!="function"},t.exports=i}),(function(t,e,r){"use strict";function n(p){if(Array.isArray(p)){for(var m=0,g=Array(p.length);m0&&m;){for(k.push(T[0]);k.length>0&&m;){var S=k[0];k.splice(0,1),x.add(S);for(var R=S.getEdges(),v=0;v-1&&T.splice(O,1)}x=new Set,_=new Map}}return p},d.prototype.createDummyNodesForBendpoints=function(p){for(var m=[],g=p.source,y=this.graphManager.calcLowestCommonAncestor(p.source,p.target),v=0;v0){for(var y=this.edgeToDummyNodes.get(g),v=0;v=0&&m.splice(A,1);var I=_.getNeighborsList();I.forEach(function(C){if(g.indexOf(C)<0){var N=y.get(C),B=N-1;B==1&&S.push(C),y.set(C,B)}})}g=g.concat(S),(m.length==1||m.length==2)&&(v=!0,x=m[0])}return x},d.prototype.setGraphManager=function(p){this.graphManager=p},t.exports=d}),(function(t,e,r){"use strict";function n(){}n.seed=1,n.x=0,n.nextDouble=function(){return n.x=Math.sin(n.seed++)*1e4,n.x-Math.floor(n.x)},t.exports=n}),(function(t,e,r){"use strict";var n=r(4);function i(a,s){this.lworldOrgX=0,this.lworldOrgY=0,this.ldeviceOrgX=0,this.ldeviceOrgY=0,this.lworldExtX=1,this.lworldExtY=1,this.ldeviceExtX=1,this.ldeviceExtY=1}i.prototype.getWorldOrgX=function(){return this.lworldOrgX},i.prototype.setWorldOrgX=function(a){this.lworldOrgX=a},i.prototype.getWorldOrgY=function(){return this.lworldOrgY},i.prototype.setWorldOrgY=function(a){this.lworldOrgY=a},i.prototype.getWorldExtX=function(){return this.lworldExtX},i.prototype.setWorldExtX=function(a){this.lworldExtX=a},i.prototype.getWorldExtY=function(){return this.lworldExtY},i.prototype.setWorldExtY=function(a){this.lworldExtY=a},i.prototype.getDeviceOrgX=function(){return this.ldeviceOrgX},i.prototype.setDeviceOrgX=function(a){this.ldeviceOrgX=a},i.prototype.getDeviceOrgY=function(){return this.ldeviceOrgY},i.prototype.setDeviceOrgY=function(a){this.ldeviceOrgY=a},i.prototype.getDeviceExtX=function(){return this.ldeviceExtX},i.prototype.setDeviceExtX=function(a){this.ldeviceExtX=a},i.prototype.getDeviceExtY=function(){return this.ldeviceExtY},i.prototype.setDeviceExtY=function(a){this.ldeviceExtY=a},i.prototype.transformX=function(a){var s=0,o=this.lworldExtX;return o!=0&&(s=this.ldeviceOrgX+(a-this.lworldOrgX)*this.ldeviceExtX/o),s},i.prototype.transformY=function(a){var s=0,o=this.lworldExtY;return o!=0&&(s=this.ldeviceOrgY+(a-this.lworldOrgY)*this.ldeviceExtY/o),s},i.prototype.inverseTransformX=function(a){var s=0,o=this.ldeviceExtX;return o!=0&&(s=this.lworldOrgX+(a-this.ldeviceOrgX)*this.lworldExtX/o),s},i.prototype.inverseTransformY=function(a){var s=0,o=this.ldeviceExtY;return o!=0&&(s=this.lworldOrgY+(a-this.ldeviceOrgY)*this.lworldExtY/o),s},i.prototype.inverseTransformPoint=function(a){var s=new n(this.inverseTransformX(a.x),this.inverseTransformY(a.y));return s},t.exports=i}),(function(t,e,r){"use strict";function n(f){if(Array.isArray(f)){for(var d=0,p=Array(f.length);da.ADAPTATION_LOWER_NODE_LIMIT&&(this.coolingFactor=Math.max(this.coolingFactor*a.COOLING_ADAPTATION_FACTOR,this.coolingFactor-(f-a.ADAPTATION_LOWER_NODE_LIMIT)/(a.ADAPTATION_UPPER_NODE_LIMIT-a.ADAPTATION_LOWER_NODE_LIMIT)*this.coolingFactor*(1-a.COOLING_ADAPTATION_FACTOR))),this.maxNodeDisplacement=a.MAX_NODE_DISPLACEMENT_INCREMENTAL):(f>a.ADAPTATION_LOWER_NODE_LIMIT?this.coolingFactor=Math.max(a.COOLING_ADAPTATION_FACTOR,1-(f-a.ADAPTATION_LOWER_NODE_LIMIT)/(a.ADAPTATION_UPPER_NODE_LIMIT-a.ADAPTATION_LOWER_NODE_LIMIT)*(1-a.COOLING_ADAPTATION_FACTOR)):this.coolingFactor=1,this.initialCoolingFactor=this.coolingFactor,this.maxNodeDisplacement=a.MAX_NODE_DISPLACEMENT),this.maxIterations=Math.max(this.getAllNodes().length*5,this.maxIterations),this.totalDisplacementThreshold=this.displacementThresholdPerNode*this.getAllNodes().length,this.repulsionRange=this.calcRepulsionRange()},u.prototype.calcSpringForces=function(){for(var f=this.getAllEdges(),d,p=0;p0&&arguments[0]!==void 0?arguments[0]:!0,d=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,p,m,g,y,v=this.getAllNodes(),x;if(this.useFRGridVariant)for(this.totalIterations%a.GRID_CALCULATION_CHECK_PERIOD==1&&f&&this.updateGrid(),x=new Set,p=0;pk||x>k)&&(f.gravitationForceX=-this.gravityConstant*g,f.gravitationForceY=-this.gravityConstant*y)):(k=d.getEstimatedSize()*this.compoundGravityRangeFactor,(v>k||x>k)&&(f.gravitationForceX=-this.gravityConstant*g*this.compoundGravityConstant,f.gravitationForceY=-this.gravityConstant*y*this.compoundGravityConstant))},u.prototype.isConverged=function(){var f,d=!1;return this.totalIterations>this.maxIterations/3&&(d=Math.abs(this.totalDisplacement-this.oldTotalDisplacement)<2),f=this.totalDisplacement=v.length||k>=v[0].length)){for(var _=0;_u}}]),o})();t.exports=s}),(function(t,e,r){"use strict";var n=(function(){function s(o,l){for(var u=0;u2&&arguments[2]!==void 0?arguments[2]:1,h=arguments.length>3&&arguments[3]!==void 0?arguments[3]:-1,f=arguments.length>4&&arguments[4]!==void 0?arguments[4]:-1;i(this,s),this.sequence1=o,this.sequence2=l,this.match_score=u,this.mismatch_penalty=h,this.gap_penalty=f,this.iMax=o.length+1,this.jMax=l.length+1,this.grid=new Array(this.iMax);for(var d=0;d=0;o--){var l=this.listeners[o];l.event===a&&l.callback===s&&this.listeners.splice(o,1)}},i.emit=function(a,s){for(var o=0;o{(function(e,r){typeof hw=="object"&&typeof IX=="object"?IX.exports=r(DX()):typeof define=="function"&&define.amd?define(["layout-base"],r):typeof hw=="object"?hw.coseBase=r(DX()):e.coseBase=r(e.layoutBase)})(hw,function(t){return(function(e){var r={};function n(i){if(r[i])return r[i].exports;var a=r[i]={i,l:!1,exports:{}};return e[i].call(a.exports,a,a.exports,n),a.l=!0,a.exports}return n.m=e,n.c=r,n.i=function(i){return i},n.d=function(i,a,s){n.o(i,a)||Object.defineProperty(i,a,{configurable:!1,enumerable:!0,get:s})},n.n=function(i){var a=i&&i.__esModule?function(){return i.default}:function(){return i};return n.d(a,"a",a),a},n.o=function(i,a){return Object.prototype.hasOwnProperty.call(i,a)},n.p="",n(n.s=7)})([(function(e,r){e.exports=t}),(function(e,r,n){"use strict";var i=n(0).FDLayoutConstants;function a(){}for(var s in i)a[s]=i[s];a.DEFAULT_USE_MULTI_LEVEL_SCALING=!1,a.DEFAULT_RADIAL_SEPARATION=i.DEFAULT_EDGE_LENGTH,a.DEFAULT_COMPONENT_SEPERATION=60,a.TILE=!0,a.TILING_PADDING_VERTICAL=10,a.TILING_PADDING_HORIZONTAL=10,a.TREE_REDUCTION_ON_INCREMENTAL=!1,e.exports=a}),(function(e,r,n){"use strict";var i=n(0).FDLayoutEdge;function a(o,l,u){i.call(this,o,l,u)}a.prototype=Object.create(i.prototype);for(var s in i)a[s]=i[s];e.exports=a}),(function(e,r,n){"use strict";var i=n(0).LGraph;function a(o,l,u){i.call(this,o,l,u)}a.prototype=Object.create(i.prototype);for(var s in i)a[s]=i[s];e.exports=a}),(function(e,r,n){"use strict";var i=n(0).LGraphManager;function a(o){i.call(this,o)}a.prototype=Object.create(i.prototype);for(var s in i)a[s]=i[s];e.exports=a}),(function(e,r,n){"use strict";var i=n(0).FDLayoutNode,a=n(0).IMath;function s(l,u,h,f){i.call(this,l,u,h,f)}s.prototype=Object.create(i.prototype);for(var o in i)s[o]=i[o];s.prototype.move=function(){var l=this.graphManager.getLayout();this.displacementX=l.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.noOfChildren,this.displacementY=l.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.noOfChildren,Math.abs(this.displacementX)>l.coolingFactor*l.maxNodeDisplacement&&(this.displacementX=l.coolingFactor*l.maxNodeDisplacement*a.sign(this.displacementX)),Math.abs(this.displacementY)>l.coolingFactor*l.maxNodeDisplacement&&(this.displacementY=l.coolingFactor*l.maxNodeDisplacement*a.sign(this.displacementY)),this.child==null?this.moveBy(this.displacementX,this.displacementY):this.child.getNodes().length==0?this.moveBy(this.displacementX,this.displacementY):this.propogateDisplacementToChildren(this.displacementX,this.displacementY),l.totalDisplacement+=Math.abs(this.displacementX)+Math.abs(this.displacementY),this.springForceX=0,this.springForceY=0,this.repulsionForceX=0,this.repulsionForceY=0,this.gravitationForceX=0,this.gravitationForceY=0,this.displacementX=0,this.displacementY=0},s.prototype.propogateDisplacementToChildren=function(l,u){for(var h=this.getChild().getNodes(),f,d=0;d0)this.positionNodesRadially(T);else{this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var S=new Set(this.getAllNodes()),R=this.nodesWithGravity.filter(function(A){return S.has(A)});this.graphManager.setAllNodesToApplyGravitation(R),this.positionNodesRandomly()}}return this.initSpringEmbedder(),this.runSpringEmbedder(),!0},k.prototype.tick=function(){if(this.totalIterations++,this.totalIterations===this.maxIterations&&!this.isTreeGrowing&&!this.isGrowthFinished)if(this.prunedNodesAll.length>0)this.isTreeGrowing=!0;else return!0;if(this.totalIterations%h.CONVERGENCE_CHECK_PERIOD==0&&!this.isTreeGrowing&&!this.isGrowthFinished){if(this.isConverged())if(this.prunedNodesAll.length>0)this.isTreeGrowing=!0;else return!0;this.coolingCycle++,this.layoutQuality==0?this.coolingAdjuster=this.coolingCycle:this.layoutQuality==1&&(this.coolingAdjuster=this.coolingCycle/3),this.coolingFactor=Math.max(this.initialCoolingFactor-Math.pow(this.coolingCycle,Math.log(100*(this.initialCoolingFactor-this.finalTemperature))/Math.log(this.maxCoolingCycle))/100*this.coolingAdjuster,this.finalTemperature),this.animationPeriod=Math.ceil(this.initialAnimationPeriod*Math.sqrt(this.coolingFactor))}if(this.isTreeGrowing){if(this.growTreeIterations%10==0)if(this.prunedNodesAll.length>0){this.graphManager.updateBounds(),this.updateGrid(),this.growTree(this.prunedNodesAll),this.graphManager.resetAllNodesToApplyGravitation();var T=new Set(this.getAllNodes()),S=this.nodesWithGravity.filter(function(I){return T.has(I)});this.graphManager.setAllNodesToApplyGravitation(S),this.graphManager.updateBounds(),this.updateGrid(),this.coolingFactor=h.DEFAULT_COOLING_FACTOR_INCREMENTAL}else this.isTreeGrowing=!1,this.isGrowthFinished=!0;this.growTreeIterations++}if(this.isGrowthFinished){if(this.isConverged())return!0;this.afterGrowthIterations%10==0&&(this.graphManager.updateBounds(),this.updateGrid()),this.coolingFactor=h.DEFAULT_COOLING_FACTOR_INCREMENTAL*((100-this.afterGrowthIterations)/100),this.afterGrowthIterations++}var R=!this.isTreeGrowing&&!this.isGrowthFinished,A=this.growTreeIterations%10==1&&this.isTreeGrowing||this.afterGrowthIterations%10==1&&this.isGrowthFinished;return this.totalDisplacement=0,this.graphManager.updateBounds(),this.calcSpringForces(),this.calcRepulsionForces(R,A),this.calcGravitationalForces(),this.moveNodes(),this.animate(),!1},k.prototype.getPositionsData=function(){for(var T=this.graphManager.getAllNodes(),S={},R=0;R1){var C;for(C=0;CA&&(A=Math.floor(O.y)),P=Math.floor(O.x+u.DEFAULT_COMPONENT_SEPERATION)}this.transform(new p(f.WORLD_CENTER_X-O.x/2,f.WORLD_CENTER_Y-O.y/2))},k.radialLayout=function(T,S,R){var A=Math.max(this.maxDiagonalInTree(T),u.DEFAULT_RADIAL_SEPARATION);k.branchRadialLayout(S,null,0,359,0,A);var I=v.calculateBounds(T),P=new x;P.setDeviceOrgX(I.getMinX()),P.setDeviceOrgY(I.getMinY()),P.setWorldOrgX(R.x),P.setWorldOrgY(R.y);for(var O=0;O1;){var se=J[0];J.splice(0,1);var re=$.indexOf(se);re>=0&&$.splice(re,1),V--,z--}S!=null?U=($.indexOf(J[0])+1)%V:U=0;for(var me=Math.abs(A-R)/z,ge=U;q!=z;ge=++ge%V){var ye=$[ge].getOtherEnd(T);if(ye!=S){var _e=(R+q*me)%360,ue=(_e+me)%360;k.branchRadialLayout(ye,T,_e,ue,I+P,P),q++}}},k.maxDiagonalInTree=function(T){for(var S=g.MIN_VALUE,R=0;RS&&(S=I)}return S},k.prototype.calcRepulsionRange=function(){return 2*(this.level+1)*this.idealEdgeLength},k.prototype.groupZeroDegreeMembers=function(){var T=this,S={};this.memberGroups={},this.idToDummyNode={};for(var R=[],A=this.graphManager.getAllNodes(),I=0;I"u"&&(S[C]=[]),S[C]=S[C].concat(P)}Object.keys(S).forEach(function(N){if(S[N].length>1){var B="DummyCompound_"+N;T.memberGroups[B]=S[N];var F=S[N][0].getParent(),M=new o(T.graphManager);M.id=B,M.paddingLeft=F.paddingLeft||0,M.paddingRight=F.paddingRight||0,M.paddingBottom=F.paddingBottom||0,M.paddingTop=F.paddingTop||0,T.idToDummyNode[B]=M;var $=T.getGraphManager().add(T.newGraph(),M),z=F.getChild();z.add(M);for(var q=0;q=0;T--){var S=this.compoundOrder[T],R=S.id,A=S.paddingLeft,I=S.paddingTop;this.adjustLocations(this.tiledMemberPack[R],S.rect.x,S.rect.y,A,I)}},k.prototype.repopulateZeroDegreeMembers=function(){var T=this,S=this.tiledZeroDegreePack;Object.keys(S).forEach(function(R){var A=T.idToDummyNode[R],I=A.paddingLeft,P=A.paddingTop;T.adjustLocations(S[R],A.rect.x,A.rect.y,I,P)})},k.prototype.getToBeTiled=function(T){var S=T.id;if(this.toBeTiled[S]!=null)return this.toBeTiled[S];var R=T.getChild();if(R==null)return this.toBeTiled[S]=!1,!1;for(var A=R.getNodes(),I=0;I0)return this.toBeTiled[S]=!1,!1;if(P.getChild()==null){this.toBeTiled[P.id]=!1;continue}if(!this.getToBeTiled(P))return this.toBeTiled[S]=!1,!1}return this.toBeTiled[S]=!0,!0},k.prototype.getNodeDegree=function(T){for(var S=T.id,R=T.getEdges(),A=0,I=0;IN&&(N=F.rect.height)}R+=N+T.verticalPadding}},k.prototype.tileCompoundMembers=function(T,S){var R=this;this.tiledMemberPack=[],Object.keys(T).forEach(function(A){var I=S[A];R.tiledMemberPack[A]=R.tileNodes(T[A],I.paddingLeft+I.paddingRight),I.rect.width=R.tiledMemberPack[A].width,I.rect.height=R.tiledMemberPack[A].height})},k.prototype.tileNodes=function(T,S){var R=u.TILING_PADDING_VERTICAL,A=u.TILING_PADDING_HORIZONTAL,I={rows:[],rowWidth:[],rowHeight:[],width:0,height:S,verticalPadding:R,horizontalPadding:A};T.sort(function(C,N){return C.rect.width*C.rect.height>N.rect.width*N.rect.height?-1:C.rect.width*C.rect.height0&&(O+=T.horizontalPadding),T.rowWidth[R]=O,T.width0&&(C+=T.verticalPadding);var N=0;C>T.rowHeight[R]&&(N=T.rowHeight[R],T.rowHeight[R]=C,N=T.rowHeight[R]-N),T.height+=N,T.rows[R].push(S)},k.prototype.getShortestRowIndex=function(T){for(var S=-1,R=Number.MAX_VALUE,A=0;AR&&(S=A,R=T.rowWidth[A]);return S},k.prototype.canAddHorizontal=function(T,S,R){var A=this.getShortestRowIndex(T);if(A<0)return!0;var I=T.rowWidth[A];if(I+T.horizontalPadding+S<=T.width)return!0;var P=0;T.rowHeight[A]0&&(P=R+T.verticalPadding-T.rowHeight[A]);var O;T.width-I>=S+T.horizontalPadding?O=(T.height+P)/(I+S+T.horizontalPadding):O=(T.height+P)/T.width,P=R+T.verticalPadding;var C;return T.widthP&&S!=R){A.splice(-1,1),T.rows[R].push(I),T.rowWidth[S]=T.rowWidth[S]-P,T.rowWidth[R]=T.rowWidth[R]+P,T.width=T.rowWidth[instance.getLongestRowIndex(T)];for(var O=Number.MIN_VALUE,C=0;CO&&(O=A[C].height);S>0&&(O+=T.verticalPadding);var N=T.rowHeight[S]+T.rowHeight[R];T.rowHeight[S]=O,T.rowHeight[R]0)for(var z=I;z<=P;z++)$[0]+=this.grid[z][O-1].length+this.grid[z][O].length-1;if(P0)for(var z=O;z<=C;z++)$[3]+=this.grid[I-1][z].length+this.grid[I][z].length-1;for(var q=g.MAX_VALUE,V,U,J=0;J<$.length;J++)$[J]{(function(e,r){typeof fw=="object"&&typeof NX=="object"?NX.exports=r(MX()):typeof define=="function"&&define.amd?define(["cose-base"],r):typeof fw=="object"?fw.cytoscapeCoseBilkent=r(MX()):e.cytoscapeCoseBilkent=r(e.coseBase)})(fw,function(t){return(function(e){var r={};function n(i){if(r[i])return r[i].exports;var a=r[i]={i,l:!1,exports:{}};return e[i].call(a.exports,a,a.exports,n),a.l=!0,a.exports}return n.m=e,n.c=r,n.i=function(i){return i},n.d=function(i,a,s){n.o(i,a)||Object.defineProperty(i,a,{configurable:!1,enumerable:!0,get:s})},n.n=function(i){var a=i&&i.__esModule?function(){return i.default}:function(){return i};return n.d(a,"a",a),a},n.o=function(i,a){return Object.prototype.hasOwnProperty.call(i,a)},n.p="",n(n.s=1)})([(function(e,r){e.exports=t}),(function(e,r,n){"use strict";var i=n(0).layoutBase.LayoutConstants,a=n(0).layoutBase.FDLayoutConstants,s=n(0).CoSEConstants,o=n(0).CoSELayout,l=n(0).CoSENode,u=n(0).layoutBase.PointD,h=n(0).layoutBase.DimensionD,f={ready:function(){},stop:function(){},quality:"default",nodeDimensionsIncludeLabels:!1,refresh:30,fit:!0,padding:10,randomize:!0,nodeRepulsion:4500,idealEdgeLength:50,edgeElasticity:.45,nestingFactor:.1,gravity:.25,numIter:2500,tile:!0,animate:"end",animationDuration:500,tilingPaddingVertical:10,tilingPaddingHorizontal:10,gravityRangeCompound:1.5,gravityCompound:1,gravityRange:3.8,initialEnergyOnIncremental:.5};function d(y,v){var x={};for(var k in y)x[k]=y[k];for(var k in v)x[k]=v[k];return x}function p(y){this.options=d(f,y),m(this.options)}var m=function(v){v.nodeRepulsion!=null&&(s.DEFAULT_REPULSION_STRENGTH=a.DEFAULT_REPULSION_STRENGTH=v.nodeRepulsion),v.idealEdgeLength!=null&&(s.DEFAULT_EDGE_LENGTH=a.DEFAULT_EDGE_LENGTH=v.idealEdgeLength),v.edgeElasticity!=null&&(s.DEFAULT_SPRING_STRENGTH=a.DEFAULT_SPRING_STRENGTH=v.edgeElasticity),v.nestingFactor!=null&&(s.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=a.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=v.nestingFactor),v.gravity!=null&&(s.DEFAULT_GRAVITY_STRENGTH=a.DEFAULT_GRAVITY_STRENGTH=v.gravity),v.numIter!=null&&(s.MAX_ITERATIONS=a.MAX_ITERATIONS=v.numIter),v.gravityRange!=null&&(s.DEFAULT_GRAVITY_RANGE_FACTOR=a.DEFAULT_GRAVITY_RANGE_FACTOR=v.gravityRange),v.gravityCompound!=null&&(s.DEFAULT_COMPOUND_GRAVITY_STRENGTH=a.DEFAULT_COMPOUND_GRAVITY_STRENGTH=v.gravityCompound),v.gravityRangeCompound!=null&&(s.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=a.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=v.gravityRangeCompound),v.initialEnergyOnIncremental!=null&&(s.DEFAULT_COOLING_FACTOR_INCREMENTAL=a.DEFAULT_COOLING_FACTOR_INCREMENTAL=v.initialEnergyOnIncremental),v.quality=="draft"?i.QUALITY=0:v.quality=="proof"?i.QUALITY=2:i.QUALITY=1,s.NODE_DIMENSIONS_INCLUDE_LABELS=a.NODE_DIMENSIONS_INCLUDE_LABELS=i.NODE_DIMENSIONS_INCLUDE_LABELS=v.nodeDimensionsIncludeLabels,s.DEFAULT_INCREMENTAL=a.DEFAULT_INCREMENTAL=i.DEFAULT_INCREMENTAL=!v.randomize,s.ANIMATE=a.ANIMATE=i.ANIMATE=v.animate,s.TILE=v.tile,s.TILING_PADDING_VERTICAL=typeof v.tilingPaddingVertical=="function"?v.tilingPaddingVertical.call():v.tilingPaddingVertical,s.TILING_PADDING_HORIZONTAL=typeof v.tilingPaddingHorizontal=="function"?v.tilingPaddingHorizontal.call():v.tilingPaddingHorizontal};p.prototype.run=function(){var y,v,x=this.options,k=this.idToLNode={},_=this.layout=new o,T=this;T.stopped=!1,this.cy=this.options.cy,this.cy.trigger({type:"layoutstart",layout:this});var S=_.newGraphManager();this.gm=S;var R=this.options.eles.nodes(),A=this.options.eles.edges();this.root=S.addRoot(),this.processChildrenList(this.root,this.getTopMostNodes(R),_);for(var I=0;I0){var C;C=x.getGraphManager().add(x.newGraph(),R),this.processChildrenList(C,S,x)}}},p.prototype.stop=function(){return this.stopped=!0,this};var g=function(v){v("layout","cose-bilkent",p)};typeof cytoscape<"u"&&g(cytoscape),e.exports=g})])})});var zIe={};Mr(zIe,{diagram:()=>wCt});function OIe(t,e,r,n,i){return t.insert("polygon",":first-child").attr("points",n.map(function(a){return a.x+","+a.y}).join(" ")).attr("transform","translate("+(i.width-e)/2+", "+r+")")}async function BX(t,e,r,n,i){await pCt(t,e,r,n,i),r.children&&await Promise.all(r.children.map((a,s)=>BX(t,e,a,n<0?s:n,i)))}function PIe(t,e){e.edges().map((r,n)=>{let i=r.data();if(r[0]._private.bodyBounds){let a=r[0]._private.rscratch;he.trace("Edge: ",n,i),t.insert("path").attr("d",`M ${a.startX},${a.startY} L ${a.midX},${a.midY} L${a.endX},${a.endY} `).attr("class","edge section-edge-"+i.section+" edge-depth-"+i.depth)}})}function FX(t,e,r,n){e.add({group:"nodes",data:{id:t.id.toString(),labelText:t.descr,height:t.height,width:t.width,level:n,nodeId:t.id,padding:t.padding,type:t.type},position:{x:t.x,y:t.y}}),t.children&&t.children.forEach(i=>{FX(i,e,r,n+1),e.add({group:"edges",data:{id:`${t.id}_${i.id}`,source:t.id,target:i.id,depth:n,section:i.section}})})}function BIe(t,e){return new Promise(r=>{let n=dt("body").append("div").attr("id","cy").attr("style","display:none"),i=Nu({container:document.getElementById("cy"),style:[{selector:"edge",style:{"curve-style":"bezier"}}]});n.remove(),FX(t,i,e,0),i.nodes().forEach(function(a){a.layoutDimensions=()=>{let s=a.data();return{w:s.width,h:s.height}}}),i.layout({name:"cose-bilkent",quality:"proof",styleEnabled:!1,animate:!1}).run(),i.ready(a=>{he.info("Ready",a),r(i)})})}function FIe(t,e){e.nodes().map((r,n)=>{let i=r.data();i.x=r.position().x,i.y=r.position().y,mCt(t,i);let a=t.getElementById(i.nodeId);he.info("Id:",n,"Position: (",r.position().x,", ",r.position().y,")",i),a.attr("transform",`translate(${r.position().x-i.width/2}, ${r.position().y-i.height/2})`),a.attr("attr",`apa-${n})`)})}var NIe,OX,YSt,Ac,MIe,PX,XSt,jSt,KSt,ZSt,Ka,QSt,JSt,eCt,tCt,rCt,nCt,iCt,aCt,sCt,oCt,lCt,uCt,cCt,hCt,fCt,dCt,pCt,mCt,gCt,yCt,vCt,xCt,bCt,wCt,$Ie=D(()=>{As();Hn();v0();Nr();LX();NIe=Na(IIe(),1);Or();Cl();OX=(function(){var t=b(function(_,T,S,R){for(S=S||{},R=_.length;R--;S[_[R]]=T);return S},"o"),e=[1,4],r=[1,13],n=[1,12],i=[1,15],a=[1,16],s=[1,20],o=[1,19],l=[6,7,8],u=[1,26],h=[1,24],f=[1,25],d=[6,7,11],p=[1,6,13,15,16,19,22],m=[1,33],g=[1,34],y=[1,6,7,11,13,15,16,19,22],v={trace:b(function(){},"trace"),yy:{},symbols_:{error:2,start:3,mindMap:4,spaceLines:5,SPACELINE:6,NL:7,MINDMAP:8,document:9,stop:10,EOF:11,statement:12,SPACELIST:13,node:14,ICON:15,CLASS:16,nodeWithId:17,nodeWithoutId:18,NODE_DSTART:19,NODE_DESCR:20,NODE_DEND:21,NODE_ID:22,$accept:0,$end:1},terminals_:{2:"error",6:"SPACELINE",7:"NL",8:"MINDMAP",11:"EOF",13:"SPACELIST",15:"ICON",16:"CLASS",19:"NODE_DSTART",20:"NODE_DESCR",21:"NODE_DEND",22:"NODE_ID"},productions_:[0,[3,1],[3,2],[5,1],[5,2],[5,2],[4,2],[4,3],[10,1],[10,1],[10,1],[10,2],[10,2],[9,3],[9,2],[12,2],[12,2],[12,2],[12,1],[12,1],[12,1],[12,1],[12,1],[14,1],[14,1],[18,3],[17,1],[17,4]],performAction:b(function(T,S,R,A,I,P,O){var C=P.length-1;switch(I){case 6:case 7:return A;case 8:A.getLogger().trace("Stop NL ");break;case 9:A.getLogger().trace("Stop EOF ");break;case 11:A.getLogger().trace("Stop NL2 ");break;case 12:A.getLogger().trace("Stop EOF2 ");break;case 15:A.getLogger().info("Node: ",P[C].id),A.addNode(P[C-1].length,P[C].id,P[C].descr,P[C].type);break;case 16:A.getLogger().trace("Icon: ",P[C]),A.decorateNode({icon:P[C]});break;case 17:case 21:A.decorateNode({class:P[C]});break;case 18:A.getLogger().trace("SPACELIST");break;case 19:A.getLogger().trace("Node: ",P[C].id),A.addNode(0,P[C].id,P[C].descr,P[C].type);break;case 20:A.decorateNode({icon:P[C]});break;case 25:A.getLogger().trace("node found ..",P[C-2]),this.$={id:P[C-1],descr:P[C-1],type:A.getType(P[C-2],P[C])};break;case 26:this.$={id:P[C],descr:P[C],type:A.nodeType.DEFAULT};break;case 27:A.getLogger().trace("node found ..",P[C-3]),this.$={id:P[C-3],descr:P[C-1],type:A.getType(P[C-2],P[C])};break}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],8:e},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:e},{6:r,7:[1,10],9:9,12:11,13:n,14:14,15:i,16:a,17:17,18:18,19:s,22:o},t(l,[2,3]),{1:[2,2]},t(l,[2,4]),t(l,[2,5]),{1:[2,6],6:r,12:21,13:n,14:14,15:i,16:a,17:17,18:18,19:s,22:o},{6:r,9:22,12:11,13:n,14:14,15:i,16:a,17:17,18:18,19:s,22:o},{6:u,7:h,10:23,11:f},t(d,[2,22],{17:17,18:18,14:27,15:[1,28],16:[1,29],19:s,22:o}),t(d,[2,18]),t(d,[2,19]),t(d,[2,20]),t(d,[2,21]),t(d,[2,23]),t(d,[2,24]),t(d,[2,26],{19:[1,30]}),{20:[1,31]},{6:u,7:h,10:32,11:f},{1:[2,7],6:r,12:21,13:n,14:14,15:i,16:a,17:17,18:18,19:s,22:o},t(p,[2,14],{7:m,11:g}),t(y,[2,8]),t(y,[2,9]),t(y,[2,10]),t(d,[2,15]),t(d,[2,16]),t(d,[2,17]),{20:[1,35]},{21:[1,36]},t(p,[2,13],{7:m,11:g}),t(y,[2,11]),t(y,[2,12]),{21:[1,37]},t(d,[2,25]),t(d,[2,27])],defaultActions:{2:[2,1],6:[2,2]},parseError:b(function(T,S){if(S.recoverable)this.trace(T);else{var R=new Error(T);throw R.hash=S,R}},"parseError"),parse:b(function(T){var S=this,R=[0],A=[],I=[null],P=[],O=this.table,C="",N=0,B=0,F=0,M=2,$=1,z=P.slice.call(arguments,1),q=Object.create(this.lexer),V={yy:{}};for(var U in this.yy)Object.prototype.hasOwnProperty.call(this.yy,U)&&(V.yy[U]=this.yy[U]);q.setInput(T,V.yy),V.yy.lexer=q,V.yy.parser=this,typeof q.yylloc>"u"&&(q.yylloc={});var J=q.yylloc;P.push(J);var se=q.options&&q.options.ranges;typeof V.yy.parseError=="function"?this.parseError=V.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function re(ce){R.length=R.length-2*ce,I.length=I.length-ce,P.length=P.length-ce}b(re,"popStack");function me(){var ce;return ce=A.pop()||q.lex()||$,typeof ce!="number"&&(ce instanceof Array&&(A=ce,ce=A.pop()),ce=S.symbols_[ce]||ce),ce}b(me,"lex");for(var ge,ye,_e,ue,ie,le,oe={},ne,pe,te,He;;){if(_e=R[R.length-1],this.defaultActions[_e]?ue=this.defaultActions[_e]:((ge===null||typeof ge>"u")&&(ge=me()),ue=O[_e]&&O[_e][ge]),typeof ue>"u"||!ue.length||!ue[0]){var de="";He=[];for(ne in O[_e])this.terminals_[ne]&&ne>M&&He.push("'"+this.terminals_[ne]+"'");q.showPosition?de="Parse error on line "+(N+1)+`: +`+q.showPosition()+` +Expecting `+He.join(", ")+", got '"+(this.terminals_[ge]||ge)+"'":de="Parse error on line "+(N+1)+": Unexpected "+(ge==$?"end of input":"'"+(this.terminals_[ge]||ge)+"'"),this.parseError(de,{text:q.match,token:this.terminals_[ge]||ge,line:q.yylineno,loc:J,expected:He})}if(ue[0]instanceof Array&&ue.length>1)throw new Error("Parse Error: multiple actions possible at state: "+_e+", token: "+ge);switch(ue[0]){case 1:R.push(ge),I.push(q.yytext),P.push(q.yylloc),R.push(ue[1]),ge=null,ye?(ge=ye,ye=null):(B=q.yyleng,C=q.yytext,N=q.yylineno,J=q.yylloc,F>0&&F--);break;case 2:if(pe=this.productions_[ue[1]][1],oe.$=I[I.length-pe],oe._$={first_line:P[P.length-(pe||1)].first_line,last_line:P[P.length-1].last_line,first_column:P[P.length-(pe||1)].first_column,last_column:P[P.length-1].last_column},se&&(oe._$.range=[P[P.length-(pe||1)].range[0],P[P.length-1].range[1]]),le=this.performAction.apply(oe,[C,B,N,V.yy,ue[1],I,P].concat(z)),typeof le<"u")return le;pe&&(R=R.slice(0,-1*pe*2),I=I.slice(0,-1*pe),P=P.slice(0,-1*pe)),R.push(this.productions_[ue[1]][0]),I.push(oe.$),P.push(oe._$),te=O[R[R.length-2]][R[R.length-1]],R.push(te);break;case 3:return!0}}return!0},"parse")},x=(function(){var _={EOF:1,parseError:b(function(S,R){if(this.yy.parser)this.yy.parser.parseError(S,R);else throw new Error(S)},"parseError"),setInput:b(function(T,S){return this.yy=S||this.yy||{},this._input=T,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:b(function(){var T=this._input[0];this.yytext+=T,this.yyleng++,this.offset++,this.match+=T,this.matched+=T;var S=T.match(/(?:\r\n?|\n).*/g);return S?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),T},"input"),unput:b(function(T){var S=T.length,R=T.split(/(?:\r\n?|\n)/g);this._input=T+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-S),this.offset-=S;var A=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),R.length-1&&(this.yylineno-=R.length-1);var I=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:R?(R.length===A.length?this.yylloc.first_column:0)+A[A.length-R.length].length-R[0].length:this.yylloc.first_column-S},this.options.ranges&&(this.yylloc.range=[I[0],I[0]+this.yyleng-S]),this.yyleng=this.yytext.length,this},"unput"),more:b(function(){return this._more=!0,this},"more"),reject:b(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). +`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:b(function(T){this.unput(this.match.slice(T))},"less"),pastInput:b(function(){var T=this.matched.substr(0,this.matched.length-this.match.length);return(T.length>20?"...":"")+T.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:b(function(){var T=this.match;return T.length<20&&(T+=this._input.substr(0,20-T.length)),(T.substr(0,20)+(T.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:b(function(){var T=this.pastInput(),S=new Array(T.length+1).join("-");return T+this.upcomingInput()+` +`+S+"^"},"showPosition"),test_match:b(function(T,S){var R,A,I;if(this.options.backtrack_lexer&&(I={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(I.yylloc.range=this.yylloc.range.slice(0))),A=T[0].match(/(?:\r\n?|\n).*/g),A&&(this.yylineno+=A.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:A?A[A.length-1].length-A[A.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+T[0].length},this.yytext+=T[0],this.match+=T[0],this.matches=T,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(T[0].length),this.matched+=T[0],R=this.performAction.call(this,this.yy,this,S,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),R)return R;if(this._backtrack){for(var P in I)this[P]=I[P];return!1}return!1},"test_match"),next:b(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var T,S,R,A;this._more||(this.yytext="",this.match="");for(var I=this._currentRules(),P=0;PS[0].length)){if(S=R,A=P,this.options.backtrack_lexer){if(T=this.test_match(R,I[P]),T!==!1)return T;if(this._backtrack){S=!1;continue}else return!1}else if(!this.options.flex)break}return S?(T=this.test_match(S,I[A]),T!==!1?T:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. +`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:b(function(){var S=this.next();return S||this.lex()},"lex"),begin:b(function(S){this.conditionStack.push(S)},"begin"),popState:b(function(){var S=this.conditionStack.length-1;return S>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:b(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:b(function(S){return S=this.conditionStack.length-1-Math.abs(S||0),S>=0?this.conditionStack[S]:"INITIAL"},"topState"),pushState:b(function(S){this.begin(S)},"pushState"),stateStackSize:b(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:b(function(S,R,A,I){var P=I;switch(A){case 0:return S.getLogger().trace("Found comment",R.yytext),6;break;case 1:return 8;case 2:this.begin("CLASS");break;case 3:return this.popState(),16;break;case 4:this.popState();break;case 5:S.getLogger().trace("Begin icon"),this.begin("ICON");break;case 6:return S.getLogger().trace("SPACELINE"),6;break;case 7:return 7;case 8:return 15;case 9:S.getLogger().trace("end icon"),this.popState();break;case 10:return S.getLogger().trace("Exploding node"),this.begin("NODE"),19;break;case 11:return S.getLogger().trace("Cloud"),this.begin("NODE"),19;break;case 12:return S.getLogger().trace("Explosion Bang"),this.begin("NODE"),19;break;case 13:return S.getLogger().trace("Cloud Bang"),this.begin("NODE"),19;break;case 14:return this.begin("NODE"),19;break;case 15:return this.begin("NODE"),19;break;case 16:return this.begin("NODE"),19;break;case 17:return this.begin("NODE"),19;break;case 18:return 13;case 19:return 22;case 20:return 11;case 21:this.begin("NSTR2");break;case 22:return"NODE_DESCR";case 23:this.popState();break;case 24:S.getLogger().trace("Starting NSTR"),this.begin("NSTR");break;case 25:return S.getLogger().trace("description:",R.yytext),"NODE_DESCR";break;case 26:this.popState();break;case 27:return this.popState(),S.getLogger().trace("node end ))"),"NODE_DEND";break;case 28:return this.popState(),S.getLogger().trace("node end )"),"NODE_DEND";break;case 29:return this.popState(),S.getLogger().trace("node end ...",R.yytext),"NODE_DEND";break;case 30:return this.popState(),S.getLogger().trace("node end (("),"NODE_DEND";break;case 31:return this.popState(),S.getLogger().trace("node end (-"),"NODE_DEND";break;case 32:return this.popState(),S.getLogger().trace("node end (-"),"NODE_DEND";break;case 33:return this.popState(),S.getLogger().trace("node end (("),"NODE_DEND";break;case 34:return this.popState(),S.getLogger().trace("node end (("),"NODE_DEND";break;case 35:return S.getLogger().trace("Long description:",R.yytext),20;break;case 36:return S.getLogger().trace("Long description:",R.yytext),20;break}},"anonymous"),rules:[/^(?:\s*%%.*)/i,/^(?:mindmap\b)/i,/^(?::::)/i,/^(?:.+)/i,/^(?:\n)/i,/^(?:::icon\()/i,/^(?:[\s]+[\n])/i,/^(?:[\n]+)/i,/^(?:[^\)]+)/i,/^(?:\))/i,/^(?:-\))/i,/^(?:\(-)/i,/^(?:\)\))/i,/^(?:\))/i,/^(?:\(\()/i,/^(?:\{\{)/i,/^(?:\()/i,/^(?:\[)/i,/^(?:[\s]+)/i,/^(?:[^\(\[\n\)\{\}]+)/i,/^(?:$)/i,/^(?:["][`])/i,/^(?:[^`"]+)/i,/^(?:[`]["])/i,/^(?:["])/i,/^(?:[^"]+)/i,/^(?:["])/i,/^(?:[\)]\))/i,/^(?:[\)])/i,/^(?:[\]])/i,/^(?:\}\})/i,/^(?:\(-)/i,/^(?:-\))/i,/^(?:\(\()/i,/^(?:\()/i,/^(?:[^\)\]\(\}]+)/i,/^(?:.+(?!\(\())/i],conditions:{CLASS:{rules:[3,4],inclusive:!1},ICON:{rules:[8,9],inclusive:!1},NSTR2:{rules:[22,23],inclusive:!1},NSTR:{rules:[25,26],inclusive:!1},NODE:{rules:[21,24,27,28,29,30,31,32,33,34,35,36],inclusive:!1},INITIAL:{rules:[0,1,2,5,6,7,10,11,12,13,14,15,16,17,18,19,20],inclusive:!0}}};return _})();v.lexer=x;function k(){this.yy={}}return b(k,"Parser"),k.prototype=v,v.Parser=k,new k})();OX.parser=OX;YSt=OX,Ac=[],MIe=0,PX={},XSt=b(()=>{Ac=[],MIe=0,PX={}},"clear"),jSt=b(function(t){for(let e=Ac.length-1;e>=0;e--)if(Ac[e].levelAc.length>0?Ac[0]:null,"getMindmap"),ZSt=b((t,e,r,n)=>{he.info("addNode",t,e,r,n);let i=Fe(),a=i.mindmap?.padding??Ir.mindmap.padding;switch(n){case Ka.ROUNDED_RECT:case Ka.RECT:case Ka.HEXAGON:a*=2}let s={id:MIe++,nodeId:Qr(e,i),level:t,descr:Qr(r,i),type:n,children:[],width:i.mindmap?.maxNodeWidth??Ir.mindmap.maxNodeWidth,padding:a},o=jSt(t);if(o)o.children.push(s),Ac.push(s);else if(Ac.length===0)Ac.push(s);else throw new Error('There can be only one root. No parent could be found for ("'+s.descr+'")')},"addNode"),Ka={DEFAULT:0,NO_BORDER:0,ROUNDED_RECT:1,RECT:2,CIRCLE:3,CLOUD:4,BANG:5,HEXAGON:6},QSt=b((t,e)=>{switch(he.debug("In get type",t,e),t){case"[":return Ka.RECT;case"(":return e===")"?Ka.ROUNDED_RECT:Ka.CLOUD;case"((":return Ka.CIRCLE;case")":return Ka.CLOUD;case"))":return Ka.BANG;case"{{":return Ka.HEXAGON;default:return Ka.DEFAULT}},"getType"),JSt=b((t,e)=>{PX[t]=e},"setElementForId"),eCt=b(t=>{if(!t)return;let e=Fe(),r=Ac[Ac.length-1];t.icon&&(r.icon=Qr(t.icon,e)),t.class&&(r.class=Qr(t.class,e))},"decorateNode"),tCt=b(t=>{switch(t){case Ka.DEFAULT:return"no-border";case Ka.RECT:return"rect";case Ka.ROUNDED_RECT:return"rounded-rect";case Ka.CIRCLE:return"circle";case Ka.CLOUD:return"cloud";case Ka.BANG:return"bang";case Ka.HEXAGON:return"hexgon";default:return"no-border"}},"type2Str"),rCt=b(()=>he,"getLogger"),nCt=b(t=>PX[t],"getElementById"),iCt={clear:XSt,addNode:ZSt,getMindmap:KSt,nodeType:Ka,getType:QSt,setElementForId:JSt,decorateNode:eCt,type2Str:tCt,getLogger:rCt,getElementById:nCt},aCt=iCt,sCt=12,oCt=b(function(t,e,r,n){e.append("path").attr("id","node-"+r.id).attr("class","node-bkg node-"+t.type2Str(r.type)).attr("d",`M0 ${r.height-5} v${-r.height+10} q0,-5 5,-5 h${r.width-10} q5,0 5,5 v${r.height-5} H0 Z`),e.append("line").attr("class","node-line-"+n).attr("x1",0).attr("y1",r.height).attr("x2",r.width).attr("y2",r.height)},"defaultBkg"),lCt=b(function(t,e,r){e.append("rect").attr("id","node-"+r.id).attr("class","node-bkg node-"+t.type2Str(r.type)).attr("height",r.height).attr("width",r.width)},"rectBkg"),uCt=b(function(t,e,r){let n=r.width,i=r.height,a=.15*n,s=.25*n,o=.35*n,l=.2*n;e.append("path").attr("id","node-"+r.id).attr("class","node-bkg node-"+t.type2Str(r.type)).attr("d",`M0 0 a${a},${a} 0 0,1 ${n*.25},${-1*n*.1} a${o},${o} 1 0,1 ${n*.4},${-1*n*.1} a${s},${s} 1 0,1 ${n*.35},${1*n*.2} - a${i},${i} 1 0,1 ${n*.15},${1*a*.35} - a${l},${l} 1 0,1 ${-1*n*.15},${1*a*.65} + a${a},${a} 1 0,1 ${n*.15},${1*i*.35} + a${l},${l} 1 0,1 ${-1*n*.15},${1*i*.65} - a${s},${i} 1 0,1 ${-1*n*.25},${n*.15} + a${s},${a} 1 0,1 ${-1*n*.25},${n*.15} a${o},${o} 1 0,1 ${-1*n*.5},0 - a${i},${i} 1 0,1 ${-1*n*.25},${-1*n*.15} + a${a},${a} 1 0,1 ${-1*n*.25},${-1*n*.15} - a${i},${i} 1 0,1 ${-1*n*.1},${-1*a*.35} - a${l},${l} 1 0,1 ${n*.1},${-1*a*.65} + a${a},${a} 1 0,1 ${-1*n*.1},${-1*i*.35} + a${l},${l} 1 0,1 ${n*.1},${-1*i*.65} - H0 V0 Z`)},"cloudBkg"),NEt=x(function(t,e,r){let n=r.width,a=r.height,i=.15*n;e.append("path").attr("id","node-"+r.id).attr("class","node-bkg node-"+t.type2Str(r.type)).attr("d",`M0 0 a${i},${i} 1 0,0 ${n*.25},${-1*a*.1} - a${i},${i} 1 0,0 ${n*.25},0 - a${i},${i} 1 0,0 ${n*.25},0 - a${i},${i} 1 0,0 ${n*.25},${1*a*.1} + H0 V0 Z`)},"cloudBkg"),cCt=b(function(t,e,r){let n=r.width,i=r.height,a=.15*n;e.append("path").attr("id","node-"+r.id).attr("class","node-bkg node-"+t.type2Str(r.type)).attr("d",`M0 0 a${a},${a} 1 0,0 ${n*.25},${-1*i*.1} + a${a},${a} 1 0,0 ${n*.25},0 + a${a},${a} 1 0,0 ${n*.25},0 + a${a},${a} 1 0,0 ${n*.25},${1*i*.1} - a${i},${i} 1 0,0 ${n*.15},${1*a*.33} - a${i*.8},${i*.8} 1 0,0 0,${1*a*.34} - a${i},${i} 1 0,0 ${-1*n*.15},${1*a*.33} + a${a},${a} 1 0,0 ${n*.15},${1*i*.33} + a${a*.8},${a*.8} 1 0,0 0,${1*i*.34} + a${a},${a} 1 0,0 ${-1*n*.15},${1*i*.33} - a${i},${i} 1 0,0 ${-1*n*.25},${a*.15} - a${i},${i} 1 0,0 ${-1*n*.25},0 - a${i},${i} 1 0,0 ${-1*n*.25},0 - a${i},${i} 1 0,0 ${-1*n*.25},${-1*a*.15} + a${a},${a} 1 0,0 ${-1*n*.25},${i*.15} + a${a},${a} 1 0,0 ${-1*n*.25},0 + a${a},${a} 1 0,0 ${-1*n*.25},0 + a${a},${a} 1 0,0 ${-1*n*.25},${-1*i*.15} - a${i},${i} 1 0,0 ${-1*n*.1},${-1*a*.33} - a${i*.8},${i*.8} 1 0,0 0,${-1*a*.34} - a${i},${i} 1 0,0 ${n*.1},${-1*a*.33} + a${a},${a} 1 0,0 ${-1*n*.1},${-1*i*.33} + a${a*.8},${a*.8} 1 0,0 0,${-1*i*.34} + a${a},${a} 1 0,0 ${n*.1},${-1*i*.33} - H0 V0 Z`)},"bangBkg"),MEt=x(function(t,e,r){e.append("circle").attr("id","node-"+r.id).attr("class","node-bkg node-"+t.type2Str(r.type)).attr("r",r.width/2)},"circleBkg");x(uLe,"insertPolygonShape");OEt=x(function(t,e,r){let n=r.height,i=n/4,s=r.width-r.padding+2*i,o=[{x:i,y:0},{x:s-i,y:0},{x:s,y:-n/2},{x:s-i,y:-n},{x:i,y:-n},{x:0,y:-n/2}];uLe(e,s,n,o,r)},"hexagonBkg"),PEt=x(function(t,e,r){e.append("rect").attr("id","node-"+r.id).attr("class","node-bkg node-"+t.type2Str(r.type)).attr("height",r.height).attr("rx",r.padding).attr("ry",r.padding).attr("width",r.width)},"roundedRectBkg"),BEt=x(async function(t,e,r,n,a){let i=a.htmlLabels,s=n%(LEt-1),o=e.append("g");r.section=s;let l="section-"+s;s<0&&(l+=" section-root"),o.attr("class",(r.class?r.class+" ":"")+"mindmap-node "+l);let u=o.append("g"),h=o.append("g"),f=r.descr.replace(/()/g,` -`);await Xa(h,f,{useHtmlLabels:i,width:r.width,classes:"mindmap-node-label"},a),i||h.attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle");let d=h.node().getBBox(),[p]=fl(a.fontSize);if(r.height=d.height+p*1.1*.5+r.padding,r.width=d.width+2*r.padding,r.icon)if(r.type===t.nodeType.CIRCLE)r.height+=50,r.width+=50,o.append("foreignObject").attr("height","50px").attr("width",r.width).attr("style","text-align: center;").append("div").attr("class","icon-container").append("i").attr("class","node-icon-"+s+" "+r.icon),h.attr("transform","translate("+r.width/2+", "+(r.height/2-1.5*r.padding)+")");else{r.width+=50;let m=r.height;r.height=Math.max(m,60);let g=Math.abs(r.height-m);o.append("foreignObject").attr("width","60px").attr("height",r.height).attr("style","text-align: center;margin-top:"+g/2+"px;").append("div").attr("class","icon-container").append("i").attr("class","node-icon-"+s+" "+r.icon),h.attr("transform","translate("+(25+r.width/2)+", "+(g/2+r.padding/2)+")")}else if(i){let m=(r.width-d.width)/2,g=(r.height-d.height)/2;h.attr("transform","translate("+m+", "+g+")")}else{let m=r.width/2,g=r.padding/2;h.attr("transform","translate("+m+", "+g+")")}switch(r.type){case t.nodeType.DEFAULT:REt(t,u,r,s);break;case t.nodeType.ROUNDED_RECT:PEt(t,u,r,s);break;case t.nodeType.RECT:IEt(t,u,r,s);break;case t.nodeType.CIRCLE:u.attr("transform","translate("+r.width/2+", "+ +r.height/2+")"),MEt(t,u,r,s);break;case t.nodeType.CLOUD:DEt(t,u,r,s);break;case t.nodeType.BANG:NEt(t,u,r,s);break;case t.nodeType.HEXAGON:OEt(t,u,r,s);break}return t.setElementForId(r.id,o),r.height},"drawNode"),FEt=x(function(t,e){let r=t.getElementById(e.id),n=e.x||0,a=e.y||0;r.attr("transform","translate("+n+","+a+")")},"positionNode");Pl.use(lLe.default);x(CW,"drawNodes");x(cLe,"drawEdges");x(SW,"addNodes");x(hLe,"layoutMindmap");x(fLe,"positionNodes");zEt=x(async(t,e,r,n)=>{te.debug(`Rendering mindmap diagram -`+t);let a=n.db,i=a.getMindmap();if(!i)return;let s=Te();s.htmlLabels=!1;let o=yi(e),l=o.append("g");l.attr("class","mindmap-edges");let u=o.append("g");u.attr("class","mindmap-nodes"),await CW(a,u,i,-1,s);let h=await hLe(i,s);cLe(l,h),fLe(a,h),Vl(void 0,o,s.mindmap?.padding??or.mindmap.padding,s.mindmap?.useMaxWidth??or.mindmap.useMaxWidth)},"draw"),$Et={draw:zEt},GEt=x(t=>{let e="";for(let r=0;r)/g,` +`);await qa(h,f,{useHtmlLabels:a,width:r.width,classes:"mindmap-node-label"},i),a||h.attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle");let d=h.node().getBBox(),[p]=cu(i.fontSize);if(r.height=d.height+p*1.1*.5+r.padding,r.width=d.width+2*r.padding,r.icon)if(r.type===t.nodeType.CIRCLE)r.height+=50,r.width+=50,o.append("foreignObject").attr("height","50px").attr("width",r.width).attr("style","text-align: center;").append("div").attr("class","icon-container").append("i").attr("class","node-icon-"+s+" "+r.icon),h.attr("transform","translate("+r.width/2+", "+(r.height/2-1.5*r.padding)+")");else{r.width+=50;let m=r.height;r.height=Math.max(m,60);let g=Math.abs(r.height-m);o.append("foreignObject").attr("width","60px").attr("height",r.height).attr("style","text-align: center;margin-top:"+g/2+"px;").append("div").attr("class","icon-container").append("i").attr("class","node-icon-"+s+" "+r.icon),h.attr("transform","translate("+(25+r.width/2)+", "+(g/2+r.padding/2)+")")}else if(a){let m=(r.width-d.width)/2,g=(r.height-d.height)/2;h.attr("transform","translate("+m+", "+g+")")}else{let m=r.width/2,g=r.padding/2;h.attr("transform","translate("+m+", "+g+")")}switch(r.type){case t.nodeType.DEFAULT:oCt(t,u,r,s);break;case t.nodeType.ROUNDED_RECT:dCt(t,u,r,s);break;case t.nodeType.RECT:lCt(t,u,r,s);break;case t.nodeType.CIRCLE:u.attr("transform","translate("+r.width/2+", "+ +r.height/2+")"),hCt(t,u,r,s);break;case t.nodeType.CLOUD:uCt(t,u,r,s);break;case t.nodeType.BANG:cCt(t,u,r,s);break;case t.nodeType.HEXAGON:fCt(t,u,r,s);break}return t.setElementForId(r.id,o),r.height},"drawNode"),mCt=b(function(t,e){let r=t.getElementById(e.id),n=e.x||0,i=e.y||0;r.attr("transform","translate("+n+","+i+")")},"positionNode");Nu.use(NIe.default);b(BX,"drawNodes");b(PIe,"drawEdges");b(FX,"addNodes");b(BIe,"layoutMindmap");b(FIe,"positionNodes");gCt=b(async(t,e,r,n)=>{he.debug(`Rendering mindmap diagram +`+t);let i=n.db,a=i.getMindmap();if(!a)return;let s=Fe();s.htmlLabels=!1;let o=cs(e),l=o.append("g");l.attr("class","mindmap-edges");let u=o.append("g");u.attr("class","mindmap-nodes"),await BX(i,u,a,-1,s);let h=await BIe(a,s);PIe(l,h),FIe(i,h),Uu(void 0,o,s.mindmap?.padding??Ir.mindmap.padding,s.mindmap?.useMaxWidth??Ir.mindmap.useMaxWidth)},"draw"),yCt={draw:gCt},vCt=b(t=>{let e="";for(let r=0;r` + `}return e},"genSections"),xCt=b(t=>` .edge { stroke-width: 3; } - ${GEt(t)} + ${vCt(t)} .section-root rect, .section-root path, .section-root circle, .section-root polygon { fill: ${t.git0}; } @@ -2351,17 +2607,17 @@ Expecting `+Se.join(", ")+", got '"+(this.terminals_[se]||se)+"'":ne="Parse erro dominant-baseline: middle; text-align: center; } -`,"getStyles"),qEt=UEt,VEt={db:AEt,renderer:$Et,parser:gEt,styles:qEt}});var gLe={};lr(gLe,{diagram:()=>uCt});var _W,HEt,Bl,LW,AW,RW,WEt,YEt,mLe,XEt,jEt,ni,KEt,ZEt,QEt,JEt,eCt,tCt,rCt,nCt,aCt,iCt,sCt,oCt,lCt,uCt,vLe=A(()=>{YT();Fo();eo();Mo();Fi();ln();mc();ur();Lo();_W=(function(){var t=x(function(_,S,L,M){for(L=L||{},M=_.length;M--;L[_[M]]=S);return L},"o"),e=[1,4],r=[1,13],n=[1,12],a=[1,15],i=[1,16],s=[1,20],o=[1,19],l=[6,7,8],u=[1,26],h=[1,24],f=[1,25],d=[6,7,11],p=[1,31],m=[6,7,11,24],g=[1,6,13,16,17,20,23],v=[1,35],y=[1,36],b=[1,6,7,11,13,16,17,20,23],w=[1,38],C={trace:x(function(){},"trace"),yy:{},symbols_:{error:2,start:3,mindMap:4,spaceLines:5,SPACELINE:6,NL:7,KANBAN:8,document:9,stop:10,EOF:11,statement:12,SPACELIST:13,node:14,shapeData:15,ICON:16,CLASS:17,nodeWithId:18,nodeWithoutId:19,NODE_DSTART:20,NODE_DESCR:21,NODE_DEND:22,NODE_ID:23,SHAPE_DATA:24,$accept:0,$end:1},terminals_:{2:"error",6:"SPACELINE",7:"NL",8:"KANBAN",11:"EOF",13:"SPACELIST",16:"ICON",17:"CLASS",20:"NODE_DSTART",21:"NODE_DESCR",22:"NODE_DEND",23:"NODE_ID",24:"SHAPE_DATA"},productions_:[0,[3,1],[3,2],[5,1],[5,2],[5,2],[4,2],[4,3],[10,1],[10,1],[10,1],[10,2],[10,2],[9,3],[9,2],[12,3],[12,2],[12,2],[12,2],[12,1],[12,2],[12,1],[12,1],[12,1],[12,1],[14,1],[14,1],[19,3],[18,1],[18,4],[15,2],[15,1]],performAction:x(function(S,L,M,D,T,I,N){var O=I.length-1;switch(T){case 6:case 7:return D;case 8:D.getLogger().trace("Stop NL ");break;case 9:D.getLogger().trace("Stop EOF ");break;case 11:D.getLogger().trace("Stop NL2 ");break;case 12:D.getLogger().trace("Stop EOF2 ");break;case 15:D.getLogger().info("Node: ",I[O-1].id),D.addNode(I[O-2].length,I[O-1].id,I[O-1].descr,I[O-1].type,I[O]);break;case 16:D.getLogger().info("Node: ",I[O].id),D.addNode(I[O-1].length,I[O].id,I[O].descr,I[O].type);break;case 17:D.getLogger().trace("Icon: ",I[O]),D.decorateNode({icon:I[O]});break;case 18:case 23:D.decorateNode({class:I[O]});break;case 19:D.getLogger().trace("SPACELIST");break;case 20:D.getLogger().trace("Node: ",I[O-1].id),D.addNode(0,I[O-1].id,I[O-1].descr,I[O-1].type,I[O]);break;case 21:D.getLogger().trace("Node: ",I[O].id),D.addNode(0,I[O].id,I[O].descr,I[O].type);break;case 22:D.decorateNode({icon:I[O]});break;case 27:D.getLogger().trace("node found ..",I[O-2]),this.$={id:I[O-1],descr:I[O-1],type:D.getType(I[O-2],I[O])};break;case 28:this.$={id:I[O],descr:I[O],type:0};break;case 29:D.getLogger().trace("node found ..",I[O-3]),this.$={id:I[O-3],descr:I[O-1],type:D.getType(I[O-2],I[O])};break;case 30:this.$=I[O-1]+I[O];break;case 31:this.$=I[O];break}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],8:e},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:e},{6:r,7:[1,10],9:9,12:11,13:n,14:14,16:a,17:i,18:17,19:18,20:s,23:o},t(l,[2,3]),{1:[2,2]},t(l,[2,4]),t(l,[2,5]),{1:[2,6],6:r,12:21,13:n,14:14,16:a,17:i,18:17,19:18,20:s,23:o},{6:r,9:22,12:11,13:n,14:14,16:a,17:i,18:17,19:18,20:s,23:o},{6:u,7:h,10:23,11:f},t(d,[2,24],{18:17,19:18,14:27,16:[1,28],17:[1,29],20:s,23:o}),t(d,[2,19]),t(d,[2,21],{15:30,24:p}),t(d,[2,22]),t(d,[2,23]),t(m,[2,25]),t(m,[2,26]),t(m,[2,28],{20:[1,32]}),{21:[1,33]},{6:u,7:h,10:34,11:f},{1:[2,7],6:r,12:21,13:n,14:14,16:a,17:i,18:17,19:18,20:s,23:o},t(g,[2,14],{7:v,11:y}),t(b,[2,8]),t(b,[2,9]),t(b,[2,10]),t(d,[2,16],{15:37,24:p}),t(d,[2,17]),t(d,[2,18]),t(d,[2,20],{24:w}),t(m,[2,31]),{21:[1,39]},{22:[1,40]},t(g,[2,13],{7:v,11:y}),t(b,[2,11]),t(b,[2,12]),t(d,[2,15],{24:w}),t(m,[2,30]),{22:[1,41]},t(m,[2,27]),t(m,[2,29])],defaultActions:{2:[2,1],6:[2,2]},parseError:x(function(S,L){if(L.recoverable)this.trace(S);else{var M=new Error(S);throw M.hash=L,M}},"parseError"),parse:x(function(S){var L=this,M=[0],D=[],T=[null],I=[],N=this.table,O="",R=0,P=0,B=0,F=2,G=1,z=I.slice.call(arguments,1),H=Object.create(this.lexer),Q={yy:{}};for(var Y in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Y)&&(Q.yy[Y]=this.yy[Y]);H.setInput(S,Q.yy),Q.yy.lexer=H,Q.yy.parser=this,typeof H.yylloc>"u"&&(H.yylloc={});var ie=H.yylloc;I.push(ie);var se=H.options&&H.options.ranges;typeof Q.yy.parseError=="function"?this.parseError=Q.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function oe(Ie){M.length=M.length-2*Ie,T.length=T.length-Ie,I.length=I.length-Ie}x(oe,"popStack");function pe(){var Ie;return Ie=D.pop()||H.lex()||G,typeof Ie!="number"&&(Ie instanceof Array&&(D=Ie,Ie=D.pop()),Ie=L.symbols_[Ie]||Ie),Ie}x(pe,"lex");for(var J,j,Z,K,X,ae,W={},Se,ne,ee,$e;;){if(Z=M[M.length-1],this.defaultActions[Z]?K=this.defaultActions[Z]:((J===null||typeof J>"u")&&(J=pe()),K=N[Z]&&N[Z][J]),typeof K>"u"||!K.length||!K[0]){var me="";$e=[];for(Se in N[Z])this.terminals_[Se]&&Se>F&&$e.push("'"+this.terminals_[Se]+"'");H.showPosition?me="Parse error on line "+(R+1)+`: -`+H.showPosition()+` -Expecting `+$e.join(", ")+", got '"+(this.terminals_[J]||J)+"'":me="Parse error on line "+(R+1)+": Unexpected "+(J==G?"end of input":"'"+(this.terminals_[J]||J)+"'"),this.parseError(me,{text:H.match,token:this.terminals_[J]||J,line:H.yylineno,loc:ie,expected:$e})}if(K[0]instanceof Array&&K.length>1)throw new Error("Parse Error: multiple actions possible at state: "+Z+", token: "+J);switch(K[0]){case 1:M.push(J),T.push(H.yytext),I.push(H.yylloc),M.push(K[1]),J=null,j?(J=j,j=null):(P=H.yyleng,O=H.yytext,R=H.yylineno,ie=H.yylloc,B>0&&B--);break;case 2:if(ne=this.productions_[K[1]][1],W.$=T[T.length-ne],W._$={first_line:I[I.length-(ne||1)].first_line,last_line:I[I.length-1].last_line,first_column:I[I.length-(ne||1)].first_column,last_column:I[I.length-1].last_column},se&&(W._$.range=[I[I.length-(ne||1)].range[0],I[I.length-1].range[1]]),ae=this.performAction.apply(W,[O,P,R,Q.yy,K[1],T,I].concat(z)),typeof ae<"u")return ae;ne&&(M=M.slice(0,-1*ne*2),T=T.slice(0,-1*ne),I=I.slice(0,-1*ne)),M.push(this.productions_[K[1]][0]),T.push(W.$),I.push(W._$),ee=N[M[M.length-2]][M[M.length-1]],M.push(ee);break;case 3:return!0}}return!0},"parse")},k=(function(){var _={EOF:1,parseError:x(function(L,M){if(this.yy.parser)this.yy.parser.parseError(L,M);else throw new Error(L)},"parseError"),setInput:x(function(S,L){return this.yy=L||this.yy||{},this._input=S,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:x(function(){var S=this._input[0];this.yytext+=S,this.yyleng++,this.offset++,this.match+=S,this.matched+=S;var L=S.match(/(?:\r\n?|\n).*/g);return L?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),S},"input"),unput:x(function(S){var L=S.length,M=S.split(/(?:\r\n?|\n)/g);this._input=S+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-L),this.offset-=L;var D=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),M.length-1&&(this.yylineno-=M.length-1);var T=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:M?(M.length===D.length?this.yylloc.first_column:0)+D[D.length-M.length].length-M[0].length:this.yylloc.first_column-L},this.options.ranges&&(this.yylloc.range=[T[0],T[0]+this.yyleng-L]),this.yyleng=this.yytext.length,this},"unput"),more:x(function(){return this._more=!0,this},"more"),reject:x(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). -`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:x(function(S){this.unput(this.match.slice(S))},"less"),pastInput:x(function(){var S=this.matched.substr(0,this.matched.length-this.match.length);return(S.length>20?"...":"")+S.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:x(function(){var S=this.match;return S.length<20&&(S+=this._input.substr(0,20-S.length)),(S.substr(0,20)+(S.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:x(function(){var S=this.pastInput(),L=new Array(S.length+1).join("-");return S+this.upcomingInput()+` -`+L+"^"},"showPosition"),test_match:x(function(S,L){var M,D,T;if(this.options.backtrack_lexer&&(T={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(T.yylloc.range=this.yylloc.range.slice(0))),D=S[0].match(/(?:\r\n?|\n).*/g),D&&(this.yylineno+=D.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:D?D[D.length-1].length-D[D.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+S[0].length},this.yytext+=S[0],this.match+=S[0],this.matches=S,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(S[0].length),this.matched+=S[0],M=this.performAction.call(this,this.yy,this,L,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),M)return M;if(this._backtrack){for(var I in T)this[I]=T[I];return!1}return!1},"test_match"),next:x(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var S,L,M,D;this._more||(this.yytext="",this.match="");for(var T=this._currentRules(),I=0;IL[0].length)){if(L=M,D=I,this.options.backtrack_lexer){if(S=this.test_match(M,T[I]),S!==!1)return S;if(this._backtrack){L=!1;continue}else return!1}else if(!this.options.flex)break}return L?(S=this.test_match(L,T[D]),S!==!1?S:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. -`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:x(function(){var L=this.next();return L||this.lex()},"lex"),begin:x(function(L){this.conditionStack.push(L)},"begin"),popState:x(function(){var L=this.conditionStack.length-1;return L>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:x(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:x(function(L){return L=this.conditionStack.length-1-Math.abs(L||0),L>=0?this.conditionStack[L]:"INITIAL"},"topState"),pushState:x(function(L){this.begin(L)},"pushState"),stateStackSize:x(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:x(function(L,M,D,T){var I=T;switch(D){case 0:return this.pushState("shapeData"),M.yytext="",24;break;case 1:return this.pushState("shapeDataStr"),24;break;case 2:return this.popState(),24;break;case 3:let N=/\n\s*/g;return M.yytext=M.yytext.replace(N,"
    "),24;break;case 4:return 24;case 5:this.popState();break;case 6:return L.getLogger().trace("Found comment",M.yytext),6;break;case 7:return 8;case 8:this.begin("CLASS");break;case 9:return this.popState(),17;break;case 10:this.popState();break;case 11:L.getLogger().trace("Begin icon"),this.begin("ICON");break;case 12:return L.getLogger().trace("SPACELINE"),6;break;case 13:return 7;case 14:return 16;case 15:L.getLogger().trace("end icon"),this.popState();break;case 16:return L.getLogger().trace("Exploding node"),this.begin("NODE"),20;break;case 17:return L.getLogger().trace("Cloud"),this.begin("NODE"),20;break;case 18:return L.getLogger().trace("Explosion Bang"),this.begin("NODE"),20;break;case 19:return L.getLogger().trace("Cloud Bang"),this.begin("NODE"),20;break;case 20:return this.begin("NODE"),20;break;case 21:return this.begin("NODE"),20;break;case 22:return this.begin("NODE"),20;break;case 23:return this.begin("NODE"),20;break;case 24:return 13;case 25:return 23;case 26:return 11;case 27:this.begin("NSTR2");break;case 28:return"NODE_DESCR";case 29:this.popState();break;case 30:L.getLogger().trace("Starting NSTR"),this.begin("NSTR");break;case 31:return L.getLogger().trace("description:",M.yytext),"NODE_DESCR";break;case 32:this.popState();break;case 33:return this.popState(),L.getLogger().trace("node end ))"),"NODE_DEND";break;case 34:return this.popState(),L.getLogger().trace("node end )"),"NODE_DEND";break;case 35:return this.popState(),L.getLogger().trace("node end ...",M.yytext),"NODE_DEND";break;case 36:return this.popState(),L.getLogger().trace("node end (("),"NODE_DEND";break;case 37:return this.popState(),L.getLogger().trace("node end (-"),"NODE_DEND";break;case 38:return this.popState(),L.getLogger().trace("node end (-"),"NODE_DEND";break;case 39:return this.popState(),L.getLogger().trace("node end (("),"NODE_DEND";break;case 40:return this.popState(),L.getLogger().trace("node end (("),"NODE_DEND";break;case 41:return L.getLogger().trace("Long description:",M.yytext),21;break;case 42:return L.getLogger().trace("Long description:",M.yytext),21;break}},"anonymous"),rules:[/^(?:@\{)/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^\"]+)/i,/^(?:[^}^"]+)/i,/^(?:\})/i,/^(?:\s*%%.*)/i,/^(?:kanban\b)/i,/^(?::::)/i,/^(?:.+)/i,/^(?:\n)/i,/^(?:::icon\()/i,/^(?:[\s]+[\n])/i,/^(?:[\n]+)/i,/^(?:[^\)]+)/i,/^(?:\))/i,/^(?:-\))/i,/^(?:\(-)/i,/^(?:\)\))/i,/^(?:\))/i,/^(?:\(\()/i,/^(?:\{\{)/i,/^(?:\()/i,/^(?:\[)/i,/^(?:[\s]+)/i,/^(?:[^\(\[\n\)\{\}@]+)/i,/^(?:$)/i,/^(?:["][`])/i,/^(?:[^`"]+)/i,/^(?:[`]["])/i,/^(?:["])/i,/^(?:[^"]+)/i,/^(?:["])/i,/^(?:[\)]\))/i,/^(?:[\)])/i,/^(?:[\]])/i,/^(?:\}\})/i,/^(?:\(-)/i,/^(?:-\))/i,/^(?:\(\()/i,/^(?:\()/i,/^(?:[^\)\]\(\}]+)/i,/^(?:.+(?!\(\())/i],conditions:{shapeDataEndBracket:{rules:[],inclusive:!1},shapeDataStr:{rules:[2,3],inclusive:!1},shapeData:{rules:[1,4,5],inclusive:!1},CLASS:{rules:[9,10],inclusive:!1},ICON:{rules:[14,15],inclusive:!1},NSTR2:{rules:[28,29],inclusive:!1},NSTR:{rules:[31,32],inclusive:!1},NODE:{rules:[27,30,33,34,35,36,37,38,39,40,41,42],inclusive:!1},INITIAL:{rules:[0,6,7,8,11,12,13,16,17,18,19,20,21,22,23,24,25,26],inclusive:!0}}};return _})();C.lexer=k;function E(){this.yy={}}return x(E,"Parser"),E.prototype=C,C.Parser=E,new E})();_W.parser=_W;HEt=_W,Bl=[],LW=[],AW=0,RW={},WEt=x(()=>{Bl=[],LW=[],AW=0,RW={}},"clear"),YEt=x(t=>{if(Bl.length===0)return null;let e=Bl[0].level,r=null;for(let n=Bl.length-1;n>=0;n--)if(Bl[n].level===e&&!r&&(r=Bl[n]),Bl[n].levelo.parentId===a.id);for(let o of s){let l={id:o.id,parentId:a.id,label:Er(o.label??"",n),isGroup:!1,ticket:o?.ticket,priority:o?.priority,assigned:o?.assigned,icon:o?.icon,shape:"kanbanItem",level:o.level,rx:5,ry:5,cssStyles:["text-align: left"]};e.push(l)}}return{nodes:e,edges:t,other:{},config:Te()}},"getData"),jEt=x((t,e,r,n,a)=>{let i=Te(),s=i.mindmap?.padding??or.mindmap.padding;switch(n){case ni.ROUNDED_RECT:case ni.RECT:case ni.HEXAGON:s*=2}let o={id:Er(e,i)||"kbn"+AW++,level:t,label:Er(r,i),width:i.mindmap?.maxNodeWidth??or.mindmap.maxNodeWidth,padding:s,isGroup:!1};if(a!==void 0){let u;a.includes(` -`)?u=a+` +`,"getStyles"),bCt=xCt,wCt={db:aCt,renderer:yCt,parser:YSt,styles:bCt}});var qIe={};Mr(qIe,{diagram:()=>$Ct});var zX,kCt,Ou,GX,$X,qX,TCt,ECt,GIe,SCt,CCt,Za,_Ct,ACt,LCt,RCt,DCt,ICt,MCt,NCt,OCt,PCt,BCt,FCt,zCt,$Ct,UIe=D(()=>{_T();Il();Wo();Al();As();Hn();v0();Nr();Cl();zX=(function(){var t=b(function(R,A,I,P){for(I=I||{},P=R.length;P--;I[R[P]]=A);return I},"o"),e=[1,4],r=[1,13],n=[1,12],i=[1,15],a=[1,16],s=[1,20],o=[1,19],l=[6,7,8],u=[1,26],h=[1,24],f=[1,25],d=[6,7,11],p=[1,31],m=[6,7,11,24],g=[1,6,13,16,17,20,23],y=[1,35],v=[1,36],x=[1,6,7,11,13,16,17,20,23],k=[1,38],_={trace:b(function(){},"trace"),yy:{},symbols_:{error:2,start:3,mindMap:4,spaceLines:5,SPACELINE:6,NL:7,KANBAN:8,document:9,stop:10,EOF:11,statement:12,SPACELIST:13,node:14,shapeData:15,ICON:16,CLASS:17,nodeWithId:18,nodeWithoutId:19,NODE_DSTART:20,NODE_DESCR:21,NODE_DEND:22,NODE_ID:23,SHAPE_DATA:24,$accept:0,$end:1},terminals_:{2:"error",6:"SPACELINE",7:"NL",8:"KANBAN",11:"EOF",13:"SPACELIST",16:"ICON",17:"CLASS",20:"NODE_DSTART",21:"NODE_DESCR",22:"NODE_DEND",23:"NODE_ID",24:"SHAPE_DATA"},productions_:[0,[3,1],[3,2],[5,1],[5,2],[5,2],[4,2],[4,3],[10,1],[10,1],[10,1],[10,2],[10,2],[9,3],[9,2],[12,3],[12,2],[12,2],[12,2],[12,1],[12,2],[12,1],[12,1],[12,1],[12,1],[14,1],[14,1],[19,3],[18,1],[18,4],[15,2],[15,1]],performAction:b(function(A,I,P,O,C,N,B){var F=N.length-1;switch(C){case 6:case 7:return O;case 8:O.getLogger().trace("Stop NL ");break;case 9:O.getLogger().trace("Stop EOF ");break;case 11:O.getLogger().trace("Stop NL2 ");break;case 12:O.getLogger().trace("Stop EOF2 ");break;case 15:O.getLogger().info("Node: ",N[F-1].id),O.addNode(N[F-2].length,N[F-1].id,N[F-1].descr,N[F-1].type,N[F]);break;case 16:O.getLogger().info("Node: ",N[F].id),O.addNode(N[F-1].length,N[F].id,N[F].descr,N[F].type);break;case 17:O.getLogger().trace("Icon: ",N[F]),O.decorateNode({icon:N[F]});break;case 18:case 23:O.decorateNode({class:N[F]});break;case 19:O.getLogger().trace("SPACELIST");break;case 20:O.getLogger().trace("Node: ",N[F-1].id),O.addNode(0,N[F-1].id,N[F-1].descr,N[F-1].type,N[F]);break;case 21:O.getLogger().trace("Node: ",N[F].id),O.addNode(0,N[F].id,N[F].descr,N[F].type);break;case 22:O.decorateNode({icon:N[F]});break;case 27:O.getLogger().trace("node found ..",N[F-2]),this.$={id:N[F-1],descr:N[F-1],type:O.getType(N[F-2],N[F])};break;case 28:this.$={id:N[F],descr:N[F],type:0};break;case 29:O.getLogger().trace("node found ..",N[F-3]),this.$={id:N[F-3],descr:N[F-1],type:O.getType(N[F-2],N[F])};break;case 30:this.$=N[F-1]+N[F];break;case 31:this.$=N[F];break}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],8:e},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:e},{6:r,7:[1,10],9:9,12:11,13:n,14:14,16:i,17:a,18:17,19:18,20:s,23:o},t(l,[2,3]),{1:[2,2]},t(l,[2,4]),t(l,[2,5]),{1:[2,6],6:r,12:21,13:n,14:14,16:i,17:a,18:17,19:18,20:s,23:o},{6:r,9:22,12:11,13:n,14:14,16:i,17:a,18:17,19:18,20:s,23:o},{6:u,7:h,10:23,11:f},t(d,[2,24],{18:17,19:18,14:27,16:[1,28],17:[1,29],20:s,23:o}),t(d,[2,19]),t(d,[2,21],{15:30,24:p}),t(d,[2,22]),t(d,[2,23]),t(m,[2,25]),t(m,[2,26]),t(m,[2,28],{20:[1,32]}),{21:[1,33]},{6:u,7:h,10:34,11:f},{1:[2,7],6:r,12:21,13:n,14:14,16:i,17:a,18:17,19:18,20:s,23:o},t(g,[2,14],{7:y,11:v}),t(x,[2,8]),t(x,[2,9]),t(x,[2,10]),t(d,[2,16],{15:37,24:p}),t(d,[2,17]),t(d,[2,18]),t(d,[2,20],{24:k}),t(m,[2,31]),{21:[1,39]},{22:[1,40]},t(g,[2,13],{7:y,11:v}),t(x,[2,11]),t(x,[2,12]),t(d,[2,15],{24:k}),t(m,[2,30]),{22:[1,41]},t(m,[2,27]),t(m,[2,29])],defaultActions:{2:[2,1],6:[2,2]},parseError:b(function(A,I){if(I.recoverable)this.trace(A);else{var P=new Error(A);throw P.hash=I,P}},"parseError"),parse:b(function(A){var I=this,P=[0],O=[],C=[null],N=[],B=this.table,F="",M=0,$=0,z=0,q=2,V=1,U=N.slice.call(arguments,1),J=Object.create(this.lexer),se={yy:{}};for(var re in this.yy)Object.prototype.hasOwnProperty.call(this.yy,re)&&(se.yy[re]=this.yy[re]);J.setInput(A,se.yy),se.yy.lexer=J,se.yy.parser=this,typeof J.yylloc>"u"&&(J.yylloc={});var me=J.yylloc;N.push(me);var ge=J.options&&J.options.ranges;typeof se.yy.parseError=="function"?this.parseError=se.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function ye(Ye){P.length=P.length-2*Ye,C.length=C.length-Ye,N.length=N.length-Ye}b(ye,"popStack");function _e(){var Ye;return Ye=O.pop()||J.lex()||V,typeof Ye!="number"&&(Ye instanceof Array&&(O=Ye,Ye=O.pop()),Ye=I.symbols_[Ye]||Ye),Ye}b(_e,"lex");for(var ue,ie,le,oe,ne,pe,te={},He,de,ce,st;;){if(le=P[P.length-1],this.defaultActions[le]?oe=this.defaultActions[le]:((ue===null||typeof ue>"u")&&(ue=_e()),oe=B[le]&&B[le][ue]),typeof oe>"u"||!oe.length||!oe[0]){var Ae="";st=[];for(He in B[le])this.terminals_[He]&&He>q&&st.push("'"+this.terminals_[He]+"'");J.showPosition?Ae="Parse error on line "+(M+1)+`: +`+J.showPosition()+` +Expecting `+st.join(", ")+", got '"+(this.terminals_[ue]||ue)+"'":Ae="Parse error on line "+(M+1)+": Unexpected "+(ue==V?"end of input":"'"+(this.terminals_[ue]||ue)+"'"),this.parseError(Ae,{text:J.match,token:this.terminals_[ue]||ue,line:J.yylineno,loc:me,expected:st})}if(oe[0]instanceof Array&&oe.length>1)throw new Error("Parse Error: multiple actions possible at state: "+le+", token: "+ue);switch(oe[0]){case 1:P.push(ue),C.push(J.yytext),N.push(J.yylloc),P.push(oe[1]),ue=null,ie?(ue=ie,ie=null):($=J.yyleng,F=J.yytext,M=J.yylineno,me=J.yylloc,z>0&&z--);break;case 2:if(de=this.productions_[oe[1]][1],te.$=C[C.length-de],te._$={first_line:N[N.length-(de||1)].first_line,last_line:N[N.length-1].last_line,first_column:N[N.length-(de||1)].first_column,last_column:N[N.length-1].last_column},ge&&(te._$.range=[N[N.length-(de||1)].range[0],N[N.length-1].range[1]]),pe=this.performAction.apply(te,[F,$,M,se.yy,oe[1],C,N].concat(U)),typeof pe<"u")return pe;de&&(P=P.slice(0,-1*de*2),C=C.slice(0,-1*de),N=N.slice(0,-1*de)),P.push(this.productions_[oe[1]][0]),C.push(te.$),N.push(te._$),ce=B[P[P.length-2]][P[P.length-1]],P.push(ce);break;case 3:return!0}}return!0},"parse")},T=(function(){var R={EOF:1,parseError:b(function(I,P){if(this.yy.parser)this.yy.parser.parseError(I,P);else throw new Error(I)},"parseError"),setInput:b(function(A,I){return this.yy=I||this.yy||{},this._input=A,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:b(function(){var A=this._input[0];this.yytext+=A,this.yyleng++,this.offset++,this.match+=A,this.matched+=A;var I=A.match(/(?:\r\n?|\n).*/g);return I?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),A},"input"),unput:b(function(A){var I=A.length,P=A.split(/(?:\r\n?|\n)/g);this._input=A+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-I),this.offset-=I;var O=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),P.length-1&&(this.yylineno-=P.length-1);var C=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:P?(P.length===O.length?this.yylloc.first_column:0)+O[O.length-P.length].length-P[0].length:this.yylloc.first_column-I},this.options.ranges&&(this.yylloc.range=[C[0],C[0]+this.yyleng-I]),this.yyleng=this.yytext.length,this},"unput"),more:b(function(){return this._more=!0,this},"more"),reject:b(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). +`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:b(function(A){this.unput(this.match.slice(A))},"less"),pastInput:b(function(){var A=this.matched.substr(0,this.matched.length-this.match.length);return(A.length>20?"...":"")+A.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:b(function(){var A=this.match;return A.length<20&&(A+=this._input.substr(0,20-A.length)),(A.substr(0,20)+(A.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:b(function(){var A=this.pastInput(),I=new Array(A.length+1).join("-");return A+this.upcomingInput()+` +`+I+"^"},"showPosition"),test_match:b(function(A,I){var P,O,C;if(this.options.backtrack_lexer&&(C={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(C.yylloc.range=this.yylloc.range.slice(0))),O=A[0].match(/(?:\r\n?|\n).*/g),O&&(this.yylineno+=O.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:O?O[O.length-1].length-O[O.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+A[0].length},this.yytext+=A[0],this.match+=A[0],this.matches=A,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(A[0].length),this.matched+=A[0],P=this.performAction.call(this,this.yy,this,I,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),P)return P;if(this._backtrack){for(var N in C)this[N]=C[N];return!1}return!1},"test_match"),next:b(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var A,I,P,O;this._more||(this.yytext="",this.match="");for(var C=this._currentRules(),N=0;NI[0].length)){if(I=P,O=N,this.options.backtrack_lexer){if(A=this.test_match(P,C[N]),A!==!1)return A;if(this._backtrack){I=!1;continue}else return!1}else if(!this.options.flex)break}return I?(A=this.test_match(I,C[O]),A!==!1?A:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. +`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:b(function(){var I=this.next();return I||this.lex()},"lex"),begin:b(function(I){this.conditionStack.push(I)},"begin"),popState:b(function(){var I=this.conditionStack.length-1;return I>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:b(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:b(function(I){return I=this.conditionStack.length-1-Math.abs(I||0),I>=0?this.conditionStack[I]:"INITIAL"},"topState"),pushState:b(function(I){this.begin(I)},"pushState"),stateStackSize:b(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:b(function(I,P,O,C){var N=C;switch(O){case 0:return this.pushState("shapeData"),P.yytext="",24;break;case 1:return this.pushState("shapeDataStr"),24;break;case 2:return this.popState(),24;break;case 3:let B=/\n\s*/g;return P.yytext=P.yytext.replace(B,"
    "),24;break;case 4:return 24;case 5:this.popState();break;case 6:return I.getLogger().trace("Found comment",P.yytext),6;break;case 7:return 8;case 8:this.begin("CLASS");break;case 9:return this.popState(),17;break;case 10:this.popState();break;case 11:I.getLogger().trace("Begin icon"),this.begin("ICON");break;case 12:return I.getLogger().trace("SPACELINE"),6;break;case 13:return 7;case 14:return 16;case 15:I.getLogger().trace("end icon"),this.popState();break;case 16:return I.getLogger().trace("Exploding node"),this.begin("NODE"),20;break;case 17:return I.getLogger().trace("Cloud"),this.begin("NODE"),20;break;case 18:return I.getLogger().trace("Explosion Bang"),this.begin("NODE"),20;break;case 19:return I.getLogger().trace("Cloud Bang"),this.begin("NODE"),20;break;case 20:return this.begin("NODE"),20;break;case 21:return this.begin("NODE"),20;break;case 22:return this.begin("NODE"),20;break;case 23:return this.begin("NODE"),20;break;case 24:return 13;case 25:return 23;case 26:return 11;case 27:this.begin("NSTR2");break;case 28:return"NODE_DESCR";case 29:this.popState();break;case 30:I.getLogger().trace("Starting NSTR"),this.begin("NSTR");break;case 31:return I.getLogger().trace("description:",P.yytext),"NODE_DESCR";break;case 32:this.popState();break;case 33:return this.popState(),I.getLogger().trace("node end ))"),"NODE_DEND";break;case 34:return this.popState(),I.getLogger().trace("node end )"),"NODE_DEND";break;case 35:return this.popState(),I.getLogger().trace("node end ...",P.yytext),"NODE_DEND";break;case 36:return this.popState(),I.getLogger().trace("node end (("),"NODE_DEND";break;case 37:return this.popState(),I.getLogger().trace("node end (-"),"NODE_DEND";break;case 38:return this.popState(),I.getLogger().trace("node end (-"),"NODE_DEND";break;case 39:return this.popState(),I.getLogger().trace("node end (("),"NODE_DEND";break;case 40:return this.popState(),I.getLogger().trace("node end (("),"NODE_DEND";break;case 41:return I.getLogger().trace("Long description:",P.yytext),21;break;case 42:return I.getLogger().trace("Long description:",P.yytext),21;break}},"anonymous"),rules:[/^(?:@\{)/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^\"]+)/i,/^(?:[^}^"]+)/i,/^(?:\})/i,/^(?:\s*%%.*)/i,/^(?:kanban\b)/i,/^(?::::)/i,/^(?:.+)/i,/^(?:\n)/i,/^(?:::icon\()/i,/^(?:[\s]+[\n])/i,/^(?:[\n]+)/i,/^(?:[^\)]+)/i,/^(?:\))/i,/^(?:-\))/i,/^(?:\(-)/i,/^(?:\)\))/i,/^(?:\))/i,/^(?:\(\()/i,/^(?:\{\{)/i,/^(?:\()/i,/^(?:\[)/i,/^(?:[\s]+)/i,/^(?:[^\(\[\n\)\{\}@]+)/i,/^(?:$)/i,/^(?:["][`])/i,/^(?:[^`"]+)/i,/^(?:[`]["])/i,/^(?:["])/i,/^(?:[^"]+)/i,/^(?:["])/i,/^(?:[\)]\))/i,/^(?:[\)])/i,/^(?:[\]])/i,/^(?:\}\})/i,/^(?:\(-)/i,/^(?:-\))/i,/^(?:\(\()/i,/^(?:\()/i,/^(?:[^\)\]\(\}]+)/i,/^(?:.+(?!\(\())/i],conditions:{shapeDataEndBracket:{rules:[],inclusive:!1},shapeDataStr:{rules:[2,3],inclusive:!1},shapeData:{rules:[1,4,5],inclusive:!1},CLASS:{rules:[9,10],inclusive:!1},ICON:{rules:[14,15],inclusive:!1},NSTR2:{rules:[28,29],inclusive:!1},NSTR:{rules:[31,32],inclusive:!1},NODE:{rules:[27,30,33,34,35,36,37,38,39,40,41,42],inclusive:!1},INITIAL:{rules:[0,6,7,8,11,12,13,16,17,18,19,20,21,22,23,24,25,26],inclusive:!0}}};return R})();_.lexer=T;function S(){this.yy={}}return b(S,"Parser"),S.prototype=_,_.Parser=S,new S})();zX.parser=zX;kCt=zX,Ou=[],GX=[],$X=0,qX={},TCt=b(()=>{Ou=[],GX=[],$X=0,qX={}},"clear"),ECt=b(t=>{if(Ou.length===0)return null;let e=Ou[0].level,r=null;for(let n=Ou.length-1;n>=0;n--)if(Ou[n].level===e&&!r&&(r=Ou[n]),Ou[n].levelo.parentId===i.id);for(let o of s){let l={id:o.id,parentId:i.id,label:Qr(o.label??"",n),isGroup:!1,ticket:o?.ticket,priority:o?.priority,assigned:o?.assigned,icon:o?.icon,shape:"kanbanItem",level:o.level,rx:5,ry:5,cssStyles:["text-align: left"]};e.push(l)}}return{nodes:e,edges:t,other:{},config:Fe()}},"getData"),CCt=b((t,e,r,n,i)=>{let a=Fe(),s=a.mindmap?.padding??Ir.mindmap.padding;switch(n){case Za.ROUNDED_RECT:case Za.RECT:case Za.HEXAGON:s*=2}let o={id:Qr(e,a)||"kbn"+$X++,level:t,label:Qr(r,a),width:a.mindmap?.maxNodeWidth??Ir.mindmap.maxNodeWidth,padding:s,isGroup:!1};if(i!==void 0){let u;i.includes(` +`)?u=i+` `:u=`{ -`+a+` -}`;let h=r1(u,{schema:t1});if(h.shape&&(h.shape!==h.shape.toLowerCase()||h.shape.includes("_")))throw new Error(`No such shape: ${h.shape}. Shape names should be lowercase.`);h?.shape&&h.shape==="kanbanItem"&&(o.shape=h?.shape),h?.label&&(o.label=h?.label),h?.icon&&(o.icon=h?.icon.toString()),h?.assigned&&(o.assigned=h?.assigned.toString()),h?.ticket&&(o.ticket=h?.ticket.toString()),h?.priority&&(o.priority=h?.priority)}let l=YEt(t);l?o.parentId=l.id||"kbn"+AW++:LW.push(o),Bl.push(o)},"addNode"),ni={DEFAULT:0,NO_BORDER:0,ROUNDED_RECT:1,RECT:2,CIRCLE:3,CLOUD:4,BANG:5,HEXAGON:6},KEt=x((t,e)=>{switch(te.debug("In get type",t,e),t){case"[":return ni.RECT;case"(":return e===")"?ni.ROUNDED_RECT:ni.CLOUD;case"((":return ni.CIRCLE;case")":return ni.CLOUD;case"))":return ni.BANG;case"{{":return ni.HEXAGON;default:return ni.DEFAULT}},"getType"),ZEt=x((t,e)=>{RW[t]=e},"setElementForId"),QEt=x(t=>{if(!t)return;let e=Te(),r=Bl[Bl.length-1];t.icon&&(r.icon=Er(t.icon,e)),t.class&&(r.cssClasses=Er(t.class,e))},"decorateNode"),JEt=x(t=>{switch(t){case ni.DEFAULT:return"no-border";case ni.RECT:return"rect";case ni.ROUNDED_RECT:return"rounded-rect";case ni.CIRCLE:return"circle";case ni.CLOUD:return"cloud";case ni.BANG:return"bang";case ni.HEXAGON:return"hexgon";default:return"no-border"}},"type2Str"),eCt=x(()=>te,"getLogger"),tCt=x(t=>RW[t],"getElementById"),rCt={clear:WEt,addNode:jEt,getSections:mLe,getData:XEt,nodeType:ni,getType:KEt,setElementForId:ZEt,decorateNode:QEt,type2Str:JEt,getLogger:eCt,getElementById:tCt},nCt=rCt,aCt=x(async(t,e,r,n)=>{te.debug(`Rendering kanban diagram -`+t);let i=n.db.getData(),s=Te();s.htmlLabels=!1;let o=yi(e),l=o.append("g");l.attr("class","sections");let u=o.append("g");u.attr("class","items");let h=i.nodes.filter(v=>v.isGroup),f=0,d=10,p=[],m=25;for(let v of h){let y=s?.kanban?.sectionWidth||200;f=f+1,v.x=y*f+(f-1)*d/2,v.width=y,v.y=0,v.height=y*3,v.rx=5,v.ry=5,v.cssClasses=v.cssClasses+" section-"+f;let b=await Y1(l,v);m=Math.max(m,b?.labelBBox?.height),p.push(b)}let g=0;for(let v of h){let y=p[g];g=g+1;let b=s?.kanban?.sectionWidth||200,w=-b*3/2+m,C=w,k=i.nodes.filter(S=>S.parentId===v.id);for(let S of k){if(S.isGroup)throw new Error("Groups within groups are not allowed in Kanban diagrams");S.x=v.x,S.width=b-1.5*d;let M=(await Xp(u,S,{config:s})).node().getBBox();S.y=C+M.height/2,await y3(S),C=S.y+M.height/2+d/2}let E=y.cluster.select("rect"),_=Math.max(C-w+3*d,50)+(m-25);E.attr("height",_)}Vl(void 0,o,s.mindmap?.padding??or.kanban.padding,s.mindmap?.useMaxWidth??or.kanban.useMaxWidth)},"draw"),iCt={draw:aCt},sCt=x(t=>{let e="";for(let n=0;nt.darkMode?Lt(n,a):wt(n,a),"adjuster");for(let n=0;n{switch(he.debug("In get type",t,e),t){case"[":return Za.RECT;case"(":return e===")"?Za.ROUNDED_RECT:Za.CLOUD;case"((":return Za.CIRCLE;case")":return Za.CLOUD;case"))":return Za.BANG;case"{{":return Za.HEXAGON;default:return Za.DEFAULT}},"getType"),ACt=b((t,e)=>{qX[t]=e},"setElementForId"),LCt=b(t=>{if(!t)return;let e=Fe(),r=Ou[Ou.length-1];t.icon&&(r.icon=Qr(t.icon,e)),t.class&&(r.cssClasses=Qr(t.class,e))},"decorateNode"),RCt=b(t=>{switch(t){case Za.DEFAULT:return"no-border";case Za.RECT:return"rect";case Za.ROUNDED_RECT:return"rounded-rect";case Za.CIRCLE:return"circle";case Za.CLOUD:return"cloud";case Za.BANG:return"bang";case Za.HEXAGON:return"hexgon";default:return"no-border"}},"type2Str"),DCt=b(()=>he,"getLogger"),ICt=b(t=>qX[t],"getElementById"),MCt={clear:TCt,addNode:CCt,getSections:GIe,getData:SCt,nodeType:Za,getType:_Ct,setElementForId:ACt,decorateNode:LCt,type2Str:RCt,getLogger:DCt,getElementById:ICt},NCt=MCt,OCt=b(async(t,e,r,n)=>{he.debug(`Rendering kanban diagram +`+t);let a=n.db.getData(),s=Fe();s.htmlLabels=!1;let o=cs(e),l=o.append("g");l.attr("class","sections");let u=o.append("g");u.attr("class","items");let h=a.nodes.filter(y=>y.isGroup),f=0,d=10,p=[],m=25;for(let y of h){let v=s?.kanban?.sectionWidth||200;f=f+1,y.x=v*f+(f-1)*d/2,y.width=v,y.y=0,y.height=v*3,y.rx=5,y.ry=5,y.cssClasses=y.cssClasses+" section-"+f;let x=await sy(l,y);m=Math.max(m,x?.labelBBox?.height),p.push(x)}let g=0;for(let y of h){let v=p[g];g=g+1;let x=s?.kanban?.sectionWidth||200,k=-x*3/2+m,_=k,T=a.nodes.filter(A=>A.parentId===y.id);for(let A of T){if(A.isGroup)throw new Error("Groups within groups are not allowed in Kanban diagrams");A.x=y.x,A.width=x-1.5*d;let P=(await nm(u,A,{config:s})).node().getBBox();A.y=_+P.height/2,await O5(A),_=A.y+P.height/2+d/2}let S=v.cluster.select("rect"),R=Math.max(_-k+3*d,50)+(m-25);S.attr("height",R)}Uu(void 0,o,s.mindmap?.padding??Ir.kanban.padding,s.mindmap?.useMaxWidth??Ir.kanban.useMaxWidth)},"draw"),PCt={draw:OCt},BCt=b(t=>{let e="";for(let n=0;nt.darkMode?tr(n,i):Wt(n,i),"adjuster");for(let n=0;n` + `}return e},"genSections"),FCt=b(t=>` .edge { stroke-width: 3; } - ${sCt(t)} + ${BCt(t)} .section-root rect, .section-root path, .section-root circle, .section-root polygon { fill: ${t.git0}; } @@ -2438,16 +2694,16 @@ Expecting `+$e.join(", ")+", got '"+(this.terminals_[J]||J)+"'":me="Parse error dominant-baseline: middle; text-align: center; } -`,"getStyles"),lCt=oCt,uCt={db:nCt,renderer:iCt,parser:HEt,styles:lCt}});function K6(t,e){let r;if(e===void 0)for(let n of t)n!=null&&(r=n)&&(r=n);else{let n=-1;for(let a of t)(a=e(a,++n,t))!=null&&(r=a)&&(r=a)}return r}var yLe=A(()=>{});function nb(t,e){let r;if(e===void 0)for(let n of t)n!=null&&(r>n||r===void 0&&n>=n)&&(r=n);else{let n=-1;for(let a of t)(a=e(a,++n,t))!=null&&(r>a||r===void 0&&a>=a)&&(r=a)}return r}var xLe=A(()=>{});function ab(t,e){let r=0;if(e===void 0)for(let n of t)(n=+n)&&(r+=n);else{let n=-1;for(let a of t)(a=+e(a,++n,t))&&(r+=a)}return r}var bLe=A(()=>{});var IW=A(()=>{yLe();xLe();bLe()});function cCt(t){return t.target.depth}function DW(t){return t.depth}function NW(t,e){return e-1-t.height}function Z6(t,e){return t.sourceLinks.length?t.depth:e-1}function MW(t){return t.targetLinks.length?t.depth:t.sourceLinks.length?nb(t.sourceLinks,cCt)-1:0}var OW=A(()=>{IW()});function ib(t){return function(){return t}}var wLe=A(()=>{});function kLe(t,e){return EL(t.source,e.source)||t.index-e.index}function TLe(t,e){return EL(t.target,e.target)||t.index-e.index}function EL(t,e){return t.y0-e.y0}function PW(t){return t.value}function hCt(t){return t.index}function fCt(t){return t.nodes}function dCt(t){return t.links}function ELe(t,e){let r=t.get(e);if(!r)throw new Error("missing: "+e);return r}function CLe({nodes:t}){for(let e of t){let r=e.y0,n=r;for(let a of e.sourceLinks)a.y0=r+a.width/2,r+=a.width;for(let a of e.targetLinks)a.y1=n+a.width/2,n+=a.width}}function CL(){let t=0,e=0,r=1,n=1,a=24,i=8,s,o=hCt,l=Z6,u,h,f=fCt,d=dCt,p=6;function m(){let O={nodes:f.apply(null,arguments),links:d.apply(null,arguments)};return g(O),v(O),y(O),b(O),k(O),CLe(O),O}m.update=function(O){return CLe(O),O},m.nodeId=function(O){return arguments.length?(o=typeof O=="function"?O:ib(O),m):o},m.nodeAlign=function(O){return arguments.length?(l=typeof O=="function"?O:ib(O),m):l},m.nodeSort=function(O){return arguments.length?(u=O,m):u},m.nodeWidth=function(O){return arguments.length?(a=+O,m):a},m.nodePadding=function(O){return arguments.length?(i=s=+O,m):i},m.nodes=function(O){return arguments.length?(f=typeof O=="function"?O:ib(O),m):f},m.links=function(O){return arguments.length?(d=typeof O=="function"?O:ib(O),m):d},m.linkSort=function(O){return arguments.length?(h=O,m):h},m.size=function(O){return arguments.length?(t=e=0,r=+O[0],n=+O[1],m):[r-t,n-e]},m.extent=function(O){return arguments.length?(t=+O[0][0],r=+O[1][0],e=+O[0][1],n=+O[1][1],m):[[t,e],[r,n]]},m.iterations=function(O){return arguments.length?(p=+O,m):p};function g({nodes:O,links:R}){for(let[B,F]of O.entries())F.index=B,F.sourceLinks=[],F.targetLinks=[];let P=new Map(O.map((B,F)=>[o(B,F,O),B]));for(let[B,F]of R.entries()){F.index=B;let{source:G,target:z}=F;typeof G!="object"&&(G=F.source=ELe(P,G)),typeof z!="object"&&(z=F.target=ELe(P,z)),G.sourceLinks.push(F),z.targetLinks.push(F)}if(h!=null)for(let{sourceLinks:B,targetLinks:F}of O)B.sort(h),F.sort(h)}function v({nodes:O}){for(let R of O)R.value=R.fixedValue===void 0?Math.max(ab(R.sourceLinks,PW),ab(R.targetLinks,PW)):R.fixedValue}function y({nodes:O}){let R=O.length,P=new Set(O),B=new Set,F=0;for(;P.size;){for(let G of P){G.depth=F;for(let{target:z}of G.sourceLinks)B.add(z)}if(++F>R)throw new Error("circular link");P=B,B=new Set}}function b({nodes:O}){let R=O.length,P=new Set(O),B=new Set,F=0;for(;P.size;){for(let G of P){G.height=F;for(let{source:z}of G.targetLinks)B.add(z)}if(++F>R)throw new Error("circular link");P=B,B=new Set}}function w({nodes:O}){let R=K6(O,F=>F.depth)+1,P=(r-t-a)/(R-1),B=new Array(R);for(let F of O){let G=Math.max(0,Math.min(R-1,Math.floor(l.call(null,F,R))));F.layer=G,F.x0=t+G*P,F.x1=F.x0+a,B[G]?B[G].push(F):B[G]=[F]}if(u)for(let F of B)F.sort(u);return B}function C(O){let R=nb(O,P=>(n-e-(P.length-1)*s)/ab(P,PW));for(let P of O){let B=e;for(let F of P){F.y0=B,F.y1=B+F.value*R,B=F.y1+s;for(let G of F.sourceLinks)G.width=G.value*R}B=(n-B+s)/(P.length+1);for(let F=0;FP.length)-1)),C(R);for(let P=0;P0))continue;let Y=(H/Q-z.y0)*R;z.y0+=Y,z.y1+=Y,D(z)}u===void 0&&G.sort(EL),S(G,P)}}function _(O,R,P){for(let B=O.length,F=B-2;F>=0;--F){let G=O[F];for(let z of G){let H=0,Q=0;for(let{target:ie,value:se}of z.sourceLinks){let oe=se*(ie.layer-z.layer);H+=N(z,ie)*oe,Q+=oe}if(!(Q>0))continue;let Y=(H/Q-z.y0)*R;z.y0+=Y,z.y1+=Y,D(z)}u===void 0&&G.sort(EL),S(G,P)}}function S(O,R){let P=O.length>>1,B=O[P];M(O,B.y0-s,P-1,R),L(O,B.y1+s,P+1,R),M(O,n,O.length-1,R),L(O,e,0,R)}function L(O,R,P,B){for(;P1e-6&&(F.y0+=G,F.y1+=G),R=F.y1+s}}function M(O,R,P,B){for(;P>=0;--P){let F=O[P],G=(F.y1-R)*B;G>1e-6&&(F.y0-=G,F.y1-=G),R=F.y0-s}}function D({sourceLinks:O,targetLinks:R}){if(h===void 0){for(let{source:{sourceLinks:P}}of R)P.sort(TLe);for(let{target:{targetLinks:P}}of O)P.sort(kLe)}}function T(O){if(h===void 0)for(let{sourceLinks:R,targetLinks:P}of O)R.sort(TLe),P.sort(kLe)}function I(O,R){let P=O.y0-(O.sourceLinks.length-1)*s/2;for(let{target:B,width:F}of O.sourceLinks){if(B===R)break;P+=F+s}for(let{source:B,width:F}of R.targetLinks){if(B===O)break;P-=F}return P}function N(O,R){let P=R.y0-(R.targetLinks.length-1)*s/2;for(let{source:B,width:F}of R.targetLinks){if(B===O)break;P+=F+s}for(let{target:B,width:F}of O.sourceLinks){if(B===R)break;P-=F}return P}return m}var SLe=A(()=>{IW();OW();wLe()});function zW(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function _Le(){return new zW}var BW,FW,dg,pCt,$W,ALe=A(()=>{BW=Math.PI,FW=2*BW,dg=1e-6,pCt=FW-dg;zW.prototype=_Le.prototype={constructor:zW,moveTo:function(t,e){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+e)},closePath:function(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(t,e){this._+="L"+(this._x1=+t)+","+(this._y1=+e)},quadraticCurveTo:function(t,e,r,n){this._+="Q"+ +t+","+ +e+","+(this._x1=+r)+","+(this._y1=+n)},bezierCurveTo:function(t,e,r,n,a,i){this._+="C"+ +t+","+ +e+","+ +r+","+ +n+","+(this._x1=+a)+","+(this._y1=+i)},arcTo:function(t,e,r,n,a){t=+t,e=+e,r=+r,n=+n,a=+a;var i=this._x1,s=this._y1,o=r-t,l=n-e,u=i-t,h=s-e,f=u*u+h*h;if(a<0)throw new Error("negative radius: "+a);if(this._x1===null)this._+="M"+(this._x1=t)+","+(this._y1=e);else if(f>dg)if(!(Math.abs(h*o-l*u)>dg)||!a)this._+="L"+(this._x1=t)+","+(this._y1=e);else{var d=r-i,p=n-s,m=o*o+l*l,g=d*d+p*p,v=Math.sqrt(m),y=Math.sqrt(f),b=a*Math.tan((BW-Math.acos((m+f-g)/(2*v*y)))/2),w=b/y,C=b/v;Math.abs(w-1)>dg&&(this._+="L"+(t+w*u)+","+(e+w*h)),this._+="A"+a+","+a+",0,0,"+ +(h*d>u*p)+","+(this._x1=t+C*o)+","+(this._y1=e+C*l)}},arc:function(t,e,r,n,a,i){t=+t,e=+e,r=+r,i=!!i;var s=r*Math.cos(n),o=r*Math.sin(n),l=t+s,u=e+o,h=1^i,f=i?n-a:a-n;if(r<0)throw new Error("negative radius: "+r);this._x1===null?this._+="M"+l+","+u:(Math.abs(this._x1-l)>dg||Math.abs(this._y1-u)>dg)&&(this._+="L"+l+","+u),r&&(f<0&&(f=f%FW+FW),f>pCt?this._+="A"+r+","+r+",0,1,"+h+","+(t-s)+","+(e-o)+"A"+r+","+r+",0,1,"+h+","+(this._x1=l)+","+(this._y1=u):f>dg&&(this._+="A"+r+","+r+",0,"+ +(f>=BW)+","+h+","+(this._x1=t+r*Math.cos(a))+","+(this._y1=e+r*Math.sin(a))))},rect:function(t,e,r,n){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+e)+"h"+ +r+"v"+ +n+"h"+-r+"Z"},toString:function(){return this._}};$W=_Le});var LLe=A(()=>{ALe()});function GW(t){return function(){return t}}var RLe=A(()=>{});function ILe(t){return t[0]}function DLe(t){return t[1]}var NLe=A(()=>{});var MLe,OLe=A(()=>{MLe=Array.prototype.slice});function mCt(t){return t.source}function gCt(t){return t.target}function vCt(t){var e=mCt,r=gCt,n=ILe,a=DLe,i=null;function s(){var o,l=MLe.call(arguments),u=e.apply(this,l),h=r.apply(this,l);if(i||(i=o=$W()),t(i,+n.apply(this,(l[0]=u,l)),+a.apply(this,l),+n.apply(this,(l[0]=h,l)),+a.apply(this,l)),o)return i=null,o+""||null}return s.source=function(o){return arguments.length?(e=o,s):e},s.target=function(o){return arguments.length?(r=o,s):r},s.x=function(o){return arguments.length?(n=typeof o=="function"?o:GW(+o),s):n},s.y=function(o){return arguments.length?(a=typeof o=="function"?o:GW(+o),s):a},s.context=function(o){return arguments.length?(i=o??null,s):i},s}function yCt(t,e,r,n,a){t.moveTo(e,r),t.bezierCurveTo(e=(e+n)/2,r,e,a,n,a)}function UW(){return vCt(yCt)}var PLe=A(()=>{LLe();OLe();RLe();NLe()});var BLe=A(()=>{PLe()});function xCt(t){return[t.source.x1,t.y0]}function bCt(t){return[t.target.x0,t.y1]}function qW(){return UW().source(xCt).target(bCt)}var FLe=A(()=>{BLe()});var zLe=A(()=>{SLe();OW();FLe()});var GLe={};lr(GLe,{diagram:()=>BCt});var VW,SL,AL,LL,_L,wCt,sb,kCt,TCt,ob,ECt,CCt,SCt,_Ct,ACt,LCt,Tf,$Le,RCt,ICt,DCt,NCt,MCt,OCt,PCt,BCt,ULe=A(()=>{ur();cr();zLe();VW=(function(){var t=x(function(o,l,u,h){for(u=u||{},h=o.length;h--;u[o[h]]=l);return u},"o"),e=[1,9],r=[1,10],n=[1,5,10,12],a={trace:x(function(){},"trace"),yy:{},symbols_:{error:2,start:3,SANKEY:4,NEWLINE:5,csv:6,opt_eof:7,record:8,csv_tail:9,EOF:10,"field[source]":11,COMMA:12,"field[target]":13,"field[value]":14,field:15,escaped:16,non_escaped:17,DQUOTE:18,ESCAPED_TEXT:19,NON_ESCAPED_TEXT:20,$accept:0,$end:1},terminals_:{2:"error",4:"SANKEY",5:"NEWLINE",10:"EOF",11:"field[source]",12:"COMMA",13:"field[target]",14:"field[value]",18:"DQUOTE",19:"ESCAPED_TEXT",20:"NON_ESCAPED_TEXT"},productions_:[0,[3,4],[6,2],[9,2],[9,0],[7,1],[7,0],[8,5],[15,1],[15,1],[16,3],[17,1]],performAction:x(function(l,u,h,f,d,p,m){var g=p.length-1;switch(d){case 7:let v=f.findOrCreateNode(p[g-4].trim().replaceAll('""','"')),y=f.findOrCreateNode(p[g-2].trim().replaceAll('""','"')),b=parseFloat(p[g].trim());f.addLink(v,y,b);break;case 8:case 9:case 11:this.$=p[g];break;case 10:this.$=p[g-1];break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},{5:[1,3]},{6:4,8:5,15:6,16:7,17:8,18:e,20:r},{1:[2,6],7:11,10:[1,12]},t(r,[2,4],{9:13,5:[1,14]}),{12:[1,15]},t(n,[2,8]),t(n,[2,9]),{19:[1,16]},t(n,[2,11]),{1:[2,1]},{1:[2,5]},t(r,[2,2]),{6:17,8:5,15:6,16:7,17:8,18:e,20:r},{15:18,16:7,17:8,18:e,20:r},{18:[1,19]},t(r,[2,3]),{12:[1,20]},t(n,[2,10]),{15:21,16:7,17:8,18:e,20:r},t([1,5,10],[2,7])],defaultActions:{11:[2,1],12:[2,5]},parseError:x(function(l,u){if(u.recoverable)this.trace(l);else{var h=new Error(l);throw h.hash=u,h}},"parseError"),parse:x(function(l){var u=this,h=[0],f=[],d=[null],p=[],m=this.table,g="",v=0,y=0,b=0,w=2,C=1,k=p.slice.call(arguments,1),E=Object.create(this.lexer),_={yy:{}};for(var S in this.yy)Object.prototype.hasOwnProperty.call(this.yy,S)&&(_.yy[S]=this.yy[S]);E.setInput(l,_.yy),_.yy.lexer=E,_.yy.parser=this,typeof E.yylloc>"u"&&(E.yylloc={});var L=E.yylloc;p.push(L);var M=E.options&&E.options.ranges;typeof _.yy.parseError=="function"?this.parseError=_.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function D(ie){h.length=h.length-2*ie,d.length=d.length-ie,p.length=p.length-ie}x(D,"popStack");function T(){var ie;return ie=f.pop()||E.lex()||C,typeof ie!="number"&&(ie instanceof Array&&(f=ie,ie=f.pop()),ie=u.symbols_[ie]||ie),ie}x(T,"lex");for(var I,N,O,R,P,B,F={},G,z,H,Q;;){if(O=h[h.length-1],this.defaultActions[O]?R=this.defaultActions[O]:((I===null||typeof I>"u")&&(I=T()),R=m[O]&&m[O][I]),typeof R>"u"||!R.length||!R[0]){var Y="";Q=[];for(G in m[O])this.terminals_[G]&&G>w&&Q.push("'"+this.terminals_[G]+"'");E.showPosition?Y="Parse error on line "+(v+1)+`: -`+E.showPosition()+` -Expecting `+Q.join(", ")+", got '"+(this.terminals_[I]||I)+"'":Y="Parse error on line "+(v+1)+": Unexpected "+(I==C?"end of input":"'"+(this.terminals_[I]||I)+"'"),this.parseError(Y,{text:E.match,token:this.terminals_[I]||I,line:E.yylineno,loc:L,expected:Q})}if(R[0]instanceof Array&&R.length>1)throw new Error("Parse Error: multiple actions possible at state: "+O+", token: "+I);switch(R[0]){case 1:h.push(I),d.push(E.yytext),p.push(E.yylloc),h.push(R[1]),I=null,N?(I=N,N=null):(y=E.yyleng,g=E.yytext,v=E.yylineno,L=E.yylloc,b>0&&b--);break;case 2:if(z=this.productions_[R[1]][1],F.$=d[d.length-z],F._$={first_line:p[p.length-(z||1)].first_line,last_line:p[p.length-1].last_line,first_column:p[p.length-(z||1)].first_column,last_column:p[p.length-1].last_column},M&&(F._$.range=[p[p.length-(z||1)].range[0],p[p.length-1].range[1]]),B=this.performAction.apply(F,[g,y,v,_.yy,R[1],d,p].concat(k)),typeof B<"u")return B;z&&(h=h.slice(0,-1*z*2),d=d.slice(0,-1*z),p=p.slice(0,-1*z)),h.push(this.productions_[R[1]][0]),d.push(F.$),p.push(F._$),H=m[h[h.length-2]][h[h.length-1]],h.push(H);break;case 3:return!0}}return!0},"parse")},i=(function(){var o={EOF:1,parseError:x(function(u,h){if(this.yy.parser)this.yy.parser.parseError(u,h);else throw new Error(u)},"parseError"),setInput:x(function(l,u){return this.yy=u||this.yy||{},this._input=l,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:x(function(){var l=this._input[0];this.yytext+=l,this.yyleng++,this.offset++,this.match+=l,this.matched+=l;var u=l.match(/(?:\r\n?|\n).*/g);return u?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),l},"input"),unput:x(function(l){var u=l.length,h=l.split(/(?:\r\n?|\n)/g);this._input=l+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-u),this.offset-=u;var f=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),h.length-1&&(this.yylineno-=h.length-1);var d=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:h?(h.length===f.length?this.yylloc.first_column:0)+f[f.length-h.length].length-h[0].length:this.yylloc.first_column-u},this.options.ranges&&(this.yylloc.range=[d[0],d[0]+this.yyleng-u]),this.yyleng=this.yytext.length,this},"unput"),more:x(function(){return this._more=!0,this},"more"),reject:x(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). -`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:x(function(l){this.unput(this.match.slice(l))},"less"),pastInput:x(function(){var l=this.matched.substr(0,this.matched.length-this.match.length);return(l.length>20?"...":"")+l.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:x(function(){var l=this.match;return l.length<20&&(l+=this._input.substr(0,20-l.length)),(l.substr(0,20)+(l.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:x(function(){var l=this.pastInput(),u=new Array(l.length+1).join("-");return l+this.upcomingInput()+` -`+u+"^"},"showPosition"),test_match:x(function(l,u){var h,f,d;if(this.options.backtrack_lexer&&(d={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(d.yylloc.range=this.yylloc.range.slice(0))),f=l[0].match(/(?:\r\n?|\n).*/g),f&&(this.yylineno+=f.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:f?f[f.length-1].length-f[f.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+l[0].length},this.yytext+=l[0],this.match+=l[0],this.matches=l,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(l[0].length),this.matched+=l[0],h=this.performAction.call(this,this.yy,this,u,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),h)return h;if(this._backtrack){for(var p in d)this[p]=d[p];return!1}return!1},"test_match"),next:x(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var l,u,h,f;this._more||(this.yytext="",this.match="");for(var d=this._currentRules(),p=0;pu[0].length)){if(u=h,f=p,this.options.backtrack_lexer){if(l=this.test_match(h,d[p]),l!==!1)return l;if(this._backtrack){u=!1;continue}else return!1}else if(!this.options.flex)break}return u?(l=this.test_match(u,d[f]),l!==!1?l:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. -`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:x(function(){var u=this.next();return u||this.lex()},"lex"),begin:x(function(u){this.conditionStack.push(u)},"begin"),popState:x(function(){var u=this.conditionStack.length-1;return u>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:x(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:x(function(u){return u=this.conditionStack.length-1-Math.abs(u||0),u>=0?this.conditionStack[u]:"INITIAL"},"topState"),pushState:x(function(u){this.begin(u)},"pushState"),stateStackSize:x(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:x(function(u,h,f,d){var p=d;switch(f){case 0:return this.pushState("csv"),4;break;case 1:return 10;case 2:return 5;case 3:return 12;case 4:return this.pushState("escaped_text"),18;break;case 5:return 20;case 6:return this.popState("escaped_text"),18;break;case 7:return 19}},"anonymous"),rules:[/^(?:sankey-beta\b)/i,/^(?:$)/i,/^(?:((\u000D\u000A)|(\u000A)))/i,/^(?:(\u002C))/i,/^(?:(\u0022))/i,/^(?:([\u0020-\u0021\u0023-\u002B\u002D-\u007E])*)/i,/^(?:(\u0022)(?!(\u0022)))/i,/^(?:(([\u0020-\u0021\u0023-\u002B\u002D-\u007E])|(\u002C)|(\u000D)|(\u000A)|(\u0022)(\u0022))*)/i],conditions:{csv:{rules:[1,2,3,4,5,6,7],inclusive:!1},escaped_text:{rules:[6,7],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7],inclusive:!0}}};return o})();a.lexer=i;function s(){this.yy={}}return x(s,"Parser"),s.prototype=a,a.Parser=s,new s})();VW.parser=VW;SL=VW,AL=[],LL=[],_L=new Map,wCt=x(()=>{AL=[],LL=[],_L=new Map,Cr()},"clear"),kCt=(sb=class{constructor(e,r,n=0){this.source=e,this.target=r,this.value=n}},x(sb,"SankeyLink"),sb),TCt=x((t,e,r)=>{AL.push(new kCt(t,e,r))},"addLink"),ECt=(ob=class{constructor(e){this.ID=e}},x(ob,"SankeyNode"),ob),CCt=x(t=>{t=Ze.sanitizeText(t,Te());let e=_L.get(t);return e===void 0&&(e=new ECt(t),_L.set(t,e),LL.push(e)),e},"findOrCreateNode"),SCt=x(()=>LL,"getNodes"),_Ct=x(()=>AL,"getLinks"),ACt=x(()=>({nodes:LL.map(t=>({id:t.ID})),links:AL.map(t=>({source:t.source.ID,target:t.target.ID,value:t.value}))}),"getGraph"),LCt={nodesMap:_L,getConfig:x(()=>Te().sankey,"getConfig"),getNodes:SCt,getLinks:_Ct,getGraph:ACt,addLink:TCt,findOrCreateNode:CCt,getAccTitle:_r,setAccTitle:Sr,getAccDescription:Lr,setAccDescription:Ar,getDiagramTitle:Rr,setDiagramTitle:Fr,clear:wCt},$Le=(Tf=class{static next(e){return new Tf(e+ ++Tf.count)}constructor(e){this.id=e,this.href=`#${e}`}toString(){return"url("+this.href+")"}},x(Tf,"Uid"),Tf.count=0,Tf),RCt={left:DW,right:NW,center:MW,justify:Z6},ICt=x(function(t,e,r,n){let{securityLevel:a,sankey:i}=Te(),s=NT.sankey,o;a==="sandbox"&&(o=We("#i"+e));let l=a==="sandbox"?We(o.nodes()[0].contentDocument.body):We("body"),u=a==="sandbox"?l.select(`[id="${e}"]`):We(`[id="${e}"]`),h=i?.width??s.width,f=i?.height??s.width,d=i?.useMaxWidth??s.useMaxWidth,p=i?.nodeAlignment??s.nodeAlignment,m=i?.prefix??s.prefix,g=i?.suffix??s.suffix,v=i?.showValues??s.showValues,y=n.db.getGraph(),b=RCt[p];CL().nodeId(M=>M.id).nodeWidth(10).nodePadding(10+(v?15:0)).nodeAlign(b).extent([[0,0],[h,f]])(y);let k=Ah(XM);u.append("g").attr("class","nodes").selectAll(".node").data(y.nodes).join("g").attr("class","node").attr("id",M=>(M.uid=$Le.next("node-")).id).attr("transform",function(M){return"translate("+M.x0+","+M.y0+")"}).attr("x",M=>M.x0).attr("y",M=>M.y0).append("rect").attr("height",M=>M.y1-M.y0).attr("width",M=>M.x1-M.x0).attr("fill",M=>k(M.id));let E=x(({id:M,value:D})=>v?`${M} -${m}${Math.round(D*100)/100}${g}`:M,"getText");u.append("g").attr("class","node-labels").attr("font-size",14).selectAll("text").data(y.nodes).join("text").attr("x",M=>M.x0(M.y1+M.y0)/2).attr("dy",`${v?"0":"0.35"}em`).attr("text-anchor",M=>M.x0(D.uid=$Le.next("linearGradient-")).id).attr("gradientUnits","userSpaceOnUse").attr("x1",D=>D.source.x1).attr("x2",D=>D.target.x0);M.append("stop").attr("offset","0%").attr("stop-color",D=>k(D.source.id)),M.append("stop").attr("offset","100%").attr("stop-color",D=>k(D.target.id))}let L;switch(S){case"gradient":L=x(M=>M.uid,"coloring");break;case"source":L=x(M=>k(M.source.id),"coloring");break;case"target":L=x(M=>k(M.target.id),"coloring");break;default:L=S}_.append("path").attr("d",qW()).attr("stroke",L).attr("stroke-width",M=>Math.max(1,M.width)),Vl(void 0,u,0,d)},"draw"),DCt={draw:ICt},NCt=x(t=>t.replaceAll(/^[^\S\n\r]+|[^\S\n\r]+$/g,"").replaceAll(/([\n\r])+/g,` -`).trim(),"prepareTextForParsing"),MCt=x(t=>`.label { +`,"getStyles"),zCt=FCt,$Ct={db:NCt,renderer:PCt,parser:kCt,styles:zCt}});function dw(t,e){let r;if(e===void 0)for(let n of t)n!=null&&(r=n)&&(r=n);else{let n=-1;for(let i of t)(i=e(i,++n,t))!=null&&(r=i)&&(r=i)}return r}var HIe=D(()=>{});function gb(t,e){let r;if(e===void 0)for(let n of t)n!=null&&(r>n||r===void 0&&n>=n)&&(r=n);else{let n=-1;for(let i of t)(i=e(i,++n,t))!=null&&(r>i||r===void 0&&i>=i)&&(r=i)}return r}var VIe=D(()=>{});function yb(t,e){let r=0;if(e===void 0)for(let n of t)(n=+n)&&(r+=n);else{let n=-1;for(let i of t)(i=+e(i,++n,t))&&(r+=i)}return r}var WIe=D(()=>{});var UX=D(()=>{HIe();VIe();WIe()});function GCt(t){return t.target.depth}function HX(t){return t.depth}function VX(t,e){return e-1-t.height}function pw(t,e){return t.sourceLinks.length?t.depth:e-1}function WX(t){return t.targetLinks.length?t.depth:t.sourceLinks.length?gb(t.sourceLinks,GCt)-1:0}var YX=D(()=>{UX()});function vb(t){return function(){return t}}var YIe=D(()=>{});function XIe(t,e){return iD(t.source,e.source)||t.index-e.index}function jIe(t,e){return iD(t.target,e.target)||t.index-e.index}function iD(t,e){return t.y0-e.y0}function XX(t){return t.value}function qCt(t){return t.index}function UCt(t){return t.nodes}function HCt(t){return t.links}function KIe(t,e){let r=t.get(e);if(!r)throw new Error("missing: "+e);return r}function ZIe({nodes:t}){for(let e of t){let r=e.y0,n=r;for(let i of e.sourceLinks)i.y0=r+i.width/2,r+=i.width;for(let i of e.targetLinks)i.y1=n+i.width/2,n+=i.width}}function aD(){let t=0,e=0,r=1,n=1,i=24,a=8,s,o=qCt,l=pw,u,h,f=UCt,d=HCt,p=6;function m(){let F={nodes:f.apply(null,arguments),links:d.apply(null,arguments)};return g(F),y(F),v(F),x(F),T(F),ZIe(F),F}m.update=function(F){return ZIe(F),F},m.nodeId=function(F){return arguments.length?(o=typeof F=="function"?F:vb(F),m):o},m.nodeAlign=function(F){return arguments.length?(l=typeof F=="function"?F:vb(F),m):l},m.nodeSort=function(F){return arguments.length?(u=F,m):u},m.nodeWidth=function(F){return arguments.length?(i=+F,m):i},m.nodePadding=function(F){return arguments.length?(a=s=+F,m):a},m.nodes=function(F){return arguments.length?(f=typeof F=="function"?F:vb(F),m):f},m.links=function(F){return arguments.length?(d=typeof F=="function"?F:vb(F),m):d},m.linkSort=function(F){return arguments.length?(h=F,m):h},m.size=function(F){return arguments.length?(t=e=0,r=+F[0],n=+F[1],m):[r-t,n-e]},m.extent=function(F){return arguments.length?(t=+F[0][0],r=+F[1][0],e=+F[0][1],n=+F[1][1],m):[[t,e],[r,n]]},m.iterations=function(F){return arguments.length?(p=+F,m):p};function g({nodes:F,links:M}){for(let[z,q]of F.entries())q.index=z,q.sourceLinks=[],q.targetLinks=[];let $=new Map(F.map((z,q)=>[o(z,q,F),z]));for(let[z,q]of M.entries()){q.index=z;let{source:V,target:U}=q;typeof V!="object"&&(V=q.source=KIe($,V)),typeof U!="object"&&(U=q.target=KIe($,U)),V.sourceLinks.push(q),U.targetLinks.push(q)}if(h!=null)for(let{sourceLinks:z,targetLinks:q}of F)z.sort(h),q.sort(h)}function y({nodes:F}){for(let M of F)M.value=M.fixedValue===void 0?Math.max(yb(M.sourceLinks,XX),yb(M.targetLinks,XX)):M.fixedValue}function v({nodes:F}){let M=F.length,$=new Set(F),z=new Set,q=0;for(;$.size;){for(let V of $){V.depth=q;for(let{target:U}of V.sourceLinks)z.add(U)}if(++q>M)throw new Error("circular link");$=z,z=new Set}}function x({nodes:F}){let M=F.length,$=new Set(F),z=new Set,q=0;for(;$.size;){for(let V of $){V.height=q;for(let{source:U}of V.targetLinks)z.add(U)}if(++q>M)throw new Error("circular link");$=z,z=new Set}}function k({nodes:F}){let M=dw(F,q=>q.depth)+1,$=(r-t-i)/(M-1),z=new Array(M);for(let q of F){let V=Math.max(0,Math.min(M-1,Math.floor(l.call(null,q,M))));q.layer=V,q.x0=t+V*$,q.x1=q.x0+i,z[V]?z[V].push(q):z[V]=[q]}if(u)for(let q of z)q.sort(u);return z}function _(F){let M=gb(F,$=>(n-e-($.length-1)*s)/yb($,XX));for(let $ of F){let z=e;for(let q of $){q.y0=z,q.y1=z+q.value*M,z=q.y1+s;for(let V of q.sourceLinks)V.width=V.value*M}z=(n-z+s)/($.length+1);for(let q=0;q<$.length;++q){let V=$[q];V.y0+=z*(q+1),V.y1+=z*(q+1)}C($)}}function T(F){let M=k(F);s=Math.min(a,(n-e)/(dw(M,$=>$.length)-1)),_(M);for(let $=0;$0))continue;let re=(J/se-U.y0)*M;U.y0+=re,U.y1+=re,O(U)}u===void 0&&V.sort(iD),A(V,$)}}function R(F,M,$){for(let z=F.length,q=z-2;q>=0;--q){let V=F[q];for(let U of V){let J=0,se=0;for(let{target:me,value:ge}of U.sourceLinks){let ye=ge*(me.layer-U.layer);J+=B(U,me)*ye,se+=ye}if(!(se>0))continue;let re=(J/se-U.y0)*M;U.y0+=re,U.y1+=re,O(U)}u===void 0&&V.sort(iD),A(V,$)}}function A(F,M){let $=F.length>>1,z=F[$];P(F,z.y0-s,$-1,M),I(F,z.y1+s,$+1,M),P(F,n,F.length-1,M),I(F,e,0,M)}function I(F,M,$,z){for(;$1e-6&&(q.y0+=V,q.y1+=V),M=q.y1+s}}function P(F,M,$,z){for(;$>=0;--$){let q=F[$],V=(q.y1-M)*z;V>1e-6&&(q.y0-=V,q.y1-=V),M=q.y0-s}}function O({sourceLinks:F,targetLinks:M}){if(h===void 0){for(let{source:{sourceLinks:$}}of M)$.sort(jIe);for(let{target:{targetLinks:$}}of F)$.sort(XIe)}}function C(F){if(h===void 0)for(let{sourceLinks:M,targetLinks:$}of F)M.sort(jIe),$.sort(XIe)}function N(F,M){let $=F.y0-(F.sourceLinks.length-1)*s/2;for(let{target:z,width:q}of F.sourceLinks){if(z===M)break;$+=q+s}for(let{source:z,width:q}of M.targetLinks){if(z===F)break;$-=q}return $}function B(F,M){let $=M.y0-(M.targetLinks.length-1)*s/2;for(let{source:z,width:q}of M.targetLinks){if(z===F)break;$+=q+s}for(let{target:z,width:q}of F.sourceLinks){if(z===M)break;$-=q}return $}return m}var QIe=D(()=>{UX();YX();YIe()});function ZX(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function JIe(){return new ZX}var jX,KX,kg,VCt,QX,eMe=D(()=>{jX=Math.PI,KX=2*jX,kg=1e-6,VCt=KX-kg;ZX.prototype=JIe.prototype={constructor:ZX,moveTo:function(t,e){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+e)},closePath:function(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(t,e){this._+="L"+(this._x1=+t)+","+(this._y1=+e)},quadraticCurveTo:function(t,e,r,n){this._+="Q"+ +t+","+ +e+","+(this._x1=+r)+","+(this._y1=+n)},bezierCurveTo:function(t,e,r,n,i,a){this._+="C"+ +t+","+ +e+","+ +r+","+ +n+","+(this._x1=+i)+","+(this._y1=+a)},arcTo:function(t,e,r,n,i){t=+t,e=+e,r=+r,n=+n,i=+i;var a=this._x1,s=this._y1,o=r-t,l=n-e,u=a-t,h=s-e,f=u*u+h*h;if(i<0)throw new Error("negative radius: "+i);if(this._x1===null)this._+="M"+(this._x1=t)+","+(this._y1=e);else if(f>kg)if(!(Math.abs(h*o-l*u)>kg)||!i)this._+="L"+(this._x1=t)+","+(this._y1=e);else{var d=r-a,p=n-s,m=o*o+l*l,g=d*d+p*p,y=Math.sqrt(m),v=Math.sqrt(f),x=i*Math.tan((jX-Math.acos((m+f-g)/(2*y*v)))/2),k=x/v,_=x/y;Math.abs(k-1)>kg&&(this._+="L"+(t+k*u)+","+(e+k*h)),this._+="A"+i+","+i+",0,0,"+ +(h*d>u*p)+","+(this._x1=t+_*o)+","+(this._y1=e+_*l)}},arc:function(t,e,r,n,i,a){t=+t,e=+e,r=+r,a=!!a;var s=r*Math.cos(n),o=r*Math.sin(n),l=t+s,u=e+o,h=1^a,f=a?n-i:i-n;if(r<0)throw new Error("negative radius: "+r);this._x1===null?this._+="M"+l+","+u:(Math.abs(this._x1-l)>kg||Math.abs(this._y1-u)>kg)&&(this._+="L"+l+","+u),r&&(f<0&&(f=f%KX+KX),f>VCt?this._+="A"+r+","+r+",0,1,"+h+","+(t-s)+","+(e-o)+"A"+r+","+r+",0,1,"+h+","+(this._x1=l)+","+(this._y1=u):f>kg&&(this._+="A"+r+","+r+",0,"+ +(f>=jX)+","+h+","+(this._x1=t+r*Math.cos(i))+","+(this._y1=e+r*Math.sin(i))))},rect:function(t,e,r,n){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+e)+"h"+ +r+"v"+ +n+"h"+-r+"Z"},toString:function(){return this._}};QX=JIe});var tMe=D(()=>{eMe()});function JX(t){return function(){return t}}var rMe=D(()=>{});function nMe(t){return t[0]}function iMe(t){return t[1]}var aMe=D(()=>{});var sMe,oMe=D(()=>{sMe=Array.prototype.slice});function WCt(t){return t.source}function YCt(t){return t.target}function XCt(t){var e=WCt,r=YCt,n=nMe,i=iMe,a=null;function s(){var o,l=sMe.call(arguments),u=e.apply(this,l),h=r.apply(this,l);if(a||(a=o=QX()),t(a,+n.apply(this,(l[0]=u,l)),+i.apply(this,l),+n.apply(this,(l[0]=h,l)),+i.apply(this,l)),o)return a=null,o+""||null}return s.source=function(o){return arguments.length?(e=o,s):e},s.target=function(o){return arguments.length?(r=o,s):r},s.x=function(o){return arguments.length?(n=typeof o=="function"?o:JX(+o),s):n},s.y=function(o){return arguments.length?(i=typeof o=="function"?o:JX(+o),s):i},s.context=function(o){return arguments.length?(a=o??null,s):a},s}function jCt(t,e,r,n,i){t.moveTo(e,r),t.bezierCurveTo(e=(e+n)/2,r,e,i,n,i)}function ej(){return XCt(jCt)}var lMe=D(()=>{tMe();oMe();rMe();aMe()});var uMe=D(()=>{lMe()});function KCt(t){return[t.source.x1,t.y0]}function ZCt(t){return[t.target.x0,t.y1]}function tj(){return ej().source(KCt).target(ZCt)}var cMe=D(()=>{uMe()});var hMe=D(()=>{QIe();YX();cMe()});var dMe={};Mr(dMe,{diagram:()=>p_t});var rj,sD,lD,uD,oD,QCt,xb,JCt,e_t,bb,t_t,r_t,n_t,i_t,a_t,s_t,Af,fMe,o_t,l_t,u_t,c_t,h_t,f_t,d_t,p_t,pMe=D(()=>{Nr();Or();hMe();rj=(function(){var t=b(function(o,l,u,h){for(u=u||{},h=o.length;h--;u[o[h]]=l);return u},"o"),e=[1,9],r=[1,10],n=[1,5,10,12],i={trace:b(function(){},"trace"),yy:{},symbols_:{error:2,start:3,SANKEY:4,NEWLINE:5,csv:6,opt_eof:7,record:8,csv_tail:9,EOF:10,"field[source]":11,COMMA:12,"field[target]":13,"field[value]":14,field:15,escaped:16,non_escaped:17,DQUOTE:18,ESCAPED_TEXT:19,NON_ESCAPED_TEXT:20,$accept:0,$end:1},terminals_:{2:"error",4:"SANKEY",5:"NEWLINE",10:"EOF",11:"field[source]",12:"COMMA",13:"field[target]",14:"field[value]",18:"DQUOTE",19:"ESCAPED_TEXT",20:"NON_ESCAPED_TEXT"},productions_:[0,[3,4],[6,2],[9,2],[9,0],[7,1],[7,0],[8,5],[15,1],[15,1],[16,3],[17,1]],performAction:b(function(l,u,h,f,d,p,m){var g=p.length-1;switch(d){case 7:let y=f.findOrCreateNode(p[g-4].trim().replaceAll('""','"')),v=f.findOrCreateNode(p[g-2].trim().replaceAll('""','"')),x=parseFloat(p[g].trim());f.addLink(y,v,x);break;case 8:case 9:case 11:this.$=p[g];break;case 10:this.$=p[g-1];break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},{5:[1,3]},{6:4,8:5,15:6,16:7,17:8,18:e,20:r},{1:[2,6],7:11,10:[1,12]},t(r,[2,4],{9:13,5:[1,14]}),{12:[1,15]},t(n,[2,8]),t(n,[2,9]),{19:[1,16]},t(n,[2,11]),{1:[2,1]},{1:[2,5]},t(r,[2,2]),{6:17,8:5,15:6,16:7,17:8,18:e,20:r},{15:18,16:7,17:8,18:e,20:r},{18:[1,19]},t(r,[2,3]),{12:[1,20]},t(n,[2,10]),{15:21,16:7,17:8,18:e,20:r},t([1,5,10],[2,7])],defaultActions:{11:[2,1],12:[2,5]},parseError:b(function(l,u){if(u.recoverable)this.trace(l);else{var h=new Error(l);throw h.hash=u,h}},"parseError"),parse:b(function(l){var u=this,h=[0],f=[],d=[null],p=[],m=this.table,g="",y=0,v=0,x=0,k=2,_=1,T=p.slice.call(arguments,1),S=Object.create(this.lexer),R={yy:{}};for(var A in this.yy)Object.prototype.hasOwnProperty.call(this.yy,A)&&(R.yy[A]=this.yy[A]);S.setInput(l,R.yy),R.yy.lexer=S,R.yy.parser=this,typeof S.yylloc>"u"&&(S.yylloc={});var I=S.yylloc;p.push(I);var P=S.options&&S.options.ranges;typeof R.yy.parseError=="function"?this.parseError=R.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function O(me){h.length=h.length-2*me,d.length=d.length-me,p.length=p.length-me}b(O,"popStack");function C(){var me;return me=f.pop()||S.lex()||_,typeof me!="number"&&(me instanceof Array&&(f=me,me=f.pop()),me=u.symbols_[me]||me),me}b(C,"lex");for(var N,B,F,M,$,z,q={},V,U,J,se;;){if(F=h[h.length-1],this.defaultActions[F]?M=this.defaultActions[F]:((N===null||typeof N>"u")&&(N=C()),M=m[F]&&m[F][N]),typeof M>"u"||!M.length||!M[0]){var re="";se=[];for(V in m[F])this.terminals_[V]&&V>k&&se.push("'"+this.terminals_[V]+"'");S.showPosition?re="Parse error on line "+(y+1)+`: +`+S.showPosition()+` +Expecting `+se.join(", ")+", got '"+(this.terminals_[N]||N)+"'":re="Parse error on line "+(y+1)+": Unexpected "+(N==_?"end of input":"'"+(this.terminals_[N]||N)+"'"),this.parseError(re,{text:S.match,token:this.terminals_[N]||N,line:S.yylineno,loc:I,expected:se})}if(M[0]instanceof Array&&M.length>1)throw new Error("Parse Error: multiple actions possible at state: "+F+", token: "+N);switch(M[0]){case 1:h.push(N),d.push(S.yytext),p.push(S.yylloc),h.push(M[1]),N=null,B?(N=B,B=null):(v=S.yyleng,g=S.yytext,y=S.yylineno,I=S.yylloc,x>0&&x--);break;case 2:if(U=this.productions_[M[1]][1],q.$=d[d.length-U],q._$={first_line:p[p.length-(U||1)].first_line,last_line:p[p.length-1].last_line,first_column:p[p.length-(U||1)].first_column,last_column:p[p.length-1].last_column},P&&(q._$.range=[p[p.length-(U||1)].range[0],p[p.length-1].range[1]]),z=this.performAction.apply(q,[g,v,y,R.yy,M[1],d,p].concat(T)),typeof z<"u")return z;U&&(h=h.slice(0,-1*U*2),d=d.slice(0,-1*U),p=p.slice(0,-1*U)),h.push(this.productions_[M[1]][0]),d.push(q.$),p.push(q._$),J=m[h[h.length-2]][h[h.length-1]],h.push(J);break;case 3:return!0}}return!0},"parse")},a=(function(){var o={EOF:1,parseError:b(function(u,h){if(this.yy.parser)this.yy.parser.parseError(u,h);else throw new Error(u)},"parseError"),setInput:b(function(l,u){return this.yy=u||this.yy||{},this._input=l,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:b(function(){var l=this._input[0];this.yytext+=l,this.yyleng++,this.offset++,this.match+=l,this.matched+=l;var u=l.match(/(?:\r\n?|\n).*/g);return u?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),l},"input"),unput:b(function(l){var u=l.length,h=l.split(/(?:\r\n?|\n)/g);this._input=l+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-u),this.offset-=u;var f=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),h.length-1&&(this.yylineno-=h.length-1);var d=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:h?(h.length===f.length?this.yylloc.first_column:0)+f[f.length-h.length].length-h[0].length:this.yylloc.first_column-u},this.options.ranges&&(this.yylloc.range=[d[0],d[0]+this.yyleng-u]),this.yyleng=this.yytext.length,this},"unput"),more:b(function(){return this._more=!0,this},"more"),reject:b(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). +`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:b(function(l){this.unput(this.match.slice(l))},"less"),pastInput:b(function(){var l=this.matched.substr(0,this.matched.length-this.match.length);return(l.length>20?"...":"")+l.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:b(function(){var l=this.match;return l.length<20&&(l+=this._input.substr(0,20-l.length)),(l.substr(0,20)+(l.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:b(function(){var l=this.pastInput(),u=new Array(l.length+1).join("-");return l+this.upcomingInput()+` +`+u+"^"},"showPosition"),test_match:b(function(l,u){var h,f,d;if(this.options.backtrack_lexer&&(d={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(d.yylloc.range=this.yylloc.range.slice(0))),f=l[0].match(/(?:\r\n?|\n).*/g),f&&(this.yylineno+=f.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:f?f[f.length-1].length-f[f.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+l[0].length},this.yytext+=l[0],this.match+=l[0],this.matches=l,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(l[0].length),this.matched+=l[0],h=this.performAction.call(this,this.yy,this,u,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),h)return h;if(this._backtrack){for(var p in d)this[p]=d[p];return!1}return!1},"test_match"),next:b(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var l,u,h,f;this._more||(this.yytext="",this.match="");for(var d=this._currentRules(),p=0;pu[0].length)){if(u=h,f=p,this.options.backtrack_lexer){if(l=this.test_match(h,d[p]),l!==!1)return l;if(this._backtrack){u=!1;continue}else return!1}else if(!this.options.flex)break}return u?(l=this.test_match(u,d[f]),l!==!1?l:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. +`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:b(function(){var u=this.next();return u||this.lex()},"lex"),begin:b(function(u){this.conditionStack.push(u)},"begin"),popState:b(function(){var u=this.conditionStack.length-1;return u>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:b(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:b(function(u){return u=this.conditionStack.length-1-Math.abs(u||0),u>=0?this.conditionStack[u]:"INITIAL"},"topState"),pushState:b(function(u){this.begin(u)},"pushState"),stateStackSize:b(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:b(function(u,h,f,d){var p=d;switch(f){case 0:return this.pushState("csv"),4;break;case 1:return 10;case 2:return 5;case 3:return 12;case 4:return this.pushState("escaped_text"),18;break;case 5:return 20;case 6:return this.popState("escaped_text"),18;break;case 7:return 19}},"anonymous"),rules:[/^(?:sankey-beta\b)/i,/^(?:$)/i,/^(?:((\u000D\u000A)|(\u000A)))/i,/^(?:(\u002C))/i,/^(?:(\u0022))/i,/^(?:([\u0020-\u0021\u0023-\u002B\u002D-\u007E])*)/i,/^(?:(\u0022)(?!(\u0022)))/i,/^(?:(([\u0020-\u0021\u0023-\u002B\u002D-\u007E])|(\u002C)|(\u000D)|(\u000A)|(\u0022)(\u0022))*)/i],conditions:{csv:{rules:[1,2,3,4,5,6,7],inclusive:!1},escaped_text:{rules:[6,7],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7],inclusive:!0}}};return o})();i.lexer=a;function s(){this.yy={}}return b(s,"Parser"),s.prototype=i,i.Parser=s,new s})();rj.parser=rj;sD=rj,lD=[],uD=[],oD=new Map,QCt=b(()=>{lD=[],uD=[],oD=new Map,Jr()},"clear"),JCt=(xb=class{constructor(e,r,n=0){this.source=e,this.target=r,this.value=n}},b(xb,"SankeyLink"),xb),e_t=b((t,e,r)=>{lD.push(new JCt(t,e,r))},"addLink"),t_t=(bb=class{constructor(e){this.ID=e}},b(bb,"SankeyNode"),bb),r_t=b(t=>{t=St.sanitizeText(t,Fe());let e=oD.get(t);return e===void 0&&(e=new t_t(t),oD.set(t,e),uD.push(e)),e},"findOrCreateNode"),n_t=b(()=>uD,"getNodes"),i_t=b(()=>lD,"getLinks"),a_t=b(()=>({nodes:uD.map(t=>({id:t.ID})),links:lD.map(t=>({source:t.source.ID,target:t.target.ID,value:t.value}))}),"getGraph"),s_t={nodesMap:oD,getConfig:b(()=>Fe().sankey,"getConfig"),getNodes:n_t,getLinks:i_t,getGraph:a_t,addLink:e_t,findOrCreateNode:r_t,getAccTitle:tn,setAccTitle:en,getAccDescription:nn,setAccDescription:rn,getDiagramTitle:an,setDiagramTitle:pn,clear:QCt},fMe=(Af=class{static next(e){return new Af(e+ ++Af.count)}constructor(e){this.id=e,this.href=`#${e}`}toString(){return"url("+this.href+")"}},b(Af,"Uid"),Af.count=0,Af),o_t={left:HX,right:VX,center:WX,justify:pw},l_t=b(function(t,e,r,n){let{securityLevel:i,sankey:a}=Fe(),s=dT.sankey,o;i==="sandbox"&&(o=dt("#i"+e));let l=i==="sandbox"?dt(o.nodes()[0].contentDocument.body):dt("body"),u=i==="sandbox"?l.select(`[id="${e}"]`):dt(`[id="${e}"]`),h=a?.width??s.width,f=a?.height??s.width,d=a?.useMaxWidth??s.useMaxWidth,p=a?.nodeAlignment??s.nodeAlignment,m=a?.prefix??s.prefix,g=a?.suffix??s.suffix,y=a?.showValues??s.showValues,v=n.db.getGraph(),x=o_t[p];aD().nodeId(P=>P.id).nodeWidth(10).nodePadding(10+(y?15:0)).nodeAlign(x).extent([[0,0],[h,f]])(v);let T=Mh(sB);u.append("g").attr("class","nodes").selectAll(".node").data(v.nodes).join("g").attr("class","node").attr("id",P=>(P.uid=fMe.next("node-")).id).attr("transform",function(P){return"translate("+P.x0+","+P.y0+")"}).attr("x",P=>P.x0).attr("y",P=>P.y0).append("rect").attr("height",P=>P.y1-P.y0).attr("width",P=>P.x1-P.x0).attr("fill",P=>T(P.id));let S=b(({id:P,value:O})=>y?`${P} +${m}${Math.round(O*100)/100}${g}`:P,"getText");u.append("g").attr("class","node-labels").attr("font-size",14).selectAll("text").data(v.nodes).join("text").attr("x",P=>P.x0(P.y1+P.y0)/2).attr("dy",`${y?"0":"0.35"}em`).attr("text-anchor",P=>P.x0(O.uid=fMe.next("linearGradient-")).id).attr("gradientUnits","userSpaceOnUse").attr("x1",O=>O.source.x1).attr("x2",O=>O.target.x0);P.append("stop").attr("offset","0%").attr("stop-color",O=>T(O.source.id)),P.append("stop").attr("offset","100%").attr("stop-color",O=>T(O.target.id))}let I;switch(A){case"gradient":I=b(P=>P.uid,"coloring");break;case"source":I=b(P=>T(P.source.id),"coloring");break;case"target":I=b(P=>T(P.target.id),"coloring");break;default:I=A}R.append("path").attr("d",tj()).attr("stroke",I).attr("stroke-width",P=>Math.max(1,P.width)),Uu(void 0,u,0,d)},"draw"),u_t={draw:l_t},c_t=b(t=>t.replaceAll(/^[^\S\n\r]+|[^\S\n\r]+$/g,"").replaceAll(/([\n\r])+/g,` +`).trim(),"prepareTextForParsing"),h_t=b(t=>`.label { font-family: ${t.fontFamily}; - }`,"getStyles"),OCt=MCt,PCt=SL.parse.bind(SL);SL.parse=t=>PCt(NCt(t));BCt={styles:OCt,parser:SL,db:LCt,renderer:DCt}});var VLe={};lr(VLe,{diagram:()=>QCt});var qLe,HW,FCt,zCt,$Ct,GCt,UCt,lb,qCt,VCt,HCt,WCt,YCt,XCt,jCt,KCt,ZCt,QCt,HLe=A(()=>{pv();ln();mc();ur();Um();qLe={packet:[]},HW=structuredClone(qLe),FCt=or.packet,zCt=x(()=>{let t=mi({...FCt,...wr().packet});return t.showBits&&(t.paddingY+=10),t},"getConfig"),$Ct=x(()=>HW.packet,"getPacket"),GCt=x(t=>{t.length>0&&HW.packet.push(t)},"pushWord"),UCt=x(()=>{Cr(),HW=structuredClone(qLe)},"clear"),lb={pushWord:GCt,getPacket:$Ct,getConfig:zCt,clear:UCt,setAccTitle:Sr,getAccTitle:_r,setDiagramTitle:Fr,getDiagramTitle:Rr,getAccDescription:Lr,setAccDescription:Ar},qCt=1e4,VCt=x(t=>{uu(t,lb);let e=-1,r=[],n=1,{bitsPerRow:a}=lb.getConfig();for(let{start:i,end:s,label:o}of t.blocks){if(s&&s{if(t.end===void 0&&(t.end=t.start),t.start>t.end)throw new Error(`Block start ${t.start} is greater than block end ${t.end}.`);return t.end+1<=e*r?[t,void 0]:[{start:t.start,end:e*r-1,label:t.label},{start:e*r,end:t.end,label:t.label}]},"getNextFittingBlock"),WCt={parse:x(async t=>{let e=await jo("packet",t);te.debug(e),VCt(e)},"parse")},YCt=x((t,e,r,n)=>{let a=n.db,i=a.getConfig(),{rowHeight:s,paddingY:o,bitWidth:l,bitsPerRow:u}=i,h=a.getPacket(),f=a.getDiagramTitle(),d=s+o,p=d*(h.length+1)-(f?0:s),m=l*u+2,g=yi(e);g.attr("viewbox",`0 0 ${m} ${p}`),gn(g,p,m,i.useMaxWidth);for(let[v,y]of h.entries())XCt(g,y,v,i);g.append("text").text(f).attr("x",m/2).attr("y",p-d/2).attr("dominant-baseline","middle").attr("text-anchor","middle").attr("class","packetTitle")},"draw"),XCt=x((t,e,r,{rowHeight:n,paddingX:a,paddingY:i,bitWidth:s,bitsPerRow:o,showBits:l})=>{let u=t.append("g"),h=r*(n+i)+i;for(let f of e){let d=f.start%o*s+1,p=(f.end-f.start+1)*s-a;if(u.append("rect").attr("x",d).attr("y",h).attr("width",p).attr("height",n).attr("class","packetBlock"),u.append("text").attr("x",d+p/2).attr("y",h+n/2).attr("class","packetLabel").attr("dominant-baseline","middle").attr("text-anchor","middle").text(f.label),!l)continue;let m=f.end===f.start,g=h-2;u.append("text").attr("x",d+(m?p/2:0)).attr("y",g).attr("class","packetByte start").attr("dominant-baseline","auto").attr("text-anchor",m?"middle":"start").text(f.start),m||u.append("text").attr("x",d+p).attr("y",g).attr("class","packetByte end").attr("dominant-baseline","auto").attr("text-anchor","end").text(f.end)}},"drawWord"),jCt={draw:YCt},KCt={byteFontSize:"10px",startByteColor:"black",endByteColor:"black",labelColor:"black",labelFontSize:"12px",titleColor:"black",titleFontSize:"14px",blockStrokeColor:"black",blockStrokeWidth:"1",blockFillColor:"#efefef"},ZCt=x(({packet:t}={})=>{let e=mi(KCt,t);return` + }`,"getStyles"),f_t=h_t,d_t=sD.parse.bind(sD);sD.parse=t=>d_t(c_t(t));p_t={styles:f_t,parser:sD,db:s_t,renderer:u_t}});var gMe={};Mr(gMe,{diagram:()=>L_t});var mMe,nj,m_t,g_t,y_t,v_t,x_t,wb,b_t,w_t,k_t,T_t,E_t,S_t,C_t,__t,A_t,L_t,yMe=D(()=>{_y();Hn();v0();Nr();Zm();mMe={packet:[]},nj=structuredClone(mMe),m_t=Ir.packet,g_t=b(()=>{let t=ls({...m_t,...Yr().packet});return t.showBits&&(t.paddingY+=10),t},"getConfig"),y_t=b(()=>nj.packet,"getPacket"),v_t=b(t=>{t.length>0&&nj.packet.push(t)},"pushWord"),x_t=b(()=>{Jr(),nj=structuredClone(mMe)},"clear"),wb={pushWord:v_t,getPacket:y_t,getConfig:g_t,clear:x_t,setAccTitle:en,getAccTitle:tn,setDiagramTitle:pn,getDiagramTitle:an,getAccDescription:nn,setAccDescription:rn},b_t=1e4,w_t=b(t=>{lc(t,wb);let e=-1,r=[],n=1,{bitsPerRow:i}=wb.getConfig();for(let{start:a,end:s,label:o}of t.blocks){if(s&&s{if(t.end===void 0&&(t.end=t.start),t.start>t.end)throw new Error(`Block start ${t.start} is greater than block end ${t.end}.`);return t.end+1<=e*r?[t,void 0]:[{start:t.start,end:e*r-1,label:t.label},{start:e*r,end:t.end,label:t.label}]},"getNextFittingBlock"),T_t={parse:b(async t=>{let e=await Ul("packet",t);he.debug(e),w_t(e)},"parse")},E_t=b((t,e,r,n)=>{let i=n.db,a=i.getConfig(),{rowHeight:s,paddingY:o,bitWidth:l,bitsPerRow:u}=a,h=i.getPacket(),f=i.getDiagramTitle(),d=s+o,p=d*(h.length+1)-(f?0:s),m=l*u+2,g=cs(e);g.attr("viewbox",`0 0 ${m} ${p}`),ei(g,p,m,a.useMaxWidth);for(let[y,v]of h.entries())S_t(g,v,y,a);g.append("text").text(f).attr("x",m/2).attr("y",p-d/2).attr("dominant-baseline","middle").attr("text-anchor","middle").attr("class","packetTitle")},"draw"),S_t=b((t,e,r,{rowHeight:n,paddingX:i,paddingY:a,bitWidth:s,bitsPerRow:o,showBits:l})=>{let u=t.append("g"),h=r*(n+a)+a;for(let f of e){let d=f.start%o*s+1,p=(f.end-f.start+1)*s-i;if(u.append("rect").attr("x",d).attr("y",h).attr("width",p).attr("height",n).attr("class","packetBlock"),u.append("text").attr("x",d+p/2).attr("y",h+n/2).attr("class","packetLabel").attr("dominant-baseline","middle").attr("text-anchor","middle").text(f.label),!l)continue;let m=f.end===f.start,g=h-2;u.append("text").attr("x",d+(m?p/2:0)).attr("y",g).attr("class","packetByte start").attr("dominant-baseline","auto").attr("text-anchor",m?"middle":"start").text(f.start),m||u.append("text").attr("x",d+p).attr("y",g).attr("class","packetByte end").attr("dominant-baseline","auto").attr("text-anchor","end").text(f.end)}},"drawWord"),C_t={draw:E_t},__t={byteFontSize:"10px",startByteColor:"black",endByteColor:"black",labelColor:"black",labelFontSize:"12px",titleColor:"black",titleFontSize:"14px",blockStrokeColor:"black",blockStrokeWidth:"1",blockFillColor:"#efefef"},A_t=b(({packet:t}={})=>{let e=ls(__t,t);return` .packetByte { font-size: ${e.byteFontSize}; } @@ -2470,20 +2726,20 @@ ${m}${Math.round(D*100)/100}${g}`:M,"getText");u.append("g").attr("class","node- stroke-width: ${e.blockStrokeWidth}; fill: ${e.blockFillColor}; } - `},"styles"),QCt={parser:WCt,db:lb,renderer:jCt,styles:ZCt}});var QLe={};lr(QLe,{diagram:()=>ySt});function XLe(t,e,r,n,a,i,s){let o=e.length,l=Math.min(s.width,s.height)/2;r.forEach((u,h)=>{if(u.entries.length!==o)return;let f=u.entries.map((d,p)=>{let m=2*Math.PI*p/o-Math.PI/2,g=jLe(d,n,a,l),v=g*Math.cos(m),y=g*Math.sin(m);return{x:v,y}});i==="circle"?t.append("path").attr("d",KLe(f,s.curveTension)).attr("class",`radarCurve-${h}`):i==="polygon"&&t.append("polygon").attr("points",f.map(d=>`${d.x},${d.y}`).join(" ")).attr("class",`radarCurve-${h}`)})}function jLe(t,e,r,n){let a=Math.min(Math.max(t,e),r);return n*(a-e)/(r-e)}function KLe(t,e){let r=t.length,n=`M${t[0].x},${t[0].y}`;for(let a=0;a{let u=t.append("g").attr("transform",`translate(${a}, ${i+l*s})`);u.append("rect").attr("width",12).attr("height",12).attr("class",`radarLegendBox-${l}`),u.append("text").attr("x",16).attr("y",0).attr("class","radarLegendText").text(o.label)})}var ub,WLe,pg,JCt,eSt,YLe,tSt,rSt,nSt,aSt,iSt,sSt,oSt,Q6,lSt,uSt,cSt,hSt,fSt,dSt,pSt,mSt,gSt,vSt,ySt,JLe=A(()=>{pv();ln();mc();ur();Um();ub={showLegend:!0,ticks:5,max:null,min:0,graticule:"circle"},WLe={axes:[],curves:[],options:ub},pg=structuredClone(WLe),JCt=or.radar,eSt=x(()=>mi({...JCt,...wr().radar}),"getConfig"),YLe=x(()=>pg.axes,"getAxes"),tSt=x(()=>pg.curves,"getCurves"),rSt=x(()=>pg.options,"getOptions"),nSt=x(t=>{pg.axes=t.map(e=>({name:e.name,label:e.label??e.name}))},"setAxes"),aSt=x(t=>{pg.curves=t.map(e=>({name:e.name,label:e.label??e.name,entries:iSt(e.entries)}))},"setCurves"),iSt=x(t=>{if(t[0].axis==null)return t.map(r=>r.value);let e=YLe();if(e.length===0)throw new Error("Axes must be populated before curves for reference entries");return e.map(r=>{let n=t.find(a=>a.axis?.$refText===r.name);if(n===void 0)throw new Error("Missing entry for axis "+r.label);return n.value})},"computeCurveEntries"),sSt=x(t=>{let e=t.reduce((r,n)=>(r[n.name]=n,r),{});pg.options={showLegend:e.showLegend?.value??ub.showLegend,ticks:e.ticks?.value??ub.ticks,max:e.max?.value??ub.max,min:e.min?.value??ub.min,graticule:e.graticule?.value??ub.graticule}},"setOptions"),oSt=x(()=>{Cr(),pg=structuredClone(WLe)},"clear"),Q6={getAxes:YLe,getCurves:tSt,getOptions:rSt,setAxes:nSt,setCurves:aSt,setOptions:sSt,getConfig:eSt,clear:oSt,setAccTitle:Sr,getAccTitle:_r,setDiagramTitle:Fr,getDiagramTitle:Rr,getAccDescription:Lr,setAccDescription:Ar},lSt=x(t=>{uu(t,Q6);let{axes:e,curves:r,options:n}=t;Q6.setAxes(e),Q6.setCurves(r),Q6.setOptions(n)},"populate"),uSt={parse:x(async t=>{let e=await jo("radar",t);te.debug(e),lSt(e)},"parse")},cSt=x((t,e,r,n)=>{let a=n.db,i=a.getAxes(),s=a.getCurves(),o=a.getOptions(),l=a.getConfig(),u=a.getDiagramTitle(),h=yi(e),f=hSt(h,l),d=o.max??Math.max(...s.map(g=>Math.max(...g.entries))),p=o.min,m=Math.min(l.width,l.height)/2;fSt(f,i,m,o.ticks,o.graticule),dSt(f,i,m,l),XLe(f,i,s,p,d,o.graticule,l),ZLe(f,s,o.showLegend,l),f.append("text").attr("class","radarTitle").text(u).attr("x",0).attr("y",-l.height/2-l.marginTop)},"draw"),hSt=x((t,e)=>{let r=e.width+e.marginLeft+e.marginRight,n=e.height+e.marginTop+e.marginBottom,a={x:e.marginLeft+e.width/2,y:e.marginTop+e.height/2};return t.attr("viewbox",`0 0 ${r} ${n}`).attr("width",r).attr("height",n),t.append("g").attr("transform",`translate(${a.x}, ${a.y})`)},"drawFrame"),fSt=x((t,e,r,n,a)=>{if(a==="circle")for(let i=0;i{let f=2*h*Math.PI/i-Math.PI/2,d=o*Math.cos(f),p=o*Math.sin(f);return`${d},${p}`}).join(" ");t.append("polygon").attr("points",l).attr("class","radarGraticule")}}},"drawGraticule"),dSt=x((t,e,r,n)=>{let a=e.length;for(let i=0;i{let r="";for(let n=0;nj_t});function bMe(t,e,r,n,i,a,s){let o=e.length,l=Math.min(s.width,s.height)/2;r.forEach((u,h)=>{if(u.entries.length!==o)return;let f=u.entries.map((d,p)=>{let m=2*Math.PI*p/o-Math.PI/2,g=wMe(d,n,i,l),y=g*Math.cos(m),v=g*Math.sin(m);return{x:y,y:v}});a==="circle"?t.append("path").attr("d",kMe(f,s.curveTension)).attr("class",`radarCurve-${h}`):a==="polygon"&&t.append("polygon").attr("points",f.map(d=>`${d.x},${d.y}`).join(" ")).attr("class",`radarCurve-${h}`)})}function wMe(t,e,r,n){let i=Math.min(Math.max(t,e),r);return n*(i-e)/(r-e)}function kMe(t,e){let r=t.length,n=`M${t[0].x},${t[0].y}`;for(let i=0;i{let u=t.append("g").attr("transform",`translate(${i}, ${a+l*s})`);u.append("rect").attr("width",12).attr("height",12).attr("class",`radarLegendBox-${l}`),u.append("text").attr("x",16).attr("y",0).attr("class","radarLegendText").text(o.label)})}var kb,vMe,Tg,R_t,D_t,xMe,I_t,M_t,N_t,O_t,P_t,B_t,F_t,mw,z_t,$_t,G_t,q_t,U_t,H_t,V_t,W_t,Y_t,X_t,j_t,SMe=D(()=>{_y();Hn();v0();Nr();Zm();kb={showLegend:!0,ticks:5,max:null,min:0,graticule:"circle"},vMe={axes:[],curves:[],options:kb},Tg=structuredClone(vMe),R_t=Ir.radar,D_t=b(()=>ls({...R_t,...Yr().radar}),"getConfig"),xMe=b(()=>Tg.axes,"getAxes"),I_t=b(()=>Tg.curves,"getCurves"),M_t=b(()=>Tg.options,"getOptions"),N_t=b(t=>{Tg.axes=t.map(e=>({name:e.name,label:e.label??e.name}))},"setAxes"),O_t=b(t=>{Tg.curves=t.map(e=>({name:e.name,label:e.label??e.name,entries:P_t(e.entries)}))},"setCurves"),P_t=b(t=>{if(t[0].axis==null)return t.map(r=>r.value);let e=xMe();if(e.length===0)throw new Error("Axes must be populated before curves for reference entries");return e.map(r=>{let n=t.find(i=>i.axis?.$refText===r.name);if(n===void 0)throw new Error("Missing entry for axis "+r.label);return n.value})},"computeCurveEntries"),B_t=b(t=>{let e=t.reduce((r,n)=>(r[n.name]=n,r),{});Tg.options={showLegend:e.showLegend?.value??kb.showLegend,ticks:e.ticks?.value??kb.ticks,max:e.max?.value??kb.max,min:e.min?.value??kb.min,graticule:e.graticule?.value??kb.graticule}},"setOptions"),F_t=b(()=>{Jr(),Tg=structuredClone(vMe)},"clear"),mw={getAxes:xMe,getCurves:I_t,getOptions:M_t,setAxes:N_t,setCurves:O_t,setOptions:B_t,getConfig:D_t,clear:F_t,setAccTitle:en,getAccTitle:tn,setDiagramTitle:pn,getDiagramTitle:an,getAccDescription:nn,setAccDescription:rn},z_t=b(t=>{lc(t,mw);let{axes:e,curves:r,options:n}=t;mw.setAxes(e),mw.setCurves(r),mw.setOptions(n)},"populate"),$_t={parse:b(async t=>{let e=await Ul("radar",t);he.debug(e),z_t(e)},"parse")},G_t=b((t,e,r,n)=>{let i=n.db,a=i.getAxes(),s=i.getCurves(),o=i.getOptions(),l=i.getConfig(),u=i.getDiagramTitle(),h=cs(e),f=q_t(h,l),d=o.max??Math.max(...s.map(g=>Math.max(...g.entries))),p=o.min,m=Math.min(l.width,l.height)/2;U_t(f,a,m,o.ticks,o.graticule),H_t(f,a,m,l),bMe(f,a,s,p,d,o.graticule,l),TMe(f,s,o.showLegend,l),f.append("text").attr("class","radarTitle").text(u).attr("x",0).attr("y",-l.height/2-l.marginTop)},"draw"),q_t=b((t,e)=>{let r=e.width+e.marginLeft+e.marginRight,n=e.height+e.marginTop+e.marginBottom,i={x:e.marginLeft+e.width/2,y:e.marginTop+e.height/2};return t.attr("viewbox",`0 0 ${r} ${n}`).attr("width",r).attr("height",n),t.append("g").attr("transform",`translate(${i.x}, ${i.y})`)},"drawFrame"),U_t=b((t,e,r,n,i)=>{if(i==="circle")for(let a=0;a{let f=2*h*Math.PI/a-Math.PI/2,d=o*Math.cos(f),p=o*Math.sin(f);return`${d},${p}`}).join(" ");t.append("polygon").attr("points",l).attr("class","radarGraticule")}}},"drawGraticule"),H_t=b((t,e,r,n)=>{let i=e.length;for(let a=0;a{let r="";for(let n=0;n{let e=pp(),r=wr(),n=mi(e,r.themeVariables),a=mi(n.radar,t);return{themeVariables:n,radarOptions:a}},"buildRadarStyleOptions"),vSt=x(({radar:t}={})=>{let{themeVariables:e,radarOptions:r}=gSt(t);return` + `}return r},"genIndexStyles"),Y_t=b(t=>{let e=T1(),r=Yr(),n=ls(e,r.themeVariables),i=ls(n.radar,t);return{themeVariables:n,radarOptions:i}},"buildRadarStyleOptions"),X_t=b(({radar:t}={})=>{let{themeVariables:e,radarOptions:r}=Y_t(t);return` .radarTitle { font-size: ${e.fontSize}; color: ${e.titleColor}; @@ -2511,13 +2767,13 @@ ${m}${Math.round(D*100)/100}${g}`:M,"getText");u.append("g").attr("class","node- font-size: ${r.legendFontSize}px; dominant-baseline: hanging; } - ${mSt(e,r)} - `},"styles"),ySt={parser:uSt,db:Q6,renderer:pSt,styles:vSt}});var LRe={};lr(LRe,{diagram:()=>q_t});function hRe(t){switch(te.debug("typeStr2Type",t),t){case"[]":return"square";case"()":return te.debug("we have a round"),"round";case"(())":return"circle";case">]":return"rect_left_inv_arrow";case"{}":return"diamond";case"{{}}":return"hexagon";case"([])":return"stadium";case"[[]]":return"subroutine";case"[()]":return"cylinder";case"((()))":return"doublecircle";case"[//]":return"lean_right";case"[\\\\]":return"lean_left";case"[/\\]":return"trapezoid";case"[\\/]":return"inv_trapezoid";case"<[]>":return"block_arrow";default:return"na"}}function fRe(t){switch(te.debug("typeStr2Type",t),t){case"==":return"thick";default:return"normal"}}function dRe(t){switch(t.trim()){case"--x":return"arrow_cross";case"--o":return"arrow_circle";default:return"arrow_point"}}function pRe(t,e){if(t===0||!Number.isInteger(t))throw new Error("Columns must be an integer !== 0.");if(e<0||!Number.isInteger(e))throw new Error("Position must be a non-negative integer."+e);if(t<0)return{px:e,py:0};if(t===1)return{px:0,py:e};let r=e%t,n=Math.floor(e/t);return{px:r,py:n}}function NL(t,e,r=0,n=0){te.debug("setBlockSizes abc95 (start)",t.id,t?.size?.x,"block width =",t?.size,"sieblingWidth",r),t?.size?.width||(t.size={width:r,height:n,x:0,y:0});let a=0,i=0;if(t.children?.length>0){for(let p of t.children)NL(p,e);let s=JSt(t);a=s.width,i=s.height,te.debug("setBlockSizes abc95 maxWidth of",t.id,":s children is ",a,i);for(let p of t.children)p.size&&(te.debug(`abc95 Setting size of children of ${t.id} id=${p.id} ${a} ${i} ${JSON.stringify(p.size)}`),p.size.width=a*(p.widthInColumns??1)+Ea*((p.widthInColumns??1)-1),p.size.height=i,p.size.x=0,p.size.y=0,te.debug(`abc95 updating size of ${t.id} children child:${p.id} maxWidth:${a} maxHeight:${i}`));for(let p of t.children)NL(p,e,a,i);let o=t.columns??-1,l=0;for(let p of t.children)l+=p.widthInColumns??1;let u=t.children.length;o>0&&o0?Math.min(t.children.length,o):t.children.length;if(p>0){let m=(f-p*Ea-Ea)/p;te.debug("abc95 (growing to fit) width",t.id,f,t.size?.width,m);for(let g of t.children)g.size&&(g.size.width=m)}}t.size={width:f,height:d,x:0,y:0}}te.debug("setBlockSizes abc94 (done)",t.id,t?.size?.x,t?.size?.width,t?.size?.y,t?.size?.height)}function JW(t,e){te.debug(`abc85 layout blocks (=>layoutBlocks) ${t.id} x: ${t?.size?.x} y: ${t?.size?.y} width: ${t?.size?.width}`);let r=t.columns??-1;if(te.debug("layoutBlocks columns abc95",t.id,"=>",r,t),t.children&&t.children.length>0){let n=t?.children[0]?.size?.width??0,a=t.children.length*n+(t.children.length-1)*Ea;te.debug("widthOfChildren 88",a,"posX");let i=0;te.debug("abc91 block?.size?.x",t.id,t?.size?.x);let s=t?.size?.x?t?.size?.x+(-t?.size?.width/2||0):-Ea,o=0;for(let l of t.children){let u=t;if(!l.size)continue;let{width:h,height:f}=l.size,{px:d,py:p}=pRe(r,i);if(p!=o&&(o=p,s=t?.size?.x?t?.size?.x+(-t?.size?.width/2||0):-Ea,te.debug("New row in layout for block",t.id," and child ",l.id,o)),te.debug(`abc89 layout blocks (child) id: ${l.id} Pos: ${i} (px, py) ${d},${p} (${u?.size?.x},${u?.size?.y}) parent: ${u.id} width: ${h}${Ea}`),u.size){let m=h/2;l.size.x=s+Ea+m,te.debug(`abc91 layout blocks (calc) px, pyid:${l.id} startingPos=X${s} new startingPosX${l.size.x} ${m} padding=${Ea} width=${h} halfWidth=${m} => x:${l.size.x} y:${l.size.y} ${l.widthInColumns} (width * (child?.w || 1)) / 2 ${h*(l?.widthInColumns??1)/2}`),s=l.size.x+m,l.size.y=u.size.y-u.size.height/2+p*(f+Ea)+f/2+Ea,te.debug(`abc88 layout blocks (calc) px, pyid:${l.id}startingPosX${s}${Ea}${m}=>x:${l.size.x}y:${l.size.y}${l.widthInColumns}(width * (child?.w || 1)) / 2${h*(l?.widthInColumns??1)/2}`)}l.children&&JW(l,e),i+=l?.widthInColumns??1,te.debug("abc88 columnsPos",l,i)}}te.debug(`layout blocks (<==layoutBlocks) ${t.id} x: ${t?.size?.x} y: ${t?.size?.y} width: ${t?.size?.width}`)}function eY(t,{minX:e,minY:r,maxX:n,maxY:a}={minX:0,minY:0,maxX:0,maxY:0}){if(t.size&&t.id!=="root"){let{x:i,y:s,width:o,height:l}=t.size;i-o/2n&&(n=i+o/2),s+l/2>a&&(a=s+l/2)}if(t.children)for(let i of t.children)({minX:e,minY:r,maxX:n,maxY:a}=eY(i,{minX:e,minY:r,maxX:n,maxY:a}));return{minX:e,minY:r,maxX:n,maxY:a}}function mRe(t){let e=t.getBlock("root");if(!e)return;NL(e,t,0,0),JW(e,t),te.debug("getBlocks",JSON.stringify(e,null,2));let{minX:r,minY:n,maxX:a,maxY:i}=eY(e),s=i-n,o=a-r;return{x:r,y:n,width:o,height:s}}function XW(t,e){e&&t.attr("style",e)}function gRe(t){let e=We(document.createElementNS("http://www.w3.org/2000/svg","foreignObject")),r=e.append("xhtml:div"),n=t.label,a=t.isNode?"nodeLabel":"edgeLabel",i=r.append("span");return i.html(n),XW(i,t.labelStyle),i.attr("class",a),XW(r,t.labelStyle),r.style("display","inline-block"),r.style("white-space","nowrap"),r.attr("xmlns","http://www.w3.org/1999/xhtml"),e.node()}function J6(t,e){Te().flowchart.htmlLabels&&t&&(t.style.width=e.length*9+"px",t.style.height="12px")}function vRe(t,e){return t.intersect(e)}function yRe(t,e,r,n){var a=t.x,i=t.y,s=a-n.x,o=i-n.y,l=Math.sqrt(e*e*o*o+r*r*s*s),u=Math.abs(e*r*s/l);n.x0}function kRe(t,e,r){var n=t.x,a=t.y,i=[],s=Number.POSITIVE_INFINITY,o=Number.POSITIVE_INFINITY;typeof e.forEach=="function"?e.forEach(function(m){s=Math.min(s,m.x),o=Math.min(o,m.y)}):(s=Math.min(s,e.x),o=Math.min(o,e.y));for(var l=n-t.width/2-s,u=a-t.height/2-o,h=0;h1&&i.sort(function(m,g){var v=m.x-r.x,y=m.y-r.y,b=Math.sqrt(v*v+y*y),w=g.x-r.x,C=g.y-r.y,k=Math.sqrt(w*w+C*C);return b{a.push(o,0)},"addBorder"),s=x(o=>{a.push(0,o)},"skipBorder");e.includes("t")?(te.debug("add top border"),i(r)):s(r),e.includes("r")?(te.debug("add right border"),i(n)):s(n),e.includes("b")?(te.debug("add bottom border"),i(r)):s(r),e.includes("l")?(te.debug("add left border"),i(n)):s(n),t.attr("stroke-dasharray",a.join(" "))}function tY(t,e,r=!1){let n=t,a="default";(n?.classes?.length||0)>0&&(a=(n?.classes??[]).join(" ")),a=a+" flowchart-label";let i=0,s="",o;switch(n.type){case"round":i=5,s="rect";break;case"composite":i=0,s="composite",o=0;break;case"square":s="rect";break;case"diamond":s="question";break;case"hexagon":s="hexagon";break;case"block_arrow":s="block_arrow";break;case"odd":s="rect_left_inv_arrow";break;case"lean_right":s="lean_right";break;case"lean_left":s="lean_left";break;case"trapezoid":s="trapezoid";break;case"inv_trapezoid":s="inv_trapezoid";break;case"rect_left_inv_arrow":s="rect_left_inv_arrow";break;case"circle":s="circle";break;case"ellipse":s="ellipse";break;case"stadium":s="stadium";break;case"subroutine":s="subroutine";break;case"cylinder":s="cylinder";break;case"group":s="rect";break;case"doublecircle":s="doublecircle";break;default:s="rect"}let l=IC(n?.styles??[]),u=n.label,h=n.size??{width:0,height:0,x:0,y:0};return{labelStyle:l.labelStyle,shape:s,labelText:u,rx:i,ry:i,class:a,style:l.style,id:n.id,directions:n.directions,width:h.width,height:h.height,x:h.x,y:h.y,positioned:r,intersect:void 0,type:n.type,padding:o??wr()?.block?.padding??0}}async function ERe(t,e,r){let n=tY(e,r,!1);if(n.type==="group")return;let a=wr(),i=await TRe(t,n,{config:a}),s=i.node().getBBox(),o=r.getBlock(n.id);o.size={width:s.width,height:s.height,x:0,y:0,node:i},r.setBlock(o),i.remove()}async function CRe(t,e,r){let n=tY(e,r,!0);if(r.getBlock(n.id).type!=="space"){let i=wr();await TRe(t,n,{config:i}),e.intersect=n?.intersect,z_t(n)}}async function OL(t,e,r,n){for(let a of e)await n(t,a,r),a.children&&await OL(t,a.children,r,n)}async function SRe(t,e,r){await OL(t,e,r,ERe)}async function _Re(t,e,r){await OL(t,e,r,CRe)}async function ARe(t,e,r,n,a){let i=new Jr({multigraph:!0,compound:!0});i.setGraph({rankdir:"TB",nodesep:10,ranksep:10,marginx:8,marginy:8});for(let s of r)s.size&&i.setNode(s.id,{width:s.size.width,height:s.size.height,intersect:s.intersect});for(let s of e)if(s.start&&s.end){let o=n.getBlock(s.start),l=n.getBlock(s.end);if(o?.size&&l?.size){let u=o.size,h=l.size,f=[{x:u.x,y:u.y},{x:u.x+(h.x-u.x)/2,y:u.y+(h.y-u.y)/2},{x:h.x,y:h.y}];o_t(t,{v:s.start,w:s.end,name:s.id},{...s,arrowTypeEnd:s.arrowTypeEnd,arrowTypeStart:s.arrowTypeStart,points:f,classes:"edge-thickness-normal edge-pattern-solid flowchart-link LS-a1 LE-b1"},void 0,"block",i,a),s.label&&(await n_t(t,{...s,label:s.label,labelStyle:"stroke: #333; stroke-width: 1.5px;fill:none;",arrowTypeEnd:s.arrowTypeEnd,arrowTypeStart:s.arrowTypeStart,points:f,classes:"edge-thickness-normal edge-pattern-solid flowchart-link LS-a1 LE-b1"}),a_t({...s,x:f[1].x,y:f[1].y},{originalPath:f}))}}}var WW,xSt,Ru,ZW,YW,eRe,tRe,bSt,uRe,wSt,DL,kSt,TSt,ESt,CSt,cRe,QW,ek,SSt,rRe,_St,ASt,LSt,RSt,ISt,DSt,NSt,MSt,OSt,PSt,BSt,FSt,RL,zSt,$St,GSt,USt,qSt,VSt,HSt,WSt,YSt,XSt,jSt,KSt,ZSt,QSt,Ea,JSt,e_t,Fl,t_t,r_t,nRe,jW,ps,n_t,a_t,i_t,s_t,aRe,o_t,l_t,u_t,c_t,xRe,h_t,f_t,d_t,p_t,m_t,Kn,Si,ga,g_t,v_t,iRe,Jo,sRe,y_t,x_t,b_t,w_t,k_t,T_t,E_t,C_t,S_t,__t,A_t,L_t,R_t,I_t,D_t,N_t,M_t,O_t,P_t,oRe,B_t,F_t,lRe,IL,TRe,z_t,$_t,G_t,U_t,q_t,RRe=A(()=>{sl();eo();Fi();ln();ur();UP();Lo();cr();pl();cr();cr();cr();cr();WW=(function(){var t=x(function(w,C,k,E){for(k=k||{},E=w.length;E--;k[w[E]]=C);return k},"o"),e=[1,7],r=[1,13],n=[1,14],a=[1,15],i=[1,19],s=[1,16],o=[1,17],l=[1,18],u=[8,30],h=[8,21,28,29,30,31,32,40,44,47],f=[1,23],d=[1,24],p=[8,15,16,21,28,29,30,31,32,40,44,47],m=[8,15,16,21,27,28,29,30,31,32,40,44,47],g=[1,49],v={trace:x(function(){},"trace"),yy:{},symbols_:{error:2,spaceLines:3,SPACELINE:4,NL:5,separator:6,SPACE:7,EOF:8,start:9,BLOCK_DIAGRAM_KEY:10,document:11,stop:12,statement:13,link:14,LINK:15,START_LINK:16,LINK_LABEL:17,STR:18,nodeStatement:19,columnsStatement:20,SPACE_BLOCK:21,blockStatement:22,classDefStatement:23,cssClassStatement:24,styleStatement:25,node:26,SIZE:27,COLUMNS:28,"id-block":29,end:30,block:31,NODE_ID:32,nodeShapeNLabel:33,dirList:34,DIR:35,NODE_DSTART:36,NODE_DEND:37,BLOCK_ARROW_START:38,BLOCK_ARROW_END:39,classDef:40,CLASSDEF_ID:41,CLASSDEF_STYLEOPTS:42,DEFAULT:43,class:44,CLASSENTITY_IDS:45,STYLECLASS:46,style:47,STYLE_ENTITY_IDS:48,STYLE_DEFINITION_DATA:49,$accept:0,$end:1},terminals_:{2:"error",4:"SPACELINE",5:"NL",7:"SPACE",8:"EOF",10:"BLOCK_DIAGRAM_KEY",15:"LINK",16:"START_LINK",17:"LINK_LABEL",18:"STR",21:"SPACE_BLOCK",27:"SIZE",28:"COLUMNS",29:"id-block",30:"end",31:"block",32:"NODE_ID",35:"DIR",36:"NODE_DSTART",37:"NODE_DEND",38:"BLOCK_ARROW_START",39:"BLOCK_ARROW_END",40:"classDef",41:"CLASSDEF_ID",42:"CLASSDEF_STYLEOPTS",43:"DEFAULT",44:"class",45:"CLASSENTITY_IDS",46:"STYLECLASS",47:"style",48:"STYLE_ENTITY_IDS",49:"STYLE_DEFINITION_DATA"},productions_:[0,[3,1],[3,2],[3,2],[6,1],[6,1],[6,1],[9,3],[12,1],[12,1],[12,2],[12,2],[11,1],[11,2],[14,1],[14,4],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[19,3],[19,2],[19,1],[20,1],[22,4],[22,3],[26,1],[26,2],[34,1],[34,2],[33,3],[33,4],[23,3],[23,3],[24,3],[25,3]],performAction:x(function(C,k,E,_,S,L,M){var D=L.length-1;switch(S){case 4:_.getLogger().debug("Rule: separator (NL) ");break;case 5:_.getLogger().debug("Rule: separator (Space) ");break;case 6:_.getLogger().debug("Rule: separator (EOF) ");break;case 7:_.getLogger().debug("Rule: hierarchy: ",L[D-1]),_.setHierarchy(L[D-1]);break;case 8:_.getLogger().debug("Stop NL ");break;case 9:_.getLogger().debug("Stop EOF ");break;case 10:_.getLogger().debug("Stop NL2 ");break;case 11:_.getLogger().debug("Stop EOF2 ");break;case 12:_.getLogger().debug("Rule: statement: ",L[D]),typeof L[D].length=="number"?this.$=L[D]:this.$=[L[D]];break;case 13:_.getLogger().debug("Rule: statement #2: ",L[D-1]),this.$=[L[D-1]].concat(L[D]);break;case 14:_.getLogger().debug("Rule: link: ",L[D],C),this.$={edgeTypeStr:L[D],label:""};break;case 15:_.getLogger().debug("Rule: LABEL link: ",L[D-3],L[D-1],L[D]),this.$={edgeTypeStr:L[D],label:L[D-1]};break;case 18:let T=parseInt(L[D]),I=_.generateId();this.$={id:I,type:"space",label:"",width:T,children:[]};break;case 23:_.getLogger().debug("Rule: (nodeStatement link node) ",L[D-2],L[D-1],L[D]," typestr: ",L[D-1].edgeTypeStr);let N=_.edgeStrToEdgeData(L[D-1].edgeTypeStr);this.$=[{id:L[D-2].id,label:L[D-2].label,type:L[D-2].type,directions:L[D-2].directions},{id:L[D-2].id+"-"+L[D].id,start:L[D-2].id,end:L[D].id,label:L[D-1].label,type:"edge",directions:L[D].directions,arrowTypeEnd:N,arrowTypeStart:"arrow_open"},{id:L[D].id,label:L[D].label,type:_.typeStr2Type(L[D].typeStr),directions:L[D].directions}];break;case 24:_.getLogger().debug("Rule: nodeStatement (abc88 node size) ",L[D-1],L[D]),this.$={id:L[D-1].id,label:L[D-1].label,type:_.typeStr2Type(L[D-1].typeStr),directions:L[D-1].directions,widthInColumns:parseInt(L[D],10)};break;case 25:_.getLogger().debug("Rule: nodeStatement (node) ",L[D]),this.$={id:L[D].id,label:L[D].label,type:_.typeStr2Type(L[D].typeStr),directions:L[D].directions,widthInColumns:1};break;case 26:_.getLogger().debug("APA123",this?this:"na"),_.getLogger().debug("COLUMNS: ",L[D]),this.$={type:"column-setting",columns:L[D]==="auto"?-1:parseInt(L[D])};break;case 27:_.getLogger().debug("Rule: id-block statement : ",L[D-2],L[D-1]);let O=_.generateId();this.$={...L[D-2],type:"composite",children:L[D-1]};break;case 28:_.getLogger().debug("Rule: blockStatement : ",L[D-2],L[D-1],L[D]);let R=_.generateId();this.$={id:R,type:"composite",label:"",children:L[D-1]};break;case 29:_.getLogger().debug("Rule: node (NODE_ID separator): ",L[D]),this.$={id:L[D]};break;case 30:_.getLogger().debug("Rule: node (NODE_ID nodeShapeNLabel separator): ",L[D-1],L[D]),this.$={id:L[D-1],label:L[D].label,typeStr:L[D].typeStr,directions:L[D].directions};break;case 31:_.getLogger().debug("Rule: dirList: ",L[D]),this.$=[L[D]];break;case 32:_.getLogger().debug("Rule: dirList: ",L[D-1],L[D]),this.$=[L[D-1]].concat(L[D]);break;case 33:_.getLogger().debug("Rule: nodeShapeNLabel: ",L[D-2],L[D-1],L[D]),this.$={typeStr:L[D-2]+L[D],label:L[D-1]};break;case 34:_.getLogger().debug("Rule: BLOCK_ARROW nodeShapeNLabel: ",L[D-3],L[D-2]," #3:",L[D-1],L[D]),this.$={typeStr:L[D-3]+L[D],label:L[D-2],directions:L[D-1]};break;case 35:case 36:this.$={type:"classDef",id:L[D-1].trim(),css:L[D].trim()};break;case 37:this.$={type:"applyClass",id:L[D-1].trim(),styleClass:L[D].trim()};break;case 38:this.$={type:"applyStyles",id:L[D-1].trim(),stylesStr:L[D].trim()};break}},"anonymous"),table:[{9:1,10:[1,2]},{1:[3]},{11:3,13:4,19:5,20:6,21:e,22:8,23:9,24:10,25:11,26:12,28:r,29:n,31:a,32:i,40:s,44:o,47:l},{8:[1,20]},t(u,[2,12],{13:4,19:5,20:6,22:8,23:9,24:10,25:11,26:12,11:21,21:e,28:r,29:n,31:a,32:i,40:s,44:o,47:l}),t(h,[2,16],{14:22,15:f,16:d}),t(h,[2,17]),t(h,[2,18]),t(h,[2,19]),t(h,[2,20]),t(h,[2,21]),t(h,[2,22]),t(p,[2,25],{27:[1,25]}),t(h,[2,26]),{19:26,26:12,32:i},{11:27,13:4,19:5,20:6,21:e,22:8,23:9,24:10,25:11,26:12,28:r,29:n,31:a,32:i,40:s,44:o,47:l},{41:[1,28],43:[1,29]},{45:[1,30]},{48:[1,31]},t(m,[2,29],{33:32,36:[1,33],38:[1,34]}),{1:[2,7]},t(u,[2,13]),{26:35,32:i},{32:[2,14]},{17:[1,36]},t(p,[2,24]),{11:37,13:4,14:22,15:f,16:d,19:5,20:6,21:e,22:8,23:9,24:10,25:11,26:12,28:r,29:n,31:a,32:i,40:s,44:o,47:l},{30:[1,38]},{42:[1,39]},{42:[1,40]},{46:[1,41]},{49:[1,42]},t(m,[2,30]),{18:[1,43]},{18:[1,44]},t(p,[2,23]),{18:[1,45]},{30:[1,46]},t(h,[2,28]),t(h,[2,35]),t(h,[2,36]),t(h,[2,37]),t(h,[2,38]),{37:[1,47]},{34:48,35:g},{15:[1,50]},t(h,[2,27]),t(m,[2,33]),{39:[1,51]},{34:52,35:g,39:[2,31]},{32:[2,15]},t(m,[2,34]),{39:[2,32]}],defaultActions:{20:[2,7],23:[2,14],50:[2,15],52:[2,32]},parseError:x(function(C,k){if(k.recoverable)this.trace(C);else{var E=new Error(C);throw E.hash=k,E}},"parseError"),parse:x(function(C){var k=this,E=[0],_=[],S=[null],L=[],M=this.table,D="",T=0,I=0,N=0,O=2,R=1,P=L.slice.call(arguments,1),B=Object.create(this.lexer),F={yy:{}};for(var G in this.yy)Object.prototype.hasOwnProperty.call(this.yy,G)&&(F.yy[G]=this.yy[G]);B.setInput(C,F.yy),F.yy.lexer=B,F.yy.parser=this,typeof B.yylloc>"u"&&(B.yylloc={});var z=B.yylloc;L.push(z);var H=B.options&&B.options.ranges;typeof F.yy.parseError=="function"?this.parseError=F.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Q(ne){E.length=E.length-2*ne,S.length=S.length-ne,L.length=L.length-ne}x(Q,"popStack");function Y(){var ne;return ne=_.pop()||B.lex()||R,typeof ne!="number"&&(ne instanceof Array&&(_=ne,ne=_.pop()),ne=k.symbols_[ne]||ne),ne}x(Y,"lex");for(var ie,se,oe,pe,J,j,Z={},K,X,ae,W;;){if(oe=E[E.length-1],this.defaultActions[oe]?pe=this.defaultActions[oe]:((ie===null||typeof ie>"u")&&(ie=Y()),pe=M[oe]&&M[oe][ie]),typeof pe>"u"||!pe.length||!pe[0]){var Se="";W=[];for(K in M[oe])this.terminals_[K]&&K>O&&W.push("'"+this.terminals_[K]+"'");B.showPosition?Se="Parse error on line "+(T+1)+`: -`+B.showPosition()+` -Expecting `+W.join(", ")+", got '"+(this.terminals_[ie]||ie)+"'":Se="Parse error on line "+(T+1)+": Unexpected "+(ie==R?"end of input":"'"+(this.terminals_[ie]||ie)+"'"),this.parseError(Se,{text:B.match,token:this.terminals_[ie]||ie,line:B.yylineno,loc:z,expected:W})}if(pe[0]instanceof Array&&pe.length>1)throw new Error("Parse Error: multiple actions possible at state: "+oe+", token: "+ie);switch(pe[0]){case 1:E.push(ie),S.push(B.yytext),L.push(B.yylloc),E.push(pe[1]),ie=null,se?(ie=se,se=null):(I=B.yyleng,D=B.yytext,T=B.yylineno,z=B.yylloc,N>0&&N--);break;case 2:if(X=this.productions_[pe[1]][1],Z.$=S[S.length-X],Z._$={first_line:L[L.length-(X||1)].first_line,last_line:L[L.length-1].last_line,first_column:L[L.length-(X||1)].first_column,last_column:L[L.length-1].last_column},H&&(Z._$.range=[L[L.length-(X||1)].range[0],L[L.length-1].range[1]]),j=this.performAction.apply(Z,[D,I,T,F.yy,pe[1],S,L].concat(P)),typeof j<"u")return j;X&&(E=E.slice(0,-1*X*2),S=S.slice(0,-1*X),L=L.slice(0,-1*X)),E.push(this.productions_[pe[1]][0]),S.push(Z.$),L.push(Z._$),ae=M[E[E.length-2]][E[E.length-1]],E.push(ae);break;case 3:return!0}}return!0},"parse")},y=(function(){var w={EOF:1,parseError:x(function(k,E){if(this.yy.parser)this.yy.parser.parseError(k,E);else throw new Error(k)},"parseError"),setInput:x(function(C,k){return this.yy=k||this.yy||{},this._input=C,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:x(function(){var C=this._input[0];this.yytext+=C,this.yyleng++,this.offset++,this.match+=C,this.matched+=C;var k=C.match(/(?:\r\n?|\n).*/g);return k?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),C},"input"),unput:x(function(C){var k=C.length,E=C.split(/(?:\r\n?|\n)/g);this._input=C+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-k),this.offset-=k;var _=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),E.length-1&&(this.yylineno-=E.length-1);var S=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:E?(E.length===_.length?this.yylloc.first_column:0)+_[_.length-E.length].length-E[0].length:this.yylloc.first_column-k},this.options.ranges&&(this.yylloc.range=[S[0],S[0]+this.yyleng-k]),this.yyleng=this.yytext.length,this},"unput"),more:x(function(){return this._more=!0,this},"more"),reject:x(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). -`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:x(function(C){this.unput(this.match.slice(C))},"less"),pastInput:x(function(){var C=this.matched.substr(0,this.matched.length-this.match.length);return(C.length>20?"...":"")+C.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:x(function(){var C=this.match;return C.length<20&&(C+=this._input.substr(0,20-C.length)),(C.substr(0,20)+(C.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:x(function(){var C=this.pastInput(),k=new Array(C.length+1).join("-");return C+this.upcomingInput()+` -`+k+"^"},"showPosition"),test_match:x(function(C,k){var E,_,S;if(this.options.backtrack_lexer&&(S={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(S.yylloc.range=this.yylloc.range.slice(0))),_=C[0].match(/(?:\r\n?|\n).*/g),_&&(this.yylineno+=_.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:_?_[_.length-1].length-_[_.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+C[0].length},this.yytext+=C[0],this.match+=C[0],this.matches=C,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(C[0].length),this.matched+=C[0],E=this.performAction.call(this,this.yy,this,k,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),E)return E;if(this._backtrack){for(var L in S)this[L]=S[L];return!1}return!1},"test_match"),next:x(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var C,k,E,_;this._more||(this.yytext="",this.match="");for(var S=this._currentRules(),L=0;Lk[0].length)){if(k=E,_=L,this.options.backtrack_lexer){if(C=this.test_match(E,S[L]),C!==!1)return C;if(this._backtrack){k=!1;continue}else return!1}else if(!this.options.flex)break}return k?(C=this.test_match(k,S[_]),C!==!1?C:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. -`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:x(function(){var k=this.next();return k||this.lex()},"lex"),begin:x(function(k){this.conditionStack.push(k)},"begin"),popState:x(function(){var k=this.conditionStack.length-1;return k>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:x(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:x(function(k){return k=this.conditionStack.length-1-Math.abs(k||0),k>=0?this.conditionStack[k]:"INITIAL"},"topState"),pushState:x(function(k){this.begin(k)},"pushState"),stateStackSize:x(function(){return this.conditionStack.length},"stateStackSize"),options:{},performAction:x(function(k,E,_,S){var L=S;switch(_){case 0:return 10;case 1:return k.getLogger().debug("Found space-block"),31;break;case 2:return k.getLogger().debug("Found nl-block"),31;break;case 3:return k.getLogger().debug("Found space-block"),29;break;case 4:k.getLogger().debug(".",E.yytext);break;case 5:k.getLogger().debug("_",E.yytext);break;case 6:return 5;case 7:return E.yytext=-1,28;break;case 8:return E.yytext=E.yytext.replace(/columns\s+/,""),k.getLogger().debug("COLUMNS (LEX)",E.yytext),28;break;case 9:this.pushState("md_string");break;case 10:return"MD_STR";case 11:this.popState();break;case 12:this.pushState("string");break;case 13:k.getLogger().debug("LEX: POPPING STR:",E.yytext),this.popState();break;case 14:return k.getLogger().debug("LEX: STR end:",E.yytext),"STR";break;case 15:return E.yytext=E.yytext.replace(/space\:/,""),k.getLogger().debug("SPACE NUM (LEX)",E.yytext),21;break;case 16:return E.yytext="1",k.getLogger().debug("COLUMNS (LEX)",E.yytext),21;break;case 17:return 43;case 18:return"LINKSTYLE";case 19:return"INTERPOLATE";case 20:return this.pushState("CLASSDEF"),40;break;case 21:return this.popState(),this.pushState("CLASSDEFID"),"DEFAULT_CLASSDEF_ID";break;case 22:return this.popState(),this.pushState("CLASSDEFID"),41;break;case 23:return this.popState(),42;break;case 24:return this.pushState("CLASS"),44;break;case 25:return this.popState(),this.pushState("CLASS_STYLE"),45;break;case 26:return this.popState(),46;break;case 27:return this.pushState("STYLE_STMNT"),47;break;case 28:return this.popState(),this.pushState("STYLE_DEFINITION"),48;break;case 29:return this.popState(),49;break;case 30:return this.pushState("acc_title"),"acc_title";break;case 31:return this.popState(),"acc_title_value";break;case 32:return this.pushState("acc_descr"),"acc_descr";break;case 33:return this.popState(),"acc_descr_value";break;case 34:this.pushState("acc_descr_multiline");break;case 35:this.popState();break;case 36:return"acc_descr_multiline_value";case 37:return 30;case 38:return this.popState(),k.getLogger().debug("Lex: (("),"NODE_DEND";break;case 39:return this.popState(),k.getLogger().debug("Lex: (("),"NODE_DEND";break;case 40:return this.popState(),k.getLogger().debug("Lex: ))"),"NODE_DEND";break;case 41:return this.popState(),k.getLogger().debug("Lex: (("),"NODE_DEND";break;case 42:return this.popState(),k.getLogger().debug("Lex: (("),"NODE_DEND";break;case 43:return this.popState(),k.getLogger().debug("Lex: (-"),"NODE_DEND";break;case 44:return this.popState(),k.getLogger().debug("Lex: -)"),"NODE_DEND";break;case 45:return this.popState(),k.getLogger().debug("Lex: (("),"NODE_DEND";break;case 46:return this.popState(),k.getLogger().debug("Lex: ]]"),"NODE_DEND";break;case 47:return this.popState(),k.getLogger().debug("Lex: ("),"NODE_DEND";break;case 48:return this.popState(),k.getLogger().debug("Lex: ])"),"NODE_DEND";break;case 49:return this.popState(),k.getLogger().debug("Lex: /]"),"NODE_DEND";break;case 50:return this.popState(),k.getLogger().debug("Lex: /]"),"NODE_DEND";break;case 51:return this.popState(),k.getLogger().debug("Lex: )]"),"NODE_DEND";break;case 52:return this.popState(),k.getLogger().debug("Lex: )"),"NODE_DEND";break;case 53:return this.popState(),k.getLogger().debug("Lex: ]>"),"NODE_DEND";break;case 54:return this.popState(),k.getLogger().debug("Lex: ]"),"NODE_DEND";break;case 55:return k.getLogger().debug("Lexa: -)"),this.pushState("NODE"),36;break;case 56:return k.getLogger().debug("Lexa: (-"),this.pushState("NODE"),36;break;case 57:return k.getLogger().debug("Lexa: ))"),this.pushState("NODE"),36;break;case 58:return k.getLogger().debug("Lexa: )"),this.pushState("NODE"),36;break;case 59:return k.getLogger().debug("Lex: ((("),this.pushState("NODE"),36;break;case 60:return k.getLogger().debug("Lexa: )"),this.pushState("NODE"),36;break;case 61:return k.getLogger().debug("Lexa: )"),this.pushState("NODE"),36;break;case 62:return k.getLogger().debug("Lexa: )"),this.pushState("NODE"),36;break;case 63:return k.getLogger().debug("Lexc: >"),this.pushState("NODE"),36;break;case 64:return k.getLogger().debug("Lexa: (["),this.pushState("NODE"),36;break;case 65:return k.getLogger().debug("Lexa: )"),this.pushState("NODE"),36;break;case 66:return this.pushState("NODE"),36;break;case 67:return this.pushState("NODE"),36;break;case 68:return this.pushState("NODE"),36;break;case 69:return this.pushState("NODE"),36;break;case 70:return this.pushState("NODE"),36;break;case 71:return this.pushState("NODE"),36;break;case 72:return this.pushState("NODE"),36;break;case 73:return k.getLogger().debug("Lexa: ["),this.pushState("NODE"),36;break;case 74:return this.pushState("BLOCK_ARROW"),k.getLogger().debug("LEX ARR START"),38;break;case 75:return k.getLogger().debug("Lex: NODE_ID",E.yytext),32;break;case 76:return k.getLogger().debug("Lex: EOF",E.yytext),8;break;case 77:this.pushState("md_string");break;case 78:this.pushState("md_string");break;case 79:return"NODE_DESCR";case 80:this.popState();break;case 81:k.getLogger().debug("Lex: Starting string"),this.pushState("string");break;case 82:k.getLogger().debug("LEX ARR: Starting string"),this.pushState("string");break;case 83:return k.getLogger().debug("LEX: NODE_DESCR:",E.yytext),"NODE_DESCR";break;case 84:k.getLogger().debug("LEX POPPING"),this.popState();break;case 85:k.getLogger().debug("Lex: =>BAE"),this.pushState("ARROW_DIR");break;case 86:return E.yytext=E.yytext.replace(/^,\s*/,""),k.getLogger().debug("Lex (right): dir:",E.yytext),"DIR";break;case 87:return E.yytext=E.yytext.replace(/^,\s*/,""),k.getLogger().debug("Lex (left):",E.yytext),"DIR";break;case 88:return E.yytext=E.yytext.replace(/^,\s*/,""),k.getLogger().debug("Lex (x):",E.yytext),"DIR";break;case 89:return E.yytext=E.yytext.replace(/^,\s*/,""),k.getLogger().debug("Lex (y):",E.yytext),"DIR";break;case 90:return E.yytext=E.yytext.replace(/^,\s*/,""),k.getLogger().debug("Lex (up):",E.yytext),"DIR";break;case 91:return E.yytext=E.yytext.replace(/^,\s*/,""),k.getLogger().debug("Lex (down):",E.yytext),"DIR";break;case 92:return E.yytext="]>",k.getLogger().debug("Lex (ARROW_DIR end):",E.yytext),this.popState(),this.popState(),"BLOCK_ARROW_END";break;case 93:return k.getLogger().debug("Lex: LINK","#"+E.yytext+"#"),15;break;case 94:return k.getLogger().debug("Lex: LINK",E.yytext),15;break;case 95:return k.getLogger().debug("Lex: LINK",E.yytext),15;break;case 96:return k.getLogger().debug("Lex: LINK",E.yytext),15;break;case 97:return k.getLogger().debug("Lex: START_LINK",E.yytext),this.pushState("LLABEL"),16;break;case 98:return k.getLogger().debug("Lex: START_LINK",E.yytext),this.pushState("LLABEL"),16;break;case 99:return k.getLogger().debug("Lex: START_LINK",E.yytext),this.pushState("LLABEL"),16;break;case 100:this.pushState("md_string");break;case 101:return k.getLogger().debug("Lex: Starting string"),this.pushState("string"),"LINK_LABEL";break;case 102:return this.popState(),k.getLogger().debug("Lex: LINK","#"+E.yytext+"#"),15;break;case 103:return this.popState(),k.getLogger().debug("Lex: LINK",E.yytext),15;break;case 104:return this.popState(),k.getLogger().debug("Lex: LINK",E.yytext),15;break;case 105:return k.getLogger().debug("Lex: COLON",E.yytext),E.yytext=E.yytext.slice(1),27;break}},"anonymous"),rules:[/^(?:block-beta\b)/,/^(?:block\s+)/,/^(?:block\n+)/,/^(?:block:)/,/^(?:[\s]+)/,/^(?:[\n]+)/,/^(?:((\u000D\u000A)|(\u000A)))/,/^(?:columns\s+auto\b)/,/^(?:columns\s+[\d]+)/,/^(?:["][`])/,/^(?:[^`"]+)/,/^(?:[`]["])/,/^(?:["])/,/^(?:["])/,/^(?:[^"]*)/,/^(?:space[:]\d+)/,/^(?:space\b)/,/^(?:default\b)/,/^(?:linkStyle\b)/,/^(?:interpolate\b)/,/^(?:classDef\s+)/,/^(?:DEFAULT\s+)/,/^(?:\w+\s+)/,/^(?:[^\n]*)/,/^(?:class\s+)/,/^(?:(\w+)+((,\s*\w+)*))/,/^(?:[^\n]*)/,/^(?:style\s+)/,/^(?:(\w+)+((,\s*\w+)*))/,/^(?:[^\n]*)/,/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?:end\b\s*)/,/^(?:\(\(\()/,/^(?:\)\)\))/,/^(?:[\)]\))/,/^(?:\}\})/,/^(?:\})/,/^(?:\(-)/,/^(?:-\))/,/^(?:\(\()/,/^(?:\]\])/,/^(?:\()/,/^(?:\]\))/,/^(?:\\\])/,/^(?:\/\])/,/^(?:\)\])/,/^(?:[\)])/,/^(?:\]>)/,/^(?:[\]])/,/^(?:-\))/,/^(?:\(-)/,/^(?:\)\))/,/^(?:\))/,/^(?:\(\(\()/,/^(?:\(\()/,/^(?:\{\{)/,/^(?:\{)/,/^(?:>)/,/^(?:\(\[)/,/^(?:\()/,/^(?:\[\[)/,/^(?:\[\|)/,/^(?:\[\()/,/^(?:\)\)\))/,/^(?:\[\\)/,/^(?:\[\/)/,/^(?:\[\\)/,/^(?:\[)/,/^(?:<\[)/,/^(?:[^\(\[\n\-\)\{\}\s\<\>:]+)/,/^(?:$)/,/^(?:["][`])/,/^(?:["][`])/,/^(?:[^`"]+)/,/^(?:[`]["])/,/^(?:["])/,/^(?:["])/,/^(?:[^"]+)/,/^(?:["])/,/^(?:\]>\s*\()/,/^(?:,?\s*right\s*)/,/^(?:,?\s*left\s*)/,/^(?:,?\s*x\s*)/,/^(?:,?\s*y\s*)/,/^(?:,?\s*up\s*)/,/^(?:,?\s*down\s*)/,/^(?:\)\s*)/,/^(?:\s*[xo<]?--+[-xo>]\s*)/,/^(?:\s*[xo<]?==+[=xo>]\s*)/,/^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/,/^(?:\s*~~[\~]+\s*)/,/^(?:\s*[xo<]?--\s*)/,/^(?:\s*[xo<]?==\s*)/,/^(?:\s*[xo<]?-\.\s*)/,/^(?:["][`])/,/^(?:["])/,/^(?:\s*[xo<]?--+[-xo>]\s*)/,/^(?:\s*[xo<]?==+[=xo>]\s*)/,/^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/,/^(?::\d+)/],conditions:{STYLE_DEFINITION:{rules:[29],inclusive:!1},STYLE_STMNT:{rules:[28],inclusive:!1},CLASSDEFID:{rules:[23],inclusive:!1},CLASSDEF:{rules:[21,22],inclusive:!1},CLASS_STYLE:{rules:[26],inclusive:!1},CLASS:{rules:[25],inclusive:!1},LLABEL:{rules:[100,101,102,103,104],inclusive:!1},ARROW_DIR:{rules:[86,87,88,89,90,91,92],inclusive:!1},BLOCK_ARROW:{rules:[77,82,85],inclusive:!1},NODE:{rules:[38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,78,81],inclusive:!1},md_string:{rules:[10,11,79,80],inclusive:!1},space:{rules:[],inclusive:!1},string:{rules:[13,14,83,84],inclusive:!1},acc_descr_multiline:{rules:[35,36],inclusive:!1},acc_descr:{rules:[33],inclusive:!1},acc_title:{rules:[31],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,8,9,12,15,16,17,18,19,20,24,27,30,32,34,37,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,93,94,95,96,97,98,99,105],inclusive:!0}}};return w})();v.lexer=y;function b(){this.yy={}}return x(b,"Parser"),b.prototype=v,v.Parser=b,new b})();WW.parser=WW;xSt=WW,Ru=new Map,ZW=[],YW=new Map,eRe="color",tRe="fill",bSt="bgFill",uRe=",",wSt=Te(),DL=new Map,kSt=x(t=>Ze.sanitizeText(t,wSt),"sanitizeText"),TSt=x(function(t,e=""){let r=DL.get(t);r||(r={id:t,styles:[],textStyles:[]},DL.set(t,r)),e?.split(uRe).forEach(n=>{let a=n.replace(/([^;]*);/,"$1").trim();if(RegExp(eRe).exec(n)){let s=a.replace(tRe,bSt).replace(eRe,tRe);r.textStyles.push(s)}r.styles.push(a)})},"addStyleClass"),ESt=x(function(t,e=""){let r=Ru.get(t);e!=null&&(r.styles=e.split(uRe))},"addStyle2Node"),CSt=x(function(t,e){t.split(",").forEach(function(r){let n=Ru.get(r);if(n===void 0){let a=r.trim();n={id:a,type:"na",children:[]},Ru.set(a,n)}n.classes||(n.classes=[]),n.classes.push(e)})},"setCssClass"),cRe=x((t,e)=>{let r=t.flat(),n=[];for(let a of r){if(a.label&&(a.label=kSt(a.label)),a.type==="classDef"){TSt(a.id,a.css);continue}if(a.type==="applyClass"){CSt(a.id,a?.styleClass??"");continue}if(a.type==="applyStyles"){a?.stylesStr&&ESt(a.id,a?.stylesStr);continue}if(a.type==="column-setting")e.columns=a.columns??-1;else if(a.type==="edge"){let i=(YW.get(a.id)??0)+1;YW.set(a.id,i),a.id=i+"-"+a.id,ZW.push(a)}else{a.label||(a.type==="composite"?a.label="":a.label=a.id);let i=Ru.get(a.id);if(i===void 0?Ru.set(a.id,a):(a.type!=="na"&&(i.type=a.type),a.label!==a.id&&(i.label=a.label)),a.children&&cRe(a.children,a),a.type==="space"){let s=a.width??1;for(let o=0;o{te.debug("Clear called"),Cr(),ek={id:"root",type:"composite",children:[],columns:-1},Ru=new Map([["root",ek]]),QW=[],DL=new Map,ZW=[],YW=new Map},"clear");x(hRe,"typeStr2Type");x(fRe,"edgeTypeStr2Type");x(dRe,"edgeStrToEdgeData");rRe=0,_St=x(()=>(rRe++,"id-"+Math.random().toString(36).substr(2,12)+"-"+rRe),"generateId"),ASt=x(t=>{ek.children=t,cRe(t,ek),QW=ek.children},"setHierarchy"),LSt=x(t=>{let e=Ru.get(t);return e?e.columns?e.columns:e.children?e.children.length:-1:-1},"getColumns"),RSt=x(()=>[...Ru.values()],"getBlocksFlat"),ISt=x(()=>QW||[],"getBlocks"),DSt=x(()=>ZW,"getEdges"),NSt=x(t=>Ru.get(t),"getBlock"),MSt=x(t=>{Ru.set(t.id,t)},"setBlock"),OSt=x(()=>console,"getLogger"),PSt=x(function(){return DL},"getClasses"),BSt={getConfig:x(()=>wr().block,"getConfig"),typeStr2Type:hRe,edgeTypeStr2Type:fRe,edgeStrToEdgeData:dRe,getLogger:OSt,getBlocksFlat:RSt,getBlocks:ISt,getEdges:DSt,setHierarchy:ASt,getBlock:NSt,setBlock:MSt,getColumns:LSt,getClasses:PSt,clear:SSt,generateId:_St},FSt=BSt,RL=x((t,e)=>{let r=op,n=r(t,"r"),a=r(t,"g"),i=r(t,"b");return ms(n,a,i,e)},"fade"),zSt=x(t=>`.label { + ${W_t(e,r)} + `},"styles"),j_t={parser:$_t,db:mw,renderer:V_t,styles:X_t}});var tNe={};Mr(tNe,{diagram:()=>bLt});function BMe(t){switch(he.debug("typeStr2Type",t),t){case"[]":return"square";case"()":return he.debug("we have a round"),"round";case"(())":return"circle";case">]":return"rect_left_inv_arrow";case"{}":return"diamond";case"{{}}":return"hexagon";case"([])":return"stadium";case"[[]]":return"subroutine";case"[()]":return"cylinder";case"((()))":return"doublecircle";case"[//]":return"lean_right";case"[\\\\]":return"lean_left";case"[/\\]":return"trapezoid";case"[\\/]":return"inv_trapezoid";case"<[]>":return"block_arrow";default:return"na"}}function FMe(t){switch(he.debug("typeStr2Type",t),t){case"==":return"thick";default:return"normal"}}function zMe(t){switch(t.trim()){case"--x":return"arrow_cross";case"--o":return"arrow_circle";default:return"arrow_point"}}function $Me(t,e){if(t===0||!Number.isInteger(t))throw new Error("Columns must be an integer !== 0.");if(e<0||!Number.isInteger(e))throw new Error("Position must be a non-negative integer."+e);if(t<0)return{px:e,py:0};if(t===1)return{px:0,py:e};let r=e%t,n=Math.floor(e/t);return{px:r,py:n}}function dD(t,e,r=0,n=0){he.debug("setBlockSizes abc95 (start)",t.id,t?.size?.x,"block width =",t?.size,"sieblingWidth",r),t?.size?.width||(t.size={width:r,height:n,x:0,y:0});let i=0,a=0;if(t.children?.length>0){for(let p of t.children)dD(p,e);let s=RAt(t);i=s.width,a=s.height,he.debug("setBlockSizes abc95 maxWidth of",t.id,":s children is ",i,a);for(let p of t.children)p.size&&(he.debug(`abc95 Setting size of children of ${t.id} id=${p.id} ${i} ${a} ${JSON.stringify(p.size)}`),p.size.width=i*(p.widthInColumns??1)+fa*((p.widthInColumns??1)-1),p.size.height=a,p.size.x=0,p.size.y=0,he.debug(`abc95 updating size of ${t.id} children child:${p.id} maxWidth:${i} maxHeight:${a}`));for(let p of t.children)dD(p,e,i,a);let o=t.columns??-1,l=0;for(let p of t.children)l+=p.widthInColumns??1;let u=t.children.length;o>0&&o0?Math.min(t.children.length,o):t.children.length;if(p>0){let m=(f-p*fa-fa)/p;he.debug("abc95 (growing to fit) width",t.id,f,t.size?.width,m);for(let g of t.children)g.size&&(g.size.width=m)}}t.size={width:f,height:d,x:0,y:0}}he.debug("setBlockSizes abc94 (done)",t.id,t?.size?.x,t?.size?.width,t?.size?.y,t?.size?.height)}function hj(t,e){he.debug(`abc85 layout blocks (=>layoutBlocks) ${t.id} x: ${t?.size?.x} y: ${t?.size?.y} width: ${t?.size?.width}`);let r=t.columns??-1;if(he.debug("layoutBlocks columns abc95",t.id,"=>",r,t),t.children&&t.children.length>0){let n=t?.children[0]?.size?.width??0,i=t.children.length*n+(t.children.length-1)*fa;he.debug("widthOfChildren 88",i,"posX");let a=0;he.debug("abc91 block?.size?.x",t.id,t?.size?.x);let s=t?.size?.x?t?.size?.x+(-t?.size?.width/2||0):-fa,o=0;for(let l of t.children){let u=t;if(!l.size)continue;let{width:h,height:f}=l.size,{px:d,py:p}=$Me(r,a);if(p!=o&&(o=p,s=t?.size?.x?t?.size?.x+(-t?.size?.width/2||0):-fa,he.debug("New row in layout for block",t.id," and child ",l.id,o)),he.debug(`abc89 layout blocks (child) id: ${l.id} Pos: ${a} (px, py) ${d},${p} (${u?.size?.x},${u?.size?.y}) parent: ${u.id} width: ${h}${fa}`),u.size){let m=h/2;l.size.x=s+fa+m,he.debug(`abc91 layout blocks (calc) px, pyid:${l.id} startingPos=X${s} new startingPosX${l.size.x} ${m} padding=${fa} width=${h} halfWidth=${m} => x:${l.size.x} y:${l.size.y} ${l.widthInColumns} (width * (child?.w || 1)) / 2 ${h*(l?.widthInColumns??1)/2}`),s=l.size.x+m,l.size.y=u.size.y-u.size.height/2+p*(f+fa)+f/2+fa,he.debug(`abc88 layout blocks (calc) px, pyid:${l.id}startingPosX${s}${fa}${m}=>x:${l.size.x}y:${l.size.y}${l.widthInColumns}(width * (child?.w || 1)) / 2${h*(l?.widthInColumns??1)/2}`)}l.children&&hj(l,e),a+=l?.widthInColumns??1,he.debug("abc88 columnsPos",l,a)}}he.debug(`layout blocks (<==layoutBlocks) ${t.id} x: ${t?.size?.x} y: ${t?.size?.y} width: ${t?.size?.width}`)}function fj(t,{minX:e,minY:r,maxX:n,maxY:i}={minX:0,minY:0,maxX:0,maxY:0}){if(t.size&&t.id!=="root"){let{x:a,y:s,width:o,height:l}=t.size;a-o/2n&&(n=a+o/2),s+l/2>i&&(i=s+l/2)}if(t.children)for(let a of t.children)({minX:e,minY:r,maxX:n,maxY:i}=fj(a,{minX:e,minY:r,maxX:n,maxY:i}));return{minX:e,minY:r,maxX:n,maxY:i}}function GMe(t){let e=t.getBlock("root");if(!e)return;dD(e,t,0,0),hj(e,t),he.debug("getBlocks",JSON.stringify(e,null,2));let{minX:r,minY:n,maxX:i,maxY:a}=fj(e),s=a-n,o=i-r;return{x:r,y:n,width:o,height:s}}function sj(t,e){e&&t.attr("style",e)}function qMe(t){let e=dt(document.createElementNS("http://www.w3.org/2000/svg","foreignObject")),r=e.append("xhtml:div"),n=t.label,i=t.isNode?"nodeLabel":"edgeLabel",a=r.append("span");return a.html(n),sj(a,t.labelStyle),a.attr("class",i),sj(r,t.labelStyle),r.style("display","inline-block"),r.style("white-space","nowrap"),r.attr("xmlns","http://www.w3.org/1999/xhtml"),e.node()}function gw(t,e){Fe().flowchart.htmlLabels&&t&&(t.style.width=e.length*9+"px",t.style.height="12px")}function UMe(t,e){return t.intersect(e)}function HMe(t,e,r,n){var i=t.x,a=t.y,s=i-n.x,o=a-n.y,l=Math.sqrt(e*e*o*o+r*r*s*s),u=Math.abs(e*r*s/l);n.x0}function XMe(t,e,r){var n=t.x,i=t.y,a=[],s=Number.POSITIVE_INFINITY,o=Number.POSITIVE_INFINITY;typeof e.forEach=="function"?e.forEach(function(m){s=Math.min(s,m.x),o=Math.min(o,m.y)}):(s=Math.min(s,e.x),o=Math.min(o,e.y));for(var l=n-t.width/2-s,u=i-t.height/2-o,h=0;h1&&a.sort(function(m,g){var y=m.x-r.x,v=m.y-r.y,x=Math.sqrt(y*y+v*v),k=g.x-r.x,_=g.y-r.y,T=Math.sqrt(k*k+_*_);return x{i.push(o,0)},"addBorder"),s=b(o=>{i.push(0,o)},"skipBorder");e.includes("t")?(he.debug("add top border"),a(r)):s(r),e.includes("r")?(he.debug("add right border"),a(n)):s(n),e.includes("b")?(he.debug("add bottom border"),a(r)):s(r),e.includes("l")?(he.debug("add left border"),a(n)):s(n),t.attr("stroke-dasharray",i.join(" "))}function dj(t,e,r=!1){let n=t,i="default";(n?.classes?.length||0)>0&&(i=(n?.classes??[]).join(" ")),i=i+" flowchart-label";let a=0,s="",o;switch(n.type){case"round":a=5,s="rect";break;case"composite":a=0,s="composite",o=0;break;case"square":s="rect";break;case"diamond":s="question";break;case"hexagon":s="hexagon";break;case"block_arrow":s="block_arrow";break;case"odd":s="rect_left_inv_arrow";break;case"lean_right":s="lean_right";break;case"lean_left":s="lean_left";break;case"trapezoid":s="trapezoid";break;case"inv_trapezoid":s="inv_trapezoid";break;case"rect_left_inv_arrow":s="rect_left_inv_arrow";break;case"circle":s="circle";break;case"ellipse":s="ellipse";break;case"stadium":s="stadium";break;case"subroutine":s="subroutine";break;case"cylinder":s="cylinder";break;case"group":s="rect";break;case"doublecircle":s="doublecircle";break;default:s="rect"}let l=hE(n?.styles??[]),u=n.label,h=n.size??{width:0,height:0,x:0,y:0};return{labelStyle:l.labelStyle,shape:s,labelText:u,rx:a,ry:a,class:i,style:l.style,id:n.id,directions:n.directions,width:h.width,height:h.height,x:h.x,y:h.y,positioned:r,intersect:void 0,type:n.type,padding:o??Yr()?.block?.padding??0}}async function KMe(t,e,r){let n=dj(e,r,!1);if(n.type==="group")return;let i=Yr(),a=await jMe(t,n,{config:i}),s=a.node().getBBox(),o=r.getBlock(n.id);o.size={width:s.width,height:s.height,x:0,y:0,node:a},r.setBlock(o),a.remove()}async function ZMe(t,e,r){let n=dj(e,r,!0);if(r.getBlock(n.id).type!=="space"){let a=Yr();await jMe(t,n,{config:a}),e.intersect=n?.intersect,gLt(n)}}async function mD(t,e,r,n){for(let i of e)await n(t,i,r),i.children&&await mD(t,i.children,r,n)}async function QMe(t,e,r){await mD(t,e,r,KMe)}async function JMe(t,e,r){await mD(t,e,r,ZMe)}async function eNe(t,e,r,n,i){let a=new In({multigraph:!0,compound:!0});a.setGraph({rankdir:"TB",nodesep:10,ranksep:10,marginx:8,marginy:8});for(let s of r)s.size&&a.setNode(s.id,{width:s.size.width,height:s.size.height,intersect:s.intersect});for(let s of e)if(s.start&&s.end){let o=n.getBlock(s.start),l=n.getBlock(s.end);if(o?.size&&l?.size){let u=o.size,h=l.size,f=[{x:u.x,y:u.y},{x:u.x+(h.x-u.x)/2,y:u.y+(h.y-u.y)/2},{x:h.x,y:h.y}];FAt(t,{v:s.start,w:s.end,name:s.id},{...s,arrowTypeEnd:s.arrowTypeEnd,arrowTypeStart:s.arrowTypeStart,points:f,classes:"edge-thickness-normal edge-pattern-solid flowchart-link LS-a1 LE-b1"},void 0,"block",a,i),s.label&&(await NAt(t,{...s,label:s.label,labelStyle:"stroke: #333; stroke-width: 1.5px;fill:none;",arrowTypeEnd:s.arrowTypeEnd,arrowTypeStart:s.arrowTypeStart,points:f,classes:"edge-thickness-normal edge-pattern-solid flowchart-link LS-a1 LE-b1"}),OAt({...s,x:f[1].x,y:f[1].y},{originalPath:f}))}}}var ij,K_t,Lc,uj,aj,CMe,_Me,Z_t,OMe,Q_t,fD,J_t,eAt,tAt,rAt,PMe,cj,yw,nAt,AMe,iAt,aAt,sAt,oAt,lAt,uAt,cAt,hAt,fAt,dAt,pAt,mAt,cD,gAt,yAt,vAt,xAt,bAt,wAt,kAt,TAt,EAt,SAt,CAt,_At,AAt,LAt,fa,RAt,DAt,Pu,IAt,MAt,LMe,oj,ro,NAt,OAt,PAt,BAt,RMe,FAt,zAt,$At,GAt,VMe,qAt,UAt,HAt,VAt,WAt,Ni,vs,ta,YAt,XAt,DMe,Yl,IMe,jAt,KAt,ZAt,QAt,JAt,eLt,tLt,rLt,nLt,iLt,aLt,sLt,oLt,lLt,uLt,cLt,hLt,fLt,dLt,MMe,pLt,mLt,NMe,hD,jMe,gLt,yLt,vLt,xLt,bLt,rNe=D(()=>{iu();Wo();As();Hn();Nr();ez();Cl();Or();fu();Or();Or();Or();Or();ij=(function(){var t=b(function(k,_,T,S){for(T=T||{},S=k.length;S--;T[k[S]]=_);return T},"o"),e=[1,7],r=[1,13],n=[1,14],i=[1,15],a=[1,19],s=[1,16],o=[1,17],l=[1,18],u=[8,30],h=[8,21,28,29,30,31,32,40,44,47],f=[1,23],d=[1,24],p=[8,15,16,21,28,29,30,31,32,40,44,47],m=[8,15,16,21,27,28,29,30,31,32,40,44,47],g=[1,49],y={trace:b(function(){},"trace"),yy:{},symbols_:{error:2,spaceLines:3,SPACELINE:4,NL:5,separator:6,SPACE:7,EOF:8,start:9,BLOCK_DIAGRAM_KEY:10,document:11,stop:12,statement:13,link:14,LINK:15,START_LINK:16,LINK_LABEL:17,STR:18,nodeStatement:19,columnsStatement:20,SPACE_BLOCK:21,blockStatement:22,classDefStatement:23,cssClassStatement:24,styleStatement:25,node:26,SIZE:27,COLUMNS:28,"id-block":29,end:30,block:31,NODE_ID:32,nodeShapeNLabel:33,dirList:34,DIR:35,NODE_DSTART:36,NODE_DEND:37,BLOCK_ARROW_START:38,BLOCK_ARROW_END:39,classDef:40,CLASSDEF_ID:41,CLASSDEF_STYLEOPTS:42,DEFAULT:43,class:44,CLASSENTITY_IDS:45,STYLECLASS:46,style:47,STYLE_ENTITY_IDS:48,STYLE_DEFINITION_DATA:49,$accept:0,$end:1},terminals_:{2:"error",4:"SPACELINE",5:"NL",7:"SPACE",8:"EOF",10:"BLOCK_DIAGRAM_KEY",15:"LINK",16:"START_LINK",17:"LINK_LABEL",18:"STR",21:"SPACE_BLOCK",27:"SIZE",28:"COLUMNS",29:"id-block",30:"end",31:"block",32:"NODE_ID",35:"DIR",36:"NODE_DSTART",37:"NODE_DEND",38:"BLOCK_ARROW_START",39:"BLOCK_ARROW_END",40:"classDef",41:"CLASSDEF_ID",42:"CLASSDEF_STYLEOPTS",43:"DEFAULT",44:"class",45:"CLASSENTITY_IDS",46:"STYLECLASS",47:"style",48:"STYLE_ENTITY_IDS",49:"STYLE_DEFINITION_DATA"},productions_:[0,[3,1],[3,2],[3,2],[6,1],[6,1],[6,1],[9,3],[12,1],[12,1],[12,2],[12,2],[11,1],[11,2],[14,1],[14,4],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[19,3],[19,2],[19,1],[20,1],[22,4],[22,3],[26,1],[26,2],[34,1],[34,2],[33,3],[33,4],[23,3],[23,3],[24,3],[25,3]],performAction:b(function(_,T,S,R,A,I,P){var O=I.length-1;switch(A){case 4:R.getLogger().debug("Rule: separator (NL) ");break;case 5:R.getLogger().debug("Rule: separator (Space) ");break;case 6:R.getLogger().debug("Rule: separator (EOF) ");break;case 7:R.getLogger().debug("Rule: hierarchy: ",I[O-1]),R.setHierarchy(I[O-1]);break;case 8:R.getLogger().debug("Stop NL ");break;case 9:R.getLogger().debug("Stop EOF ");break;case 10:R.getLogger().debug("Stop NL2 ");break;case 11:R.getLogger().debug("Stop EOF2 ");break;case 12:R.getLogger().debug("Rule: statement: ",I[O]),typeof I[O].length=="number"?this.$=I[O]:this.$=[I[O]];break;case 13:R.getLogger().debug("Rule: statement #2: ",I[O-1]),this.$=[I[O-1]].concat(I[O]);break;case 14:R.getLogger().debug("Rule: link: ",I[O],_),this.$={edgeTypeStr:I[O],label:""};break;case 15:R.getLogger().debug("Rule: LABEL link: ",I[O-3],I[O-1],I[O]),this.$={edgeTypeStr:I[O],label:I[O-1]};break;case 18:let C=parseInt(I[O]),N=R.generateId();this.$={id:N,type:"space",label:"",width:C,children:[]};break;case 23:R.getLogger().debug("Rule: (nodeStatement link node) ",I[O-2],I[O-1],I[O]," typestr: ",I[O-1].edgeTypeStr);let B=R.edgeStrToEdgeData(I[O-1].edgeTypeStr);this.$=[{id:I[O-2].id,label:I[O-2].label,type:I[O-2].type,directions:I[O-2].directions},{id:I[O-2].id+"-"+I[O].id,start:I[O-2].id,end:I[O].id,label:I[O-1].label,type:"edge",directions:I[O].directions,arrowTypeEnd:B,arrowTypeStart:"arrow_open"},{id:I[O].id,label:I[O].label,type:R.typeStr2Type(I[O].typeStr),directions:I[O].directions}];break;case 24:R.getLogger().debug("Rule: nodeStatement (abc88 node size) ",I[O-1],I[O]),this.$={id:I[O-1].id,label:I[O-1].label,type:R.typeStr2Type(I[O-1].typeStr),directions:I[O-1].directions,widthInColumns:parseInt(I[O],10)};break;case 25:R.getLogger().debug("Rule: nodeStatement (node) ",I[O]),this.$={id:I[O].id,label:I[O].label,type:R.typeStr2Type(I[O].typeStr),directions:I[O].directions,widthInColumns:1};break;case 26:R.getLogger().debug("APA123",this?this:"na"),R.getLogger().debug("COLUMNS: ",I[O]),this.$={type:"column-setting",columns:I[O]==="auto"?-1:parseInt(I[O])};break;case 27:R.getLogger().debug("Rule: id-block statement : ",I[O-2],I[O-1]);let F=R.generateId();this.$={...I[O-2],type:"composite",children:I[O-1]};break;case 28:R.getLogger().debug("Rule: blockStatement : ",I[O-2],I[O-1],I[O]);let M=R.generateId();this.$={id:M,type:"composite",label:"",children:I[O-1]};break;case 29:R.getLogger().debug("Rule: node (NODE_ID separator): ",I[O]),this.$={id:I[O]};break;case 30:R.getLogger().debug("Rule: node (NODE_ID nodeShapeNLabel separator): ",I[O-1],I[O]),this.$={id:I[O-1],label:I[O].label,typeStr:I[O].typeStr,directions:I[O].directions};break;case 31:R.getLogger().debug("Rule: dirList: ",I[O]),this.$=[I[O]];break;case 32:R.getLogger().debug("Rule: dirList: ",I[O-1],I[O]),this.$=[I[O-1]].concat(I[O]);break;case 33:R.getLogger().debug("Rule: nodeShapeNLabel: ",I[O-2],I[O-1],I[O]),this.$={typeStr:I[O-2]+I[O],label:I[O-1]};break;case 34:R.getLogger().debug("Rule: BLOCK_ARROW nodeShapeNLabel: ",I[O-3],I[O-2]," #3:",I[O-1],I[O]),this.$={typeStr:I[O-3]+I[O],label:I[O-2],directions:I[O-1]};break;case 35:case 36:this.$={type:"classDef",id:I[O-1].trim(),css:I[O].trim()};break;case 37:this.$={type:"applyClass",id:I[O-1].trim(),styleClass:I[O].trim()};break;case 38:this.$={type:"applyStyles",id:I[O-1].trim(),stylesStr:I[O].trim()};break}},"anonymous"),table:[{9:1,10:[1,2]},{1:[3]},{11:3,13:4,19:5,20:6,21:e,22:8,23:9,24:10,25:11,26:12,28:r,29:n,31:i,32:a,40:s,44:o,47:l},{8:[1,20]},t(u,[2,12],{13:4,19:5,20:6,22:8,23:9,24:10,25:11,26:12,11:21,21:e,28:r,29:n,31:i,32:a,40:s,44:o,47:l}),t(h,[2,16],{14:22,15:f,16:d}),t(h,[2,17]),t(h,[2,18]),t(h,[2,19]),t(h,[2,20]),t(h,[2,21]),t(h,[2,22]),t(p,[2,25],{27:[1,25]}),t(h,[2,26]),{19:26,26:12,32:a},{11:27,13:4,19:5,20:6,21:e,22:8,23:9,24:10,25:11,26:12,28:r,29:n,31:i,32:a,40:s,44:o,47:l},{41:[1,28],43:[1,29]},{45:[1,30]},{48:[1,31]},t(m,[2,29],{33:32,36:[1,33],38:[1,34]}),{1:[2,7]},t(u,[2,13]),{26:35,32:a},{32:[2,14]},{17:[1,36]},t(p,[2,24]),{11:37,13:4,14:22,15:f,16:d,19:5,20:6,21:e,22:8,23:9,24:10,25:11,26:12,28:r,29:n,31:i,32:a,40:s,44:o,47:l},{30:[1,38]},{42:[1,39]},{42:[1,40]},{46:[1,41]},{49:[1,42]},t(m,[2,30]),{18:[1,43]},{18:[1,44]},t(p,[2,23]),{18:[1,45]},{30:[1,46]},t(h,[2,28]),t(h,[2,35]),t(h,[2,36]),t(h,[2,37]),t(h,[2,38]),{37:[1,47]},{34:48,35:g},{15:[1,50]},t(h,[2,27]),t(m,[2,33]),{39:[1,51]},{34:52,35:g,39:[2,31]},{32:[2,15]},t(m,[2,34]),{39:[2,32]}],defaultActions:{20:[2,7],23:[2,14],50:[2,15],52:[2,32]},parseError:b(function(_,T){if(T.recoverable)this.trace(_);else{var S=new Error(_);throw S.hash=T,S}},"parseError"),parse:b(function(_){var T=this,S=[0],R=[],A=[null],I=[],P=this.table,O="",C=0,N=0,B=0,F=2,M=1,$=I.slice.call(arguments,1),z=Object.create(this.lexer),q={yy:{}};for(var V in this.yy)Object.prototype.hasOwnProperty.call(this.yy,V)&&(q.yy[V]=this.yy[V]);z.setInput(_,q.yy),q.yy.lexer=z,q.yy.parser=this,typeof z.yylloc>"u"&&(z.yylloc={});var U=z.yylloc;I.push(U);var J=z.options&&z.options.ranges;typeof q.yy.parseError=="function"?this.parseError=q.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function se(de){S.length=S.length-2*de,A.length=A.length-de,I.length=I.length-de}b(se,"popStack");function re(){var de;return de=R.pop()||z.lex()||M,typeof de!="number"&&(de instanceof Array&&(R=de,de=R.pop()),de=T.symbols_[de]||de),de}b(re,"lex");for(var me,ge,ye,_e,ue,ie,le={},oe,ne,pe,te;;){if(ye=S[S.length-1],this.defaultActions[ye]?_e=this.defaultActions[ye]:((me===null||typeof me>"u")&&(me=re()),_e=P[ye]&&P[ye][me]),typeof _e>"u"||!_e.length||!_e[0]){var He="";te=[];for(oe in P[ye])this.terminals_[oe]&&oe>F&&te.push("'"+this.terminals_[oe]+"'");z.showPosition?He="Parse error on line "+(C+1)+`: +`+z.showPosition()+` +Expecting `+te.join(", ")+", got '"+(this.terminals_[me]||me)+"'":He="Parse error on line "+(C+1)+": Unexpected "+(me==M?"end of input":"'"+(this.terminals_[me]||me)+"'"),this.parseError(He,{text:z.match,token:this.terminals_[me]||me,line:z.yylineno,loc:U,expected:te})}if(_e[0]instanceof Array&&_e.length>1)throw new Error("Parse Error: multiple actions possible at state: "+ye+", token: "+me);switch(_e[0]){case 1:S.push(me),A.push(z.yytext),I.push(z.yylloc),S.push(_e[1]),me=null,ge?(me=ge,ge=null):(N=z.yyleng,O=z.yytext,C=z.yylineno,U=z.yylloc,B>0&&B--);break;case 2:if(ne=this.productions_[_e[1]][1],le.$=A[A.length-ne],le._$={first_line:I[I.length-(ne||1)].first_line,last_line:I[I.length-1].last_line,first_column:I[I.length-(ne||1)].first_column,last_column:I[I.length-1].last_column},J&&(le._$.range=[I[I.length-(ne||1)].range[0],I[I.length-1].range[1]]),ie=this.performAction.apply(le,[O,N,C,q.yy,_e[1],A,I].concat($)),typeof ie<"u")return ie;ne&&(S=S.slice(0,-1*ne*2),A=A.slice(0,-1*ne),I=I.slice(0,-1*ne)),S.push(this.productions_[_e[1]][0]),A.push(le.$),I.push(le._$),pe=P[S[S.length-2]][S[S.length-1]],S.push(pe);break;case 3:return!0}}return!0},"parse")},v=(function(){var k={EOF:1,parseError:b(function(T,S){if(this.yy.parser)this.yy.parser.parseError(T,S);else throw new Error(T)},"parseError"),setInput:b(function(_,T){return this.yy=T||this.yy||{},this._input=_,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:b(function(){var _=this._input[0];this.yytext+=_,this.yyleng++,this.offset++,this.match+=_,this.matched+=_;var T=_.match(/(?:\r\n?|\n).*/g);return T?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),_},"input"),unput:b(function(_){var T=_.length,S=_.split(/(?:\r\n?|\n)/g);this._input=_+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-T),this.offset-=T;var R=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),S.length-1&&(this.yylineno-=S.length-1);var A=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:S?(S.length===R.length?this.yylloc.first_column:0)+R[R.length-S.length].length-S[0].length:this.yylloc.first_column-T},this.options.ranges&&(this.yylloc.range=[A[0],A[0]+this.yyleng-T]),this.yyleng=this.yytext.length,this},"unput"),more:b(function(){return this._more=!0,this},"more"),reject:b(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). +`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:b(function(_){this.unput(this.match.slice(_))},"less"),pastInput:b(function(){var _=this.matched.substr(0,this.matched.length-this.match.length);return(_.length>20?"...":"")+_.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:b(function(){var _=this.match;return _.length<20&&(_+=this._input.substr(0,20-_.length)),(_.substr(0,20)+(_.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:b(function(){var _=this.pastInput(),T=new Array(_.length+1).join("-");return _+this.upcomingInput()+` +`+T+"^"},"showPosition"),test_match:b(function(_,T){var S,R,A;if(this.options.backtrack_lexer&&(A={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(A.yylloc.range=this.yylloc.range.slice(0))),R=_[0].match(/(?:\r\n?|\n).*/g),R&&(this.yylineno+=R.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:R?R[R.length-1].length-R[R.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+_[0].length},this.yytext+=_[0],this.match+=_[0],this.matches=_,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(_[0].length),this.matched+=_[0],S=this.performAction.call(this,this.yy,this,T,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),S)return S;if(this._backtrack){for(var I in A)this[I]=A[I];return!1}return!1},"test_match"),next:b(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var _,T,S,R;this._more||(this.yytext="",this.match="");for(var A=this._currentRules(),I=0;IT[0].length)){if(T=S,R=I,this.options.backtrack_lexer){if(_=this.test_match(S,A[I]),_!==!1)return _;if(this._backtrack){T=!1;continue}else return!1}else if(!this.options.flex)break}return T?(_=this.test_match(T,A[R]),_!==!1?_:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. +`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:b(function(){var T=this.next();return T||this.lex()},"lex"),begin:b(function(T){this.conditionStack.push(T)},"begin"),popState:b(function(){var T=this.conditionStack.length-1;return T>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:b(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:b(function(T){return T=this.conditionStack.length-1-Math.abs(T||0),T>=0?this.conditionStack[T]:"INITIAL"},"topState"),pushState:b(function(T){this.begin(T)},"pushState"),stateStackSize:b(function(){return this.conditionStack.length},"stateStackSize"),options:{},performAction:b(function(T,S,R,A){var I=A;switch(R){case 0:return 10;case 1:return T.getLogger().debug("Found space-block"),31;break;case 2:return T.getLogger().debug("Found nl-block"),31;break;case 3:return T.getLogger().debug("Found space-block"),29;break;case 4:T.getLogger().debug(".",S.yytext);break;case 5:T.getLogger().debug("_",S.yytext);break;case 6:return 5;case 7:return S.yytext=-1,28;break;case 8:return S.yytext=S.yytext.replace(/columns\s+/,""),T.getLogger().debug("COLUMNS (LEX)",S.yytext),28;break;case 9:this.pushState("md_string");break;case 10:return"MD_STR";case 11:this.popState();break;case 12:this.pushState("string");break;case 13:T.getLogger().debug("LEX: POPPING STR:",S.yytext),this.popState();break;case 14:return T.getLogger().debug("LEX: STR end:",S.yytext),"STR";break;case 15:return S.yytext=S.yytext.replace(/space\:/,""),T.getLogger().debug("SPACE NUM (LEX)",S.yytext),21;break;case 16:return S.yytext="1",T.getLogger().debug("COLUMNS (LEX)",S.yytext),21;break;case 17:return 43;case 18:return"LINKSTYLE";case 19:return"INTERPOLATE";case 20:return this.pushState("CLASSDEF"),40;break;case 21:return this.popState(),this.pushState("CLASSDEFID"),"DEFAULT_CLASSDEF_ID";break;case 22:return this.popState(),this.pushState("CLASSDEFID"),41;break;case 23:return this.popState(),42;break;case 24:return this.pushState("CLASS"),44;break;case 25:return this.popState(),this.pushState("CLASS_STYLE"),45;break;case 26:return this.popState(),46;break;case 27:return this.pushState("STYLE_STMNT"),47;break;case 28:return this.popState(),this.pushState("STYLE_DEFINITION"),48;break;case 29:return this.popState(),49;break;case 30:return this.pushState("acc_title"),"acc_title";break;case 31:return this.popState(),"acc_title_value";break;case 32:return this.pushState("acc_descr"),"acc_descr";break;case 33:return this.popState(),"acc_descr_value";break;case 34:this.pushState("acc_descr_multiline");break;case 35:this.popState();break;case 36:return"acc_descr_multiline_value";case 37:return 30;case 38:return this.popState(),T.getLogger().debug("Lex: (("),"NODE_DEND";break;case 39:return this.popState(),T.getLogger().debug("Lex: (("),"NODE_DEND";break;case 40:return this.popState(),T.getLogger().debug("Lex: ))"),"NODE_DEND";break;case 41:return this.popState(),T.getLogger().debug("Lex: (("),"NODE_DEND";break;case 42:return this.popState(),T.getLogger().debug("Lex: (("),"NODE_DEND";break;case 43:return this.popState(),T.getLogger().debug("Lex: (-"),"NODE_DEND";break;case 44:return this.popState(),T.getLogger().debug("Lex: -)"),"NODE_DEND";break;case 45:return this.popState(),T.getLogger().debug("Lex: (("),"NODE_DEND";break;case 46:return this.popState(),T.getLogger().debug("Lex: ]]"),"NODE_DEND";break;case 47:return this.popState(),T.getLogger().debug("Lex: ("),"NODE_DEND";break;case 48:return this.popState(),T.getLogger().debug("Lex: ])"),"NODE_DEND";break;case 49:return this.popState(),T.getLogger().debug("Lex: /]"),"NODE_DEND";break;case 50:return this.popState(),T.getLogger().debug("Lex: /]"),"NODE_DEND";break;case 51:return this.popState(),T.getLogger().debug("Lex: )]"),"NODE_DEND";break;case 52:return this.popState(),T.getLogger().debug("Lex: )"),"NODE_DEND";break;case 53:return this.popState(),T.getLogger().debug("Lex: ]>"),"NODE_DEND";break;case 54:return this.popState(),T.getLogger().debug("Lex: ]"),"NODE_DEND";break;case 55:return T.getLogger().debug("Lexa: -)"),this.pushState("NODE"),36;break;case 56:return T.getLogger().debug("Lexa: (-"),this.pushState("NODE"),36;break;case 57:return T.getLogger().debug("Lexa: ))"),this.pushState("NODE"),36;break;case 58:return T.getLogger().debug("Lexa: )"),this.pushState("NODE"),36;break;case 59:return T.getLogger().debug("Lex: ((("),this.pushState("NODE"),36;break;case 60:return T.getLogger().debug("Lexa: )"),this.pushState("NODE"),36;break;case 61:return T.getLogger().debug("Lexa: )"),this.pushState("NODE"),36;break;case 62:return T.getLogger().debug("Lexa: )"),this.pushState("NODE"),36;break;case 63:return T.getLogger().debug("Lexc: >"),this.pushState("NODE"),36;break;case 64:return T.getLogger().debug("Lexa: (["),this.pushState("NODE"),36;break;case 65:return T.getLogger().debug("Lexa: )"),this.pushState("NODE"),36;break;case 66:return this.pushState("NODE"),36;break;case 67:return this.pushState("NODE"),36;break;case 68:return this.pushState("NODE"),36;break;case 69:return this.pushState("NODE"),36;break;case 70:return this.pushState("NODE"),36;break;case 71:return this.pushState("NODE"),36;break;case 72:return this.pushState("NODE"),36;break;case 73:return T.getLogger().debug("Lexa: ["),this.pushState("NODE"),36;break;case 74:return this.pushState("BLOCK_ARROW"),T.getLogger().debug("LEX ARR START"),38;break;case 75:return T.getLogger().debug("Lex: NODE_ID",S.yytext),32;break;case 76:return T.getLogger().debug("Lex: EOF",S.yytext),8;break;case 77:this.pushState("md_string");break;case 78:this.pushState("md_string");break;case 79:return"NODE_DESCR";case 80:this.popState();break;case 81:T.getLogger().debug("Lex: Starting string"),this.pushState("string");break;case 82:T.getLogger().debug("LEX ARR: Starting string"),this.pushState("string");break;case 83:return T.getLogger().debug("LEX: NODE_DESCR:",S.yytext),"NODE_DESCR";break;case 84:T.getLogger().debug("LEX POPPING"),this.popState();break;case 85:T.getLogger().debug("Lex: =>BAE"),this.pushState("ARROW_DIR");break;case 86:return S.yytext=S.yytext.replace(/^,\s*/,""),T.getLogger().debug("Lex (right): dir:",S.yytext),"DIR";break;case 87:return S.yytext=S.yytext.replace(/^,\s*/,""),T.getLogger().debug("Lex (left):",S.yytext),"DIR";break;case 88:return S.yytext=S.yytext.replace(/^,\s*/,""),T.getLogger().debug("Lex (x):",S.yytext),"DIR";break;case 89:return S.yytext=S.yytext.replace(/^,\s*/,""),T.getLogger().debug("Lex (y):",S.yytext),"DIR";break;case 90:return S.yytext=S.yytext.replace(/^,\s*/,""),T.getLogger().debug("Lex (up):",S.yytext),"DIR";break;case 91:return S.yytext=S.yytext.replace(/^,\s*/,""),T.getLogger().debug("Lex (down):",S.yytext),"DIR";break;case 92:return S.yytext="]>",T.getLogger().debug("Lex (ARROW_DIR end):",S.yytext),this.popState(),this.popState(),"BLOCK_ARROW_END";break;case 93:return T.getLogger().debug("Lex: LINK","#"+S.yytext+"#"),15;break;case 94:return T.getLogger().debug("Lex: LINK",S.yytext),15;break;case 95:return T.getLogger().debug("Lex: LINK",S.yytext),15;break;case 96:return T.getLogger().debug("Lex: LINK",S.yytext),15;break;case 97:return T.getLogger().debug("Lex: START_LINK",S.yytext),this.pushState("LLABEL"),16;break;case 98:return T.getLogger().debug("Lex: START_LINK",S.yytext),this.pushState("LLABEL"),16;break;case 99:return T.getLogger().debug("Lex: START_LINK",S.yytext),this.pushState("LLABEL"),16;break;case 100:this.pushState("md_string");break;case 101:return T.getLogger().debug("Lex: Starting string"),this.pushState("string"),"LINK_LABEL";break;case 102:return this.popState(),T.getLogger().debug("Lex: LINK","#"+S.yytext+"#"),15;break;case 103:return this.popState(),T.getLogger().debug("Lex: LINK",S.yytext),15;break;case 104:return this.popState(),T.getLogger().debug("Lex: LINK",S.yytext),15;break;case 105:return T.getLogger().debug("Lex: COLON",S.yytext),S.yytext=S.yytext.slice(1),27;break}},"anonymous"),rules:[/^(?:block-beta\b)/,/^(?:block\s+)/,/^(?:block\n+)/,/^(?:block:)/,/^(?:[\s]+)/,/^(?:[\n]+)/,/^(?:((\u000D\u000A)|(\u000A)))/,/^(?:columns\s+auto\b)/,/^(?:columns\s+[\d]+)/,/^(?:["][`])/,/^(?:[^`"]+)/,/^(?:[`]["])/,/^(?:["])/,/^(?:["])/,/^(?:[^"]*)/,/^(?:space[:]\d+)/,/^(?:space\b)/,/^(?:default\b)/,/^(?:linkStyle\b)/,/^(?:interpolate\b)/,/^(?:classDef\s+)/,/^(?:DEFAULT\s+)/,/^(?:\w+\s+)/,/^(?:[^\n]*)/,/^(?:class\s+)/,/^(?:(\w+)+((,\s*\w+)*))/,/^(?:[^\n]*)/,/^(?:style\s+)/,/^(?:(\w+)+((,\s*\w+)*))/,/^(?:[^\n]*)/,/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?:end\b\s*)/,/^(?:\(\(\()/,/^(?:\)\)\))/,/^(?:[\)]\))/,/^(?:\}\})/,/^(?:\})/,/^(?:\(-)/,/^(?:-\))/,/^(?:\(\()/,/^(?:\]\])/,/^(?:\()/,/^(?:\]\))/,/^(?:\\\])/,/^(?:\/\])/,/^(?:\)\])/,/^(?:[\)])/,/^(?:\]>)/,/^(?:[\]])/,/^(?:-\))/,/^(?:\(-)/,/^(?:\)\))/,/^(?:\))/,/^(?:\(\(\()/,/^(?:\(\()/,/^(?:\{\{)/,/^(?:\{)/,/^(?:>)/,/^(?:\(\[)/,/^(?:\()/,/^(?:\[\[)/,/^(?:\[\|)/,/^(?:\[\()/,/^(?:\)\)\))/,/^(?:\[\\)/,/^(?:\[\/)/,/^(?:\[\\)/,/^(?:\[)/,/^(?:<\[)/,/^(?:[^\(\[\n\-\)\{\}\s\<\>:]+)/,/^(?:$)/,/^(?:["][`])/,/^(?:["][`])/,/^(?:[^`"]+)/,/^(?:[`]["])/,/^(?:["])/,/^(?:["])/,/^(?:[^"]+)/,/^(?:["])/,/^(?:\]>\s*\()/,/^(?:,?\s*right\s*)/,/^(?:,?\s*left\s*)/,/^(?:,?\s*x\s*)/,/^(?:,?\s*y\s*)/,/^(?:,?\s*up\s*)/,/^(?:,?\s*down\s*)/,/^(?:\)\s*)/,/^(?:\s*[xo<]?--+[-xo>]\s*)/,/^(?:\s*[xo<]?==+[=xo>]\s*)/,/^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/,/^(?:\s*~~[\~]+\s*)/,/^(?:\s*[xo<]?--\s*)/,/^(?:\s*[xo<]?==\s*)/,/^(?:\s*[xo<]?-\.\s*)/,/^(?:["][`])/,/^(?:["])/,/^(?:\s*[xo<]?--+[-xo>]\s*)/,/^(?:\s*[xo<]?==+[=xo>]\s*)/,/^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/,/^(?::\d+)/],conditions:{STYLE_DEFINITION:{rules:[29],inclusive:!1},STYLE_STMNT:{rules:[28],inclusive:!1},CLASSDEFID:{rules:[23],inclusive:!1},CLASSDEF:{rules:[21,22],inclusive:!1},CLASS_STYLE:{rules:[26],inclusive:!1},CLASS:{rules:[25],inclusive:!1},LLABEL:{rules:[100,101,102,103,104],inclusive:!1},ARROW_DIR:{rules:[86,87,88,89,90,91,92],inclusive:!1},BLOCK_ARROW:{rules:[77,82,85],inclusive:!1},NODE:{rules:[38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,78,81],inclusive:!1},md_string:{rules:[10,11,79,80],inclusive:!1},space:{rules:[],inclusive:!1},string:{rules:[13,14,83,84],inclusive:!1},acc_descr_multiline:{rules:[35,36],inclusive:!1},acc_descr:{rules:[33],inclusive:!1},acc_title:{rules:[31],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,8,9,12,15,16,17,18,19,20,24,27,30,32,34,37,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,93,94,95,96,97,98,99,105],inclusive:!0}}};return k})();y.lexer=v;function x(){this.yy={}}return b(x,"Parser"),x.prototype=y,y.Parser=x,new x})();ij.parser=ij;K_t=ij,Lc=new Map,uj=[],aj=new Map,CMe="color",_Me="fill",Z_t="bgFill",OMe=",",Q_t=Fe(),fD=new Map,J_t=b(t=>St.sanitizeText(t,Q_t),"sanitizeText"),eAt=b(function(t,e=""){let r=fD.get(t);r||(r={id:t,styles:[],textStyles:[]},fD.set(t,r)),e?.split(OMe).forEach(n=>{let i=n.replace(/([^;]*);/,"$1").trim();if(RegExp(CMe).exec(n)){let s=i.replace(_Me,Z_t).replace(CMe,_Me);r.textStyles.push(s)}r.styles.push(i)})},"addStyleClass"),tAt=b(function(t,e=""){let r=Lc.get(t);e!=null&&(r.styles=e.split(OMe))},"addStyle2Node"),rAt=b(function(t,e){t.split(",").forEach(function(r){let n=Lc.get(r);if(n===void 0){let i=r.trim();n={id:i,type:"na",children:[]},Lc.set(i,n)}n.classes||(n.classes=[]),n.classes.push(e)})},"setCssClass"),PMe=b((t,e)=>{let r=t.flat(),n=[];for(let i of r){if(i.label&&(i.label=J_t(i.label)),i.type==="classDef"){eAt(i.id,i.css);continue}if(i.type==="applyClass"){rAt(i.id,i?.styleClass??"");continue}if(i.type==="applyStyles"){i?.stylesStr&&tAt(i.id,i?.stylesStr);continue}if(i.type==="column-setting")e.columns=i.columns??-1;else if(i.type==="edge"){let a=(aj.get(i.id)??0)+1;aj.set(i.id,a),i.id=a+"-"+i.id,uj.push(i)}else{i.label||(i.type==="composite"?i.label="":i.label=i.id);let a=Lc.get(i.id);if(a===void 0?Lc.set(i.id,i):(i.type!=="na"&&(a.type=i.type),i.label!==i.id&&(a.label=i.label)),i.children&&PMe(i.children,i),i.type==="space"){let s=i.width??1;for(let o=0;o{he.debug("Clear called"),Jr(),yw={id:"root",type:"composite",children:[],columns:-1},Lc=new Map([["root",yw]]),cj=[],fD=new Map,uj=[],aj=new Map},"clear");b(BMe,"typeStr2Type");b(FMe,"edgeTypeStr2Type");b(zMe,"edgeStrToEdgeData");AMe=0,iAt=b(()=>(AMe++,"id-"+Math.random().toString(36).substr(2,12)+"-"+AMe),"generateId"),aAt=b(t=>{yw.children=t,PMe(t,yw),cj=yw.children},"setHierarchy"),sAt=b(t=>{let e=Lc.get(t);return e?e.columns?e.columns:e.children?e.children.length:-1:-1},"getColumns"),oAt=b(()=>[...Lc.values()],"getBlocksFlat"),lAt=b(()=>cj||[],"getBlocks"),uAt=b(()=>uj,"getEdges"),cAt=b(t=>Lc.get(t),"getBlock"),hAt=b(t=>{Lc.set(t.id,t)},"setBlock"),fAt=b(()=>console,"getLogger"),dAt=b(function(){return fD},"getClasses"),pAt={getConfig:b(()=>Yr().block,"getConfig"),typeStr2Type:BMe,edgeTypeStr2Type:FMe,edgeStrToEdgeData:zMe,getLogger:fAt,getBlocksFlat:oAt,getBlocks:lAt,getEdges:uAt,setHierarchy:aAt,getBlock:cAt,setBlock:hAt,getColumns:sAt,getClasses:dAt,clear:nAt,generateId:iAt},mAt=pAt,cD=b((t,e)=>{let r=x1,n=r(t,"r"),i=r(t,"g"),a=r(t,"b");return uo(n,i,a,e)},"fade"),gAt=b(t=>`.label { font-family: ${t.fontFamily}; color: ${t.nodeTextColor||t.textColor}; } @@ -2587,14 +2843,14 @@ Expecting `+W.join(", ")+", got '"+(this.terminals_[ie]||ie)+"'":Se="Parse error /* For html labels only */ .labelBkg { - background-color: ${RL(t.edgeLabelBackground,.5)}; + background-color: ${cD(t.edgeLabelBackground,.5)}; // background-color: } .node .cluster { - // fill: ${RL(t.mainBkg,.5)}; - fill: ${RL(t.clusterBkg,.5)}; - stroke: ${RL(t.clusterBorder,.2)}; + // fill: ${cD(t.mainBkg,.5)}; + fill: ${cD(t.clusterBkg,.5)}; + stroke: ${cD(t.clusterBorder,.2)}; box-shadow: rgba(50, 50, 93, 0.25) 0px 13px 27px -5px, rgba(0, 0, 0, 0.3) 0px 8px 16px -8px; stroke-width: 1px; } @@ -2629,10 +2885,10 @@ Expecting `+W.join(", ")+", got '"+(this.terminals_[ie]||ie)+"'":Se="Parse error font-size: 18px; fill: ${t.textColor}; } -`,"getStyles"),$St=zSt,GSt=x((t,e,r,n)=>{e.forEach(a=>{ZSt[a](t,r,n)})},"insertMarkers"),USt=x((t,e,r)=>{te.trace("Making markers for ",r),t.append("defs").append("marker").attr("id",r+"_"+e+"-extensionStart").attr("class","marker extension "+e).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 1,7 L18,13 V 1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-extensionEnd").attr("class","marker extension "+e).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 1,1 V 13 L18,7 Z")},"extension"),qSt=x((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-compositionStart").attr("class","marker composition "+e).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-compositionEnd").attr("class","marker composition "+e).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"composition"),VSt=x((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-aggregationStart").attr("class","marker aggregation "+e).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-aggregationEnd").attr("class","marker aggregation "+e).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"aggregation"),HSt=x((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-dependencyStart").attr("class","marker dependency "+e).attr("refX",6).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-dependencyEnd").attr("class","marker dependency "+e).attr("refX",13).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},"dependency"),WSt=x((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-lollipopStart").attr("class","marker lollipop "+e).attr("refX",13).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("stroke","black").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6),t.append("defs").append("marker").attr("id",r+"_"+e+"-lollipopEnd").attr("class","marker lollipop "+e).attr("refX",1).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("stroke","black").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6)},"lollipop"),YSt=x((t,e,r)=>{t.append("marker").attr("id",r+"_"+e+"-pointEnd").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",6).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),t.append("marker").attr("id",r+"_"+e+"-pointStart").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",4.5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 0 5 L 10 10 L 10 0 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0")},"point"),XSt=x((t,e,r)=>{t.append("marker").attr("id",r+"_"+e+"-circleEnd").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",11).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),t.append("marker").attr("id",r+"_"+e+"-circleStart").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",-1).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0")},"circle"),jSt=x((t,e,r)=>{t.append("marker").attr("id",r+"_"+e+"-crossEnd").attr("class","marker cross "+e).attr("viewBox","0 0 11 11").attr("refX",12).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0"),t.append("marker").attr("id",r+"_"+e+"-crossStart").attr("class","marker cross "+e).attr("viewBox","0 0 11 11").attr("refX",-1).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0")},"cross"),KSt=x((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-barbEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","strokeWidth").attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")},"barb"),ZSt={extension:USt,composition:qSt,aggregation:VSt,dependency:HSt,lollipop:WSt,point:YSt,circle:XSt,cross:jSt,barb:KSt},QSt=GSt,Ea=Te()?.block?.padding??8;x(pRe,"calculateBlockPosition");JSt=x(t=>{let e=0,r=0;for(let n of t.children){let{width:a,height:i,x:s,y:o}=n.size??{width:0,height:0,x:0,y:0};te.debug("getMaxChildSize abc95 child:",n.id,"width:",a,"height:",i,"x:",s,"y:",o,n.type),n.type!=="space"&&(a>e&&(e=a/(t.widthInColumns??1)),i>r&&(r=i))}return{width:e,height:r}},"getMaxChildSize");x(NL,"setBlockSizes");x(JW,"layoutBlocks");x(eY,"findBounds");x(mRe,"layout");x(XW,"applyStyle");x(gRe,"addHtmlLabel");e_t=x((t,e,r,n)=>{let a=t||"";if(typeof a=="object"&&(a=a[0]),Br(Te().flowchart.htmlLabels)){a=a.replace(/\\n|\n/g,"
    "),te.debug("vertexText"+a);let i={isNode:n,label:VC(oo(a)),labelStyle:e.replace("fill:","color:")};return gRe(i)}else{let i=document.createElementNS("http://www.w3.org/2000/svg","text");i.setAttribute("style",e.replace("color:","fill:"));let s=[];typeof a=="string"?s=a.split(/\\n|\n|/gi):Array.isArray(a)?s=a:s=[];for(let o of s){let l=document.createElementNS("http://www.w3.org/2000/svg","tspan");l.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),l.setAttribute("dy","1em"),l.setAttribute("x","0"),r?l.setAttribute("class","title-row"):l.setAttribute("class","row"),l.textContent=o.trim(),i.appendChild(l)}return i}},"createLabel"),Fl=e_t,t_t=x((t,e,r,n,a)=>{e.arrowTypeStart&&nRe(t,"start",e.arrowTypeStart,r,n,a),e.arrowTypeEnd&&nRe(t,"end",e.arrowTypeEnd,r,n,a)},"addEdgeMarkers"),r_t={arrow_cross:"cross",arrow_point:"point",arrow_barb:"barb",arrow_circle:"circle",aggregation:"aggregation",extension:"extension",composition:"composition",dependency:"dependency",lollipop:"lollipop"},nRe=x((t,e,r,n,a,i)=>{let s=r_t[r];if(!s){te.warn(`Unknown arrow type: ${r}`);return}let o=e==="start"?"Start":"End";t.attr(`marker-${e}`,`url(${n}#${a}_${i}-${s}${o})`)},"addEdgeMarker"),jW={},ps={},n_t=x((t,e)=>{let r=Te(),n=Br(r.flowchart.htmlLabels),a=e.labelType==="markdown"?Xa(t,e.label,{style:e.labelStyle,useHtmlLabels:n,addSvgBackground:!0},r):Fl(e.label,e.labelStyle),i=t.insert("g").attr("class","edgeLabel"),s=i.insert("g").attr("class","label");s.node().appendChild(a);let o=a.getBBox();if(n){let u=a.children[0],h=We(a);o=u.getBoundingClientRect(),h.attr("width",o.width),h.attr("height",o.height)}s.attr("transform","translate("+-o.width/2+", "+-o.height/2+")"),jW[e.id]=i,e.width=o.width,e.height=o.height;let l;if(e.startLabelLeft){let u=Fl(e.startLabelLeft,e.labelStyle),h=t.insert("g").attr("class","edgeTerminals"),f=h.insert("g").attr("class","inner");l=f.node().appendChild(u);let d=u.getBBox();f.attr("transform","translate("+-d.width/2+", "+-d.height/2+")"),ps[e.id]||(ps[e.id]={}),ps[e.id].startLeft=h,J6(l,e.startLabelLeft)}if(e.startLabelRight){let u=Fl(e.startLabelRight,e.labelStyle),h=t.insert("g").attr("class","edgeTerminals"),f=h.insert("g").attr("class","inner");l=h.node().appendChild(u),f.node().appendChild(u);let d=u.getBBox();f.attr("transform","translate("+-d.width/2+", "+-d.height/2+")"),ps[e.id]||(ps[e.id]={}),ps[e.id].startRight=h,J6(l,e.startLabelRight)}if(e.endLabelLeft){let u=Fl(e.endLabelLeft,e.labelStyle),h=t.insert("g").attr("class","edgeTerminals"),f=h.insert("g").attr("class","inner");l=f.node().appendChild(u);let d=u.getBBox();f.attr("transform","translate("+-d.width/2+", "+-d.height/2+")"),h.node().appendChild(u),ps[e.id]||(ps[e.id]={}),ps[e.id].endLeft=h,J6(l,e.endLabelLeft)}if(e.endLabelRight){let u=Fl(e.endLabelRight,e.labelStyle),h=t.insert("g").attr("class","edgeTerminals"),f=h.insert("g").attr("class","inner");l=f.node().appendChild(u);let d=u.getBBox();f.attr("transform","translate("+-d.width/2+", "+-d.height/2+")"),h.node().appendChild(u),ps[e.id]||(ps[e.id]={}),ps[e.id].endRight=h,J6(l,e.endLabelRight)}return a},"insertEdgeLabel");x(J6,"setTerminalWidth");a_t=x((t,e)=>{te.debug("Moving label abc88 ",t.id,t.label,jW[t.id],e);let r=e.updatedPath?e.updatedPath:e.originalPath,n=Te(),{subGraphTitleTotalMargin:a}=wh(n);if(t.label){let i=jW[t.id],s=t.x,o=t.y;if(r){let l=Wt.calcLabelPosition(r);te.debug("Moving label "+t.label+" from (",s,",",o,") to (",l.x,",",l.y,") abc88"),e.updatedPath&&(s=l.x,o=l.y)}i.attr("transform",`translate(${s}, ${o+a/2})`)}if(t.startLabelLeft){let i=ps[t.id].startLeft,s=t.x,o=t.y;if(r){let l=Wt.calcTerminalLabelPosition(t.arrowTypeStart?10:0,"start_left",r);s=l.x,o=l.y}i.attr("transform",`translate(${s}, ${o})`)}if(t.startLabelRight){let i=ps[t.id].startRight,s=t.x,o=t.y;if(r){let l=Wt.calcTerminalLabelPosition(t.arrowTypeStart?10:0,"start_right",r);s=l.x,o=l.y}i.attr("transform",`translate(${s}, ${o})`)}if(t.endLabelLeft){let i=ps[t.id].endLeft,s=t.x,o=t.y;if(r){let l=Wt.calcTerminalLabelPosition(t.arrowTypeEnd?10:0,"end_left",r);s=l.x,o=l.y}i.attr("transform",`translate(${s}, ${o})`)}if(t.endLabelRight){let i=ps[t.id].endRight,s=t.x,o=t.y;if(r){let l=Wt.calcTerminalLabelPosition(t.arrowTypeEnd?10:0,"end_right",r);s=l.x,o=l.y}i.attr("transform",`translate(${s}, ${o})`)}},"positionEdgeLabel"),i_t=x((t,e)=>{let r=t.x,n=t.y,a=Math.abs(e.x-r),i=Math.abs(e.y-n),s=t.width/2,o=t.height/2;return a>=s||i>=o},"outsideNode"),s_t=x((t,e,r)=>{te.debug(`intersection calc abc89: +`,"getStyles"),yAt=gAt,vAt=b((t,e,r,n)=>{e.forEach(i=>{AAt[i](t,r,n)})},"insertMarkers"),xAt=b((t,e,r)=>{he.trace("Making markers for ",r),t.append("defs").append("marker").attr("id",r+"_"+e+"-extensionStart").attr("class","marker extension "+e).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 1,7 L18,13 V 1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-extensionEnd").attr("class","marker extension "+e).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 1,1 V 13 L18,7 Z")},"extension"),bAt=b((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-compositionStart").attr("class","marker composition "+e).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-compositionEnd").attr("class","marker composition "+e).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"composition"),wAt=b((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-aggregationStart").attr("class","marker aggregation "+e).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-aggregationEnd").attr("class","marker aggregation "+e).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"aggregation"),kAt=b((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-dependencyStart").attr("class","marker dependency "+e).attr("refX",6).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-dependencyEnd").attr("class","marker dependency "+e).attr("refX",13).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},"dependency"),TAt=b((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-lollipopStart").attr("class","marker lollipop "+e).attr("refX",13).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("stroke","black").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6),t.append("defs").append("marker").attr("id",r+"_"+e+"-lollipopEnd").attr("class","marker lollipop "+e).attr("refX",1).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("stroke","black").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6)},"lollipop"),EAt=b((t,e,r)=>{t.append("marker").attr("id",r+"_"+e+"-pointEnd").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",6).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),t.append("marker").attr("id",r+"_"+e+"-pointStart").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",4.5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 0 5 L 10 10 L 10 0 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0")},"point"),SAt=b((t,e,r)=>{t.append("marker").attr("id",r+"_"+e+"-circleEnd").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",11).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),t.append("marker").attr("id",r+"_"+e+"-circleStart").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",-1).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0")},"circle"),CAt=b((t,e,r)=>{t.append("marker").attr("id",r+"_"+e+"-crossEnd").attr("class","marker cross "+e).attr("viewBox","0 0 11 11").attr("refX",12).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0"),t.append("marker").attr("id",r+"_"+e+"-crossStart").attr("class","marker cross "+e).attr("viewBox","0 0 11 11").attr("refX",-1).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0")},"cross"),_At=b((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-barbEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","strokeWidth").attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")},"barb"),AAt={extension:xAt,composition:bAt,aggregation:wAt,dependency:kAt,lollipop:TAt,point:EAt,circle:SAt,cross:CAt,barb:_At},LAt=vAt,fa=Fe()?.block?.padding??8;b($Me,"calculateBlockPosition");RAt=b(t=>{let e=0,r=0;for(let n of t.children){let{width:i,height:a,x:s,y:o}=n.size??{width:0,height:0,x:0,y:0};he.debug("getMaxChildSize abc95 child:",n.id,"width:",i,"height:",a,"x:",s,"y:",o,n.type),n.type!=="space"&&(i>e&&(e=i/(t.widthInColumns??1)),a>r&&(r=a))}return{width:e,height:r}},"getMaxChildSize");b(dD,"setBlockSizes");b(hj,"layoutBlocks");b(fj,"findBounds");b(GMe,"layout");b(sj,"applyStyle");b(qMe,"addHtmlLabel");DAt=b((t,e,r,n)=>{let i=t||"";if(typeof i=="object"&&(i=i[0]),dn(Fe().flowchart.htmlLabels)){i=i.replace(/\\n|\n/g,"
    "),he.debug("vertexText"+i);let a={isNode:n,label:EE(Jo(i)),labelStyle:e.replace("fill:","color:")};return qMe(a)}else{let a=document.createElementNS("http://www.w3.org/2000/svg","text");a.setAttribute("style",e.replace("color:","fill:"));let s=[];typeof i=="string"?s=i.split(/\\n|\n|/gi):Array.isArray(i)?s=i:s=[];for(let o of s){let l=document.createElementNS("http://www.w3.org/2000/svg","tspan");l.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),l.setAttribute("dy","1em"),l.setAttribute("x","0"),r?l.setAttribute("class","title-row"):l.setAttribute("class","row"),l.textContent=o.trim(),a.appendChild(l)}return a}},"createLabel"),Pu=DAt,IAt=b((t,e,r,n,i)=>{e.arrowTypeStart&&LMe(t,"start",e.arrowTypeStart,r,n,i),e.arrowTypeEnd&&LMe(t,"end",e.arrowTypeEnd,r,n,i)},"addEdgeMarkers"),MAt={arrow_cross:"cross",arrow_point:"point",arrow_barb:"barb",arrow_circle:"circle",aggregation:"aggregation",extension:"extension",composition:"composition",dependency:"dependency",lollipop:"lollipop"},LMe=b((t,e,r,n,i,a)=>{let s=MAt[r];if(!s){he.warn(`Unknown arrow type: ${r}`);return}let o=e==="start"?"Start":"End";t.attr(`marker-${e}`,`url(${n}#${i}_${a}-${s}${o})`)},"addEdgeMarker"),oj={},ro={},NAt=b((t,e)=>{let r=Fe(),n=dn(r.flowchart.htmlLabels),i=e.labelType==="markdown"?qa(t,e.label,{style:e.labelStyle,useHtmlLabels:n,addSvgBackground:!0},r):Pu(e.label,e.labelStyle),a=t.insert("g").attr("class","edgeLabel"),s=a.insert("g").attr("class","label");s.node().appendChild(i);let o=i.getBBox();if(n){let u=i.children[0],h=dt(i);o=u.getBoundingClientRect(),h.attr("width",o.width),h.attr("height",o.height)}s.attr("transform","translate("+-o.width/2+", "+-o.height/2+")"),oj[e.id]=a,e.width=o.width,e.height=o.height;let l;if(e.startLabelLeft){let u=Pu(e.startLabelLeft,e.labelStyle),h=t.insert("g").attr("class","edgeTerminals"),f=h.insert("g").attr("class","inner");l=f.node().appendChild(u);let d=u.getBBox();f.attr("transform","translate("+-d.width/2+", "+-d.height/2+")"),ro[e.id]||(ro[e.id]={}),ro[e.id].startLeft=h,gw(l,e.startLabelLeft)}if(e.startLabelRight){let u=Pu(e.startLabelRight,e.labelStyle),h=t.insert("g").attr("class","edgeTerminals"),f=h.insert("g").attr("class","inner");l=h.node().appendChild(u),f.node().appendChild(u);let d=u.getBBox();f.attr("transform","translate("+-d.width/2+", "+-d.height/2+")"),ro[e.id]||(ro[e.id]={}),ro[e.id].startRight=h,gw(l,e.startLabelRight)}if(e.endLabelLeft){let u=Pu(e.endLabelLeft,e.labelStyle),h=t.insert("g").attr("class","edgeTerminals"),f=h.insert("g").attr("class","inner");l=f.node().appendChild(u);let d=u.getBBox();f.attr("transform","translate("+-d.width/2+", "+-d.height/2+")"),h.node().appendChild(u),ro[e.id]||(ro[e.id]={}),ro[e.id].endLeft=h,gw(l,e.endLabelLeft)}if(e.endLabelRight){let u=Pu(e.endLabelRight,e.labelStyle),h=t.insert("g").attr("class","edgeTerminals"),f=h.insert("g").attr("class","inner");l=f.node().appendChild(u);let d=u.getBBox();f.attr("transform","translate("+-d.width/2+", "+-d.height/2+")"),h.node().appendChild(u),ro[e.id]||(ro[e.id]={}),ro[e.id].endRight=h,gw(l,e.endLabelRight)}return i},"insertEdgeLabel");b(gw,"setTerminalWidth");OAt=b((t,e)=>{he.debug("Moving label abc88 ",t.id,t.label,oj[t.id],e);let r=e.updatedPath?e.updatedPath:e.originalPath,n=Fe(),{subGraphTitleTotalMargin:i}=Ch(n);if(t.label){let a=oj[t.id],s=t.x,o=t.y;if(r){let l=gr.calcLabelPosition(r);he.debug("Moving label "+t.label+" from (",s,",",o,") to (",l.x,",",l.y,") abc88"),e.updatedPath&&(s=l.x,o=l.y)}a.attr("transform",`translate(${s}, ${o+i/2})`)}if(t.startLabelLeft){let a=ro[t.id].startLeft,s=t.x,o=t.y;if(r){let l=gr.calcTerminalLabelPosition(t.arrowTypeStart?10:0,"start_left",r);s=l.x,o=l.y}a.attr("transform",`translate(${s}, ${o})`)}if(t.startLabelRight){let a=ro[t.id].startRight,s=t.x,o=t.y;if(r){let l=gr.calcTerminalLabelPosition(t.arrowTypeStart?10:0,"start_right",r);s=l.x,o=l.y}a.attr("transform",`translate(${s}, ${o})`)}if(t.endLabelLeft){let a=ro[t.id].endLeft,s=t.x,o=t.y;if(r){let l=gr.calcTerminalLabelPosition(t.arrowTypeEnd?10:0,"end_left",r);s=l.x,o=l.y}a.attr("transform",`translate(${s}, ${o})`)}if(t.endLabelRight){let a=ro[t.id].endRight,s=t.x,o=t.y;if(r){let l=gr.calcTerminalLabelPosition(t.arrowTypeEnd?10:0,"end_right",r);s=l.x,o=l.y}a.attr("transform",`translate(${s}, ${o})`)}},"positionEdgeLabel"),PAt=b((t,e)=>{let r=t.x,n=t.y,i=Math.abs(e.x-r),a=Math.abs(e.y-n),s=t.width/2,o=t.height/2;return i>=s||a>=o},"outsideNode"),BAt=b((t,e,r)=>{he.debug(`intersection calc abc89: outsidePoint: ${JSON.stringify(e)} insidePoint : ${JSON.stringify(r)} - node : x:${t.x} y:${t.y} w:${t.width} h:${t.height}`);let n=t.x,a=t.y,i=Math.abs(n-r.x),s=t.width/2,o=r.xMath.abs(n-e.x)*l){let f=r.y{te.debug("abc88 cutPathAtIntersect",t,e);let r=[],n=t[0],a=!1;return t.forEach(i=>{if(!i_t(e,i)&&!a){let s=s_t(e,n,i),o=!1;r.forEach(l=>{o=o||l.x===s.x&&l.y===s.y}),r.some(l=>l.x===s.x&&l.y===s.y)||r.push(s),a=!0}else n=i,a||r.push(i)}),r},"cutPathAtIntersect"),o_t=x(function(t,e,r,n,a,i,s){let o=r.points;te.debug("abc88 InsertEdge: edge=",r,"e=",e);let l=!1,u=i.node(e.v);var h=i.node(e.w);h?.intersect&&u?.intersect&&(o=o.slice(1,r.points.length-1),o.unshift(u.intersect(o[0])),o.push(h.intersect(o[o.length-1]))),r.toCluster&&(te.debug("to cluster abc88",n[r.toCluster]),o=aRe(r.points,n[r.toCluster].node),l=!0),r.fromCluster&&(te.debug("from cluster abc88",n[r.fromCluster]),o=aRe(o.reverse(),n[r.fromCluster].node).reverse(),l=!0);let f=o.filter(C=>!Number.isNaN(C.y)),d=eu;r.curve&&(a==="graph"||a==="flowchart")&&(d=r.curve);let{x:p,y:m}=XT(r),g=tc().x(p).y(m).curve(d),v;switch(r.thickness){case"normal":v="edge-thickness-normal";break;case"thick":v="edge-thickness-thick";break;case"invisible":v="edge-thickness-thick";break;default:v=""}switch(r.pattern){case"solid":v+=" edge-pattern-solid";break;case"dotted":v+=" edge-pattern-dotted";break;case"dashed":v+=" edge-pattern-dashed";break}let y=t.append("path").attr("d",g(f)).attr("id",r.id).attr("class"," "+v+(r.classes?" "+r.classes:"")).attr("style",r.style),b="";(Te().flowchart.arrowMarkerAbsolute||Te().state.arrowMarkerAbsolute)&&(b=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,b=b.replace(/\(/g,"\\("),b=b.replace(/\)/g,"\\)")),t_t(y,r,b,s,a);let w={};return l&&(w.updatedPath=o),w.originalPath=r.points,w},"insertEdge"),l_t=x(t=>{let e=new Set;for(let r of t)switch(r){case"x":e.add("right"),e.add("left");break;case"y":e.add("up"),e.add("down");break;default:e.add(r);break}return e},"expandAndDeduplicateDirections"),u_t=x((t,e,r)=>{let n=l_t(t),a=2,i=e.height+2*r.padding,s=i/a,o=e.width+2*s+r.padding,l=r.padding/2;return n.has("right")&&n.has("left")&&n.has("up")&&n.has("down")?[{x:0,y:0},{x:s,y:0},{x:o/2,y:2*l},{x:o-s,y:0},{x:o,y:0},{x:o,y:-i/3},{x:o+2*l,y:-i/2},{x:o,y:-2*i/3},{x:o,y:-i},{x:o-s,y:-i},{x:o/2,y:-i-2*l},{x:s,y:-i},{x:0,y:-i},{x:0,y:-2*i/3},{x:-2*l,y:-i/2},{x:0,y:-i/3}]:n.has("right")&&n.has("left")&&n.has("up")?[{x:s,y:0},{x:o-s,y:0},{x:o,y:-i/2},{x:o-s,y:-i},{x:s,y:-i},{x:0,y:-i/2}]:n.has("right")&&n.has("left")&&n.has("down")?[{x:0,y:0},{x:s,y:-i},{x:o-s,y:-i},{x:o,y:0}]:n.has("right")&&n.has("up")&&n.has("down")?[{x:0,y:0},{x:o,y:-s},{x:o,y:-i+s},{x:0,y:-i}]:n.has("left")&&n.has("up")&&n.has("down")?[{x:o,y:0},{x:0,y:-s},{x:0,y:-i+s},{x:o,y:-i}]:n.has("right")&&n.has("left")?[{x:s,y:0},{x:s,y:-l},{x:o-s,y:-l},{x:o-s,y:0},{x:o,y:-i/2},{x:o-s,y:-i},{x:o-s,y:-i+l},{x:s,y:-i+l},{x:s,y:-i},{x:0,y:-i/2}]:n.has("up")&&n.has("down")?[{x:o/2,y:0},{x:0,y:-l},{x:s,y:-l},{x:s,y:-i+l},{x:0,y:-i+l},{x:o/2,y:-i},{x:o,y:-i+l},{x:o-s,y:-i+l},{x:o-s,y:-l},{x:o,y:-l}]:n.has("right")&&n.has("up")?[{x:0,y:0},{x:o,y:-s},{x:0,y:-i}]:n.has("right")&&n.has("down")?[{x:0,y:0},{x:o,y:0},{x:0,y:-i}]:n.has("left")&&n.has("up")?[{x:o,y:0},{x:0,y:-s},{x:o,y:-i}]:n.has("left")&&n.has("down")?[{x:o,y:0},{x:0,y:0},{x:o,y:-i}]:n.has("right")?[{x:s,y:-l},{x:s,y:-l},{x:o-s,y:-l},{x:o-s,y:0},{x:o,y:-i/2},{x:o-s,y:-i},{x:o-s,y:-i+l},{x:s,y:-i+l},{x:s,y:-i+l}]:n.has("left")?[{x:s,y:0},{x:s,y:-l},{x:o-s,y:-l},{x:o-s,y:-i+l},{x:s,y:-i+l},{x:s,y:-i},{x:0,y:-i/2}]:n.has("up")?[{x:s,y:-l},{x:s,y:-i+l},{x:0,y:-i+l},{x:o/2,y:-i},{x:o,y:-i+l},{x:o-s,y:-i+l},{x:o-s,y:-l}]:n.has("down")?[{x:o/2,y:0},{x:0,y:-l},{x:s,y:-l},{x:s,y:-i+l},{x:o-s,y:-i+l},{x:o-s,y:-l},{x:o,y:-l}]:[{x:0,y:0}]},"getArrowPoints");x(vRe,"intersectNode");c_t=vRe;x(yRe,"intersectEllipse");xRe=yRe;x(bRe,"intersectCircle");h_t=bRe;x(wRe,"intersectLine");x(KW,"sameSign");f_t=wRe,d_t=kRe;x(kRe,"intersectPolygon");p_t=x((t,e)=>{var r=t.x,n=t.y,a=e.x-r,i=e.y-n,s=t.width/2,o=t.height/2,l,u;return Math.abs(i)*s>Math.abs(a)*o?(i<0&&(o=-o),l=i===0?0:o*a/i,u=o):(a<0&&(s=-s),l=s,u=a===0?0:s*i/a),{x:r+l,y:n+u}},"intersectRect"),m_t=p_t,Kn={node:c_t,circle:h_t,ellipse:xRe,polygon:d_t,rect:m_t},Si=x(async(t,e,r,n)=>{let a=Te(),i,s=e.useHtmlLabels||Br(a.flowchart.htmlLabels);r?i=r:i="node default";let o=t.insert("g").attr("class",i).attr("id",e.domId||e.id),l=o.insert("g").attr("class","label").attr("style",e.labelStyle),u;e.labelText===void 0?u="":u=typeof e.labelText=="string"?e.labelText:e.labelText[0];let h=l.node(),f;e.labelType==="markdown"?f=Xa(l,Er(oo(u),a),{useHtmlLabels:s,width:e.width||a.flowchart.wrappingWidth,classes:"markdown-node-label"},a):f=h.appendChild(Fl(Er(oo(u),a),e.labelStyle,!1,n));let d=f.getBBox(),p=e.padding/2;if(Br(a.flowchart.htmlLabels)){let m=f.children[0],g=We(f),v=m.getElementsByTagName("img");if(v){let y=u.replace(/]*>/g,"").trim()==="";await Promise.all([...v].map(b=>new Promise(w=>{function C(){if(b.style.display="flex",b.style.flexDirection="column",y){let k=a.fontSize?a.fontSize:window.getComputedStyle(document.body).fontSize,_=parseInt(k,10)*5+"px";b.style.minWidth=_,b.style.maxWidth=_}else b.style.width="100%";w(b)}x(C,"setupImage"),setTimeout(()=>{b.complete&&C()}),b.addEventListener("error",C),b.addEventListener("load",C)})))}d=m.getBoundingClientRect(),g.attr("width",d.width),g.attr("height",d.height)}return s?l.attr("transform","translate("+-d.width/2+", "+-d.height/2+")"):l.attr("transform","translate(0, "+-d.height/2+")"),e.centerLabel&&l.attr("transform","translate("+-d.width/2+", "+-d.height/2+")"),l.insert("rect",":first-child"),{shapeSvg:o,bbox:d,halfPadding:p,label:l}},"labelHelper"),ga=x((t,e)=>{let r=e.node().getBBox();t.width=r.width,t.height=r.height},"updateNodeBounds");x(Iu,"insertPolygonShape");g_t=x(async(t,e)=>{e.useHtmlLabels||Te().flowchart.htmlLabels||(e.centerLabel=!0);let{shapeSvg:n,bbox:a,halfPadding:i}=await Si(t,e,"node "+e.classes,!0);te.info("Classes = ",e.classes);let s=n.insert("rect",":first-child");return s.attr("rx",e.rx).attr("ry",e.ry).attr("x",-a.width/2-i).attr("y",-a.height/2-i).attr("width",a.width+e.padding).attr("height",a.height+e.padding),ga(e,s),e.intersect=function(o){return Kn.rect(e,o)},n},"note"),v_t=g_t,iRe=x(t=>t?" "+t:"","formatClass"),Jo=x((t,e)=>`${e||"node default"}${iRe(t.classes)} ${iRe(t.class)}`,"getClassesFromNode"),sRe=x(async(t,e)=>{let{shapeSvg:r,bbox:n}=await Si(t,e,Jo(e,void 0),!0),a=n.width+e.padding,i=n.height+e.padding,s=a+i,o=[{x:s/2,y:0},{x:s,y:-s/2},{x:s/2,y:-s},{x:0,y:-s/2}];te.info("Question main (Circle)");let l=Iu(r,s,s,o);return l.attr("style",e.style),ga(e,l),e.intersect=function(u){return te.warn("Intersect called"),Kn.polygon(e,o,u)},r},"question"),y_t=x((t,e)=>{let r=t.insert("g").attr("class","node default").attr("id",e.domId||e.id),n=28,a=[{x:0,y:n/2},{x:n/2,y:0},{x:0,y:-n/2},{x:-n/2,y:0}];return r.insert("polygon",":first-child").attr("points",a.map(function(s){return s.x+","+s.y}).join(" ")).attr("class","state-start").attr("r",7).attr("width",28).attr("height",28),e.width=28,e.height=28,e.intersect=function(s){return Kn.circle(e,14,s)},r},"choice"),x_t=x(async(t,e)=>{let{shapeSvg:r,bbox:n}=await Si(t,e,Jo(e,void 0),!0),a=4,i=n.height+e.padding,s=i/a,o=n.width+2*s+e.padding,l=[{x:s,y:0},{x:o-s,y:0},{x:o,y:-i/2},{x:o-s,y:-i},{x:s,y:-i},{x:0,y:-i/2}],u=Iu(r,o,i,l);return u.attr("style",e.style),ga(e,u),e.intersect=function(h){return Kn.polygon(e,l,h)},r},"hexagon"),b_t=x(async(t,e)=>{let{shapeSvg:r,bbox:n}=await Si(t,e,void 0,!0),a=2,i=n.height+2*e.padding,s=i/a,o=n.width+2*s+e.padding,l=u_t(e.directions,n,e),u=Iu(r,o,i,l);return u.attr("style",e.style),ga(e,u),e.intersect=function(h){return Kn.polygon(e,l,h)},r},"block_arrow"),w_t=x(async(t,e)=>{let{shapeSvg:r,bbox:n}=await Si(t,e,Jo(e,void 0),!0),a=n.width+e.padding,i=n.height+e.padding,s=[{x:-i/2,y:0},{x:a,y:0},{x:a,y:-i},{x:-i/2,y:-i},{x:0,y:-i/2}];return Iu(r,a,i,s).attr("style",e.style),e.width=a+i,e.height=i,e.intersect=function(l){return Kn.polygon(e,s,l)},r},"rect_left_inv_arrow"),k_t=x(async(t,e)=>{let{shapeSvg:r,bbox:n}=await Si(t,e,Jo(e),!0),a=n.width+e.padding,i=n.height+e.padding,s=[{x:-2*i/6,y:0},{x:a-i/6,y:0},{x:a+2*i/6,y:-i},{x:i/6,y:-i}],o=Iu(r,a,i,s);return o.attr("style",e.style),ga(e,o),e.intersect=function(l){return Kn.polygon(e,s,l)},r},"lean_right"),T_t=x(async(t,e)=>{let{shapeSvg:r,bbox:n}=await Si(t,e,Jo(e,void 0),!0),a=n.width+e.padding,i=n.height+e.padding,s=[{x:2*i/6,y:0},{x:a+i/6,y:0},{x:a-2*i/6,y:-i},{x:-i/6,y:-i}],o=Iu(r,a,i,s);return o.attr("style",e.style),ga(e,o),e.intersect=function(l){return Kn.polygon(e,s,l)},r},"lean_left"),E_t=x(async(t,e)=>{let{shapeSvg:r,bbox:n}=await Si(t,e,Jo(e,void 0),!0),a=n.width+e.padding,i=n.height+e.padding,s=[{x:-2*i/6,y:0},{x:a+2*i/6,y:0},{x:a-i/6,y:-i},{x:i/6,y:-i}],o=Iu(r,a,i,s);return o.attr("style",e.style),ga(e,o),e.intersect=function(l){return Kn.polygon(e,s,l)},r},"trapezoid"),C_t=x(async(t,e)=>{let{shapeSvg:r,bbox:n}=await Si(t,e,Jo(e,void 0),!0),a=n.width+e.padding,i=n.height+e.padding,s=[{x:i/6,y:0},{x:a-i/6,y:0},{x:a+2*i/6,y:-i},{x:-2*i/6,y:-i}],o=Iu(r,a,i,s);return o.attr("style",e.style),ga(e,o),e.intersect=function(l){return Kn.polygon(e,s,l)},r},"inv_trapezoid"),S_t=x(async(t,e)=>{let{shapeSvg:r,bbox:n}=await Si(t,e,Jo(e,void 0),!0),a=n.width+e.padding,i=n.height+e.padding,s=[{x:0,y:0},{x:a+i/2,y:0},{x:a,y:-i/2},{x:a+i/2,y:-i},{x:0,y:-i}],o=Iu(r,a,i,s);return o.attr("style",e.style),ga(e,o),e.intersect=function(l){return Kn.polygon(e,s,l)},r},"rect_right_inv_arrow"),__t=x(async(t,e)=>{let{shapeSvg:r,bbox:n}=await Si(t,e,Jo(e,void 0),!0),a=n.width+e.padding,i=a/2,s=i/(2.5+a/50),o=n.height+s+e.padding,l="M 0,"+s+" a "+i+","+s+" 0,0,0 "+a+" 0 a "+i+","+s+" 0,0,0 "+-a+" 0 l 0,"+o+" a "+i+","+s+" 0,0,0 "+a+" 0 l 0,"+-o,u=r.attr("label-offset-y",s).insert("path",":first-child").attr("style",e.style).attr("d",l).attr("transform","translate("+-a/2+","+-(o/2+s)+")");return ga(e,u),e.intersect=function(h){let f=Kn.rect(e,h),d=f.x-e.x;if(i!=0&&(Math.abs(d)e.height/2-s)){let p=s*s*(1-d*d/(i*i));p!=0&&(p=Math.sqrt(p)),p=s-p,h.y-e.y>0&&(p=-p),f.y+=p}return f},r},"cylinder"),A_t=x(async(t,e)=>{let{shapeSvg:r,bbox:n,halfPadding:a}=await Si(t,e,"node "+e.classes+" "+e.class,!0),i=r.insert("rect",":first-child"),s=e.positioned?e.width:n.width+e.padding,o=e.positioned?e.height:n.height+e.padding,l=e.positioned?-s/2:-n.width/2-a,u=e.positioned?-o/2:-n.height/2-a;if(i.attr("class","basic label-container").attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("x",l).attr("y",u).attr("width",s).attr("height",o),e.props){let h=new Set(Object.keys(e.props));e.props.borders&&(ML(i,e.props.borders,s,o),h.delete("borders")),h.forEach(f=>{te.warn(`Unknown node property ${f}`)})}return ga(e,i),e.intersect=function(h){return Kn.rect(e,h)},r},"rect"),L_t=x(async(t,e)=>{let{shapeSvg:r,bbox:n,halfPadding:a}=await Si(t,e,"node "+e.classes,!0),i=r.insert("rect",":first-child"),s=e.positioned?e.width:n.width+e.padding,o=e.positioned?e.height:n.height+e.padding,l=e.positioned?-s/2:-n.width/2-a,u=e.positioned?-o/2:-n.height/2-a;if(i.attr("class","basic cluster composite label-container").attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("x",l).attr("y",u).attr("width",s).attr("height",o),e.props){let h=new Set(Object.keys(e.props));e.props.borders&&(ML(i,e.props.borders,s,o),h.delete("borders")),h.forEach(f=>{te.warn(`Unknown node property ${f}`)})}return ga(e,i),e.intersect=function(h){return Kn.rect(e,h)},r},"composite"),R_t=x(async(t,e)=>{let{shapeSvg:r}=await Si(t,e,"label",!0);te.trace("Classes = ",e.class);let n=r.insert("rect",":first-child"),a=0,i=0;if(n.attr("width",a).attr("height",i),r.attr("class","label edgeLabel"),e.props){let s=new Set(Object.keys(e.props));e.props.borders&&(ML(n,e.props.borders,a,i),s.delete("borders")),s.forEach(o=>{te.warn(`Unknown node property ${o}`)})}return ga(e,n),e.intersect=function(s){return Kn.rect(e,s)},r},"labelRect");x(ML,"applyNodePropertyBorders");I_t=x((t,e)=>{let r;e.classes?r="node "+e.classes:r="node default";let n=t.insert("g").attr("class",r).attr("id",e.domId||e.id),a=n.insert("rect",":first-child"),i=n.insert("line"),s=n.insert("g").attr("class","label"),o=e.labelText.flat?e.labelText.flat():e.labelText,l="";typeof o=="object"?l=o[0]:l=o,te.info("Label text abc79",l,o,typeof o=="object");let u=s.node().appendChild(Fl(l,e.labelStyle,!0,!0)),h={width:0,height:0};if(Br(Te().flowchart.htmlLabels)){let g=u.children[0],v=We(u);h=g.getBoundingClientRect(),v.attr("width",h.width),v.attr("height",h.height)}te.info("Text 2",o);let f=o.slice(1,o.length),d=u.getBBox(),p=s.node().appendChild(Fl(f.join?f.join("
    "):f,e.labelStyle,!0,!0));if(Br(Te().flowchart.htmlLabels)){let g=p.children[0],v=We(p);h=g.getBoundingClientRect(),v.attr("width",h.width),v.attr("height",h.height)}let m=e.padding/2;return We(p).attr("transform","translate( "+(h.width>d.width?0:(d.width-h.width)/2)+", "+(d.height+m+5)+")"),We(u).attr("transform","translate( "+(h.width{let{shapeSvg:r,bbox:n}=await Si(t,e,Jo(e,void 0),!0),a=n.height+e.padding,i=n.width+a/4+e.padding,s=r.insert("rect",":first-child").attr("style",e.style).attr("rx",a/2).attr("ry",a/2).attr("x",-i/2).attr("y",-a/2).attr("width",i).attr("height",a);return ga(e,s),e.intersect=function(o){return Kn.rect(e,o)},r},"stadium"),N_t=x(async(t,e)=>{let{shapeSvg:r,bbox:n,halfPadding:a}=await Si(t,e,Jo(e,void 0),!0),i=r.insert("circle",":first-child");return i.attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("r",n.width/2+a).attr("width",n.width+e.padding).attr("height",n.height+e.padding),te.info("Circle main"),ga(e,i),e.intersect=function(s){return te.info("Circle intersect",e,n.width/2+a,s),Kn.circle(e,n.width/2+a,s)},r},"circle"),M_t=x(async(t,e)=>{let{shapeSvg:r,bbox:n,halfPadding:a}=await Si(t,e,Jo(e,void 0),!0),i=5,s=r.insert("g",":first-child"),o=s.insert("circle"),l=s.insert("circle");return s.attr("class",e.class),o.attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("r",n.width/2+a+i).attr("width",n.width+e.padding+i*2).attr("height",n.height+e.padding+i*2),l.attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("r",n.width/2+a).attr("width",n.width+e.padding).attr("height",n.height+e.padding),te.info("DoubleCircle main"),ga(e,o),e.intersect=function(u){return te.info("DoubleCircle intersect",e,n.width/2+a+i,u),Kn.circle(e,n.width/2+a+i,u)},r},"doublecircle"),O_t=x(async(t,e)=>{let{shapeSvg:r,bbox:n}=await Si(t,e,Jo(e,void 0),!0),a=n.width+e.padding,i=n.height+e.padding,s=[{x:0,y:0},{x:a,y:0},{x:a,y:-i},{x:0,y:-i},{x:0,y:0},{x:-8,y:0},{x:a+8,y:0},{x:a+8,y:-i},{x:-8,y:-i},{x:-8,y:0}],o=Iu(r,a,i,s);return o.attr("style",e.style),ga(e,o),e.intersect=function(l){return Kn.polygon(e,s,l)},r},"subroutine"),P_t=x((t,e)=>{let r=t.insert("g").attr("class","node default").attr("id",e.domId||e.id),n=r.insert("circle",":first-child");return n.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14),ga(e,n),e.intersect=function(a){return Kn.circle(e,7,a)},r},"start"),oRe=x((t,e,r)=>{let n=t.insert("g").attr("class","node default").attr("id",e.domId||e.id),a=70,i=10;r==="LR"&&(a=10,i=70);let s=n.append("rect").attr("x",-1*a/2).attr("y",-1*i/2).attr("width",a).attr("height",i).attr("class","fork-join");return ga(e,s),e.height=e.height+e.padding/2,e.width=e.width+e.padding/2,e.intersect=function(o){return Kn.rect(e,o)},n},"forkJoin"),B_t=x((t,e)=>{let r=t.insert("g").attr("class","node default").attr("id",e.domId||e.id),n=r.insert("circle",":first-child"),a=r.insert("circle",":first-child");return a.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14),n.attr("class","state-end").attr("r",5).attr("width",10).attr("height",10),ga(e,a),e.intersect=function(i){return Kn.circle(e,7,i)},r},"end"),F_t=x((t,e)=>{let r=e.padding/2,n=4,a=8,i;e.classes?i="node "+e.classes:i="node default";let s=t.insert("g").attr("class",i).attr("id",e.domId||e.id),o=s.insert("rect",":first-child"),l=s.insert("line"),u=s.insert("line"),h=0,f=n,d=s.insert("g").attr("class","label"),p=0,m=e.classData.annotations?.[0],g=e.classData.annotations[0]?"\xAB"+e.classData.annotations[0]+"\xBB":"",v=d.node().appendChild(Fl(g,e.labelStyle,!0,!0)),y=v.getBBox();if(Br(Te().flowchart.htmlLabels)){let S=v.children[0],L=We(v);y=S.getBoundingClientRect(),L.attr("width",y.width),L.attr("height",y.height)}e.classData.annotations[0]&&(f+=y.height+n,h+=y.width);let b=e.classData.label;e.classData.type!==void 0&&e.classData.type!==""&&(Te().flowchart.htmlLabels?b+="<"+e.classData.type+">":b+="<"+e.classData.type+">");let w=d.node().appendChild(Fl(b,e.labelStyle,!0,!0));We(w).attr("class","classTitle");let C=w.getBBox();if(Br(Te().flowchart.htmlLabels)){let S=w.children[0],L=We(w);C=S.getBoundingClientRect(),L.attr("width",C.width),L.attr("height",C.height)}f+=C.height+n,C.width>h&&(h=C.width);let k=[];e.classData.members.forEach(S=>{let L=S.getDisplayDetails(),M=L.displayText;Te().flowchart.htmlLabels&&(M=M.replace(//g,">"));let D=d.node().appendChild(Fl(M,L.cssStyle?L.cssStyle:e.labelStyle,!0,!0)),T=D.getBBox();if(Br(Te().flowchart.htmlLabels)){let I=D.children[0],N=We(D);T=I.getBoundingClientRect(),N.attr("width",T.width),N.attr("height",T.height)}T.width>h&&(h=T.width),f+=T.height+n,k.push(D)}),f+=a;let E=[];if(e.classData.methods.forEach(S=>{let L=S.getDisplayDetails(),M=L.displayText;Te().flowchart.htmlLabels&&(M=M.replace(//g,">"));let D=d.node().appendChild(Fl(M,L.cssStyle?L.cssStyle:e.labelStyle,!0,!0)),T=D.getBBox();if(Br(Te().flowchart.htmlLabels)){let I=D.children[0],N=We(D);T=I.getBoundingClientRect(),N.attr("width",T.width),N.attr("height",T.height)}T.width>h&&(h=T.width),f+=T.height+n,E.push(D)}),f+=a,m){let S=(h-y.width)/2;We(v).attr("transform","translate( "+(-1*h/2+S)+", "+-1*f/2+")"),p=y.height+n}let _=(h-C.width)/2;return We(w).attr("transform","translate( "+(-1*h/2+_)+", "+(-1*f/2+p)+")"),p+=C.height+n,l.attr("class","divider").attr("x1",-h/2-r).attr("x2",h/2+r).attr("y1",-f/2-r+a+p).attr("y2",-f/2-r+a+p),p+=a,k.forEach(S=>{We(S).attr("transform","translate( "+-h/2+", "+(-1*f/2+p+a/2)+")");let L=S?.getBBox();p+=(L?.height??0)+n}),p+=a,u.attr("class","divider").attr("x1",-h/2-r).attr("x2",h/2+r).attr("y1",-f/2-r+a+p).attr("y2",-f/2-r+a+p),p+=a,E.forEach(S=>{We(S).attr("transform","translate( "+-h/2+", "+(-1*f/2+p)+")");let L=S?.getBBox();p+=(L?.height??0)+n}),o.attr("style",e.style).attr("class","outer title-state").attr("x",-h/2-r).attr("y",-(f/2)-r).attr("width",h+e.padding).attr("height",f+e.padding),ga(e,o),e.intersect=function(S){return Kn.rect(e,S)},s},"class_box"),lRe={rhombus:sRe,composite:L_t,question:sRe,rect:A_t,labelRect:R_t,rectWithTitle:I_t,choice:y_t,circle:N_t,doublecircle:M_t,stadium:D_t,hexagon:x_t,block_arrow:b_t,rect_left_inv_arrow:w_t,lean_right:k_t,lean_left:T_t,trapezoid:E_t,inv_trapezoid:C_t,rect_right_inv_arrow:S_t,cylinder:__t,start:P_t,end:B_t,note:v_t,subroutine:O_t,fork:oRe,join:oRe,class_box:F_t},IL={},TRe=x(async(t,e,r)=>{let n,a;if(e.link){let i;Te().securityLevel==="sandbox"?i="_top":e.linkTarget&&(i=e.linkTarget||"_blank"),n=t.insert("svg:a").attr("xlink:href",e.link).attr("target",i),a=await lRe[e.shape](n,e,r)}else a=await lRe[e.shape](t,e,r),n=a;return e.tooltip&&a.attr("title",e.tooltip),e.class&&a.attr("class","node default "+e.class),IL[e.id]=n,e.haveCallback&&IL[e.id].attr("class",IL[e.id].attr("class")+" clickable"),n},"insertNode"),z_t=x(t=>{let e=IL[t.id];te.trace("Transforming node",t.diff,t,"translate("+(t.x-t.width/2-5)+", "+t.width/2+")");let r=8,n=t.diff||0;return t.clusterNode?e.attr("transform","translate("+(t.x+n-t.width/2)+", "+(t.y-t.height/2-r)+")"):e.attr("transform","translate("+t.x+", "+t.y+")"),n},"positionNode");x(tY,"getNodeFromBlock");x(ERe,"calculateBlockSize");x(CRe,"insertBlockPositioned");x(OL,"performOperations");x(SRe,"calculateBlockSizes");x(_Re,"insertBlocks");x(ARe,"insertEdges");$_t=x(function(t,e){return e.db.getClasses()},"getClasses"),G_t=x(async function(t,e,r,n){let{securityLevel:a,block:i}=wr(),s=n.db,o;a==="sandbox"&&(o=We("#i"+e));let l=a==="sandbox"?We(o.nodes()[0].contentDocument.body):We("body"),u=a==="sandbox"?l.select(`[id="${e}"]`):We(`[id="${e}"]`);QSt(u,["point","circle","cross"],n.type,e);let f=s.getBlocks(),d=s.getBlocksFlat(),p=s.getEdges(),m=u.insert("g").attr("class","block");await SRe(m,f,s);let g=mRe(s);if(await _Re(m,f,s),await ARe(m,p,d,s,e),g){let v=g,y=Math.max(1,Math.round(.125*(v.width/v.height))),b=v.height+y+10,w=v.width+10,{useMaxWidth:C}=i;gn(u,b,w,!!C),te.debug("Here Bounds",g,v),u.attr("viewBox",`${v.x-5} ${v.y-5} ${v.width+10} ${v.height+10}`)}},"draw"),U_t={draw:G_t,getClasses:$_t},q_t={parser:xSt,db:FSt,renderer:U_t,styles:$St}});var nY=va((tk,rY)=>{(function(e,r){typeof tk=="object"&&typeof rY=="object"?rY.exports=r():typeof define=="function"&&define.amd?define([],r):typeof tk=="object"?tk.layoutBase=r():e.layoutBase=r()})(tk,function(){return(function(t){var e={};function r(n){if(e[n])return e[n].exports;var a=e[n]={i:n,l:!1,exports:{}};return t[n].call(a.exports,a,a.exports,r),a.l=!0,a.exports}return r.m=t,r.c=e,r.i=function(n){return n},r.d=function(n,a,i){r.o(n,a)||Object.defineProperty(n,a,{configurable:!1,enumerable:!0,get:i})},r.n=function(n){var a=n&&n.__esModule?function(){return n.default}:function(){return n};return r.d(a,"a",a),a},r.o=function(n,a){return Object.prototype.hasOwnProperty.call(n,a)},r.p="",r(r.s=28)})([(function(t,e,r){"use strict";function n(){}n.QUALITY=1,n.DEFAULT_CREATE_BENDS_AS_NEEDED=!1,n.DEFAULT_INCREMENTAL=!1,n.DEFAULT_ANIMATION_ON_LAYOUT=!0,n.DEFAULT_ANIMATION_DURING_LAYOUT=!1,n.DEFAULT_ANIMATION_PERIOD=50,n.DEFAULT_UNIFORM_LEAF_NODE_SIZES=!1,n.DEFAULT_GRAPH_MARGIN=15,n.NODE_DIMENSIONS_INCLUDE_LABELS=!1,n.SIMPLE_NODE_SIZE=40,n.SIMPLE_NODE_HALF_SIZE=n.SIMPLE_NODE_SIZE/2,n.EMPTY_COMPOUND_NODE_SIZE=40,n.MIN_EDGE_LENGTH=1,n.WORLD_BOUNDARY=1e6,n.INITIAL_WORLD_BOUNDARY=n.WORLD_BOUNDARY/1e3,n.WORLD_CENTER_X=1200,n.WORLD_CENTER_Y=900,t.exports=n}),(function(t,e,r){"use strict";var n=r(2),a=r(8),i=r(9);function s(l,u,h){n.call(this,h),this.isOverlapingSourceAndTarget=!1,this.vGraphObject=h,this.bendpoints=[],this.source=l,this.target=u}s.prototype=Object.create(n.prototype);for(var o in n)s[o]=n[o];s.prototype.getSource=function(){return this.source},s.prototype.getTarget=function(){return this.target},s.prototype.isInterGraph=function(){return this.isInterGraph},s.prototype.getLength=function(){return this.length},s.prototype.isOverlapingSourceAndTarget=function(){return this.isOverlapingSourceAndTarget},s.prototype.getBendpoints=function(){return this.bendpoints},s.prototype.getLca=function(){return this.lca},s.prototype.getSourceInLca=function(){return this.sourceInLca},s.prototype.getTargetInLca=function(){return this.targetInLca},s.prototype.getOtherEnd=function(l){if(this.source===l)return this.target;if(this.target===l)return this.source;throw"Node is not incident with this edge"},s.prototype.getOtherEndInGraph=function(l,u){for(var h=this.getOtherEnd(l),f=u.getGraphManager().getRoot();;){if(h.getOwner()==u)return h;if(h.getOwner()==f)break;h=h.getOwner().getParent()}return null},s.prototype.updateLength=function(){var l=new Array(4);this.isOverlapingSourceAndTarget=a.getIntersection(this.target.getRect(),this.source.getRect(),l),this.isOverlapingSourceAndTarget||(this.lengthX=l[0]-l[2],this.lengthY=l[1]-l[3],Math.abs(this.lengthX)<1&&(this.lengthX=i.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=i.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY))},s.prototype.updateLengthSimple=function(){this.lengthX=this.target.getCenterX()-this.source.getCenterX(),this.lengthY=this.target.getCenterY()-this.source.getCenterY(),Math.abs(this.lengthX)<1&&(this.lengthX=i.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=i.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY)},t.exports=s}),(function(t,e,r){"use strict";function n(a){this.vGraphObject=a}t.exports=n}),(function(t,e,r){"use strict";var n=r(2),a=r(10),i=r(13),s=r(0),o=r(16),l=r(5);function u(f,d,p,m){p==null&&m==null&&(m=d),n.call(this,m),f.graphManager!=null&&(f=f.graphManager),this.estimatedSize=a.MIN_VALUE,this.inclusionTreeDepth=a.MAX_VALUE,this.vGraphObject=m,this.edges=[],this.graphManager=f,p!=null&&d!=null?this.rect=new i(d.x,d.y,p.width,p.height):this.rect=new i}u.prototype=Object.create(n.prototype);for(var h in n)u[h]=n[h];u.prototype.getEdges=function(){return this.edges},u.prototype.getChild=function(){return this.child},u.prototype.getOwner=function(){return this.owner},u.prototype.getWidth=function(){return this.rect.width},u.prototype.setWidth=function(f){this.rect.width=f},u.prototype.getHeight=function(){return this.rect.height},u.prototype.setHeight=function(f){this.rect.height=f},u.prototype.getCenterX=function(){return this.rect.x+this.rect.width/2},u.prototype.getCenterY=function(){return this.rect.y+this.rect.height/2},u.prototype.getCenter=function(){return new l(this.rect.x+this.rect.width/2,this.rect.y+this.rect.height/2)},u.prototype.getLocation=function(){return new l(this.rect.x,this.rect.y)},u.prototype.getRect=function(){return this.rect},u.prototype.getDiagonal=function(){return Math.sqrt(this.rect.width*this.rect.width+this.rect.height*this.rect.height)},u.prototype.getHalfTheDiagonal=function(){return Math.sqrt(this.rect.height*this.rect.height+this.rect.width*this.rect.width)/2},u.prototype.setRect=function(f,d){this.rect.x=f.x,this.rect.y=f.y,this.rect.width=d.width,this.rect.height=d.height},u.prototype.setCenter=function(f,d){this.rect.x=f-this.rect.width/2,this.rect.y=d-this.rect.height/2},u.prototype.setLocation=function(f,d){this.rect.x=f,this.rect.y=d},u.prototype.moveBy=function(f,d){this.rect.x+=f,this.rect.y+=d},u.prototype.getEdgeListToNode=function(f){var d=[],p,m=this;return m.edges.forEach(function(g){if(g.target==f){if(g.source!=m)throw"Incorrect edge source!";d.push(g)}}),d},u.prototype.getEdgesBetween=function(f){var d=[],p,m=this;return m.edges.forEach(function(g){if(!(g.source==m||g.target==m))throw"Incorrect edge source and/or target";(g.target==f||g.source==f)&&d.push(g)}),d},u.prototype.getNeighborsList=function(){var f=new Set,d=this;return d.edges.forEach(function(p){if(p.source==d)f.add(p.target);else{if(p.target!=d)throw"Incorrect incidency!";f.add(p.source)}}),f},u.prototype.withChildren=function(){var f=new Set,d,p;if(f.add(this),this.child!=null)for(var m=this.child.getNodes(),g=0;gd?(this.rect.x-=(this.labelWidth-d)/2,this.setWidth(this.labelWidth)):this.labelPosHorizontal=="right"&&this.setWidth(d+this.labelWidth)),this.labelHeight&&(this.labelPosVertical=="top"?(this.rect.y-=this.labelHeight,this.setHeight(p+this.labelHeight)):this.labelPosVertical=="center"&&this.labelHeight>p?(this.rect.y-=(this.labelHeight-p)/2,this.setHeight(this.labelHeight)):this.labelPosVertical=="bottom"&&this.setHeight(p+this.labelHeight))}}},u.prototype.getInclusionTreeDepth=function(){if(this.inclusionTreeDepth==a.MAX_VALUE)throw"assert failed";return this.inclusionTreeDepth},u.prototype.transform=function(f){var d=this.rect.x;d>s.WORLD_BOUNDARY?d=s.WORLD_BOUNDARY:d<-s.WORLD_BOUNDARY&&(d=-s.WORLD_BOUNDARY);var p=this.rect.y;p>s.WORLD_BOUNDARY?p=s.WORLD_BOUNDARY:p<-s.WORLD_BOUNDARY&&(p=-s.WORLD_BOUNDARY);var m=new l(d,p),g=f.inverseTransformPoint(m);this.setLocation(g.x,g.y)},u.prototype.getLeft=function(){return this.rect.x},u.prototype.getRight=function(){return this.rect.x+this.rect.width},u.prototype.getTop=function(){return this.rect.y},u.prototype.getBottom=function(){return this.rect.y+this.rect.height},u.prototype.getParent=function(){return this.owner==null?null:this.owner.getParent()},t.exports=u}),(function(t,e,r){"use strict";var n=r(0);function a(){}for(var i in n)a[i]=n[i];a.MAX_ITERATIONS=2500,a.DEFAULT_EDGE_LENGTH=50,a.DEFAULT_SPRING_STRENGTH=.45,a.DEFAULT_REPULSION_STRENGTH=4500,a.DEFAULT_GRAVITY_STRENGTH=.4,a.DEFAULT_COMPOUND_GRAVITY_STRENGTH=1,a.DEFAULT_GRAVITY_RANGE_FACTOR=3.8,a.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=1.5,a.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION=!0,a.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION=!0,a.DEFAULT_COOLING_FACTOR_INCREMENTAL=.3,a.COOLING_ADAPTATION_FACTOR=.33,a.ADAPTATION_LOWER_NODE_LIMIT=1e3,a.ADAPTATION_UPPER_NODE_LIMIT=5e3,a.MAX_NODE_DISPLACEMENT_INCREMENTAL=100,a.MAX_NODE_DISPLACEMENT=a.MAX_NODE_DISPLACEMENT_INCREMENTAL*3,a.MIN_REPULSION_DIST=a.DEFAULT_EDGE_LENGTH/10,a.CONVERGENCE_CHECK_PERIOD=100,a.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=.1,a.MIN_EDGE_LENGTH=1,a.GRID_CALCULATION_CHECK_PERIOD=10,t.exports=a}),(function(t,e,r){"use strict";function n(a,i){a==null&&i==null?(this.x=0,this.y=0):(this.x=a,this.y=i)}n.prototype.getX=function(){return this.x},n.prototype.getY=function(){return this.y},n.prototype.setX=function(a){this.x=a},n.prototype.setY=function(a){this.y=a},n.prototype.getDifference=function(a){return new DimensionD(this.x-a.x,this.y-a.y)},n.prototype.getCopy=function(){return new n(this.x,this.y)},n.prototype.translate=function(a){return this.x+=a.width,this.y+=a.height,this},t.exports=n}),(function(t,e,r){"use strict";var n=r(2),a=r(10),i=r(0),s=r(7),o=r(3),l=r(1),u=r(13),h=r(12),f=r(11);function d(m,g,v){n.call(this,v),this.estimatedSize=a.MIN_VALUE,this.margin=i.DEFAULT_GRAPH_MARGIN,this.edges=[],this.nodes=[],this.isConnected=!1,this.parent=m,g!=null&&g instanceof s?this.graphManager=g:g!=null&&g instanceof Layout&&(this.graphManager=g.graphManager)}d.prototype=Object.create(n.prototype);for(var p in n)d[p]=n[p];d.prototype.getNodes=function(){return this.nodes},d.prototype.getEdges=function(){return this.edges},d.prototype.getGraphManager=function(){return this.graphManager},d.prototype.getParent=function(){return this.parent},d.prototype.getLeft=function(){return this.left},d.prototype.getRight=function(){return this.right},d.prototype.getTop=function(){return this.top},d.prototype.getBottom=function(){return this.bottom},d.prototype.isConnected=function(){return this.isConnected},d.prototype.add=function(m,g,v){if(g==null&&v==null){var y=m;if(this.graphManager==null)throw"Graph has no graph mgr!";if(this.getNodes().indexOf(y)>-1)throw"Node already in graph!";return y.owner=this,this.getNodes().push(y),y}else{var b=m;if(!(this.getNodes().indexOf(g)>-1&&this.getNodes().indexOf(v)>-1))throw"Source or target not in graph!";if(!(g.owner==v.owner&&g.owner==this))throw"Both owners must be this graph!";return g.owner!=v.owner?null:(b.source=g,b.target=v,b.isInterGraph=!1,this.getEdges().push(b),g.edges.push(b),v!=g&&v.edges.push(b),b)}},d.prototype.remove=function(m){var g=m;if(m instanceof o){if(g==null)throw"Node is null!";if(!(g.owner!=null&&g.owner==this))throw"Owner graph is invalid!";if(this.graphManager==null)throw"Owner graph manager is invalid!";for(var v=g.edges.slice(),y,b=v.length,w=0;w-1&&E>-1))throw"Source and/or target doesn't know this edge!";y.source.edges.splice(k,1),y.target!=y.source&&y.target.edges.splice(E,1);var C=y.source.owner.getEdges().indexOf(y);if(C==-1)throw"Not in owner's edge list!";y.source.owner.getEdges().splice(C,1)}},d.prototype.updateLeftTop=function(){for(var m=a.MAX_VALUE,g=a.MAX_VALUE,v,y,b,w=this.getNodes(),C=w.length,k=0;kv&&(m=v),g>y&&(g=y)}return m==a.MAX_VALUE?null:(w[0].getParent().paddingLeft!=null?b=w[0].getParent().paddingLeft:b=this.margin,this.left=g-b,this.top=m-b,new h(this.left,this.top))},d.prototype.updateBounds=function(m){for(var g=a.MAX_VALUE,v=-a.MAX_VALUE,y=a.MAX_VALUE,b=-a.MAX_VALUE,w,C,k,E,_,S=this.nodes,L=S.length,M=0;Mw&&(g=w),vk&&(y=k),bw&&(g=w),vk&&(y=k),b=this.nodes.length){var L=0;v.forEach(function(M){M.owner==m&&L++}),L==this.nodes.length&&(this.isConnected=!0)}},t.exports=d}),(function(t,e,r){"use strict";var n,a=r(1);function i(s){n=r(6),this.layout=s,this.graphs=[],this.edges=[]}i.prototype.addRoot=function(){var s=this.layout.newGraph(),o=this.layout.newNode(null),l=this.add(s,o);return this.setRootGraph(l),this.rootGraph},i.prototype.add=function(s,o,l,u,h){if(l==null&&u==null&&h==null){if(s==null)throw"Graph is null!";if(o==null)throw"Parent node is null!";if(this.graphs.indexOf(s)>-1)throw"Graph already in this graph mgr!";if(this.graphs.push(s),s.parent!=null)throw"Already has a parent!";if(o.child!=null)throw"Already has a child!";return s.parent=o,o.child=s,s}else{h=l,u=o,l=s;var f=u.getOwner(),d=h.getOwner();if(!(f!=null&&f.getGraphManager()==this))throw"Source not in this graph mgr!";if(!(d!=null&&d.getGraphManager()==this))throw"Target not in this graph mgr!";if(f==d)return l.isInterGraph=!1,f.add(l,u,h);if(l.isInterGraph=!0,l.source=u,l.target=h,this.edges.indexOf(l)>-1)throw"Edge already in inter-graph edge list!";if(this.edges.push(l),!(l.source!=null&&l.target!=null))throw"Edge source and/or target is null!";if(!(l.source.edges.indexOf(l)==-1&&l.target.edges.indexOf(l)==-1))throw"Edge already in source and/or target incidency list!";return l.source.edges.push(l),l.target.edges.push(l),l}},i.prototype.remove=function(s){if(s instanceof n){var o=s;if(o.getGraphManager()!=this)throw"Graph not in this graph mgr";if(!(o==this.rootGraph||o.parent!=null&&o.parent.graphManager==this))throw"Invalid parent node!";var l=[];l=l.concat(o.getEdges());for(var u,h=l.length,f=0;f=s.getRight()?o[0]+=Math.min(s.getX()-i.getX(),i.getRight()-s.getRight()):s.getX()<=i.getX()&&s.getRight()>=i.getRight()&&(o[0]+=Math.min(i.getX()-s.getX(),s.getRight()-i.getRight())),i.getY()<=s.getY()&&i.getBottom()>=s.getBottom()?o[1]+=Math.min(s.getY()-i.getY(),i.getBottom()-s.getBottom()):s.getY()<=i.getY()&&s.getBottom()>=i.getBottom()&&(o[1]+=Math.min(i.getY()-s.getY(),s.getBottom()-i.getBottom()));var h=Math.abs((s.getCenterY()-i.getCenterY())/(s.getCenterX()-i.getCenterX()));s.getCenterY()===i.getCenterY()&&s.getCenterX()===i.getCenterX()&&(h=1);var f=h*o[0],d=o[1]/h;o[0]f)return o[0]=l,o[1]=p,o[2]=h,o[3]=S,!1;if(uh)return o[0]=d,o[1]=u,o[2]=E,o[3]=f,!1;if(lh?(o[0]=g,o[1]=v,T=!0):(o[0]=m,o[1]=p,T=!0):N===R&&(l>h?(o[0]=d,o[1]=p,T=!0):(o[0]=y,o[1]=v,T=!0)),-O===R?h>l?(o[2]=_,o[3]=S,I=!0):(o[2]=E,o[3]=k,I=!0):O===R&&(h>l?(o[2]=C,o[3]=k,I=!0):(o[2]=L,o[3]=S,I=!0)),T&&I)return!1;if(l>h?u>f?(P=this.getCardinalDirection(N,R,4),B=this.getCardinalDirection(O,R,2)):(P=this.getCardinalDirection(-N,R,3),B=this.getCardinalDirection(-O,R,1)):u>f?(P=this.getCardinalDirection(-N,R,1),B=this.getCardinalDirection(-O,R,3)):(P=this.getCardinalDirection(N,R,2),B=this.getCardinalDirection(O,R,4)),!T)switch(P){case 1:G=p,F=l+-w/R,o[0]=F,o[1]=G;break;case 2:F=y,G=u+b*R,o[0]=F,o[1]=G;break;case 3:G=v,F=l+w/R,o[0]=F,o[1]=G;break;case 4:F=g,G=u+-b*R,o[0]=F,o[1]=G;break}if(!I)switch(B){case 1:H=k,z=h+-D/R,o[2]=z,o[3]=H;break;case 2:z=L,H=f+M*R,o[2]=z,o[3]=H;break;case 3:H=S,z=h+D/R,o[2]=z,o[3]=H;break;case 4:z=_,H=f+-M*R,o[2]=z,o[3]=H;break}}return!1},a.getCardinalDirection=function(i,s,o){return i>s?o:1+o%4},a.getIntersection=function(i,s,o,l){if(l==null)return this.getIntersection2(i,s,o);var u=i.x,h=i.y,f=s.x,d=s.y,p=o.x,m=o.y,g=l.x,v=l.y,y=void 0,b=void 0,w=void 0,C=void 0,k=void 0,E=void 0,_=void 0,S=void 0,L=void 0;return w=d-h,k=u-f,_=f*h-u*d,C=v-m,E=p-g,S=g*m-p*v,L=w*E-C*k,L===0?null:(y=(k*S-E*_)/L,b=(C*_-w*S)/L,new n(y,b))},a.angleOfVector=function(i,s,o,l){var u=void 0;return i!==o?(u=Math.atan((l-s)/(o-i)),o=0){var v=(-p+Math.sqrt(p*p-4*d*m))/(2*d),y=(-p-Math.sqrt(p*p-4*d*m))/(2*d),b=null;return v>=0&&v<=1?[v]:y>=0&&y<=1?[y]:b}else return null},a.HALF_PI=.5*Math.PI,a.ONE_AND_HALF_PI=1.5*Math.PI,a.TWO_PI=2*Math.PI,a.THREE_PI=3*Math.PI,t.exports=a}),(function(t,e,r){"use strict";function n(){}n.sign=function(a){return a>0?1:a<0?-1:0},n.floor=function(a){return a<0?Math.ceil(a):Math.floor(a)},n.ceil=function(a){return a<0?Math.floor(a):Math.ceil(a)},t.exports=n}),(function(t,e,r){"use strict";function n(){}n.MAX_VALUE=2147483647,n.MIN_VALUE=-2147483648,t.exports=n}),(function(t,e,r){"use strict";var n=(function(){function u(h,f){for(var d=0;d"u"?"undefined":n(i);return i==null||s!="object"&&s!="function"},t.exports=a}),(function(t,e,r){"use strict";function n(p){if(Array.isArray(p)){for(var m=0,g=Array(p.length);m0&&m;){for(w.push(k[0]);w.length>0&&m;){var E=w[0];w.splice(0,1),b.add(E);for(var _=E.getEdges(),y=0;y<_.length;y++){var S=_[y].getOtherEnd(E);if(C.get(E)!=S)if(!b.has(S))w.push(S),C.set(S,E);else{m=!1;break}}}if(!m)p=[];else{var L=[].concat(n(b));p.push(L);for(var y=0;y-1&&k.splice(D,1)}b=new Set,C=new Map}}return p},d.prototype.createDummyNodesForBendpoints=function(p){for(var m=[],g=p.source,v=this.graphManager.calcLowestCommonAncestor(p.source,p.target),y=0;y0){for(var v=this.edgeToDummyNodes.get(g),y=0;y=0&&m.splice(S,1);var L=C.getNeighborsList();L.forEach(function(T){if(g.indexOf(T)<0){var I=v.get(T),N=I-1;N==1&&E.push(T),v.set(T,N)}})}g=g.concat(E),(m.length==1||m.length==2)&&(y=!0,b=m[0])}return b},d.prototype.setGraphManager=function(p){this.graphManager=p},t.exports=d}),(function(t,e,r){"use strict";function n(){}n.seed=1,n.x=0,n.nextDouble=function(){return n.x=Math.sin(n.seed++)*1e4,n.x-Math.floor(n.x)},t.exports=n}),(function(t,e,r){"use strict";var n=r(5);function a(i,s){this.lworldOrgX=0,this.lworldOrgY=0,this.ldeviceOrgX=0,this.ldeviceOrgY=0,this.lworldExtX=1,this.lworldExtY=1,this.ldeviceExtX=1,this.ldeviceExtY=1}a.prototype.getWorldOrgX=function(){return this.lworldOrgX},a.prototype.setWorldOrgX=function(i){this.lworldOrgX=i},a.prototype.getWorldOrgY=function(){return this.lworldOrgY},a.prototype.setWorldOrgY=function(i){this.lworldOrgY=i},a.prototype.getWorldExtX=function(){return this.lworldExtX},a.prototype.setWorldExtX=function(i){this.lworldExtX=i},a.prototype.getWorldExtY=function(){return this.lworldExtY},a.prototype.setWorldExtY=function(i){this.lworldExtY=i},a.prototype.getDeviceOrgX=function(){return this.ldeviceOrgX},a.prototype.setDeviceOrgX=function(i){this.ldeviceOrgX=i},a.prototype.getDeviceOrgY=function(){return this.ldeviceOrgY},a.prototype.setDeviceOrgY=function(i){this.ldeviceOrgY=i},a.prototype.getDeviceExtX=function(){return this.ldeviceExtX},a.prototype.setDeviceExtX=function(i){this.ldeviceExtX=i},a.prototype.getDeviceExtY=function(){return this.ldeviceExtY},a.prototype.setDeviceExtY=function(i){this.ldeviceExtY=i},a.prototype.transformX=function(i){var s=0,o=this.lworldExtX;return o!=0&&(s=this.ldeviceOrgX+(i-this.lworldOrgX)*this.ldeviceExtX/o),s},a.prototype.transformY=function(i){var s=0,o=this.lworldExtY;return o!=0&&(s=this.ldeviceOrgY+(i-this.lworldOrgY)*this.ldeviceExtY/o),s},a.prototype.inverseTransformX=function(i){var s=0,o=this.ldeviceExtX;return o!=0&&(s=this.lworldOrgX+(i-this.ldeviceOrgX)*this.lworldExtX/o),s},a.prototype.inverseTransformY=function(i){var s=0,o=this.ldeviceExtY;return o!=0&&(s=this.lworldOrgY+(i-this.ldeviceOrgY)*this.lworldExtY/o),s},a.prototype.inverseTransformPoint=function(i){var s=new n(this.inverseTransformX(i.x),this.inverseTransformY(i.y));return s},t.exports=a}),(function(t,e,r){"use strict";function n(f){if(Array.isArray(f)){for(var d=0,p=Array(f.length);di.ADAPTATION_LOWER_NODE_LIMIT&&(this.coolingFactor=Math.max(this.coolingFactor*i.COOLING_ADAPTATION_FACTOR,this.coolingFactor-(f-i.ADAPTATION_LOWER_NODE_LIMIT)/(i.ADAPTATION_UPPER_NODE_LIMIT-i.ADAPTATION_LOWER_NODE_LIMIT)*this.coolingFactor*(1-i.COOLING_ADAPTATION_FACTOR))),this.maxNodeDisplacement=i.MAX_NODE_DISPLACEMENT_INCREMENTAL):(f>i.ADAPTATION_LOWER_NODE_LIMIT?this.coolingFactor=Math.max(i.COOLING_ADAPTATION_FACTOR,1-(f-i.ADAPTATION_LOWER_NODE_LIMIT)/(i.ADAPTATION_UPPER_NODE_LIMIT-i.ADAPTATION_LOWER_NODE_LIMIT)*(1-i.COOLING_ADAPTATION_FACTOR)):this.coolingFactor=1,this.initialCoolingFactor=this.coolingFactor,this.maxNodeDisplacement=i.MAX_NODE_DISPLACEMENT),this.maxIterations=Math.max(this.getAllNodes().length*5,this.maxIterations),this.displacementThresholdPerNode=3*i.DEFAULT_EDGE_LENGTH/100,this.totalDisplacementThreshold=this.displacementThresholdPerNode*this.getAllNodes().length,this.repulsionRange=this.calcRepulsionRange()},u.prototype.calcSpringForces=function(){for(var f=this.getAllEdges(),d,p=0;p0&&arguments[0]!==void 0?arguments[0]:!0,d=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,p,m,g,v,y=this.getAllNodes(),b;if(this.useFRGridVariant)for(this.totalIterations%i.GRID_CALCULATION_CHECK_PERIOD==1&&f&&this.updateGrid(),b=new Set,p=0;pw||b>w)&&(f.gravitationForceX=-this.gravityConstant*g,f.gravitationForceY=-this.gravityConstant*v)):(w=d.getEstimatedSize()*this.compoundGravityRangeFactor,(y>w||b>w)&&(f.gravitationForceX=-this.gravityConstant*g*this.compoundGravityConstant,f.gravitationForceY=-this.gravityConstant*v*this.compoundGravityConstant))},u.prototype.isConverged=function(){var f,d=!1;return this.totalIterations>this.maxIterations/3&&(d=Math.abs(this.totalDisplacement-this.oldTotalDisplacement)<2),f=this.totalDisplacement=y.length||w>=y[0].length)){for(var C=0;Cu}}]),o})();t.exports=s}),(function(t,e,r){"use strict";function n(){}n.svd=function(a){this.U=null,this.V=null,this.s=null,this.m=0,this.n=0,this.m=a.length,this.n=a[0].length;var i=Math.min(this.m,this.n);this.s=(function(lt){for(var ct=[];lt-- >0;)ct.push(0);return ct})(Math.min(this.m+1,this.n)),this.U=(function(lt){var ct=function ft(dt){if(dt.length==0)return 0;for(var yt=[],at=0;at0;)ct.push(0);return ct})(this.n),o=(function(lt){for(var ct=[];lt-- >0;)ct.push(0);return ct})(this.m),l=!0,u=!0,h=Math.min(this.m-1,this.n),f=Math.max(0,Math.min(this.n-2,this.m)),d=0;d=0;R--)if(this.s[R]!==0){for(var P=R+1;P=0;Y--){if((function(lt,ct){return lt&&ct})(Y0;){var ae=void 0,W=void 0;for(ae=I-2;ae>=-1&&ae!==-1;ae--)if(Math.abs(s[ae])<=X+K*(Math.abs(this.s[ae])+Math.abs(this.s[ae+1]))){s[ae]=0;break}if(ae===I-2)W=4;else{var Se=void 0;for(Se=I-1;Se>=ae&&Se!==ae;Se--){var ne=(Se!==I?Math.abs(s[Se]):0)+(Se!==ae+1?Math.abs(s[Se-1]):0);if(Math.abs(this.s[Se])<=X+K*ne){this.s[Se]=0;break}}Se===ae?W=3:Se===I-1?W=1:(W=2,ae=Se)}switch(ae++,W){case 1:{var ee=s[I-2];s[I-2]=0;for(var $e=I-2;$e>=ae;$e--){var me=n.hypot(this.s[$e],ee),Ie=this.s[$e]/me,Ue=ee/me;if(this.s[$e]=me,$e!==ae&&(ee=-Ue*s[$e-1],s[$e-1]=Ie*s[$e-1]),u)for(var Fe=0;Fe=this.s[ae+1]);){var nt=this.s[ae];if(this.s[ae]=this.s[ae+1],this.s[ae+1]=nt,u&&aeMath.abs(i)?(s=i/a,s=Math.abs(a)*Math.sqrt(1+s*s)):i!=0?(s=a/i,s=Math.abs(i)*Math.sqrt(1+s*s)):s=0,s},t.exports=n}),(function(t,e,r){"use strict";var n=(function(){function s(o,l){for(var u=0;u2&&arguments[2]!==void 0?arguments[2]:1,h=arguments.length>3&&arguments[3]!==void 0?arguments[3]:-1,f=arguments.length>4&&arguments[4]!==void 0?arguments[4]:-1;a(this,s),this.sequence1=o,this.sequence2=l,this.match_score=u,this.mismatch_penalty=h,this.gap_penalty=f,this.iMax=o.length+1,this.jMax=l.length+1,this.grid=new Array(this.iMax);for(var d=0;d=0;o--){var l=this.listeners[o];l.event===i&&l.callback===s&&this.listeners.splice(o,1)}},a.emit=function(i,s){for(var o=0;o{(function(e,r){typeof rk=="object"&&typeof aY=="object"?aY.exports=r(nY()):typeof define=="function"&&define.amd?define(["layout-base"],r):typeof rk=="object"?rk.coseBase=r(nY()):e.coseBase=r(e.layoutBase)})(rk,function(t){return(()=>{"use strict";var e={45:((i,s,o)=>{var l={};l.layoutBase=o(551),l.CoSEConstants=o(806),l.CoSEEdge=o(767),l.CoSEGraph=o(880),l.CoSEGraphManager=o(578),l.CoSELayout=o(765),l.CoSENode=o(991),l.ConstraintHandler=o(902),i.exports=l}),806:((i,s,o)=>{var l=o(551).FDLayoutConstants;function u(){}for(var h in l)u[h]=l[h];u.DEFAULT_USE_MULTI_LEVEL_SCALING=!1,u.DEFAULT_RADIAL_SEPARATION=l.DEFAULT_EDGE_LENGTH,u.DEFAULT_COMPONENT_SEPERATION=60,u.TILE=!0,u.TILING_PADDING_VERTICAL=10,u.TILING_PADDING_HORIZONTAL=10,u.TRANSFORM_ON_CONSTRAINT_HANDLING=!0,u.ENFORCE_CONSTRAINTS=!0,u.APPLY_LAYOUT=!0,u.RELAX_MOVEMENT_ON_CONSTRAINTS=!0,u.TREE_REDUCTION_ON_INCREMENTAL=!0,u.PURE_INCREMENTAL=u.DEFAULT_INCREMENTAL,i.exports=u}),767:((i,s,o)=>{var l=o(551).FDLayoutEdge;function u(f,d,p){l.call(this,f,d,p)}u.prototype=Object.create(l.prototype);for(var h in l)u[h]=l[h];i.exports=u}),880:((i,s,o)=>{var l=o(551).LGraph;function u(f,d,p){l.call(this,f,d,p)}u.prototype=Object.create(l.prototype);for(var h in l)u[h]=l[h];i.exports=u}),578:((i,s,o)=>{var l=o(551).LGraphManager;function u(f){l.call(this,f)}u.prototype=Object.create(l.prototype);for(var h in l)u[h]=l[h];i.exports=u}),765:((i,s,o)=>{var l=o(551).FDLayout,u=o(578),h=o(880),f=o(991),d=o(767),p=o(806),m=o(902),g=o(551).FDLayoutConstants,v=o(551).LayoutConstants,y=o(551).Point,b=o(551).PointD,w=o(551).DimensionD,C=o(551).Layout,k=o(551).Integer,E=o(551).IGeometry,_=o(551).LGraph,S=o(551).Transform,L=o(551).LinkedList;function M(){l.call(this),this.toBeTiled={},this.constraints={}}M.prototype=Object.create(l.prototype);for(var D in l)M[D]=l[D];M.prototype.newGraphManager=function(){var T=new u(this);return this.graphManager=T,T},M.prototype.newGraph=function(T){return new h(null,this.graphManager,T)},M.prototype.newNode=function(T){return new f(this.graphManager,T)},M.prototype.newEdge=function(T){return new d(null,null,T)},M.prototype.initParameters=function(){l.prototype.initParameters.call(this,arguments),this.isSubLayout||(p.DEFAULT_EDGE_LENGTH<10?this.idealEdgeLength=10:this.idealEdgeLength=p.DEFAULT_EDGE_LENGTH,this.useSmartIdealEdgeLengthCalculation=p.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.gravityConstant=g.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=g.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=g.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=g.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.prunedNodesAll=[],this.growTreeIterations=0,this.afterGrowthIterations=0,this.isTreeGrowing=!1,this.isGrowthFinished=!1)},M.prototype.initSpringEmbedder=function(){l.prototype.initSpringEmbedder.call(this),this.coolingCycle=0,this.maxCoolingCycle=this.maxIterations/g.CONVERGENCE_CHECK_PERIOD,this.finalTemperature=.04,this.coolingAdjuster=1},M.prototype.layout=function(){var T=v.DEFAULT_CREATE_BENDS_AS_NEEDED;return T&&(this.createBendpoints(),this.graphManager.resetAllEdges()),this.level=0,this.classicLayout()},M.prototype.classicLayout=function(){if(this.nodesWithGravity=this.calculateNodesToApplyGravitationTo(),this.graphManager.setAllNodesToApplyGravitation(this.nodesWithGravity),this.calcNoOfChildrenForAllNodes(),this.graphManager.calcLowestCommonAncestors(),this.graphManager.calcInclusionTreeDepths(),this.graphManager.getRoot().calcEstimatedSize(),this.calcIdealEdgeLengths(),this.incremental){if(p.TREE_REDUCTION_ON_INCREMENTAL){this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var I=new Set(this.getAllNodes()),N=this.nodesWithGravity.filter(function(P){return I.has(P)});this.graphManager.setAllNodesToApplyGravitation(N)}}else{var T=this.getFlatForest();if(T.length>0)this.positionNodesRadially(T);else{this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var I=new Set(this.getAllNodes()),N=this.nodesWithGravity.filter(function(O){return I.has(O)});this.graphManager.setAllNodesToApplyGravitation(N),this.positionNodesRandomly()}}return Object.keys(this.constraints).length>0&&(m.handleConstraints(this),this.initConstraintVariables()),this.initSpringEmbedder(),p.APPLY_LAYOUT&&this.runSpringEmbedder(),!0},M.prototype.tick=function(){if(this.totalIterations++,this.totalIterations===this.maxIterations&&!this.isTreeGrowing&&!this.isGrowthFinished)if(this.prunedNodesAll.length>0)this.isTreeGrowing=!0;else return!0;if(this.totalIterations%g.CONVERGENCE_CHECK_PERIOD==0&&!this.isTreeGrowing&&!this.isGrowthFinished){if(this.isConverged())if(this.prunedNodesAll.length>0)this.isTreeGrowing=!0;else return!0;this.coolingCycle++,this.layoutQuality==0?this.coolingAdjuster=this.coolingCycle:this.layoutQuality==1&&(this.coolingAdjuster=this.coolingCycle/3),this.coolingFactor=Math.max(this.initialCoolingFactor-Math.pow(this.coolingCycle,Math.log(100*(this.initialCoolingFactor-this.finalTemperature))/Math.log(this.maxCoolingCycle))/100*this.coolingAdjuster,this.finalTemperature),this.animationPeriod=Math.ceil(this.initialAnimationPeriod*Math.sqrt(this.coolingFactor))}if(this.isTreeGrowing){if(this.growTreeIterations%10==0)if(this.prunedNodesAll.length>0){this.graphManager.updateBounds(),this.updateGrid(),this.growTree(this.prunedNodesAll),this.graphManager.resetAllNodesToApplyGravitation();var T=new Set(this.getAllNodes()),I=this.nodesWithGravity.filter(function(R){return T.has(R)});this.graphManager.setAllNodesToApplyGravitation(I),this.graphManager.updateBounds(),this.updateGrid(),p.PURE_INCREMENTAL?this.coolingFactor=g.DEFAULT_COOLING_FACTOR_INCREMENTAL/2:this.coolingFactor=g.DEFAULT_COOLING_FACTOR_INCREMENTAL}else this.isTreeGrowing=!1,this.isGrowthFinished=!0;this.growTreeIterations++}if(this.isGrowthFinished){if(this.isConverged())return!0;this.afterGrowthIterations%10==0&&(this.graphManager.updateBounds(),this.updateGrid()),p.PURE_INCREMENTAL?this.coolingFactor=g.DEFAULT_COOLING_FACTOR_INCREMENTAL/2*((100-this.afterGrowthIterations)/100):this.coolingFactor=g.DEFAULT_COOLING_FACTOR_INCREMENTAL*((100-this.afterGrowthIterations)/100),this.afterGrowthIterations++}var N=!this.isTreeGrowing&&!this.isGrowthFinished,O=this.growTreeIterations%10==1&&this.isTreeGrowing||this.afterGrowthIterations%10==1&&this.isGrowthFinished;return this.totalDisplacement=0,this.graphManager.updateBounds(),this.calcSpringForces(),this.calcRepulsionForces(N,O),this.calcGravitationalForces(),this.moveNodes(),this.animate(),!1},M.prototype.getPositionsData=function(){for(var T=this.graphManager.getAllNodes(),I={},N=0;N0&&this.updateDisplacements();for(var N=0;N0&&(O.fixedNodeWeight=P)}}if(this.constraints.relativePlacementConstraint){var B=new Map,F=new Map;if(this.dummyToNodeForVerticalAlignment=new Map,this.dummyToNodeForHorizontalAlignment=new Map,this.fixedNodesOnHorizontal=new Set,this.fixedNodesOnVertical=new Set,this.fixedNodeSet.forEach(function(oe){T.fixedNodesOnHorizontal.add(oe),T.fixedNodesOnVertical.add(oe)}),this.constraints.alignmentConstraint){if(this.constraints.alignmentConstraint.vertical)for(var G=this.constraints.alignmentConstraint.vertical,N=0;N=2*oe.length/3;j--)pe=Math.floor(Math.random()*(j+1)),J=oe[j],oe[j]=oe[pe],oe[pe]=J;return oe},this.nodesInRelativeHorizontal=[],this.nodesInRelativeVertical=[],this.nodeToRelativeConstraintMapHorizontal=new Map,this.nodeToRelativeConstraintMapVertical=new Map,this.nodeToTempPositionMapHorizontal=new Map,this.nodeToTempPositionMapVertical=new Map,this.constraints.relativePlacementConstraint.forEach(function(oe){if(oe.left){var pe=B.has(oe.left)?B.get(oe.left):oe.left,J=B.has(oe.right)?B.get(oe.right):oe.right;T.nodesInRelativeHorizontal.includes(pe)||(T.nodesInRelativeHorizontal.push(pe),T.nodeToRelativeConstraintMapHorizontal.set(pe,[]),T.dummyToNodeForVerticalAlignment.has(pe)?T.nodeToTempPositionMapHorizontal.set(pe,T.idToNodeMap.get(T.dummyToNodeForVerticalAlignment.get(pe)[0]).getCenterX()):T.nodeToTempPositionMapHorizontal.set(pe,T.idToNodeMap.get(pe).getCenterX())),T.nodesInRelativeHorizontal.includes(J)||(T.nodesInRelativeHorizontal.push(J),T.nodeToRelativeConstraintMapHorizontal.set(J,[]),T.dummyToNodeForVerticalAlignment.has(J)?T.nodeToTempPositionMapHorizontal.set(J,T.idToNodeMap.get(T.dummyToNodeForVerticalAlignment.get(J)[0]).getCenterX()):T.nodeToTempPositionMapHorizontal.set(J,T.idToNodeMap.get(J).getCenterX())),T.nodeToRelativeConstraintMapHorizontal.get(pe).push({right:J,gap:oe.gap}),T.nodeToRelativeConstraintMapHorizontal.get(J).push({left:pe,gap:oe.gap})}else{var j=F.has(oe.top)?F.get(oe.top):oe.top,Z=F.has(oe.bottom)?F.get(oe.bottom):oe.bottom;T.nodesInRelativeVertical.includes(j)||(T.nodesInRelativeVertical.push(j),T.nodeToRelativeConstraintMapVertical.set(j,[]),T.dummyToNodeForHorizontalAlignment.has(j)?T.nodeToTempPositionMapVertical.set(j,T.idToNodeMap.get(T.dummyToNodeForHorizontalAlignment.get(j)[0]).getCenterY()):T.nodeToTempPositionMapVertical.set(j,T.idToNodeMap.get(j).getCenterY())),T.nodesInRelativeVertical.includes(Z)||(T.nodesInRelativeVertical.push(Z),T.nodeToRelativeConstraintMapVertical.set(Z,[]),T.dummyToNodeForHorizontalAlignment.has(Z)?T.nodeToTempPositionMapVertical.set(Z,T.idToNodeMap.get(T.dummyToNodeForHorizontalAlignment.get(Z)[0]).getCenterY()):T.nodeToTempPositionMapVertical.set(Z,T.idToNodeMap.get(Z).getCenterY())),T.nodeToRelativeConstraintMapVertical.get(j).push({bottom:Z,gap:oe.gap}),T.nodeToRelativeConstraintMapVertical.get(Z).push({top:j,gap:oe.gap})}});else{var H=new Map,Q=new Map;this.constraints.relativePlacementConstraint.forEach(function(oe){if(oe.left){var pe=B.has(oe.left)?B.get(oe.left):oe.left,J=B.has(oe.right)?B.get(oe.right):oe.right;H.has(pe)?H.get(pe).push(J):H.set(pe,[J]),H.has(J)?H.get(J).push(pe):H.set(J,[pe])}else{var j=F.has(oe.top)?F.get(oe.top):oe.top,Z=F.has(oe.bottom)?F.get(oe.bottom):oe.bottom;Q.has(j)?Q.get(j).push(Z):Q.set(j,[Z]),Q.has(Z)?Q.get(Z).push(j):Q.set(Z,[j])}});var Y=function(pe,J){var j=[],Z=[],K=new L,X=new Set,ae=0;return pe.forEach(function(W,Se){if(!X.has(Se)){j[ae]=[],Z[ae]=!1;var ne=Se;for(K.push(ne),X.add(ne),j[ae].push(ne);K.length!=0;){ne=K.shift(),J.has(ne)&&(Z[ae]=!0);var ee=pe.get(ne);ee.forEach(function($e){X.has($e)||(K.push($e),X.add($e),j[ae].push($e))})}ae++}}),{components:j,isFixed:Z}},ie=Y(H,T.fixedNodesOnHorizontal);this.componentsOnHorizontal=ie.components,this.fixedComponentsOnHorizontal=ie.isFixed;var se=Y(Q,T.fixedNodesOnVertical);this.componentsOnVertical=se.components,this.fixedComponentsOnVertical=se.isFixed}}},M.prototype.updateDisplacements=function(){var T=this;if(this.constraints.fixedNodeConstraint&&this.constraints.fixedNodeConstraint.forEach(function(se){var oe=T.idToNodeMap.get(se.nodeId);oe.displacementX=0,oe.displacementY=0}),this.constraints.alignmentConstraint){if(this.constraints.alignmentConstraint.vertical)for(var I=this.constraints.alignmentConstraint.vertical,N=0;N1){var F;for(F=0;FO&&(O=Math.floor(B.y)),P=Math.floor(B.x+p.DEFAULT_COMPONENT_SEPERATION)}this.transform(new b(v.WORLD_CENTER_X-B.x/2,v.WORLD_CENTER_Y-B.y/2))},M.radialLayout=function(T,I,N){var O=Math.max(this.maxDiagonalInTree(T),p.DEFAULT_RADIAL_SEPARATION);M.branchRadialLayout(I,null,0,359,0,O);var R=_.calculateBounds(T),P=new S;P.setDeviceOrgX(R.getMinX()),P.setDeviceOrgY(R.getMinY()),P.setWorldOrgX(N.x),P.setWorldOrgY(N.y);for(var B=0;B1;){var j=J[0];J.splice(0,1);var Z=Y.indexOf(j);Z>=0&&Y.splice(Z,1),oe--,ie--}I!=null?pe=(Y.indexOf(J[0])+1)%oe:pe=0;for(var K=Math.abs(O-N)/ie,X=pe;se!=ie;X=++X%oe){var ae=Y[X].getOtherEnd(T);if(ae!=I){var W=(N+se*K)%360,Se=(W+K)%360;M.branchRadialLayout(ae,T,W,Se,R+P,P),se++}}},M.maxDiagonalInTree=function(T){for(var I=k.MIN_VALUE,N=0;NI&&(I=R)}return I},M.prototype.calcRepulsionRange=function(){return 2*(this.level+1)*this.idealEdgeLength},M.prototype.groupZeroDegreeMembers=function(){var T=this,I={};this.memberGroups={},this.idToDummyNode={};for(var N=[],O=this.graphManager.getAllNodes(),R=0;R"u"&&(I[F]=[]),I[F]=I[F].concat(P)}Object.keys(I).forEach(function(G){if(I[G].length>1){var z="DummyCompound_"+G;T.memberGroups[z]=I[G];var H=I[G][0].getParent(),Q=new f(T.graphManager);Q.id=z,Q.paddingLeft=H.paddingLeft||0,Q.paddingRight=H.paddingRight||0,Q.paddingBottom=H.paddingBottom||0,Q.paddingTop=H.paddingTop||0,T.idToDummyNode[z]=Q;var Y=T.getGraphManager().add(T.newGraph(),Q),ie=H.getChild();ie.add(Q);for(var se=0;seR?(O.rect.x-=(O.labelWidth-R)/2,O.setWidth(O.labelWidth),O.labelMarginLeft=(O.labelWidth-R)/2):O.labelPosHorizontal=="right"&&O.setWidth(R+O.labelWidth)),O.labelHeight&&(O.labelPosVertical=="top"?(O.rect.y-=O.labelHeight,O.setHeight(P+O.labelHeight),O.labelMarginTop=O.labelHeight):O.labelPosVertical=="center"&&O.labelHeight>P?(O.rect.y-=(O.labelHeight-P)/2,O.setHeight(O.labelHeight),O.labelMarginTop=(O.labelHeight-P)/2):O.labelPosVertical=="bottom"&&O.setHeight(P+O.labelHeight))}})},M.prototype.repopulateCompounds=function(){for(var T=this.compoundOrder.length-1;T>=0;T--){var I=this.compoundOrder[T],N=I.id,O=I.paddingLeft,R=I.paddingTop,P=I.labelMarginLeft,B=I.labelMarginTop;this.adjustLocations(this.tiledMemberPack[N],I.rect.x,I.rect.y,O,R,P,B)}},M.prototype.repopulateZeroDegreeMembers=function(){var T=this,I=this.tiledZeroDegreePack;Object.keys(I).forEach(function(N){var O=T.idToDummyNode[N],R=O.paddingLeft,P=O.paddingTop,B=O.labelMarginLeft,F=O.labelMarginTop;T.adjustLocations(I[N],O.rect.x,O.rect.y,R,P,B,F)})},M.prototype.getToBeTiled=function(T){var I=T.id;if(this.toBeTiled[I]!=null)return this.toBeTiled[I];var N=T.getChild();if(N==null)return this.toBeTiled[I]=!1,!1;for(var O=N.getNodes(),R=0;R0)return this.toBeTiled[I]=!1,!1;if(P.getChild()==null){this.toBeTiled[P.id]=!1;continue}if(!this.getToBeTiled(P))return this.toBeTiled[I]=!1,!1}return this.toBeTiled[I]=!0,!0},M.prototype.getNodeDegree=function(T){for(var I=T.id,N=T.getEdges(),O=0,R=0;RH&&(H=Y.rect.height)}N+=H+T.verticalPadding}},M.prototype.tileCompoundMembers=function(T,I){var N=this;this.tiledMemberPack=[],Object.keys(T).forEach(function(O){var R=I[O];if(N.tiledMemberPack[O]=N.tileNodes(T[O],R.paddingLeft+R.paddingRight),R.rect.width=N.tiledMemberPack[O].width,R.rect.height=N.tiledMemberPack[O].height,R.setCenter(N.tiledMemberPack[O].centerX,N.tiledMemberPack[O].centerY),R.labelMarginLeft=0,R.labelMarginTop=0,p.NODE_DIMENSIONS_INCLUDE_LABELS){var P=R.rect.width,B=R.rect.height;R.labelWidth&&(R.labelPosHorizontal=="left"?(R.rect.x-=R.labelWidth,R.setWidth(P+R.labelWidth),R.labelMarginLeft=R.labelWidth):R.labelPosHorizontal=="center"&&R.labelWidth>P?(R.rect.x-=(R.labelWidth-P)/2,R.setWidth(R.labelWidth),R.labelMarginLeft=(R.labelWidth-P)/2):R.labelPosHorizontal=="right"&&R.setWidth(P+R.labelWidth)),R.labelHeight&&(R.labelPosVertical=="top"?(R.rect.y-=R.labelHeight,R.setHeight(B+R.labelHeight),R.labelMarginTop=R.labelHeight):R.labelPosVertical=="center"&&R.labelHeight>B?(R.rect.y-=(R.labelHeight-B)/2,R.setHeight(R.labelHeight),R.labelMarginTop=(R.labelHeight-B)/2):R.labelPosVertical=="bottom"&&R.setHeight(B+R.labelHeight))}})},M.prototype.tileNodes=function(T,I){var N=this.tileNodesByFavoringDim(T,I,!0),O=this.tileNodesByFavoringDim(T,I,!1),R=this.getOrgRatio(N),P=this.getOrgRatio(O),B;return PF&&(F=se.getWidth())});var G=P/R,z=B/R,H=Math.pow(N-O,2)+4*(G+O)*(z+N)*R,Q=(O-N+Math.sqrt(H))/(2*(G+O)),Y;I?(Y=Math.ceil(Q),Y==Q&&Y++):Y=Math.floor(Q);var ie=Y*(G+O)-O;return F>ie&&(ie=F),ie+=O*2,ie},M.prototype.tileNodesByFavoringDim=function(T,I,N){var O=p.TILING_PADDING_VERTICAL,R=p.TILING_PADDING_HORIZONTAL,P=p.TILING_COMPARE_BY,B={rows:[],rowWidth:[],rowHeight:[],width:0,height:I,verticalPadding:O,horizontalPadding:R,centerX:0,centerY:0};P&&(B.idealRowWidth=this.calcIdealRowWidth(T,N));var F=function(oe){return oe.rect.width*oe.rect.height},G=function(oe,pe){return F(pe)-F(oe)};T.sort(function(se,oe){var pe=G;return B.idealRowWidth?(pe=P,pe(se.id,oe.id)):pe(se,oe)});for(var z=0,H=0,Q=0;Q0&&(B+=T.horizontalPadding),T.rowWidth[N]=B,T.width0&&(F+=T.verticalPadding);var G=0;F>T.rowHeight[N]&&(G=T.rowHeight[N],T.rowHeight[N]=F,G=T.rowHeight[N]-G),T.height+=G,T.rows[N].push(I)},M.prototype.getShortestRowIndex=function(T){for(var I=-1,N=Number.MAX_VALUE,O=0;ON&&(I=O,N=T.rowWidth[O]);return I},M.prototype.canAddHorizontal=function(T,I,N){if(T.idealRowWidth){var O=T.rows.length-1,R=T.rowWidth[O];return R+I+T.horizontalPadding<=T.idealRowWidth}var P=this.getShortestRowIndex(T);if(P<0)return!0;var B=T.rowWidth[P];if(B+T.horizontalPadding+I<=T.width)return!0;var F=0;T.rowHeight[P]0&&(F=N+T.verticalPadding-T.rowHeight[P]);var G;T.width-B>=I+T.horizontalPadding?G=(T.height+F)/(B+I+T.horizontalPadding):G=(T.height+F)/T.width,F=N+T.verticalPadding;var z;return T.widthP&&I!=N){O.splice(-1,1),T.rows[N].push(R),T.rowWidth[I]=T.rowWidth[I]-P,T.rowWidth[N]=T.rowWidth[N]+P,T.width=T.rowWidth[instance.getLongestRowIndex(T)];for(var B=Number.MIN_VALUE,F=0;FB&&(B=O[F].height);I>0&&(B+=T.verticalPadding);var G=T.rowHeight[I]+T.rowHeight[N];T.rowHeight[I]=B,T.rowHeight[N]0)for(var ie=R;ie<=P;ie++)Y[0]+=this.grid[ie][B-1].length+this.grid[ie][B].length-1;if(P0)for(var ie=B;ie<=F;ie++)Y[3]+=this.grid[R-1][ie].length+this.grid[R][ie].length-1;for(var se=k.MAX_VALUE,oe,pe,J=0;J{var l=o(551).FDLayoutNode,u=o(551).IMath;function h(d,p,m,g){l.call(this,d,p,m,g)}h.prototype=Object.create(l.prototype);for(var f in l)h[f]=l[f];h.prototype.calculateDisplacement=function(){var d=this.graphManager.getLayout();this.getChild()!=null&&this.fixedNodeWeight?(this.displacementX+=d.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.fixedNodeWeight,this.displacementY+=d.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.fixedNodeWeight):(this.displacementX+=d.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.noOfChildren,this.displacementY+=d.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.noOfChildren),Math.abs(this.displacementX)>d.coolingFactor*d.maxNodeDisplacement&&(this.displacementX=d.coolingFactor*d.maxNodeDisplacement*u.sign(this.displacementX)),Math.abs(this.displacementY)>d.coolingFactor*d.maxNodeDisplacement&&(this.displacementY=d.coolingFactor*d.maxNodeDisplacement*u.sign(this.displacementY)),this.child&&this.child.getNodes().length>0&&this.propogateDisplacementToChildren(this.displacementX,this.displacementY)},h.prototype.propogateDisplacementToChildren=function(d,p){for(var m=this.getChild().getNodes(),g,v=0;v{function l(m){if(Array.isArray(m)){for(var g=0,v=Array(m.length);g0){var ot=0;Ve.forEach(function(nt){le=="horizontal"?(ye.set(nt,y.has(nt)?b[y.get(nt)]:he.get(nt)),ot+=ye.get(nt)):(ye.set(nt,y.has(nt)?w[y.get(nt)]:he.get(nt)),ot+=ye.get(nt))}),ot=ot/Ve.length,Xe.forEach(function(nt){V.has(nt)||ye.set(nt,ot)})}else{var He=0;Xe.forEach(function(nt){le=="horizontal"?He+=y.has(nt)?b[y.get(nt)]:he.get(nt):He+=y.has(nt)?w[y.get(nt)]:he.get(nt)}),He=He/Xe.length,Xe.forEach(function(nt){ye.set(nt,He)})}});for(var qe=function(){var Ve=Le.shift(),ot=$.get(Ve);ot.forEach(function(He){if(ye.get(He.id)nt&&(nt=yt),atIt&&(It=at)}}catch(Tn){Tt=!0,lt=Tn}finally{try{!it&&ct.return&&ct.return()}finally{if(Tt)throw lt}}var dn=(ot+nt)/2-(He+It)/2,Ct=!0,Ut=!1,Qt=void 0;try{for(var er=Xe[Symbol.iterator](),mr;!(Ct=(mr=er.next()).done);Ct=!0){var xr=mr.value;ye.set(xr,ye.get(xr)+dn)}}catch(Tn){Ut=!0,Qt=Tn}finally{try{!Ct&&er.return&&er.return()}finally{if(Ut)throw Qt}}})}return ye},D=function($){var le=0,V=0,he=0,de=0;if($.forEach(function(Be){Be.left?b[y.get(Be.left)]-b[y.get(Be.right)]>=0?le++:V++:w[y.get(Be.top)]-w[y.get(Be.bottom)]>=0?he++:de++}),le>V&&he>de)for(var Ne=0;NeV)for(var we=0;wede)for(var ye=0;ye1)g.fixedNodeConstraint.forEach(function(ue,$){O[$]=[ue.position.x,ue.position.y],R[$]=[b[y.get(ue.nodeId)],w[y.get(ue.nodeId)]]}),P=!0;else if(g.alignmentConstraint)(function(){var ue=0;if(g.alignmentConstraint.vertical){for(var $=g.alignmentConstraint.vertical,le=function(ye){var Be=new Set;$[ye].forEach(function(Ke){Be.add(Ke)});var Le=new Set([].concat(l(Be)).filter(function(Ke){return F.has(Ke)})),qe=void 0;Le.size>0?qe=b[y.get(Le.values().next().value)]:qe=L(Be).x,$[ye].forEach(function(Ke){O[ue]=[qe,w[y.get(Ke)]],R[ue]=[b[y.get(Ke)],w[y.get(Ke)]],ue++})},V=0;V<$.length;V++)le(V);P=!0}if(g.alignmentConstraint.horizontal){for(var he=g.alignmentConstraint.horizontal,de=function(ye){var Be=new Set;he[ye].forEach(function(Ke){Be.add(Ke)});var Le=new Set([].concat(l(Be)).filter(function(Ke){return F.has(Ke)})),qe=void 0;Le.size>0?qe=b[y.get(Le.values().next().value)]:qe=L(Be).y,he[ye].forEach(function(Ke){O[ue]=[b[y.get(Ke)],qe],R[ue]=[b[y.get(Ke)],w[y.get(Ke)]],ue++})},Ne=0;NeQ&&(Q=H[ie].length,Y=ie);if(Q0){var Ie={x:0,y:0};g.fixedNodeConstraint.forEach(function(ue,$){var le={x:b[y.get(ue.nodeId)],y:w[y.get(ue.nodeId)]},V=ue.position,he=S(V,le);Ie.x+=he.x,Ie.y+=he.y}),Ie.x/=g.fixedNodeConstraint.length,Ie.y/=g.fixedNodeConstraint.length,b.forEach(function(ue,$){b[$]+=Ie.x}),w.forEach(function(ue,$){w[$]+=Ie.y}),g.fixedNodeConstraint.forEach(function(ue){b[y.get(ue.nodeId)]=ue.position.x,w[y.get(ue.nodeId)]=ue.position.y})}if(g.alignmentConstraint){if(g.alignmentConstraint.vertical)for(var Ue=g.alignmentConstraint.vertical,Fe=function($){var le=new Set;Ue[$].forEach(function(de){le.add(de)});var V=new Set([].concat(l(le)).filter(function(de){return F.has(de)})),he=void 0;V.size>0?he=b[y.get(V.values().next().value)]:he=L(le).x,le.forEach(function(de){F.has(de)||(b[y.get(de)]=he)})},Ae=0;Ae0?he=w[y.get(V.values().next().value)]:he=L(le).y,le.forEach(function(de){F.has(de)||(w[y.get(de)]=he)})},ve=0;ve{i.exports=t})},r={};function n(i){var s=r[i];if(s!==void 0)return s.exports;var o=r[i]={exports:{}};return e[i](o,o.exports,n),o.exports}var a=n(45);return a})()})});var IRe=va((nk,sY)=>{(function(e,r){typeof nk=="object"&&typeof sY=="object"?sY.exports=r(iY()):typeof define=="function"&&define.amd?define(["cose-base"],r):typeof nk=="object"?nk.cytoscapeFcose=r(iY()):e.cytoscapeFcose=r(e.coseBase)})(nk,function(t){return(()=>{"use strict";var e={658:(i=>{i.exports=Object.assign!=null?Object.assign.bind(Object):function(s){for(var o=arguments.length,l=Array(o>1?o-1:0),u=1;u{var l=(function(){function f(d,p){var m=[],g=!0,v=!1,y=void 0;try{for(var b=d[Symbol.iterator](),w;!(g=(w=b.next()).done)&&(m.push(w.value),!(p&&m.length===p));g=!0);}catch(C){v=!0,y=C}finally{try{!g&&b.return&&b.return()}finally{if(v)throw y}}return m}return function(d,p){if(Array.isArray(d))return d;if(Symbol.iterator in Object(d))return f(d,p);throw new TypeError("Invalid attempt to destructure non-iterable instance")}})(),u=o(140).layoutBase.LinkedList,h={};h.getTopMostNodes=function(f){for(var d={},p=0;p0&&P.merge(z)});for(var B=0;B1){w=y[0],C=w.connectedEdges().length,y.forEach(function(R){R.connectedEdges().length0&&m.set("dummy"+(m.size+1),_),S},h.relocateComponent=function(f,d,p){if(!p.fixedNodeConstraint){var m=Number.POSITIVE_INFINITY,g=Number.NEGATIVE_INFINITY,v=Number.POSITIVE_INFINITY,y=Number.NEGATIVE_INFINITY;if(p.quality=="draft"){var b=!0,w=!1,C=void 0;try{for(var k=d.nodeIndexes[Symbol.iterator](),E;!(b=(E=k.next()).done);b=!0){var _=E.value,S=l(_,2),L=S[0],M=S[1],D=p.cy.getElementById(L);if(D){var T=D.boundingBox(),I=d.xCoords[M]-T.w/2,N=d.xCoords[M]+T.w/2,O=d.yCoords[M]-T.h/2,R=d.yCoords[M]+T.h/2;Ig&&(g=N),Oy&&(y=R)}}}catch(z){w=!0,C=z}finally{try{!b&&k.return&&k.return()}finally{if(w)throw C}}var P=f.x-(g+m)/2,B=f.y-(y+v)/2;d.xCoords=d.xCoords.map(function(z){return z+P}),d.yCoords=d.yCoords.map(function(z){return z+B})}else{Object.keys(d).forEach(function(z){var H=d[z],Q=H.getRect().x,Y=H.getRect().x+H.getRect().width,ie=H.getRect().y,se=H.getRect().y+H.getRect().height;Qg&&(g=Y),iey&&(y=se)});var F=f.x-(g+m)/2,G=f.y-(y+v)/2;Object.keys(d).forEach(function(z){var H=d[z];H.setCenter(H.getCenterX()+F,H.getCenterY()+G)})}}},h.calcBoundingBox=function(f,d,p,m){for(var g=Number.MAX_SAFE_INTEGER,v=Number.MIN_SAFE_INTEGER,y=Number.MAX_SAFE_INTEGER,b=Number.MIN_SAFE_INTEGER,w=void 0,C=void 0,k=void 0,E=void 0,_=f.descendants().not(":parent"),S=_.length,L=0;Lw&&(g=w),vk&&(y=k),b{var l=o(548),u=o(140).CoSELayout,h=o(140).CoSENode,f=o(140).layoutBase.PointD,d=o(140).layoutBase.DimensionD,p=o(140).layoutBase.LayoutConstants,m=o(140).layoutBase.FDLayoutConstants,g=o(140).CoSEConstants,v=function(b,w){var C=b.cy,k=b.eles,E=k.nodes(),_=k.edges(),S=void 0,L=void 0,M=void 0,D={};b.randomize&&(S=w.nodeIndexes,L=w.xCoords,M=w.yCoords);var T=function(z){return typeof z=="function"},I=function(z,H){return T(z)?z(H):z},N=l.calcParentsWithoutChildren(C,k),O=function G(z,H,Q,Y){for(var ie=H.length,se=0;se0){var K=void 0;K=Q.getGraphManager().add(Q.newGraph(),J),G(K,pe,Q,Y)}}},R=function(z,H,Q){for(var Y=0,ie=0,se=0;se0?g.DEFAULT_EDGE_LENGTH=m.DEFAULT_EDGE_LENGTH=Y/ie:T(b.idealEdgeLength)?g.DEFAULT_EDGE_LENGTH=m.DEFAULT_EDGE_LENGTH=50:g.DEFAULT_EDGE_LENGTH=m.DEFAULT_EDGE_LENGTH=b.idealEdgeLength,g.MIN_REPULSION_DIST=m.MIN_REPULSION_DIST=m.DEFAULT_EDGE_LENGTH/10,g.DEFAULT_RADIAL_SEPARATION=m.DEFAULT_EDGE_LENGTH)},P=function(z,H){H.fixedNodeConstraint&&(z.constraints.fixedNodeConstraint=H.fixedNodeConstraint),H.alignmentConstraint&&(z.constraints.alignmentConstraint=H.alignmentConstraint),H.relativePlacementConstraint&&(z.constraints.relativePlacementConstraint=H.relativePlacementConstraint)};b.nestingFactor!=null&&(g.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=m.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=b.nestingFactor),b.gravity!=null&&(g.DEFAULT_GRAVITY_STRENGTH=m.DEFAULT_GRAVITY_STRENGTH=b.gravity),b.numIter!=null&&(g.MAX_ITERATIONS=m.MAX_ITERATIONS=b.numIter),b.gravityRange!=null&&(g.DEFAULT_GRAVITY_RANGE_FACTOR=m.DEFAULT_GRAVITY_RANGE_FACTOR=b.gravityRange),b.gravityCompound!=null&&(g.DEFAULT_COMPOUND_GRAVITY_STRENGTH=m.DEFAULT_COMPOUND_GRAVITY_STRENGTH=b.gravityCompound),b.gravityRangeCompound!=null&&(g.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=m.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=b.gravityRangeCompound),b.initialEnergyOnIncremental!=null&&(g.DEFAULT_COOLING_FACTOR_INCREMENTAL=m.DEFAULT_COOLING_FACTOR_INCREMENTAL=b.initialEnergyOnIncremental),b.tilingCompareBy!=null&&(g.TILING_COMPARE_BY=b.tilingCompareBy),b.quality=="proof"?p.QUALITY=2:p.QUALITY=0,g.NODE_DIMENSIONS_INCLUDE_LABELS=m.NODE_DIMENSIONS_INCLUDE_LABELS=p.NODE_DIMENSIONS_INCLUDE_LABELS=b.nodeDimensionsIncludeLabels,g.DEFAULT_INCREMENTAL=m.DEFAULT_INCREMENTAL=p.DEFAULT_INCREMENTAL=!b.randomize,g.ANIMATE=m.ANIMATE=p.ANIMATE=b.animate,g.TILE=b.tile,g.TILING_PADDING_VERTICAL=typeof b.tilingPaddingVertical=="function"?b.tilingPaddingVertical.call():b.tilingPaddingVertical,g.TILING_PADDING_HORIZONTAL=typeof b.tilingPaddingHorizontal=="function"?b.tilingPaddingHorizontal.call():b.tilingPaddingHorizontal,g.DEFAULT_INCREMENTAL=m.DEFAULT_INCREMENTAL=p.DEFAULT_INCREMENTAL=!0,g.PURE_INCREMENTAL=!b.randomize,p.DEFAULT_UNIFORM_LEAF_NODE_SIZES=b.uniformNodeDimensions,b.step=="transformed"&&(g.TRANSFORM_ON_CONSTRAINT_HANDLING=!0,g.ENFORCE_CONSTRAINTS=!1,g.APPLY_LAYOUT=!1),b.step=="enforced"&&(g.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,g.ENFORCE_CONSTRAINTS=!0,g.APPLY_LAYOUT=!1),b.step=="cose"&&(g.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,g.ENFORCE_CONSTRAINTS=!1,g.APPLY_LAYOUT=!0),b.step=="all"&&(b.randomize?g.TRANSFORM_ON_CONSTRAINT_HANDLING=!0:g.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,g.ENFORCE_CONSTRAINTS=!0,g.APPLY_LAYOUT=!0),b.fixedNodeConstraint||b.alignmentConstraint||b.relativePlacementConstraint?g.TREE_REDUCTION_ON_INCREMENTAL=!1:g.TREE_REDUCTION_ON_INCREMENTAL=!0;var B=new u,F=B.newGraphManager();return O(F.addRoot(),l.getTopMostNodes(E),B,b),R(B,F,_),P(B,b),B.runLayout(),D};i.exports={coseLayout:v}}),212:((i,s,o)=>{var l=(function(){function b(w,C){for(var k=0;k0)if(R){var F=f.getTopMostNodes(k.eles.nodes());if(T=f.connectComponents(E,k.eles,F),T.forEach(function(ne){var ee=ne.boundingBox();I.push({x:ee.x1+ee.w/2,y:ee.y1+ee.h/2})}),k.randomize&&T.forEach(function(ne){k.eles=ne,S.push(p(k))}),k.quality=="default"||k.quality=="proof"){var G=E.collection();if(k.tile){var z=new Map,H=[],Q=[],Y=0,ie={nodeIndexes:z,xCoords:H,yCoords:Q},se=[];if(T.forEach(function(ne,ee){ne.edges().length==0&&(ne.nodes().forEach(function($e,me){G.merge(ne.nodes()[me]),$e.isParent()||(ie.nodeIndexes.set(ne.nodes()[me].id(),Y++),ie.xCoords.push(ne.nodes()[0].position().x),ie.yCoords.push(ne.nodes()[0].position().y))}),se.push(ee))}),G.length>1){var oe=G.boundingBox();I.push({x:oe.x1+oe.w/2,y:oe.y1+oe.h/2}),T.push(G),S.push(ie);for(var pe=se.length-1;pe>=0;pe--)T.splice(se[pe],1),S.splice(se[pe],1),I.splice(se[pe],1)}}T.forEach(function(ne,ee){k.eles=ne,D.push(g(k,S[ee])),f.relocateComponent(I[ee],D[ee],k)})}else T.forEach(function(ne,ee){f.relocateComponent(I[ee],S[ee],k)});var J=new Set;if(T.length>1){var j=[],Z=_.filter(function(ne){return ne.css("display")=="none"});T.forEach(function(ne,ee){var $e=void 0;if(k.quality=="draft"&&($e=S[ee].nodeIndexes),ne.nodes().not(Z).length>0){var me={};me.edges=[],me.nodes=[];var Ie=void 0;ne.nodes().not(Z).forEach(function(Ue){if(k.quality=="draft")if(!Ue.isParent())Ie=$e.get(Ue.id()),me.nodes.push({x:S[ee].xCoords[Ie]-Ue.boundingbox().w/2,y:S[ee].yCoords[Ie]-Ue.boundingbox().h/2,width:Ue.boundingbox().w,height:Ue.boundingbox().h});else{var Fe=f.calcBoundingBox(Ue,S[ee].xCoords,S[ee].yCoords,$e);me.nodes.push({x:Fe.topLeftX,y:Fe.topLeftY,width:Fe.width,height:Fe.height})}else D[ee][Ue.id()]&&me.nodes.push({x:D[ee][Ue.id()].getLeft(),y:D[ee][Ue.id()].getTop(),width:D[ee][Ue.id()].getWidth(),height:D[ee][Ue.id()].getHeight()})}),ne.edges().forEach(function(Ue){var Fe=Ue.source(),Ae=Ue.target();if(Fe.css("display")!="none"&&Ae.css("display")!="none")if(k.quality=="draft"){var Me=$e.get(Fe.id()),ke=$e.get(Ae.id()),ve=[],_e=[];if(Fe.isParent()){var fe=f.calcBoundingBox(Fe,S[ee].xCoords,S[ee].yCoords,$e);ve.push(fe.topLeftX+fe.width/2),ve.push(fe.topLeftY+fe.height/2)}else ve.push(S[ee].xCoords[Me]),ve.push(S[ee].yCoords[Me]);if(Ae.isParent()){var ue=f.calcBoundingBox(Ae,S[ee].xCoords,S[ee].yCoords,$e);_e.push(ue.topLeftX+ue.width/2),_e.push(ue.topLeftY+ue.height/2)}else _e.push(S[ee].xCoords[ke]),_e.push(S[ee].yCoords[ke]);me.edges.push({startX:ve[0],startY:ve[1],endX:_e[0],endY:_e[1]})}else D[ee][Fe.id()]&&D[ee][Ae.id()]&&me.edges.push({startX:D[ee][Fe.id()].getCenterX(),startY:D[ee][Fe.id()].getCenterY(),endX:D[ee][Ae.id()].getCenterX(),endY:D[ee][Ae.id()].getCenterY()})}),me.nodes.length>0&&(j.push(me),J.add(ee))}});var K=O.packComponents(j,k.randomize).shifts;if(k.quality=="draft")S.forEach(function(ne,ee){var $e=ne.xCoords.map(function(Ie){return Ie+K[ee].dx}),me=ne.yCoords.map(function(Ie){return Ie+K[ee].dy});ne.xCoords=$e,ne.yCoords=me});else{var X=0;J.forEach(function(ne){Object.keys(D[ne]).forEach(function(ee){var $e=D[ne][ee];$e.setCenter($e.getCenterX()+K[X].dx,$e.getCenterY()+K[X].dy)}),X++})}}}else{var P=k.eles.boundingBox();if(I.push({x:P.x1+P.w/2,y:P.y1+P.h/2}),k.randomize){var B=p(k);S.push(B)}k.quality=="default"||k.quality=="proof"?(D.push(g(k,S[0])),f.relocateComponent(I[0],D[0],k)):f.relocateComponent(I[0],S[0],k)}var ae=function(ee,$e){if(k.quality=="default"||k.quality=="proof"){typeof ee=="number"&&(ee=$e);var me=void 0,Ie=void 0,Ue=ee.data("id");return D.forEach(function(Ae){Ue in Ae&&(me={x:Ae[Ue].getRect().getCenterX(),y:Ae[Ue].getRect().getCenterY()},Ie=Ae[Ue])}),k.nodeDimensionsIncludeLabels&&(Ie.labelWidth&&(Ie.labelPosHorizontal=="left"?me.x+=Ie.labelWidth/2:Ie.labelPosHorizontal=="right"&&(me.x-=Ie.labelWidth/2)),Ie.labelHeight&&(Ie.labelPosVertical=="top"?me.y+=Ie.labelHeight/2:Ie.labelPosVertical=="bottom"&&(me.y-=Ie.labelHeight/2))),me==null&&(me={x:ee.position("x"),y:ee.position("y")}),{x:me.x,y:me.y}}else{var Fe=void 0;return S.forEach(function(Ae){var Me=Ae.nodeIndexes.get(ee.id());Me!=null&&(Fe={x:Ae.xCoords[Me],y:Ae.yCoords[Me]})}),Fe==null&&(Fe={x:ee.position("x"),y:ee.position("y")}),{x:Fe.x,y:Fe.y}}};if(k.quality=="default"||k.quality=="proof"||k.randomize){var W=f.calcParentsWithoutChildren(E,_),Se=_.filter(function(ne){return ne.css("display")=="none"});k.eles=_.not(Se),_.nodes().not(":parent").not(Se).layoutPositions(C,k,ae),W.length>0&&W.forEach(function(ne){ne.position(ae(ne))})}else console.log("If randomize option is set to false, then quality option must be 'default' or 'proof'.")}}]),b})();i.exports=y}),657:((i,s,o)=>{var l=o(548),u=o(140).layoutBase.Matrix,h=o(140).layoutBase.SVD,f=function(p){var m=p.cy,g=p.eles,v=g.nodes(),y=g.nodes(":parent"),b=new Map,w=new Map,C=new Map,k=[],E=[],_=[],S=[],L=[],M=[],D=[],T=[],I=void 0,N=void 0,O=1e8,R=1e-9,P=p.piTol,B=p.samplingType,F=p.nodeSeparation,G=void 0,z=function(){for(var le=0,V=0,he=!1;V=Ne;){ye=de[Ne++];for(var Xe=k[ye],Ve=0;Veqe&&(qe=L[He],Ke=He)}return Ke},Q=function(le){var V=void 0;if(le){V=Math.floor(Math.random()*N),I=V;for(var de=0;de=1)break;qe=Le}for(var Xe=0;Xe=1)break;qe=Le}for(var ot=0;ot0&&(V.isParent()?k[le].push(C.get(V.id())):k[le].push(V.id()))})});var W=function(le){var V=w.get(le),he=void 0;b.get(le).forEach(function(de){m.getElementById(de).isParent()?he=C.get(de):he=de,k[V].push(he),k[w.get(he)].push(le)})},Se=!0,ne=!1,ee=void 0;try{for(var $e=b.keys()[Symbol.iterator](),me;!(Se=(me=$e.next()).done);Se=!0){var Ie=me.value;W(Ie)}}catch($){ne=!0,ee=$}finally{try{!Se&&$e.return&&$e.return()}finally{if(ne)throw ee}}N=w.size;var Ue=void 0;if(N>2){G=N{var l=o(212),u=function(f){f&&f("layout","fcose",l)};typeof cytoscape<"u"&&u(cytoscape),i.exports=u}),140:(i=>{i.exports=t})},r={};function n(i){var s=r[i];if(s!==void 0)return s.exports;var o=r[i]={exports:{}};return e[i](o,o.exports,n),o.exports}var a=n(579);return a})()})});var WRe={};lr(WRe,{diagram:()=>w8t});function ai(t){let e=Te().architecture;return e?.[t]?e[t]:PRe[t]}function FRe(t,e){t.forEach(r=>{e.add({group:"nodes",data:{type:"service",id:r.id,icon:r.icon,label:r.title,parent:r.in,width:ai("iconSize"),height:ai("iconSize")},classes:"node-service"})})}function zRe(t,e){t.forEach(r=>{e.add({group:"nodes",data:{type:"junction",id:r.id,parent:r.in,width:ai("iconSize"),height:ai("iconSize")},classes:"node-junction"})})}function $Re(t,e){e.nodes().map(r=>{let n=hb(r);if(n.type==="group")return;n.x=r.position().x,n.y=r.position().y,t.getElementById(n.id).attr("transform","translate("+(n.x||0)+","+(n.y||0)+")")})}function GRe(t,e){t.forEach(r=>{e.add({group:"nodes",data:{type:"group",id:r.id,icon:r.icon,label:r.title,parent:r.in},classes:"node-group"})})}function URe(t,e){t.forEach(r=>{let{lhsId:n,rhsId:a,lhsInto:i,lhsGroup:s,rhsInto:o,lhsDir:l,rhsDir:u,rhsGroup:h,title:f}=r,d=uY(r.lhsDir,r.rhsDir)?"segments":"straight",p={id:`${n}-${a}`,label:f,source:n,sourceDir:l,sourceArrow:i,sourceGroup:s,sourceEndpoint:l==="L"?"0 50%":l==="R"?"100% 50%":l==="T"?"50% 0":"50% 100%",target:a,targetDir:u,targetArrow:o,targetGroup:h,targetEndpoint:u==="L"?"0 50%":u==="R"?"100% 50%":u==="T"?"50% 0":"50% 100%"};e.add({group:"edges",data:p,classes:d})})}function qRe(t,e,r){let n=x((o,l)=>Object.entries(o).reduce((u,[h,f])=>{let d=0,p=Object.entries(f);if(p.length===1)return u[h]=p[0][1],u;for(let m=0;m{let l={},u={};return Object.entries(o).forEach(([h,[f,d]])=>{let p=t.getNode(h)?.in??"default";l[d]??={},l[d][p]??=[],l[d][p].push(h),u[f]??={},u[f][p]??=[],u[f][p].push(h)}),{horiz:Object.values(n(l,"horizontal")).filter(h=>h.length>1),vert:Object.values(n(u,"vertical")).filter(h=>h.length>1)}}),[i,s]=a.reduce(([o,l],{horiz:u,vert:h})=>[[...o,...u],[...l,...h]],[[],[]]);return{horizontal:i,vertical:s}}function VRe(t){let e=[],r=x(a=>`${a[0]},${a[1]}`,"posToStr"),n=x(a=>a.split(",").map(i=>parseInt(i)),"strToPos");return t.forEach(a=>{let i=Object.fromEntries(Object.entries(a).map(([u,h])=>[r(h),u])),s=[r([0,0])],o={},l={L:[-1,0],R:[1,0],T:[0,1],B:[0,-1]};for(;s.length>0;){let u=s.shift();if(u){o[u]=1;let h=i[u];if(h){let f=n(u);Object.entries(l).forEach(([d,p])=>{let m=r([f[0]+p[0],f[1]+p[1]]),g=i[m];g&&!o[m]&&(s.push(m),e.push({[DRe[d]]:g,[DRe[V_t(d)]]:h,gap:1.5*ai("iconSize")}))})}}}}),e}function HRe(t,e,r,n,a,{spatialMaps:i,groupAlignments:s}){return new Promise(o=>{let l=We("body").append("div").attr("id","cy").attr("style","display:none"),u=Pl({container:document.getElementById("cy"),style:[{selector:"edge",style:{"curve-style":"straight",label:"data(label)","source-endpoint":"data(sourceEndpoint)","target-endpoint":"data(targetEndpoint)"}},{selector:"edge.segments",style:{"curve-style":"segments","segment-weights":"0","segment-distances":[.5],"edge-distances":"endpoints","source-endpoint":"data(sourceEndpoint)","target-endpoint":"data(targetEndpoint)"}},{selector:"node",style:{"compound-sizing-wrt-labels":"include"}},{selector:"node[label]",style:{"text-valign":"bottom","text-halign":"center","font-size":`${ai("fontSize")}px`}},{selector:".node-service",style:{label:"data(label)",width:"data(width)",height:"data(height)"}},{selector:".node-junction",style:{width:"data(width)",height:"data(height)"}},{selector:".node-group",style:{padding:`${ai("padding")}px`}}]});l.remove(),GRe(r,u),FRe(t,u),zRe(e,u),URe(n,u);let h=qRe(a,i,s),f=VRe(i),d=u.layout({name:"fcose",quality:"proof",styleEnabled:!1,animate:!1,nodeDimensionsIncludeLabels:!1,idealEdgeLength(p){let[m,g]=p.connectedNodes(),{parent:v}=hb(m),{parent:y}=hb(g);return v===y?1.5*ai("iconSize"):.5*ai("iconSize")},edgeElasticity(p){let[m,g]=p.connectedNodes(),{parent:v}=hb(m),{parent:y}=hb(g);return v===y?.45:.001},alignmentConstraint:h,relativePlacementConstraint:f});d.one("layoutstop",()=>{function p(m,g,v,y){let b,w,{x:C,y:k}=m,{x:E,y:_}=g;w=(y-k+(C-v)*(k-_)/(C-E))/Math.sqrt(1+Math.pow((k-_)/(C-E),2)),b=Math.sqrt(Math.pow(y-k,2)+Math.pow(v-C,2)-Math.pow(w,2));let S=Math.sqrt(Math.pow(E-C,2)+Math.pow(_-k,2));b=b/S;let L=(E-C)*(y-k)-(_-k)*(v-C);switch(!0){case L>=0:L=1;break;case L<0:L=-1;break}let M=(E-C)*(v-C)+(_-k)*(y-k);switch(!0){case M>=0:M=1;break;case M<0:M=-1;break}return w=Math.abs(w)*L,b=b*M,{distances:w,weights:b}}x(p,"getSegmentWeights"),u.startBatch();for(let m of Object.values(u.edges()))if(m.data?.()){let{x:g,y:v}=m.source().position(),{x:y,y:b}=m.target().position();if(g!==y&&v!==b){let w=m.sourceEndpoint(),C=m.targetEndpoint(),{sourceDir:k}=ORe(m),[E,_]=X0(k)?[w.x,C.y]:[C.x,w.y],{weights:S,distances:L}=p(w,C,E,_);m.style("segment-distances",L),m.style("segment-weights",S)}}u.endBatch(),d.run()}),d.run(),u.ready(p=>{te.info("Ready",p),o(u)})})}var BRe,DRe,NRe,PL,V_t,MRe,js,X0,uY,H_t,W_t,oY,Y_t,X_t,j_t,K_t,Z_t,ORe,hb,PRe,fr,Q_t,J_t,e8t,t8t,r8t,n8t,lY,a8t,i8t,s8t,o8t,l8t,u8t,c8t,BL,h8t,f8t,d8t,p8t,cb,ak,m8t,g8t,v8t,y8t,x8t,b8t,w8t,YRe=A(()=>{Mo();Fi();pv();w_();ln();mc();ur();Um();vW();BRe=ii(IRe(),1);cr();DRe={L:"left",R:"right",T:"top",B:"bottom"},NRe={L:x(t=>`${t},${t/2} 0,${t} 0,0`,"L"),R:x(t=>`0,${t/2} ${t},0 ${t},${t}`,"R"),T:x(t=>`0,0 ${t},0 ${t/2},${t}`,"T"),B:x(t=>`${t/2},0 ${t},${t} 0,${t}`,"B")},PL={L:x((t,e)=>t-e+2,"L"),R:x((t,e)=>t-2,"R"),T:x((t,e)=>t-e+2,"T"),B:x((t,e)=>t-2,"B")},V_t=x(function(t){return js(t)?t==="L"?"R":"L":t==="T"?"B":"T"},"getOppositeArchitectureDirection"),MRe=x(function(t){let e=t;return e==="L"||e==="R"||e==="T"||e==="B"},"isArchitectureDirection"),js=x(function(t){let e=t;return e==="L"||e==="R"},"isArchitectureDirectionX"),X0=x(function(t){let e=t;return e==="T"||e==="B"},"isArchitectureDirectionY"),uY=x(function(t,e){let r=js(t)&&X0(e),n=X0(t)&&js(e);return r||n},"isArchitectureDirectionXY"),H_t=x(function(t){let e=t[0],r=t[1],n=js(e)&&X0(r),a=X0(e)&&js(r);return n||a},"isArchitecturePairXY"),W_t=x(function(t){return t!=="LL"&&t!=="RR"&&t!=="TT"&&t!=="BB"},"isValidArchitectureDirectionPair"),oY=x(function(t,e){let r=`${t}${e}`;return W_t(r)?r:void 0},"getArchitectureDirectionPair"),Y_t=x(function([t,e],r){let n=r[0],a=r[1];return js(n)?X0(a)?[t+(n==="L"?-1:1),e+(a==="T"?1:-1)]:[t+(n==="L"?-1:1),e]:js(a)?[t+(a==="L"?1:-1),e+(n==="T"?1:-1)]:[t,e+(n==="T"?1:-1)]},"shiftPositionByArchitectureDirectionPair"),X_t=x(function(t){return t==="LT"||t==="TL"?[1,1]:t==="BL"||t==="LB"?[1,-1]:t==="BR"||t==="RB"?[-1,-1]:[-1,1]},"getArchitectureDirectionXYFactors"),j_t=x(function(t,e){return uY(t,e)?"bend":js(t)?"horizontal":"vertical"},"getArchitectureDirectionAlignment"),K_t=x(function(t){return t.type==="service"},"isArchitectureService"),Z_t=x(function(t){return t.type==="junction"},"isArchitectureJunction"),ORe=x(t=>t.data(),"edgeData"),hb=x(t=>t.data(),"nodeData"),PRe=or.architecture,fr=new gv(()=>({nodes:{},groups:{},edges:[],registeredIds:{},config:PRe,dataStructures:void 0,elements:{}})),Q_t=x(()=>{fr.reset(),Cr()},"clear"),J_t=x(function({id:t,icon:e,in:r,title:n,iconText:a}){if(fr.records.registeredIds[t]!==void 0)throw new Error(`The service id [${t}] is already in use by another ${fr.records.registeredIds[t]}`);if(r!==void 0){if(t===r)throw new Error(`The service [${t}] cannot be placed within itself`);if(fr.records.registeredIds[r]===void 0)throw new Error(`The service [${t}]'s parent does not exist. Please make sure the parent is created before this service`);if(fr.records.registeredIds[r]==="node")throw new Error(`The service [${t}]'s parent is not a group`)}fr.records.registeredIds[t]="node",fr.records.nodes[t]={id:t,type:"service",icon:e,iconText:a,title:n,edges:[],in:r}},"addService"),e8t=x(()=>Object.values(fr.records.nodes).filter(K_t),"getServices"),t8t=x(function({id:t,in:e}){fr.records.registeredIds[t]="node",fr.records.nodes[t]={id:t,type:"junction",edges:[],in:e}},"addJunction"),r8t=x(()=>Object.values(fr.records.nodes).filter(Z_t),"getJunctions"),n8t=x(()=>Object.values(fr.records.nodes),"getNodes"),lY=x(t=>fr.records.nodes[t],"getNode"),a8t=x(function({id:t,icon:e,in:r,title:n}){if(fr.records.registeredIds[t]!==void 0)throw new Error(`The group id [${t}] is already in use by another ${fr.records.registeredIds[t]}`);if(r!==void 0){if(t===r)throw new Error(`The group [${t}] cannot be placed within itself`);if(fr.records.registeredIds[r]===void 0)throw new Error(`The group [${t}]'s parent does not exist. Please make sure the parent is created before this group`);if(fr.records.registeredIds[r]==="node")throw new Error(`The group [${t}]'s parent is not a group`)}fr.records.registeredIds[t]="group",fr.records.groups[t]={id:t,icon:e,title:n,in:r}},"addGroup"),i8t=x(()=>Object.values(fr.records.groups),"getGroups"),s8t=x(function({lhsId:t,rhsId:e,lhsDir:r,rhsDir:n,lhsInto:a,rhsInto:i,lhsGroup:s,rhsGroup:o,title:l}){if(!MRe(r))throw new Error(`Invalid direction given for left hand side of edge ${t}--${e}. Expected (L,R,T,B) got ${r}`);if(!MRe(n))throw new Error(`Invalid direction given for right hand side of edge ${t}--${e}. Expected (L,R,T,B) got ${n}`);if(fr.records.nodes[t]===void 0&&fr.records.groups[t]===void 0)throw new Error(`The left-hand id [${t}] does not yet exist. Please create the service/group before declaring an edge to it.`);if(fr.records.nodes[e]===void 0&&fr.records.groups[t]===void 0)throw new Error(`The right-hand id [${e}] does not yet exist. Please create the service/group before declaring an edge to it.`);let u=fr.records.nodes[t].in,h=fr.records.nodes[e].in;if(s&&u&&h&&u==h)throw new Error(`The left-hand id [${t}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);if(o&&u&&h&&u==h)throw new Error(`The right-hand id [${e}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);let f={lhsId:t,lhsDir:r,lhsInto:a,lhsGroup:s,rhsId:e,rhsDir:n,rhsInto:i,rhsGroup:o,title:l};fr.records.edges.push(f),fr.records.nodes[t]&&fr.records.nodes[e]&&(fr.records.nodes[t].edges.push(fr.records.edges[fr.records.edges.length-1]),fr.records.nodes[e].edges.push(fr.records.edges[fr.records.edges.length-1]))},"addEdge"),o8t=x(()=>fr.records.edges,"getEdges"),l8t=x(()=>{if(fr.records.dataStructures===void 0){let t={},e=Object.entries(fr.records.nodes).reduce((o,[l,u])=>(o[l]=u.edges.reduce((h,f)=>{let d=lY(f.lhsId)?.in,p=lY(f.rhsId)?.in;if(d&&p&&d!==p){let m=j_t(f.lhsDir,f.rhsDir);m!=="bend"&&(t[d]??={},t[d][p]=m,t[p]??={},t[p][d]=m)}if(f.lhsId===l){let m=oY(f.lhsDir,f.rhsDir);m&&(h[m]=f.rhsId)}else{let m=oY(f.rhsDir,f.lhsDir);m&&(h[m]=f.lhsId)}return h},{}),o),{}),r=Object.keys(e)[0],n={[r]:1},a=Object.keys(e).reduce((o,l)=>l===r?o:{...o,[l]:1},{}),i=x(o=>{let l={[o]:[0,0]},u=[o];for(;u.length>0;){let h=u.shift();if(h){n[h]=1,delete a[h];let f=e[h],[d,p]=l[h];Object.entries(f).forEach(([m,g])=>{n[g]||(l[g]=Y_t([d,p],m),u.push(g))})}}return l},"BFS"),s=[i(r)];for(;Object.keys(a).length>0;)s.push(i(Object.keys(a)[0]));fr.records.dataStructures={adjList:e,spatialMaps:s,groupAlignments:t}}return fr.records.dataStructures},"getDataStructures"),u8t=x((t,e)=>{fr.records.elements[t]=e},"setElementForId"),c8t=x(t=>fr.records.elements[t],"getElementById"),BL={clear:Q_t,setDiagramTitle:Fr,getDiagramTitle:Rr,setAccTitle:Sr,getAccTitle:_r,setAccDescription:Ar,getAccDescription:Lr,addService:J_t,getServices:e8t,addJunction:t8t,getJunctions:r8t,getNodes:n8t,getNode:lY,addGroup:a8t,getGroups:i8t,addEdge:s8t,getEdges:o8t,setElementForId:u8t,getElementById:c8t,getDataStructures:l8t};x(ai,"getConfigField");h8t=x((t,e)=>{uu(t,e),t.groups.map(e.addGroup),t.services.map(r=>e.addService({...r,type:"service"})),t.junctions.map(r=>e.addJunction({...r,type:"junction"})),t.edges.map(e.addEdge)},"populateDb"),f8t={parse:x(async t=>{let e=await jo("architecture",t);te.debug(e),h8t(e,BL)},"parse")},d8t=x(t=>` + node : x:${t.x} y:${t.y} w:${t.width} h:${t.height}`);let n=t.x,i=t.y,a=Math.abs(n-r.x),s=t.width/2,o=r.xMath.abs(n-e.x)*l){let f=r.y{he.debug("abc88 cutPathAtIntersect",t,e);let r=[],n=t[0],i=!1;return t.forEach(a=>{if(!PAt(e,a)&&!i){let s=BAt(e,n,a),o=!1;r.forEach(l=>{o=o||l.x===s.x&&l.y===s.y}),r.some(l=>l.x===s.x&&l.y===s.y)||r.push(s),i=!0}else n=a,i||r.push(a)}),r},"cutPathAtIntersect"),FAt=b(function(t,e,r,n,i,a,s){let o=r.points;he.debug("abc88 InsertEdge: edge=",r,"e=",e);let l=!1,u=a.node(e.v);var h=a.node(e.w);h?.intersect&&u?.intersect&&(o=o.slice(1,r.points.length-1),o.unshift(u.intersect(o[0])),o.push(h.intersect(o[o.length-1]))),r.toCluster&&(he.debug("to cluster abc88",n[r.toCluster]),o=RMe(r.points,n[r.toCluster].node),l=!0),r.fromCluster&&(he.debug("from cluster abc88",n[r.fromCluster]),o=RMe(o.reverse(),n[r.fromCluster].node).reverse(),l=!0);let f=o.filter(_=>!Number.isNaN(_.y)),d=Ju;r.curve&&(i==="graph"||i==="flowchart")&&(d=r.curve);let{x:p,y:m}=AT(r),g=i0().x(p).y(m).curve(d),y;switch(r.thickness){case"normal":y="edge-thickness-normal";break;case"thick":y="edge-thickness-thick";break;case"invisible":y="edge-thickness-thick";break;default:y=""}switch(r.pattern){case"solid":y+=" edge-pattern-solid";break;case"dotted":y+=" edge-pattern-dotted";break;case"dashed":y+=" edge-pattern-dashed";break}let v=t.append("path").attr("d",g(f)).attr("id",r.id).attr("class"," "+y+(r.classes?" "+r.classes:"")).attr("style",r.style),x="";(Fe().flowchart.arrowMarkerAbsolute||Fe().state.arrowMarkerAbsolute)&&(x=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,x=x.replace(/\(/g,"\\("),x=x.replace(/\)/g,"\\)")),IAt(v,r,x,s,i);let k={};return l&&(k.updatedPath=o),k.originalPath=r.points,k},"insertEdge"),zAt=b(t=>{let e=new Set;for(let r of t)switch(r){case"x":e.add("right"),e.add("left");break;case"y":e.add("up"),e.add("down");break;default:e.add(r);break}return e},"expandAndDeduplicateDirections"),$At=b((t,e,r)=>{let n=zAt(t),i=2,a=e.height+2*r.padding,s=a/i,o=e.width+2*s+r.padding,l=r.padding/2;return n.has("right")&&n.has("left")&&n.has("up")&&n.has("down")?[{x:0,y:0},{x:s,y:0},{x:o/2,y:2*l},{x:o-s,y:0},{x:o,y:0},{x:o,y:-a/3},{x:o+2*l,y:-a/2},{x:o,y:-2*a/3},{x:o,y:-a},{x:o-s,y:-a},{x:o/2,y:-a-2*l},{x:s,y:-a},{x:0,y:-a},{x:0,y:-2*a/3},{x:-2*l,y:-a/2},{x:0,y:-a/3}]:n.has("right")&&n.has("left")&&n.has("up")?[{x:s,y:0},{x:o-s,y:0},{x:o,y:-a/2},{x:o-s,y:-a},{x:s,y:-a},{x:0,y:-a/2}]:n.has("right")&&n.has("left")&&n.has("down")?[{x:0,y:0},{x:s,y:-a},{x:o-s,y:-a},{x:o,y:0}]:n.has("right")&&n.has("up")&&n.has("down")?[{x:0,y:0},{x:o,y:-s},{x:o,y:-a+s},{x:0,y:-a}]:n.has("left")&&n.has("up")&&n.has("down")?[{x:o,y:0},{x:0,y:-s},{x:0,y:-a+s},{x:o,y:-a}]:n.has("right")&&n.has("left")?[{x:s,y:0},{x:s,y:-l},{x:o-s,y:-l},{x:o-s,y:0},{x:o,y:-a/2},{x:o-s,y:-a},{x:o-s,y:-a+l},{x:s,y:-a+l},{x:s,y:-a},{x:0,y:-a/2}]:n.has("up")&&n.has("down")?[{x:o/2,y:0},{x:0,y:-l},{x:s,y:-l},{x:s,y:-a+l},{x:0,y:-a+l},{x:o/2,y:-a},{x:o,y:-a+l},{x:o-s,y:-a+l},{x:o-s,y:-l},{x:o,y:-l}]:n.has("right")&&n.has("up")?[{x:0,y:0},{x:o,y:-s},{x:0,y:-a}]:n.has("right")&&n.has("down")?[{x:0,y:0},{x:o,y:0},{x:0,y:-a}]:n.has("left")&&n.has("up")?[{x:o,y:0},{x:0,y:-s},{x:o,y:-a}]:n.has("left")&&n.has("down")?[{x:o,y:0},{x:0,y:0},{x:o,y:-a}]:n.has("right")?[{x:s,y:-l},{x:s,y:-l},{x:o-s,y:-l},{x:o-s,y:0},{x:o,y:-a/2},{x:o-s,y:-a},{x:o-s,y:-a+l},{x:s,y:-a+l},{x:s,y:-a+l}]:n.has("left")?[{x:s,y:0},{x:s,y:-l},{x:o-s,y:-l},{x:o-s,y:-a+l},{x:s,y:-a+l},{x:s,y:-a},{x:0,y:-a/2}]:n.has("up")?[{x:s,y:-l},{x:s,y:-a+l},{x:0,y:-a+l},{x:o/2,y:-a},{x:o,y:-a+l},{x:o-s,y:-a+l},{x:o-s,y:-l}]:n.has("down")?[{x:o/2,y:0},{x:0,y:-l},{x:s,y:-l},{x:s,y:-a+l},{x:o-s,y:-a+l},{x:o-s,y:-l},{x:o,y:-l}]:[{x:0,y:0}]},"getArrowPoints");b(UMe,"intersectNode");GAt=UMe;b(HMe,"intersectEllipse");VMe=HMe;b(WMe,"intersectCircle");qAt=WMe;b(YMe,"intersectLine");b(lj,"sameSign");UAt=YMe,HAt=XMe;b(XMe,"intersectPolygon");VAt=b((t,e)=>{var r=t.x,n=t.y,i=e.x-r,a=e.y-n,s=t.width/2,o=t.height/2,l,u;return Math.abs(a)*s>Math.abs(i)*o?(a<0&&(o=-o),l=a===0?0:o*i/a,u=o):(i<0&&(s=-s),l=s,u=i===0?0:s*a/i),{x:r+l,y:n+u}},"intersectRect"),WAt=VAt,Ni={node:GAt,circle:qAt,ellipse:VMe,polygon:HAt,rect:WAt},vs=b(async(t,e,r,n)=>{let i=Fe(),a,s=e.useHtmlLabels||dn(i.flowchart.htmlLabels);r?a=r:a="node default";let o=t.insert("g").attr("class",a).attr("id",e.domId||e.id),l=o.insert("g").attr("class","label").attr("style",e.labelStyle),u;e.labelText===void 0?u="":u=typeof e.labelText=="string"?e.labelText:e.labelText[0];let h=l.node(),f;e.labelType==="markdown"?f=qa(l,Qr(Jo(u),i),{useHtmlLabels:s,width:e.width||i.flowchart.wrappingWidth,classes:"markdown-node-label"},i):f=h.appendChild(Pu(Qr(Jo(u),i),e.labelStyle,!1,n));let d=f.getBBox(),p=e.padding/2;if(dn(i.flowchart.htmlLabels)){let m=f.children[0],g=dt(f),y=m.getElementsByTagName("img");if(y){let v=u.replace(/]*>/g,"").trim()==="";await Promise.all([...y].map(x=>new Promise(k=>{function _(){if(x.style.display="flex",x.style.flexDirection="column",v){let T=i.fontSize?i.fontSize:window.getComputedStyle(document.body).fontSize,R=parseInt(T,10)*5+"px";x.style.minWidth=R,x.style.maxWidth=R}else x.style.width="100%";k(x)}b(_,"setupImage"),setTimeout(()=>{x.complete&&_()}),x.addEventListener("error",_),x.addEventListener("load",_)})))}d=m.getBoundingClientRect(),g.attr("width",d.width),g.attr("height",d.height)}return s?l.attr("transform","translate("+-d.width/2+", "+-d.height/2+")"):l.attr("transform","translate(0, "+-d.height/2+")"),e.centerLabel&&l.attr("transform","translate("+-d.width/2+", "+-d.height/2+")"),l.insert("rect",":first-child"),{shapeSvg:o,bbox:d,halfPadding:p,label:l}},"labelHelper"),ta=b((t,e)=>{let r=e.node().getBBox();t.width=r.width,t.height=r.height},"updateNodeBounds");b(Rc,"insertPolygonShape");YAt=b(async(t,e)=>{e.useHtmlLabels||Fe().flowchart.htmlLabels||(e.centerLabel=!0);let{shapeSvg:n,bbox:i,halfPadding:a}=await vs(t,e,"node "+e.classes,!0);he.info("Classes = ",e.classes);let s=n.insert("rect",":first-child");return s.attr("rx",e.rx).attr("ry",e.ry).attr("x",-i.width/2-a).attr("y",-i.height/2-a).attr("width",i.width+e.padding).attr("height",i.height+e.padding),ta(e,s),e.intersect=function(o){return Ni.rect(e,o)},n},"note"),XAt=YAt,DMe=b(t=>t?" "+t:"","formatClass"),Yl=b((t,e)=>`${e||"node default"}${DMe(t.classes)} ${DMe(t.class)}`,"getClassesFromNode"),IMe=b(async(t,e)=>{let{shapeSvg:r,bbox:n}=await vs(t,e,Yl(e,void 0),!0),i=n.width+e.padding,a=n.height+e.padding,s=i+a,o=[{x:s/2,y:0},{x:s,y:-s/2},{x:s/2,y:-s},{x:0,y:-s/2}];he.info("Question main (Circle)");let l=Rc(r,s,s,o);return l.attr("style",e.style),ta(e,l),e.intersect=function(u){return he.warn("Intersect called"),Ni.polygon(e,o,u)},r},"question"),jAt=b((t,e)=>{let r=t.insert("g").attr("class","node default").attr("id",e.domId||e.id),n=28,i=[{x:0,y:n/2},{x:n/2,y:0},{x:0,y:-n/2},{x:-n/2,y:0}];return r.insert("polygon",":first-child").attr("points",i.map(function(s){return s.x+","+s.y}).join(" ")).attr("class","state-start").attr("r",7).attr("width",28).attr("height",28),e.width=28,e.height=28,e.intersect=function(s){return Ni.circle(e,14,s)},r},"choice"),KAt=b(async(t,e)=>{let{shapeSvg:r,bbox:n}=await vs(t,e,Yl(e,void 0),!0),i=4,a=n.height+e.padding,s=a/i,o=n.width+2*s+e.padding,l=[{x:s,y:0},{x:o-s,y:0},{x:o,y:-a/2},{x:o-s,y:-a},{x:s,y:-a},{x:0,y:-a/2}],u=Rc(r,o,a,l);return u.attr("style",e.style),ta(e,u),e.intersect=function(h){return Ni.polygon(e,l,h)},r},"hexagon"),ZAt=b(async(t,e)=>{let{shapeSvg:r,bbox:n}=await vs(t,e,void 0,!0),i=2,a=n.height+2*e.padding,s=a/i,o=n.width+2*s+e.padding,l=$At(e.directions,n,e),u=Rc(r,o,a,l);return u.attr("style",e.style),ta(e,u),e.intersect=function(h){return Ni.polygon(e,l,h)},r},"block_arrow"),QAt=b(async(t,e)=>{let{shapeSvg:r,bbox:n}=await vs(t,e,Yl(e,void 0),!0),i=n.width+e.padding,a=n.height+e.padding,s=[{x:-a/2,y:0},{x:i,y:0},{x:i,y:-a},{x:-a/2,y:-a},{x:0,y:-a/2}];return Rc(r,i,a,s).attr("style",e.style),e.width=i+a,e.height=a,e.intersect=function(l){return Ni.polygon(e,s,l)},r},"rect_left_inv_arrow"),JAt=b(async(t,e)=>{let{shapeSvg:r,bbox:n}=await vs(t,e,Yl(e),!0),i=n.width+e.padding,a=n.height+e.padding,s=[{x:-2*a/6,y:0},{x:i-a/6,y:0},{x:i+2*a/6,y:-a},{x:a/6,y:-a}],o=Rc(r,i,a,s);return o.attr("style",e.style),ta(e,o),e.intersect=function(l){return Ni.polygon(e,s,l)},r},"lean_right"),eLt=b(async(t,e)=>{let{shapeSvg:r,bbox:n}=await vs(t,e,Yl(e,void 0),!0),i=n.width+e.padding,a=n.height+e.padding,s=[{x:2*a/6,y:0},{x:i+a/6,y:0},{x:i-2*a/6,y:-a},{x:-a/6,y:-a}],o=Rc(r,i,a,s);return o.attr("style",e.style),ta(e,o),e.intersect=function(l){return Ni.polygon(e,s,l)},r},"lean_left"),tLt=b(async(t,e)=>{let{shapeSvg:r,bbox:n}=await vs(t,e,Yl(e,void 0),!0),i=n.width+e.padding,a=n.height+e.padding,s=[{x:-2*a/6,y:0},{x:i+2*a/6,y:0},{x:i-a/6,y:-a},{x:a/6,y:-a}],o=Rc(r,i,a,s);return o.attr("style",e.style),ta(e,o),e.intersect=function(l){return Ni.polygon(e,s,l)},r},"trapezoid"),rLt=b(async(t,e)=>{let{shapeSvg:r,bbox:n}=await vs(t,e,Yl(e,void 0),!0),i=n.width+e.padding,a=n.height+e.padding,s=[{x:a/6,y:0},{x:i-a/6,y:0},{x:i+2*a/6,y:-a},{x:-2*a/6,y:-a}],o=Rc(r,i,a,s);return o.attr("style",e.style),ta(e,o),e.intersect=function(l){return Ni.polygon(e,s,l)},r},"inv_trapezoid"),nLt=b(async(t,e)=>{let{shapeSvg:r,bbox:n}=await vs(t,e,Yl(e,void 0),!0),i=n.width+e.padding,a=n.height+e.padding,s=[{x:0,y:0},{x:i+a/2,y:0},{x:i,y:-a/2},{x:i+a/2,y:-a},{x:0,y:-a}],o=Rc(r,i,a,s);return o.attr("style",e.style),ta(e,o),e.intersect=function(l){return Ni.polygon(e,s,l)},r},"rect_right_inv_arrow"),iLt=b(async(t,e)=>{let{shapeSvg:r,bbox:n}=await vs(t,e,Yl(e,void 0),!0),i=n.width+e.padding,a=i/2,s=a/(2.5+i/50),o=n.height+s+e.padding,l="M 0,"+s+" a "+a+","+s+" 0,0,0 "+i+" 0 a "+a+","+s+" 0,0,0 "+-i+" 0 l 0,"+o+" a "+a+","+s+" 0,0,0 "+i+" 0 l 0,"+-o,u=r.attr("label-offset-y",s).insert("path",":first-child").attr("style",e.style).attr("d",l).attr("transform","translate("+-i/2+","+-(o/2+s)+")");return ta(e,u),e.intersect=function(h){let f=Ni.rect(e,h),d=f.x-e.x;if(a!=0&&(Math.abs(d)e.height/2-s)){let p=s*s*(1-d*d/(a*a));p!=0&&(p=Math.sqrt(p)),p=s-p,h.y-e.y>0&&(p=-p),f.y+=p}return f},r},"cylinder"),aLt=b(async(t,e)=>{let{shapeSvg:r,bbox:n,halfPadding:i}=await vs(t,e,"node "+e.classes+" "+e.class,!0),a=r.insert("rect",":first-child"),s=e.positioned?e.width:n.width+e.padding,o=e.positioned?e.height:n.height+e.padding,l=e.positioned?-s/2:-n.width/2-i,u=e.positioned?-o/2:-n.height/2-i;if(a.attr("class","basic label-container").attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("x",l).attr("y",u).attr("width",s).attr("height",o),e.props){let h=new Set(Object.keys(e.props));e.props.borders&&(pD(a,e.props.borders,s,o),h.delete("borders")),h.forEach(f=>{he.warn(`Unknown node property ${f}`)})}return ta(e,a),e.intersect=function(h){return Ni.rect(e,h)},r},"rect"),sLt=b(async(t,e)=>{let{shapeSvg:r,bbox:n,halfPadding:i}=await vs(t,e,"node "+e.classes,!0),a=r.insert("rect",":first-child"),s=e.positioned?e.width:n.width+e.padding,o=e.positioned?e.height:n.height+e.padding,l=e.positioned?-s/2:-n.width/2-i,u=e.positioned?-o/2:-n.height/2-i;if(a.attr("class","basic cluster composite label-container").attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("x",l).attr("y",u).attr("width",s).attr("height",o),e.props){let h=new Set(Object.keys(e.props));e.props.borders&&(pD(a,e.props.borders,s,o),h.delete("borders")),h.forEach(f=>{he.warn(`Unknown node property ${f}`)})}return ta(e,a),e.intersect=function(h){return Ni.rect(e,h)},r},"composite"),oLt=b(async(t,e)=>{let{shapeSvg:r}=await vs(t,e,"label",!0);he.trace("Classes = ",e.class);let n=r.insert("rect",":first-child"),i=0,a=0;if(n.attr("width",i).attr("height",a),r.attr("class","label edgeLabel"),e.props){let s=new Set(Object.keys(e.props));e.props.borders&&(pD(n,e.props.borders,i,a),s.delete("borders")),s.forEach(o=>{he.warn(`Unknown node property ${o}`)})}return ta(e,n),e.intersect=function(s){return Ni.rect(e,s)},r},"labelRect");b(pD,"applyNodePropertyBorders");lLt=b((t,e)=>{let r;e.classes?r="node "+e.classes:r="node default";let n=t.insert("g").attr("class",r).attr("id",e.domId||e.id),i=n.insert("rect",":first-child"),a=n.insert("line"),s=n.insert("g").attr("class","label"),o=e.labelText.flat?e.labelText.flat():e.labelText,l="";typeof o=="object"?l=o[0]:l=o,he.info("Label text abc79",l,o,typeof o=="object");let u=s.node().appendChild(Pu(l,e.labelStyle,!0,!0)),h={width:0,height:0};if(dn(Fe().flowchart.htmlLabels)){let g=u.children[0],y=dt(u);h=g.getBoundingClientRect(),y.attr("width",h.width),y.attr("height",h.height)}he.info("Text 2",o);let f=o.slice(1,o.length),d=u.getBBox(),p=s.node().appendChild(Pu(f.join?f.join("
    "):f,e.labelStyle,!0,!0));if(dn(Fe().flowchart.htmlLabels)){let g=p.children[0],y=dt(p);h=g.getBoundingClientRect(),y.attr("width",h.width),y.attr("height",h.height)}let m=e.padding/2;return dt(p).attr("transform","translate( "+(h.width>d.width?0:(d.width-h.width)/2)+", "+(d.height+m+5)+")"),dt(u).attr("transform","translate( "+(h.width{let{shapeSvg:r,bbox:n}=await vs(t,e,Yl(e,void 0),!0),i=n.height+e.padding,a=n.width+i/4+e.padding,s=r.insert("rect",":first-child").attr("style",e.style).attr("rx",i/2).attr("ry",i/2).attr("x",-a/2).attr("y",-i/2).attr("width",a).attr("height",i);return ta(e,s),e.intersect=function(o){return Ni.rect(e,o)},r},"stadium"),cLt=b(async(t,e)=>{let{shapeSvg:r,bbox:n,halfPadding:i}=await vs(t,e,Yl(e,void 0),!0),a=r.insert("circle",":first-child");return a.attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("r",n.width/2+i).attr("width",n.width+e.padding).attr("height",n.height+e.padding),he.info("Circle main"),ta(e,a),e.intersect=function(s){return he.info("Circle intersect",e,n.width/2+i,s),Ni.circle(e,n.width/2+i,s)},r},"circle"),hLt=b(async(t,e)=>{let{shapeSvg:r,bbox:n,halfPadding:i}=await vs(t,e,Yl(e,void 0),!0),a=5,s=r.insert("g",":first-child"),o=s.insert("circle"),l=s.insert("circle");return s.attr("class",e.class),o.attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("r",n.width/2+i+a).attr("width",n.width+e.padding+a*2).attr("height",n.height+e.padding+a*2),l.attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("r",n.width/2+i).attr("width",n.width+e.padding).attr("height",n.height+e.padding),he.info("DoubleCircle main"),ta(e,o),e.intersect=function(u){return he.info("DoubleCircle intersect",e,n.width/2+i+a,u),Ni.circle(e,n.width/2+i+a,u)},r},"doublecircle"),fLt=b(async(t,e)=>{let{shapeSvg:r,bbox:n}=await vs(t,e,Yl(e,void 0),!0),i=n.width+e.padding,a=n.height+e.padding,s=[{x:0,y:0},{x:i,y:0},{x:i,y:-a},{x:0,y:-a},{x:0,y:0},{x:-8,y:0},{x:i+8,y:0},{x:i+8,y:-a},{x:-8,y:-a},{x:-8,y:0}],o=Rc(r,i,a,s);return o.attr("style",e.style),ta(e,o),e.intersect=function(l){return Ni.polygon(e,s,l)},r},"subroutine"),dLt=b((t,e)=>{let r=t.insert("g").attr("class","node default").attr("id",e.domId||e.id),n=r.insert("circle",":first-child");return n.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14),ta(e,n),e.intersect=function(i){return Ni.circle(e,7,i)},r},"start"),MMe=b((t,e,r)=>{let n=t.insert("g").attr("class","node default").attr("id",e.domId||e.id),i=70,a=10;r==="LR"&&(i=10,a=70);let s=n.append("rect").attr("x",-1*i/2).attr("y",-1*a/2).attr("width",i).attr("height",a).attr("class","fork-join");return ta(e,s),e.height=e.height+e.padding/2,e.width=e.width+e.padding/2,e.intersect=function(o){return Ni.rect(e,o)},n},"forkJoin"),pLt=b((t,e)=>{let r=t.insert("g").attr("class","node default").attr("id",e.domId||e.id),n=r.insert("circle",":first-child"),i=r.insert("circle",":first-child");return i.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14),n.attr("class","state-end").attr("r",5).attr("width",10).attr("height",10),ta(e,i),e.intersect=function(a){return Ni.circle(e,7,a)},r},"end"),mLt=b((t,e)=>{let r=e.padding/2,n=4,i=8,a;e.classes?a="node "+e.classes:a="node default";let s=t.insert("g").attr("class",a).attr("id",e.domId||e.id),o=s.insert("rect",":first-child"),l=s.insert("line"),u=s.insert("line"),h=0,f=n,d=s.insert("g").attr("class","label"),p=0,m=e.classData.annotations?.[0],g=e.classData.annotations[0]?"\xAB"+e.classData.annotations[0]+"\xBB":"",y=d.node().appendChild(Pu(g,e.labelStyle,!0,!0)),v=y.getBBox();if(dn(Fe().flowchart.htmlLabels)){let A=y.children[0],I=dt(y);v=A.getBoundingClientRect(),I.attr("width",v.width),I.attr("height",v.height)}e.classData.annotations[0]&&(f+=v.height+n,h+=v.width);let x=e.classData.label;e.classData.type!==void 0&&e.classData.type!==""&&(Fe().flowchart.htmlLabels?x+="<"+e.classData.type+">":x+="<"+e.classData.type+">");let k=d.node().appendChild(Pu(x,e.labelStyle,!0,!0));dt(k).attr("class","classTitle");let _=k.getBBox();if(dn(Fe().flowchart.htmlLabels)){let A=k.children[0],I=dt(k);_=A.getBoundingClientRect(),I.attr("width",_.width),I.attr("height",_.height)}f+=_.height+n,_.width>h&&(h=_.width);let T=[];e.classData.members.forEach(A=>{let I=A.getDisplayDetails(),P=I.displayText;Fe().flowchart.htmlLabels&&(P=P.replace(//g,">"));let O=d.node().appendChild(Pu(P,I.cssStyle?I.cssStyle:e.labelStyle,!0,!0)),C=O.getBBox();if(dn(Fe().flowchart.htmlLabels)){let N=O.children[0],B=dt(O);C=N.getBoundingClientRect(),B.attr("width",C.width),B.attr("height",C.height)}C.width>h&&(h=C.width),f+=C.height+n,T.push(O)}),f+=i;let S=[];if(e.classData.methods.forEach(A=>{let I=A.getDisplayDetails(),P=I.displayText;Fe().flowchart.htmlLabels&&(P=P.replace(//g,">"));let O=d.node().appendChild(Pu(P,I.cssStyle?I.cssStyle:e.labelStyle,!0,!0)),C=O.getBBox();if(dn(Fe().flowchart.htmlLabels)){let N=O.children[0],B=dt(O);C=N.getBoundingClientRect(),B.attr("width",C.width),B.attr("height",C.height)}C.width>h&&(h=C.width),f+=C.height+n,S.push(O)}),f+=i,m){let A=(h-v.width)/2;dt(y).attr("transform","translate( "+(-1*h/2+A)+", "+-1*f/2+")"),p=v.height+n}let R=(h-_.width)/2;return dt(k).attr("transform","translate( "+(-1*h/2+R)+", "+(-1*f/2+p)+")"),p+=_.height+n,l.attr("class","divider").attr("x1",-h/2-r).attr("x2",h/2+r).attr("y1",-f/2-r+i+p).attr("y2",-f/2-r+i+p),p+=i,T.forEach(A=>{dt(A).attr("transform","translate( "+-h/2+", "+(-1*f/2+p+i/2)+")");let I=A?.getBBox();p+=(I?.height??0)+n}),p+=i,u.attr("class","divider").attr("x1",-h/2-r).attr("x2",h/2+r).attr("y1",-f/2-r+i+p).attr("y2",-f/2-r+i+p),p+=i,S.forEach(A=>{dt(A).attr("transform","translate( "+-h/2+", "+(-1*f/2+p)+")");let I=A?.getBBox();p+=(I?.height??0)+n}),o.attr("style",e.style).attr("class","outer title-state").attr("x",-h/2-r).attr("y",-(f/2)-r).attr("width",h+e.padding).attr("height",f+e.padding),ta(e,o),e.intersect=function(A){return Ni.rect(e,A)},s},"class_box"),NMe={rhombus:IMe,composite:sLt,question:IMe,rect:aLt,labelRect:oLt,rectWithTitle:lLt,choice:jAt,circle:cLt,doublecircle:hLt,stadium:uLt,hexagon:KAt,block_arrow:ZAt,rect_left_inv_arrow:QAt,lean_right:JAt,lean_left:eLt,trapezoid:tLt,inv_trapezoid:rLt,rect_right_inv_arrow:nLt,cylinder:iLt,start:dLt,end:pLt,note:XAt,subroutine:fLt,fork:MMe,join:MMe,class_box:mLt},hD={},jMe=b(async(t,e,r)=>{let n,i;if(e.link){let a;Fe().securityLevel==="sandbox"?a="_top":e.linkTarget&&(a=e.linkTarget||"_blank"),n=t.insert("svg:a").attr("xlink:href",e.link).attr("target",a),i=await NMe[e.shape](n,e,r)}else i=await NMe[e.shape](t,e,r),n=i;return e.tooltip&&i.attr("title",e.tooltip),e.class&&i.attr("class","node default "+e.class),hD[e.id]=n,e.haveCallback&&hD[e.id].attr("class",hD[e.id].attr("class")+" clickable"),n},"insertNode"),gLt=b(t=>{let e=hD[t.id];he.trace("Transforming node",t.diff,t,"translate("+(t.x-t.width/2-5)+", "+t.width/2+")");let r=8,n=t.diff||0;return t.clusterNode?e.attr("transform","translate("+(t.x+n-t.width/2)+", "+(t.y-t.height/2-r)+")"):e.attr("transform","translate("+t.x+", "+t.y+")"),n},"positionNode");b(dj,"getNodeFromBlock");b(KMe,"calculateBlockSize");b(ZMe,"insertBlockPositioned");b(mD,"performOperations");b(QMe,"calculateBlockSizes");b(JMe,"insertBlocks");b(eNe,"insertEdges");yLt=b(function(t,e){return e.db.getClasses()},"getClasses"),vLt=b(async function(t,e,r,n){let{securityLevel:i,block:a}=Yr(),s=n.db,o;i==="sandbox"&&(o=dt("#i"+e));let l=i==="sandbox"?dt(o.nodes()[0].contentDocument.body):dt("body"),u=i==="sandbox"?l.select(`[id="${e}"]`):dt(`[id="${e}"]`);LAt(u,["point","circle","cross"],n.type,e);let f=s.getBlocks(),d=s.getBlocksFlat(),p=s.getEdges(),m=u.insert("g").attr("class","block");await QMe(m,f,s);let g=GMe(s);if(await JMe(m,f,s),await eNe(m,p,d,s,e),g){let y=g,v=Math.max(1,Math.round(.125*(y.width/y.height))),x=y.height+v+10,k=y.width+10,{useMaxWidth:_}=a;ei(u,x,k,!!_),he.debug("Here Bounds",g,y),u.attr("viewBox",`${y.x-5} ${y.y-5} ${y.width+10} ${y.height+10}`)}},"draw"),xLt={draw:vLt,getClasses:yLt},bLt={parser:K_t,db:mAt,renderer:xLt,styles:yAt}});var mj=Bi((vw,pj)=>{(function(e,r){typeof vw=="object"&&typeof pj=="object"?pj.exports=r():typeof define=="function"&&define.amd?define([],r):typeof vw=="object"?vw.layoutBase=r():e.layoutBase=r()})(vw,function(){return(function(t){var e={};function r(n){if(e[n])return e[n].exports;var i=e[n]={i:n,l:!1,exports:{}};return t[n].call(i.exports,i,i.exports,r),i.l=!0,i.exports}return r.m=t,r.c=e,r.i=function(n){return n},r.d=function(n,i,a){r.o(n,i)||Object.defineProperty(n,i,{configurable:!1,enumerable:!0,get:a})},r.n=function(n){var i=n&&n.__esModule?function(){return n.default}:function(){return n};return r.d(i,"a",i),i},r.o=function(n,i){return Object.prototype.hasOwnProperty.call(n,i)},r.p="",r(r.s=28)})([(function(t,e,r){"use strict";function n(){}n.QUALITY=1,n.DEFAULT_CREATE_BENDS_AS_NEEDED=!1,n.DEFAULT_INCREMENTAL=!1,n.DEFAULT_ANIMATION_ON_LAYOUT=!0,n.DEFAULT_ANIMATION_DURING_LAYOUT=!1,n.DEFAULT_ANIMATION_PERIOD=50,n.DEFAULT_UNIFORM_LEAF_NODE_SIZES=!1,n.DEFAULT_GRAPH_MARGIN=15,n.NODE_DIMENSIONS_INCLUDE_LABELS=!1,n.SIMPLE_NODE_SIZE=40,n.SIMPLE_NODE_HALF_SIZE=n.SIMPLE_NODE_SIZE/2,n.EMPTY_COMPOUND_NODE_SIZE=40,n.MIN_EDGE_LENGTH=1,n.WORLD_BOUNDARY=1e6,n.INITIAL_WORLD_BOUNDARY=n.WORLD_BOUNDARY/1e3,n.WORLD_CENTER_X=1200,n.WORLD_CENTER_Y=900,t.exports=n}),(function(t,e,r){"use strict";var n=r(2),i=r(8),a=r(9);function s(l,u,h){n.call(this,h),this.isOverlapingSourceAndTarget=!1,this.vGraphObject=h,this.bendpoints=[],this.source=l,this.target=u}s.prototype=Object.create(n.prototype);for(var o in n)s[o]=n[o];s.prototype.getSource=function(){return this.source},s.prototype.getTarget=function(){return this.target},s.prototype.isInterGraph=function(){return this.isInterGraph},s.prototype.getLength=function(){return this.length},s.prototype.isOverlapingSourceAndTarget=function(){return this.isOverlapingSourceAndTarget},s.prototype.getBendpoints=function(){return this.bendpoints},s.prototype.getLca=function(){return this.lca},s.prototype.getSourceInLca=function(){return this.sourceInLca},s.prototype.getTargetInLca=function(){return this.targetInLca},s.prototype.getOtherEnd=function(l){if(this.source===l)return this.target;if(this.target===l)return this.source;throw"Node is not incident with this edge"},s.prototype.getOtherEndInGraph=function(l,u){for(var h=this.getOtherEnd(l),f=u.getGraphManager().getRoot();;){if(h.getOwner()==u)return h;if(h.getOwner()==f)break;h=h.getOwner().getParent()}return null},s.prototype.updateLength=function(){var l=new Array(4);this.isOverlapingSourceAndTarget=i.getIntersection(this.target.getRect(),this.source.getRect(),l),this.isOverlapingSourceAndTarget||(this.lengthX=l[0]-l[2],this.lengthY=l[1]-l[3],Math.abs(this.lengthX)<1&&(this.lengthX=a.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=a.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY))},s.prototype.updateLengthSimple=function(){this.lengthX=this.target.getCenterX()-this.source.getCenterX(),this.lengthY=this.target.getCenterY()-this.source.getCenterY(),Math.abs(this.lengthX)<1&&(this.lengthX=a.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=a.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY)},t.exports=s}),(function(t,e,r){"use strict";function n(i){this.vGraphObject=i}t.exports=n}),(function(t,e,r){"use strict";var n=r(2),i=r(10),a=r(13),s=r(0),o=r(16),l=r(5);function u(f,d,p,m){p==null&&m==null&&(m=d),n.call(this,m),f.graphManager!=null&&(f=f.graphManager),this.estimatedSize=i.MIN_VALUE,this.inclusionTreeDepth=i.MAX_VALUE,this.vGraphObject=m,this.edges=[],this.graphManager=f,p!=null&&d!=null?this.rect=new a(d.x,d.y,p.width,p.height):this.rect=new a}u.prototype=Object.create(n.prototype);for(var h in n)u[h]=n[h];u.prototype.getEdges=function(){return this.edges},u.prototype.getChild=function(){return this.child},u.prototype.getOwner=function(){return this.owner},u.prototype.getWidth=function(){return this.rect.width},u.prototype.setWidth=function(f){this.rect.width=f},u.prototype.getHeight=function(){return this.rect.height},u.prototype.setHeight=function(f){this.rect.height=f},u.prototype.getCenterX=function(){return this.rect.x+this.rect.width/2},u.prototype.getCenterY=function(){return this.rect.y+this.rect.height/2},u.prototype.getCenter=function(){return new l(this.rect.x+this.rect.width/2,this.rect.y+this.rect.height/2)},u.prototype.getLocation=function(){return new l(this.rect.x,this.rect.y)},u.prototype.getRect=function(){return this.rect},u.prototype.getDiagonal=function(){return Math.sqrt(this.rect.width*this.rect.width+this.rect.height*this.rect.height)},u.prototype.getHalfTheDiagonal=function(){return Math.sqrt(this.rect.height*this.rect.height+this.rect.width*this.rect.width)/2},u.prototype.setRect=function(f,d){this.rect.x=f.x,this.rect.y=f.y,this.rect.width=d.width,this.rect.height=d.height},u.prototype.setCenter=function(f,d){this.rect.x=f-this.rect.width/2,this.rect.y=d-this.rect.height/2},u.prototype.setLocation=function(f,d){this.rect.x=f,this.rect.y=d},u.prototype.moveBy=function(f,d){this.rect.x+=f,this.rect.y+=d},u.prototype.getEdgeListToNode=function(f){var d=[],p,m=this;return m.edges.forEach(function(g){if(g.target==f){if(g.source!=m)throw"Incorrect edge source!";d.push(g)}}),d},u.prototype.getEdgesBetween=function(f){var d=[],p,m=this;return m.edges.forEach(function(g){if(!(g.source==m||g.target==m))throw"Incorrect edge source and/or target";(g.target==f||g.source==f)&&d.push(g)}),d},u.prototype.getNeighborsList=function(){var f=new Set,d=this;return d.edges.forEach(function(p){if(p.source==d)f.add(p.target);else{if(p.target!=d)throw"Incorrect incidency!";f.add(p.source)}}),f},u.prototype.withChildren=function(){var f=new Set,d,p;if(f.add(this),this.child!=null)for(var m=this.child.getNodes(),g=0;gd?(this.rect.x-=(this.labelWidth-d)/2,this.setWidth(this.labelWidth)):this.labelPosHorizontal=="right"&&this.setWidth(d+this.labelWidth)),this.labelHeight&&(this.labelPosVertical=="top"?(this.rect.y-=this.labelHeight,this.setHeight(p+this.labelHeight)):this.labelPosVertical=="center"&&this.labelHeight>p?(this.rect.y-=(this.labelHeight-p)/2,this.setHeight(this.labelHeight)):this.labelPosVertical=="bottom"&&this.setHeight(p+this.labelHeight))}}},u.prototype.getInclusionTreeDepth=function(){if(this.inclusionTreeDepth==i.MAX_VALUE)throw"assert failed";return this.inclusionTreeDepth},u.prototype.transform=function(f){var d=this.rect.x;d>s.WORLD_BOUNDARY?d=s.WORLD_BOUNDARY:d<-s.WORLD_BOUNDARY&&(d=-s.WORLD_BOUNDARY);var p=this.rect.y;p>s.WORLD_BOUNDARY?p=s.WORLD_BOUNDARY:p<-s.WORLD_BOUNDARY&&(p=-s.WORLD_BOUNDARY);var m=new l(d,p),g=f.inverseTransformPoint(m);this.setLocation(g.x,g.y)},u.prototype.getLeft=function(){return this.rect.x},u.prototype.getRight=function(){return this.rect.x+this.rect.width},u.prototype.getTop=function(){return this.rect.y},u.prototype.getBottom=function(){return this.rect.y+this.rect.height},u.prototype.getParent=function(){return this.owner==null?null:this.owner.getParent()},t.exports=u}),(function(t,e,r){"use strict";var n=r(0);function i(){}for(var a in n)i[a]=n[a];i.MAX_ITERATIONS=2500,i.DEFAULT_EDGE_LENGTH=50,i.DEFAULT_SPRING_STRENGTH=.45,i.DEFAULT_REPULSION_STRENGTH=4500,i.DEFAULT_GRAVITY_STRENGTH=.4,i.DEFAULT_COMPOUND_GRAVITY_STRENGTH=1,i.DEFAULT_GRAVITY_RANGE_FACTOR=3.8,i.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=1.5,i.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION=!0,i.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION=!0,i.DEFAULT_COOLING_FACTOR_INCREMENTAL=.3,i.COOLING_ADAPTATION_FACTOR=.33,i.ADAPTATION_LOWER_NODE_LIMIT=1e3,i.ADAPTATION_UPPER_NODE_LIMIT=5e3,i.MAX_NODE_DISPLACEMENT_INCREMENTAL=100,i.MAX_NODE_DISPLACEMENT=i.MAX_NODE_DISPLACEMENT_INCREMENTAL*3,i.MIN_REPULSION_DIST=i.DEFAULT_EDGE_LENGTH/10,i.CONVERGENCE_CHECK_PERIOD=100,i.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=.1,i.MIN_EDGE_LENGTH=1,i.GRID_CALCULATION_CHECK_PERIOD=10,t.exports=i}),(function(t,e,r){"use strict";function n(i,a){i==null&&a==null?(this.x=0,this.y=0):(this.x=i,this.y=a)}n.prototype.getX=function(){return this.x},n.prototype.getY=function(){return this.y},n.prototype.setX=function(i){this.x=i},n.prototype.setY=function(i){this.y=i},n.prototype.getDifference=function(i){return new DimensionD(this.x-i.x,this.y-i.y)},n.prototype.getCopy=function(){return new n(this.x,this.y)},n.prototype.translate=function(i){return this.x+=i.width,this.y+=i.height,this},t.exports=n}),(function(t,e,r){"use strict";var n=r(2),i=r(10),a=r(0),s=r(7),o=r(3),l=r(1),u=r(13),h=r(12),f=r(11);function d(m,g,y){n.call(this,y),this.estimatedSize=i.MIN_VALUE,this.margin=a.DEFAULT_GRAPH_MARGIN,this.edges=[],this.nodes=[],this.isConnected=!1,this.parent=m,g!=null&&g instanceof s?this.graphManager=g:g!=null&&g instanceof Layout&&(this.graphManager=g.graphManager)}d.prototype=Object.create(n.prototype);for(var p in n)d[p]=n[p];d.prototype.getNodes=function(){return this.nodes},d.prototype.getEdges=function(){return this.edges},d.prototype.getGraphManager=function(){return this.graphManager},d.prototype.getParent=function(){return this.parent},d.prototype.getLeft=function(){return this.left},d.prototype.getRight=function(){return this.right},d.prototype.getTop=function(){return this.top},d.prototype.getBottom=function(){return this.bottom},d.prototype.isConnected=function(){return this.isConnected},d.prototype.add=function(m,g,y){if(g==null&&y==null){var v=m;if(this.graphManager==null)throw"Graph has no graph mgr!";if(this.getNodes().indexOf(v)>-1)throw"Node already in graph!";return v.owner=this,this.getNodes().push(v),v}else{var x=m;if(!(this.getNodes().indexOf(g)>-1&&this.getNodes().indexOf(y)>-1))throw"Source or target not in graph!";if(!(g.owner==y.owner&&g.owner==this))throw"Both owners must be this graph!";return g.owner!=y.owner?null:(x.source=g,x.target=y,x.isInterGraph=!1,this.getEdges().push(x),g.edges.push(x),y!=g&&y.edges.push(x),x)}},d.prototype.remove=function(m){var g=m;if(m instanceof o){if(g==null)throw"Node is null!";if(!(g.owner!=null&&g.owner==this))throw"Owner graph is invalid!";if(this.graphManager==null)throw"Owner graph manager is invalid!";for(var y=g.edges.slice(),v,x=y.length,k=0;k-1&&S>-1))throw"Source and/or target doesn't know this edge!";v.source.edges.splice(T,1),v.target!=v.source&&v.target.edges.splice(S,1);var _=v.source.owner.getEdges().indexOf(v);if(_==-1)throw"Not in owner's edge list!";v.source.owner.getEdges().splice(_,1)}},d.prototype.updateLeftTop=function(){for(var m=i.MAX_VALUE,g=i.MAX_VALUE,y,v,x,k=this.getNodes(),_=k.length,T=0;T<_;T++){var S=k[T];y=S.getTop(),v=S.getLeft(),m>y&&(m=y),g>v&&(g=v)}return m==i.MAX_VALUE?null:(k[0].getParent().paddingLeft!=null?x=k[0].getParent().paddingLeft:x=this.margin,this.left=g-x,this.top=m-x,new h(this.left,this.top))},d.prototype.updateBounds=function(m){for(var g=i.MAX_VALUE,y=-i.MAX_VALUE,v=i.MAX_VALUE,x=-i.MAX_VALUE,k,_,T,S,R,A=this.nodes,I=A.length,P=0;Pk&&(g=k),y<_&&(y=_),v>T&&(v=T),xk&&(g=k),y<_&&(y=_),v>T&&(v=T),x=this.nodes.length){var I=0;y.forEach(function(P){P.owner==m&&I++}),I==this.nodes.length&&(this.isConnected=!0)}},t.exports=d}),(function(t,e,r){"use strict";var n,i=r(1);function a(s){n=r(6),this.layout=s,this.graphs=[],this.edges=[]}a.prototype.addRoot=function(){var s=this.layout.newGraph(),o=this.layout.newNode(null),l=this.add(s,o);return this.setRootGraph(l),this.rootGraph},a.prototype.add=function(s,o,l,u,h){if(l==null&&u==null&&h==null){if(s==null)throw"Graph is null!";if(o==null)throw"Parent node is null!";if(this.graphs.indexOf(s)>-1)throw"Graph already in this graph mgr!";if(this.graphs.push(s),s.parent!=null)throw"Already has a parent!";if(o.child!=null)throw"Already has a child!";return s.parent=o,o.child=s,s}else{h=l,u=o,l=s;var f=u.getOwner(),d=h.getOwner();if(!(f!=null&&f.getGraphManager()==this))throw"Source not in this graph mgr!";if(!(d!=null&&d.getGraphManager()==this))throw"Target not in this graph mgr!";if(f==d)return l.isInterGraph=!1,f.add(l,u,h);if(l.isInterGraph=!0,l.source=u,l.target=h,this.edges.indexOf(l)>-1)throw"Edge already in inter-graph edge list!";if(this.edges.push(l),!(l.source!=null&&l.target!=null))throw"Edge source and/or target is null!";if(!(l.source.edges.indexOf(l)==-1&&l.target.edges.indexOf(l)==-1))throw"Edge already in source and/or target incidency list!";return l.source.edges.push(l),l.target.edges.push(l),l}},a.prototype.remove=function(s){if(s instanceof n){var o=s;if(o.getGraphManager()!=this)throw"Graph not in this graph mgr";if(!(o==this.rootGraph||o.parent!=null&&o.parent.graphManager==this))throw"Invalid parent node!";var l=[];l=l.concat(o.getEdges());for(var u,h=l.length,f=0;f=s.getRight()?o[0]+=Math.min(s.getX()-a.getX(),a.getRight()-s.getRight()):s.getX()<=a.getX()&&s.getRight()>=a.getRight()&&(o[0]+=Math.min(a.getX()-s.getX(),s.getRight()-a.getRight())),a.getY()<=s.getY()&&a.getBottom()>=s.getBottom()?o[1]+=Math.min(s.getY()-a.getY(),a.getBottom()-s.getBottom()):s.getY()<=a.getY()&&s.getBottom()>=a.getBottom()&&(o[1]+=Math.min(a.getY()-s.getY(),s.getBottom()-a.getBottom()));var h=Math.abs((s.getCenterY()-a.getCenterY())/(s.getCenterX()-a.getCenterX()));s.getCenterY()===a.getCenterY()&&s.getCenterX()===a.getCenterX()&&(h=1);var f=h*o[0],d=o[1]/h;o[0]f)return o[0]=l,o[1]=p,o[2]=h,o[3]=A,!1;if(uh)return o[0]=d,o[1]=u,o[2]=S,o[3]=f,!1;if(lh?(o[0]=g,o[1]=y,C=!0):(o[0]=m,o[1]=p,C=!0):B===M&&(l>h?(o[0]=d,o[1]=p,C=!0):(o[0]=v,o[1]=y,C=!0)),-F===M?h>l?(o[2]=R,o[3]=A,N=!0):(o[2]=S,o[3]=T,N=!0):F===M&&(h>l?(o[2]=_,o[3]=T,N=!0):(o[2]=I,o[3]=A,N=!0)),C&&N)return!1;if(l>h?u>f?($=this.getCardinalDirection(B,M,4),z=this.getCardinalDirection(F,M,2)):($=this.getCardinalDirection(-B,M,3),z=this.getCardinalDirection(-F,M,1)):u>f?($=this.getCardinalDirection(-B,M,1),z=this.getCardinalDirection(-F,M,3)):($=this.getCardinalDirection(B,M,2),z=this.getCardinalDirection(F,M,4)),!C)switch($){case 1:V=p,q=l+-k/M,o[0]=q,o[1]=V;break;case 2:q=v,V=u+x*M,o[0]=q,o[1]=V;break;case 3:V=y,q=l+k/M,o[0]=q,o[1]=V;break;case 4:q=g,V=u+-x*M,o[0]=q,o[1]=V;break}if(!N)switch(z){case 1:J=T,U=h+-O/M,o[2]=U,o[3]=J;break;case 2:U=I,J=f+P*M,o[2]=U,o[3]=J;break;case 3:J=A,U=h+O/M,o[2]=U,o[3]=J;break;case 4:U=R,J=f+-P*M,o[2]=U,o[3]=J;break}}return!1},i.getCardinalDirection=function(a,s,o){return a>s?o:1+o%4},i.getIntersection=function(a,s,o,l){if(l==null)return this.getIntersection2(a,s,o);var u=a.x,h=a.y,f=s.x,d=s.y,p=o.x,m=o.y,g=l.x,y=l.y,v=void 0,x=void 0,k=void 0,_=void 0,T=void 0,S=void 0,R=void 0,A=void 0,I=void 0;return k=d-h,T=u-f,R=f*h-u*d,_=y-m,S=p-g,A=g*m-p*y,I=k*S-_*T,I===0?null:(v=(T*A-S*R)/I,x=(_*R-k*A)/I,new n(v,x))},i.angleOfVector=function(a,s,o,l){var u=void 0;return a!==o?(u=Math.atan((l-s)/(o-a)),o=0){var y=(-p+Math.sqrt(p*p-4*d*m))/(2*d),v=(-p-Math.sqrt(p*p-4*d*m))/(2*d),x=null;return y>=0&&y<=1?[y]:v>=0&&v<=1?[v]:x}else return null},i.HALF_PI=.5*Math.PI,i.ONE_AND_HALF_PI=1.5*Math.PI,i.TWO_PI=2*Math.PI,i.THREE_PI=3*Math.PI,t.exports=i}),(function(t,e,r){"use strict";function n(){}n.sign=function(i){return i>0?1:i<0?-1:0},n.floor=function(i){return i<0?Math.ceil(i):Math.floor(i)},n.ceil=function(i){return i<0?Math.floor(i):Math.ceil(i)},t.exports=n}),(function(t,e,r){"use strict";function n(){}n.MAX_VALUE=2147483647,n.MIN_VALUE=-2147483648,t.exports=n}),(function(t,e,r){"use strict";var n=(function(){function u(h,f){for(var d=0;d"u"?"undefined":n(a);return a==null||s!="object"&&s!="function"},t.exports=i}),(function(t,e,r){"use strict";function n(p){if(Array.isArray(p)){for(var m=0,g=Array(p.length);m0&&m;){for(k.push(T[0]);k.length>0&&m;){var S=k[0];k.splice(0,1),x.add(S);for(var R=S.getEdges(),v=0;v-1&&T.splice(O,1)}x=new Set,_=new Map}}return p},d.prototype.createDummyNodesForBendpoints=function(p){for(var m=[],g=p.source,y=this.graphManager.calcLowestCommonAncestor(p.source,p.target),v=0;v0){for(var y=this.edgeToDummyNodes.get(g),v=0;v=0&&m.splice(A,1);var I=_.getNeighborsList();I.forEach(function(C){if(g.indexOf(C)<0){var N=y.get(C),B=N-1;B==1&&S.push(C),y.set(C,B)}})}g=g.concat(S),(m.length==1||m.length==2)&&(v=!0,x=m[0])}return x},d.prototype.setGraphManager=function(p){this.graphManager=p},t.exports=d}),(function(t,e,r){"use strict";function n(){}n.seed=1,n.x=0,n.nextDouble=function(){return n.x=Math.sin(n.seed++)*1e4,n.x-Math.floor(n.x)},t.exports=n}),(function(t,e,r){"use strict";var n=r(5);function i(a,s){this.lworldOrgX=0,this.lworldOrgY=0,this.ldeviceOrgX=0,this.ldeviceOrgY=0,this.lworldExtX=1,this.lworldExtY=1,this.ldeviceExtX=1,this.ldeviceExtY=1}i.prototype.getWorldOrgX=function(){return this.lworldOrgX},i.prototype.setWorldOrgX=function(a){this.lworldOrgX=a},i.prototype.getWorldOrgY=function(){return this.lworldOrgY},i.prototype.setWorldOrgY=function(a){this.lworldOrgY=a},i.prototype.getWorldExtX=function(){return this.lworldExtX},i.prototype.setWorldExtX=function(a){this.lworldExtX=a},i.prototype.getWorldExtY=function(){return this.lworldExtY},i.prototype.setWorldExtY=function(a){this.lworldExtY=a},i.prototype.getDeviceOrgX=function(){return this.ldeviceOrgX},i.prototype.setDeviceOrgX=function(a){this.ldeviceOrgX=a},i.prototype.getDeviceOrgY=function(){return this.ldeviceOrgY},i.prototype.setDeviceOrgY=function(a){this.ldeviceOrgY=a},i.prototype.getDeviceExtX=function(){return this.ldeviceExtX},i.prototype.setDeviceExtX=function(a){this.ldeviceExtX=a},i.prototype.getDeviceExtY=function(){return this.ldeviceExtY},i.prototype.setDeviceExtY=function(a){this.ldeviceExtY=a},i.prototype.transformX=function(a){var s=0,o=this.lworldExtX;return o!=0&&(s=this.ldeviceOrgX+(a-this.lworldOrgX)*this.ldeviceExtX/o),s},i.prototype.transformY=function(a){var s=0,o=this.lworldExtY;return o!=0&&(s=this.ldeviceOrgY+(a-this.lworldOrgY)*this.ldeviceExtY/o),s},i.prototype.inverseTransformX=function(a){var s=0,o=this.ldeviceExtX;return o!=0&&(s=this.lworldOrgX+(a-this.ldeviceOrgX)*this.lworldExtX/o),s},i.prototype.inverseTransformY=function(a){var s=0,o=this.ldeviceExtY;return o!=0&&(s=this.lworldOrgY+(a-this.ldeviceOrgY)*this.lworldExtY/o),s},i.prototype.inverseTransformPoint=function(a){var s=new n(this.inverseTransformX(a.x),this.inverseTransformY(a.y));return s},t.exports=i}),(function(t,e,r){"use strict";function n(f){if(Array.isArray(f)){for(var d=0,p=Array(f.length);da.ADAPTATION_LOWER_NODE_LIMIT&&(this.coolingFactor=Math.max(this.coolingFactor*a.COOLING_ADAPTATION_FACTOR,this.coolingFactor-(f-a.ADAPTATION_LOWER_NODE_LIMIT)/(a.ADAPTATION_UPPER_NODE_LIMIT-a.ADAPTATION_LOWER_NODE_LIMIT)*this.coolingFactor*(1-a.COOLING_ADAPTATION_FACTOR))),this.maxNodeDisplacement=a.MAX_NODE_DISPLACEMENT_INCREMENTAL):(f>a.ADAPTATION_LOWER_NODE_LIMIT?this.coolingFactor=Math.max(a.COOLING_ADAPTATION_FACTOR,1-(f-a.ADAPTATION_LOWER_NODE_LIMIT)/(a.ADAPTATION_UPPER_NODE_LIMIT-a.ADAPTATION_LOWER_NODE_LIMIT)*(1-a.COOLING_ADAPTATION_FACTOR)):this.coolingFactor=1,this.initialCoolingFactor=this.coolingFactor,this.maxNodeDisplacement=a.MAX_NODE_DISPLACEMENT),this.maxIterations=Math.max(this.getAllNodes().length*5,this.maxIterations),this.displacementThresholdPerNode=3*a.DEFAULT_EDGE_LENGTH/100,this.totalDisplacementThreshold=this.displacementThresholdPerNode*this.getAllNodes().length,this.repulsionRange=this.calcRepulsionRange()},u.prototype.calcSpringForces=function(){for(var f=this.getAllEdges(),d,p=0;p0&&arguments[0]!==void 0?arguments[0]:!0,d=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,p,m,g,y,v=this.getAllNodes(),x;if(this.useFRGridVariant)for(this.totalIterations%a.GRID_CALCULATION_CHECK_PERIOD==1&&f&&this.updateGrid(),x=new Set,p=0;pk||x>k)&&(f.gravitationForceX=-this.gravityConstant*g,f.gravitationForceY=-this.gravityConstant*y)):(k=d.getEstimatedSize()*this.compoundGravityRangeFactor,(v>k||x>k)&&(f.gravitationForceX=-this.gravityConstant*g*this.compoundGravityConstant,f.gravitationForceY=-this.gravityConstant*y*this.compoundGravityConstant))},u.prototype.isConverged=function(){var f,d=!1;return this.totalIterations>this.maxIterations/3&&(d=Math.abs(this.totalDisplacement-this.oldTotalDisplacement)<2),f=this.totalDisplacement=v.length||k>=v[0].length)){for(var _=0;_u}}]),o})();t.exports=s}),(function(t,e,r){"use strict";function n(){}n.svd=function(i){this.U=null,this.V=null,this.s=null,this.m=0,this.n=0,this.m=i.length,this.n=i[0].length;var a=Math.min(this.m,this.n);this.s=(function(ee){for(var Te=[];ee-- >0;)Te.push(0);return Te})(Math.min(this.m+1,this.n)),this.U=(function(ee){var Te=function bt(at){if(at.length==0)return 0;for(var It=[],At=0;At0;)Te.push(0);return Te})(this.n),o=(function(ee){for(var Te=[];ee-- >0;)Te.push(0);return Te})(this.m),l=!0,u=!0,h=Math.min(this.m-1,this.n),f=Math.max(0,Math.min(this.n-2,this.m)),d=0;d=0;M--)if(this.s[M]!==0){for(var $=M+1;$=0;re--){if((function(ee,Te){return ee&&Te})(re0;){var pe=void 0,te=void 0;for(pe=N-2;pe>=-1&&pe!==-1;pe--)if(Math.abs(s[pe])<=ne+oe*(Math.abs(this.s[pe])+Math.abs(this.s[pe+1]))){s[pe]=0;break}if(pe===N-2)te=4;else{var He=void 0;for(He=N-1;He>=pe&&He!==pe;He--){var de=(He!==N?Math.abs(s[He]):0)+(He!==pe+1?Math.abs(s[He-1]):0);if(Math.abs(this.s[He])<=ne+oe*de){this.s[He]=0;break}}He===pe?te=3:He===N-1?te=1:(te=2,pe=He)}switch(pe++,te){case 1:{var ce=s[N-2];s[N-2]=0;for(var st=N-2;st>=pe;st--){var Ae=n.hypot(this.s[st],ce),Ye=this.s[st]/Ae,Ge=ce/Ae;if(this.s[st]=Ae,st!==pe&&(ce=-Ge*s[st-1],s[st-1]=Ye*s[st-1]),u)for(var rt=0;rt=this.s[pe+1]);){var yt=this.s[pe];if(this.s[pe]=this.s[pe+1],this.s[pe+1]=yt,u&&peMath.abs(a)?(s=a/i,s=Math.abs(i)*Math.sqrt(1+s*s)):a!=0?(s=i/a,s=Math.abs(a)*Math.sqrt(1+s*s)):s=0,s},t.exports=n}),(function(t,e,r){"use strict";var n=(function(){function s(o,l){for(var u=0;u2&&arguments[2]!==void 0?arguments[2]:1,h=arguments.length>3&&arguments[3]!==void 0?arguments[3]:-1,f=arguments.length>4&&arguments[4]!==void 0?arguments[4]:-1;i(this,s),this.sequence1=o,this.sequence2=l,this.match_score=u,this.mismatch_penalty=h,this.gap_penalty=f,this.iMax=o.length+1,this.jMax=l.length+1,this.grid=new Array(this.iMax);for(var d=0;d=0;o--){var l=this.listeners[o];l.event===a&&l.callback===s&&this.listeners.splice(o,1)}},i.emit=function(a,s){for(var o=0;o{(function(e,r){typeof xw=="object"&&typeof gj=="object"?gj.exports=r(mj()):typeof define=="function"&&define.amd?define(["layout-base"],r):typeof xw=="object"?xw.coseBase=r(mj()):e.coseBase=r(e.layoutBase)})(xw,function(t){return(()=>{"use strict";var e={45:((a,s,o)=>{var l={};l.layoutBase=o(551),l.CoSEConstants=o(806),l.CoSEEdge=o(767),l.CoSEGraph=o(880),l.CoSEGraphManager=o(578),l.CoSELayout=o(765),l.CoSENode=o(991),l.ConstraintHandler=o(902),a.exports=l}),806:((a,s,o)=>{var l=o(551).FDLayoutConstants;function u(){}for(var h in l)u[h]=l[h];u.DEFAULT_USE_MULTI_LEVEL_SCALING=!1,u.DEFAULT_RADIAL_SEPARATION=l.DEFAULT_EDGE_LENGTH,u.DEFAULT_COMPONENT_SEPERATION=60,u.TILE=!0,u.TILING_PADDING_VERTICAL=10,u.TILING_PADDING_HORIZONTAL=10,u.TRANSFORM_ON_CONSTRAINT_HANDLING=!0,u.ENFORCE_CONSTRAINTS=!0,u.APPLY_LAYOUT=!0,u.RELAX_MOVEMENT_ON_CONSTRAINTS=!0,u.TREE_REDUCTION_ON_INCREMENTAL=!0,u.PURE_INCREMENTAL=u.DEFAULT_INCREMENTAL,a.exports=u}),767:((a,s,o)=>{var l=o(551).FDLayoutEdge;function u(f,d,p){l.call(this,f,d,p)}u.prototype=Object.create(l.prototype);for(var h in l)u[h]=l[h];a.exports=u}),880:((a,s,o)=>{var l=o(551).LGraph;function u(f,d,p){l.call(this,f,d,p)}u.prototype=Object.create(l.prototype);for(var h in l)u[h]=l[h];a.exports=u}),578:((a,s,o)=>{var l=o(551).LGraphManager;function u(f){l.call(this,f)}u.prototype=Object.create(l.prototype);for(var h in l)u[h]=l[h];a.exports=u}),765:((a,s,o)=>{var l=o(551).FDLayout,u=o(578),h=o(880),f=o(991),d=o(767),p=o(806),m=o(902),g=o(551).FDLayoutConstants,y=o(551).LayoutConstants,v=o(551).Point,x=o(551).PointD,k=o(551).DimensionD,_=o(551).Layout,T=o(551).Integer,S=o(551).IGeometry,R=o(551).LGraph,A=o(551).Transform,I=o(551).LinkedList;function P(){l.call(this),this.toBeTiled={},this.constraints={}}P.prototype=Object.create(l.prototype);for(var O in l)P[O]=l[O];P.prototype.newGraphManager=function(){var C=new u(this);return this.graphManager=C,C},P.prototype.newGraph=function(C){return new h(null,this.graphManager,C)},P.prototype.newNode=function(C){return new f(this.graphManager,C)},P.prototype.newEdge=function(C){return new d(null,null,C)},P.prototype.initParameters=function(){l.prototype.initParameters.call(this,arguments),this.isSubLayout||(p.DEFAULT_EDGE_LENGTH<10?this.idealEdgeLength=10:this.idealEdgeLength=p.DEFAULT_EDGE_LENGTH,this.useSmartIdealEdgeLengthCalculation=p.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.gravityConstant=g.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=g.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=g.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=g.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.prunedNodesAll=[],this.growTreeIterations=0,this.afterGrowthIterations=0,this.isTreeGrowing=!1,this.isGrowthFinished=!1)},P.prototype.initSpringEmbedder=function(){l.prototype.initSpringEmbedder.call(this),this.coolingCycle=0,this.maxCoolingCycle=this.maxIterations/g.CONVERGENCE_CHECK_PERIOD,this.finalTemperature=.04,this.coolingAdjuster=1},P.prototype.layout=function(){var C=y.DEFAULT_CREATE_BENDS_AS_NEEDED;return C&&(this.createBendpoints(),this.graphManager.resetAllEdges()),this.level=0,this.classicLayout()},P.prototype.classicLayout=function(){if(this.nodesWithGravity=this.calculateNodesToApplyGravitationTo(),this.graphManager.setAllNodesToApplyGravitation(this.nodesWithGravity),this.calcNoOfChildrenForAllNodes(),this.graphManager.calcLowestCommonAncestors(),this.graphManager.calcInclusionTreeDepths(),this.graphManager.getRoot().calcEstimatedSize(),this.calcIdealEdgeLengths(),this.incremental){if(p.TREE_REDUCTION_ON_INCREMENTAL){this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var N=new Set(this.getAllNodes()),B=this.nodesWithGravity.filter(function($){return N.has($)});this.graphManager.setAllNodesToApplyGravitation(B)}}else{var C=this.getFlatForest();if(C.length>0)this.positionNodesRadially(C);else{this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var N=new Set(this.getAllNodes()),B=this.nodesWithGravity.filter(function(F){return N.has(F)});this.graphManager.setAllNodesToApplyGravitation(B),this.positionNodesRandomly()}}return Object.keys(this.constraints).length>0&&(m.handleConstraints(this),this.initConstraintVariables()),this.initSpringEmbedder(),p.APPLY_LAYOUT&&this.runSpringEmbedder(),!0},P.prototype.tick=function(){if(this.totalIterations++,this.totalIterations===this.maxIterations&&!this.isTreeGrowing&&!this.isGrowthFinished)if(this.prunedNodesAll.length>0)this.isTreeGrowing=!0;else return!0;if(this.totalIterations%g.CONVERGENCE_CHECK_PERIOD==0&&!this.isTreeGrowing&&!this.isGrowthFinished){if(this.isConverged())if(this.prunedNodesAll.length>0)this.isTreeGrowing=!0;else return!0;this.coolingCycle++,this.layoutQuality==0?this.coolingAdjuster=this.coolingCycle:this.layoutQuality==1&&(this.coolingAdjuster=this.coolingCycle/3),this.coolingFactor=Math.max(this.initialCoolingFactor-Math.pow(this.coolingCycle,Math.log(100*(this.initialCoolingFactor-this.finalTemperature))/Math.log(this.maxCoolingCycle))/100*this.coolingAdjuster,this.finalTemperature),this.animationPeriod=Math.ceil(this.initialAnimationPeriod*Math.sqrt(this.coolingFactor))}if(this.isTreeGrowing){if(this.growTreeIterations%10==0)if(this.prunedNodesAll.length>0){this.graphManager.updateBounds(),this.updateGrid(),this.growTree(this.prunedNodesAll),this.graphManager.resetAllNodesToApplyGravitation();var C=new Set(this.getAllNodes()),N=this.nodesWithGravity.filter(function(M){return C.has(M)});this.graphManager.setAllNodesToApplyGravitation(N),this.graphManager.updateBounds(),this.updateGrid(),p.PURE_INCREMENTAL?this.coolingFactor=g.DEFAULT_COOLING_FACTOR_INCREMENTAL/2:this.coolingFactor=g.DEFAULT_COOLING_FACTOR_INCREMENTAL}else this.isTreeGrowing=!1,this.isGrowthFinished=!0;this.growTreeIterations++}if(this.isGrowthFinished){if(this.isConverged())return!0;this.afterGrowthIterations%10==0&&(this.graphManager.updateBounds(),this.updateGrid()),p.PURE_INCREMENTAL?this.coolingFactor=g.DEFAULT_COOLING_FACTOR_INCREMENTAL/2*((100-this.afterGrowthIterations)/100):this.coolingFactor=g.DEFAULT_COOLING_FACTOR_INCREMENTAL*((100-this.afterGrowthIterations)/100),this.afterGrowthIterations++}var B=!this.isTreeGrowing&&!this.isGrowthFinished,F=this.growTreeIterations%10==1&&this.isTreeGrowing||this.afterGrowthIterations%10==1&&this.isGrowthFinished;return this.totalDisplacement=0,this.graphManager.updateBounds(),this.calcSpringForces(),this.calcRepulsionForces(B,F),this.calcGravitationalForces(),this.moveNodes(),this.animate(),!1},P.prototype.getPositionsData=function(){for(var C=this.graphManager.getAllNodes(),N={},B=0;B0&&this.updateDisplacements();for(var B=0;B0&&(F.fixedNodeWeight=$)}}if(this.constraints.relativePlacementConstraint){var z=new Map,q=new Map;if(this.dummyToNodeForVerticalAlignment=new Map,this.dummyToNodeForHorizontalAlignment=new Map,this.fixedNodesOnHorizontal=new Set,this.fixedNodesOnVertical=new Set,this.fixedNodeSet.forEach(function(ye){C.fixedNodesOnHorizontal.add(ye),C.fixedNodesOnVertical.add(ye)}),this.constraints.alignmentConstraint){if(this.constraints.alignmentConstraint.vertical)for(var V=this.constraints.alignmentConstraint.vertical,B=0;B=2*ye.length/3;ie--)_e=Math.floor(Math.random()*(ie+1)),ue=ye[ie],ye[ie]=ye[_e],ye[_e]=ue;return ye},this.nodesInRelativeHorizontal=[],this.nodesInRelativeVertical=[],this.nodeToRelativeConstraintMapHorizontal=new Map,this.nodeToRelativeConstraintMapVertical=new Map,this.nodeToTempPositionMapHorizontal=new Map,this.nodeToTempPositionMapVertical=new Map,this.constraints.relativePlacementConstraint.forEach(function(ye){if(ye.left){var _e=z.has(ye.left)?z.get(ye.left):ye.left,ue=z.has(ye.right)?z.get(ye.right):ye.right;C.nodesInRelativeHorizontal.includes(_e)||(C.nodesInRelativeHorizontal.push(_e),C.nodeToRelativeConstraintMapHorizontal.set(_e,[]),C.dummyToNodeForVerticalAlignment.has(_e)?C.nodeToTempPositionMapHorizontal.set(_e,C.idToNodeMap.get(C.dummyToNodeForVerticalAlignment.get(_e)[0]).getCenterX()):C.nodeToTempPositionMapHorizontal.set(_e,C.idToNodeMap.get(_e).getCenterX())),C.nodesInRelativeHorizontal.includes(ue)||(C.nodesInRelativeHorizontal.push(ue),C.nodeToRelativeConstraintMapHorizontal.set(ue,[]),C.dummyToNodeForVerticalAlignment.has(ue)?C.nodeToTempPositionMapHorizontal.set(ue,C.idToNodeMap.get(C.dummyToNodeForVerticalAlignment.get(ue)[0]).getCenterX()):C.nodeToTempPositionMapHorizontal.set(ue,C.idToNodeMap.get(ue).getCenterX())),C.nodeToRelativeConstraintMapHorizontal.get(_e).push({right:ue,gap:ye.gap}),C.nodeToRelativeConstraintMapHorizontal.get(ue).push({left:_e,gap:ye.gap})}else{var ie=q.has(ye.top)?q.get(ye.top):ye.top,le=q.has(ye.bottom)?q.get(ye.bottom):ye.bottom;C.nodesInRelativeVertical.includes(ie)||(C.nodesInRelativeVertical.push(ie),C.nodeToRelativeConstraintMapVertical.set(ie,[]),C.dummyToNodeForHorizontalAlignment.has(ie)?C.nodeToTempPositionMapVertical.set(ie,C.idToNodeMap.get(C.dummyToNodeForHorizontalAlignment.get(ie)[0]).getCenterY()):C.nodeToTempPositionMapVertical.set(ie,C.idToNodeMap.get(ie).getCenterY())),C.nodesInRelativeVertical.includes(le)||(C.nodesInRelativeVertical.push(le),C.nodeToRelativeConstraintMapVertical.set(le,[]),C.dummyToNodeForHorizontalAlignment.has(le)?C.nodeToTempPositionMapVertical.set(le,C.idToNodeMap.get(C.dummyToNodeForHorizontalAlignment.get(le)[0]).getCenterY()):C.nodeToTempPositionMapVertical.set(le,C.idToNodeMap.get(le).getCenterY())),C.nodeToRelativeConstraintMapVertical.get(ie).push({bottom:le,gap:ye.gap}),C.nodeToRelativeConstraintMapVertical.get(le).push({top:ie,gap:ye.gap})}});else{var J=new Map,se=new Map;this.constraints.relativePlacementConstraint.forEach(function(ye){if(ye.left){var _e=z.has(ye.left)?z.get(ye.left):ye.left,ue=z.has(ye.right)?z.get(ye.right):ye.right;J.has(_e)?J.get(_e).push(ue):J.set(_e,[ue]),J.has(ue)?J.get(ue).push(_e):J.set(ue,[_e])}else{var ie=q.has(ye.top)?q.get(ye.top):ye.top,le=q.has(ye.bottom)?q.get(ye.bottom):ye.bottom;se.has(ie)?se.get(ie).push(le):se.set(ie,[le]),se.has(le)?se.get(le).push(ie):se.set(le,[ie])}});var re=function(_e,ue){var ie=[],le=[],oe=new I,ne=new Set,pe=0;return _e.forEach(function(te,He){if(!ne.has(He)){ie[pe]=[],le[pe]=!1;var de=He;for(oe.push(de),ne.add(de),ie[pe].push(de);oe.length!=0;){de=oe.shift(),ue.has(de)&&(le[pe]=!0);var ce=_e.get(de);ce.forEach(function(st){ne.has(st)||(oe.push(st),ne.add(st),ie[pe].push(st))})}pe++}}),{components:ie,isFixed:le}},me=re(J,C.fixedNodesOnHorizontal);this.componentsOnHorizontal=me.components,this.fixedComponentsOnHorizontal=me.isFixed;var ge=re(se,C.fixedNodesOnVertical);this.componentsOnVertical=ge.components,this.fixedComponentsOnVertical=ge.isFixed}}},P.prototype.updateDisplacements=function(){var C=this;if(this.constraints.fixedNodeConstraint&&this.constraints.fixedNodeConstraint.forEach(function(ge){var ye=C.idToNodeMap.get(ge.nodeId);ye.displacementX=0,ye.displacementY=0}),this.constraints.alignmentConstraint){if(this.constraints.alignmentConstraint.vertical)for(var N=this.constraints.alignmentConstraint.vertical,B=0;B1){var q;for(q=0;qF&&(F=Math.floor(z.y)),$=Math.floor(z.x+p.DEFAULT_COMPONENT_SEPERATION)}this.transform(new x(y.WORLD_CENTER_X-z.x/2,y.WORLD_CENTER_Y-z.y/2))},P.radialLayout=function(C,N,B){var F=Math.max(this.maxDiagonalInTree(C),p.DEFAULT_RADIAL_SEPARATION);P.branchRadialLayout(N,null,0,359,0,F);var M=R.calculateBounds(C),$=new A;$.setDeviceOrgX(M.getMinX()),$.setDeviceOrgY(M.getMinY()),$.setWorldOrgX(B.x),$.setWorldOrgY(B.y);for(var z=0;z1;){var ie=ue[0];ue.splice(0,1);var le=re.indexOf(ie);le>=0&&re.splice(le,1),ye--,me--}N!=null?_e=(re.indexOf(ue[0])+1)%ye:_e=0;for(var oe=Math.abs(F-B)/me,ne=_e;ge!=me;ne=++ne%ye){var pe=re[ne].getOtherEnd(C);if(pe!=N){var te=(B+ge*oe)%360,He=(te+oe)%360;P.branchRadialLayout(pe,C,te,He,M+$,$),ge++}}},P.maxDiagonalInTree=function(C){for(var N=T.MIN_VALUE,B=0;BN&&(N=M)}return N},P.prototype.calcRepulsionRange=function(){return 2*(this.level+1)*this.idealEdgeLength},P.prototype.groupZeroDegreeMembers=function(){var C=this,N={};this.memberGroups={},this.idToDummyNode={};for(var B=[],F=this.graphManager.getAllNodes(),M=0;M"u"&&(N[q]=[]),N[q]=N[q].concat($)}Object.keys(N).forEach(function(V){if(N[V].length>1){var U="DummyCompound_"+V;C.memberGroups[U]=N[V];var J=N[V][0].getParent(),se=new f(C.graphManager);se.id=U,se.paddingLeft=J.paddingLeft||0,se.paddingRight=J.paddingRight||0,se.paddingBottom=J.paddingBottom||0,se.paddingTop=J.paddingTop||0,C.idToDummyNode[U]=se;var re=C.getGraphManager().add(C.newGraph(),se),me=J.getChild();me.add(se);for(var ge=0;geM?(F.rect.x-=(F.labelWidth-M)/2,F.setWidth(F.labelWidth),F.labelMarginLeft=(F.labelWidth-M)/2):F.labelPosHorizontal=="right"&&F.setWidth(M+F.labelWidth)),F.labelHeight&&(F.labelPosVertical=="top"?(F.rect.y-=F.labelHeight,F.setHeight($+F.labelHeight),F.labelMarginTop=F.labelHeight):F.labelPosVertical=="center"&&F.labelHeight>$?(F.rect.y-=(F.labelHeight-$)/2,F.setHeight(F.labelHeight),F.labelMarginTop=(F.labelHeight-$)/2):F.labelPosVertical=="bottom"&&F.setHeight($+F.labelHeight))}})},P.prototype.repopulateCompounds=function(){for(var C=this.compoundOrder.length-1;C>=0;C--){var N=this.compoundOrder[C],B=N.id,F=N.paddingLeft,M=N.paddingTop,$=N.labelMarginLeft,z=N.labelMarginTop;this.adjustLocations(this.tiledMemberPack[B],N.rect.x,N.rect.y,F,M,$,z)}},P.prototype.repopulateZeroDegreeMembers=function(){var C=this,N=this.tiledZeroDegreePack;Object.keys(N).forEach(function(B){var F=C.idToDummyNode[B],M=F.paddingLeft,$=F.paddingTop,z=F.labelMarginLeft,q=F.labelMarginTop;C.adjustLocations(N[B],F.rect.x,F.rect.y,M,$,z,q)})},P.prototype.getToBeTiled=function(C){var N=C.id;if(this.toBeTiled[N]!=null)return this.toBeTiled[N];var B=C.getChild();if(B==null)return this.toBeTiled[N]=!1,!1;for(var F=B.getNodes(),M=0;M0)return this.toBeTiled[N]=!1,!1;if($.getChild()==null){this.toBeTiled[$.id]=!1;continue}if(!this.getToBeTiled($))return this.toBeTiled[N]=!1,!1}return this.toBeTiled[N]=!0,!0},P.prototype.getNodeDegree=function(C){for(var N=C.id,B=C.getEdges(),F=0,M=0;MJ&&(J=re.rect.height)}B+=J+C.verticalPadding}},P.prototype.tileCompoundMembers=function(C,N){var B=this;this.tiledMemberPack=[],Object.keys(C).forEach(function(F){var M=N[F];if(B.tiledMemberPack[F]=B.tileNodes(C[F],M.paddingLeft+M.paddingRight),M.rect.width=B.tiledMemberPack[F].width,M.rect.height=B.tiledMemberPack[F].height,M.setCenter(B.tiledMemberPack[F].centerX,B.tiledMemberPack[F].centerY),M.labelMarginLeft=0,M.labelMarginTop=0,p.NODE_DIMENSIONS_INCLUDE_LABELS){var $=M.rect.width,z=M.rect.height;M.labelWidth&&(M.labelPosHorizontal=="left"?(M.rect.x-=M.labelWidth,M.setWidth($+M.labelWidth),M.labelMarginLeft=M.labelWidth):M.labelPosHorizontal=="center"&&M.labelWidth>$?(M.rect.x-=(M.labelWidth-$)/2,M.setWidth(M.labelWidth),M.labelMarginLeft=(M.labelWidth-$)/2):M.labelPosHorizontal=="right"&&M.setWidth($+M.labelWidth)),M.labelHeight&&(M.labelPosVertical=="top"?(M.rect.y-=M.labelHeight,M.setHeight(z+M.labelHeight),M.labelMarginTop=M.labelHeight):M.labelPosVertical=="center"&&M.labelHeight>z?(M.rect.y-=(M.labelHeight-z)/2,M.setHeight(M.labelHeight),M.labelMarginTop=(M.labelHeight-z)/2):M.labelPosVertical=="bottom"&&M.setHeight(z+M.labelHeight))}})},P.prototype.tileNodes=function(C,N){var B=this.tileNodesByFavoringDim(C,N,!0),F=this.tileNodesByFavoringDim(C,N,!1),M=this.getOrgRatio(B),$=this.getOrgRatio(F),z;return $q&&(q=ge.getWidth())});var V=$/M,U=z/M,J=Math.pow(B-F,2)+4*(V+F)*(U+B)*M,se=(F-B+Math.sqrt(J))/(2*(V+F)),re;N?(re=Math.ceil(se),re==se&&re++):re=Math.floor(se);var me=re*(V+F)-F;return q>me&&(me=q),me+=F*2,me},P.prototype.tileNodesByFavoringDim=function(C,N,B){var F=p.TILING_PADDING_VERTICAL,M=p.TILING_PADDING_HORIZONTAL,$=p.TILING_COMPARE_BY,z={rows:[],rowWidth:[],rowHeight:[],width:0,height:N,verticalPadding:F,horizontalPadding:M,centerX:0,centerY:0};$&&(z.idealRowWidth=this.calcIdealRowWidth(C,B));var q=function(ye){return ye.rect.width*ye.rect.height},V=function(ye,_e){return q(_e)-q(ye)};C.sort(function(ge,ye){var _e=V;return z.idealRowWidth?(_e=$,_e(ge.id,ye.id)):_e(ge,ye)});for(var U=0,J=0,se=0;se0&&(z+=C.horizontalPadding),C.rowWidth[B]=z,C.width0&&(q+=C.verticalPadding);var V=0;q>C.rowHeight[B]&&(V=C.rowHeight[B],C.rowHeight[B]=q,V=C.rowHeight[B]-V),C.height+=V,C.rows[B].push(N)},P.prototype.getShortestRowIndex=function(C){for(var N=-1,B=Number.MAX_VALUE,F=0;FB&&(N=F,B=C.rowWidth[F]);return N},P.prototype.canAddHorizontal=function(C,N,B){if(C.idealRowWidth){var F=C.rows.length-1,M=C.rowWidth[F];return M+N+C.horizontalPadding<=C.idealRowWidth}var $=this.getShortestRowIndex(C);if($<0)return!0;var z=C.rowWidth[$];if(z+C.horizontalPadding+N<=C.width)return!0;var q=0;C.rowHeight[$]0&&(q=B+C.verticalPadding-C.rowHeight[$]);var V;C.width-z>=N+C.horizontalPadding?V=(C.height+q)/(z+N+C.horizontalPadding):V=(C.height+q)/C.width,q=B+C.verticalPadding;var U;return C.width$&&N!=B){F.splice(-1,1),C.rows[B].push(M),C.rowWidth[N]=C.rowWidth[N]-$,C.rowWidth[B]=C.rowWidth[B]+$,C.width=C.rowWidth[instance.getLongestRowIndex(C)];for(var z=Number.MIN_VALUE,q=0;qz&&(z=F[q].height);N>0&&(z+=C.verticalPadding);var V=C.rowHeight[N]+C.rowHeight[B];C.rowHeight[N]=z,C.rowHeight[B]0)for(var me=M;me<=$;me++)re[0]+=this.grid[me][z-1].length+this.grid[me][z].length-1;if($0)for(var me=z;me<=q;me++)re[3]+=this.grid[M-1][me].length+this.grid[M][me].length-1;for(var ge=T.MAX_VALUE,ye,_e,ue=0;ue{var l=o(551).FDLayoutNode,u=o(551).IMath;function h(d,p,m,g){l.call(this,d,p,m,g)}h.prototype=Object.create(l.prototype);for(var f in l)h[f]=l[f];h.prototype.calculateDisplacement=function(){var d=this.graphManager.getLayout();this.getChild()!=null&&this.fixedNodeWeight?(this.displacementX+=d.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.fixedNodeWeight,this.displacementY+=d.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.fixedNodeWeight):(this.displacementX+=d.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.noOfChildren,this.displacementY+=d.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.noOfChildren),Math.abs(this.displacementX)>d.coolingFactor*d.maxNodeDisplacement&&(this.displacementX=d.coolingFactor*d.maxNodeDisplacement*u.sign(this.displacementX)),Math.abs(this.displacementY)>d.coolingFactor*d.maxNodeDisplacement&&(this.displacementY=d.coolingFactor*d.maxNodeDisplacement*u.sign(this.displacementY)),this.child&&this.child.getNodes().length>0&&this.propogateDisplacementToChildren(this.displacementX,this.displacementY)},h.prototype.propogateDisplacementToChildren=function(d,p){for(var m=this.getChild().getNodes(),g,y=0;y{function l(m){if(Array.isArray(m)){for(var g=0,y=Array(m.length);g0){var Dt=0;ft.forEach(function(yt){ve=="horizontal"?(De.set(yt,v.has(yt)?x[v.get(yt)]:we.get(yt)),Dt+=De.get(yt)):(De.set(yt,v.has(yt)?k[v.get(yt)]:we.get(yt)),Dt+=De.get(yt))}),Dt=Dt/ft.length,mt.forEach(function(yt){K.has(yt)||De.set(yt,Dt)})}else{var ht=0;mt.forEach(function(yt){ve=="horizontal"?ht+=v.has(yt)?x[v.get(yt)]:we.get(yt):ht+=v.has(yt)?k[v.get(yt)]:we.get(yt)}),ht=ht/mt.length,mt.forEach(function(yt){De.set(yt,ht)})}});for(var ut=function(){var ft=We.shift(),Dt=H.get(ft);Dt.forEach(function(ht){if(De.get(ht.id)yt&&(yt=It),AtW&&(W=At)}}catch(Bn){Je=!0,ee=Bn}finally{try{!j&&Te.return&&Te.return()}finally{if(Je)throw ee}}var Ut=(Dt+yt)/2-(ht+W)/2,Bt=!0,Kt=!1,vr=void 0;try{for(var Me=mt[Symbol.iterator](),kr;!(Bt=(kr=Me.next()).done);Bt=!0){var Ue=kr.value;De.set(Ue,De.get(Ue)+Ut)}}catch(Bn){Kt=!0,vr=Bn}finally{try{!Bt&&Me.return&&Me.return()}finally{if(Kt)throw vr}}})}return De},O=function(H){var ve=0,K=0,we=0,Ee=0;if(H.forEach(function(nt){nt.left?x[v.get(nt.left)]-x[v.get(nt.right)]>=0?ve++:K++:k[v.get(nt.top)]-k[v.get(nt.bottom)]>=0?we++:Ee++}),ve>K&&we>Ee)for(var Ke=0;KeK)for(var Be=0;BeEe)for(var De=0;De1)g.fixedNodeConstraint.forEach(function(xe,H){F[H]=[xe.position.x,xe.position.y],M[H]=[x[v.get(xe.nodeId)],k[v.get(xe.nodeId)]]}),$=!0;else if(g.alignmentConstraint)(function(){var xe=0;if(g.alignmentConstraint.vertical){for(var H=g.alignmentConstraint.vertical,ve=function(De){var nt=new Set;H[De].forEach(function(vt){nt.add(vt)});var We=new Set([].concat(l(nt)).filter(function(vt){return q.has(vt)})),ut=void 0;We.size>0?ut=x[v.get(We.values().next().value)]:ut=I(nt).x,H[De].forEach(function(vt){F[xe]=[ut,k[v.get(vt)]],M[xe]=[x[v.get(vt)],k[v.get(vt)]],xe++})},K=0;K0?ut=x[v.get(We.values().next().value)]:ut=I(nt).y,we[De].forEach(function(vt){F[xe]=[x[v.get(vt)],ut],M[xe]=[x[v.get(vt)],k[v.get(vt)]],xe++})},Ke=0;Kese&&(se=J[me].length,re=me);if(se0){var Ye={x:0,y:0};g.fixedNodeConstraint.forEach(function(xe,H){var ve={x:x[v.get(xe.nodeId)],y:k[v.get(xe.nodeId)]},K=xe.position,we=A(K,ve);Ye.x+=we.x,Ye.y+=we.y}),Ye.x/=g.fixedNodeConstraint.length,Ye.y/=g.fixedNodeConstraint.length,x.forEach(function(xe,H){x[H]+=Ye.x}),k.forEach(function(xe,H){k[H]+=Ye.y}),g.fixedNodeConstraint.forEach(function(xe){x[v.get(xe.nodeId)]=xe.position.x,k[v.get(xe.nodeId)]=xe.position.y})}if(g.alignmentConstraint){if(g.alignmentConstraint.vertical)for(var Ge=g.alignmentConstraint.vertical,rt=function(H){var ve=new Set;Ge[H].forEach(function(Ee){ve.add(Ee)});var K=new Set([].concat(l(ve)).filter(function(Ee){return q.has(Ee)})),we=void 0;K.size>0?we=x[v.get(K.values().next().value)]:we=I(ve).x,ve.forEach(function(Ee){q.has(Ee)||(x[v.get(Ee)]=we)})},Xe=0;Xe0?we=k[v.get(K.values().next().value)]:we=I(ve).y,ve.forEach(function(Ee){q.has(Ee)||(k[v.get(Ee)]=we)})},Re=0;Re{a.exports=t})},r={};function n(a){var s=r[a];if(s!==void 0)return s.exports;var o=r[a]={exports:{}};return e[a](o,o.exports,n),o.exports}var i=n(45);return i})()})});var nNe=Bi((bw,vj)=>{(function(e,r){typeof bw=="object"&&typeof vj=="object"?vj.exports=r(yj()):typeof define=="function"&&define.amd?define(["cose-base"],r):typeof bw=="object"?bw.cytoscapeFcose=r(yj()):e.cytoscapeFcose=r(e.coseBase)})(bw,function(t){return(()=>{"use strict";var e={658:(a=>{a.exports=Object.assign!=null?Object.assign.bind(Object):function(s){for(var o=arguments.length,l=Array(o>1?o-1:0),u=1;u{var l=(function(){function f(d,p){var m=[],g=!0,y=!1,v=void 0;try{for(var x=d[Symbol.iterator](),k;!(g=(k=x.next()).done)&&(m.push(k.value),!(p&&m.length===p));g=!0);}catch(_){y=!0,v=_}finally{try{!g&&x.return&&x.return()}finally{if(y)throw v}}return m}return function(d,p){if(Array.isArray(d))return d;if(Symbol.iterator in Object(d))return f(d,p);throw new TypeError("Invalid attempt to destructure non-iterable instance")}})(),u=o(140).layoutBase.LinkedList,h={};h.getTopMostNodes=function(f){for(var d={},p=0;p0&&$.merge(U)});for(var z=0;z<$.length;z++){var q=$[z];if(x=p.intersection(q.union(q.ancestors())),x!=null&&!y.has(x[0])){var V=x.union(x.descendants());V.forEach(function(U){g.push(U),y.add(U),O.merge(U),p.has(U)&&v.push(U)})}}};g.length!=0;)B();if(O.forEach(function(M){d.intersection(M.connectedEdges()).forEach(function($){O.has($.source())&&O.has($.target())&&O.merge($)})}),v.length==p.length&&(T=!0),!T||T&&S>1){k=v[0],_=k.connectedEdges().length,v.forEach(function(M){M.connectedEdges().length<_&&(_=M.connectedEdges().length,k=M)}),R.push(k.id());var F=f.collection();F.merge(v[0]),v.forEach(function(M){F.merge(M)}),v=[],p=p.difference(F),S++}};do I();while(!T);return m&&R.length>0&&m.set("dummy"+(m.size+1),R),A},h.relocateComponent=function(f,d,p){if(!p.fixedNodeConstraint){var m=Number.POSITIVE_INFINITY,g=Number.NEGATIVE_INFINITY,y=Number.POSITIVE_INFINITY,v=Number.NEGATIVE_INFINITY;if(p.quality=="draft"){var x=!0,k=!1,_=void 0;try{for(var T=d.nodeIndexes[Symbol.iterator](),S;!(x=(S=T.next()).done);x=!0){var R=S.value,A=l(R,2),I=A[0],P=A[1],O=p.cy.getElementById(I);if(O){var C=O.boundingBox(),N=d.xCoords[P]-C.w/2,B=d.xCoords[P]+C.w/2,F=d.yCoords[P]-C.h/2,M=d.yCoords[P]+C.h/2;Ng&&(g=B),Fv&&(v=M)}}}catch(U){k=!0,_=U}finally{try{!x&&T.return&&T.return()}finally{if(k)throw _}}var $=f.x-(g+m)/2,z=f.y-(v+y)/2;d.xCoords=d.xCoords.map(function(U){return U+$}),d.yCoords=d.yCoords.map(function(U){return U+z})}else{Object.keys(d).forEach(function(U){var J=d[U],se=J.getRect().x,re=J.getRect().x+J.getRect().width,me=J.getRect().y,ge=J.getRect().y+J.getRect().height;seg&&(g=re),mev&&(v=ge)});var q=f.x-(g+m)/2,V=f.y-(v+y)/2;Object.keys(d).forEach(function(U){var J=d[U];J.setCenter(J.getCenterX()+q,J.getCenterY()+V)})}}},h.calcBoundingBox=function(f,d,p,m){for(var g=Number.MAX_SAFE_INTEGER,y=Number.MIN_SAFE_INTEGER,v=Number.MAX_SAFE_INTEGER,x=Number.MIN_SAFE_INTEGER,k=void 0,_=void 0,T=void 0,S=void 0,R=f.descendants().not(":parent"),A=R.length,I=0;Ik&&(g=k),y<_&&(y=_),v>T&&(v=T),x{var l=o(548),u=o(140).CoSELayout,h=o(140).CoSENode,f=o(140).layoutBase.PointD,d=o(140).layoutBase.DimensionD,p=o(140).layoutBase.LayoutConstants,m=o(140).layoutBase.FDLayoutConstants,g=o(140).CoSEConstants,y=function(x,k){var _=x.cy,T=x.eles,S=T.nodes(),R=T.edges(),A=void 0,I=void 0,P=void 0,O={};x.randomize&&(A=k.nodeIndexes,I=k.xCoords,P=k.yCoords);var C=function(U){return typeof U=="function"},N=function(U,J){return C(U)?U(J):U},B=l.calcParentsWithoutChildren(_,T),F=function V(U,J,se,re){for(var me=J.length,ge=0;ge0){var oe=void 0;oe=se.getGraphManager().add(se.newGraph(),ue),V(oe,_e,se,re)}}},M=function(U,J,se){for(var re=0,me=0,ge=0;ge0?g.DEFAULT_EDGE_LENGTH=m.DEFAULT_EDGE_LENGTH=re/me:C(x.idealEdgeLength)?g.DEFAULT_EDGE_LENGTH=m.DEFAULT_EDGE_LENGTH=50:g.DEFAULT_EDGE_LENGTH=m.DEFAULT_EDGE_LENGTH=x.idealEdgeLength,g.MIN_REPULSION_DIST=m.MIN_REPULSION_DIST=m.DEFAULT_EDGE_LENGTH/10,g.DEFAULT_RADIAL_SEPARATION=m.DEFAULT_EDGE_LENGTH)},$=function(U,J){J.fixedNodeConstraint&&(U.constraints.fixedNodeConstraint=J.fixedNodeConstraint),J.alignmentConstraint&&(U.constraints.alignmentConstraint=J.alignmentConstraint),J.relativePlacementConstraint&&(U.constraints.relativePlacementConstraint=J.relativePlacementConstraint)};x.nestingFactor!=null&&(g.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=m.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=x.nestingFactor),x.gravity!=null&&(g.DEFAULT_GRAVITY_STRENGTH=m.DEFAULT_GRAVITY_STRENGTH=x.gravity),x.numIter!=null&&(g.MAX_ITERATIONS=m.MAX_ITERATIONS=x.numIter),x.gravityRange!=null&&(g.DEFAULT_GRAVITY_RANGE_FACTOR=m.DEFAULT_GRAVITY_RANGE_FACTOR=x.gravityRange),x.gravityCompound!=null&&(g.DEFAULT_COMPOUND_GRAVITY_STRENGTH=m.DEFAULT_COMPOUND_GRAVITY_STRENGTH=x.gravityCompound),x.gravityRangeCompound!=null&&(g.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=m.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=x.gravityRangeCompound),x.initialEnergyOnIncremental!=null&&(g.DEFAULT_COOLING_FACTOR_INCREMENTAL=m.DEFAULT_COOLING_FACTOR_INCREMENTAL=x.initialEnergyOnIncremental),x.tilingCompareBy!=null&&(g.TILING_COMPARE_BY=x.tilingCompareBy),x.quality=="proof"?p.QUALITY=2:p.QUALITY=0,g.NODE_DIMENSIONS_INCLUDE_LABELS=m.NODE_DIMENSIONS_INCLUDE_LABELS=p.NODE_DIMENSIONS_INCLUDE_LABELS=x.nodeDimensionsIncludeLabels,g.DEFAULT_INCREMENTAL=m.DEFAULT_INCREMENTAL=p.DEFAULT_INCREMENTAL=!x.randomize,g.ANIMATE=m.ANIMATE=p.ANIMATE=x.animate,g.TILE=x.tile,g.TILING_PADDING_VERTICAL=typeof x.tilingPaddingVertical=="function"?x.tilingPaddingVertical.call():x.tilingPaddingVertical,g.TILING_PADDING_HORIZONTAL=typeof x.tilingPaddingHorizontal=="function"?x.tilingPaddingHorizontal.call():x.tilingPaddingHorizontal,g.DEFAULT_INCREMENTAL=m.DEFAULT_INCREMENTAL=p.DEFAULT_INCREMENTAL=!0,g.PURE_INCREMENTAL=!x.randomize,p.DEFAULT_UNIFORM_LEAF_NODE_SIZES=x.uniformNodeDimensions,x.step=="transformed"&&(g.TRANSFORM_ON_CONSTRAINT_HANDLING=!0,g.ENFORCE_CONSTRAINTS=!1,g.APPLY_LAYOUT=!1),x.step=="enforced"&&(g.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,g.ENFORCE_CONSTRAINTS=!0,g.APPLY_LAYOUT=!1),x.step=="cose"&&(g.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,g.ENFORCE_CONSTRAINTS=!1,g.APPLY_LAYOUT=!0),x.step=="all"&&(x.randomize?g.TRANSFORM_ON_CONSTRAINT_HANDLING=!0:g.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,g.ENFORCE_CONSTRAINTS=!0,g.APPLY_LAYOUT=!0),x.fixedNodeConstraint||x.alignmentConstraint||x.relativePlacementConstraint?g.TREE_REDUCTION_ON_INCREMENTAL=!1:g.TREE_REDUCTION_ON_INCREMENTAL=!0;var z=new u,q=z.newGraphManager();return F(q.addRoot(),l.getTopMostNodes(S),z,x),M(z,q,R),$(z,x),z.runLayout(),O};a.exports={coseLayout:y}}),212:((a,s,o)=>{var l=(function(){function x(k,_){for(var T=0;T<_.length;T++){var S=_[T];S.enumerable=S.enumerable||!1,S.configurable=!0,"value"in S&&(S.writable=!0),Object.defineProperty(k,S.key,S)}}return function(k,_,T){return _&&x(k.prototype,_),T&&x(k,T),k}})();function u(x,k){if(!(x instanceof k))throw new TypeError("Cannot call a class as a function")}var h=o(658),f=o(548),d=o(657),p=d.spectralLayout,m=o(816),g=m.coseLayout,y=Object.freeze({quality:"default",randomize:!0,animate:!0,animationDuration:1e3,animationEasing:void 0,fit:!0,padding:30,nodeDimensionsIncludeLabels:!1,uniformNodeDimensions:!1,packComponents:!0,step:"all",samplingType:!0,sampleSize:25,nodeSeparation:75,piTol:1e-7,nodeRepulsion:function(k){return 4500},idealEdgeLength:function(k){return 50},edgeElasticity:function(k){return .45},nestingFactor:.1,gravity:.25,numIter:2500,tile:!0,tilingCompareBy:void 0,tilingPaddingVertical:10,tilingPaddingHorizontal:10,gravityRangeCompound:1.5,gravityCompound:1,gravityRange:3.8,initialEnergyOnIncremental:.3,fixedNodeConstraint:void 0,alignmentConstraint:void 0,relativePlacementConstraint:void 0,ready:function(){},stop:function(){}}),v=(function(){function x(k){u(this,x),this.options=h({},y,k)}return l(x,[{key:"run",value:function(){var _=this,T=this.options,S=T.cy,R=T.eles,A=[],I=void 0,P=void 0,O=[],C=void 0,N=[];T.fixedNodeConstraint&&(!Array.isArray(T.fixedNodeConstraint)||T.fixedNodeConstraint.length==0)&&(T.fixedNodeConstraint=void 0),T.alignmentConstraint&&(T.alignmentConstraint.vertical&&(!Array.isArray(T.alignmentConstraint.vertical)||T.alignmentConstraint.vertical.length==0)&&(T.alignmentConstraint.vertical=void 0),T.alignmentConstraint.horizontal&&(!Array.isArray(T.alignmentConstraint.horizontal)||T.alignmentConstraint.horizontal.length==0)&&(T.alignmentConstraint.horizontal=void 0)),T.relativePlacementConstraint&&(!Array.isArray(T.relativePlacementConstraint)||T.relativePlacementConstraint.length==0)&&(T.relativePlacementConstraint=void 0);var B=T.fixedNodeConstraint||T.alignmentConstraint||T.relativePlacementConstraint;B&&(T.tile=!1,T.packComponents=!1);var F=void 0,M=!1;if(S.layoutUtilities&&T.packComponents&&(F=S.layoutUtilities("get"),F||(F=S.layoutUtilities()),M=!0),R.nodes().length>0)if(M){var q=f.getTopMostNodes(T.eles.nodes());if(C=f.connectComponents(S,T.eles,q),C.forEach(function(de){var ce=de.boundingBox();N.push({x:ce.x1+ce.w/2,y:ce.y1+ce.h/2})}),T.randomize&&C.forEach(function(de){T.eles=de,A.push(p(T))}),T.quality=="default"||T.quality=="proof"){var V=S.collection();if(T.tile){var U=new Map,J=[],se=[],re=0,me={nodeIndexes:U,xCoords:J,yCoords:se},ge=[];if(C.forEach(function(de,ce){de.edges().length==0&&(de.nodes().forEach(function(st,Ae){V.merge(de.nodes()[Ae]),st.isParent()||(me.nodeIndexes.set(de.nodes()[Ae].id(),re++),me.xCoords.push(de.nodes()[0].position().x),me.yCoords.push(de.nodes()[0].position().y))}),ge.push(ce))}),V.length>1){var ye=V.boundingBox();N.push({x:ye.x1+ye.w/2,y:ye.y1+ye.h/2}),C.push(V),A.push(me);for(var _e=ge.length-1;_e>=0;_e--)C.splice(ge[_e],1),A.splice(ge[_e],1),N.splice(ge[_e],1)}}C.forEach(function(de,ce){T.eles=de,O.push(g(T,A[ce])),f.relocateComponent(N[ce],O[ce],T)})}else C.forEach(function(de,ce){f.relocateComponent(N[ce],A[ce],T)});var ue=new Set;if(C.length>1){var ie=[],le=R.filter(function(de){return de.css("display")=="none"});C.forEach(function(de,ce){var st=void 0;if(T.quality=="draft"&&(st=A[ce].nodeIndexes),de.nodes().not(le).length>0){var Ae={};Ae.edges=[],Ae.nodes=[];var Ye=void 0;de.nodes().not(le).forEach(function(Ge){if(T.quality=="draft")if(!Ge.isParent())Ye=st.get(Ge.id()),Ae.nodes.push({x:A[ce].xCoords[Ye]-Ge.boundingbox().w/2,y:A[ce].yCoords[Ye]-Ge.boundingbox().h/2,width:Ge.boundingbox().w,height:Ge.boundingbox().h});else{var rt=f.calcBoundingBox(Ge,A[ce].xCoords,A[ce].yCoords,st);Ae.nodes.push({x:rt.topLeftX,y:rt.topLeftY,width:rt.width,height:rt.height})}else O[ce][Ge.id()]&&Ae.nodes.push({x:O[ce][Ge.id()].getLeft(),y:O[ce][Ge.id()].getTop(),width:O[ce][Ge.id()].getWidth(),height:O[ce][Ge.id()].getHeight()})}),de.edges().forEach(function(Ge){var rt=Ge.source(),Xe=Ge.target();if(rt.css("display")!="none"&&Xe.css("display")!="none")if(T.quality=="draft"){var Ze=st.get(rt.id()),Pe=st.get(Xe.id()),Re=[],Ve=[];if(rt.isParent()){var ke=f.calcBoundingBox(rt,A[ce].xCoords,A[ce].yCoords,st);Re.push(ke.topLeftX+ke.width/2),Re.push(ke.topLeftY+ke.height/2)}else Re.push(A[ce].xCoords[Ze]),Re.push(A[ce].yCoords[Ze]);if(Xe.isParent()){var xe=f.calcBoundingBox(Xe,A[ce].xCoords,A[ce].yCoords,st);Ve.push(xe.topLeftX+xe.width/2),Ve.push(xe.topLeftY+xe.height/2)}else Ve.push(A[ce].xCoords[Pe]),Ve.push(A[ce].yCoords[Pe]);Ae.edges.push({startX:Re[0],startY:Re[1],endX:Ve[0],endY:Ve[1]})}else O[ce][rt.id()]&&O[ce][Xe.id()]&&Ae.edges.push({startX:O[ce][rt.id()].getCenterX(),startY:O[ce][rt.id()].getCenterY(),endX:O[ce][Xe.id()].getCenterX(),endY:O[ce][Xe.id()].getCenterY()})}),Ae.nodes.length>0&&(ie.push(Ae),ue.add(ce))}});var oe=F.packComponents(ie,T.randomize).shifts;if(T.quality=="draft")A.forEach(function(de,ce){var st=de.xCoords.map(function(Ye){return Ye+oe[ce].dx}),Ae=de.yCoords.map(function(Ye){return Ye+oe[ce].dy});de.xCoords=st,de.yCoords=Ae});else{var ne=0;ue.forEach(function(de){Object.keys(O[de]).forEach(function(ce){var st=O[de][ce];st.setCenter(st.getCenterX()+oe[ne].dx,st.getCenterY()+oe[ne].dy)}),ne++})}}}else{var $=T.eles.boundingBox();if(N.push({x:$.x1+$.w/2,y:$.y1+$.h/2}),T.randomize){var z=p(T);A.push(z)}T.quality=="default"||T.quality=="proof"?(O.push(g(T,A[0])),f.relocateComponent(N[0],O[0],T)):f.relocateComponent(N[0],A[0],T)}var pe=function(ce,st){if(T.quality=="default"||T.quality=="proof"){typeof ce=="number"&&(ce=st);var Ae=void 0,Ye=void 0,Ge=ce.data("id");return O.forEach(function(Xe){Ge in Xe&&(Ae={x:Xe[Ge].getRect().getCenterX(),y:Xe[Ge].getRect().getCenterY()},Ye=Xe[Ge])}),T.nodeDimensionsIncludeLabels&&(Ye.labelWidth&&(Ye.labelPosHorizontal=="left"?Ae.x+=Ye.labelWidth/2:Ye.labelPosHorizontal=="right"&&(Ae.x-=Ye.labelWidth/2)),Ye.labelHeight&&(Ye.labelPosVertical=="top"?Ae.y+=Ye.labelHeight/2:Ye.labelPosVertical=="bottom"&&(Ae.y-=Ye.labelHeight/2))),Ae==null&&(Ae={x:ce.position("x"),y:ce.position("y")}),{x:Ae.x,y:Ae.y}}else{var rt=void 0;return A.forEach(function(Xe){var Ze=Xe.nodeIndexes.get(ce.id());Ze!=null&&(rt={x:Xe.xCoords[Ze],y:Xe.yCoords[Ze]})}),rt==null&&(rt={x:ce.position("x"),y:ce.position("y")}),{x:rt.x,y:rt.y}}};if(T.quality=="default"||T.quality=="proof"||T.randomize){var te=f.calcParentsWithoutChildren(S,R),He=R.filter(function(de){return de.css("display")=="none"});T.eles=R.not(He),R.nodes().not(":parent").not(He).layoutPositions(_,T,pe),te.length>0&&te.forEach(function(de){de.position(pe(de))})}else console.log("If randomize option is set to false, then quality option must be 'default' or 'proof'.")}}]),x})();a.exports=v}),657:((a,s,o)=>{var l=o(548),u=o(140).layoutBase.Matrix,h=o(140).layoutBase.SVD,f=function(p){var m=p.cy,g=p.eles,y=g.nodes(),v=g.nodes(":parent"),x=new Map,k=new Map,_=new Map,T=[],S=[],R=[],A=[],I=[],P=[],O=[],C=[],N=void 0,B=void 0,F=1e8,M=1e-9,$=p.piTol,z=p.samplingType,q=p.nodeSeparation,V=void 0,U=function(){for(var ve=0,K=0,we=!1;K=Ke;){De=Ee[Ke++];for(var mt=T[De],ft=0;ftut&&(ut=I[ht],vt=ht)}return vt},se=function(ve){var K=void 0;if(ve){K=Math.floor(Math.random()*B),N=K;for(var Ee=0;Ee=1)break;ut=We}for(var mt=0;mt=1)break;ut=We}for(var Dt=0;Dt0&&(K.isParent()?T[ve].push(_.get(K.id())):T[ve].push(K.id()))})});var te=function(ve){var K=k.get(ve),we=void 0;x.get(ve).forEach(function(Ee){m.getElementById(Ee).isParent()?we=_.get(Ee):we=Ee,T[K].push(we),T[k.get(we)].push(ve)})},He=!0,de=!1,ce=void 0;try{for(var st=x.keys()[Symbol.iterator](),Ae;!(He=(Ae=st.next()).done);He=!0){var Ye=Ae.value;te(Ye)}}catch(H){de=!0,ce=H}finally{try{!He&&st.return&&st.return()}finally{if(de)throw ce}}B=k.size;var Ge=void 0;if(B>2){V=B{var l=o(212),u=function(f){f&&f("layout","fcose",l)};typeof cytoscape<"u"&&u(cytoscape),a.exports=u}),140:(a=>{a.exports=t})},r={};function n(a){var s=r[a];if(s!==void 0)return s.exports;var o=r[a]={exports:{}};return e[a](o,o.exports,n),o.exports}var i=n(579);return i})()})});var vNe={};Mr(vNe,{diagram:()=>QLt});function Qa(t){let e=Fe().architecture;return e?.[t]?e[t]:lNe[t]}function cNe(t,e){t.forEach(r=>{e.add({group:"nodes",data:{type:"service",id:r.id,icon:r.icon,label:r.title,parent:r.in,width:Qa("iconSize"),height:Qa("iconSize")},classes:"node-service"})})}function hNe(t,e){t.forEach(r=>{e.add({group:"nodes",data:{type:"junction",id:r.id,parent:r.in,width:Qa("iconSize"),height:Qa("iconSize")},classes:"node-junction"})})}function fNe(t,e){e.nodes().map(r=>{let n=Eb(r);if(n.type==="group")return;n.x=r.position().x,n.y=r.position().y,t.getElementById(n.id).attr("transform","translate("+(n.x||0)+","+(n.y||0)+")")})}function dNe(t,e){t.forEach(r=>{e.add({group:"nodes",data:{type:"group",id:r.id,icon:r.icon,label:r.title,parent:r.in},classes:"node-group"})})}function pNe(t,e){t.forEach(r=>{let{lhsId:n,rhsId:i,lhsInto:a,lhsGroup:s,rhsInto:o,lhsDir:l,rhsDir:u,rhsGroup:h,title:f}=r,d=wj(r.lhsDir,r.rhsDir)?"segments":"straight",p={id:`${n}-${i}`,label:f,source:n,sourceDir:l,sourceArrow:a,sourceGroup:s,sourceEndpoint:l==="L"?"0 50%":l==="R"?"100% 50%":l==="T"?"50% 0":"50% 100%",target:i,targetDir:u,targetArrow:o,targetGroup:h,targetEndpoint:u==="L"?"0 50%":u==="R"?"100% 50%":u==="T"?"50% 0":"50% 100%"};e.add({group:"edges",data:p,classes:d})})}function mNe(t,e,r){let n=b((o,l)=>Object.entries(o).reduce((u,[h,f])=>{let d=0,p=Object.entries(f);if(p.length===1)return u[h]=p[0][1],u;for(let m=0;m{let l={},u={};return Object.entries(o).forEach(([h,[f,d]])=>{let p=t.getNode(h)?.in??"default";l[d]??={},l[d][p]??=[],l[d][p].push(h),u[f]??={},u[f][p]??=[],u[f][p].push(h)}),{horiz:Object.values(n(l,"horizontal")).filter(h=>h.length>1),vert:Object.values(n(u,"vertical")).filter(h=>h.length>1)}}),[a,s]=i.reduce(([o,l],{horiz:u,vert:h})=>[[...o,...u],[...l,...h]],[[],[]]);return{horizontal:a,vertical:s}}function gNe(t){let e=[],r=b(i=>`${i[0]},${i[1]}`,"posToStr"),n=b(i=>i.split(",").map(a=>parseInt(a)),"strToPos");return t.forEach(i=>{let a=Object.fromEntries(Object.entries(i).map(([u,h])=>[r(h),u])),s=[r([0,0])],o={},l={L:[-1,0],R:[1,0],T:[0,1],B:[0,-1]};for(;s.length>0;){let u=s.shift();if(u){o[u]=1;let h=a[u];if(h){let f=n(u);Object.entries(l).forEach(([d,p])=>{let m=r([f[0]+p[0],f[1]+p[1]]),g=a[m];g&&!o[m]&&(s.push(m),e.push({[iNe[d]]:g,[iNe[wLt(d)]]:h,gap:1.5*Qa("iconSize")}))})}}}}),e}function yNe(t,e,r,n,i,{spatialMaps:a,groupAlignments:s}){return new Promise(o=>{let l=dt("body").append("div").attr("id","cy").attr("style","display:none"),u=Nu({container:document.getElementById("cy"),style:[{selector:"edge",style:{"curve-style":"straight",label:"data(label)","source-endpoint":"data(sourceEndpoint)","target-endpoint":"data(targetEndpoint)"}},{selector:"edge.segments",style:{"curve-style":"segments","segment-weights":"0","segment-distances":[.5],"edge-distances":"endpoints","source-endpoint":"data(sourceEndpoint)","target-endpoint":"data(targetEndpoint)"}},{selector:"node",style:{"compound-sizing-wrt-labels":"include"}},{selector:"node[label]",style:{"text-valign":"bottom","text-halign":"center","font-size":`${Qa("fontSize")}px`}},{selector:".node-service",style:{label:"data(label)",width:"data(width)",height:"data(height)"}},{selector:".node-junction",style:{width:"data(width)",height:"data(height)"}},{selector:".node-group",style:{padding:`${Qa("padding")}px`}}]});l.remove(),dNe(r,u),cNe(t,u),hNe(e,u),pNe(n,u);let h=mNe(i,a,s),f=gNe(a),d=u.layout({name:"fcose",quality:"proof",styleEnabled:!1,animate:!1,nodeDimensionsIncludeLabels:!1,idealEdgeLength(p){let[m,g]=p.connectedNodes(),{parent:y}=Eb(m),{parent:v}=Eb(g);return y===v?1.5*Qa("iconSize"):.5*Qa("iconSize")},edgeElasticity(p){let[m,g]=p.connectedNodes(),{parent:y}=Eb(m),{parent:v}=Eb(g);return y===v?.45:.001},alignmentConstraint:h,relativePlacementConstraint:f});d.one("layoutstop",()=>{function p(m,g,y,v){let x,k,{x:_,y:T}=m,{x:S,y:R}=g;k=(v-T+(_-y)*(T-R)/(_-S))/Math.sqrt(1+Math.pow((T-R)/(_-S),2)),x=Math.sqrt(Math.pow(v-T,2)+Math.pow(y-_,2)-Math.pow(k,2));let A=Math.sqrt(Math.pow(S-_,2)+Math.pow(R-T,2));x=x/A;let I=(S-_)*(v-T)-(R-T)*(y-_);switch(!0){case I>=0:I=1;break;case I<0:I=-1;break}let P=(S-_)*(y-_)+(R-T)*(v-T);switch(!0){case P>=0:P=1;break;case P<0:P=-1;break}return k=Math.abs(k)*I,x=x*P,{distances:k,weights:x}}b(p,"getSegmentWeights"),u.startBatch();for(let m of Object.values(u.edges()))if(m.data?.()){let{x:g,y}=m.source().position(),{x:v,y:x}=m.target().position();if(g!==v&&y!==x){let k=m.sourceEndpoint(),_=m.targetEndpoint(),{sourceDir:T}=oNe(m),[S,R]=r1(T)?[k.x,_.y]:[_.x,k.y],{weights:A,distances:I}=p(k,_,S,R);m.style("segment-distances",I),m.style("segment-weights",A)}}u.endBatch(),d.run()}),d.run(),u.ready(p=>{he.info("Ready",p),o(u)})})}var uNe,iNe,aNe,gD,wLt,sNe,$o,r1,wj,kLt,TLt,xj,ELt,SLt,CLt,_Lt,ALt,oNe,Eb,lNe,Br,LLt,RLt,DLt,ILt,MLt,NLt,bj,OLt,PLt,BLt,FLt,zLt,$Lt,GLt,yD,qLt,ULt,HLt,VLt,Tb,ww,WLt,YLt,XLt,jLt,KLt,ZLt,QLt,xNe=D(()=>{Al();As();_y();tC();Hn();v0();Nr();Zm();LX();uNe=Na(nNe(),1);Or();iNe={L:"left",R:"right",T:"top",B:"bottom"},aNe={L:b(t=>`${t},${t/2} 0,${t} 0,0`,"L"),R:b(t=>`0,${t/2} ${t},0 ${t},${t}`,"R"),T:b(t=>`0,0 ${t},0 ${t/2},${t}`,"T"),B:b(t=>`${t/2},0 ${t},${t} 0,${t}`,"B")},gD={L:b((t,e)=>t-e+2,"L"),R:b((t,e)=>t-2,"R"),T:b((t,e)=>t-e+2,"T"),B:b((t,e)=>t-2,"B")},wLt=b(function(t){return $o(t)?t==="L"?"R":"L":t==="T"?"B":"T"},"getOppositeArchitectureDirection"),sNe=b(function(t){let e=t;return e==="L"||e==="R"||e==="T"||e==="B"},"isArchitectureDirection"),$o=b(function(t){let e=t;return e==="L"||e==="R"},"isArchitectureDirectionX"),r1=b(function(t){let e=t;return e==="T"||e==="B"},"isArchitectureDirectionY"),wj=b(function(t,e){let r=$o(t)&&r1(e),n=r1(t)&&$o(e);return r||n},"isArchitectureDirectionXY"),kLt=b(function(t){let e=t[0],r=t[1],n=$o(e)&&r1(r),i=r1(e)&&$o(r);return n||i},"isArchitecturePairXY"),TLt=b(function(t){return t!=="LL"&&t!=="RR"&&t!=="TT"&&t!=="BB"},"isValidArchitectureDirectionPair"),xj=b(function(t,e){let r=`${t}${e}`;return TLt(r)?r:void 0},"getArchitectureDirectionPair"),ELt=b(function([t,e],r){let n=r[0],i=r[1];return $o(n)?r1(i)?[t+(n==="L"?-1:1),e+(i==="T"?1:-1)]:[t+(n==="L"?-1:1),e]:$o(i)?[t+(i==="L"?1:-1),e+(n==="T"?1:-1)]:[t,e+(n==="T"?1:-1)]},"shiftPositionByArchitectureDirectionPair"),SLt=b(function(t){return t==="LT"||t==="TL"?[1,1]:t==="BL"||t==="LB"?[1,-1]:t==="BR"||t==="RB"?[-1,-1]:[-1,1]},"getArchitectureDirectionXYFactors"),CLt=b(function(t,e){return wj(t,e)?"bend":$o(t)?"horizontal":"vertical"},"getArchitectureDirectionAlignment"),_Lt=b(function(t){return t.type==="service"},"isArchitectureService"),ALt=b(function(t){return t.type==="junction"},"isArchitectureJunction"),oNe=b(t=>t.data(),"edgeData"),Eb=b(t=>t.data(),"nodeData"),lNe=Ir.architecture,Br=new Ly(()=>({nodes:{},groups:{},edges:[],registeredIds:{},config:lNe,dataStructures:void 0,elements:{}})),LLt=b(()=>{Br.reset(),Jr()},"clear"),RLt=b(function({id:t,icon:e,in:r,title:n,iconText:i}){if(Br.records.registeredIds[t]!==void 0)throw new Error(`The service id [${t}] is already in use by another ${Br.records.registeredIds[t]}`);if(r!==void 0){if(t===r)throw new Error(`The service [${t}] cannot be placed within itself`);if(Br.records.registeredIds[r]===void 0)throw new Error(`The service [${t}]'s parent does not exist. Please make sure the parent is created before this service`);if(Br.records.registeredIds[r]==="node")throw new Error(`The service [${t}]'s parent is not a group`)}Br.records.registeredIds[t]="node",Br.records.nodes[t]={id:t,type:"service",icon:e,iconText:i,title:n,edges:[],in:r}},"addService"),DLt=b(()=>Object.values(Br.records.nodes).filter(_Lt),"getServices"),ILt=b(function({id:t,in:e}){Br.records.registeredIds[t]="node",Br.records.nodes[t]={id:t,type:"junction",edges:[],in:e}},"addJunction"),MLt=b(()=>Object.values(Br.records.nodes).filter(ALt),"getJunctions"),NLt=b(()=>Object.values(Br.records.nodes),"getNodes"),bj=b(t=>Br.records.nodes[t],"getNode"),OLt=b(function({id:t,icon:e,in:r,title:n}){if(Br.records.registeredIds[t]!==void 0)throw new Error(`The group id [${t}] is already in use by another ${Br.records.registeredIds[t]}`);if(r!==void 0){if(t===r)throw new Error(`The group [${t}] cannot be placed within itself`);if(Br.records.registeredIds[r]===void 0)throw new Error(`The group [${t}]'s parent does not exist. Please make sure the parent is created before this group`);if(Br.records.registeredIds[r]==="node")throw new Error(`The group [${t}]'s parent is not a group`)}Br.records.registeredIds[t]="group",Br.records.groups[t]={id:t,icon:e,title:n,in:r}},"addGroup"),PLt=b(()=>Object.values(Br.records.groups),"getGroups"),BLt=b(function({lhsId:t,rhsId:e,lhsDir:r,rhsDir:n,lhsInto:i,rhsInto:a,lhsGroup:s,rhsGroup:o,title:l}){if(!sNe(r))throw new Error(`Invalid direction given for left hand side of edge ${t}--${e}. Expected (L,R,T,B) got ${r}`);if(!sNe(n))throw new Error(`Invalid direction given for right hand side of edge ${t}--${e}. Expected (L,R,T,B) got ${n}`);if(Br.records.nodes[t]===void 0&&Br.records.groups[t]===void 0)throw new Error(`The left-hand id [${t}] does not yet exist. Please create the service/group before declaring an edge to it.`);if(Br.records.nodes[e]===void 0&&Br.records.groups[t]===void 0)throw new Error(`The right-hand id [${e}] does not yet exist. Please create the service/group before declaring an edge to it.`);let u=Br.records.nodes[t].in,h=Br.records.nodes[e].in;if(s&&u&&h&&u==h)throw new Error(`The left-hand id [${t}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);if(o&&u&&h&&u==h)throw new Error(`The right-hand id [${e}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);let f={lhsId:t,lhsDir:r,lhsInto:i,lhsGroup:s,rhsId:e,rhsDir:n,rhsInto:a,rhsGroup:o,title:l};Br.records.edges.push(f),Br.records.nodes[t]&&Br.records.nodes[e]&&(Br.records.nodes[t].edges.push(Br.records.edges[Br.records.edges.length-1]),Br.records.nodes[e].edges.push(Br.records.edges[Br.records.edges.length-1]))},"addEdge"),FLt=b(()=>Br.records.edges,"getEdges"),zLt=b(()=>{if(Br.records.dataStructures===void 0){let t={},e=Object.entries(Br.records.nodes).reduce((o,[l,u])=>(o[l]=u.edges.reduce((h,f)=>{let d=bj(f.lhsId)?.in,p=bj(f.rhsId)?.in;if(d&&p&&d!==p){let m=CLt(f.lhsDir,f.rhsDir);m!=="bend"&&(t[d]??={},t[d][p]=m,t[p]??={},t[p][d]=m)}if(f.lhsId===l){let m=xj(f.lhsDir,f.rhsDir);m&&(h[m]=f.rhsId)}else{let m=xj(f.rhsDir,f.lhsDir);m&&(h[m]=f.lhsId)}return h},{}),o),{}),r=Object.keys(e)[0],n={[r]:1},i=Object.keys(e).reduce((o,l)=>l===r?o:{...o,[l]:1},{}),a=b(o=>{let l={[o]:[0,0]},u=[o];for(;u.length>0;){let h=u.shift();if(h){n[h]=1,delete i[h];let f=e[h],[d,p]=l[h];Object.entries(f).forEach(([m,g])=>{n[g]||(l[g]=ELt([d,p],m),u.push(g))})}}return l},"BFS"),s=[a(r)];for(;Object.keys(i).length>0;)s.push(a(Object.keys(i)[0]));Br.records.dataStructures={adjList:e,spatialMaps:s,groupAlignments:t}}return Br.records.dataStructures},"getDataStructures"),$Lt=b((t,e)=>{Br.records.elements[t]=e},"setElementForId"),GLt=b(t=>Br.records.elements[t],"getElementById"),yD={clear:LLt,setDiagramTitle:pn,getDiagramTitle:an,setAccTitle:en,getAccTitle:tn,setAccDescription:rn,getAccDescription:nn,addService:RLt,getServices:DLt,addJunction:ILt,getJunctions:MLt,getNodes:NLt,getNode:bj,addGroup:OLt,getGroups:PLt,addEdge:BLt,getEdges:FLt,setElementForId:$Lt,getElementById:GLt,getDataStructures:zLt};b(Qa,"getConfigField");qLt=b((t,e)=>{lc(t,e),t.groups.map(e.addGroup),t.services.map(r=>e.addService({...r,type:"service"})),t.junctions.map(r=>e.addJunction({...r,type:"junction"})),t.edges.map(e.addEdge)},"populateDb"),ULt={parse:b(async t=>{let e=await Ul("architecture",t);he.debug(e),qLt(e,yD)},"parse")},HLt=b(t=>` .edge { stroke-width: ${t.archEdgeWidth}; stroke: ${t.archEdgeColor}; @@ -2650,10 +2906,10 @@ Expecting `+W.join(", ")+", got '"+(this.terminals_[ie]||ie)+"'":Se="Parse error stroke-dasharray: 8; } .node-icon-text { - display: flex; + display: flex; align-items: center; } - + .node-icon-text > div { color: #fff; margin: 1px; @@ -2663,37 +2919,43 @@ Expecting `+W.join(", ")+", got '"+(this.terminals_[ie]||ie)+"'":Se="Parse error display: -webkit-box; -webkit-box-orient: vertical; } -`,"getStyles"),p8t=d8t,cb=x(t=>`${t}`,"wrapIcon"),ak={prefix:"mermaid-architecture",height:80,width:80,icons:{database:{body:cb('')},server:{body:cb('')},disk:{body:cb('')},internet:{body:cb('')},cloud:{body:cb('')},unknown:dN,blank:{body:cb("")}}},m8t=x(async function(t,e){let r=ai("padding"),n=ai("iconSize"),a=n/2,i=n/6,s=i/2;await Promise.all(e.edges().map(async o=>{let{source:l,sourceDir:u,sourceArrow:h,sourceGroup:f,target:d,targetDir:p,targetArrow:m,targetGroup:g,label:v}=ORe(o),{x:y,y:b}=o[0].sourceEndpoint(),{x:w,y:C}=o[0].midpoint(),{x:k,y:E}=o[0].targetEndpoint(),_=r+4;if(f&&(js(u)?y+=u==="L"?-_:_:b+=u==="T"?-_:_+18),g&&(js(p)?k+=p==="L"?-_:_:E+=p==="T"?-_:_+18),!f&&BL.getNode(l)?.type==="junction"&&(js(u)?y+=u==="L"?a:-a:b+=u==="T"?a:-a),!g&&BL.getNode(d)?.type==="junction"&&(js(p)?k+=p==="L"?a:-a:E+=p==="T"?a:-a),o[0]._private.rscratch){let S=t.insert("g");if(S.insert("path").attr("d",`M ${y},${b} L ${w},${C} L${k},${E} `).attr("class","edge"),h){let L=js(u)?PL[u](y,i):y-s,M=X0(u)?PL[u](b,i):b-s;S.insert("polygon").attr("points",NRe[u](i)).attr("transform",`translate(${L},${M})`).attr("class","arrow")}if(m){let L=js(p)?PL[p](k,i):k-s,M=X0(p)?PL[p](E,i):E-s;S.insert("polygon").attr("points",NRe[p](i)).attr("transform",`translate(${L},${M})`).attr("class","arrow")}if(v){let L=uY(u,p)?"XY":js(u)?"X":"Y",M=0;L==="X"?M=Math.abs(y-k):L==="Y"?M=Math.abs(b-E)/1.5:M=Math.abs(y-k)/2;let D=S.append("g");if(await Xa(D,v,{useHtmlLabels:!1,width:M,classes:"architecture-service-label"},Te()),D.attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle"),L==="X")D.attr("transform","translate("+w+", "+C+")");else if(L==="Y")D.attr("transform","translate("+w+", "+C+") rotate(-90)");else if(L==="XY"){let T=oY(u,p);if(T&&H_t(T)){let I=D.node().getBoundingClientRect(),[N,O]=X_t(T);D.attr("dominant-baseline","auto").attr("transform",`rotate(${-1*N*O*45})`);let R=D.node().getBoundingClientRect();D.attr("transform",` - translate(${w}, ${C-I.height/2}) - translate(${N*R.width/2}, ${O*R.height/2}) - rotate(${-1*N*O*45}, 0, ${I.height/2}) - `)}}}}}))},"drawEdges"),g8t=x(async function(t,e){let n=ai("padding")*.75,a=ai("fontSize"),s=ai("iconSize")/2;await Promise.all(e.nodes().map(async o=>{let l=hb(o);if(l.type==="group"){let{h:u,w:h,x1:f,y1:d}=o.boundingBox();t.append("rect").attr("x",f+s).attr("y",d+s).attr("width",h).attr("height",u).attr("class","node-bkg");let p=t.append("g"),m=f,g=d;if(l.icon){let v=p.append("g");v.html(`${await kh(l.icon,{height:n,width:n,fallbackPrefix:ak.prefix})}`),v.attr("transform","translate("+(m+s+1)+", "+(g+s+1)+")"),m+=n,g+=a/2-1-2}if(l.label){let v=p.append("g");await Xa(v,l.label,{useHtmlLabels:!1,width:h,classes:"architecture-service-label"},Te()),v.attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","start").attr("text-anchor","start"),v.attr("transform","translate("+(m+s+4)+", "+(g+s+2)+")")}}}))},"drawGroups"),v8t=x(async function(t,e,r){for(let n of r){let a=e.append("g"),i=ai("iconSize");if(n.title){let u=a.append("g");await Xa(u,n.title,{useHtmlLabels:!1,width:i*1.5,classes:"architecture-service-label"},Te()),u.attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle"),u.attr("transform","translate("+i/2+", "+i+")")}let s=a.append("g");if(n.icon)s.html(`${await kh(n.icon,{height:i,width:i,fallbackPrefix:ak.prefix})}`);else if(n.iconText){s.html(`${await kh("blank",{height:i,width:i,fallbackPrefix:ak.prefix})}`);let f=s.append("g").append("foreignObject").attr("width",i).attr("height",i).append("div").attr("class","node-icon-text").attr("style",`height: ${i}px;`).append("div").html(n.iconText),d=parseInt(window.getComputedStyle(f.node(),null).getPropertyValue("font-size").replace(/\D/g,""))??16;f.attr("style",`-webkit-line-clamp: ${Math.floor((i-2)/d)};`)}else s.append("path").attr("class","node-bkg").attr("id","node-"+n.id).attr("d",`M0 ${i} v${-i} q0,-5 5,-5 h${i} q5,0 5,5 v${i} H0 Z`);a.attr("class","architecture-service");let{width:o,height:l}=a._groups[0][0].getBBox();n.width=o,n.height=l,t.setElementForId(n.id,a)}return 0},"drawServices"),y8t=x(function(t,e,r){r.forEach(n=>{let a=e.append("g"),i=ai("iconSize");a.append("g").append("rect").attr("id","node-"+n.id).attr("fill-opacity","0").attr("width",i).attr("height",i),a.attr("class","architecture-junction");let{width:o,height:l}=a._groups[0][0].getBBox();a.width=o,a.height=l,t.setElementForId(n.id,a)})},"drawJunctions");JT([{name:ak.prefix,icons:ak}]);Pl.use(BRe.default);x(FRe,"addServices");x(zRe,"addJunctions");x($Re,"positionNodes");x(GRe,"addGroups");x(URe,"addEdges");x(qRe,"getAlignments");x(VRe,"getRelativeConstraints");x(HRe,"layoutArchitecture");x8t=x(async(t,e,r,n)=>{let a=n.db,i=a.getServices(),s=a.getJunctions(),o=a.getGroups(),l=a.getEdges(),u=a.getDataStructures(),h=yi(e),f=h.append("g");f.attr("class","architecture-edges");let d=h.append("g");d.attr("class","architecture-services");let p=h.append("g");p.attr("class","architecture-groups"),await v8t(a,d,i),y8t(a,d,s);let m=await HRe(i,s,o,l,a,u);await m8t(f,m),await g8t(p,m),$Re(a,m),Vl(void 0,h,ai("padding"),ai("useMaxWidth"))},"draw"),b8t={draw:x8t},w8t={parser:f8t,db:BL,renderer:b8t,styles:p8t}});var KL={};lr(KL,{arrayReplaceAt:()=>jL,asciiTrim:()=>J0,assign:()=>kg,escapeHtml:()=>lh,escapeRE:()=>RDe,fromCodePoint:()=>Tg,has:()=>xDe,isMdAsciiPunct:()=>Z0,isPunctChar:()=>$Y,isPunctCharCode:()=>K0,isSpace:()=>Tr,isString:()=>kk,isValidEntityCode:()=>Tk,isWhiteSpace:()=>j0,lib:()=>IDe,normalizeReference:()=>Q0,unescapeAll:()=>oh,unescapeMd:()=>EDe});var mk={};lr(mk,{decode:()=>pb,encode:()=>dk,format:()=>xg,parse:()=>mb});var bY={};function jIe(t){let e=bY[t];if(e)return e;e=bY[t]=[];for(let r=0;r<128;r++){let n=String.fromCharCode(r);e.push(n)}for(let r=0;r=55296&&h<=57343?a+="\uFFFD\uFFFD\uFFFD":a+=String.fromCharCode(h),i+=6;continue}}if((o&248)===240&&i+91114111?a+="\uFFFD\uFFFD\uFFFD\uFFFD":(f-=65536,a+=String.fromCharCode(55296+(f>>10),56320+(f&1023))),i+=9;continue}}a+="\uFFFD"}return a})}hk.defaultChars=";/?:@&=+$,#";hk.componentChars="";var pb=hk;var wY={};function KIe(t){let e=wY[t];if(e)return e;e=wY[t]=[];for(let r=0;r<128;r++){let n=String.fromCharCode(r);/^[0-9a-z]$/i.test(n)?e.push(n):e.push("%"+("0"+r.toString(16).toUpperCase()).slice(-2))}for(let r=0;r"u"&&(r=!0);let n=KIe(e),a="";for(let i=0,s=t.length;i=55296&&o<=57343){if(o>=55296&&o<=56319&&i+1=56320&&l<=57343){a+=encodeURIComponent(t[i]+t[i+1]),i++;continue}}a+="%EF%BF%BD";continue}a+=encodeURIComponent(t[i])}return a}fk.defaultChars=";/?:@&=+$,-_.!~*'()#";fk.componentChars="-_.!~*'()";var dk=fk;function xg(t){let e="";return e+=t.protocol||"",e+=t.slashes?"//":"",e+=t.auth?t.auth+"@":"",t.hostname&&t.hostname.indexOf(":")!==-1?e+="["+t.hostname+"]":e+=t.hostname||"",e+=t.port?":"+t.port:"",e+=t.pathname||"",e+=t.search||"",e+=t.hash||"",e}function pk(){this.protocol=null,this.slashes=null,this.auth=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.pathname=null}var ZIe=/^([a-z0-9.+-]+:)/i,QIe=/:[0-9]*$/,JIe=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,eDe=["<",">",'"',"`"," ","\r",` -`," "],tDe=["{","}","|","\\","^","`"].concat(eDe),rDe=["'"].concat(tDe),kY=["%","/","?",";","#"].concat(rDe),TY=["/","?","#"],nDe=255,EY=/^[+a-z0-9A-Z_-]{0,63}$/,aDe=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,CY={javascript:!0,"javascript:":!0},SY={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0};function iDe(t,e){if(t&&t instanceof pk)return t;let r=new pk;return r.parse(t,e),r}pk.prototype.parse=function(t,e){let r,n,a,i=t;if(i=i.trim(),!e&&t.split("#").length===1){let u=JIe.exec(i);if(u)return this.pathname=u[1],u[2]&&(this.search=u[2]),this}let s=ZIe.exec(i);if(s&&(s=s[0],r=s.toLowerCase(),this.protocol=s,i=i.substr(s.length)),(e||s||i.match(/^\/\/[^@\/]+@[^@\/]+/))&&(a=i.substr(0,2)==="//",a&&!(s&&CY[s])&&(i=i.substr(2),this.slashes=!0)),!CY[s]&&(a||s&&!SY[s])){let u=-1;for(let m=0;m127?b+="x":b+=y[w];if(!b.match(EY)){let w=m.slice(0,g),C=m.slice(g+1),k=y.match(aDe);k&&(w.push(k[1]),C.unshift(k[2])),C.length&&(i=C.join(".")+i),this.hostname=w.join(".");break}}}}this.hostname.length>nDe&&(this.hostname=""),p&&(this.hostname=this.hostname.substr(1,this.hostname.length-2))}let o=i.indexOf("#");o!==-1&&(this.hash=i.substr(o),i=i.slice(0,o));let l=i.indexOf("?");return l!==-1&&(this.search=i.substr(l),i=i.slice(0,l)),i&&(this.pathname=i),SY[r]&&this.hostname&&!this.pathname&&(this.pathname=""),this};pk.prototype.parseHost=function(t){let e=QIe.exec(t);e&&(e=e[0],e!==":"&&(this.port=e.substr(1)),t=t.substr(0,t.length-e.length)),t&&(this.hostname=t)};var mb=iDe;var UL={};lr(UL,{Any:()=>gk,Cc:()=>vk,Cf:()=>_Y,P:()=>bg,S:()=>yk,Z:()=>xk});var gk=/[\0-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/;var vk=/[\0-\x1F\x7F-\x9F]/;var _Y=/[\xAD\u0600-\u0605\u061C\u06DD\u070F\u0890\u0891\u08E2\u180E\u200B-\u200F\u202A-\u202E\u2060-\u2064\u2066-\u206F\uFEFF\uFFF9-\uFFFB]|\uD804[\uDCBD\uDCCD]|\uD80D[\uDC30-\uDC3F]|\uD82F[\uDCA0-\uDCA3]|\uD834[\uDD73-\uDD7A]|\uDB40[\uDC01\uDC20-\uDC7F]/;var bg=/[!-#%-\*,-\/:;\?@\[-\]_\{\}\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061D-\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C77\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1B7D\u1B7E\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4F\u2E52-\u2E5D\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD803[\uDEAD\uDF55-\uDF59\uDF86-\uDF89]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC8\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDC4B-\uDC4F\uDC5A\uDC5B\uDC5D\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDE60-\uDE6C\uDEB9\uDF3C-\uDF3E]|\uD806[\uDC3B\uDD44-\uDD46\uDDE2\uDE3F-\uDE46\uDE9A-\uDE9C\uDE9E-\uDEA2\uDF00-\uDF09]|\uD807[\uDC41-\uDC45\uDC70\uDC71\uDEF7\uDEF8\uDF43-\uDF4F\uDFFF]|\uD809[\uDC70-\uDC74]|\uD80B[\uDFF1\uDFF2]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD81B[\uDE97-\uDE9A\uDFE2]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]|\uD83A[\uDD5E\uDD5F]/;var yk=/[\$\+<->\^`\|~\xA2-\xA6\xA8\xA9\xAC\xAE-\xB1\xB4\xB8\xD7\xF7\u02C2-\u02C5\u02D2-\u02DF\u02E5-\u02EB\u02ED\u02EF-\u02FF\u0375\u0384\u0385\u03F6\u0482\u058D-\u058F\u0606-\u0608\u060B\u060E\u060F\u06DE\u06E9\u06FD\u06FE\u07F6\u07FE\u07FF\u0888\u09F2\u09F3\u09FA\u09FB\u0AF1\u0B70\u0BF3-\u0BFA\u0C7F\u0D4F\u0D79\u0E3F\u0F01-\u0F03\u0F13\u0F15-\u0F17\u0F1A-\u0F1F\u0F34\u0F36\u0F38\u0FBE-\u0FC5\u0FC7-\u0FCC\u0FCE\u0FCF\u0FD5-\u0FD8\u109E\u109F\u1390-\u1399\u166D\u17DB\u1940\u19DE-\u19FF\u1B61-\u1B6A\u1B74-\u1B7C\u1FBD\u1FBF-\u1FC1\u1FCD-\u1FCF\u1FDD-\u1FDF\u1FED-\u1FEF\u1FFD\u1FFE\u2044\u2052\u207A-\u207C\u208A-\u208C\u20A0-\u20C0\u2100\u2101\u2103-\u2106\u2108\u2109\u2114\u2116-\u2118\u211E-\u2123\u2125\u2127\u2129\u212E\u213A\u213B\u2140-\u2144\u214A-\u214D\u214F\u218A\u218B\u2190-\u2307\u230C-\u2328\u232B-\u2426\u2440-\u244A\u249C-\u24E9\u2500-\u2767\u2794-\u27C4\u27C7-\u27E5\u27F0-\u2982\u2999-\u29D7\u29DC-\u29FB\u29FE-\u2B73\u2B76-\u2B95\u2B97-\u2BFF\u2CE5-\u2CEA\u2E50\u2E51\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFF\u3004\u3012\u3013\u3020\u3036\u3037\u303E\u303F\u309B\u309C\u3190\u3191\u3196-\u319F\u31C0-\u31E3\u31EF\u3200-\u321E\u322A-\u3247\u3250\u3260-\u327F\u328A-\u32B0\u32C0-\u33FF\u4DC0-\u4DFF\uA490-\uA4C6\uA700-\uA716\uA720\uA721\uA789\uA78A\uA828-\uA82B\uA836-\uA839\uAA77-\uAA79\uAB5B\uAB6A\uAB6B\uFB29\uFBB2-\uFBC2\uFD40-\uFD4F\uFDCF\uFDFC-\uFDFF\uFE62\uFE64-\uFE66\uFE69\uFF04\uFF0B\uFF1C-\uFF1E\uFF3E\uFF40\uFF5C\uFF5E\uFFE0-\uFFE6\uFFE8-\uFFEE\uFFFC\uFFFD]|\uD800[\uDD37-\uDD3F\uDD79-\uDD89\uDD8C-\uDD8E\uDD90-\uDD9C\uDDA0\uDDD0-\uDDFC]|\uD802[\uDC77\uDC78\uDEC8]|\uD805\uDF3F|\uD807[\uDFD5-\uDFF1]|\uD81A[\uDF3C-\uDF3F\uDF45]|\uD82F\uDC9C|\uD833[\uDF50-\uDFC3]|\uD834[\uDC00-\uDCF5\uDD00-\uDD26\uDD29-\uDD64\uDD6A-\uDD6C\uDD83\uDD84\uDD8C-\uDDA9\uDDAE-\uDDEA\uDE00-\uDE41\uDE45\uDF00-\uDF56]|\uD835[\uDEC1\uDEDB\uDEFB\uDF15\uDF35\uDF4F\uDF6F\uDF89\uDFA9\uDFC3]|\uD836[\uDC00-\uDDFF\uDE37-\uDE3A\uDE6D-\uDE74\uDE76-\uDE83\uDE85\uDE86]|\uD838[\uDD4F\uDEFF]|\uD83B[\uDCAC\uDCB0\uDD2E\uDEF0\uDEF1]|\uD83C[\uDC00-\uDC2B\uDC30-\uDC93\uDCA0-\uDCAE\uDCB1-\uDCBF\uDCC1-\uDCCF\uDCD1-\uDCF5\uDD0D-\uDDAD\uDDE6-\uDE02\uDE10-\uDE3B\uDE40-\uDE48\uDE50\uDE51\uDE60-\uDE65\uDF00-\uDFFF]|\uD83D[\uDC00-\uDED7\uDEDC-\uDEEC\uDEF0-\uDEFC\uDF00-\uDF76\uDF7B-\uDFD9\uDFE0-\uDFEB\uDFF0]|\uD83E[\uDC00-\uDC0B\uDC10-\uDC47\uDC50-\uDC59\uDC60-\uDC87\uDC90-\uDCAD\uDCB0\uDCB1\uDD00-\uDE53\uDE60-\uDE6D\uDE70-\uDE7C\uDE80-\uDE88\uDE90-\uDEBD\uDEBF-\uDEC5\uDECE-\uDEDB\uDEE0-\uDEE8\uDEF0-\uDEF8\uDF00-\uDF92\uDF94-\uDFCA]/;var xk=/[ \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/;var AY=new Uint16Array('\u1D41<\xD5\u0131\u028A\u049D\u057B\u05D0\u0675\u06DE\u07A2\u07D6\u080F\u0A4A\u0A91\u0DA1\u0E6D\u0F09\u0F26\u10CA\u1228\u12E1\u1415\u149D\u14C3\u14DF\u1525\0\0\0\0\0\0\u156B\u16CD\u198D\u1C12\u1DDD\u1F7E\u2060\u21B0\u228D\u23C0\u23FB\u2442\u2824\u2912\u2D08\u2E48\u2FCE\u3016\u32BA\u3639\u37AC\u38FE\u3A28\u3A71\u3AE0\u3B2E\u0800EMabcfglmnoprstu\\bfms\x7F\x84\x8B\x90\x95\x98\xA6\xB3\xB9\xC8\xCFlig\u803B\xC6\u40C6P\u803B&\u4026cute\u803B\xC1\u40C1reve;\u4102\u0100iyx}rc\u803B\xC2\u40C2;\u4410r;\uC000\u{1D504}rave\u803B\xC0\u40C0pha;\u4391acr;\u4100d;\u6A53\u0100gp\x9D\xA1on;\u4104f;\uC000\u{1D538}plyFunction;\u6061ing\u803B\xC5\u40C5\u0100cs\xBE\xC3r;\uC000\u{1D49C}ign;\u6254ilde\u803B\xC3\u40C3ml\u803B\xC4\u40C4\u0400aceforsu\xE5\xFB\xFE\u0117\u011C\u0122\u0127\u012A\u0100cr\xEA\xF2kslash;\u6216\u0176\xF6\xF8;\u6AE7ed;\u6306y;\u4411\u0180crt\u0105\u010B\u0114ause;\u6235noullis;\u612Ca;\u4392r;\uC000\u{1D505}pf;\uC000\u{1D539}eve;\u42D8c\xF2\u0113mpeq;\u624E\u0700HOacdefhilorsu\u014D\u0151\u0156\u0180\u019E\u01A2\u01B5\u01B7\u01BA\u01DC\u0215\u0273\u0278\u027Ecy;\u4427PY\u803B\xA9\u40A9\u0180cpy\u015D\u0162\u017Aute;\u4106\u0100;i\u0167\u0168\u62D2talDifferentialD;\u6145leys;\u612D\u0200aeio\u0189\u018E\u0194\u0198ron;\u410Cdil\u803B\xC7\u40C7rc;\u4108nint;\u6230ot;\u410A\u0100dn\u01A7\u01ADilla;\u40B8terDot;\u40B7\xF2\u017Fi;\u43A7rcle\u0200DMPT\u01C7\u01CB\u01D1\u01D6ot;\u6299inus;\u6296lus;\u6295imes;\u6297o\u0100cs\u01E2\u01F8kwiseContourIntegral;\u6232eCurly\u0100DQ\u0203\u020FoubleQuote;\u601Duote;\u6019\u0200lnpu\u021E\u0228\u0247\u0255on\u0100;e\u0225\u0226\u6237;\u6A74\u0180git\u022F\u0236\u023Aruent;\u6261nt;\u622FourIntegral;\u622E\u0100fr\u024C\u024E;\u6102oduct;\u6210nterClockwiseContourIntegral;\u6233oss;\u6A2Fcr;\uC000\u{1D49E}p\u0100;C\u0284\u0285\u62D3ap;\u624D\u0580DJSZacefios\u02A0\u02AC\u02B0\u02B4\u02B8\u02CB\u02D7\u02E1\u02E6\u0333\u048D\u0100;o\u0179\u02A5trahd;\u6911cy;\u4402cy;\u4405cy;\u440F\u0180grs\u02BF\u02C4\u02C7ger;\u6021r;\u61A1hv;\u6AE4\u0100ay\u02D0\u02D5ron;\u410E;\u4414l\u0100;t\u02DD\u02DE\u6207a;\u4394r;\uC000\u{1D507}\u0100af\u02EB\u0327\u0100cm\u02F0\u0322ritical\u0200ADGT\u0300\u0306\u0316\u031Ccute;\u40B4o\u0174\u030B\u030D;\u42D9bleAcute;\u42DDrave;\u4060ilde;\u42DCond;\u62C4ferentialD;\u6146\u0470\u033D\0\0\0\u0342\u0354\0\u0405f;\uC000\u{1D53B}\u0180;DE\u0348\u0349\u034D\u40A8ot;\u60DCqual;\u6250ble\u0300CDLRUV\u0363\u0372\u0382\u03CF\u03E2\u03F8ontourIntegra\xEC\u0239o\u0274\u0379\0\0\u037B\xBB\u0349nArrow;\u61D3\u0100eo\u0387\u03A4ft\u0180ART\u0390\u0396\u03A1rrow;\u61D0ightArrow;\u61D4e\xE5\u02CAng\u0100LR\u03AB\u03C4eft\u0100AR\u03B3\u03B9rrow;\u67F8ightArrow;\u67FAightArrow;\u67F9ight\u0100AT\u03D8\u03DErrow;\u61D2ee;\u62A8p\u0241\u03E9\0\0\u03EFrrow;\u61D1ownArrow;\u61D5erticalBar;\u6225n\u0300ABLRTa\u0412\u042A\u0430\u045E\u047F\u037Crrow\u0180;BU\u041D\u041E\u0422\u6193ar;\u6913pArrow;\u61F5reve;\u4311eft\u02D2\u043A\0\u0446\0\u0450ightVector;\u6950eeVector;\u695Eector\u0100;B\u0459\u045A\u61BDar;\u6956ight\u01D4\u0467\0\u0471eeVector;\u695Fector\u0100;B\u047A\u047B\u61C1ar;\u6957ee\u0100;A\u0486\u0487\u62A4rrow;\u61A7\u0100ct\u0492\u0497r;\uC000\u{1D49F}rok;\u4110\u0800NTacdfglmopqstux\u04BD\u04C0\u04C4\u04CB\u04DE\u04E2\u04E7\u04EE\u04F5\u0521\u052F\u0536\u0552\u055D\u0560\u0565G;\u414AH\u803B\xD0\u40D0cute\u803B\xC9\u40C9\u0180aiy\u04D2\u04D7\u04DCron;\u411Arc\u803B\xCA\u40CA;\u442Dot;\u4116r;\uC000\u{1D508}rave\u803B\xC8\u40C8ement;\u6208\u0100ap\u04FA\u04FEcr;\u4112ty\u0253\u0506\0\0\u0512mallSquare;\u65FBerySmallSquare;\u65AB\u0100gp\u0526\u052Aon;\u4118f;\uC000\u{1D53C}silon;\u4395u\u0100ai\u053C\u0549l\u0100;T\u0542\u0543\u6A75ilde;\u6242librium;\u61CC\u0100ci\u0557\u055Ar;\u6130m;\u6A73a;\u4397ml\u803B\xCB\u40CB\u0100ip\u056A\u056Fsts;\u6203onentialE;\u6147\u0280cfios\u0585\u0588\u058D\u05B2\u05CCy;\u4424r;\uC000\u{1D509}lled\u0253\u0597\0\0\u05A3mallSquare;\u65FCerySmallSquare;\u65AA\u0370\u05BA\0\u05BF\0\0\u05C4f;\uC000\u{1D53D}All;\u6200riertrf;\u6131c\xF2\u05CB\u0600JTabcdfgorst\u05E8\u05EC\u05EF\u05FA\u0600\u0612\u0616\u061B\u061D\u0623\u066C\u0672cy;\u4403\u803B>\u403Emma\u0100;d\u05F7\u05F8\u4393;\u43DCreve;\u411E\u0180eiy\u0607\u060C\u0610dil;\u4122rc;\u411C;\u4413ot;\u4120r;\uC000\u{1D50A};\u62D9pf;\uC000\u{1D53E}eater\u0300EFGLST\u0635\u0644\u064E\u0656\u065B\u0666qual\u0100;L\u063E\u063F\u6265ess;\u62DBullEqual;\u6267reater;\u6AA2ess;\u6277lantEqual;\u6A7Eilde;\u6273cr;\uC000\u{1D4A2};\u626B\u0400Aacfiosu\u0685\u068B\u0696\u069B\u069E\u06AA\u06BE\u06CARDcy;\u442A\u0100ct\u0690\u0694ek;\u42C7;\u405Eirc;\u4124r;\u610ClbertSpace;\u610B\u01F0\u06AF\0\u06B2f;\u610DizontalLine;\u6500\u0100ct\u06C3\u06C5\xF2\u06A9rok;\u4126mp\u0144\u06D0\u06D8ownHum\xF0\u012Fqual;\u624F\u0700EJOacdfgmnostu\u06FA\u06FE\u0703\u0707\u070E\u071A\u071E\u0721\u0728\u0744\u0778\u078B\u078F\u0795cy;\u4415lig;\u4132cy;\u4401cute\u803B\xCD\u40CD\u0100iy\u0713\u0718rc\u803B\xCE\u40CE;\u4418ot;\u4130r;\u6111rave\u803B\xCC\u40CC\u0180;ap\u0720\u072F\u073F\u0100cg\u0734\u0737r;\u412AinaryI;\u6148lie\xF3\u03DD\u01F4\u0749\0\u0762\u0100;e\u074D\u074E\u622C\u0100gr\u0753\u0758ral;\u622Bsection;\u62C2isible\u0100CT\u076C\u0772omma;\u6063imes;\u6062\u0180gpt\u077F\u0783\u0788on;\u412Ef;\uC000\u{1D540}a;\u4399cr;\u6110ilde;\u4128\u01EB\u079A\0\u079Ecy;\u4406l\u803B\xCF\u40CF\u0280cfosu\u07AC\u07B7\u07BC\u07C2\u07D0\u0100iy\u07B1\u07B5rc;\u4134;\u4419r;\uC000\u{1D50D}pf;\uC000\u{1D541}\u01E3\u07C7\0\u07CCr;\uC000\u{1D4A5}rcy;\u4408kcy;\u4404\u0380HJacfos\u07E4\u07E8\u07EC\u07F1\u07FD\u0802\u0808cy;\u4425cy;\u440Cppa;\u439A\u0100ey\u07F6\u07FBdil;\u4136;\u441Ar;\uC000\u{1D50E}pf;\uC000\u{1D542}cr;\uC000\u{1D4A6}\u0580JTaceflmost\u0825\u0829\u082C\u0850\u0863\u09B3\u09B8\u09C7\u09CD\u0A37\u0A47cy;\u4409\u803B<\u403C\u0280cmnpr\u0837\u083C\u0841\u0844\u084Dute;\u4139bda;\u439Bg;\u67EAlacetrf;\u6112r;\u619E\u0180aey\u0857\u085C\u0861ron;\u413Ddil;\u413B;\u441B\u0100fs\u0868\u0970t\u0500ACDFRTUVar\u087E\u08A9\u08B1\u08E0\u08E6\u08FC\u092F\u095B\u0390\u096A\u0100nr\u0883\u088FgleBracket;\u67E8row\u0180;BR\u0899\u089A\u089E\u6190ar;\u61E4ightArrow;\u61C6eiling;\u6308o\u01F5\u08B7\0\u08C3bleBracket;\u67E6n\u01D4\u08C8\0\u08D2eeVector;\u6961ector\u0100;B\u08DB\u08DC\u61C3ar;\u6959loor;\u630Aight\u0100AV\u08EF\u08F5rrow;\u6194ector;\u694E\u0100er\u0901\u0917e\u0180;AV\u0909\u090A\u0910\u62A3rrow;\u61A4ector;\u695Aiangle\u0180;BE\u0924\u0925\u0929\u62B2ar;\u69CFqual;\u62B4p\u0180DTV\u0937\u0942\u094CownVector;\u6951eeVector;\u6960ector\u0100;B\u0956\u0957\u61BFar;\u6958ector\u0100;B\u0965\u0966\u61BCar;\u6952ight\xE1\u039Cs\u0300EFGLST\u097E\u098B\u0995\u099D\u09A2\u09ADqualGreater;\u62DAullEqual;\u6266reater;\u6276ess;\u6AA1lantEqual;\u6A7Dilde;\u6272r;\uC000\u{1D50F}\u0100;e\u09BD\u09BE\u62D8ftarrow;\u61DAidot;\u413F\u0180npw\u09D4\u0A16\u0A1Bg\u0200LRlr\u09DE\u09F7\u0A02\u0A10eft\u0100AR\u09E6\u09ECrrow;\u67F5ightArrow;\u67F7ightArrow;\u67F6eft\u0100ar\u03B3\u0A0Aight\xE1\u03BFight\xE1\u03CAf;\uC000\u{1D543}er\u0100LR\u0A22\u0A2CeftArrow;\u6199ightArrow;\u6198\u0180cht\u0A3E\u0A40\u0A42\xF2\u084C;\u61B0rok;\u4141;\u626A\u0400acefiosu\u0A5A\u0A5D\u0A60\u0A77\u0A7C\u0A85\u0A8B\u0A8Ep;\u6905y;\u441C\u0100dl\u0A65\u0A6FiumSpace;\u605Flintrf;\u6133r;\uC000\u{1D510}nusPlus;\u6213pf;\uC000\u{1D544}c\xF2\u0A76;\u439C\u0480Jacefostu\u0AA3\u0AA7\u0AAD\u0AC0\u0B14\u0B19\u0D91\u0D97\u0D9Ecy;\u440Acute;\u4143\u0180aey\u0AB4\u0AB9\u0ABEron;\u4147dil;\u4145;\u441D\u0180gsw\u0AC7\u0AF0\u0B0Eative\u0180MTV\u0AD3\u0ADF\u0AE8ediumSpace;\u600Bhi\u0100cn\u0AE6\u0AD8\xEB\u0AD9eryThi\xEE\u0AD9ted\u0100GL\u0AF8\u0B06reaterGreate\xF2\u0673essLes\xF3\u0A48Line;\u400Ar;\uC000\u{1D511}\u0200Bnpt\u0B22\u0B28\u0B37\u0B3Areak;\u6060BreakingSpace;\u40A0f;\u6115\u0680;CDEGHLNPRSTV\u0B55\u0B56\u0B6A\u0B7C\u0BA1\u0BEB\u0C04\u0C5E\u0C84\u0CA6\u0CD8\u0D61\u0D85\u6AEC\u0100ou\u0B5B\u0B64ngruent;\u6262pCap;\u626DoubleVerticalBar;\u6226\u0180lqx\u0B83\u0B8A\u0B9Bement;\u6209ual\u0100;T\u0B92\u0B93\u6260ilde;\uC000\u2242\u0338ists;\u6204reater\u0380;EFGLST\u0BB6\u0BB7\u0BBD\u0BC9\u0BD3\u0BD8\u0BE5\u626Fqual;\u6271ullEqual;\uC000\u2267\u0338reater;\uC000\u226B\u0338ess;\u6279lantEqual;\uC000\u2A7E\u0338ilde;\u6275ump\u0144\u0BF2\u0BFDownHump;\uC000\u224E\u0338qual;\uC000\u224F\u0338e\u0100fs\u0C0A\u0C27tTriangle\u0180;BE\u0C1A\u0C1B\u0C21\u62EAar;\uC000\u29CF\u0338qual;\u62ECs\u0300;EGLST\u0C35\u0C36\u0C3C\u0C44\u0C4B\u0C58\u626Equal;\u6270reater;\u6278ess;\uC000\u226A\u0338lantEqual;\uC000\u2A7D\u0338ilde;\u6274ested\u0100GL\u0C68\u0C79reaterGreater;\uC000\u2AA2\u0338essLess;\uC000\u2AA1\u0338recedes\u0180;ES\u0C92\u0C93\u0C9B\u6280qual;\uC000\u2AAF\u0338lantEqual;\u62E0\u0100ei\u0CAB\u0CB9verseElement;\u620CghtTriangle\u0180;BE\u0CCB\u0CCC\u0CD2\u62EBar;\uC000\u29D0\u0338qual;\u62ED\u0100qu\u0CDD\u0D0CuareSu\u0100bp\u0CE8\u0CF9set\u0100;E\u0CF0\u0CF3\uC000\u228F\u0338qual;\u62E2erset\u0100;E\u0D03\u0D06\uC000\u2290\u0338qual;\u62E3\u0180bcp\u0D13\u0D24\u0D4Eset\u0100;E\u0D1B\u0D1E\uC000\u2282\u20D2qual;\u6288ceeds\u0200;EST\u0D32\u0D33\u0D3B\u0D46\u6281qual;\uC000\u2AB0\u0338lantEqual;\u62E1ilde;\uC000\u227F\u0338erset\u0100;E\u0D58\u0D5B\uC000\u2283\u20D2qual;\u6289ilde\u0200;EFT\u0D6E\u0D6F\u0D75\u0D7F\u6241qual;\u6244ullEqual;\u6247ilde;\u6249erticalBar;\u6224cr;\uC000\u{1D4A9}ilde\u803B\xD1\u40D1;\u439D\u0700Eacdfgmoprstuv\u0DBD\u0DC2\u0DC9\u0DD5\u0DDB\u0DE0\u0DE7\u0DFC\u0E02\u0E20\u0E22\u0E32\u0E3F\u0E44lig;\u4152cute\u803B\xD3\u40D3\u0100iy\u0DCE\u0DD3rc\u803B\xD4\u40D4;\u441Eblac;\u4150r;\uC000\u{1D512}rave\u803B\xD2\u40D2\u0180aei\u0DEE\u0DF2\u0DF6cr;\u414Cga;\u43A9cron;\u439Fpf;\uC000\u{1D546}enCurly\u0100DQ\u0E0E\u0E1AoubleQuote;\u601Cuote;\u6018;\u6A54\u0100cl\u0E27\u0E2Cr;\uC000\u{1D4AA}ash\u803B\xD8\u40D8i\u016C\u0E37\u0E3Cde\u803B\xD5\u40D5es;\u6A37ml\u803B\xD6\u40D6er\u0100BP\u0E4B\u0E60\u0100ar\u0E50\u0E53r;\u603Eac\u0100ek\u0E5A\u0E5C;\u63DEet;\u63B4arenthesis;\u63DC\u0480acfhilors\u0E7F\u0E87\u0E8A\u0E8F\u0E92\u0E94\u0E9D\u0EB0\u0EFCrtialD;\u6202y;\u441Fr;\uC000\u{1D513}i;\u43A6;\u43A0usMinus;\u40B1\u0100ip\u0EA2\u0EADncareplan\xE5\u069Df;\u6119\u0200;eio\u0EB9\u0EBA\u0EE0\u0EE4\u6ABBcedes\u0200;EST\u0EC8\u0EC9\u0ECF\u0EDA\u627Aqual;\u6AAFlantEqual;\u627Cilde;\u627Eme;\u6033\u0100dp\u0EE9\u0EEEuct;\u620Fortion\u0100;a\u0225\u0EF9l;\u621D\u0100ci\u0F01\u0F06r;\uC000\u{1D4AB};\u43A8\u0200Ufos\u0F11\u0F16\u0F1B\u0F1FOT\u803B"\u4022r;\uC000\u{1D514}pf;\u611Acr;\uC000\u{1D4AC}\u0600BEacefhiorsu\u0F3E\u0F43\u0F47\u0F60\u0F73\u0FA7\u0FAA\u0FAD\u1096\u10A9\u10B4\u10BEarr;\u6910G\u803B\xAE\u40AE\u0180cnr\u0F4E\u0F53\u0F56ute;\u4154g;\u67EBr\u0100;t\u0F5C\u0F5D\u61A0l;\u6916\u0180aey\u0F67\u0F6C\u0F71ron;\u4158dil;\u4156;\u4420\u0100;v\u0F78\u0F79\u611Cerse\u0100EU\u0F82\u0F99\u0100lq\u0F87\u0F8Eement;\u620Builibrium;\u61CBpEquilibrium;\u696Fr\xBB\u0F79o;\u43A1ght\u0400ACDFTUVa\u0FC1\u0FEB\u0FF3\u1022\u1028\u105B\u1087\u03D8\u0100nr\u0FC6\u0FD2gleBracket;\u67E9row\u0180;BL\u0FDC\u0FDD\u0FE1\u6192ar;\u61E5eftArrow;\u61C4eiling;\u6309o\u01F5\u0FF9\0\u1005bleBracket;\u67E7n\u01D4\u100A\0\u1014eeVector;\u695Dector\u0100;B\u101D\u101E\u61C2ar;\u6955loor;\u630B\u0100er\u102D\u1043e\u0180;AV\u1035\u1036\u103C\u62A2rrow;\u61A6ector;\u695Biangle\u0180;BE\u1050\u1051\u1055\u62B3ar;\u69D0qual;\u62B5p\u0180DTV\u1063\u106E\u1078ownVector;\u694FeeVector;\u695Cector\u0100;B\u1082\u1083\u61BEar;\u6954ector\u0100;B\u1091\u1092\u61C0ar;\u6953\u0100pu\u109B\u109Ef;\u611DndImplies;\u6970ightarrow;\u61DB\u0100ch\u10B9\u10BCr;\u611B;\u61B1leDelayed;\u69F4\u0680HOacfhimoqstu\u10E4\u10F1\u10F7\u10FD\u1119\u111E\u1151\u1156\u1161\u1167\u11B5\u11BB\u11BF\u0100Cc\u10E9\u10EEHcy;\u4429y;\u4428FTcy;\u442Ccute;\u415A\u0280;aeiy\u1108\u1109\u110E\u1113\u1117\u6ABCron;\u4160dil;\u415Erc;\u415C;\u4421r;\uC000\u{1D516}ort\u0200DLRU\u112A\u1134\u113E\u1149ownArrow\xBB\u041EeftArrow\xBB\u089AightArrow\xBB\u0FDDpArrow;\u6191gma;\u43A3allCircle;\u6218pf;\uC000\u{1D54A}\u0272\u116D\0\0\u1170t;\u621Aare\u0200;ISU\u117B\u117C\u1189\u11AF\u65A1ntersection;\u6293u\u0100bp\u118F\u119Eset\u0100;E\u1197\u1198\u628Fqual;\u6291erset\u0100;E\u11A8\u11A9\u6290qual;\u6292nion;\u6294cr;\uC000\u{1D4AE}ar;\u62C6\u0200bcmp\u11C8\u11DB\u1209\u120B\u0100;s\u11CD\u11CE\u62D0et\u0100;E\u11CD\u11D5qual;\u6286\u0100ch\u11E0\u1205eeds\u0200;EST\u11ED\u11EE\u11F4\u11FF\u627Bqual;\u6AB0lantEqual;\u627Dilde;\u627FTh\xE1\u0F8C;\u6211\u0180;es\u1212\u1213\u1223\u62D1rset\u0100;E\u121C\u121D\u6283qual;\u6287et\xBB\u1213\u0580HRSacfhiors\u123E\u1244\u1249\u1255\u125E\u1271\u1276\u129F\u12C2\u12C8\u12D1ORN\u803B\xDE\u40DEADE;\u6122\u0100Hc\u124E\u1252cy;\u440By;\u4426\u0100bu\u125A\u125C;\u4009;\u43A4\u0180aey\u1265\u126A\u126Fron;\u4164dil;\u4162;\u4422r;\uC000\u{1D517}\u0100ei\u127B\u1289\u01F2\u1280\0\u1287efore;\u6234a;\u4398\u0100cn\u128E\u1298kSpace;\uC000\u205F\u200ASpace;\u6009lde\u0200;EFT\u12AB\u12AC\u12B2\u12BC\u623Cqual;\u6243ullEqual;\u6245ilde;\u6248pf;\uC000\u{1D54B}ipleDot;\u60DB\u0100ct\u12D6\u12DBr;\uC000\u{1D4AF}rok;\u4166\u0AE1\u12F7\u130E\u131A\u1326\0\u132C\u1331\0\0\0\0\0\u1338\u133D\u1377\u1385\0\u13FF\u1404\u140A\u1410\u0100cr\u12FB\u1301ute\u803B\xDA\u40DAr\u0100;o\u1307\u1308\u619Fcir;\u6949r\u01E3\u1313\0\u1316y;\u440Eve;\u416C\u0100iy\u131E\u1323rc\u803B\xDB\u40DB;\u4423blac;\u4170r;\uC000\u{1D518}rave\u803B\xD9\u40D9acr;\u416A\u0100di\u1341\u1369er\u0100BP\u1348\u135D\u0100ar\u134D\u1350r;\u405Fac\u0100ek\u1357\u1359;\u63DFet;\u63B5arenthesis;\u63DDon\u0100;P\u1370\u1371\u62C3lus;\u628E\u0100gp\u137B\u137Fon;\u4172f;\uC000\u{1D54C}\u0400ADETadps\u1395\u13AE\u13B8\u13C4\u03E8\u13D2\u13D7\u13F3rrow\u0180;BD\u1150\u13A0\u13A4ar;\u6912ownArrow;\u61C5ownArrow;\u6195quilibrium;\u696Eee\u0100;A\u13CB\u13CC\u62A5rrow;\u61A5own\xE1\u03F3er\u0100LR\u13DE\u13E8eftArrow;\u6196ightArrow;\u6197i\u0100;l\u13F9\u13FA\u43D2on;\u43A5ing;\u416Ecr;\uC000\u{1D4B0}ilde;\u4168ml\u803B\xDC\u40DC\u0480Dbcdefosv\u1427\u142C\u1430\u1433\u143E\u1485\u148A\u1490\u1496ash;\u62ABar;\u6AEBy;\u4412ash\u0100;l\u143B\u143C\u62A9;\u6AE6\u0100er\u1443\u1445;\u62C1\u0180bty\u144C\u1450\u147Aar;\u6016\u0100;i\u144F\u1455cal\u0200BLST\u1461\u1465\u146A\u1474ar;\u6223ine;\u407Ceparator;\u6758ilde;\u6240ThinSpace;\u600Ar;\uC000\u{1D519}pf;\uC000\u{1D54D}cr;\uC000\u{1D4B1}dash;\u62AA\u0280cefos\u14A7\u14AC\u14B1\u14B6\u14BCirc;\u4174dge;\u62C0r;\uC000\u{1D51A}pf;\uC000\u{1D54E}cr;\uC000\u{1D4B2}\u0200fios\u14CB\u14D0\u14D2\u14D8r;\uC000\u{1D51B};\u439Epf;\uC000\u{1D54F}cr;\uC000\u{1D4B3}\u0480AIUacfosu\u14F1\u14F5\u14F9\u14FD\u1504\u150F\u1514\u151A\u1520cy;\u442Fcy;\u4407cy;\u442Ecute\u803B\xDD\u40DD\u0100iy\u1509\u150Drc;\u4176;\u442Br;\uC000\u{1D51C}pf;\uC000\u{1D550}cr;\uC000\u{1D4B4}ml;\u4178\u0400Hacdefos\u1535\u1539\u153F\u154B\u154F\u155D\u1560\u1564cy;\u4416cute;\u4179\u0100ay\u1544\u1549ron;\u417D;\u4417ot;\u417B\u01F2\u1554\0\u155BoWidt\xE8\u0AD9a;\u4396r;\u6128pf;\u6124cr;\uC000\u{1D4B5}\u0BE1\u1583\u158A\u1590\0\u15B0\u15B6\u15BF\0\0\0\0\u15C6\u15DB\u15EB\u165F\u166D\0\u1695\u169B\u16B2\u16B9\0\u16BEcute\u803B\xE1\u40E1reve;\u4103\u0300;Ediuy\u159C\u159D\u15A1\u15A3\u15A8\u15AD\u623E;\uC000\u223E\u0333;\u623Frc\u803B\xE2\u40E2te\u80BB\xB4\u0306;\u4430lig\u803B\xE6\u40E6\u0100;r\xB2\u15BA;\uC000\u{1D51E}rave\u803B\xE0\u40E0\u0100ep\u15CA\u15D6\u0100fp\u15CF\u15D4sym;\u6135\xE8\u15D3ha;\u43B1\u0100ap\u15DFc\u0100cl\u15E4\u15E7r;\u4101g;\u6A3F\u0264\u15F0\0\0\u160A\u0280;adsv\u15FA\u15FB\u15FF\u1601\u1607\u6227nd;\u6A55;\u6A5Clope;\u6A58;\u6A5A\u0380;elmrsz\u1618\u1619\u161B\u161E\u163F\u164F\u1659\u6220;\u69A4e\xBB\u1619sd\u0100;a\u1625\u1626\u6221\u0461\u1630\u1632\u1634\u1636\u1638\u163A\u163C\u163E;\u69A8;\u69A9;\u69AA;\u69AB;\u69AC;\u69AD;\u69AE;\u69AFt\u0100;v\u1645\u1646\u621Fb\u0100;d\u164C\u164D\u62BE;\u699D\u0100pt\u1654\u1657h;\u6222\xBB\xB9arr;\u637C\u0100gp\u1663\u1667on;\u4105f;\uC000\u{1D552}\u0380;Eaeiop\u12C1\u167B\u167D\u1682\u1684\u1687\u168A;\u6A70cir;\u6A6F;\u624Ad;\u624Bs;\u4027rox\u0100;e\u12C1\u1692\xF1\u1683ing\u803B\xE5\u40E5\u0180cty\u16A1\u16A6\u16A8r;\uC000\u{1D4B6};\u402Amp\u0100;e\u12C1\u16AF\xF1\u0288ilde\u803B\xE3\u40E3ml\u803B\xE4\u40E4\u0100ci\u16C2\u16C8onin\xF4\u0272nt;\u6A11\u0800Nabcdefiklnoprsu\u16ED\u16F1\u1730\u173C\u1743\u1748\u1778\u177D\u17E0\u17E6\u1839\u1850\u170D\u193D\u1948\u1970ot;\u6AED\u0100cr\u16F6\u171Ek\u0200ceps\u1700\u1705\u170D\u1713ong;\u624Cpsilon;\u43F6rime;\u6035im\u0100;e\u171A\u171B\u623Dq;\u62CD\u0176\u1722\u1726ee;\u62BDed\u0100;g\u172C\u172D\u6305e\xBB\u172Drk\u0100;t\u135C\u1737brk;\u63B6\u0100oy\u1701\u1741;\u4431quo;\u601E\u0280cmprt\u1753\u175B\u1761\u1764\u1768aus\u0100;e\u010A\u0109ptyv;\u69B0s\xE9\u170Cno\xF5\u0113\u0180ahw\u176F\u1771\u1773;\u43B2;\u6136een;\u626Cr;\uC000\u{1D51F}g\u0380costuvw\u178D\u179D\u17B3\u17C1\u17D5\u17DB\u17DE\u0180aiu\u1794\u1796\u179A\xF0\u0760rc;\u65EFp\xBB\u1371\u0180dpt\u17A4\u17A8\u17ADot;\u6A00lus;\u6A01imes;\u6A02\u0271\u17B9\0\0\u17BEcup;\u6A06ar;\u6605riangle\u0100du\u17CD\u17D2own;\u65BDp;\u65B3plus;\u6A04e\xE5\u1444\xE5\u14ADarow;\u690D\u0180ako\u17ED\u1826\u1835\u0100cn\u17F2\u1823k\u0180lst\u17FA\u05AB\u1802ozenge;\u69EBriangle\u0200;dlr\u1812\u1813\u1818\u181D\u65B4own;\u65BEeft;\u65C2ight;\u65B8k;\u6423\u01B1\u182B\0\u1833\u01B2\u182F\0\u1831;\u6592;\u65914;\u6593ck;\u6588\u0100eo\u183E\u184D\u0100;q\u1843\u1846\uC000=\u20E5uiv;\uC000\u2261\u20E5t;\u6310\u0200ptwx\u1859\u185E\u1867\u186Cf;\uC000\u{1D553}\u0100;t\u13CB\u1863om\xBB\u13CCtie;\u62C8\u0600DHUVbdhmptuv\u1885\u1896\u18AA\u18BB\u18D7\u18DB\u18EC\u18FF\u1905\u190A\u1910\u1921\u0200LRlr\u188E\u1890\u1892\u1894;\u6557;\u6554;\u6556;\u6553\u0280;DUdu\u18A1\u18A2\u18A4\u18A6\u18A8\u6550;\u6566;\u6569;\u6564;\u6567\u0200LRlr\u18B3\u18B5\u18B7\u18B9;\u655D;\u655A;\u655C;\u6559\u0380;HLRhlr\u18CA\u18CB\u18CD\u18CF\u18D1\u18D3\u18D5\u6551;\u656C;\u6563;\u6560;\u656B;\u6562;\u655Fox;\u69C9\u0200LRlr\u18E4\u18E6\u18E8\u18EA;\u6555;\u6552;\u6510;\u650C\u0280;DUdu\u06BD\u18F7\u18F9\u18FB\u18FD;\u6565;\u6568;\u652C;\u6534inus;\u629Flus;\u629Eimes;\u62A0\u0200LRlr\u1919\u191B\u191D\u191F;\u655B;\u6558;\u6518;\u6514\u0380;HLRhlr\u1930\u1931\u1933\u1935\u1937\u1939\u193B\u6502;\u656A;\u6561;\u655E;\u653C;\u6524;\u651C\u0100ev\u0123\u1942bar\u803B\xA6\u40A6\u0200ceio\u1951\u1956\u195A\u1960r;\uC000\u{1D4B7}mi;\u604Fm\u0100;e\u171A\u171Cl\u0180;bh\u1968\u1969\u196B\u405C;\u69C5sub;\u67C8\u016C\u1974\u197El\u0100;e\u1979\u197A\u6022t\xBB\u197Ap\u0180;Ee\u012F\u1985\u1987;\u6AAE\u0100;q\u06DC\u06DB\u0CE1\u19A7\0\u19E8\u1A11\u1A15\u1A32\0\u1A37\u1A50\0\0\u1AB4\0\0\u1AC1\0\0\u1B21\u1B2E\u1B4D\u1B52\0\u1BFD\0\u1C0C\u0180cpr\u19AD\u19B2\u19DDute;\u4107\u0300;abcds\u19BF\u19C0\u19C4\u19CA\u19D5\u19D9\u6229nd;\u6A44rcup;\u6A49\u0100au\u19CF\u19D2p;\u6A4Bp;\u6A47ot;\u6A40;\uC000\u2229\uFE00\u0100eo\u19E2\u19E5t;\u6041\xEE\u0693\u0200aeiu\u19F0\u19FB\u1A01\u1A05\u01F0\u19F5\0\u19F8s;\u6A4Don;\u410Ddil\u803B\xE7\u40E7rc;\u4109ps\u0100;s\u1A0C\u1A0D\u6A4Cm;\u6A50ot;\u410B\u0180dmn\u1A1B\u1A20\u1A26il\u80BB\xB8\u01ADptyv;\u69B2t\u8100\xA2;e\u1A2D\u1A2E\u40A2r\xE4\u01B2r;\uC000\u{1D520}\u0180cei\u1A3D\u1A40\u1A4Dy;\u4447ck\u0100;m\u1A47\u1A48\u6713ark\xBB\u1A48;\u43C7r\u0380;Ecefms\u1A5F\u1A60\u1A62\u1A6B\u1AA4\u1AAA\u1AAE\u65CB;\u69C3\u0180;el\u1A69\u1A6A\u1A6D\u42C6q;\u6257e\u0261\u1A74\0\0\u1A88rrow\u0100lr\u1A7C\u1A81eft;\u61BAight;\u61BB\u0280RSacd\u1A92\u1A94\u1A96\u1A9A\u1A9F\xBB\u0F47;\u64C8st;\u629Birc;\u629Aash;\u629Dnint;\u6A10id;\u6AEFcir;\u69C2ubs\u0100;u\u1ABB\u1ABC\u6663it\xBB\u1ABC\u02EC\u1AC7\u1AD4\u1AFA\0\u1B0Aon\u0100;e\u1ACD\u1ACE\u403A\u0100;q\xC7\xC6\u026D\u1AD9\0\0\u1AE2a\u0100;t\u1ADE\u1ADF\u402C;\u4040\u0180;fl\u1AE8\u1AE9\u1AEB\u6201\xEE\u1160e\u0100mx\u1AF1\u1AF6ent\xBB\u1AE9e\xF3\u024D\u01E7\u1AFE\0\u1B07\u0100;d\u12BB\u1B02ot;\u6A6Dn\xF4\u0246\u0180fry\u1B10\u1B14\u1B17;\uC000\u{1D554}o\xE4\u0254\u8100\xA9;s\u0155\u1B1Dr;\u6117\u0100ao\u1B25\u1B29rr;\u61B5ss;\u6717\u0100cu\u1B32\u1B37r;\uC000\u{1D4B8}\u0100bp\u1B3C\u1B44\u0100;e\u1B41\u1B42\u6ACF;\u6AD1\u0100;e\u1B49\u1B4A\u6AD0;\u6AD2dot;\u62EF\u0380delprvw\u1B60\u1B6C\u1B77\u1B82\u1BAC\u1BD4\u1BF9arr\u0100lr\u1B68\u1B6A;\u6938;\u6935\u0270\u1B72\0\0\u1B75r;\u62DEc;\u62DFarr\u0100;p\u1B7F\u1B80\u61B6;\u693D\u0300;bcdos\u1B8F\u1B90\u1B96\u1BA1\u1BA5\u1BA8\u622Arcap;\u6A48\u0100au\u1B9B\u1B9Ep;\u6A46p;\u6A4Aot;\u628Dr;\u6A45;\uC000\u222A\uFE00\u0200alrv\u1BB5\u1BBF\u1BDE\u1BE3rr\u0100;m\u1BBC\u1BBD\u61B7;\u693Cy\u0180evw\u1BC7\u1BD4\u1BD8q\u0270\u1BCE\0\0\u1BD2re\xE3\u1B73u\xE3\u1B75ee;\u62CEedge;\u62CFen\u803B\xA4\u40A4earrow\u0100lr\u1BEE\u1BF3eft\xBB\u1B80ight\xBB\u1BBDe\xE4\u1BDD\u0100ci\u1C01\u1C07onin\xF4\u01F7nt;\u6231lcty;\u632D\u0980AHabcdefhijlorstuwz\u1C38\u1C3B\u1C3F\u1C5D\u1C69\u1C75\u1C8A\u1C9E\u1CAC\u1CB7\u1CFB\u1CFF\u1D0D\u1D7B\u1D91\u1DAB\u1DBB\u1DC6\u1DCDr\xF2\u0381ar;\u6965\u0200glrs\u1C48\u1C4D\u1C52\u1C54ger;\u6020eth;\u6138\xF2\u1133h\u0100;v\u1C5A\u1C5B\u6010\xBB\u090A\u016B\u1C61\u1C67arow;\u690Fa\xE3\u0315\u0100ay\u1C6E\u1C73ron;\u410F;\u4434\u0180;ao\u0332\u1C7C\u1C84\u0100gr\u02BF\u1C81r;\u61CAtseq;\u6A77\u0180glm\u1C91\u1C94\u1C98\u803B\xB0\u40B0ta;\u43B4ptyv;\u69B1\u0100ir\u1CA3\u1CA8sht;\u697F;\uC000\u{1D521}ar\u0100lr\u1CB3\u1CB5\xBB\u08DC\xBB\u101E\u0280aegsv\u1CC2\u0378\u1CD6\u1CDC\u1CE0m\u0180;os\u0326\u1CCA\u1CD4nd\u0100;s\u0326\u1CD1uit;\u6666amma;\u43DDin;\u62F2\u0180;io\u1CE7\u1CE8\u1CF8\u40F7de\u8100\xF7;o\u1CE7\u1CF0ntimes;\u62C7n\xF8\u1CF7cy;\u4452c\u026F\u1D06\0\0\u1D0Arn;\u631Eop;\u630D\u0280lptuw\u1D18\u1D1D\u1D22\u1D49\u1D55lar;\u4024f;\uC000\u{1D555}\u0280;emps\u030B\u1D2D\u1D37\u1D3D\u1D42q\u0100;d\u0352\u1D33ot;\u6251inus;\u6238lus;\u6214quare;\u62A1blebarwedg\xE5\xFAn\u0180adh\u112E\u1D5D\u1D67ownarrow\xF3\u1C83arpoon\u0100lr\u1D72\u1D76ef\xF4\u1CB4igh\xF4\u1CB6\u0162\u1D7F\u1D85karo\xF7\u0F42\u026F\u1D8A\0\0\u1D8Ern;\u631Fop;\u630C\u0180cot\u1D98\u1DA3\u1DA6\u0100ry\u1D9D\u1DA1;\uC000\u{1D4B9};\u4455l;\u69F6rok;\u4111\u0100dr\u1DB0\u1DB4ot;\u62F1i\u0100;f\u1DBA\u1816\u65BF\u0100ah\u1DC0\u1DC3r\xF2\u0429a\xF2\u0FA6angle;\u69A6\u0100ci\u1DD2\u1DD5y;\u445Fgrarr;\u67FF\u0900Dacdefglmnopqrstux\u1E01\u1E09\u1E19\u1E38\u0578\u1E3C\u1E49\u1E61\u1E7E\u1EA5\u1EAF\u1EBD\u1EE1\u1F2A\u1F37\u1F44\u1F4E\u1F5A\u0100Do\u1E06\u1D34o\xF4\u1C89\u0100cs\u1E0E\u1E14ute\u803B\xE9\u40E9ter;\u6A6E\u0200aioy\u1E22\u1E27\u1E31\u1E36ron;\u411Br\u0100;c\u1E2D\u1E2E\u6256\u803B\xEA\u40EAlon;\u6255;\u444Dot;\u4117\u0100Dr\u1E41\u1E45ot;\u6252;\uC000\u{1D522}\u0180;rs\u1E50\u1E51\u1E57\u6A9Aave\u803B\xE8\u40E8\u0100;d\u1E5C\u1E5D\u6A96ot;\u6A98\u0200;ils\u1E6A\u1E6B\u1E72\u1E74\u6A99nters;\u63E7;\u6113\u0100;d\u1E79\u1E7A\u6A95ot;\u6A97\u0180aps\u1E85\u1E89\u1E97cr;\u4113ty\u0180;sv\u1E92\u1E93\u1E95\u6205et\xBB\u1E93p\u01001;\u1E9D\u1EA4\u0133\u1EA1\u1EA3;\u6004;\u6005\u6003\u0100gs\u1EAA\u1EAC;\u414Bp;\u6002\u0100gp\u1EB4\u1EB8on;\u4119f;\uC000\u{1D556}\u0180als\u1EC4\u1ECE\u1ED2r\u0100;s\u1ECA\u1ECB\u62D5l;\u69E3us;\u6A71i\u0180;lv\u1EDA\u1EDB\u1EDF\u43B5on\xBB\u1EDB;\u43F5\u0200csuv\u1EEA\u1EF3\u1F0B\u1F23\u0100io\u1EEF\u1E31rc\xBB\u1E2E\u0269\u1EF9\0\0\u1EFB\xED\u0548ant\u0100gl\u1F02\u1F06tr\xBB\u1E5Dess\xBB\u1E7A\u0180aei\u1F12\u1F16\u1F1Als;\u403Dst;\u625Fv\u0100;D\u0235\u1F20D;\u6A78parsl;\u69E5\u0100Da\u1F2F\u1F33ot;\u6253rr;\u6971\u0180cdi\u1F3E\u1F41\u1EF8r;\u612Fo\xF4\u0352\u0100ah\u1F49\u1F4B;\u43B7\u803B\xF0\u40F0\u0100mr\u1F53\u1F57l\u803B\xEB\u40EBo;\u60AC\u0180cip\u1F61\u1F64\u1F67l;\u4021s\xF4\u056E\u0100eo\u1F6C\u1F74ctatio\xEE\u0559nential\xE5\u0579\u09E1\u1F92\0\u1F9E\0\u1FA1\u1FA7\0\0\u1FC6\u1FCC\0\u1FD3\0\u1FE6\u1FEA\u2000\0\u2008\u205Allingdotse\xF1\u1E44y;\u4444male;\u6640\u0180ilr\u1FAD\u1FB3\u1FC1lig;\u8000\uFB03\u0269\u1FB9\0\0\u1FBDg;\u8000\uFB00ig;\u8000\uFB04;\uC000\u{1D523}lig;\u8000\uFB01lig;\uC000fj\u0180alt\u1FD9\u1FDC\u1FE1t;\u666Dig;\u8000\uFB02ns;\u65B1of;\u4192\u01F0\u1FEE\0\u1FF3f;\uC000\u{1D557}\u0100ak\u05BF\u1FF7\u0100;v\u1FFC\u1FFD\u62D4;\u6AD9artint;\u6A0D\u0100ao\u200C\u2055\u0100cs\u2011\u2052\u03B1\u201A\u2030\u2038\u2045\u2048\0\u2050\u03B2\u2022\u2025\u2027\u202A\u202C\0\u202E\u803B\xBD\u40BD;\u6153\u803B\xBC\u40BC;\u6155;\u6159;\u615B\u01B3\u2034\0\u2036;\u6154;\u6156\u02B4\u203E\u2041\0\0\u2043\u803B\xBE\u40BE;\u6157;\u615C5;\u6158\u01B6\u204C\0\u204E;\u615A;\u615D8;\u615El;\u6044wn;\u6322cr;\uC000\u{1D4BB}\u0880Eabcdefgijlnorstv\u2082\u2089\u209F\u20A5\u20B0\u20B4\u20F0\u20F5\u20FA\u20FF\u2103\u2112\u2138\u0317\u213E\u2152\u219E\u0100;l\u064D\u2087;\u6A8C\u0180cmp\u2090\u2095\u209Dute;\u41F5ma\u0100;d\u209C\u1CDA\u43B3;\u6A86reve;\u411F\u0100iy\u20AA\u20AErc;\u411D;\u4433ot;\u4121\u0200;lqs\u063E\u0642\u20BD\u20C9\u0180;qs\u063E\u064C\u20C4lan\xF4\u0665\u0200;cdl\u0665\u20D2\u20D5\u20E5c;\u6AA9ot\u0100;o\u20DC\u20DD\u6A80\u0100;l\u20E2\u20E3\u6A82;\u6A84\u0100;e\u20EA\u20ED\uC000\u22DB\uFE00s;\u6A94r;\uC000\u{1D524}\u0100;g\u0673\u061Bmel;\u6137cy;\u4453\u0200;Eaj\u065A\u210C\u210E\u2110;\u6A92;\u6AA5;\u6AA4\u0200Eaes\u211B\u211D\u2129\u2134;\u6269p\u0100;p\u2123\u2124\u6A8Arox\xBB\u2124\u0100;q\u212E\u212F\u6A88\u0100;q\u212E\u211Bim;\u62E7pf;\uC000\u{1D558}\u0100ci\u2143\u2146r;\u610Am\u0180;el\u066B\u214E\u2150;\u6A8E;\u6A90\u8300>;cdlqr\u05EE\u2160\u216A\u216E\u2173\u2179\u0100ci\u2165\u2167;\u6AA7r;\u6A7Aot;\u62D7Par;\u6995uest;\u6A7C\u0280adels\u2184\u216A\u2190\u0656\u219B\u01F0\u2189\0\u218Epro\xF8\u209Er;\u6978q\u0100lq\u063F\u2196les\xF3\u2088i\xED\u066B\u0100en\u21A3\u21ADrtneqq;\uC000\u2269\uFE00\xC5\u21AA\u0500Aabcefkosy\u21C4\u21C7\u21F1\u21F5\u21FA\u2218\u221D\u222F\u2268\u227Dr\xF2\u03A0\u0200ilmr\u21D0\u21D4\u21D7\u21DBrs\xF0\u1484f\xBB\u2024il\xF4\u06A9\u0100dr\u21E0\u21E4cy;\u444A\u0180;cw\u08F4\u21EB\u21EFir;\u6948;\u61ADar;\u610Firc;\u4125\u0180alr\u2201\u220E\u2213rts\u0100;u\u2209\u220A\u6665it\xBB\u220Alip;\u6026con;\u62B9r;\uC000\u{1D525}s\u0100ew\u2223\u2229arow;\u6925arow;\u6926\u0280amopr\u223A\u223E\u2243\u225E\u2263rr;\u61FFtht;\u623Bk\u0100lr\u2249\u2253eftarrow;\u61A9ightarrow;\u61AAf;\uC000\u{1D559}bar;\u6015\u0180clt\u226F\u2274\u2278r;\uC000\u{1D4BD}as\xE8\u21F4rok;\u4127\u0100bp\u2282\u2287ull;\u6043hen\xBB\u1C5B\u0AE1\u22A3\0\u22AA\0\u22B8\u22C5\u22CE\0\u22D5\u22F3\0\0\u22F8\u2322\u2367\u2362\u237F\0\u2386\u23AA\u23B4cute\u803B\xED\u40ED\u0180;iy\u0771\u22B0\u22B5rc\u803B\xEE\u40EE;\u4438\u0100cx\u22BC\u22BFy;\u4435cl\u803B\xA1\u40A1\u0100fr\u039F\u22C9;\uC000\u{1D526}rave\u803B\xEC\u40EC\u0200;ino\u073E\u22DD\u22E9\u22EE\u0100in\u22E2\u22E6nt;\u6A0Ct;\u622Dfin;\u69DCta;\u6129lig;\u4133\u0180aop\u22FE\u231A\u231D\u0180cgt\u2305\u2308\u2317r;\u412B\u0180elp\u071F\u230F\u2313in\xE5\u078Ear\xF4\u0720h;\u4131f;\u62B7ed;\u41B5\u0280;cfot\u04F4\u232C\u2331\u233D\u2341are;\u6105in\u0100;t\u2338\u2339\u621Eie;\u69DDdo\xF4\u2319\u0280;celp\u0757\u234C\u2350\u235B\u2361al;\u62BA\u0100gr\u2355\u2359er\xF3\u1563\xE3\u234Darhk;\u6A17rod;\u6A3C\u0200cgpt\u236F\u2372\u2376\u237By;\u4451on;\u412Ff;\uC000\u{1D55A}a;\u43B9uest\u803B\xBF\u40BF\u0100ci\u238A\u238Fr;\uC000\u{1D4BE}n\u0280;Edsv\u04F4\u239B\u239D\u23A1\u04F3;\u62F9ot;\u62F5\u0100;v\u23A6\u23A7\u62F4;\u62F3\u0100;i\u0777\u23AElde;\u4129\u01EB\u23B8\0\u23BCcy;\u4456l\u803B\xEF\u40EF\u0300cfmosu\u23CC\u23D7\u23DC\u23E1\u23E7\u23F5\u0100iy\u23D1\u23D5rc;\u4135;\u4439r;\uC000\u{1D527}ath;\u4237pf;\uC000\u{1D55B}\u01E3\u23EC\0\u23F1r;\uC000\u{1D4BF}rcy;\u4458kcy;\u4454\u0400acfghjos\u240B\u2416\u2422\u2427\u242D\u2431\u2435\u243Bppa\u0100;v\u2413\u2414\u43BA;\u43F0\u0100ey\u241B\u2420dil;\u4137;\u443Ar;\uC000\u{1D528}reen;\u4138cy;\u4445cy;\u445Cpf;\uC000\u{1D55C}cr;\uC000\u{1D4C0}\u0B80ABEHabcdefghjlmnoprstuv\u2470\u2481\u2486\u248D\u2491\u250E\u253D\u255A\u2580\u264E\u265E\u2665\u2679\u267D\u269A\u26B2\u26D8\u275D\u2768\u278B\u27C0\u2801\u2812\u0180art\u2477\u247A\u247Cr\xF2\u09C6\xF2\u0395ail;\u691Barr;\u690E\u0100;g\u0994\u248B;\u6A8Bar;\u6962\u0963\u24A5\0\u24AA\0\u24B1\0\0\0\0\0\u24B5\u24BA\0\u24C6\u24C8\u24CD\0\u24F9ute;\u413Amptyv;\u69B4ra\xEE\u084Cbda;\u43BBg\u0180;dl\u088E\u24C1\u24C3;\u6991\xE5\u088E;\u6A85uo\u803B\xAB\u40ABr\u0400;bfhlpst\u0899\u24DE\u24E6\u24E9\u24EB\u24EE\u24F1\u24F5\u0100;f\u089D\u24E3s;\u691Fs;\u691D\xEB\u2252p;\u61ABl;\u6939im;\u6973l;\u61A2\u0180;ae\u24FF\u2500\u2504\u6AABil;\u6919\u0100;s\u2509\u250A\u6AAD;\uC000\u2AAD\uFE00\u0180abr\u2515\u2519\u251Drr;\u690Crk;\u6772\u0100ak\u2522\u252Cc\u0100ek\u2528\u252A;\u407B;\u405B\u0100es\u2531\u2533;\u698Bl\u0100du\u2539\u253B;\u698F;\u698D\u0200aeuy\u2546\u254B\u2556\u2558ron;\u413E\u0100di\u2550\u2554il;\u413C\xEC\u08B0\xE2\u2529;\u443B\u0200cqrs\u2563\u2566\u256D\u257Da;\u6936uo\u0100;r\u0E19\u1746\u0100du\u2572\u2577har;\u6967shar;\u694Bh;\u61B2\u0280;fgqs\u258B\u258C\u0989\u25F3\u25FF\u6264t\u0280ahlrt\u2598\u25A4\u25B7\u25C2\u25E8rrow\u0100;t\u0899\u25A1a\xE9\u24F6arpoon\u0100du\u25AF\u25B4own\xBB\u045Ap\xBB\u0966eftarrows;\u61C7ight\u0180ahs\u25CD\u25D6\u25DErrow\u0100;s\u08F4\u08A7arpoon\xF3\u0F98quigarro\xF7\u21F0hreetimes;\u62CB\u0180;qs\u258B\u0993\u25FAlan\xF4\u09AC\u0280;cdgs\u09AC\u260A\u260D\u261D\u2628c;\u6AA8ot\u0100;o\u2614\u2615\u6A7F\u0100;r\u261A\u261B\u6A81;\u6A83\u0100;e\u2622\u2625\uC000\u22DA\uFE00s;\u6A93\u0280adegs\u2633\u2639\u263D\u2649\u264Bppro\xF8\u24C6ot;\u62D6q\u0100gq\u2643\u2645\xF4\u0989gt\xF2\u248C\xF4\u099Bi\xED\u09B2\u0180ilr\u2655\u08E1\u265Asht;\u697C;\uC000\u{1D529}\u0100;E\u099C\u2663;\u6A91\u0161\u2669\u2676r\u0100du\u25B2\u266E\u0100;l\u0965\u2673;\u696Alk;\u6584cy;\u4459\u0280;acht\u0A48\u2688\u268B\u2691\u2696r\xF2\u25C1orne\xF2\u1D08ard;\u696Bri;\u65FA\u0100io\u269F\u26A4dot;\u4140ust\u0100;a\u26AC\u26AD\u63B0che\xBB\u26AD\u0200Eaes\u26BB\u26BD\u26C9\u26D4;\u6268p\u0100;p\u26C3\u26C4\u6A89rox\xBB\u26C4\u0100;q\u26CE\u26CF\u6A87\u0100;q\u26CE\u26BBim;\u62E6\u0400abnoptwz\u26E9\u26F4\u26F7\u271A\u272F\u2741\u2747\u2750\u0100nr\u26EE\u26F1g;\u67ECr;\u61FDr\xEB\u08C1g\u0180lmr\u26FF\u270D\u2714eft\u0100ar\u09E6\u2707ight\xE1\u09F2apsto;\u67FCight\xE1\u09FDparrow\u0100lr\u2725\u2729ef\xF4\u24EDight;\u61AC\u0180afl\u2736\u2739\u273Dr;\u6985;\uC000\u{1D55D}us;\u6A2Dimes;\u6A34\u0161\u274B\u274Fst;\u6217\xE1\u134E\u0180;ef\u2757\u2758\u1800\u65CAnge\xBB\u2758ar\u0100;l\u2764\u2765\u4028t;\u6993\u0280achmt\u2773\u2776\u277C\u2785\u2787r\xF2\u08A8orne\xF2\u1D8Car\u0100;d\u0F98\u2783;\u696D;\u600Eri;\u62BF\u0300achiqt\u2798\u279D\u0A40\u27A2\u27AE\u27BBquo;\u6039r;\uC000\u{1D4C1}m\u0180;eg\u09B2\u27AA\u27AC;\u6A8D;\u6A8F\u0100bu\u252A\u27B3o\u0100;r\u0E1F\u27B9;\u601Arok;\u4142\u8400<;cdhilqr\u082B\u27D2\u2639\u27DC\u27E0\u27E5\u27EA\u27F0\u0100ci\u27D7\u27D9;\u6AA6r;\u6A79re\xE5\u25F2mes;\u62C9arr;\u6976uest;\u6A7B\u0100Pi\u27F5\u27F9ar;\u6996\u0180;ef\u2800\u092D\u181B\u65C3r\u0100du\u2807\u280Dshar;\u694Ahar;\u6966\u0100en\u2817\u2821rtneqq;\uC000\u2268\uFE00\xC5\u281E\u0700Dacdefhilnopsu\u2840\u2845\u2882\u288E\u2893\u28A0\u28A5\u28A8\u28DA\u28E2\u28E4\u0A83\u28F3\u2902Dot;\u623A\u0200clpr\u284E\u2852\u2863\u287Dr\u803B\xAF\u40AF\u0100et\u2857\u2859;\u6642\u0100;e\u285E\u285F\u6720se\xBB\u285F\u0100;s\u103B\u2868to\u0200;dlu\u103B\u2873\u2877\u287Bow\xEE\u048Cef\xF4\u090F\xF0\u13D1ker;\u65AE\u0100oy\u2887\u288Cmma;\u6A29;\u443Cash;\u6014asuredangle\xBB\u1626r;\uC000\u{1D52A}o;\u6127\u0180cdn\u28AF\u28B4\u28C9ro\u803B\xB5\u40B5\u0200;acd\u1464\u28BD\u28C0\u28C4s\xF4\u16A7ir;\u6AF0ot\u80BB\xB7\u01B5us\u0180;bd\u28D2\u1903\u28D3\u6212\u0100;u\u1D3C\u28D8;\u6A2A\u0163\u28DE\u28E1p;\u6ADB\xF2\u2212\xF0\u0A81\u0100dp\u28E9\u28EEels;\u62A7f;\uC000\u{1D55E}\u0100ct\u28F8\u28FDr;\uC000\u{1D4C2}pos\xBB\u159D\u0180;lm\u2909\u290A\u290D\u43BCtimap;\u62B8\u0C00GLRVabcdefghijlmoprstuvw\u2942\u2953\u297E\u2989\u2998\u29DA\u29E9\u2A15\u2A1A\u2A58\u2A5D\u2A83\u2A95\u2AA4\u2AA8\u2B04\u2B07\u2B44\u2B7F\u2BAE\u2C34\u2C67\u2C7C\u2CE9\u0100gt\u2947\u294B;\uC000\u22D9\u0338\u0100;v\u2950\u0BCF\uC000\u226B\u20D2\u0180elt\u295A\u2972\u2976ft\u0100ar\u2961\u2967rrow;\u61CDightarrow;\u61CE;\uC000\u22D8\u0338\u0100;v\u297B\u0C47\uC000\u226A\u20D2ightarrow;\u61CF\u0100Dd\u298E\u2993ash;\u62AFash;\u62AE\u0280bcnpt\u29A3\u29A7\u29AC\u29B1\u29CCla\xBB\u02DEute;\u4144g;\uC000\u2220\u20D2\u0280;Eiop\u0D84\u29BC\u29C0\u29C5\u29C8;\uC000\u2A70\u0338d;\uC000\u224B\u0338s;\u4149ro\xF8\u0D84ur\u0100;a\u29D3\u29D4\u666El\u0100;s\u29D3\u0B38\u01F3\u29DF\0\u29E3p\u80BB\xA0\u0B37mp\u0100;e\u0BF9\u0C00\u0280aeouy\u29F4\u29FE\u2A03\u2A10\u2A13\u01F0\u29F9\0\u29FB;\u6A43on;\u4148dil;\u4146ng\u0100;d\u0D7E\u2A0Aot;\uC000\u2A6D\u0338p;\u6A42;\u443Dash;\u6013\u0380;Aadqsx\u0B92\u2A29\u2A2D\u2A3B\u2A41\u2A45\u2A50rr;\u61D7r\u0100hr\u2A33\u2A36k;\u6924\u0100;o\u13F2\u13F0ot;\uC000\u2250\u0338ui\xF6\u0B63\u0100ei\u2A4A\u2A4Ear;\u6928\xED\u0B98ist\u0100;s\u0BA0\u0B9Fr;\uC000\u{1D52B}\u0200Eest\u0BC5\u2A66\u2A79\u2A7C\u0180;qs\u0BBC\u2A6D\u0BE1\u0180;qs\u0BBC\u0BC5\u2A74lan\xF4\u0BE2i\xED\u0BEA\u0100;r\u0BB6\u2A81\xBB\u0BB7\u0180Aap\u2A8A\u2A8D\u2A91r\xF2\u2971rr;\u61AEar;\u6AF2\u0180;sv\u0F8D\u2A9C\u0F8C\u0100;d\u2AA1\u2AA2\u62FC;\u62FAcy;\u445A\u0380AEadest\u2AB7\u2ABA\u2ABE\u2AC2\u2AC5\u2AF6\u2AF9r\xF2\u2966;\uC000\u2266\u0338rr;\u619Ar;\u6025\u0200;fqs\u0C3B\u2ACE\u2AE3\u2AEFt\u0100ar\u2AD4\u2AD9rro\xF7\u2AC1ightarro\xF7\u2A90\u0180;qs\u0C3B\u2ABA\u2AEAlan\xF4\u0C55\u0100;s\u0C55\u2AF4\xBB\u0C36i\xED\u0C5D\u0100;r\u0C35\u2AFEi\u0100;e\u0C1A\u0C25i\xE4\u0D90\u0100pt\u2B0C\u2B11f;\uC000\u{1D55F}\u8180\xAC;in\u2B19\u2B1A\u2B36\u40ACn\u0200;Edv\u0B89\u2B24\u2B28\u2B2E;\uC000\u22F9\u0338ot;\uC000\u22F5\u0338\u01E1\u0B89\u2B33\u2B35;\u62F7;\u62F6i\u0100;v\u0CB8\u2B3C\u01E1\u0CB8\u2B41\u2B43;\u62FE;\u62FD\u0180aor\u2B4B\u2B63\u2B69r\u0200;ast\u0B7B\u2B55\u2B5A\u2B5Flle\xEC\u0B7Bl;\uC000\u2AFD\u20E5;\uC000\u2202\u0338lint;\u6A14\u0180;ce\u0C92\u2B70\u2B73u\xE5\u0CA5\u0100;c\u0C98\u2B78\u0100;e\u0C92\u2B7D\xF1\u0C98\u0200Aait\u2B88\u2B8B\u2B9D\u2BA7r\xF2\u2988rr\u0180;cw\u2B94\u2B95\u2B99\u619B;\uC000\u2933\u0338;\uC000\u219D\u0338ghtarrow\xBB\u2B95ri\u0100;e\u0CCB\u0CD6\u0380chimpqu\u2BBD\u2BCD\u2BD9\u2B04\u0B78\u2BE4\u2BEF\u0200;cer\u0D32\u2BC6\u0D37\u2BC9u\xE5\u0D45;\uC000\u{1D4C3}ort\u026D\u2B05\0\0\u2BD6ar\xE1\u2B56m\u0100;e\u0D6E\u2BDF\u0100;q\u0D74\u0D73su\u0100bp\u2BEB\u2BED\xE5\u0CF8\xE5\u0D0B\u0180bcp\u2BF6\u2C11\u2C19\u0200;Ees\u2BFF\u2C00\u0D22\u2C04\u6284;\uC000\u2AC5\u0338et\u0100;e\u0D1B\u2C0Bq\u0100;q\u0D23\u2C00c\u0100;e\u0D32\u2C17\xF1\u0D38\u0200;Ees\u2C22\u2C23\u0D5F\u2C27\u6285;\uC000\u2AC6\u0338et\u0100;e\u0D58\u2C2Eq\u0100;q\u0D60\u2C23\u0200gilr\u2C3D\u2C3F\u2C45\u2C47\xEC\u0BD7lde\u803B\xF1\u40F1\xE7\u0C43iangle\u0100lr\u2C52\u2C5Ceft\u0100;e\u0C1A\u2C5A\xF1\u0C26ight\u0100;e\u0CCB\u2C65\xF1\u0CD7\u0100;m\u2C6C\u2C6D\u43BD\u0180;es\u2C74\u2C75\u2C79\u4023ro;\u6116p;\u6007\u0480DHadgilrs\u2C8F\u2C94\u2C99\u2C9E\u2CA3\u2CB0\u2CB6\u2CD3\u2CE3ash;\u62ADarr;\u6904p;\uC000\u224D\u20D2ash;\u62AC\u0100et\u2CA8\u2CAC;\uC000\u2265\u20D2;\uC000>\u20D2nfin;\u69DE\u0180Aet\u2CBD\u2CC1\u2CC5rr;\u6902;\uC000\u2264\u20D2\u0100;r\u2CCA\u2CCD\uC000<\u20D2ie;\uC000\u22B4\u20D2\u0100At\u2CD8\u2CDCrr;\u6903rie;\uC000\u22B5\u20D2im;\uC000\u223C\u20D2\u0180Aan\u2CF0\u2CF4\u2D02rr;\u61D6r\u0100hr\u2CFA\u2CFDk;\u6923\u0100;o\u13E7\u13E5ear;\u6927\u1253\u1A95\0\0\0\0\0\0\0\0\0\0\0\0\0\u2D2D\0\u2D38\u2D48\u2D60\u2D65\u2D72\u2D84\u1B07\0\0\u2D8D\u2DAB\0\u2DC8\u2DCE\0\u2DDC\u2E19\u2E2B\u2E3E\u2E43\u0100cs\u2D31\u1A97ute\u803B\xF3\u40F3\u0100iy\u2D3C\u2D45r\u0100;c\u1A9E\u2D42\u803B\xF4\u40F4;\u443E\u0280abios\u1AA0\u2D52\u2D57\u01C8\u2D5Alac;\u4151v;\u6A38old;\u69BClig;\u4153\u0100cr\u2D69\u2D6Dir;\u69BF;\uC000\u{1D52C}\u036F\u2D79\0\0\u2D7C\0\u2D82n;\u42DBave\u803B\xF2\u40F2;\u69C1\u0100bm\u2D88\u0DF4ar;\u69B5\u0200acit\u2D95\u2D98\u2DA5\u2DA8r\xF2\u1A80\u0100ir\u2D9D\u2DA0r;\u69BEoss;\u69BBn\xE5\u0E52;\u69C0\u0180aei\u2DB1\u2DB5\u2DB9cr;\u414Dga;\u43C9\u0180cdn\u2DC0\u2DC5\u01CDron;\u43BF;\u69B6pf;\uC000\u{1D560}\u0180ael\u2DD4\u2DD7\u01D2r;\u69B7rp;\u69B9\u0380;adiosv\u2DEA\u2DEB\u2DEE\u2E08\u2E0D\u2E10\u2E16\u6228r\xF2\u1A86\u0200;efm\u2DF7\u2DF8\u2E02\u2E05\u6A5Dr\u0100;o\u2DFE\u2DFF\u6134f\xBB\u2DFF\u803B\xAA\u40AA\u803B\xBA\u40BAgof;\u62B6r;\u6A56lope;\u6A57;\u6A5B\u0180clo\u2E1F\u2E21\u2E27\xF2\u2E01ash\u803B\xF8\u40F8l;\u6298i\u016C\u2E2F\u2E34de\u803B\xF5\u40F5es\u0100;a\u01DB\u2E3As;\u6A36ml\u803B\xF6\u40F6bar;\u633D\u0AE1\u2E5E\0\u2E7D\0\u2E80\u2E9D\0\u2EA2\u2EB9\0\0\u2ECB\u0E9C\0\u2F13\0\0\u2F2B\u2FBC\0\u2FC8r\u0200;ast\u0403\u2E67\u2E72\u0E85\u8100\xB6;l\u2E6D\u2E6E\u40B6le\xEC\u0403\u0269\u2E78\0\0\u2E7Bm;\u6AF3;\u6AFDy;\u443Fr\u0280cimpt\u2E8B\u2E8F\u2E93\u1865\u2E97nt;\u4025od;\u402Eil;\u6030enk;\u6031r;\uC000\u{1D52D}\u0180imo\u2EA8\u2EB0\u2EB4\u0100;v\u2EAD\u2EAE\u43C6;\u43D5ma\xF4\u0A76ne;\u660E\u0180;tv\u2EBF\u2EC0\u2EC8\u43C0chfork\xBB\u1FFD;\u43D6\u0100au\u2ECF\u2EDFn\u0100ck\u2ED5\u2EDDk\u0100;h\u21F4\u2EDB;\u610E\xF6\u21F4s\u0480;abcdemst\u2EF3\u2EF4\u1908\u2EF9\u2EFD\u2F04\u2F06\u2F0A\u2F0E\u402Bcir;\u6A23ir;\u6A22\u0100ou\u1D40\u2F02;\u6A25;\u6A72n\u80BB\xB1\u0E9Dim;\u6A26wo;\u6A27\u0180ipu\u2F19\u2F20\u2F25ntint;\u6A15f;\uC000\u{1D561}nd\u803B\xA3\u40A3\u0500;Eaceinosu\u0EC8\u2F3F\u2F41\u2F44\u2F47\u2F81\u2F89\u2F92\u2F7E\u2FB6;\u6AB3p;\u6AB7u\xE5\u0ED9\u0100;c\u0ECE\u2F4C\u0300;acens\u0EC8\u2F59\u2F5F\u2F66\u2F68\u2F7Eppro\xF8\u2F43urlye\xF1\u0ED9\xF1\u0ECE\u0180aes\u2F6F\u2F76\u2F7Approx;\u6AB9qq;\u6AB5im;\u62E8i\xED\u0EDFme\u0100;s\u2F88\u0EAE\u6032\u0180Eas\u2F78\u2F90\u2F7A\xF0\u2F75\u0180dfp\u0EEC\u2F99\u2FAF\u0180als\u2FA0\u2FA5\u2FAAlar;\u632Eine;\u6312urf;\u6313\u0100;t\u0EFB\u2FB4\xEF\u0EFBrel;\u62B0\u0100ci\u2FC0\u2FC5r;\uC000\u{1D4C5};\u43C8ncsp;\u6008\u0300fiopsu\u2FDA\u22E2\u2FDF\u2FE5\u2FEB\u2FF1r;\uC000\u{1D52E}pf;\uC000\u{1D562}rime;\u6057cr;\uC000\u{1D4C6}\u0180aeo\u2FF8\u3009\u3013t\u0100ei\u2FFE\u3005rnion\xF3\u06B0nt;\u6A16st\u0100;e\u3010\u3011\u403F\xF1\u1F19\xF4\u0F14\u0A80ABHabcdefhilmnoprstux\u3040\u3051\u3055\u3059\u30E0\u310E\u312B\u3147\u3162\u3172\u318E\u3206\u3215\u3224\u3229\u3258\u326E\u3272\u3290\u32B0\u32B7\u0180art\u3047\u304A\u304Cr\xF2\u10B3\xF2\u03DDail;\u691Car\xF2\u1C65ar;\u6964\u0380cdenqrt\u3068\u3075\u3078\u307F\u308F\u3094\u30CC\u0100eu\u306D\u3071;\uC000\u223D\u0331te;\u4155i\xE3\u116Emptyv;\u69B3g\u0200;del\u0FD1\u3089\u308B\u308D;\u6992;\u69A5\xE5\u0FD1uo\u803B\xBB\u40BBr\u0580;abcfhlpstw\u0FDC\u30AC\u30AF\u30B7\u30B9\u30BC\u30BE\u30C0\u30C3\u30C7\u30CAp;\u6975\u0100;f\u0FE0\u30B4s;\u6920;\u6933s;\u691E\xEB\u225D\xF0\u272El;\u6945im;\u6974l;\u61A3;\u619D\u0100ai\u30D1\u30D5il;\u691Ao\u0100;n\u30DB\u30DC\u6236al\xF3\u0F1E\u0180abr\u30E7\u30EA\u30EEr\xF2\u17E5rk;\u6773\u0100ak\u30F3\u30FDc\u0100ek\u30F9\u30FB;\u407D;\u405D\u0100es\u3102\u3104;\u698Cl\u0100du\u310A\u310C;\u698E;\u6990\u0200aeuy\u3117\u311C\u3127\u3129ron;\u4159\u0100di\u3121\u3125il;\u4157\xEC\u0FF2\xE2\u30FA;\u4440\u0200clqs\u3134\u3137\u313D\u3144a;\u6937dhar;\u6969uo\u0100;r\u020E\u020Dh;\u61B3\u0180acg\u314E\u315F\u0F44l\u0200;ips\u0F78\u3158\u315B\u109Cn\xE5\u10BBar\xF4\u0FA9t;\u65AD\u0180ilr\u3169\u1023\u316Esht;\u697D;\uC000\u{1D52F}\u0100ao\u3177\u3186r\u0100du\u317D\u317F\xBB\u047B\u0100;l\u1091\u3184;\u696C\u0100;v\u318B\u318C\u43C1;\u43F1\u0180gns\u3195\u31F9\u31FCht\u0300ahlrst\u31A4\u31B0\u31C2\u31D8\u31E4\u31EErrow\u0100;t\u0FDC\u31ADa\xE9\u30C8arpoon\u0100du\u31BB\u31BFow\xEE\u317Ep\xBB\u1092eft\u0100ah\u31CA\u31D0rrow\xF3\u0FEAarpoon\xF3\u0551ightarrows;\u61C9quigarro\xF7\u30CBhreetimes;\u62CCg;\u42DAingdotse\xF1\u1F32\u0180ahm\u320D\u3210\u3213r\xF2\u0FEAa\xF2\u0551;\u600Foust\u0100;a\u321E\u321F\u63B1che\xBB\u321Fmid;\u6AEE\u0200abpt\u3232\u323D\u3240\u3252\u0100nr\u3237\u323Ag;\u67EDr;\u61FEr\xEB\u1003\u0180afl\u3247\u324A\u324Er;\u6986;\uC000\u{1D563}us;\u6A2Eimes;\u6A35\u0100ap\u325D\u3267r\u0100;g\u3263\u3264\u4029t;\u6994olint;\u6A12ar\xF2\u31E3\u0200achq\u327B\u3280\u10BC\u3285quo;\u603Ar;\uC000\u{1D4C7}\u0100bu\u30FB\u328Ao\u0100;r\u0214\u0213\u0180hir\u3297\u329B\u32A0re\xE5\u31F8mes;\u62CAi\u0200;efl\u32AA\u1059\u1821\u32AB\u65B9tri;\u69CEluhar;\u6968;\u611E\u0D61\u32D5\u32DB\u32DF\u332C\u3338\u3371\0\u337A\u33A4\0\0\u33EC\u33F0\0\u3428\u3448\u345A\u34AD\u34B1\u34CA\u34F1\0\u3616\0\0\u3633cute;\u415Bqu\xEF\u27BA\u0500;Eaceinpsy\u11ED\u32F3\u32F5\u32FF\u3302\u330B\u330F\u331F\u3326\u3329;\u6AB4\u01F0\u32FA\0\u32FC;\u6AB8on;\u4161u\xE5\u11FE\u0100;d\u11F3\u3307il;\u415Frc;\u415D\u0180Eas\u3316\u3318\u331B;\u6AB6p;\u6ABAim;\u62E9olint;\u6A13i\xED\u1204;\u4441ot\u0180;be\u3334\u1D47\u3335\u62C5;\u6A66\u0380Aacmstx\u3346\u334A\u3357\u335B\u335E\u3363\u336Drr;\u61D8r\u0100hr\u3350\u3352\xEB\u2228\u0100;o\u0A36\u0A34t\u803B\xA7\u40A7i;\u403Bwar;\u6929m\u0100in\u3369\xF0nu\xF3\xF1t;\u6736r\u0100;o\u3376\u2055\uC000\u{1D530}\u0200acoy\u3382\u3386\u3391\u33A0rp;\u666F\u0100hy\u338B\u338Fcy;\u4449;\u4448rt\u026D\u3399\0\0\u339Ci\xE4\u1464ara\xEC\u2E6F\u803B\xAD\u40AD\u0100gm\u33A8\u33B4ma\u0180;fv\u33B1\u33B2\u33B2\u43C3;\u43C2\u0400;deglnpr\u12AB\u33C5\u33C9\u33CE\u33D6\u33DE\u33E1\u33E6ot;\u6A6A\u0100;q\u12B1\u12B0\u0100;E\u33D3\u33D4\u6A9E;\u6AA0\u0100;E\u33DB\u33DC\u6A9D;\u6A9Fe;\u6246lus;\u6A24arr;\u6972ar\xF2\u113D\u0200aeit\u33F8\u3408\u340F\u3417\u0100ls\u33FD\u3404lsetm\xE9\u336Ahp;\u6A33parsl;\u69E4\u0100dl\u1463\u3414e;\u6323\u0100;e\u341C\u341D\u6AAA\u0100;s\u3422\u3423\u6AAC;\uC000\u2AAC\uFE00\u0180flp\u342E\u3433\u3442tcy;\u444C\u0100;b\u3438\u3439\u402F\u0100;a\u343E\u343F\u69C4r;\u633Ff;\uC000\u{1D564}a\u0100dr\u344D\u0402es\u0100;u\u3454\u3455\u6660it\xBB\u3455\u0180csu\u3460\u3479\u349F\u0100au\u3465\u346Fp\u0100;s\u1188\u346B;\uC000\u2293\uFE00p\u0100;s\u11B4\u3475;\uC000\u2294\uFE00u\u0100bp\u347F\u348F\u0180;es\u1197\u119C\u3486et\u0100;e\u1197\u348D\xF1\u119D\u0180;es\u11A8\u11AD\u3496et\u0100;e\u11A8\u349D\xF1\u11AE\u0180;af\u117B\u34A6\u05B0r\u0165\u34AB\u05B1\xBB\u117Car\xF2\u1148\u0200cemt\u34B9\u34BE\u34C2\u34C5r;\uC000\u{1D4C8}tm\xEE\xF1i\xEC\u3415ar\xE6\u11BE\u0100ar\u34CE\u34D5r\u0100;f\u34D4\u17BF\u6606\u0100an\u34DA\u34EDight\u0100ep\u34E3\u34EApsilo\xEE\u1EE0h\xE9\u2EAFs\xBB\u2852\u0280bcmnp\u34FB\u355E\u1209\u358B\u358E\u0480;Edemnprs\u350E\u350F\u3511\u3515\u351E\u3523\u352C\u3531\u3536\u6282;\u6AC5ot;\u6ABD\u0100;d\u11DA\u351Aot;\u6AC3ult;\u6AC1\u0100Ee\u3528\u352A;\u6ACB;\u628Alus;\u6ABFarr;\u6979\u0180eiu\u353D\u3552\u3555t\u0180;en\u350E\u3545\u354Bq\u0100;q\u11DA\u350Feq\u0100;q\u352B\u3528m;\u6AC7\u0100bp\u355A\u355C;\u6AD5;\u6AD3c\u0300;acens\u11ED\u356C\u3572\u3579\u357B\u3326ppro\xF8\u32FAurlye\xF1\u11FE\xF1\u11F3\u0180aes\u3582\u3588\u331Bppro\xF8\u331Aq\xF1\u3317g;\u666A\u0680123;Edehlmnps\u35A9\u35AC\u35AF\u121C\u35B2\u35B4\u35C0\u35C9\u35D5\u35DA\u35DF\u35E8\u35ED\u803B\xB9\u40B9\u803B\xB2\u40B2\u803B\xB3\u40B3;\u6AC6\u0100os\u35B9\u35BCt;\u6ABEub;\u6AD8\u0100;d\u1222\u35C5ot;\u6AC4s\u0100ou\u35CF\u35D2l;\u67C9b;\u6AD7arr;\u697Bult;\u6AC2\u0100Ee\u35E4\u35E6;\u6ACC;\u628Blus;\u6AC0\u0180eiu\u35F4\u3609\u360Ct\u0180;en\u121C\u35FC\u3602q\u0100;q\u1222\u35B2eq\u0100;q\u35E7\u35E4m;\u6AC8\u0100bp\u3611\u3613;\u6AD4;\u6AD6\u0180Aan\u361C\u3620\u362Drr;\u61D9r\u0100hr\u3626\u3628\xEB\u222E\u0100;o\u0A2B\u0A29war;\u692Alig\u803B\xDF\u40DF\u0BE1\u3651\u365D\u3660\u12CE\u3673\u3679\0\u367E\u36C2\0\0\0\0\0\u36DB\u3703\0\u3709\u376C\0\0\0\u3787\u0272\u3656\0\0\u365Bget;\u6316;\u43C4r\xEB\u0E5F\u0180aey\u3666\u366B\u3670ron;\u4165dil;\u4163;\u4442lrec;\u6315r;\uC000\u{1D531}\u0200eiko\u3686\u369D\u36B5\u36BC\u01F2\u368B\0\u3691e\u01004f\u1284\u1281a\u0180;sv\u3698\u3699\u369B\u43B8ym;\u43D1\u0100cn\u36A2\u36B2k\u0100as\u36A8\u36AEppro\xF8\u12C1im\xBB\u12ACs\xF0\u129E\u0100as\u36BA\u36AE\xF0\u12C1rn\u803B\xFE\u40FE\u01EC\u031F\u36C6\u22E7es\u8180\xD7;bd\u36CF\u36D0\u36D8\u40D7\u0100;a\u190F\u36D5r;\u6A31;\u6A30\u0180eps\u36E1\u36E3\u3700\xE1\u2A4D\u0200;bcf\u0486\u36EC\u36F0\u36F4ot;\u6336ir;\u6AF1\u0100;o\u36F9\u36FC\uC000\u{1D565}rk;\u6ADA\xE1\u3362rime;\u6034\u0180aip\u370F\u3712\u3764d\xE5\u1248\u0380adempst\u3721\u374D\u3740\u3751\u3757\u375C\u375Fngle\u0280;dlqr\u3730\u3731\u3736\u3740\u3742\u65B5own\xBB\u1DBBeft\u0100;e\u2800\u373E\xF1\u092E;\u625Cight\u0100;e\u32AA\u374B\xF1\u105Aot;\u65ECinus;\u6A3Alus;\u6A39b;\u69CDime;\u6A3Bezium;\u63E2\u0180cht\u3772\u377D\u3781\u0100ry\u3777\u377B;\uC000\u{1D4C9};\u4446cy;\u445Brok;\u4167\u0100io\u378B\u378Ex\xF4\u1777head\u0100lr\u3797\u37A0eftarro\xF7\u084Fightarrow\xBB\u0F5D\u0900AHabcdfghlmoprstuw\u37D0\u37D3\u37D7\u37E4\u37F0\u37FC\u380E\u381C\u3823\u3834\u3851\u385D\u386B\u38A9\u38CC\u38D2\u38EA\u38F6r\xF2\u03EDar;\u6963\u0100cr\u37DC\u37E2ute\u803B\xFA\u40FA\xF2\u1150r\u01E3\u37EA\0\u37EDy;\u445Eve;\u416D\u0100iy\u37F5\u37FArc\u803B\xFB\u40FB;\u4443\u0180abh\u3803\u3806\u380Br\xF2\u13ADlac;\u4171a\xF2\u13C3\u0100ir\u3813\u3818sht;\u697E;\uC000\u{1D532}rave\u803B\xF9\u40F9\u0161\u3827\u3831r\u0100lr\u382C\u382E\xBB\u0957\xBB\u1083lk;\u6580\u0100ct\u3839\u384D\u026F\u383F\0\0\u384Arn\u0100;e\u3845\u3846\u631Cr\xBB\u3846op;\u630Fri;\u65F8\u0100al\u3856\u385Acr;\u416B\u80BB\xA8\u0349\u0100gp\u3862\u3866on;\u4173f;\uC000\u{1D566}\u0300adhlsu\u114B\u3878\u387D\u1372\u3891\u38A0own\xE1\u13B3arpoon\u0100lr\u3888\u388Cef\xF4\u382Digh\xF4\u382Fi\u0180;hl\u3899\u389A\u389C\u43C5\xBB\u13FAon\xBB\u389Aparrows;\u61C8\u0180cit\u38B0\u38C4\u38C8\u026F\u38B6\0\0\u38C1rn\u0100;e\u38BC\u38BD\u631Dr\xBB\u38BDop;\u630Eng;\u416Fri;\u65F9cr;\uC000\u{1D4CA}\u0180dir\u38D9\u38DD\u38E2ot;\u62F0lde;\u4169i\u0100;f\u3730\u38E8\xBB\u1813\u0100am\u38EF\u38F2r\xF2\u38A8l\u803B\xFC\u40FCangle;\u69A7\u0780ABDacdeflnoprsz\u391C\u391F\u3929\u392D\u39B5\u39B8\u39BD\u39DF\u39E4\u39E8\u39F3\u39F9\u39FD\u3A01\u3A20r\xF2\u03F7ar\u0100;v\u3926\u3927\u6AE8;\u6AE9as\xE8\u03E1\u0100nr\u3932\u3937grt;\u699C\u0380eknprst\u34E3\u3946\u394B\u3952\u395D\u3964\u3996app\xE1\u2415othin\xE7\u1E96\u0180hir\u34EB\u2EC8\u3959op\xF4\u2FB5\u0100;h\u13B7\u3962\xEF\u318D\u0100iu\u3969\u396Dgm\xE1\u33B3\u0100bp\u3972\u3984setneq\u0100;q\u397D\u3980\uC000\u228A\uFE00;\uC000\u2ACB\uFE00setneq\u0100;q\u398F\u3992\uC000\u228B\uFE00;\uC000\u2ACC\uFE00\u0100hr\u399B\u399Fet\xE1\u369Ciangle\u0100lr\u39AA\u39AFeft\xBB\u0925ight\xBB\u1051y;\u4432ash\xBB\u1036\u0180elr\u39C4\u39D2\u39D7\u0180;be\u2DEA\u39CB\u39CFar;\u62BBq;\u625Alip;\u62EE\u0100bt\u39DC\u1468a\xF2\u1469r;\uC000\u{1D533}tr\xE9\u39AEsu\u0100bp\u39EF\u39F1\xBB\u0D1C\xBB\u0D59pf;\uC000\u{1D567}ro\xF0\u0EFBtr\xE9\u39B4\u0100cu\u3A06\u3A0Br;\uC000\u{1D4CB}\u0100bp\u3A10\u3A18n\u0100Ee\u3980\u3A16\xBB\u397En\u0100Ee\u3992\u3A1E\xBB\u3990igzag;\u699A\u0380cefoprs\u3A36\u3A3B\u3A56\u3A5B\u3A54\u3A61\u3A6Airc;\u4175\u0100di\u3A40\u3A51\u0100bg\u3A45\u3A49ar;\u6A5Fe\u0100;q\u15FA\u3A4F;\u6259erp;\u6118r;\uC000\u{1D534}pf;\uC000\u{1D568}\u0100;e\u1479\u3A66at\xE8\u1479cr;\uC000\u{1D4CC}\u0AE3\u178E\u3A87\0\u3A8B\0\u3A90\u3A9B\0\0\u3A9D\u3AA8\u3AAB\u3AAF\0\0\u3AC3\u3ACE\0\u3AD8\u17DC\u17DFtr\xE9\u17D1r;\uC000\u{1D535}\u0100Aa\u3A94\u3A97r\xF2\u03C3r\xF2\u09F6;\u43BE\u0100Aa\u3AA1\u3AA4r\xF2\u03B8r\xF2\u09EBa\xF0\u2713is;\u62FB\u0180dpt\u17A4\u3AB5\u3ABE\u0100fl\u3ABA\u17A9;\uC000\u{1D569}im\xE5\u17B2\u0100Aa\u3AC7\u3ACAr\xF2\u03CEr\xF2\u0A01\u0100cq\u3AD2\u17B8r;\uC000\u{1D4CD}\u0100pt\u17D6\u3ADCr\xE9\u17D4\u0400acefiosu\u3AF0\u3AFD\u3B08\u3B0C\u3B11\u3B15\u3B1B\u3B21c\u0100uy\u3AF6\u3AFBte\u803B\xFD\u40FD;\u444F\u0100iy\u3B02\u3B06rc;\u4177;\u444Bn\u803B\xA5\u40A5r;\uC000\u{1D536}cy;\u4457pf;\uC000\u{1D56A}cr;\uC000\u{1D4CE}\u0100cm\u3B26\u3B29y;\u444El\u803B\xFF\u40FF\u0500acdefhiosw\u3B42\u3B48\u3B54\u3B58\u3B64\u3B69\u3B6D\u3B74\u3B7A\u3B80cute;\u417A\u0100ay\u3B4D\u3B52ron;\u417E;\u4437ot;\u417C\u0100et\u3B5D\u3B61tr\xE6\u155Fa;\u43B6r;\uC000\u{1D537}cy;\u4436grarr;\u61DDpf;\uC000\u{1D56B}cr;\uC000\u{1D4CF}\u0100jn\u3B85\u3B87;\u600Dj;\u600C'.split("").map(t=>t.charCodeAt(0)));var LY=new Uint16Array("\u0200aglq \x1B\u026D\0\0p;\u4026os;\u4027t;\u403Et;\u403Cuot;\u4022".split("").map(t=>t.charCodeAt(0)));var qL,sDe=new Map([[0,65533],[128,8364],[130,8218],[131,402],[132,8222],[133,8230],[134,8224],[135,8225],[136,710],[137,8240],[138,352],[139,8249],[140,338],[142,381],[145,8216],[146,8217],[147,8220],[148,8221],[149,8226],[150,8211],[151,8212],[152,732],[153,8482],[154,353],[155,8250],[156,339],[158,382],[159,376]]),VL=(qL=String.fromCodePoint)!==null&&qL!==void 0?qL:function(t){let e="";return t>65535&&(t-=65536,e+=String.fromCharCode(t>>>10&1023|55296),t=56320|t&1023),e+=String.fromCharCode(t),e};function HL(t){var e;return t>=55296&&t<=57343||t>1114111?65533:(e=sDe.get(t))!==null&&e!==void 0?e:t}var oi;(function(t){t[t.NUM=35]="NUM",t[t.SEMI=59]="SEMI",t[t.EQUALS=61]="EQUALS",t[t.ZERO=48]="ZERO",t[t.NINE=57]="NINE",t[t.LOWER_A=97]="LOWER_A",t[t.LOWER_F=102]="LOWER_F",t[t.LOWER_X=120]="LOWER_X",t[t.LOWER_Z=122]="LOWER_Z",t[t.UPPER_A=65]="UPPER_A",t[t.UPPER_F=70]="UPPER_F",t[t.UPPER_Z=90]="UPPER_Z"})(oi||(oi={}));var oDe=32,Sf;(function(t){t[t.VALUE_LENGTH=49152]="VALUE_LENGTH",t[t.BRANCH_LENGTH=16256]="BRANCH_LENGTH",t[t.JUMP_TABLE=127]="JUMP_TABLE"})(Sf||(Sf={}));function WL(t){return t>=oi.ZERO&&t<=oi.NINE}function lDe(t){return t>=oi.UPPER_A&&t<=oi.UPPER_F||t>=oi.LOWER_A&&t<=oi.LOWER_F}function uDe(t){return t>=oi.UPPER_A&&t<=oi.UPPER_Z||t>=oi.LOWER_A&&t<=oi.LOWER_Z||WL(t)}function cDe(t){return t===oi.EQUALS||uDe(t)}var si;(function(t){t[t.EntityStart=0]="EntityStart",t[t.NumericStart=1]="NumericStart",t[t.NumericDecimal=2]="NumericDecimal",t[t.NumericHex=3]="NumericHex",t[t.NamedEntity=4]="NamedEntity"})(si||(si={}));var Gl;(function(t){t[t.Legacy=0]="Legacy",t[t.Strict=1]="Strict",t[t.Attribute=2]="Attribute"})(Gl||(Gl={}));var bk=class{constructor(e,r,n){this.decodeTree=e,this.emitCodePoint=r,this.errors=n,this.state=si.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=Gl.Strict}startEntity(e){this.decodeMode=e,this.state=si.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(e,r){switch(this.state){case si.EntityStart:return e.charCodeAt(r)===oi.NUM?(this.state=si.NumericStart,this.consumed+=1,this.stateNumericStart(e,r+1)):(this.state=si.NamedEntity,this.stateNamedEntity(e,r));case si.NumericStart:return this.stateNumericStart(e,r);case si.NumericDecimal:return this.stateNumericDecimal(e,r);case si.NumericHex:return this.stateNumericHex(e,r);case si.NamedEntity:return this.stateNamedEntity(e,r)}}stateNumericStart(e,r){return r>=e.length?-1:(e.charCodeAt(r)|oDe)===oi.LOWER_X?(this.state=si.NumericHex,this.consumed+=1,this.stateNumericHex(e,r+1)):(this.state=si.NumericDecimal,this.stateNumericDecimal(e,r))}addToNumericResult(e,r,n,a){if(r!==n){let i=n-r;this.result=this.result*Math.pow(a,i)+parseInt(e.substr(r,i),a),this.consumed+=i}}stateNumericHex(e,r){let n=r;for(;r>14;for(;r>14,i!==0){if(s===oi.SEMI)return this.emitNamedEntityData(this.treeIndex,i,this.consumed+this.excess);this.decodeMode!==Gl.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1}emitNotTerminatedNamedEntity(){var e;let{result:r,decodeTree:n}=this,a=(n[r]&Sf.VALUE_LENGTH)>>14;return this.emitNamedEntityData(r,a,this.consumed),(e=this.errors)===null||e===void 0||e.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(e,r,n){let{decodeTree:a}=this;return this.emitCodePoint(r===1?a[e]&~Sf.VALUE_LENGTH:a[e+1],n),r===3&&this.emitCodePoint(a[e+2],n),n}end(){var e;switch(this.state){case si.NamedEntity:return this.result!==0&&(this.decodeMode!==Gl.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case si.NumericDecimal:return this.emitNumericEntity(0,2);case si.NumericHex:return this.emitNumericEntity(0,3);case si.NumericStart:return(e=this.errors)===null||e===void 0||e.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case si.EntityStart:return 0}}};function RY(t){let e="",r=new bk(t,n=>e+=VL(n));return function(a,i){let s=0,o=0;for(;(o=a.indexOf("&",o))>=0;){e+=a.slice(s,o),r.startEntity(i);let u=r.write(a,o+1);if(u<0){s=o+r.end();break}s=o+u,o=u===0?s+1:s}let l=e+a.slice(s);return e="",l}}function hDe(t,e,r,n){let a=(e&Sf.BRANCH_LENGTH)>>7,i=e&Sf.JUMP_TABLE;if(a===0)return i!==0&&n===i?r:-1;if(i){let l=n-i;return l<0||l>=a?-1:t[r+l]-1}let s=r,o=s+a-1;for(;s<=o;){let l=s+o>>>1,u=t[l];if(un)o=l-1;else return t[l+a]}return-1}var IY=RY(AY),N9t=RY(LY);function wg(t,e=Gl.Legacy){return IY(t,e)}function gb(t){return IY(t,Gl.Strict)}function wk(t){for(let e=1;et.codePointAt(e):(t,e)=>(t.charCodeAt(e)&64512)===55296?(t.charCodeAt(e)-55296)*1024+t.charCodeAt(e+1)-56320+65536:t.charCodeAt(e);function YL(t,e){return function(n){let a,i=0,s="";for(;a=t.exec(n);)i!==a.index&&(s+=n.substring(i,a.index)),s+=e.get(a[0].charCodeAt(0)),i=a.index+1;return s+n.substring(i)}}var DY=YL(/[&<>'"]/g,dDe),NY=YL(/["&\u00A0]/g,new Map([[34,"""],[38,"&"],[160," "]])),MY=YL(/[&<>\u00A0]/g,new Map([[38,"&"],[60,"<"],[62,">"],[160," "]]));var OY;(function(t){t[t.XML=0]="XML",t[t.HTML=1]="HTML"})(OY||(OY={}));var PY;(function(t){t[t.UTF8=0]="UTF8",t[t.ASCII=1]="ASCII",t[t.Extensive=2]="Extensive",t[t.Attribute=3]="Attribute",t[t.Text=4]="Text"})(PY||(PY={}));function vDe(t){return Object.prototype.toString.call(t)}function kk(t){return vDe(t)==="[object String]"}var yDe=Object.prototype.hasOwnProperty;function xDe(t,e){return yDe.call(t,e)}function kg(t){return Array.prototype.slice.call(arguments,1).forEach(function(r){if(r){if(typeof r!="object")throw new TypeError(r+"must be object");Object.keys(r).forEach(function(n){t[n]=r[n]})}}),t}function jL(t,e,r){return[].concat(t.slice(0,e),r,t.slice(e+1))}function Tk(t){return!(t>=55296&&t<=57343||t>=64976&&t<=65007||(t&65535)===65535||(t&65535)===65534||t>=0&&t<=8||t===11||t>=14&&t<=31||t>=127&&t<=159||t>1114111)}function Tg(t){if(t>65535){t-=65536;let e=55296+(t>>10),r=56320+(t&1023);return String.fromCharCode(e,r)}return String.fromCharCode(t)}var zY=/\\([!"#$%&'()*+,\-./:;<=>?@[\\\]^_`{|}~])/g,bDe=/&([a-z#][a-z0-9]{1,31});/gi,wDe=new RegExp(zY.source+"|"+bDe.source,"gi"),kDe=/^#((?:x[a-f0-9]{1,8}|[0-9]{1,8}))$/i;function TDe(t,e){if(e.charCodeAt(0)===35&&kDe.test(e)){let n=e[1].toLowerCase()==="x"?parseInt(e.slice(2),16):parseInt(e.slice(1),10);return Tk(n)?Tg(n):t}let r=wg(t);return r!==t?r:t}function EDe(t){return t.indexOf("\\")<0?t:t.replace(zY,"$1")}function oh(t){return t.indexOf("\\")<0&&t.indexOf("&")<0?t:t.replace(wDe,function(e,r,n){return r||TDe(e,n)})}var CDe=/[&<>"]/,SDe=/[&<>"]/g,_De={"&":"&","<":"<",">":">",'"':"""};function ADe(t){return _De[t]}function lh(t){return CDe.test(t)?t.replace(SDe,ADe):t}var LDe=/[.?*+^$[\]\\(){}|-]/g;function RDe(t){return t.replace(LDe,"\\$&")}function Tr(t){switch(t){case 9:case 32:return!0}return!1}function j0(t){if(t>=8192&&t<=8202)return!0;switch(t){case 9:case 10:case 11:case 12:case 13:case 32:case 160:case 5760:case 8239:case 8287:case 12288:return!0}return!1}function $Y(t){return bg.test(t)||yk.test(t)}function K0(t){return $Y(Tg(t))}function Z0(t){switch(t){case 33:case 34:case 35:case 36:case 37:case 38:case 39:case 40:case 41:case 42:case 43:case 44:case 45:case 46:case 47:case 58:case 59:case 60:case 61:case 62:case 63:case 64:case 91:case 92:case 93:case 94:case 95:case 96:case 123:case 124:case 125:case 126:return!0;default:return!1}}function Q0(t){return t=t.trim().replace(/\s+/g," "),"\u1E9E".toLowerCase()==="\u1E7E"&&(t=t.replace(/ẞ/g,"\xDF")),t.toLowerCase().toUpperCase()}function FY(t){return t===32||t===9||t===10||t===13}function J0(t){let e=0;for(;e=e&&FY(t.charCodeAt(r));r--);return t.slice(e,r+1)}var IDe={mdurl:mk,ucmicro:UL};var eR={};lr(eR,{parseLinkDestination:()=>QL,parseLinkLabel:()=>ZL,parseLinkTitle:()=>JL});function ZL(t,e,r){let n,a,i,s,o=t.posMax,l=t.pos;for(t.pos=e+1,n=1;t.pos32))return i;if(n===41){if(s===0)break;s--}a++}return e===a||s!==0||(i.str=oh(t.slice(e,a)),i.pos=a,i.ok=!0),i}function JL(t,e,r,n){let a,i=e,s={ok:!1,can_continue:!1,pos:0,str:"",marker:0};if(n)s.str=n.str,s.marker=n.marker;else{if(i>=r)return s;let o=t.charCodeAt(i);if(o!==34&&o!==39&&o!==40)return s;e++,i++,o===40&&(o=41),s.marker=o}for(;i"+lh(i.content)+""};Nu.code_block=function(t,e,r,n,a){let i=t[e];return""+lh(t[e].content)+` -`};Nu.fence=function(t,e,r,n,a){let i=t[e],s=i.info?oh(i.info).trim():"",o="",l="";if(s){let h=s.split(/(\s+)/g);o=h[0],l=h.slice(2).join("")}let u;if(r.highlight?u=r.highlight(i.content,o,l)||lh(i.content):u=lh(i.content),u.indexOf("${u} -`}return`
    ${u}
    -`};Nu.image=function(t,e,r,n,a){let i=t[e];return i.attrs[i.attrIndex("alt")][1]=a.renderInlineAsText(i.children,r,n),a.renderToken(t,e,r)};Nu.hardbreak=function(t,e,r){return r.xhtmlOut?`
    +`,"getStyles"),VLt=HLt,Tb=b(t=>`${t}`,"wrapIcon"),ww={prefix:"mermaid-architecture",height:80,width:80,icons:{database:{body:Tb('')},server:{body:Tb('')},disk:{body:Tb('')},internet:{body:Tb('')},cloud:{body:Tb('')},unknown:SO,blank:{body:Tb("")}}},WLt=b(async function(t,e){let r=Qa("padding"),n=Qa("iconSize"),i=n/2,a=n/6,s=a/2;await Promise.all(e.edges().map(async o=>{let{source:l,sourceDir:u,sourceArrow:h,sourceGroup:f,target:d,targetDir:p,targetArrow:m,targetGroup:g,label:y}=oNe(o),{x:v,y:x}=o[0].sourceEndpoint(),{x:k,y:_}=o[0].midpoint(),{x:T,y:S}=o[0].targetEndpoint(),R=r+4;if(f&&($o(u)?v+=u==="L"?-R:R:x+=u==="T"?-R:R+18),g&&($o(p)?T+=p==="L"?-R:R:S+=p==="T"?-R:R+18),!f&&yD.getNode(l)?.type==="junction"&&($o(u)?v+=u==="L"?i:-i:x+=u==="T"?i:-i),!g&&yD.getNode(d)?.type==="junction"&&($o(p)?T+=p==="L"?i:-i:S+=p==="T"?i:-i),o[0]._private.rscratch){let A=t.insert("g");if(A.insert("path").attr("d",`M ${v},${x} L ${k},${_} L${T},${S} `).attr("class","edge"),h){let I=$o(u)?gD[u](v,a):v-s,P=r1(u)?gD[u](x,a):x-s;A.insert("polygon").attr("points",aNe[u](a)).attr("transform",`translate(${I},${P})`).attr("class","arrow")}if(m){let I=$o(p)?gD[p](T,a):T-s,P=r1(p)?gD[p](S,a):S-s;A.insert("polygon").attr("points",aNe[p](a)).attr("transform",`translate(${I},${P})`).attr("class","arrow")}if(y){let I=wj(u,p)?"XY":$o(u)?"X":"Y",P=0;I==="X"?P=Math.abs(v-T):I==="Y"?P=Math.abs(x-S)/1.5:P=Math.abs(v-T)/2;let O=A.append("g");if(await qa(O,y,{useHtmlLabels:!1,width:P,classes:"architecture-service-label"},Fe()),O.attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle"),I==="X")O.attr("transform","translate("+k+", "+_+")");else if(I==="Y")O.attr("transform","translate("+k+", "+_+") rotate(-90)");else if(I==="XY"){let C=xj(u,p);if(C&&kLt(C)){let N=O.node().getBoundingClientRect(),[B,F]=SLt(C);O.attr("dominant-baseline","auto").attr("transform",`rotate(${-1*B*F*45})`);let M=O.node().getBoundingClientRect();O.attr("transform",` + translate(${k}, ${_-N.height/2}) + translate(${B*M.width/2}, ${F*M.height/2}) + rotate(${-1*B*F*45}, 0, ${N.height/2}) + `)}}}}}))},"drawEdges"),YLt=b(async function(t,e){let n=Qa("padding")*.75,i=Qa("fontSize"),s=Qa("iconSize")/2;await Promise.all(e.nodes().map(async o=>{let l=Eb(o);if(l.type==="group"){let{h:u,w:h,x1:f,y1:d}=o.boundingBox();t.append("rect").attr("x",f+s).attr("y",d+s).attr("width",h).attr("height",u).attr("class","node-bkg");let p=t.append("g"),m=f,g=d;if(l.icon){let y=p.append("g");y.html(`${await _h(l.icon,{height:n,width:n,fallbackPrefix:ww.prefix})}`),y.attr("transform","translate("+(m+s+1)+", "+(g+s+1)+")"),m+=n,g+=i/2-1-2}if(l.label){let y=p.append("g");await qa(y,l.label,{useHtmlLabels:!1,width:h,classes:"architecture-service-label"},Fe()),y.attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","start").attr("text-anchor","start"),y.attr("transform","translate("+(m+s+4)+", "+(g+s+2)+")")}}}))},"drawGroups"),XLt=b(async function(t,e,r){for(let n of r){let i=e.append("g"),a=Qa("iconSize");if(n.title){let u=i.append("g");await qa(u,n.title,{useHtmlLabels:!1,width:a*1.5,classes:"architecture-service-label"},Fe()),u.attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle"),u.attr("transform","translate("+a/2+", "+a+")")}let s=i.append("g");if(n.icon)s.html(`${await _h(n.icon,{height:a,width:a,fallbackPrefix:ww.prefix})}`);else if(n.iconText){s.html(`${await _h("blank",{height:a,width:a,fallbackPrefix:ww.prefix})}`);let f=s.append("g").append("foreignObject").attr("width",a).attr("height",a).append("div").attr("class","node-icon-text").attr("style",`height: ${a}px;`).append("div").html(n.iconText),d=parseInt(window.getComputedStyle(f.node(),null).getPropertyValue("font-size").replace(/\D/g,""))??16;f.attr("style",`-webkit-line-clamp: ${Math.floor((a-2)/d)};`)}else s.append("path").attr("class","node-bkg").attr("id","node-"+n.id).attr("d",`M0 ${a} v${-a} q0,-5 5,-5 h${a} q5,0 5,5 v${a} H0 Z`);i.attr("class","architecture-service");let{width:o,height:l}=i._groups[0][0].getBBox();n.width=o,n.height=l,t.setElementForId(n.id,i)}return 0},"drawServices"),jLt=b(function(t,e,r){r.forEach(n=>{let i=e.append("g"),a=Qa("iconSize");i.append("g").append("rect").attr("id","node-"+n.id).attr("fill-opacity","0").attr("width",a).attr("height",a),i.attr("class","architecture-junction");let{width:o,height:l}=i._groups[0][0].getBBox();i.width=o,i.height=l,t.setElementForId(n.id,i)})},"drawJunctions");MT([{name:ww.prefix,icons:ww}]);Nu.use(uNe.default);b(cNe,"addServices");b(hNe,"addJunctions");b(fNe,"positionNodes");b(dNe,"addGroups");b(pNe,"addEdges");b(mNe,"getAlignments");b(gNe,"getRelativeConstraints");b(yNe,"layoutArchitecture");KLt=b(async(t,e,r,n)=>{let i=n.db,a=i.getServices(),s=i.getJunctions(),o=i.getGroups(),l=i.getEdges(),u=i.getDataStructures(),h=cs(e),f=h.append("g");f.attr("class","architecture-edges");let d=h.append("g");d.attr("class","architecture-services");let p=h.append("g");p.attr("class","architecture-groups"),await XLt(i,d,a),jLt(i,d,s);let m=await yNe(a,s,o,l,i,u);await WLt(f,m),await YLt(p,m),fNe(i,m),Uu(void 0,h,Qa("padding"),Qa("useMaxWidth"))},"draw"),ZLt={draw:KLt},QLt={parser:ULt,db:yD,renderer:ZLt,styles:VLt}});var aI={};Mr(aI,{arrayReplaceAt:()=>iI,asciiTrim:()=>l1,assign:()=>Ng,escapeHtml:()=>dh,escapeRE:()=>lBe,fromCodePoint:()=>Og,has:()=>ZPe,isMdAsciiPunct:()=>s1,isPunctChar:()=>uZ,isPunctCharCode:()=>a1,isSpace:()=>Zr,isString:()=>rk,isValidEntityCode:()=>nk,isWhiteSpace:()=>i1,lib:()=>uBe,normalizeReference:()=>o1,unescapeAll:()=>fh,unescapeMd:()=>rBe});var jw={};Mr(jw,{decode:()=>Rb,encode:()=>Yw,format:()=>Dg,parse:()=>Db});var UK={};function _Pe(t){let e=UK[t];if(e)return e;e=UK[t]=[];for(let r=0;r<128;r++){let n=String.fromCharCode(r);e.push(n)}for(let r=0;r=55296&&h<=57343?i+="\uFFFD\uFFFD\uFFFD":i+=String.fromCharCode(h),a+=6;continue}}if((o&248)===240&&a+91114111?i+="\uFFFD\uFFFD\uFFFD\uFFFD":(f-=65536,i+=String.fromCharCode(55296+(f>>10),56320+(f&1023))),a+=9;continue}}i+="\uFFFD"}return i})}Vw.defaultChars=";/?:@&=+$,#";Vw.componentChars="";var Rb=Vw;var HK={};function APe(t){let e=HK[t];if(e)return e;e=HK[t]=[];for(let r=0;r<128;r++){let n=String.fromCharCode(r);/^[0-9a-z]$/i.test(n)?e.push(n):e.push("%"+("0"+r.toString(16).toUpperCase()).slice(-2))}for(let r=0;r"u"&&(r=!0);let n=APe(e),i="";for(let a=0,s=t.length;a=55296&&o<=57343){if(o>=55296&&o<=56319&&a+1=56320&&l<=57343){i+=encodeURIComponent(t[a]+t[a+1]),a++;continue}}i+="%EF%BF%BD";continue}i+=encodeURIComponent(t[a])}return i}Ww.defaultChars=";/?:@&=+$,-_.!~*'()#";Ww.componentChars="-_.!~*'()";var Yw=Ww;function Dg(t){let e="";return e+=t.protocol||"",e+=t.slashes?"//":"",e+=t.auth?t.auth+"@":"",t.hostname&&t.hostname.indexOf(":")!==-1?e+="["+t.hostname+"]":e+=t.hostname||"",e+=t.port?":"+t.port:"",e+=t.pathname||"",e+=t.search||"",e+=t.hash||"",e}function Xw(){this.protocol=null,this.slashes=null,this.auth=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.pathname=null}var LPe=/^([a-z0-9.+-]+:)/i,RPe=/:[0-9]*$/,DPe=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,IPe=["<",">",'"',"`"," ","\r",` +`," "],MPe=["{","}","|","\\","^","`"].concat(IPe),NPe=["'"].concat(MPe),VK=["%","/","?",";","#"].concat(NPe),WK=["/","?","#"],OPe=255,YK=/^[+a-z0-9A-Z_-]{0,63}$/,PPe=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,XK={javascript:!0,"javascript:":!0},jK={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0};function BPe(t,e){if(t&&t instanceof Xw)return t;let r=new Xw;return r.parse(t,e),r}Xw.prototype.parse=function(t,e){let r,n,i,a=t;if(a=a.trim(),!e&&t.split("#").length===1){let u=DPe.exec(a);if(u)return this.pathname=u[1],u[2]&&(this.search=u[2]),this}let s=LPe.exec(a);if(s&&(s=s[0],r=s.toLowerCase(),this.protocol=s,a=a.substr(s.length)),(e||s||a.match(/^\/\/[^@\/]+@[^@\/]+/))&&(i=a.substr(0,2)==="//",i&&!(s&&XK[s])&&(a=a.substr(2),this.slashes=!0)),!XK[s]&&(i||s&&!jK[s])){let u=-1;for(let m=0;m127?x+="x":x+=v[k];if(!x.match(YK)){let k=m.slice(0,g),_=m.slice(g+1),T=v.match(PPe);T&&(k.push(T[1]),_.unshift(T[2])),_.length&&(a=_.join(".")+a),this.hostname=k.join(".");break}}}}this.hostname.length>OPe&&(this.hostname=""),p&&(this.hostname=this.hostname.substr(1,this.hostname.length-2))}let o=a.indexOf("#");o!==-1&&(this.hash=a.substr(o),a=a.slice(0,o));let l=a.indexOf("?");return l!==-1&&(this.search=a.substr(l),a=a.slice(0,l)),a&&(this.pathname=a),jK[r]&&this.hostname&&!this.pathname&&(this.pathname=""),this};Xw.prototype.parseHost=function(t){let e=RPe.exec(t);e&&(e=e[0],e!==":"&&(this.port=e.substr(1)),t=t.substr(0,t.length-e.length)),t&&(this.hostname=t)};var Db=BPe;var ZD={};Mr(ZD,{Any:()=>Kw,Cc:()=>Zw,Cf:()=>KK,P:()=>Ig,S:()=>Qw,Z:()=>Jw});var Kw=/[\0-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/;var Zw=/[\0-\x1F\x7F-\x9F]/;var KK=/[\xAD\u0600-\u0605\u061C\u06DD\u070F\u0890\u0891\u08E2\u180E\u200B-\u200F\u202A-\u202E\u2060-\u2064\u2066-\u206F\uFEFF\uFFF9-\uFFFB]|\uD804[\uDCBD\uDCCD]|\uD80D[\uDC30-\uDC3F]|\uD82F[\uDCA0-\uDCA3]|\uD834[\uDD73-\uDD7A]|\uDB40[\uDC01\uDC20-\uDC7F]/;var Ig=/[!-#%-\*,-\/:;\?@\[-\]_\{\}\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061D-\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C77\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1B7D\u1B7E\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4F\u2E52-\u2E5D\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD803[\uDEAD\uDF55-\uDF59\uDF86-\uDF89]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC8\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDC4B-\uDC4F\uDC5A\uDC5B\uDC5D\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDE60-\uDE6C\uDEB9\uDF3C-\uDF3E]|\uD806[\uDC3B\uDD44-\uDD46\uDDE2\uDE3F-\uDE46\uDE9A-\uDE9C\uDE9E-\uDEA2\uDF00-\uDF09]|\uD807[\uDC41-\uDC45\uDC70\uDC71\uDEF7\uDEF8\uDF43-\uDF4F\uDFFF]|\uD809[\uDC70-\uDC74]|\uD80B[\uDFF1\uDFF2]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD81B[\uDE97-\uDE9A\uDFE2]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]|\uD83A[\uDD5E\uDD5F]/;var Qw=/[\$\+<->\^`\|~\xA2-\xA6\xA8\xA9\xAC\xAE-\xB1\xB4\xB8\xD7\xF7\u02C2-\u02C5\u02D2-\u02DF\u02E5-\u02EB\u02ED\u02EF-\u02FF\u0375\u0384\u0385\u03F6\u0482\u058D-\u058F\u0606-\u0608\u060B\u060E\u060F\u06DE\u06E9\u06FD\u06FE\u07F6\u07FE\u07FF\u0888\u09F2\u09F3\u09FA\u09FB\u0AF1\u0B70\u0BF3-\u0BFA\u0C7F\u0D4F\u0D79\u0E3F\u0F01-\u0F03\u0F13\u0F15-\u0F17\u0F1A-\u0F1F\u0F34\u0F36\u0F38\u0FBE-\u0FC5\u0FC7-\u0FCC\u0FCE\u0FCF\u0FD5-\u0FD8\u109E\u109F\u1390-\u1399\u166D\u17DB\u1940\u19DE-\u19FF\u1B61-\u1B6A\u1B74-\u1B7C\u1FBD\u1FBF-\u1FC1\u1FCD-\u1FCF\u1FDD-\u1FDF\u1FED-\u1FEF\u1FFD\u1FFE\u2044\u2052\u207A-\u207C\u208A-\u208C\u20A0-\u20C0\u2100\u2101\u2103-\u2106\u2108\u2109\u2114\u2116-\u2118\u211E-\u2123\u2125\u2127\u2129\u212E\u213A\u213B\u2140-\u2144\u214A-\u214D\u214F\u218A\u218B\u2190-\u2307\u230C-\u2328\u232B-\u2426\u2440-\u244A\u249C-\u24E9\u2500-\u2767\u2794-\u27C4\u27C7-\u27E5\u27F0-\u2982\u2999-\u29D7\u29DC-\u29FB\u29FE-\u2B73\u2B76-\u2B95\u2B97-\u2BFF\u2CE5-\u2CEA\u2E50\u2E51\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFF\u3004\u3012\u3013\u3020\u3036\u3037\u303E\u303F\u309B\u309C\u3190\u3191\u3196-\u319F\u31C0-\u31E3\u31EF\u3200-\u321E\u322A-\u3247\u3250\u3260-\u327F\u328A-\u32B0\u32C0-\u33FF\u4DC0-\u4DFF\uA490-\uA4C6\uA700-\uA716\uA720\uA721\uA789\uA78A\uA828-\uA82B\uA836-\uA839\uAA77-\uAA79\uAB5B\uAB6A\uAB6B\uFB29\uFBB2-\uFBC2\uFD40-\uFD4F\uFDCF\uFDFC-\uFDFF\uFE62\uFE64-\uFE66\uFE69\uFF04\uFF0B\uFF1C-\uFF1E\uFF3E\uFF40\uFF5C\uFF5E\uFFE0-\uFFE6\uFFE8-\uFFEE\uFFFC\uFFFD]|\uD800[\uDD37-\uDD3F\uDD79-\uDD89\uDD8C-\uDD8E\uDD90-\uDD9C\uDDA0\uDDD0-\uDDFC]|\uD802[\uDC77\uDC78\uDEC8]|\uD805\uDF3F|\uD807[\uDFD5-\uDFF1]|\uD81A[\uDF3C-\uDF3F\uDF45]|\uD82F\uDC9C|\uD833[\uDF50-\uDFC3]|\uD834[\uDC00-\uDCF5\uDD00-\uDD26\uDD29-\uDD64\uDD6A-\uDD6C\uDD83\uDD84\uDD8C-\uDDA9\uDDAE-\uDDEA\uDE00-\uDE41\uDE45\uDF00-\uDF56]|\uD835[\uDEC1\uDEDB\uDEFB\uDF15\uDF35\uDF4F\uDF6F\uDF89\uDFA9\uDFC3]|\uD836[\uDC00-\uDDFF\uDE37-\uDE3A\uDE6D-\uDE74\uDE76-\uDE83\uDE85\uDE86]|\uD838[\uDD4F\uDEFF]|\uD83B[\uDCAC\uDCB0\uDD2E\uDEF0\uDEF1]|\uD83C[\uDC00-\uDC2B\uDC30-\uDC93\uDCA0-\uDCAE\uDCB1-\uDCBF\uDCC1-\uDCCF\uDCD1-\uDCF5\uDD0D-\uDDAD\uDDE6-\uDE02\uDE10-\uDE3B\uDE40-\uDE48\uDE50\uDE51\uDE60-\uDE65\uDF00-\uDFFF]|\uD83D[\uDC00-\uDED7\uDEDC-\uDEEC\uDEF0-\uDEFC\uDF00-\uDF76\uDF7B-\uDFD9\uDFE0-\uDFEB\uDFF0]|\uD83E[\uDC00-\uDC0B\uDC10-\uDC47\uDC50-\uDC59\uDC60-\uDC87\uDC90-\uDCAD\uDCB0\uDCB1\uDD00-\uDE53\uDE60-\uDE6D\uDE70-\uDE7C\uDE80-\uDE88\uDE90-\uDEBD\uDEBF-\uDEC5\uDECE-\uDEDB\uDEE0-\uDEE8\uDEF0-\uDEF8\uDF00-\uDF92\uDF94-\uDFCA]/;var Jw=/[ \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/;var ZK=new Uint16Array('\u1D41<\xD5\u0131\u028A\u049D\u057B\u05D0\u0675\u06DE\u07A2\u07D6\u080F\u0A4A\u0A91\u0DA1\u0E6D\u0F09\u0F26\u10CA\u1228\u12E1\u1415\u149D\u14C3\u14DF\u1525\0\0\0\0\0\0\u156B\u16CD\u198D\u1C12\u1DDD\u1F7E\u2060\u21B0\u228D\u23C0\u23FB\u2442\u2824\u2912\u2D08\u2E48\u2FCE\u3016\u32BA\u3639\u37AC\u38FE\u3A28\u3A71\u3AE0\u3B2E\u0800EMabcfglmnoprstu\\bfms\x7F\x84\x8B\x90\x95\x98\xA6\xB3\xB9\xC8\xCFlig\u803B\xC6\u40C6P\u803B&\u4026cute\u803B\xC1\u40C1reve;\u4102\u0100iyx}rc\u803B\xC2\u40C2;\u4410r;\uC000\u{1D504}rave\u803B\xC0\u40C0pha;\u4391acr;\u4100d;\u6A53\u0100gp\x9D\xA1on;\u4104f;\uC000\u{1D538}plyFunction;\u6061ing\u803B\xC5\u40C5\u0100cs\xBE\xC3r;\uC000\u{1D49C}ign;\u6254ilde\u803B\xC3\u40C3ml\u803B\xC4\u40C4\u0400aceforsu\xE5\xFB\xFE\u0117\u011C\u0122\u0127\u012A\u0100cr\xEA\xF2kslash;\u6216\u0176\xF6\xF8;\u6AE7ed;\u6306y;\u4411\u0180crt\u0105\u010B\u0114ause;\u6235noullis;\u612Ca;\u4392r;\uC000\u{1D505}pf;\uC000\u{1D539}eve;\u42D8c\xF2\u0113mpeq;\u624E\u0700HOacdefhilorsu\u014D\u0151\u0156\u0180\u019E\u01A2\u01B5\u01B7\u01BA\u01DC\u0215\u0273\u0278\u027Ecy;\u4427PY\u803B\xA9\u40A9\u0180cpy\u015D\u0162\u017Aute;\u4106\u0100;i\u0167\u0168\u62D2talDifferentialD;\u6145leys;\u612D\u0200aeio\u0189\u018E\u0194\u0198ron;\u410Cdil\u803B\xC7\u40C7rc;\u4108nint;\u6230ot;\u410A\u0100dn\u01A7\u01ADilla;\u40B8terDot;\u40B7\xF2\u017Fi;\u43A7rcle\u0200DMPT\u01C7\u01CB\u01D1\u01D6ot;\u6299inus;\u6296lus;\u6295imes;\u6297o\u0100cs\u01E2\u01F8kwiseContourIntegral;\u6232eCurly\u0100DQ\u0203\u020FoubleQuote;\u601Duote;\u6019\u0200lnpu\u021E\u0228\u0247\u0255on\u0100;e\u0225\u0226\u6237;\u6A74\u0180git\u022F\u0236\u023Aruent;\u6261nt;\u622FourIntegral;\u622E\u0100fr\u024C\u024E;\u6102oduct;\u6210nterClockwiseContourIntegral;\u6233oss;\u6A2Fcr;\uC000\u{1D49E}p\u0100;C\u0284\u0285\u62D3ap;\u624D\u0580DJSZacefios\u02A0\u02AC\u02B0\u02B4\u02B8\u02CB\u02D7\u02E1\u02E6\u0333\u048D\u0100;o\u0179\u02A5trahd;\u6911cy;\u4402cy;\u4405cy;\u440F\u0180grs\u02BF\u02C4\u02C7ger;\u6021r;\u61A1hv;\u6AE4\u0100ay\u02D0\u02D5ron;\u410E;\u4414l\u0100;t\u02DD\u02DE\u6207a;\u4394r;\uC000\u{1D507}\u0100af\u02EB\u0327\u0100cm\u02F0\u0322ritical\u0200ADGT\u0300\u0306\u0316\u031Ccute;\u40B4o\u0174\u030B\u030D;\u42D9bleAcute;\u42DDrave;\u4060ilde;\u42DCond;\u62C4ferentialD;\u6146\u0470\u033D\0\0\0\u0342\u0354\0\u0405f;\uC000\u{1D53B}\u0180;DE\u0348\u0349\u034D\u40A8ot;\u60DCqual;\u6250ble\u0300CDLRUV\u0363\u0372\u0382\u03CF\u03E2\u03F8ontourIntegra\xEC\u0239o\u0274\u0379\0\0\u037B\xBB\u0349nArrow;\u61D3\u0100eo\u0387\u03A4ft\u0180ART\u0390\u0396\u03A1rrow;\u61D0ightArrow;\u61D4e\xE5\u02CAng\u0100LR\u03AB\u03C4eft\u0100AR\u03B3\u03B9rrow;\u67F8ightArrow;\u67FAightArrow;\u67F9ight\u0100AT\u03D8\u03DErrow;\u61D2ee;\u62A8p\u0241\u03E9\0\0\u03EFrrow;\u61D1ownArrow;\u61D5erticalBar;\u6225n\u0300ABLRTa\u0412\u042A\u0430\u045E\u047F\u037Crrow\u0180;BU\u041D\u041E\u0422\u6193ar;\u6913pArrow;\u61F5reve;\u4311eft\u02D2\u043A\0\u0446\0\u0450ightVector;\u6950eeVector;\u695Eector\u0100;B\u0459\u045A\u61BDar;\u6956ight\u01D4\u0467\0\u0471eeVector;\u695Fector\u0100;B\u047A\u047B\u61C1ar;\u6957ee\u0100;A\u0486\u0487\u62A4rrow;\u61A7\u0100ct\u0492\u0497r;\uC000\u{1D49F}rok;\u4110\u0800NTacdfglmopqstux\u04BD\u04C0\u04C4\u04CB\u04DE\u04E2\u04E7\u04EE\u04F5\u0521\u052F\u0536\u0552\u055D\u0560\u0565G;\u414AH\u803B\xD0\u40D0cute\u803B\xC9\u40C9\u0180aiy\u04D2\u04D7\u04DCron;\u411Arc\u803B\xCA\u40CA;\u442Dot;\u4116r;\uC000\u{1D508}rave\u803B\xC8\u40C8ement;\u6208\u0100ap\u04FA\u04FEcr;\u4112ty\u0253\u0506\0\0\u0512mallSquare;\u65FBerySmallSquare;\u65AB\u0100gp\u0526\u052Aon;\u4118f;\uC000\u{1D53C}silon;\u4395u\u0100ai\u053C\u0549l\u0100;T\u0542\u0543\u6A75ilde;\u6242librium;\u61CC\u0100ci\u0557\u055Ar;\u6130m;\u6A73a;\u4397ml\u803B\xCB\u40CB\u0100ip\u056A\u056Fsts;\u6203onentialE;\u6147\u0280cfios\u0585\u0588\u058D\u05B2\u05CCy;\u4424r;\uC000\u{1D509}lled\u0253\u0597\0\0\u05A3mallSquare;\u65FCerySmallSquare;\u65AA\u0370\u05BA\0\u05BF\0\0\u05C4f;\uC000\u{1D53D}All;\u6200riertrf;\u6131c\xF2\u05CB\u0600JTabcdfgorst\u05E8\u05EC\u05EF\u05FA\u0600\u0612\u0616\u061B\u061D\u0623\u066C\u0672cy;\u4403\u803B>\u403Emma\u0100;d\u05F7\u05F8\u4393;\u43DCreve;\u411E\u0180eiy\u0607\u060C\u0610dil;\u4122rc;\u411C;\u4413ot;\u4120r;\uC000\u{1D50A};\u62D9pf;\uC000\u{1D53E}eater\u0300EFGLST\u0635\u0644\u064E\u0656\u065B\u0666qual\u0100;L\u063E\u063F\u6265ess;\u62DBullEqual;\u6267reater;\u6AA2ess;\u6277lantEqual;\u6A7Eilde;\u6273cr;\uC000\u{1D4A2};\u626B\u0400Aacfiosu\u0685\u068B\u0696\u069B\u069E\u06AA\u06BE\u06CARDcy;\u442A\u0100ct\u0690\u0694ek;\u42C7;\u405Eirc;\u4124r;\u610ClbertSpace;\u610B\u01F0\u06AF\0\u06B2f;\u610DizontalLine;\u6500\u0100ct\u06C3\u06C5\xF2\u06A9rok;\u4126mp\u0144\u06D0\u06D8ownHum\xF0\u012Fqual;\u624F\u0700EJOacdfgmnostu\u06FA\u06FE\u0703\u0707\u070E\u071A\u071E\u0721\u0728\u0744\u0778\u078B\u078F\u0795cy;\u4415lig;\u4132cy;\u4401cute\u803B\xCD\u40CD\u0100iy\u0713\u0718rc\u803B\xCE\u40CE;\u4418ot;\u4130r;\u6111rave\u803B\xCC\u40CC\u0180;ap\u0720\u072F\u073F\u0100cg\u0734\u0737r;\u412AinaryI;\u6148lie\xF3\u03DD\u01F4\u0749\0\u0762\u0100;e\u074D\u074E\u622C\u0100gr\u0753\u0758ral;\u622Bsection;\u62C2isible\u0100CT\u076C\u0772omma;\u6063imes;\u6062\u0180gpt\u077F\u0783\u0788on;\u412Ef;\uC000\u{1D540}a;\u4399cr;\u6110ilde;\u4128\u01EB\u079A\0\u079Ecy;\u4406l\u803B\xCF\u40CF\u0280cfosu\u07AC\u07B7\u07BC\u07C2\u07D0\u0100iy\u07B1\u07B5rc;\u4134;\u4419r;\uC000\u{1D50D}pf;\uC000\u{1D541}\u01E3\u07C7\0\u07CCr;\uC000\u{1D4A5}rcy;\u4408kcy;\u4404\u0380HJacfos\u07E4\u07E8\u07EC\u07F1\u07FD\u0802\u0808cy;\u4425cy;\u440Cppa;\u439A\u0100ey\u07F6\u07FBdil;\u4136;\u441Ar;\uC000\u{1D50E}pf;\uC000\u{1D542}cr;\uC000\u{1D4A6}\u0580JTaceflmost\u0825\u0829\u082C\u0850\u0863\u09B3\u09B8\u09C7\u09CD\u0A37\u0A47cy;\u4409\u803B<\u403C\u0280cmnpr\u0837\u083C\u0841\u0844\u084Dute;\u4139bda;\u439Bg;\u67EAlacetrf;\u6112r;\u619E\u0180aey\u0857\u085C\u0861ron;\u413Ddil;\u413B;\u441B\u0100fs\u0868\u0970t\u0500ACDFRTUVar\u087E\u08A9\u08B1\u08E0\u08E6\u08FC\u092F\u095B\u0390\u096A\u0100nr\u0883\u088FgleBracket;\u67E8row\u0180;BR\u0899\u089A\u089E\u6190ar;\u61E4ightArrow;\u61C6eiling;\u6308o\u01F5\u08B7\0\u08C3bleBracket;\u67E6n\u01D4\u08C8\0\u08D2eeVector;\u6961ector\u0100;B\u08DB\u08DC\u61C3ar;\u6959loor;\u630Aight\u0100AV\u08EF\u08F5rrow;\u6194ector;\u694E\u0100er\u0901\u0917e\u0180;AV\u0909\u090A\u0910\u62A3rrow;\u61A4ector;\u695Aiangle\u0180;BE\u0924\u0925\u0929\u62B2ar;\u69CFqual;\u62B4p\u0180DTV\u0937\u0942\u094CownVector;\u6951eeVector;\u6960ector\u0100;B\u0956\u0957\u61BFar;\u6958ector\u0100;B\u0965\u0966\u61BCar;\u6952ight\xE1\u039Cs\u0300EFGLST\u097E\u098B\u0995\u099D\u09A2\u09ADqualGreater;\u62DAullEqual;\u6266reater;\u6276ess;\u6AA1lantEqual;\u6A7Dilde;\u6272r;\uC000\u{1D50F}\u0100;e\u09BD\u09BE\u62D8ftarrow;\u61DAidot;\u413F\u0180npw\u09D4\u0A16\u0A1Bg\u0200LRlr\u09DE\u09F7\u0A02\u0A10eft\u0100AR\u09E6\u09ECrrow;\u67F5ightArrow;\u67F7ightArrow;\u67F6eft\u0100ar\u03B3\u0A0Aight\xE1\u03BFight\xE1\u03CAf;\uC000\u{1D543}er\u0100LR\u0A22\u0A2CeftArrow;\u6199ightArrow;\u6198\u0180cht\u0A3E\u0A40\u0A42\xF2\u084C;\u61B0rok;\u4141;\u626A\u0400acefiosu\u0A5A\u0A5D\u0A60\u0A77\u0A7C\u0A85\u0A8B\u0A8Ep;\u6905y;\u441C\u0100dl\u0A65\u0A6FiumSpace;\u605Flintrf;\u6133r;\uC000\u{1D510}nusPlus;\u6213pf;\uC000\u{1D544}c\xF2\u0A76;\u439C\u0480Jacefostu\u0AA3\u0AA7\u0AAD\u0AC0\u0B14\u0B19\u0D91\u0D97\u0D9Ecy;\u440Acute;\u4143\u0180aey\u0AB4\u0AB9\u0ABEron;\u4147dil;\u4145;\u441D\u0180gsw\u0AC7\u0AF0\u0B0Eative\u0180MTV\u0AD3\u0ADF\u0AE8ediumSpace;\u600Bhi\u0100cn\u0AE6\u0AD8\xEB\u0AD9eryThi\xEE\u0AD9ted\u0100GL\u0AF8\u0B06reaterGreate\xF2\u0673essLes\xF3\u0A48Line;\u400Ar;\uC000\u{1D511}\u0200Bnpt\u0B22\u0B28\u0B37\u0B3Areak;\u6060BreakingSpace;\u40A0f;\u6115\u0680;CDEGHLNPRSTV\u0B55\u0B56\u0B6A\u0B7C\u0BA1\u0BEB\u0C04\u0C5E\u0C84\u0CA6\u0CD8\u0D61\u0D85\u6AEC\u0100ou\u0B5B\u0B64ngruent;\u6262pCap;\u626DoubleVerticalBar;\u6226\u0180lqx\u0B83\u0B8A\u0B9Bement;\u6209ual\u0100;T\u0B92\u0B93\u6260ilde;\uC000\u2242\u0338ists;\u6204reater\u0380;EFGLST\u0BB6\u0BB7\u0BBD\u0BC9\u0BD3\u0BD8\u0BE5\u626Fqual;\u6271ullEqual;\uC000\u2267\u0338reater;\uC000\u226B\u0338ess;\u6279lantEqual;\uC000\u2A7E\u0338ilde;\u6275ump\u0144\u0BF2\u0BFDownHump;\uC000\u224E\u0338qual;\uC000\u224F\u0338e\u0100fs\u0C0A\u0C27tTriangle\u0180;BE\u0C1A\u0C1B\u0C21\u62EAar;\uC000\u29CF\u0338qual;\u62ECs\u0300;EGLST\u0C35\u0C36\u0C3C\u0C44\u0C4B\u0C58\u626Equal;\u6270reater;\u6278ess;\uC000\u226A\u0338lantEqual;\uC000\u2A7D\u0338ilde;\u6274ested\u0100GL\u0C68\u0C79reaterGreater;\uC000\u2AA2\u0338essLess;\uC000\u2AA1\u0338recedes\u0180;ES\u0C92\u0C93\u0C9B\u6280qual;\uC000\u2AAF\u0338lantEqual;\u62E0\u0100ei\u0CAB\u0CB9verseElement;\u620CghtTriangle\u0180;BE\u0CCB\u0CCC\u0CD2\u62EBar;\uC000\u29D0\u0338qual;\u62ED\u0100qu\u0CDD\u0D0CuareSu\u0100bp\u0CE8\u0CF9set\u0100;E\u0CF0\u0CF3\uC000\u228F\u0338qual;\u62E2erset\u0100;E\u0D03\u0D06\uC000\u2290\u0338qual;\u62E3\u0180bcp\u0D13\u0D24\u0D4Eset\u0100;E\u0D1B\u0D1E\uC000\u2282\u20D2qual;\u6288ceeds\u0200;EST\u0D32\u0D33\u0D3B\u0D46\u6281qual;\uC000\u2AB0\u0338lantEqual;\u62E1ilde;\uC000\u227F\u0338erset\u0100;E\u0D58\u0D5B\uC000\u2283\u20D2qual;\u6289ilde\u0200;EFT\u0D6E\u0D6F\u0D75\u0D7F\u6241qual;\u6244ullEqual;\u6247ilde;\u6249erticalBar;\u6224cr;\uC000\u{1D4A9}ilde\u803B\xD1\u40D1;\u439D\u0700Eacdfgmoprstuv\u0DBD\u0DC2\u0DC9\u0DD5\u0DDB\u0DE0\u0DE7\u0DFC\u0E02\u0E20\u0E22\u0E32\u0E3F\u0E44lig;\u4152cute\u803B\xD3\u40D3\u0100iy\u0DCE\u0DD3rc\u803B\xD4\u40D4;\u441Eblac;\u4150r;\uC000\u{1D512}rave\u803B\xD2\u40D2\u0180aei\u0DEE\u0DF2\u0DF6cr;\u414Cga;\u43A9cron;\u439Fpf;\uC000\u{1D546}enCurly\u0100DQ\u0E0E\u0E1AoubleQuote;\u601Cuote;\u6018;\u6A54\u0100cl\u0E27\u0E2Cr;\uC000\u{1D4AA}ash\u803B\xD8\u40D8i\u016C\u0E37\u0E3Cde\u803B\xD5\u40D5es;\u6A37ml\u803B\xD6\u40D6er\u0100BP\u0E4B\u0E60\u0100ar\u0E50\u0E53r;\u603Eac\u0100ek\u0E5A\u0E5C;\u63DEet;\u63B4arenthesis;\u63DC\u0480acfhilors\u0E7F\u0E87\u0E8A\u0E8F\u0E92\u0E94\u0E9D\u0EB0\u0EFCrtialD;\u6202y;\u441Fr;\uC000\u{1D513}i;\u43A6;\u43A0usMinus;\u40B1\u0100ip\u0EA2\u0EADncareplan\xE5\u069Df;\u6119\u0200;eio\u0EB9\u0EBA\u0EE0\u0EE4\u6ABBcedes\u0200;EST\u0EC8\u0EC9\u0ECF\u0EDA\u627Aqual;\u6AAFlantEqual;\u627Cilde;\u627Eme;\u6033\u0100dp\u0EE9\u0EEEuct;\u620Fortion\u0100;a\u0225\u0EF9l;\u621D\u0100ci\u0F01\u0F06r;\uC000\u{1D4AB};\u43A8\u0200Ufos\u0F11\u0F16\u0F1B\u0F1FOT\u803B"\u4022r;\uC000\u{1D514}pf;\u611Acr;\uC000\u{1D4AC}\u0600BEacefhiorsu\u0F3E\u0F43\u0F47\u0F60\u0F73\u0FA7\u0FAA\u0FAD\u1096\u10A9\u10B4\u10BEarr;\u6910G\u803B\xAE\u40AE\u0180cnr\u0F4E\u0F53\u0F56ute;\u4154g;\u67EBr\u0100;t\u0F5C\u0F5D\u61A0l;\u6916\u0180aey\u0F67\u0F6C\u0F71ron;\u4158dil;\u4156;\u4420\u0100;v\u0F78\u0F79\u611Cerse\u0100EU\u0F82\u0F99\u0100lq\u0F87\u0F8Eement;\u620Builibrium;\u61CBpEquilibrium;\u696Fr\xBB\u0F79o;\u43A1ght\u0400ACDFTUVa\u0FC1\u0FEB\u0FF3\u1022\u1028\u105B\u1087\u03D8\u0100nr\u0FC6\u0FD2gleBracket;\u67E9row\u0180;BL\u0FDC\u0FDD\u0FE1\u6192ar;\u61E5eftArrow;\u61C4eiling;\u6309o\u01F5\u0FF9\0\u1005bleBracket;\u67E7n\u01D4\u100A\0\u1014eeVector;\u695Dector\u0100;B\u101D\u101E\u61C2ar;\u6955loor;\u630B\u0100er\u102D\u1043e\u0180;AV\u1035\u1036\u103C\u62A2rrow;\u61A6ector;\u695Biangle\u0180;BE\u1050\u1051\u1055\u62B3ar;\u69D0qual;\u62B5p\u0180DTV\u1063\u106E\u1078ownVector;\u694FeeVector;\u695Cector\u0100;B\u1082\u1083\u61BEar;\u6954ector\u0100;B\u1091\u1092\u61C0ar;\u6953\u0100pu\u109B\u109Ef;\u611DndImplies;\u6970ightarrow;\u61DB\u0100ch\u10B9\u10BCr;\u611B;\u61B1leDelayed;\u69F4\u0680HOacfhimoqstu\u10E4\u10F1\u10F7\u10FD\u1119\u111E\u1151\u1156\u1161\u1167\u11B5\u11BB\u11BF\u0100Cc\u10E9\u10EEHcy;\u4429y;\u4428FTcy;\u442Ccute;\u415A\u0280;aeiy\u1108\u1109\u110E\u1113\u1117\u6ABCron;\u4160dil;\u415Erc;\u415C;\u4421r;\uC000\u{1D516}ort\u0200DLRU\u112A\u1134\u113E\u1149ownArrow\xBB\u041EeftArrow\xBB\u089AightArrow\xBB\u0FDDpArrow;\u6191gma;\u43A3allCircle;\u6218pf;\uC000\u{1D54A}\u0272\u116D\0\0\u1170t;\u621Aare\u0200;ISU\u117B\u117C\u1189\u11AF\u65A1ntersection;\u6293u\u0100bp\u118F\u119Eset\u0100;E\u1197\u1198\u628Fqual;\u6291erset\u0100;E\u11A8\u11A9\u6290qual;\u6292nion;\u6294cr;\uC000\u{1D4AE}ar;\u62C6\u0200bcmp\u11C8\u11DB\u1209\u120B\u0100;s\u11CD\u11CE\u62D0et\u0100;E\u11CD\u11D5qual;\u6286\u0100ch\u11E0\u1205eeds\u0200;EST\u11ED\u11EE\u11F4\u11FF\u627Bqual;\u6AB0lantEqual;\u627Dilde;\u627FTh\xE1\u0F8C;\u6211\u0180;es\u1212\u1213\u1223\u62D1rset\u0100;E\u121C\u121D\u6283qual;\u6287et\xBB\u1213\u0580HRSacfhiors\u123E\u1244\u1249\u1255\u125E\u1271\u1276\u129F\u12C2\u12C8\u12D1ORN\u803B\xDE\u40DEADE;\u6122\u0100Hc\u124E\u1252cy;\u440By;\u4426\u0100bu\u125A\u125C;\u4009;\u43A4\u0180aey\u1265\u126A\u126Fron;\u4164dil;\u4162;\u4422r;\uC000\u{1D517}\u0100ei\u127B\u1289\u01F2\u1280\0\u1287efore;\u6234a;\u4398\u0100cn\u128E\u1298kSpace;\uC000\u205F\u200ASpace;\u6009lde\u0200;EFT\u12AB\u12AC\u12B2\u12BC\u623Cqual;\u6243ullEqual;\u6245ilde;\u6248pf;\uC000\u{1D54B}ipleDot;\u60DB\u0100ct\u12D6\u12DBr;\uC000\u{1D4AF}rok;\u4166\u0AE1\u12F7\u130E\u131A\u1326\0\u132C\u1331\0\0\0\0\0\u1338\u133D\u1377\u1385\0\u13FF\u1404\u140A\u1410\u0100cr\u12FB\u1301ute\u803B\xDA\u40DAr\u0100;o\u1307\u1308\u619Fcir;\u6949r\u01E3\u1313\0\u1316y;\u440Eve;\u416C\u0100iy\u131E\u1323rc\u803B\xDB\u40DB;\u4423blac;\u4170r;\uC000\u{1D518}rave\u803B\xD9\u40D9acr;\u416A\u0100di\u1341\u1369er\u0100BP\u1348\u135D\u0100ar\u134D\u1350r;\u405Fac\u0100ek\u1357\u1359;\u63DFet;\u63B5arenthesis;\u63DDon\u0100;P\u1370\u1371\u62C3lus;\u628E\u0100gp\u137B\u137Fon;\u4172f;\uC000\u{1D54C}\u0400ADETadps\u1395\u13AE\u13B8\u13C4\u03E8\u13D2\u13D7\u13F3rrow\u0180;BD\u1150\u13A0\u13A4ar;\u6912ownArrow;\u61C5ownArrow;\u6195quilibrium;\u696Eee\u0100;A\u13CB\u13CC\u62A5rrow;\u61A5own\xE1\u03F3er\u0100LR\u13DE\u13E8eftArrow;\u6196ightArrow;\u6197i\u0100;l\u13F9\u13FA\u43D2on;\u43A5ing;\u416Ecr;\uC000\u{1D4B0}ilde;\u4168ml\u803B\xDC\u40DC\u0480Dbcdefosv\u1427\u142C\u1430\u1433\u143E\u1485\u148A\u1490\u1496ash;\u62ABar;\u6AEBy;\u4412ash\u0100;l\u143B\u143C\u62A9;\u6AE6\u0100er\u1443\u1445;\u62C1\u0180bty\u144C\u1450\u147Aar;\u6016\u0100;i\u144F\u1455cal\u0200BLST\u1461\u1465\u146A\u1474ar;\u6223ine;\u407Ceparator;\u6758ilde;\u6240ThinSpace;\u600Ar;\uC000\u{1D519}pf;\uC000\u{1D54D}cr;\uC000\u{1D4B1}dash;\u62AA\u0280cefos\u14A7\u14AC\u14B1\u14B6\u14BCirc;\u4174dge;\u62C0r;\uC000\u{1D51A}pf;\uC000\u{1D54E}cr;\uC000\u{1D4B2}\u0200fios\u14CB\u14D0\u14D2\u14D8r;\uC000\u{1D51B};\u439Epf;\uC000\u{1D54F}cr;\uC000\u{1D4B3}\u0480AIUacfosu\u14F1\u14F5\u14F9\u14FD\u1504\u150F\u1514\u151A\u1520cy;\u442Fcy;\u4407cy;\u442Ecute\u803B\xDD\u40DD\u0100iy\u1509\u150Drc;\u4176;\u442Br;\uC000\u{1D51C}pf;\uC000\u{1D550}cr;\uC000\u{1D4B4}ml;\u4178\u0400Hacdefos\u1535\u1539\u153F\u154B\u154F\u155D\u1560\u1564cy;\u4416cute;\u4179\u0100ay\u1544\u1549ron;\u417D;\u4417ot;\u417B\u01F2\u1554\0\u155BoWidt\xE8\u0AD9a;\u4396r;\u6128pf;\u6124cr;\uC000\u{1D4B5}\u0BE1\u1583\u158A\u1590\0\u15B0\u15B6\u15BF\0\0\0\0\u15C6\u15DB\u15EB\u165F\u166D\0\u1695\u169B\u16B2\u16B9\0\u16BEcute\u803B\xE1\u40E1reve;\u4103\u0300;Ediuy\u159C\u159D\u15A1\u15A3\u15A8\u15AD\u623E;\uC000\u223E\u0333;\u623Frc\u803B\xE2\u40E2te\u80BB\xB4\u0306;\u4430lig\u803B\xE6\u40E6\u0100;r\xB2\u15BA;\uC000\u{1D51E}rave\u803B\xE0\u40E0\u0100ep\u15CA\u15D6\u0100fp\u15CF\u15D4sym;\u6135\xE8\u15D3ha;\u43B1\u0100ap\u15DFc\u0100cl\u15E4\u15E7r;\u4101g;\u6A3F\u0264\u15F0\0\0\u160A\u0280;adsv\u15FA\u15FB\u15FF\u1601\u1607\u6227nd;\u6A55;\u6A5Clope;\u6A58;\u6A5A\u0380;elmrsz\u1618\u1619\u161B\u161E\u163F\u164F\u1659\u6220;\u69A4e\xBB\u1619sd\u0100;a\u1625\u1626\u6221\u0461\u1630\u1632\u1634\u1636\u1638\u163A\u163C\u163E;\u69A8;\u69A9;\u69AA;\u69AB;\u69AC;\u69AD;\u69AE;\u69AFt\u0100;v\u1645\u1646\u621Fb\u0100;d\u164C\u164D\u62BE;\u699D\u0100pt\u1654\u1657h;\u6222\xBB\xB9arr;\u637C\u0100gp\u1663\u1667on;\u4105f;\uC000\u{1D552}\u0380;Eaeiop\u12C1\u167B\u167D\u1682\u1684\u1687\u168A;\u6A70cir;\u6A6F;\u624Ad;\u624Bs;\u4027rox\u0100;e\u12C1\u1692\xF1\u1683ing\u803B\xE5\u40E5\u0180cty\u16A1\u16A6\u16A8r;\uC000\u{1D4B6};\u402Amp\u0100;e\u12C1\u16AF\xF1\u0288ilde\u803B\xE3\u40E3ml\u803B\xE4\u40E4\u0100ci\u16C2\u16C8onin\xF4\u0272nt;\u6A11\u0800Nabcdefiklnoprsu\u16ED\u16F1\u1730\u173C\u1743\u1748\u1778\u177D\u17E0\u17E6\u1839\u1850\u170D\u193D\u1948\u1970ot;\u6AED\u0100cr\u16F6\u171Ek\u0200ceps\u1700\u1705\u170D\u1713ong;\u624Cpsilon;\u43F6rime;\u6035im\u0100;e\u171A\u171B\u623Dq;\u62CD\u0176\u1722\u1726ee;\u62BDed\u0100;g\u172C\u172D\u6305e\xBB\u172Drk\u0100;t\u135C\u1737brk;\u63B6\u0100oy\u1701\u1741;\u4431quo;\u601E\u0280cmprt\u1753\u175B\u1761\u1764\u1768aus\u0100;e\u010A\u0109ptyv;\u69B0s\xE9\u170Cno\xF5\u0113\u0180ahw\u176F\u1771\u1773;\u43B2;\u6136een;\u626Cr;\uC000\u{1D51F}g\u0380costuvw\u178D\u179D\u17B3\u17C1\u17D5\u17DB\u17DE\u0180aiu\u1794\u1796\u179A\xF0\u0760rc;\u65EFp\xBB\u1371\u0180dpt\u17A4\u17A8\u17ADot;\u6A00lus;\u6A01imes;\u6A02\u0271\u17B9\0\0\u17BEcup;\u6A06ar;\u6605riangle\u0100du\u17CD\u17D2own;\u65BDp;\u65B3plus;\u6A04e\xE5\u1444\xE5\u14ADarow;\u690D\u0180ako\u17ED\u1826\u1835\u0100cn\u17F2\u1823k\u0180lst\u17FA\u05AB\u1802ozenge;\u69EBriangle\u0200;dlr\u1812\u1813\u1818\u181D\u65B4own;\u65BEeft;\u65C2ight;\u65B8k;\u6423\u01B1\u182B\0\u1833\u01B2\u182F\0\u1831;\u6592;\u65914;\u6593ck;\u6588\u0100eo\u183E\u184D\u0100;q\u1843\u1846\uC000=\u20E5uiv;\uC000\u2261\u20E5t;\u6310\u0200ptwx\u1859\u185E\u1867\u186Cf;\uC000\u{1D553}\u0100;t\u13CB\u1863om\xBB\u13CCtie;\u62C8\u0600DHUVbdhmptuv\u1885\u1896\u18AA\u18BB\u18D7\u18DB\u18EC\u18FF\u1905\u190A\u1910\u1921\u0200LRlr\u188E\u1890\u1892\u1894;\u6557;\u6554;\u6556;\u6553\u0280;DUdu\u18A1\u18A2\u18A4\u18A6\u18A8\u6550;\u6566;\u6569;\u6564;\u6567\u0200LRlr\u18B3\u18B5\u18B7\u18B9;\u655D;\u655A;\u655C;\u6559\u0380;HLRhlr\u18CA\u18CB\u18CD\u18CF\u18D1\u18D3\u18D5\u6551;\u656C;\u6563;\u6560;\u656B;\u6562;\u655Fox;\u69C9\u0200LRlr\u18E4\u18E6\u18E8\u18EA;\u6555;\u6552;\u6510;\u650C\u0280;DUdu\u06BD\u18F7\u18F9\u18FB\u18FD;\u6565;\u6568;\u652C;\u6534inus;\u629Flus;\u629Eimes;\u62A0\u0200LRlr\u1919\u191B\u191D\u191F;\u655B;\u6558;\u6518;\u6514\u0380;HLRhlr\u1930\u1931\u1933\u1935\u1937\u1939\u193B\u6502;\u656A;\u6561;\u655E;\u653C;\u6524;\u651C\u0100ev\u0123\u1942bar\u803B\xA6\u40A6\u0200ceio\u1951\u1956\u195A\u1960r;\uC000\u{1D4B7}mi;\u604Fm\u0100;e\u171A\u171Cl\u0180;bh\u1968\u1969\u196B\u405C;\u69C5sub;\u67C8\u016C\u1974\u197El\u0100;e\u1979\u197A\u6022t\xBB\u197Ap\u0180;Ee\u012F\u1985\u1987;\u6AAE\u0100;q\u06DC\u06DB\u0CE1\u19A7\0\u19E8\u1A11\u1A15\u1A32\0\u1A37\u1A50\0\0\u1AB4\0\0\u1AC1\0\0\u1B21\u1B2E\u1B4D\u1B52\0\u1BFD\0\u1C0C\u0180cpr\u19AD\u19B2\u19DDute;\u4107\u0300;abcds\u19BF\u19C0\u19C4\u19CA\u19D5\u19D9\u6229nd;\u6A44rcup;\u6A49\u0100au\u19CF\u19D2p;\u6A4Bp;\u6A47ot;\u6A40;\uC000\u2229\uFE00\u0100eo\u19E2\u19E5t;\u6041\xEE\u0693\u0200aeiu\u19F0\u19FB\u1A01\u1A05\u01F0\u19F5\0\u19F8s;\u6A4Don;\u410Ddil\u803B\xE7\u40E7rc;\u4109ps\u0100;s\u1A0C\u1A0D\u6A4Cm;\u6A50ot;\u410B\u0180dmn\u1A1B\u1A20\u1A26il\u80BB\xB8\u01ADptyv;\u69B2t\u8100\xA2;e\u1A2D\u1A2E\u40A2r\xE4\u01B2r;\uC000\u{1D520}\u0180cei\u1A3D\u1A40\u1A4Dy;\u4447ck\u0100;m\u1A47\u1A48\u6713ark\xBB\u1A48;\u43C7r\u0380;Ecefms\u1A5F\u1A60\u1A62\u1A6B\u1AA4\u1AAA\u1AAE\u65CB;\u69C3\u0180;el\u1A69\u1A6A\u1A6D\u42C6q;\u6257e\u0261\u1A74\0\0\u1A88rrow\u0100lr\u1A7C\u1A81eft;\u61BAight;\u61BB\u0280RSacd\u1A92\u1A94\u1A96\u1A9A\u1A9F\xBB\u0F47;\u64C8st;\u629Birc;\u629Aash;\u629Dnint;\u6A10id;\u6AEFcir;\u69C2ubs\u0100;u\u1ABB\u1ABC\u6663it\xBB\u1ABC\u02EC\u1AC7\u1AD4\u1AFA\0\u1B0Aon\u0100;e\u1ACD\u1ACE\u403A\u0100;q\xC7\xC6\u026D\u1AD9\0\0\u1AE2a\u0100;t\u1ADE\u1ADF\u402C;\u4040\u0180;fl\u1AE8\u1AE9\u1AEB\u6201\xEE\u1160e\u0100mx\u1AF1\u1AF6ent\xBB\u1AE9e\xF3\u024D\u01E7\u1AFE\0\u1B07\u0100;d\u12BB\u1B02ot;\u6A6Dn\xF4\u0246\u0180fry\u1B10\u1B14\u1B17;\uC000\u{1D554}o\xE4\u0254\u8100\xA9;s\u0155\u1B1Dr;\u6117\u0100ao\u1B25\u1B29rr;\u61B5ss;\u6717\u0100cu\u1B32\u1B37r;\uC000\u{1D4B8}\u0100bp\u1B3C\u1B44\u0100;e\u1B41\u1B42\u6ACF;\u6AD1\u0100;e\u1B49\u1B4A\u6AD0;\u6AD2dot;\u62EF\u0380delprvw\u1B60\u1B6C\u1B77\u1B82\u1BAC\u1BD4\u1BF9arr\u0100lr\u1B68\u1B6A;\u6938;\u6935\u0270\u1B72\0\0\u1B75r;\u62DEc;\u62DFarr\u0100;p\u1B7F\u1B80\u61B6;\u693D\u0300;bcdos\u1B8F\u1B90\u1B96\u1BA1\u1BA5\u1BA8\u622Arcap;\u6A48\u0100au\u1B9B\u1B9Ep;\u6A46p;\u6A4Aot;\u628Dr;\u6A45;\uC000\u222A\uFE00\u0200alrv\u1BB5\u1BBF\u1BDE\u1BE3rr\u0100;m\u1BBC\u1BBD\u61B7;\u693Cy\u0180evw\u1BC7\u1BD4\u1BD8q\u0270\u1BCE\0\0\u1BD2re\xE3\u1B73u\xE3\u1B75ee;\u62CEedge;\u62CFen\u803B\xA4\u40A4earrow\u0100lr\u1BEE\u1BF3eft\xBB\u1B80ight\xBB\u1BBDe\xE4\u1BDD\u0100ci\u1C01\u1C07onin\xF4\u01F7nt;\u6231lcty;\u632D\u0980AHabcdefhijlorstuwz\u1C38\u1C3B\u1C3F\u1C5D\u1C69\u1C75\u1C8A\u1C9E\u1CAC\u1CB7\u1CFB\u1CFF\u1D0D\u1D7B\u1D91\u1DAB\u1DBB\u1DC6\u1DCDr\xF2\u0381ar;\u6965\u0200glrs\u1C48\u1C4D\u1C52\u1C54ger;\u6020eth;\u6138\xF2\u1133h\u0100;v\u1C5A\u1C5B\u6010\xBB\u090A\u016B\u1C61\u1C67arow;\u690Fa\xE3\u0315\u0100ay\u1C6E\u1C73ron;\u410F;\u4434\u0180;ao\u0332\u1C7C\u1C84\u0100gr\u02BF\u1C81r;\u61CAtseq;\u6A77\u0180glm\u1C91\u1C94\u1C98\u803B\xB0\u40B0ta;\u43B4ptyv;\u69B1\u0100ir\u1CA3\u1CA8sht;\u697F;\uC000\u{1D521}ar\u0100lr\u1CB3\u1CB5\xBB\u08DC\xBB\u101E\u0280aegsv\u1CC2\u0378\u1CD6\u1CDC\u1CE0m\u0180;os\u0326\u1CCA\u1CD4nd\u0100;s\u0326\u1CD1uit;\u6666amma;\u43DDin;\u62F2\u0180;io\u1CE7\u1CE8\u1CF8\u40F7de\u8100\xF7;o\u1CE7\u1CF0ntimes;\u62C7n\xF8\u1CF7cy;\u4452c\u026F\u1D06\0\0\u1D0Arn;\u631Eop;\u630D\u0280lptuw\u1D18\u1D1D\u1D22\u1D49\u1D55lar;\u4024f;\uC000\u{1D555}\u0280;emps\u030B\u1D2D\u1D37\u1D3D\u1D42q\u0100;d\u0352\u1D33ot;\u6251inus;\u6238lus;\u6214quare;\u62A1blebarwedg\xE5\xFAn\u0180adh\u112E\u1D5D\u1D67ownarrow\xF3\u1C83arpoon\u0100lr\u1D72\u1D76ef\xF4\u1CB4igh\xF4\u1CB6\u0162\u1D7F\u1D85karo\xF7\u0F42\u026F\u1D8A\0\0\u1D8Ern;\u631Fop;\u630C\u0180cot\u1D98\u1DA3\u1DA6\u0100ry\u1D9D\u1DA1;\uC000\u{1D4B9};\u4455l;\u69F6rok;\u4111\u0100dr\u1DB0\u1DB4ot;\u62F1i\u0100;f\u1DBA\u1816\u65BF\u0100ah\u1DC0\u1DC3r\xF2\u0429a\xF2\u0FA6angle;\u69A6\u0100ci\u1DD2\u1DD5y;\u445Fgrarr;\u67FF\u0900Dacdefglmnopqrstux\u1E01\u1E09\u1E19\u1E38\u0578\u1E3C\u1E49\u1E61\u1E7E\u1EA5\u1EAF\u1EBD\u1EE1\u1F2A\u1F37\u1F44\u1F4E\u1F5A\u0100Do\u1E06\u1D34o\xF4\u1C89\u0100cs\u1E0E\u1E14ute\u803B\xE9\u40E9ter;\u6A6E\u0200aioy\u1E22\u1E27\u1E31\u1E36ron;\u411Br\u0100;c\u1E2D\u1E2E\u6256\u803B\xEA\u40EAlon;\u6255;\u444Dot;\u4117\u0100Dr\u1E41\u1E45ot;\u6252;\uC000\u{1D522}\u0180;rs\u1E50\u1E51\u1E57\u6A9Aave\u803B\xE8\u40E8\u0100;d\u1E5C\u1E5D\u6A96ot;\u6A98\u0200;ils\u1E6A\u1E6B\u1E72\u1E74\u6A99nters;\u63E7;\u6113\u0100;d\u1E79\u1E7A\u6A95ot;\u6A97\u0180aps\u1E85\u1E89\u1E97cr;\u4113ty\u0180;sv\u1E92\u1E93\u1E95\u6205et\xBB\u1E93p\u01001;\u1E9D\u1EA4\u0133\u1EA1\u1EA3;\u6004;\u6005\u6003\u0100gs\u1EAA\u1EAC;\u414Bp;\u6002\u0100gp\u1EB4\u1EB8on;\u4119f;\uC000\u{1D556}\u0180als\u1EC4\u1ECE\u1ED2r\u0100;s\u1ECA\u1ECB\u62D5l;\u69E3us;\u6A71i\u0180;lv\u1EDA\u1EDB\u1EDF\u43B5on\xBB\u1EDB;\u43F5\u0200csuv\u1EEA\u1EF3\u1F0B\u1F23\u0100io\u1EEF\u1E31rc\xBB\u1E2E\u0269\u1EF9\0\0\u1EFB\xED\u0548ant\u0100gl\u1F02\u1F06tr\xBB\u1E5Dess\xBB\u1E7A\u0180aei\u1F12\u1F16\u1F1Als;\u403Dst;\u625Fv\u0100;D\u0235\u1F20D;\u6A78parsl;\u69E5\u0100Da\u1F2F\u1F33ot;\u6253rr;\u6971\u0180cdi\u1F3E\u1F41\u1EF8r;\u612Fo\xF4\u0352\u0100ah\u1F49\u1F4B;\u43B7\u803B\xF0\u40F0\u0100mr\u1F53\u1F57l\u803B\xEB\u40EBo;\u60AC\u0180cip\u1F61\u1F64\u1F67l;\u4021s\xF4\u056E\u0100eo\u1F6C\u1F74ctatio\xEE\u0559nential\xE5\u0579\u09E1\u1F92\0\u1F9E\0\u1FA1\u1FA7\0\0\u1FC6\u1FCC\0\u1FD3\0\u1FE6\u1FEA\u2000\0\u2008\u205Allingdotse\xF1\u1E44y;\u4444male;\u6640\u0180ilr\u1FAD\u1FB3\u1FC1lig;\u8000\uFB03\u0269\u1FB9\0\0\u1FBDg;\u8000\uFB00ig;\u8000\uFB04;\uC000\u{1D523}lig;\u8000\uFB01lig;\uC000fj\u0180alt\u1FD9\u1FDC\u1FE1t;\u666Dig;\u8000\uFB02ns;\u65B1of;\u4192\u01F0\u1FEE\0\u1FF3f;\uC000\u{1D557}\u0100ak\u05BF\u1FF7\u0100;v\u1FFC\u1FFD\u62D4;\u6AD9artint;\u6A0D\u0100ao\u200C\u2055\u0100cs\u2011\u2052\u03B1\u201A\u2030\u2038\u2045\u2048\0\u2050\u03B2\u2022\u2025\u2027\u202A\u202C\0\u202E\u803B\xBD\u40BD;\u6153\u803B\xBC\u40BC;\u6155;\u6159;\u615B\u01B3\u2034\0\u2036;\u6154;\u6156\u02B4\u203E\u2041\0\0\u2043\u803B\xBE\u40BE;\u6157;\u615C5;\u6158\u01B6\u204C\0\u204E;\u615A;\u615D8;\u615El;\u6044wn;\u6322cr;\uC000\u{1D4BB}\u0880Eabcdefgijlnorstv\u2082\u2089\u209F\u20A5\u20B0\u20B4\u20F0\u20F5\u20FA\u20FF\u2103\u2112\u2138\u0317\u213E\u2152\u219E\u0100;l\u064D\u2087;\u6A8C\u0180cmp\u2090\u2095\u209Dute;\u41F5ma\u0100;d\u209C\u1CDA\u43B3;\u6A86reve;\u411F\u0100iy\u20AA\u20AErc;\u411D;\u4433ot;\u4121\u0200;lqs\u063E\u0642\u20BD\u20C9\u0180;qs\u063E\u064C\u20C4lan\xF4\u0665\u0200;cdl\u0665\u20D2\u20D5\u20E5c;\u6AA9ot\u0100;o\u20DC\u20DD\u6A80\u0100;l\u20E2\u20E3\u6A82;\u6A84\u0100;e\u20EA\u20ED\uC000\u22DB\uFE00s;\u6A94r;\uC000\u{1D524}\u0100;g\u0673\u061Bmel;\u6137cy;\u4453\u0200;Eaj\u065A\u210C\u210E\u2110;\u6A92;\u6AA5;\u6AA4\u0200Eaes\u211B\u211D\u2129\u2134;\u6269p\u0100;p\u2123\u2124\u6A8Arox\xBB\u2124\u0100;q\u212E\u212F\u6A88\u0100;q\u212E\u211Bim;\u62E7pf;\uC000\u{1D558}\u0100ci\u2143\u2146r;\u610Am\u0180;el\u066B\u214E\u2150;\u6A8E;\u6A90\u8300>;cdlqr\u05EE\u2160\u216A\u216E\u2173\u2179\u0100ci\u2165\u2167;\u6AA7r;\u6A7Aot;\u62D7Par;\u6995uest;\u6A7C\u0280adels\u2184\u216A\u2190\u0656\u219B\u01F0\u2189\0\u218Epro\xF8\u209Er;\u6978q\u0100lq\u063F\u2196les\xF3\u2088i\xED\u066B\u0100en\u21A3\u21ADrtneqq;\uC000\u2269\uFE00\xC5\u21AA\u0500Aabcefkosy\u21C4\u21C7\u21F1\u21F5\u21FA\u2218\u221D\u222F\u2268\u227Dr\xF2\u03A0\u0200ilmr\u21D0\u21D4\u21D7\u21DBrs\xF0\u1484f\xBB\u2024il\xF4\u06A9\u0100dr\u21E0\u21E4cy;\u444A\u0180;cw\u08F4\u21EB\u21EFir;\u6948;\u61ADar;\u610Firc;\u4125\u0180alr\u2201\u220E\u2213rts\u0100;u\u2209\u220A\u6665it\xBB\u220Alip;\u6026con;\u62B9r;\uC000\u{1D525}s\u0100ew\u2223\u2229arow;\u6925arow;\u6926\u0280amopr\u223A\u223E\u2243\u225E\u2263rr;\u61FFtht;\u623Bk\u0100lr\u2249\u2253eftarrow;\u61A9ightarrow;\u61AAf;\uC000\u{1D559}bar;\u6015\u0180clt\u226F\u2274\u2278r;\uC000\u{1D4BD}as\xE8\u21F4rok;\u4127\u0100bp\u2282\u2287ull;\u6043hen\xBB\u1C5B\u0AE1\u22A3\0\u22AA\0\u22B8\u22C5\u22CE\0\u22D5\u22F3\0\0\u22F8\u2322\u2367\u2362\u237F\0\u2386\u23AA\u23B4cute\u803B\xED\u40ED\u0180;iy\u0771\u22B0\u22B5rc\u803B\xEE\u40EE;\u4438\u0100cx\u22BC\u22BFy;\u4435cl\u803B\xA1\u40A1\u0100fr\u039F\u22C9;\uC000\u{1D526}rave\u803B\xEC\u40EC\u0200;ino\u073E\u22DD\u22E9\u22EE\u0100in\u22E2\u22E6nt;\u6A0Ct;\u622Dfin;\u69DCta;\u6129lig;\u4133\u0180aop\u22FE\u231A\u231D\u0180cgt\u2305\u2308\u2317r;\u412B\u0180elp\u071F\u230F\u2313in\xE5\u078Ear\xF4\u0720h;\u4131f;\u62B7ed;\u41B5\u0280;cfot\u04F4\u232C\u2331\u233D\u2341are;\u6105in\u0100;t\u2338\u2339\u621Eie;\u69DDdo\xF4\u2319\u0280;celp\u0757\u234C\u2350\u235B\u2361al;\u62BA\u0100gr\u2355\u2359er\xF3\u1563\xE3\u234Darhk;\u6A17rod;\u6A3C\u0200cgpt\u236F\u2372\u2376\u237By;\u4451on;\u412Ff;\uC000\u{1D55A}a;\u43B9uest\u803B\xBF\u40BF\u0100ci\u238A\u238Fr;\uC000\u{1D4BE}n\u0280;Edsv\u04F4\u239B\u239D\u23A1\u04F3;\u62F9ot;\u62F5\u0100;v\u23A6\u23A7\u62F4;\u62F3\u0100;i\u0777\u23AElde;\u4129\u01EB\u23B8\0\u23BCcy;\u4456l\u803B\xEF\u40EF\u0300cfmosu\u23CC\u23D7\u23DC\u23E1\u23E7\u23F5\u0100iy\u23D1\u23D5rc;\u4135;\u4439r;\uC000\u{1D527}ath;\u4237pf;\uC000\u{1D55B}\u01E3\u23EC\0\u23F1r;\uC000\u{1D4BF}rcy;\u4458kcy;\u4454\u0400acfghjos\u240B\u2416\u2422\u2427\u242D\u2431\u2435\u243Bppa\u0100;v\u2413\u2414\u43BA;\u43F0\u0100ey\u241B\u2420dil;\u4137;\u443Ar;\uC000\u{1D528}reen;\u4138cy;\u4445cy;\u445Cpf;\uC000\u{1D55C}cr;\uC000\u{1D4C0}\u0B80ABEHabcdefghjlmnoprstuv\u2470\u2481\u2486\u248D\u2491\u250E\u253D\u255A\u2580\u264E\u265E\u2665\u2679\u267D\u269A\u26B2\u26D8\u275D\u2768\u278B\u27C0\u2801\u2812\u0180art\u2477\u247A\u247Cr\xF2\u09C6\xF2\u0395ail;\u691Barr;\u690E\u0100;g\u0994\u248B;\u6A8Bar;\u6962\u0963\u24A5\0\u24AA\0\u24B1\0\0\0\0\0\u24B5\u24BA\0\u24C6\u24C8\u24CD\0\u24F9ute;\u413Amptyv;\u69B4ra\xEE\u084Cbda;\u43BBg\u0180;dl\u088E\u24C1\u24C3;\u6991\xE5\u088E;\u6A85uo\u803B\xAB\u40ABr\u0400;bfhlpst\u0899\u24DE\u24E6\u24E9\u24EB\u24EE\u24F1\u24F5\u0100;f\u089D\u24E3s;\u691Fs;\u691D\xEB\u2252p;\u61ABl;\u6939im;\u6973l;\u61A2\u0180;ae\u24FF\u2500\u2504\u6AABil;\u6919\u0100;s\u2509\u250A\u6AAD;\uC000\u2AAD\uFE00\u0180abr\u2515\u2519\u251Drr;\u690Crk;\u6772\u0100ak\u2522\u252Cc\u0100ek\u2528\u252A;\u407B;\u405B\u0100es\u2531\u2533;\u698Bl\u0100du\u2539\u253B;\u698F;\u698D\u0200aeuy\u2546\u254B\u2556\u2558ron;\u413E\u0100di\u2550\u2554il;\u413C\xEC\u08B0\xE2\u2529;\u443B\u0200cqrs\u2563\u2566\u256D\u257Da;\u6936uo\u0100;r\u0E19\u1746\u0100du\u2572\u2577har;\u6967shar;\u694Bh;\u61B2\u0280;fgqs\u258B\u258C\u0989\u25F3\u25FF\u6264t\u0280ahlrt\u2598\u25A4\u25B7\u25C2\u25E8rrow\u0100;t\u0899\u25A1a\xE9\u24F6arpoon\u0100du\u25AF\u25B4own\xBB\u045Ap\xBB\u0966eftarrows;\u61C7ight\u0180ahs\u25CD\u25D6\u25DErrow\u0100;s\u08F4\u08A7arpoon\xF3\u0F98quigarro\xF7\u21F0hreetimes;\u62CB\u0180;qs\u258B\u0993\u25FAlan\xF4\u09AC\u0280;cdgs\u09AC\u260A\u260D\u261D\u2628c;\u6AA8ot\u0100;o\u2614\u2615\u6A7F\u0100;r\u261A\u261B\u6A81;\u6A83\u0100;e\u2622\u2625\uC000\u22DA\uFE00s;\u6A93\u0280adegs\u2633\u2639\u263D\u2649\u264Bppro\xF8\u24C6ot;\u62D6q\u0100gq\u2643\u2645\xF4\u0989gt\xF2\u248C\xF4\u099Bi\xED\u09B2\u0180ilr\u2655\u08E1\u265Asht;\u697C;\uC000\u{1D529}\u0100;E\u099C\u2663;\u6A91\u0161\u2669\u2676r\u0100du\u25B2\u266E\u0100;l\u0965\u2673;\u696Alk;\u6584cy;\u4459\u0280;acht\u0A48\u2688\u268B\u2691\u2696r\xF2\u25C1orne\xF2\u1D08ard;\u696Bri;\u65FA\u0100io\u269F\u26A4dot;\u4140ust\u0100;a\u26AC\u26AD\u63B0che\xBB\u26AD\u0200Eaes\u26BB\u26BD\u26C9\u26D4;\u6268p\u0100;p\u26C3\u26C4\u6A89rox\xBB\u26C4\u0100;q\u26CE\u26CF\u6A87\u0100;q\u26CE\u26BBim;\u62E6\u0400abnoptwz\u26E9\u26F4\u26F7\u271A\u272F\u2741\u2747\u2750\u0100nr\u26EE\u26F1g;\u67ECr;\u61FDr\xEB\u08C1g\u0180lmr\u26FF\u270D\u2714eft\u0100ar\u09E6\u2707ight\xE1\u09F2apsto;\u67FCight\xE1\u09FDparrow\u0100lr\u2725\u2729ef\xF4\u24EDight;\u61AC\u0180afl\u2736\u2739\u273Dr;\u6985;\uC000\u{1D55D}us;\u6A2Dimes;\u6A34\u0161\u274B\u274Fst;\u6217\xE1\u134E\u0180;ef\u2757\u2758\u1800\u65CAnge\xBB\u2758ar\u0100;l\u2764\u2765\u4028t;\u6993\u0280achmt\u2773\u2776\u277C\u2785\u2787r\xF2\u08A8orne\xF2\u1D8Car\u0100;d\u0F98\u2783;\u696D;\u600Eri;\u62BF\u0300achiqt\u2798\u279D\u0A40\u27A2\u27AE\u27BBquo;\u6039r;\uC000\u{1D4C1}m\u0180;eg\u09B2\u27AA\u27AC;\u6A8D;\u6A8F\u0100bu\u252A\u27B3o\u0100;r\u0E1F\u27B9;\u601Arok;\u4142\u8400<;cdhilqr\u082B\u27D2\u2639\u27DC\u27E0\u27E5\u27EA\u27F0\u0100ci\u27D7\u27D9;\u6AA6r;\u6A79re\xE5\u25F2mes;\u62C9arr;\u6976uest;\u6A7B\u0100Pi\u27F5\u27F9ar;\u6996\u0180;ef\u2800\u092D\u181B\u65C3r\u0100du\u2807\u280Dshar;\u694Ahar;\u6966\u0100en\u2817\u2821rtneqq;\uC000\u2268\uFE00\xC5\u281E\u0700Dacdefhilnopsu\u2840\u2845\u2882\u288E\u2893\u28A0\u28A5\u28A8\u28DA\u28E2\u28E4\u0A83\u28F3\u2902Dot;\u623A\u0200clpr\u284E\u2852\u2863\u287Dr\u803B\xAF\u40AF\u0100et\u2857\u2859;\u6642\u0100;e\u285E\u285F\u6720se\xBB\u285F\u0100;s\u103B\u2868to\u0200;dlu\u103B\u2873\u2877\u287Bow\xEE\u048Cef\xF4\u090F\xF0\u13D1ker;\u65AE\u0100oy\u2887\u288Cmma;\u6A29;\u443Cash;\u6014asuredangle\xBB\u1626r;\uC000\u{1D52A}o;\u6127\u0180cdn\u28AF\u28B4\u28C9ro\u803B\xB5\u40B5\u0200;acd\u1464\u28BD\u28C0\u28C4s\xF4\u16A7ir;\u6AF0ot\u80BB\xB7\u01B5us\u0180;bd\u28D2\u1903\u28D3\u6212\u0100;u\u1D3C\u28D8;\u6A2A\u0163\u28DE\u28E1p;\u6ADB\xF2\u2212\xF0\u0A81\u0100dp\u28E9\u28EEels;\u62A7f;\uC000\u{1D55E}\u0100ct\u28F8\u28FDr;\uC000\u{1D4C2}pos\xBB\u159D\u0180;lm\u2909\u290A\u290D\u43BCtimap;\u62B8\u0C00GLRVabcdefghijlmoprstuvw\u2942\u2953\u297E\u2989\u2998\u29DA\u29E9\u2A15\u2A1A\u2A58\u2A5D\u2A83\u2A95\u2AA4\u2AA8\u2B04\u2B07\u2B44\u2B7F\u2BAE\u2C34\u2C67\u2C7C\u2CE9\u0100gt\u2947\u294B;\uC000\u22D9\u0338\u0100;v\u2950\u0BCF\uC000\u226B\u20D2\u0180elt\u295A\u2972\u2976ft\u0100ar\u2961\u2967rrow;\u61CDightarrow;\u61CE;\uC000\u22D8\u0338\u0100;v\u297B\u0C47\uC000\u226A\u20D2ightarrow;\u61CF\u0100Dd\u298E\u2993ash;\u62AFash;\u62AE\u0280bcnpt\u29A3\u29A7\u29AC\u29B1\u29CCla\xBB\u02DEute;\u4144g;\uC000\u2220\u20D2\u0280;Eiop\u0D84\u29BC\u29C0\u29C5\u29C8;\uC000\u2A70\u0338d;\uC000\u224B\u0338s;\u4149ro\xF8\u0D84ur\u0100;a\u29D3\u29D4\u666El\u0100;s\u29D3\u0B38\u01F3\u29DF\0\u29E3p\u80BB\xA0\u0B37mp\u0100;e\u0BF9\u0C00\u0280aeouy\u29F4\u29FE\u2A03\u2A10\u2A13\u01F0\u29F9\0\u29FB;\u6A43on;\u4148dil;\u4146ng\u0100;d\u0D7E\u2A0Aot;\uC000\u2A6D\u0338p;\u6A42;\u443Dash;\u6013\u0380;Aadqsx\u0B92\u2A29\u2A2D\u2A3B\u2A41\u2A45\u2A50rr;\u61D7r\u0100hr\u2A33\u2A36k;\u6924\u0100;o\u13F2\u13F0ot;\uC000\u2250\u0338ui\xF6\u0B63\u0100ei\u2A4A\u2A4Ear;\u6928\xED\u0B98ist\u0100;s\u0BA0\u0B9Fr;\uC000\u{1D52B}\u0200Eest\u0BC5\u2A66\u2A79\u2A7C\u0180;qs\u0BBC\u2A6D\u0BE1\u0180;qs\u0BBC\u0BC5\u2A74lan\xF4\u0BE2i\xED\u0BEA\u0100;r\u0BB6\u2A81\xBB\u0BB7\u0180Aap\u2A8A\u2A8D\u2A91r\xF2\u2971rr;\u61AEar;\u6AF2\u0180;sv\u0F8D\u2A9C\u0F8C\u0100;d\u2AA1\u2AA2\u62FC;\u62FAcy;\u445A\u0380AEadest\u2AB7\u2ABA\u2ABE\u2AC2\u2AC5\u2AF6\u2AF9r\xF2\u2966;\uC000\u2266\u0338rr;\u619Ar;\u6025\u0200;fqs\u0C3B\u2ACE\u2AE3\u2AEFt\u0100ar\u2AD4\u2AD9rro\xF7\u2AC1ightarro\xF7\u2A90\u0180;qs\u0C3B\u2ABA\u2AEAlan\xF4\u0C55\u0100;s\u0C55\u2AF4\xBB\u0C36i\xED\u0C5D\u0100;r\u0C35\u2AFEi\u0100;e\u0C1A\u0C25i\xE4\u0D90\u0100pt\u2B0C\u2B11f;\uC000\u{1D55F}\u8180\xAC;in\u2B19\u2B1A\u2B36\u40ACn\u0200;Edv\u0B89\u2B24\u2B28\u2B2E;\uC000\u22F9\u0338ot;\uC000\u22F5\u0338\u01E1\u0B89\u2B33\u2B35;\u62F7;\u62F6i\u0100;v\u0CB8\u2B3C\u01E1\u0CB8\u2B41\u2B43;\u62FE;\u62FD\u0180aor\u2B4B\u2B63\u2B69r\u0200;ast\u0B7B\u2B55\u2B5A\u2B5Flle\xEC\u0B7Bl;\uC000\u2AFD\u20E5;\uC000\u2202\u0338lint;\u6A14\u0180;ce\u0C92\u2B70\u2B73u\xE5\u0CA5\u0100;c\u0C98\u2B78\u0100;e\u0C92\u2B7D\xF1\u0C98\u0200Aait\u2B88\u2B8B\u2B9D\u2BA7r\xF2\u2988rr\u0180;cw\u2B94\u2B95\u2B99\u619B;\uC000\u2933\u0338;\uC000\u219D\u0338ghtarrow\xBB\u2B95ri\u0100;e\u0CCB\u0CD6\u0380chimpqu\u2BBD\u2BCD\u2BD9\u2B04\u0B78\u2BE4\u2BEF\u0200;cer\u0D32\u2BC6\u0D37\u2BC9u\xE5\u0D45;\uC000\u{1D4C3}ort\u026D\u2B05\0\0\u2BD6ar\xE1\u2B56m\u0100;e\u0D6E\u2BDF\u0100;q\u0D74\u0D73su\u0100bp\u2BEB\u2BED\xE5\u0CF8\xE5\u0D0B\u0180bcp\u2BF6\u2C11\u2C19\u0200;Ees\u2BFF\u2C00\u0D22\u2C04\u6284;\uC000\u2AC5\u0338et\u0100;e\u0D1B\u2C0Bq\u0100;q\u0D23\u2C00c\u0100;e\u0D32\u2C17\xF1\u0D38\u0200;Ees\u2C22\u2C23\u0D5F\u2C27\u6285;\uC000\u2AC6\u0338et\u0100;e\u0D58\u2C2Eq\u0100;q\u0D60\u2C23\u0200gilr\u2C3D\u2C3F\u2C45\u2C47\xEC\u0BD7lde\u803B\xF1\u40F1\xE7\u0C43iangle\u0100lr\u2C52\u2C5Ceft\u0100;e\u0C1A\u2C5A\xF1\u0C26ight\u0100;e\u0CCB\u2C65\xF1\u0CD7\u0100;m\u2C6C\u2C6D\u43BD\u0180;es\u2C74\u2C75\u2C79\u4023ro;\u6116p;\u6007\u0480DHadgilrs\u2C8F\u2C94\u2C99\u2C9E\u2CA3\u2CB0\u2CB6\u2CD3\u2CE3ash;\u62ADarr;\u6904p;\uC000\u224D\u20D2ash;\u62AC\u0100et\u2CA8\u2CAC;\uC000\u2265\u20D2;\uC000>\u20D2nfin;\u69DE\u0180Aet\u2CBD\u2CC1\u2CC5rr;\u6902;\uC000\u2264\u20D2\u0100;r\u2CCA\u2CCD\uC000<\u20D2ie;\uC000\u22B4\u20D2\u0100At\u2CD8\u2CDCrr;\u6903rie;\uC000\u22B5\u20D2im;\uC000\u223C\u20D2\u0180Aan\u2CF0\u2CF4\u2D02rr;\u61D6r\u0100hr\u2CFA\u2CFDk;\u6923\u0100;o\u13E7\u13E5ear;\u6927\u1253\u1A95\0\0\0\0\0\0\0\0\0\0\0\0\0\u2D2D\0\u2D38\u2D48\u2D60\u2D65\u2D72\u2D84\u1B07\0\0\u2D8D\u2DAB\0\u2DC8\u2DCE\0\u2DDC\u2E19\u2E2B\u2E3E\u2E43\u0100cs\u2D31\u1A97ute\u803B\xF3\u40F3\u0100iy\u2D3C\u2D45r\u0100;c\u1A9E\u2D42\u803B\xF4\u40F4;\u443E\u0280abios\u1AA0\u2D52\u2D57\u01C8\u2D5Alac;\u4151v;\u6A38old;\u69BClig;\u4153\u0100cr\u2D69\u2D6Dir;\u69BF;\uC000\u{1D52C}\u036F\u2D79\0\0\u2D7C\0\u2D82n;\u42DBave\u803B\xF2\u40F2;\u69C1\u0100bm\u2D88\u0DF4ar;\u69B5\u0200acit\u2D95\u2D98\u2DA5\u2DA8r\xF2\u1A80\u0100ir\u2D9D\u2DA0r;\u69BEoss;\u69BBn\xE5\u0E52;\u69C0\u0180aei\u2DB1\u2DB5\u2DB9cr;\u414Dga;\u43C9\u0180cdn\u2DC0\u2DC5\u01CDron;\u43BF;\u69B6pf;\uC000\u{1D560}\u0180ael\u2DD4\u2DD7\u01D2r;\u69B7rp;\u69B9\u0380;adiosv\u2DEA\u2DEB\u2DEE\u2E08\u2E0D\u2E10\u2E16\u6228r\xF2\u1A86\u0200;efm\u2DF7\u2DF8\u2E02\u2E05\u6A5Dr\u0100;o\u2DFE\u2DFF\u6134f\xBB\u2DFF\u803B\xAA\u40AA\u803B\xBA\u40BAgof;\u62B6r;\u6A56lope;\u6A57;\u6A5B\u0180clo\u2E1F\u2E21\u2E27\xF2\u2E01ash\u803B\xF8\u40F8l;\u6298i\u016C\u2E2F\u2E34de\u803B\xF5\u40F5es\u0100;a\u01DB\u2E3As;\u6A36ml\u803B\xF6\u40F6bar;\u633D\u0AE1\u2E5E\0\u2E7D\0\u2E80\u2E9D\0\u2EA2\u2EB9\0\0\u2ECB\u0E9C\0\u2F13\0\0\u2F2B\u2FBC\0\u2FC8r\u0200;ast\u0403\u2E67\u2E72\u0E85\u8100\xB6;l\u2E6D\u2E6E\u40B6le\xEC\u0403\u0269\u2E78\0\0\u2E7Bm;\u6AF3;\u6AFDy;\u443Fr\u0280cimpt\u2E8B\u2E8F\u2E93\u1865\u2E97nt;\u4025od;\u402Eil;\u6030enk;\u6031r;\uC000\u{1D52D}\u0180imo\u2EA8\u2EB0\u2EB4\u0100;v\u2EAD\u2EAE\u43C6;\u43D5ma\xF4\u0A76ne;\u660E\u0180;tv\u2EBF\u2EC0\u2EC8\u43C0chfork\xBB\u1FFD;\u43D6\u0100au\u2ECF\u2EDFn\u0100ck\u2ED5\u2EDDk\u0100;h\u21F4\u2EDB;\u610E\xF6\u21F4s\u0480;abcdemst\u2EF3\u2EF4\u1908\u2EF9\u2EFD\u2F04\u2F06\u2F0A\u2F0E\u402Bcir;\u6A23ir;\u6A22\u0100ou\u1D40\u2F02;\u6A25;\u6A72n\u80BB\xB1\u0E9Dim;\u6A26wo;\u6A27\u0180ipu\u2F19\u2F20\u2F25ntint;\u6A15f;\uC000\u{1D561}nd\u803B\xA3\u40A3\u0500;Eaceinosu\u0EC8\u2F3F\u2F41\u2F44\u2F47\u2F81\u2F89\u2F92\u2F7E\u2FB6;\u6AB3p;\u6AB7u\xE5\u0ED9\u0100;c\u0ECE\u2F4C\u0300;acens\u0EC8\u2F59\u2F5F\u2F66\u2F68\u2F7Eppro\xF8\u2F43urlye\xF1\u0ED9\xF1\u0ECE\u0180aes\u2F6F\u2F76\u2F7Approx;\u6AB9qq;\u6AB5im;\u62E8i\xED\u0EDFme\u0100;s\u2F88\u0EAE\u6032\u0180Eas\u2F78\u2F90\u2F7A\xF0\u2F75\u0180dfp\u0EEC\u2F99\u2FAF\u0180als\u2FA0\u2FA5\u2FAAlar;\u632Eine;\u6312urf;\u6313\u0100;t\u0EFB\u2FB4\xEF\u0EFBrel;\u62B0\u0100ci\u2FC0\u2FC5r;\uC000\u{1D4C5};\u43C8ncsp;\u6008\u0300fiopsu\u2FDA\u22E2\u2FDF\u2FE5\u2FEB\u2FF1r;\uC000\u{1D52E}pf;\uC000\u{1D562}rime;\u6057cr;\uC000\u{1D4C6}\u0180aeo\u2FF8\u3009\u3013t\u0100ei\u2FFE\u3005rnion\xF3\u06B0nt;\u6A16st\u0100;e\u3010\u3011\u403F\xF1\u1F19\xF4\u0F14\u0A80ABHabcdefhilmnoprstux\u3040\u3051\u3055\u3059\u30E0\u310E\u312B\u3147\u3162\u3172\u318E\u3206\u3215\u3224\u3229\u3258\u326E\u3272\u3290\u32B0\u32B7\u0180art\u3047\u304A\u304Cr\xF2\u10B3\xF2\u03DDail;\u691Car\xF2\u1C65ar;\u6964\u0380cdenqrt\u3068\u3075\u3078\u307F\u308F\u3094\u30CC\u0100eu\u306D\u3071;\uC000\u223D\u0331te;\u4155i\xE3\u116Emptyv;\u69B3g\u0200;del\u0FD1\u3089\u308B\u308D;\u6992;\u69A5\xE5\u0FD1uo\u803B\xBB\u40BBr\u0580;abcfhlpstw\u0FDC\u30AC\u30AF\u30B7\u30B9\u30BC\u30BE\u30C0\u30C3\u30C7\u30CAp;\u6975\u0100;f\u0FE0\u30B4s;\u6920;\u6933s;\u691E\xEB\u225D\xF0\u272El;\u6945im;\u6974l;\u61A3;\u619D\u0100ai\u30D1\u30D5il;\u691Ao\u0100;n\u30DB\u30DC\u6236al\xF3\u0F1E\u0180abr\u30E7\u30EA\u30EEr\xF2\u17E5rk;\u6773\u0100ak\u30F3\u30FDc\u0100ek\u30F9\u30FB;\u407D;\u405D\u0100es\u3102\u3104;\u698Cl\u0100du\u310A\u310C;\u698E;\u6990\u0200aeuy\u3117\u311C\u3127\u3129ron;\u4159\u0100di\u3121\u3125il;\u4157\xEC\u0FF2\xE2\u30FA;\u4440\u0200clqs\u3134\u3137\u313D\u3144a;\u6937dhar;\u6969uo\u0100;r\u020E\u020Dh;\u61B3\u0180acg\u314E\u315F\u0F44l\u0200;ips\u0F78\u3158\u315B\u109Cn\xE5\u10BBar\xF4\u0FA9t;\u65AD\u0180ilr\u3169\u1023\u316Esht;\u697D;\uC000\u{1D52F}\u0100ao\u3177\u3186r\u0100du\u317D\u317F\xBB\u047B\u0100;l\u1091\u3184;\u696C\u0100;v\u318B\u318C\u43C1;\u43F1\u0180gns\u3195\u31F9\u31FCht\u0300ahlrst\u31A4\u31B0\u31C2\u31D8\u31E4\u31EErrow\u0100;t\u0FDC\u31ADa\xE9\u30C8arpoon\u0100du\u31BB\u31BFow\xEE\u317Ep\xBB\u1092eft\u0100ah\u31CA\u31D0rrow\xF3\u0FEAarpoon\xF3\u0551ightarrows;\u61C9quigarro\xF7\u30CBhreetimes;\u62CCg;\u42DAingdotse\xF1\u1F32\u0180ahm\u320D\u3210\u3213r\xF2\u0FEAa\xF2\u0551;\u600Foust\u0100;a\u321E\u321F\u63B1che\xBB\u321Fmid;\u6AEE\u0200abpt\u3232\u323D\u3240\u3252\u0100nr\u3237\u323Ag;\u67EDr;\u61FEr\xEB\u1003\u0180afl\u3247\u324A\u324Er;\u6986;\uC000\u{1D563}us;\u6A2Eimes;\u6A35\u0100ap\u325D\u3267r\u0100;g\u3263\u3264\u4029t;\u6994olint;\u6A12ar\xF2\u31E3\u0200achq\u327B\u3280\u10BC\u3285quo;\u603Ar;\uC000\u{1D4C7}\u0100bu\u30FB\u328Ao\u0100;r\u0214\u0213\u0180hir\u3297\u329B\u32A0re\xE5\u31F8mes;\u62CAi\u0200;efl\u32AA\u1059\u1821\u32AB\u65B9tri;\u69CEluhar;\u6968;\u611E\u0D61\u32D5\u32DB\u32DF\u332C\u3338\u3371\0\u337A\u33A4\0\0\u33EC\u33F0\0\u3428\u3448\u345A\u34AD\u34B1\u34CA\u34F1\0\u3616\0\0\u3633cute;\u415Bqu\xEF\u27BA\u0500;Eaceinpsy\u11ED\u32F3\u32F5\u32FF\u3302\u330B\u330F\u331F\u3326\u3329;\u6AB4\u01F0\u32FA\0\u32FC;\u6AB8on;\u4161u\xE5\u11FE\u0100;d\u11F3\u3307il;\u415Frc;\u415D\u0180Eas\u3316\u3318\u331B;\u6AB6p;\u6ABAim;\u62E9olint;\u6A13i\xED\u1204;\u4441ot\u0180;be\u3334\u1D47\u3335\u62C5;\u6A66\u0380Aacmstx\u3346\u334A\u3357\u335B\u335E\u3363\u336Drr;\u61D8r\u0100hr\u3350\u3352\xEB\u2228\u0100;o\u0A36\u0A34t\u803B\xA7\u40A7i;\u403Bwar;\u6929m\u0100in\u3369\xF0nu\xF3\xF1t;\u6736r\u0100;o\u3376\u2055\uC000\u{1D530}\u0200acoy\u3382\u3386\u3391\u33A0rp;\u666F\u0100hy\u338B\u338Fcy;\u4449;\u4448rt\u026D\u3399\0\0\u339Ci\xE4\u1464ara\xEC\u2E6F\u803B\xAD\u40AD\u0100gm\u33A8\u33B4ma\u0180;fv\u33B1\u33B2\u33B2\u43C3;\u43C2\u0400;deglnpr\u12AB\u33C5\u33C9\u33CE\u33D6\u33DE\u33E1\u33E6ot;\u6A6A\u0100;q\u12B1\u12B0\u0100;E\u33D3\u33D4\u6A9E;\u6AA0\u0100;E\u33DB\u33DC\u6A9D;\u6A9Fe;\u6246lus;\u6A24arr;\u6972ar\xF2\u113D\u0200aeit\u33F8\u3408\u340F\u3417\u0100ls\u33FD\u3404lsetm\xE9\u336Ahp;\u6A33parsl;\u69E4\u0100dl\u1463\u3414e;\u6323\u0100;e\u341C\u341D\u6AAA\u0100;s\u3422\u3423\u6AAC;\uC000\u2AAC\uFE00\u0180flp\u342E\u3433\u3442tcy;\u444C\u0100;b\u3438\u3439\u402F\u0100;a\u343E\u343F\u69C4r;\u633Ff;\uC000\u{1D564}a\u0100dr\u344D\u0402es\u0100;u\u3454\u3455\u6660it\xBB\u3455\u0180csu\u3460\u3479\u349F\u0100au\u3465\u346Fp\u0100;s\u1188\u346B;\uC000\u2293\uFE00p\u0100;s\u11B4\u3475;\uC000\u2294\uFE00u\u0100bp\u347F\u348F\u0180;es\u1197\u119C\u3486et\u0100;e\u1197\u348D\xF1\u119D\u0180;es\u11A8\u11AD\u3496et\u0100;e\u11A8\u349D\xF1\u11AE\u0180;af\u117B\u34A6\u05B0r\u0165\u34AB\u05B1\xBB\u117Car\xF2\u1148\u0200cemt\u34B9\u34BE\u34C2\u34C5r;\uC000\u{1D4C8}tm\xEE\xF1i\xEC\u3415ar\xE6\u11BE\u0100ar\u34CE\u34D5r\u0100;f\u34D4\u17BF\u6606\u0100an\u34DA\u34EDight\u0100ep\u34E3\u34EApsilo\xEE\u1EE0h\xE9\u2EAFs\xBB\u2852\u0280bcmnp\u34FB\u355E\u1209\u358B\u358E\u0480;Edemnprs\u350E\u350F\u3511\u3515\u351E\u3523\u352C\u3531\u3536\u6282;\u6AC5ot;\u6ABD\u0100;d\u11DA\u351Aot;\u6AC3ult;\u6AC1\u0100Ee\u3528\u352A;\u6ACB;\u628Alus;\u6ABFarr;\u6979\u0180eiu\u353D\u3552\u3555t\u0180;en\u350E\u3545\u354Bq\u0100;q\u11DA\u350Feq\u0100;q\u352B\u3528m;\u6AC7\u0100bp\u355A\u355C;\u6AD5;\u6AD3c\u0300;acens\u11ED\u356C\u3572\u3579\u357B\u3326ppro\xF8\u32FAurlye\xF1\u11FE\xF1\u11F3\u0180aes\u3582\u3588\u331Bppro\xF8\u331Aq\xF1\u3317g;\u666A\u0680123;Edehlmnps\u35A9\u35AC\u35AF\u121C\u35B2\u35B4\u35C0\u35C9\u35D5\u35DA\u35DF\u35E8\u35ED\u803B\xB9\u40B9\u803B\xB2\u40B2\u803B\xB3\u40B3;\u6AC6\u0100os\u35B9\u35BCt;\u6ABEub;\u6AD8\u0100;d\u1222\u35C5ot;\u6AC4s\u0100ou\u35CF\u35D2l;\u67C9b;\u6AD7arr;\u697Bult;\u6AC2\u0100Ee\u35E4\u35E6;\u6ACC;\u628Blus;\u6AC0\u0180eiu\u35F4\u3609\u360Ct\u0180;en\u121C\u35FC\u3602q\u0100;q\u1222\u35B2eq\u0100;q\u35E7\u35E4m;\u6AC8\u0100bp\u3611\u3613;\u6AD4;\u6AD6\u0180Aan\u361C\u3620\u362Drr;\u61D9r\u0100hr\u3626\u3628\xEB\u222E\u0100;o\u0A2B\u0A29war;\u692Alig\u803B\xDF\u40DF\u0BE1\u3651\u365D\u3660\u12CE\u3673\u3679\0\u367E\u36C2\0\0\0\0\0\u36DB\u3703\0\u3709\u376C\0\0\0\u3787\u0272\u3656\0\0\u365Bget;\u6316;\u43C4r\xEB\u0E5F\u0180aey\u3666\u366B\u3670ron;\u4165dil;\u4163;\u4442lrec;\u6315r;\uC000\u{1D531}\u0200eiko\u3686\u369D\u36B5\u36BC\u01F2\u368B\0\u3691e\u01004f\u1284\u1281a\u0180;sv\u3698\u3699\u369B\u43B8ym;\u43D1\u0100cn\u36A2\u36B2k\u0100as\u36A8\u36AEppro\xF8\u12C1im\xBB\u12ACs\xF0\u129E\u0100as\u36BA\u36AE\xF0\u12C1rn\u803B\xFE\u40FE\u01EC\u031F\u36C6\u22E7es\u8180\xD7;bd\u36CF\u36D0\u36D8\u40D7\u0100;a\u190F\u36D5r;\u6A31;\u6A30\u0180eps\u36E1\u36E3\u3700\xE1\u2A4D\u0200;bcf\u0486\u36EC\u36F0\u36F4ot;\u6336ir;\u6AF1\u0100;o\u36F9\u36FC\uC000\u{1D565}rk;\u6ADA\xE1\u3362rime;\u6034\u0180aip\u370F\u3712\u3764d\xE5\u1248\u0380adempst\u3721\u374D\u3740\u3751\u3757\u375C\u375Fngle\u0280;dlqr\u3730\u3731\u3736\u3740\u3742\u65B5own\xBB\u1DBBeft\u0100;e\u2800\u373E\xF1\u092E;\u625Cight\u0100;e\u32AA\u374B\xF1\u105Aot;\u65ECinus;\u6A3Alus;\u6A39b;\u69CDime;\u6A3Bezium;\u63E2\u0180cht\u3772\u377D\u3781\u0100ry\u3777\u377B;\uC000\u{1D4C9};\u4446cy;\u445Brok;\u4167\u0100io\u378B\u378Ex\xF4\u1777head\u0100lr\u3797\u37A0eftarro\xF7\u084Fightarrow\xBB\u0F5D\u0900AHabcdfghlmoprstuw\u37D0\u37D3\u37D7\u37E4\u37F0\u37FC\u380E\u381C\u3823\u3834\u3851\u385D\u386B\u38A9\u38CC\u38D2\u38EA\u38F6r\xF2\u03EDar;\u6963\u0100cr\u37DC\u37E2ute\u803B\xFA\u40FA\xF2\u1150r\u01E3\u37EA\0\u37EDy;\u445Eve;\u416D\u0100iy\u37F5\u37FArc\u803B\xFB\u40FB;\u4443\u0180abh\u3803\u3806\u380Br\xF2\u13ADlac;\u4171a\xF2\u13C3\u0100ir\u3813\u3818sht;\u697E;\uC000\u{1D532}rave\u803B\xF9\u40F9\u0161\u3827\u3831r\u0100lr\u382C\u382E\xBB\u0957\xBB\u1083lk;\u6580\u0100ct\u3839\u384D\u026F\u383F\0\0\u384Arn\u0100;e\u3845\u3846\u631Cr\xBB\u3846op;\u630Fri;\u65F8\u0100al\u3856\u385Acr;\u416B\u80BB\xA8\u0349\u0100gp\u3862\u3866on;\u4173f;\uC000\u{1D566}\u0300adhlsu\u114B\u3878\u387D\u1372\u3891\u38A0own\xE1\u13B3arpoon\u0100lr\u3888\u388Cef\xF4\u382Digh\xF4\u382Fi\u0180;hl\u3899\u389A\u389C\u43C5\xBB\u13FAon\xBB\u389Aparrows;\u61C8\u0180cit\u38B0\u38C4\u38C8\u026F\u38B6\0\0\u38C1rn\u0100;e\u38BC\u38BD\u631Dr\xBB\u38BDop;\u630Eng;\u416Fri;\u65F9cr;\uC000\u{1D4CA}\u0180dir\u38D9\u38DD\u38E2ot;\u62F0lde;\u4169i\u0100;f\u3730\u38E8\xBB\u1813\u0100am\u38EF\u38F2r\xF2\u38A8l\u803B\xFC\u40FCangle;\u69A7\u0780ABDacdeflnoprsz\u391C\u391F\u3929\u392D\u39B5\u39B8\u39BD\u39DF\u39E4\u39E8\u39F3\u39F9\u39FD\u3A01\u3A20r\xF2\u03F7ar\u0100;v\u3926\u3927\u6AE8;\u6AE9as\xE8\u03E1\u0100nr\u3932\u3937grt;\u699C\u0380eknprst\u34E3\u3946\u394B\u3952\u395D\u3964\u3996app\xE1\u2415othin\xE7\u1E96\u0180hir\u34EB\u2EC8\u3959op\xF4\u2FB5\u0100;h\u13B7\u3962\xEF\u318D\u0100iu\u3969\u396Dgm\xE1\u33B3\u0100bp\u3972\u3984setneq\u0100;q\u397D\u3980\uC000\u228A\uFE00;\uC000\u2ACB\uFE00setneq\u0100;q\u398F\u3992\uC000\u228B\uFE00;\uC000\u2ACC\uFE00\u0100hr\u399B\u399Fet\xE1\u369Ciangle\u0100lr\u39AA\u39AFeft\xBB\u0925ight\xBB\u1051y;\u4432ash\xBB\u1036\u0180elr\u39C4\u39D2\u39D7\u0180;be\u2DEA\u39CB\u39CFar;\u62BBq;\u625Alip;\u62EE\u0100bt\u39DC\u1468a\xF2\u1469r;\uC000\u{1D533}tr\xE9\u39AEsu\u0100bp\u39EF\u39F1\xBB\u0D1C\xBB\u0D59pf;\uC000\u{1D567}ro\xF0\u0EFBtr\xE9\u39B4\u0100cu\u3A06\u3A0Br;\uC000\u{1D4CB}\u0100bp\u3A10\u3A18n\u0100Ee\u3980\u3A16\xBB\u397En\u0100Ee\u3992\u3A1E\xBB\u3990igzag;\u699A\u0380cefoprs\u3A36\u3A3B\u3A56\u3A5B\u3A54\u3A61\u3A6Airc;\u4175\u0100di\u3A40\u3A51\u0100bg\u3A45\u3A49ar;\u6A5Fe\u0100;q\u15FA\u3A4F;\u6259erp;\u6118r;\uC000\u{1D534}pf;\uC000\u{1D568}\u0100;e\u1479\u3A66at\xE8\u1479cr;\uC000\u{1D4CC}\u0AE3\u178E\u3A87\0\u3A8B\0\u3A90\u3A9B\0\0\u3A9D\u3AA8\u3AAB\u3AAF\0\0\u3AC3\u3ACE\0\u3AD8\u17DC\u17DFtr\xE9\u17D1r;\uC000\u{1D535}\u0100Aa\u3A94\u3A97r\xF2\u03C3r\xF2\u09F6;\u43BE\u0100Aa\u3AA1\u3AA4r\xF2\u03B8r\xF2\u09EBa\xF0\u2713is;\u62FB\u0180dpt\u17A4\u3AB5\u3ABE\u0100fl\u3ABA\u17A9;\uC000\u{1D569}im\xE5\u17B2\u0100Aa\u3AC7\u3ACAr\xF2\u03CEr\xF2\u0A01\u0100cq\u3AD2\u17B8r;\uC000\u{1D4CD}\u0100pt\u17D6\u3ADCr\xE9\u17D4\u0400acefiosu\u3AF0\u3AFD\u3B08\u3B0C\u3B11\u3B15\u3B1B\u3B21c\u0100uy\u3AF6\u3AFBte\u803B\xFD\u40FD;\u444F\u0100iy\u3B02\u3B06rc;\u4177;\u444Bn\u803B\xA5\u40A5r;\uC000\u{1D536}cy;\u4457pf;\uC000\u{1D56A}cr;\uC000\u{1D4CE}\u0100cm\u3B26\u3B29y;\u444El\u803B\xFF\u40FF\u0500acdefhiosw\u3B42\u3B48\u3B54\u3B58\u3B64\u3B69\u3B6D\u3B74\u3B7A\u3B80cute;\u417A\u0100ay\u3B4D\u3B52ron;\u417E;\u4437ot;\u417C\u0100et\u3B5D\u3B61tr\xE6\u155Fa;\u43B6r;\uC000\u{1D537}cy;\u4436grarr;\u61DDpf;\uC000\u{1D56B}cr;\uC000\u{1D4CF}\u0100jn\u3B85\u3B87;\u600Dj;\u600C'.split("").map(t=>t.charCodeAt(0)));var QK=new Uint16Array("\u0200aglq \x1B\u026D\0\0p;\u4026os;\u4027t;\u403Et;\u403Cuot;\u4022".split("").map(t=>t.charCodeAt(0)));var QD,FPe=new Map([[0,65533],[128,8364],[130,8218],[131,402],[132,8222],[133,8230],[134,8224],[135,8225],[136,710],[137,8240],[138,352],[139,8249],[140,338],[142,381],[145,8216],[146,8217],[147,8220],[148,8221],[149,8226],[150,8211],[151,8212],[152,732],[153,8482],[154,353],[155,8250],[156,339],[158,382],[159,376]]),JD=(QD=String.fromCodePoint)!==null&&QD!==void 0?QD:function(t){let e="";return t>65535&&(t-=65536,e+=String.fromCharCode(t>>>10&1023|55296),t=56320|t&1023),e+=String.fromCharCode(t),e};function eI(t){var e;return t>=55296&&t<=57343||t>1114111?65533:(e=FPe.get(t))!==null&&e!==void 0?e:t}var es;(function(t){t[t.NUM=35]="NUM",t[t.SEMI=59]="SEMI",t[t.EQUALS=61]="EQUALS",t[t.ZERO=48]="ZERO",t[t.NINE=57]="NINE",t[t.LOWER_A=97]="LOWER_A",t[t.LOWER_F=102]="LOWER_F",t[t.LOWER_X=120]="LOWER_X",t[t.LOWER_Z=122]="LOWER_Z",t[t.UPPER_A=65]="UPPER_A",t[t.UPPER_F=70]="UPPER_F",t[t.UPPER_Z=90]="UPPER_Z"})(es||(es={}));var zPe=32,Nf;(function(t){t[t.VALUE_LENGTH=49152]="VALUE_LENGTH",t[t.BRANCH_LENGTH=16256]="BRANCH_LENGTH",t[t.JUMP_TABLE=127]="JUMP_TABLE"})(Nf||(Nf={}));function tI(t){return t>=es.ZERO&&t<=es.NINE}function $Pe(t){return t>=es.UPPER_A&&t<=es.UPPER_F||t>=es.LOWER_A&&t<=es.LOWER_F}function GPe(t){return t>=es.UPPER_A&&t<=es.UPPER_Z||t>=es.LOWER_A&&t<=es.LOWER_Z||tI(t)}function qPe(t){return t===es.EQUALS||GPe(t)}var Ja;(function(t){t[t.EntityStart=0]="EntityStart",t[t.NumericStart=1]="NumericStart",t[t.NumericDecimal=2]="NumericDecimal",t[t.NumericHex=3]="NumericHex",t[t.NamedEntity=4]="NamedEntity"})(Ja||(Ja={}));var $u;(function(t){t[t.Legacy=0]="Legacy",t[t.Strict=1]="Strict",t[t.Attribute=2]="Attribute"})($u||($u={}));var ek=class{constructor(e,r,n){this.decodeTree=e,this.emitCodePoint=r,this.errors=n,this.state=Ja.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=$u.Strict}startEntity(e){this.decodeMode=e,this.state=Ja.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(e,r){switch(this.state){case Ja.EntityStart:return e.charCodeAt(r)===es.NUM?(this.state=Ja.NumericStart,this.consumed+=1,this.stateNumericStart(e,r+1)):(this.state=Ja.NamedEntity,this.stateNamedEntity(e,r));case Ja.NumericStart:return this.stateNumericStart(e,r);case Ja.NumericDecimal:return this.stateNumericDecimal(e,r);case Ja.NumericHex:return this.stateNumericHex(e,r);case Ja.NamedEntity:return this.stateNamedEntity(e,r)}}stateNumericStart(e,r){return r>=e.length?-1:(e.charCodeAt(r)|zPe)===es.LOWER_X?(this.state=Ja.NumericHex,this.consumed+=1,this.stateNumericHex(e,r+1)):(this.state=Ja.NumericDecimal,this.stateNumericDecimal(e,r))}addToNumericResult(e,r,n,i){if(r!==n){let a=n-r;this.result=this.result*Math.pow(i,a)+parseInt(e.substr(r,a),i),this.consumed+=a}}stateNumericHex(e,r){let n=r;for(;r>14;for(;r>14,a!==0){if(s===es.SEMI)return this.emitNamedEntityData(this.treeIndex,a,this.consumed+this.excess);this.decodeMode!==$u.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1}emitNotTerminatedNamedEntity(){var e;let{result:r,decodeTree:n}=this,i=(n[r]&Nf.VALUE_LENGTH)>>14;return this.emitNamedEntityData(r,i,this.consumed),(e=this.errors)===null||e===void 0||e.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(e,r,n){let{decodeTree:i}=this;return this.emitCodePoint(r===1?i[e]&~Nf.VALUE_LENGTH:i[e+1],n),r===3&&this.emitCodePoint(i[e+2],n),n}end(){var e;switch(this.state){case Ja.NamedEntity:return this.result!==0&&(this.decodeMode!==$u.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case Ja.NumericDecimal:return this.emitNumericEntity(0,2);case Ja.NumericHex:return this.emitNumericEntity(0,3);case Ja.NumericStart:return(e=this.errors)===null||e===void 0||e.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case Ja.EntityStart:return 0}}};function JK(t){let e="",r=new ek(t,n=>e+=JD(n));return function(i,a){let s=0,o=0;for(;(o=i.indexOf("&",o))>=0;){e+=i.slice(s,o),r.startEntity(a);let u=r.write(i,o+1);if(u<0){s=o+r.end();break}s=o+u,o=u===0?s+1:s}let l=e+i.slice(s);return e="",l}}function UPe(t,e,r,n){let i=(e&Nf.BRANCH_LENGTH)>>7,a=e&Nf.JUMP_TABLE;if(i===0)return a!==0&&n===a?r:-1;if(a){let l=n-a;return l<0||l>=i?-1:t[r+l]-1}let s=r,o=s+i-1;for(;s<=o;){let l=s+o>>>1,u=t[l];if(un)o=l-1;else return t[l+i]}return-1}var eZ=JK(ZK),TMt=JK(QK);function Mg(t,e=$u.Legacy){return eZ(t,e)}function Ib(t){return eZ(t,$u.Strict)}function tk(t){for(let e=1;et.codePointAt(e):(t,e)=>(t.charCodeAt(e)&64512)===55296?(t.charCodeAt(e)-55296)*1024+t.charCodeAt(e+1)-56320+65536:t.charCodeAt(e);function rI(t,e){return function(n){let i,a=0,s="";for(;i=t.exec(n);)a!==i.index&&(s+=n.substring(a,i.index)),s+=e.get(i[0].charCodeAt(0)),a=i.index+1;return s+n.substring(a)}}var tZ=rI(/[&<>'"]/g,VPe),rZ=rI(/["&\u00A0]/g,new Map([[34,"""],[38,"&"],[160," "]])),nZ=rI(/[&<>\u00A0]/g,new Map([[38,"&"],[60,"<"],[62,">"],[160," "]]));var iZ;(function(t){t[t.XML=0]="XML",t[t.HTML=1]="HTML"})(iZ||(iZ={}));var aZ;(function(t){t[t.UTF8=0]="UTF8",t[t.ASCII=1]="ASCII",t[t.Extensive=2]="Extensive",t[t.Attribute=3]="Attribute",t[t.Text=4]="Text"})(aZ||(aZ={}));function jPe(t){return Object.prototype.toString.call(t)}function rk(t){return jPe(t)==="[object String]"}var KPe=Object.prototype.hasOwnProperty;function ZPe(t,e){return KPe.call(t,e)}function Ng(t){return Array.prototype.slice.call(arguments,1).forEach(function(r){if(r){if(typeof r!="object")throw new TypeError(r+"must be object");Object.keys(r).forEach(function(n){t[n]=r[n]})}}),t}function iI(t,e,r){return[].concat(t.slice(0,e),r,t.slice(e+1))}function nk(t){return!(t>=55296&&t<=57343||t>=64976&&t<=65007||(t&65535)===65535||(t&65535)===65534||t>=0&&t<=8||t===11||t>=14&&t<=31||t>=127&&t<=159||t>1114111)}function Og(t){if(t>65535){t-=65536;let e=55296+(t>>10),r=56320+(t&1023);return String.fromCharCode(e,r)}return String.fromCharCode(t)}var lZ=/\\([!"#$%&'()*+,\-./:;<=>?@[\\\]^_`{|}~])/g,QPe=/&([a-z#][a-z0-9]{1,31});/gi,JPe=new RegExp(lZ.source+"|"+QPe.source,"gi"),eBe=/^#((?:x[a-f0-9]{1,8}|[0-9]{1,8}))$/i;function tBe(t,e){if(e.charCodeAt(0)===35&&eBe.test(e)){let n=e[1].toLowerCase()==="x"?parseInt(e.slice(2),16):parseInt(e.slice(1),10);return nk(n)?Og(n):t}let r=Mg(t);return r!==t?r:t}function rBe(t){return t.indexOf("\\")<0?t:t.replace(lZ,"$1")}function fh(t){return t.indexOf("\\")<0&&t.indexOf("&")<0?t:t.replace(JPe,function(e,r,n){return r||tBe(e,n)})}var nBe=/[&<>"]/,iBe=/[&<>"]/g,aBe={"&":"&","<":"<",">":">",'"':"""};function sBe(t){return aBe[t]}function dh(t){return nBe.test(t)?t.replace(iBe,sBe):t}var oBe=/[.?*+^$[\]\\(){}|-]/g;function lBe(t){return t.replace(oBe,"\\$&")}function Zr(t){switch(t){case 9:case 32:return!0}return!1}function i1(t){if(t>=8192&&t<=8202)return!0;switch(t){case 9:case 10:case 11:case 12:case 13:case 32:case 160:case 5760:case 8239:case 8287:case 12288:return!0}return!1}function uZ(t){return Ig.test(t)||Qw.test(t)}function a1(t){return uZ(Og(t))}function s1(t){switch(t){case 33:case 34:case 35:case 36:case 37:case 38:case 39:case 40:case 41:case 42:case 43:case 44:case 45:case 46:case 47:case 58:case 59:case 60:case 61:case 62:case 63:case 64:case 91:case 92:case 93:case 94:case 95:case 96:case 123:case 124:case 125:case 126:return!0;default:return!1}}function o1(t){return t=t.trim().replace(/\s+/g," "),"\u1E9E".toLowerCase()==="\u1E7E"&&(t=t.replace(/ẞ/g,"\xDF")),t.toLowerCase().toUpperCase()}function oZ(t){return t===32||t===9||t===10||t===13}function l1(t){let e=0;for(;e=e&&oZ(t.charCodeAt(r));r--);return t.slice(e,r+1)}var uBe={mdurl:jw,ucmicro:ZD};var uI={};Mr(uI,{parseLinkDestination:()=>oI,parseLinkLabel:()=>sI,parseLinkTitle:()=>lI});function sI(t,e,r){let n,i,a,s,o=t.posMax,l=t.pos;for(t.pos=e+1,n=1;t.pos32))return a;if(n===41){if(s===0)break;s--}i++}return e===i||s!==0||(a.str=fh(t.slice(e,i)),a.pos=i,a.ok=!0),a}function lI(t,e,r,n){let i,a=e,s={ok:!1,can_continue:!1,pos:0,str:"",marker:0};if(n)s.str=n.str,s.marker=n.marker;else{if(a>=r)return s;let o=t.charCodeAt(a);if(o!==34&&o!==39&&o!==40)return s;e++,a++,o===40&&(o=41),s.marker=o}for(;a"+dh(a.content)+""};Pc.code_block=function(t,e,r,n,i){let a=t[e];return""+dh(t[e].content)+` +`};Pc.fence=function(t,e,r,n,i){let a=t[e],s=a.info?fh(a.info).trim():"",o="",l="";if(s){let h=s.split(/(\s+)/g);o=h[0],l=h.slice(2).join("")}let u;if(r.highlight?u=r.highlight(a.content,o,l)||dh(a.content):u=dh(a.content),u.indexOf("${u} +`}return`
    ${u}
    +`};Pc.image=function(t,e,r,n,i){let a=t[e];return a.attrs[a.attrIndex("alt")][1]=i.renderInlineAsText(a.children,r,n),i.renderToken(t,e,r)};Pc.hardbreak=function(t,e,r){return r.xhtmlOut?`
    `:`
    -`};Nu.softbreak=function(t,e,r){return r.breaks?r.xhtmlOut?`
    +`};Pc.softbreak=function(t,e,r){return r.breaks?r.xhtmlOut?`
    `:`
    `:` -`};Nu.text=function(t,e){return lh(t[e].content)};Nu.html_block=function(t,e){return t[e].content};Nu.html_inline=function(t,e){return t[e].content};function Eg(){this.rules=kg({},Nu)}Eg.prototype.renderAttrs=function(e){let r,n,a;if(!e.attrs)return"";for(a="",r=0,n=e.attrs.length;r -`:">",i};Eg.prototype.renderInline=function(t,e,r){let n="",a=this.rules;for(let i=0,s=t.length;i=0&&(n=this.attrs[r][1]),n};Cg.prototype.attrJoin=function(e,r){let n=this.attrIndex(e);n<0?this.attrPush([e,r]):this.attrs[n][1]=this.attrs[n][1]+" "+r};var uh=Cg;function UY(t,e,r){this.src=t,this.env=r,this.tokens=[],this.inlineMode=!1,this.md=e}UY.prototype.Token=uh;var qY=UY;var DDe=/\r\n?|\n/g,NDe=/\0/g;function tR(t){let e;e=t.src.replace(DDe,` -`),e=e.replace(NDe,"\uFFFD"),t.src=e}function rR(t){let e;t.inlineMode?(e=new t.Token("inline","",0),e.content=t.src,e.map=[0,1],e.children=[],t.tokens.push(e)):t.md.block.parse(t.src,t.md,t.env,t.tokens)}function nR(t){let e=t.tokens;for(let r=0,n=e.length;r\s]/i.test(t)}function ODe(t){return/^<\/a\s*>/i.test(t)}function aR(t){let e=t.tokens;if(t.md.options.linkify)for(let r=0,n=e.length;r=0;s--){let o=a[s];if(o.type==="link_close"){for(s--;a[s].level!==o.level&&a[s].type!=="link_open";)s--;continue}if(o.type==="html_inline"&&(MDe(o.content)&&i>0&&i--,ODe(o.content)&&i++),!(i>0)&&o.type==="text"&&t.md.linkify.test(o.content)){let l=o.content,u=t.md.linkify.match(l),h=[],f=o.level,d=0;u.length>0&&u[0].index===0&&s>0&&a[s-1].type==="text_special"&&(u=u.slice(1));for(let p=0;pd){let k=new t.Token("text","",0);k.content=l.slice(d,y),k.level=f,h.push(k)}let b=new t.Token("link_open","a",1);b.attrs=[["href",g]],b.level=f++,b.markup="linkify",b.info="auto",h.push(b);let w=new t.Token("text","",0);w.content=v,w.level=f,h.push(w);let C=new t.Token("link_close","a",-1);C.level=--f,C.markup="linkify",C.info="auto",h.push(C),d=u[p].lastIndex}if(d=0;r--){let n=t[r];n.type==="text"&&!e&&(n.content=n.content.replace(BDe,zDe)),n.type==="link_open"&&n.info==="auto"&&e--,n.type==="link_close"&&n.info==="auto"&&e++}}function GDe(t){let e=0;for(let r=t.length-1;r>=0;r--){let n=t[r];n.type==="text"&&!e&&VY.test(n.content)&&(n.content=n.content.replace(/\+-/g,"\xB1").replace(/\.{2,}/g,"\u2026").replace(/([?!])…/g,"$1..").replace(/([?!]){4,}/g,"$1$1$1").replace(/,{2,}/g,",").replace(/(^|[^-])---(?=[^-]|$)/mg,"$1\u2014").replace(/(^|\s)--(?=\s|$)/mg,"$1\u2013").replace(/(^|[^-\s])--(?=[^-\s]|$)/mg,"$1\u2013")),n.type==="link_open"&&n.info==="auto"&&e--,n.type==="link_close"&&n.info==="auto"&&e++}}function iR(t){let e;if(t.md.options.typographer)for(e=t.tokens.length-1;e>=0;e--)t.tokens[e].type==="inline"&&(PDe.test(t.tokens[e].content)&&$De(t.tokens[e].children),VY.test(t.tokens[e].content)&&GDe(t.tokens[e].children))}var UDe=/['"]/,HY=/['"]/g,WY="\u2019";function Ek(t,e,r,n){t[e]||(t[e]=[]),t[e].push({pos:r,ch:n})}function qDe(t,e){let r="",n=0;e.sort((a,i)=>a.pos-i.pos);for(let a=0;a=0&&!(n[r].level<=o);r--);if(n.length=r+1,s.type!=="text")continue;let l=s.content,u=0,h=l.length;e:for(;u=0)g=l.charCodeAt(f.index-1);else for(r=i-1;r>=0&&!(t[r].type==="softbreak"||t[r].type==="hardbreak");r--)if(t[r].content){g=t[r].content.charCodeAt(t[r].content.length-1);break}let v=32;if(u=48&&g<=57&&(p=d=!1),d&&p&&(d=y,p=b),!d&&!p){m&&Ek(a,i,f.index,WY);continue}if(p)for(r=n.length-1;r>=0;r--){let k=n[r];if(n[r].level=0;e--)t.tokens[e].type!=="inline"||!UDe.test(t.tokens[e].content)||VDe(t.tokens[e].children,t)}function oR(t){let e,r,n=t.tokens,a=n.length;for(let i=0;i0&&this.level++,this.tokens.push(n),n};Mu.prototype.isEmpty=function(e){return this.bMarks[e]+this.tShift[e]>=this.eMarks[e]};Mu.prototype.skipEmptyLines=function(e){for(let r=this.lineMax;er;)if(!Tr(this.src.charCodeAt(--e)))return e+1;return e};Mu.prototype.skipChars=function(e,r){for(let n=this.src.length;en;)if(r!==this.src.charCodeAt(--e))return e+1;return e};Mu.prototype.getLines=function(e,r,n,a){if(e>=r)return"";let i=new Array(r-e);for(let s=0,o=e;on?i[s]=new Array(l-n+1).join(" ")+this.src.slice(h,f):i[s]=this.src.slice(h,f)}return i.join("")};Mu.prototype.Token=uh;var XY=Mu;var HDe=65536;function cR(t,e){let r=t.bMarks[e]+t.tShift[e],n=t.eMarks[e];return t.src.slice(r,n)}function jY(t){let e=[],r=t.length,n=0,a=t.charCodeAt(n),i=!1,s=0,o="";for(;nr)return!1;let a=e+1;if(t.sCount[a]=4)return!1;let i=t.bMarks[a]+t.tShift[a];if(i>=t.eMarks[a])return!1;let s=t.src.charCodeAt(i++);if(s!==124&&s!==45&&s!==58||i>=t.eMarks[a])return!1;let o=t.src.charCodeAt(i++);if(o!==124&&o!==45&&o!==58&&!Tr(o)||s===45&&Tr(o))return!1;for(;i=4)return!1;u=jY(l),u.length&&u[0]===""&&u.shift(),u.length&&u[u.length-1]===""&&u.pop();let f=u.length;if(f===0||f!==h.length)return!1;if(n)return!0;let d=t.parentType;t.parentType="table";let p=t.md.block.ruler.getRules("blockquote"),m=t.push("table_open","table",1),g=[e,0];m.map=g;let v=t.push("thead_open","thead",1);v.map=[e,e+1];let y=t.push("tr_open","tr",1);y.map=[e,e+1];for(let C=0;C=4||(u=jY(l),u.length&&u[0]===""&&u.shift(),u.length&&u[u.length-1]===""&&u.pop(),w+=f-u.length,w>HDe))break;if(a===e+2){let E=t.push("tbody_open","tbody",1);E.map=b=[e+2,0]}let k=t.push("tr_open","tr",1);k.map=[a,a+1];for(let E=0;E=4){n++,a=n;continue}break}t.line=a;let i=t.push("code_block","code",0);return i.content=t.getLines(e,a,4+t.blkIndent,!1)+` -`,i.map=[e,t.line],!0}function dR(t,e,r,n){let a=t.bMarks[e]+t.tShift[e],i=t.eMarks[e];if(t.sCount[e]-t.blkIndent>=4||a+3>i)return!1;let s=t.src.charCodeAt(a);if(s!==126&&s!==96)return!1;let o=a;a=t.skipChars(a,s);let l=a-o;if(l<3)return!1;let u=t.src.slice(o,a),h=t.src.slice(a,i);if(s===96&&h.indexOf(String.fromCharCode(s))>=0)return!1;if(n)return!0;let f=e,d=!1;for(;f++,!(f>=r||(a=o=t.bMarks[f]+t.tShift[f],i=t.eMarks[f],a=4)&&(a=t.skipChars(a,s),!(a-o=4||t.src.charCodeAt(a)!==62)return!1;if(n)return!0;let o=[],l=[],u=[],h=[],f=t.md.block.ruler.getRules("blockquote"),d=t.parentType;t.parentType="blockquote";let p=!1,m;for(m=e;m=i)break;if(t.src.charCodeAt(a++)===62&&!w){let k=t.sCount[m]+1,E,_;t.src.charCodeAt(a)===32?(a++,k++,_=!1,E=!0):t.src.charCodeAt(a)===9?(E=!0,(t.bsCount[m]+k)%4===3?(a++,k++,_=!1):_=!0):E=!1;let S=k;for(o.push(t.bMarks[m]),t.bMarks[m]=a;a=i,l.push(t.bsCount[m]),t.bsCount[m]=t.sCount[m]+1+(E?1:0),u.push(t.sCount[m]),t.sCount[m]=S-k,h.push(t.tShift[m]),t.tShift[m]=a-t.bMarks[m];continue}if(p)break;let C=!1;for(let k=0,E=f.length;k";let y=[e,0];v.map=y,t.md.block.tokenize(t,e,m);let b=t.push("blockquote_close","blockquote",-1);b.markup=">",t.lineMax=s,t.parentType=d,y[1]=t.line;for(let w=0;w=4)return!1;let i=t.bMarks[e]+t.tShift[e],s=t.src.charCodeAt(i++);if(s!==42&&s!==45&&s!==95)return!1;let o=1;for(;i=n)return-1;let i=t.src.charCodeAt(a++);if(i<48||i>57)return-1;for(;;){if(a>=n)return-1;if(i=t.src.charCodeAt(a++),i>=48&&i<=57){if(a-r>=10)return-1;continue}if(i===41||i===46)break;return-1}return a=4||t.listIndent>=0&&t.sCount[l]-t.listIndent>=4&&t.sCount[l]=t.blkIndent&&(h=!0);let f,d,p;if((p=ZY(t,l))>=0){if(f=!0,s=t.bMarks[l]+t.tShift[l],d=Number(t.src.slice(s,p-1)),h&&d!==1)return!1}else if((p=KY(t,l))>=0)f=!1;else return!1;if(h&&t.skipSpaces(p)>=t.eMarks[l])return!1;if(n)return!0;let m=t.src.charCodeAt(p-1),g=t.tokens.length;f?(o=t.push("ordered_list_open","ol",1),d!==1&&(o.attrs=[["start",d]])):o=t.push("bullet_list_open","ul",1);let v=[l,0];o.map=v,o.markup=String.fromCharCode(m);let y=!1,b=t.md.block.ruler.getRules("list"),w=t.parentType;for(t.parentType="list";l=a?_=1:_=k-C,_>4&&(_=1);let S=C+_;o=t.push("list_item_open","li",1),o.markup=String.fromCharCode(m);let L=[l,0];o.map=L,f&&(o.info=t.src.slice(s,p-1));let M=t.tight,D=t.tShift[l],T=t.sCount[l],I=t.listIndent;if(t.listIndent=t.blkIndent,t.blkIndent=S,t.tight=!0,t.tShift[l]=E-t.bMarks[l],t.sCount[l]=k,E>=a&&t.isEmpty(l+1)?t.line=Math.min(t.line+2,r):t.md.block.tokenize(t,l,r,!0),(!t.tight||y)&&(u=!1),y=t.line-l>1&&t.isEmpty(t.line-1),t.blkIndent=t.listIndent,t.listIndent=I,t.tShift[l]=D,t.sCount[l]=T,t.tight=M,o=t.push("list_item_close","li",-1),o.markup=String.fromCharCode(m),l=t.line,L[1]=l,l>=r||t.sCount[l]=4)break;let N=!1;for(let O=0,R=b.length;O=4||t.src.charCodeAt(a)!==91)return!1;function o(b){let w=t.lineMax;if(b>=w||t.isEmpty(b))return null;let C=!1;if(t.sCount[b]-t.blkIndent>3&&(C=!0),t.sCount[b]<0&&(C=!0),!C){let _=t.md.block.ruler.getRules("reference"),S=t.parentType;t.parentType="reference";let L=!1;for(let M=0,D=_.length;M"u"&&(t.env.references={}),typeof t.env.references[y]>"u"&&(t.env.references[y]={title:v,href:f}),t.line=s),!0):!1}var QY=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"];var YDe="[a-zA-Z_:][a-zA-Z0-9:._-]*",XDe="[^\"'=<>`\\x00-\\x20]+",jDe="'[^']*'",KDe='"[^"]*"',ZDe="(?:"+XDe+"|"+jDe+"|"+KDe+")",QDe="(?:\\s+"+YDe+"(?:\\s*=\\s*"+ZDe+")?)",JY="<[A-Za-z][A-Za-z0-9\\-]*"+QDe+"*\\s*\\/?>",eX="<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>",JDe="",eNe="<[?][\\s\\S]*?[?]>",tNe="]*>",rNe="",tX=new RegExp("^(?:"+JY+"|"+eX+"|"+JDe+"|"+eNe+"|"+tNe+"|"+rNe+")"),rX=new RegExp("^(?:"+JY+"|"+eX+")");var tp=[[/^<(script|pre|style|textarea)(?=(\s|>|$))/i,/<\/(script|pre|style|textarea)>/i,!0],[/^/,!0],[/^<\?/,/\?>/,!0],[/^/,!0],[/^/,!0],[new RegExp("^|$))","i"),/^$/,!0],[new RegExp(rX.source+"\\s*$"),/^$/,!1]];function yR(t,e,r,n){let a=t.bMarks[e]+t.tShift[e],i=t.eMarks[e];if(t.sCount[e]-t.blkIndent>=4||!t.md.options.html||t.src.charCodeAt(a)!==60)return!1;let s=t.src.slice(a,i),o=0;for(;o=4)return!1;let s=t.src.charCodeAt(a);if(s!==35||a>=i)return!1;let o=1;for(s=t.src.charCodeAt(++a);s===35&&a6||aa&&Tr(t.src.charCodeAt(l-1))&&(i=l),t.line=e+1;let u=t.push("heading_open","h"+String(o),1);u.markup="########".slice(0,o),u.map=[e,t.line];let h=t.push("inline","",0);h.content=J0(t.src.slice(a,i)),h.map=[e,t.line],h.children=[];let f=t.push("heading_close","h"+String(o),-1);return f.markup="########".slice(0,o),!0}function bR(t,e,r){let n=t.md.block.ruler.getRules("paragraph");if(t.sCount[e]-t.blkIndent>=4)return!1;let a=t.parentType;t.parentType="paragraph";let i=0,s,o=e+1;for(;o3)continue;if(t.sCount[o]>=t.blkIndent){let p=t.bMarks[o]+t.tShift[o],m=t.eMarks[o];if(p=m))){i=s===61?1:2;break}}if(t.sCount[o]<0)continue;let d=!1;for(let p=0,m=n.length;p3||t.sCount[i]<0)continue;let u=!1;for(let h=0,f=n.length;h=r||t.sCount[s]=i){t.line=r;break}let l=t.line,u=!1;for(let h=0;h=t.line)throw new Error("block rule didn't increment state.line");break}if(!u)throw new Error("none of the block rules matched");t.tight=!o,t.isEmpty(t.line-1)&&(o=!0),s=t.line,s0&&(this.level++,this._prev_delimiters.push(this.delimiters),this.delimiters=[],a={delimiters:this.delimiters}),this.pendingLevel=this.level,this.tokens.push(n),this.tokens_meta.push(a),n};vb.prototype.scanDelims=function(t,e){let r=this.posMax,n=this.src.charCodeAt(t),a;if(t===0)a=32;else if(t===1)a=this.src.charCodeAt(0),(a&63488)===55296&&(a=65533);else if(a=this.src.charCodeAt(t-1),(a&64512)===56320){let v=this.src.charCodeAt(t-2);a=(v&64512)===55296?65536+(v-55296<<10)+(a-56320):65533}else(a&64512)===55296&&(a=65533);let i=t;for(;i0)return!1;let r=t.pos,n=t.posMax;if(r+3>n||t.src.charCodeAt(r)!==58||t.src.charCodeAt(r+1)!==47||t.src.charCodeAt(r+2)!==47)return!1;let a=t.pending.match(aNe);if(!a)return!1;let i=a[1],s=t.md.linkify.matchAtStart(t.src.slice(r-i.length));if(!s)return!1;let o=s.url;if(o.length<=i.length)return!1;let l=o.length;for(;l>0&&o.charCodeAt(l-1)===42;)l--;l!==o.length&&(o=o.slice(0,l));let u=t.md.normalizeLink(o);if(!t.md.validateLink(u))return!1;if(!e){t.pending=t.pending.slice(0,-i.length);let h=t.push("link_open","a",1);h.attrs=[["href",u]],h.markup="linkify",h.info="auto";let f=t.push("text","",0);f.content=t.md.normalizeLinkText(o);let d=t.push("link_close","a",-1);d.markup="linkify",d.info="auto"}return t.pos+=o.length-i.length,!0}function ER(t,e){let r=t.pos;if(t.src.charCodeAt(r)!==10)return!1;let n=t.pending.length-1,a=t.posMax;if(!e)if(n>=0&&t.pending.charCodeAt(n)===32)if(n>=1&&t.pending.charCodeAt(n-1)===32){let i=n-1;for(;i>=1&&t.pending.charCodeAt(i-1)===32;)i--;t.pending=t.pending.slice(0,i),t.push("hardbreak","br",0)}else t.pending=t.pending.slice(0,-1),t.push("softbreak","br",0);else t.push("softbreak","br",0);for(r++;r?@[]^_`{|}~-".split("").forEach(function(t){CR[t.charCodeAt(0)]=1});function SR(t,e){let r=t.pos,n=t.posMax;if(t.src.charCodeAt(r)!==92||(r++,r>=n))return!1;let a=t.src.charCodeAt(r);if(a===10){for(e||t.push("hardbreak","br",0),r++;r=55296&&a<=56319&&r+1=56320&&o<=57343&&(i+=t.src[r+1],r++)}let s="\\"+i;if(!e){let o=t.push("text_special","",0);a<256&&CR[a]!==0?o.content=i:o.content=s,o.markup=s,o.info="escape"}return t.pos=r+1,!0}function _R(t,e){let r=t.pos;if(t.src.charCodeAt(r)!==96)return!1;let a=r;r++;let i=t.posMax;for(;r=0;n--){let a=e[n];if(a.marker!==95&&a.marker!==42||a.end===-1)continue;let i=e[a.end],s=n>0&&e[n-1].end===a.end+1&&e[n-1].marker===a.marker&&e[n-1].token===a.token-1&&e[a.end+1].token===i.token+1,o=String.fromCharCode(a.marker),l=t.tokens[a.token];l.type=s?"strong_open":"em_open",l.tag=s?"strong":"em",l.nesting=1,l.markup=s?o+o:o,l.content="";let u=t.tokens[i.token];u.type=s?"strong_close":"em_close",u.tag=s?"strong":"em",u.nesting=-1,u.markup=s?o+o:o,u.content="",s&&(t.tokens[e[n-1].token].content="",t.tokens[e[a.end+1].token].content="",n--)}}function lNe(t){let e=t.tokens_meta,r=t.tokens_meta.length;sX(t,t.delimiters);for(let n=0;n=f)return!1;if(l=m,a=t.md.helpers.parseLinkDestination(t.src,m,t.posMax),a.ok){for(s=t.md.normalizeLink(a.str),t.md.validateLink(s)?m=a.pos:s="",l=m;m=f||t.src.charCodeAt(m)!==41)&&(u=!0),m++}if(u){if(typeof t.env.references>"u")return!1;if(m=0?n=t.src.slice(l,m++):m=p+1):m=p+1,n||(n=t.src.slice(d,p)),i=t.env.references[Q0(n)],!i)return t.pos=h,!1;s=i.href,o=i.title}if(!e){t.pos=d,t.posMax=p;let g=t.push("link_open","a",1),v=[["href",s]];g.attrs=v,o&&v.push(["title",o]),t.linkLevel++,t.md.inline.tokenize(t),t.linkLevel--,t.push("link_close","a",-1)}return t.pos=m,t.posMax=f,!0}function IR(t,e){let r,n,a,i,s,o,l,u,h="",f=t.pos,d=t.posMax;if(t.src.charCodeAt(t.pos)!==33||t.src.charCodeAt(t.pos+1)!==91)return!1;let p=t.pos+2,m=t.md.helpers.parseLinkLabel(t,t.pos+1,!1);if(m<0)return!1;if(i=m+1,i=d)return!1;for(u=i,o=t.md.helpers.parseLinkDestination(t.src,i,t.posMax),o.ok&&(h=t.md.normalizeLink(o.str),t.md.validateLink(h)?i=o.pos:h=""),u=i;i=d||t.src.charCodeAt(i)!==41)return t.pos=f,!1;i++}else{if(typeof t.env.references>"u")return!1;if(i=0?a=t.src.slice(u,i++):i=m+1):i=m+1,a||(a=t.src.slice(p,m)),s=t.env.references[Q0(a)],!s)return t.pos=f,!1;h=s.href,l=s.title}if(!e){n=t.src.slice(p,m);let g=[];t.md.inline.parse(n,t.md,t.env,g);let v=t.push("image","img",0),y=[["src",h],["alt",""]];v.attrs=y,v.children=g,v.content=n,l&&y.push(["title",l])}return t.pos=i,t.posMax=d,!0}var uNe=/^([a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*)$/,cNe=/^([a-zA-Z][a-zA-Z0-9+.-]{1,31}):([^<>\x00-\x20]*)$/;function DR(t,e){let r=t.pos;if(t.src.charCodeAt(r)!==60)return!1;let n=t.pos,a=t.posMax;for(;;){if(++r>=a)return!1;let s=t.src.charCodeAt(r);if(s===60)return!1;if(s===62)break}let i=t.src.slice(n+1,r);if(cNe.test(i)){let s=t.md.normalizeLink(i);if(!t.md.validateLink(s))return!1;if(!e){let o=t.push("link_open","a",1);o.attrs=[["href",s]],o.markup="autolink",o.info="auto";let l=t.push("text","",0);l.content=t.md.normalizeLinkText(i);let u=t.push("link_close","a",-1);u.markup="autolink",u.info="auto"}return t.pos+=i.length+2,!0}if(uNe.test(i)){let s=t.md.normalizeLink("mailto:"+i);if(!t.md.validateLink(s))return!1;if(!e){let o=t.push("link_open","a",1);o.attrs=[["href",s]],o.markup="autolink",o.info="auto";let l=t.push("text","",0);l.content=t.md.normalizeLinkText(i);let u=t.push("link_close","a",-1);u.markup="autolink",u.info="auto"}return t.pos+=i.length+2,!0}return!1}function hNe(t){return/^\s]/i.test(t)}function fNe(t){return/^<\/a\s*>/i.test(t)}function dNe(t){let e=t|32;return e>=97&&e<=122}function NR(t,e){if(!t.md.options.html)return!1;let r=t.posMax,n=t.pos;if(t.src.charCodeAt(n)!==60||n+2>=r)return!1;let a=t.src.charCodeAt(n+1);if(a!==33&&a!==63&&a!==47&&!dNe(a))return!1;let i=t.src.slice(n).match(tX);if(!i)return!1;if(!e){let s=t.push("html_inline","",0);s.content=i[0],hNe(s.content)&&t.linkLevel++,fNe(s.content)&&t.linkLevel--}return t.pos+=i[0].length,!0}var pNe=/^&#((?:x[a-f0-9]{1,6}|[0-9]{1,7}));/i,mNe=/^&([a-z][a-z0-9]{1,31});/i;function MR(t,e){let r=t.pos,n=t.posMax;if(t.src.charCodeAt(r)!==38||r+1>=n)return!1;if(t.src.charCodeAt(r+1)===35){let i=t.src.slice(r).match(pNe);if(i){if(!e){let s=i[1][0].toLowerCase()==="x"?parseInt(i[1].slice(1),16):parseInt(i[1],10),o=t.push("text_special","",0);o.content=Tk(s)?Tg(s):Tg(65533),o.markup=i[0],o.info="entity"}return t.pos+=i[0].length,!0}}else{let i=t.src.slice(r).match(mNe);if(i){let s=gb(i[0]);if(s!==i[0]){if(!e){let o=t.push("text_special","",0);o.content=s,o.markup=i[0],o.info="entity"}return t.pos+=i[0].length,!0}}}return!1}function oX(t){let e={},r=t.length;if(!r)return;let n=0,a=-2,i=[];for(let s=0;sl;u-=i[u]+1){let f=t[u];if(f.marker===o.marker&&f.open&&f.end<0){let d=!1;if((f.close||o.open)&&(f.length+o.length)%3===0&&(f.length%3!==0||o.length%3!==0)&&(d=!0),!d){let p=u>0&&!t[u-1].open?i[u-1]+1:0;i[s]=s-u+p,i[u]=p,o.open=!1,f.end=s,f.close=!1,h=-1,a=-2;break}}}h!==-1&&(e[o.marker][(o.open?3:0)+(o.length||0)%3]=h)}}function OR(t){let e=t.tokens_meta,r=t.tokens_meta.length;oX(t.delimiters);for(let n=0;n0&&n++,a[e].type==="text"&&e+1=t.pos)throw new Error("inline rule didn't increment state.pos");break}}else t.pos=t.posMax;s||t.pos++,i[e]=t.pos};yb.prototype.tokenize=function(t){let e=this.ruler.getRules(""),r=e.length,n=t.posMax,a=t.md.options.maxNesting;for(;t.pos=t.pos)throw new Error("inline rule didn't increment state.pos");break}}if(s){if(t.pos>=n)break;continue}t.pending+=t.src[t.pos++]}t.pending&&t.pushPending()};yb.prototype.parse=function(t,e,r,n){let a=new this.State(t,e,r,n);this.tokenize(a);let i=this.ruler2.getRules(""),s=i.length;for(let o=0;o|$))`,e.tpl_email_fuzzy=`(^|${r}|"|\\(|${e.src_ZCc})(${e.src_email_name}@${e.tpl_host_fuzzy_strict})`,e.tpl_link_fuzzy=`(^|(?![.:/\\-_@])(?:[$+<=>^\`|\uFF5C]|${e.src_ZPCc}))((?![$+<=>^\`|\uFF5C])${e.tpl_host_port_fuzzy_strict}${e.src_path})`,e.tpl_link_no_ip_fuzzy=`(^|(?![.:/\\-_@])(?:[$+<=>^\`|\uFF5C]|${e.src_ZPCc}))((?![$+<=>^\`|\uFF5C])${e.tpl_host_port_no_ip_fuzzy_strict}${e.src_path})`,e}function zR(t){return Array.prototype.slice.call(arguments,1).forEach(function(r){r&&Object.keys(r).forEach(function(n){t[n]=r[n]})}),t}function Ak(t){return Object.prototype.toString.call(t)}function gNe(t){return Ak(t)==="[object String]"}function vNe(t){return Ak(t)==="[object Object]"}function yNe(t){return Ak(t)==="[object RegExp]"}function cX(t){return Ak(t)==="[object Function]"}function xNe(t){return t.replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}var fX={fuzzyLink:!0,fuzzyEmail:!0,fuzzyIP:!1};function bNe(t){return Object.keys(t||{}).reduce(function(e,r){return e||fX.hasOwnProperty(r)},!1)}var wNe={"http:":{validate:function(t,e,r){let n=t.slice(e);return r.re.http||(r.re.http=new RegExp(`^\\/\\/${r.re.src_auth}${r.re.src_host_port_strict}${r.re.src_path}`,"i")),r.re.http.test(n)?n.match(r.re.http)[0].length:0}},"https:":"http:","ftp:":"http:","//":{validate:function(t,e,r){let n=t.slice(e);return r.re.no_http||(r.re.no_http=new RegExp("^"+r.re.src_auth+`(?:localhost|(?:(?:${r.re.src_domain})\\.)+${r.re.src_domain_root})`+r.re.src_port+r.re.src_host_terminator+r.re.src_path,"i")),r.re.no_http.test(n)?e>=3&&t[e-3]===":"||e>=3&&t[e-3]==="/"?0:n.match(r.re.no_http)[0].length:0}},"mailto:":{validate:function(t,e,r){let n=t.slice(e);return r.re.mailto||(r.re.mailto=new RegExp(`^${r.re.src_email_name}@${r.re.src_host_strict}`,"i")),r.re.mailto.test(n)?n.match(r.re.mailto)[0].length:0}}},kNe="a[cdefgilmnoqrstuwxz]|b[abdefghijmnorstvwyz]|c[acdfghiklmnoruvwxyz]|d[ejkmoz]|e[cegrstu]|f[ijkmor]|g[abdefghilmnpqrstuwy]|h[kmnrtu]|i[delmnoqrst]|j[emop]|k[eghimnprwyz]|l[abcikrstuvy]|m[acdeghklmnopqrstuvwxyz]|n[acefgilopruz]|om|p[aefghklmnrstwy]|qa|r[eosuw]|s[abcdeghijklmnortuvxyz]|t[cdfghjklmnortvwz]|u[agksyz]|v[aceginu]|w[fs]|y[et]|z[amw]",TNe="biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|\u0440\u0444".split("|");function ENe(t){return function(e,r){let n=e.slice(r);return t.test(n)?n.match(t)[0].length:0}}function hX(){return function(t,e){e.normalize(t)}}function _k(t){let e=t.re=uX(t.__opts__),r=t.__tlds__.slice();t.onCompile(),t.__tlds_replaced__||r.push(kNe),r.push(e.src_xn),e.src_tlds=r.join("|");function n(o){return o.replace("%TLDS%",e.src_tlds)}e.email_fuzzy=RegExp(n(e.tpl_email_fuzzy),"i"),e.email_fuzzy_global=RegExp(n(e.tpl_email_fuzzy),"ig"),e.link_fuzzy=RegExp(n(e.tpl_link_fuzzy),"i"),e.link_fuzzy_global=RegExp(n(e.tpl_link_fuzzy),"ig"),e.link_no_ip_fuzzy=RegExp(n(e.tpl_link_no_ip_fuzzy),"i"),e.link_no_ip_fuzzy_global=RegExp(n(e.tpl_link_no_ip_fuzzy),"ig"),e.host_fuzzy_test=RegExp(n(e.tpl_host_fuzzy_test),"i");let a=[];t.__compiled__={};function i(o,l){throw new Error(`(LinkifyIt) Invalid schema "${o}": ${l}`)}Object.keys(t.__schemas__).forEach(function(o){let l=t.__schemas__[o];if(l===null)return;let u={validate:null,link:null};if(t.__compiled__[o]=u,vNe(l)){yNe(l.validate)?u.validate=ENe(l.validate):cX(l.validate)?u.validate=l.validate:i(o,l),cX(l.normalize)?u.normalize=l.normalize:l.normalize?i(o,l):u.normalize=hX();return}if(gNe(l)){a.push(o);return}i(o,l)}),a.forEach(function(o){t.__compiled__[t.__schemas__[o]]&&(t.__compiled__[o].validate=t.__compiled__[t.__schemas__[o]].validate,t.__compiled__[o].normalize=t.__compiled__[t.__schemas__[o]].normalize)}),t.__compiled__[""]={validate:null,normalize:hX()};let s=Object.keys(t.__compiled__).filter(function(o){return o.length>0&&t.__compiled__[o]}).map(xNe).join("|");t.re.schema_test=RegExp(`(^|(?!_)(?:[><\uFF5C]|${e.src_ZPCc}))(${s})`,"i"),t.re.schema_search=RegExp(`(^|(?!_)(?:[><\uFF5C]|${e.src_ZPCc}))(${s})`,"ig"),t.re.schema_at_start=RegExp(`^${t.re.schema_search.source}`,"i"),t.re.pretest=RegExp(`(${t.re.schema_test.source})|(${t.re.host_fuzzy_test.source})|@`,"i")}function dX(t,e,r,n){let a=t.slice(r,n);this.schema=e.toLowerCase(),this.index=r,this.lastIndex=n,this.raw=a,this.text=a,this.url=a}function Ao(t,e){if(!(this instanceof Ao))return new Ao(t,e);e||bNe(t)&&(e=t,t={}),this.__opts__=zR({},fX,e),this.__schemas__=zR({},wNe,t),this.__compiled__={},this.__tlds__=TNe,this.__tlds_replaced__=!1,this.re={},_k(this)}Ao.prototype.add=function(e,r){return this.__schemas__[e]=r,_k(this),this};Ao.prototype.set=function(e){return this.__opts__=zR(this.__opts__,e),this};Ao.prototype.test=function(e){if(!e.length)return!1;let r,n;if(this.re.schema_test.test(e)){for(n=this.re.schema_search,n.lastIndex=0;(r=n.exec(e))!==null;)if(this.testSchemaAt(e,r[2],n.lastIndex))return!0}return!!(this.__opts__.fuzzyLink&&this.__compiled__["http:"]&&e.search(this.re.host_fuzzy_test)>=0&&e.match(this.__opts__.fuzzyIP?this.re.link_fuzzy:this.re.link_no_ip_fuzzy)!==null||this.__opts__.fuzzyEmail&&this.__compiled__["mailto:"]&&e.indexOf("@")>=0&&e.match(this.re.email_fuzzy)!==null)};Ao.prototype.pretest=function(e){return this.re.pretest.test(e)};Ao.prototype.testSchemaAt=function(e,r,n){return this.__compiled__[r.toLowerCase()]?this.__compiled__[r.toLowerCase()].validate(e,n,this):0};Ao.prototype.match=function(e){let r=[],n=[],a=[],i=[],s,o,l;function u(d,p){return d?p?d.index!==p.index?d.index=p.lastIndex?d:p:d:p}if(!e.length)return null;if(this.re.schema_test.test(e))for(l=this.re.schema_search,l.lastIndex=0;(s=l.exec(e))!==null;)o=this.testSchemaAt(e,s[2],l.lastIndex),o&&n.push({schema:s[2],index:s.index+s[1].length,lastIndex:s.index+s[0].length+o});if(this.__opts__.fuzzyLink&&this.__compiled__["http:"])for(l=this.__opts__.fuzzyIP?this.re.link_fuzzy_global:this.re.link_no_ip_fuzzy_global,l.lastIndex=0;(s=l.exec(e))!==null;)a.push({schema:"",index:s.index+s[1].length,lastIndex:s.index+s[0].length});if(this.__opts__.fuzzyEmail&&this.__compiled__["mailto:"])for(l=this.re.email_fuzzy_global,l.lastIndex=0;(s=l.exec(e))!==null;)i.push({schema:"mailto:",index:s.index+s[1].length,lastIndex:s.index+s[0].length});let h=[0,0,0],f=0;for(;;){let d=[n[h[0]],i[h[1]],a[h[2]]],p=u(u(d[0],d[1]),d[2]);if(!p)break;if(p===d[0]?h[0]++:p===d[1]?h[1]++:h[2]++,p.index= 0x80 (not a basic code point)","invalid-input":"Invalid input"},$R=35,Ou=Math.floor,GR=String.fromCharCode;function _f(t){throw new RangeError(ANe[t])}function LNe(t,e){let r=[],n=t.length;for(;n--;)r[n]=e(t[n]);return r}function gX(t,e){let r=t.split("@"),n="";r.length>1&&(n=r[0]+"@",t=r[1]),t=t.replace(_Ne,".");let a=t.split("."),i=LNe(a,e).join(".");return n+i}function vX(t){let e=[],r=0,n=t.length;for(;r=55296&&a<=56319&&rString.fromCodePoint(...t),INe=function(t){return t>=48&&t<58?26+(t-48):t>=65&&t<91?t-65:t>=97&&t<123?t-97:36},mX=function(t,e){return t+22+75*(t<26)-((e!=0)<<5)},yX=function(t,e,r){let n=0;for(t=r?Ou(t/700):t>>1,t+=Ou(t/e);t>$R*26>>1;n+=36)t=Ou(t/$R);return Ou(n+($R+1)*t/(t+38))},xX=function(t){let e=[],r=t.length,n=0,a=128,i=72,s=t.lastIndexOf("-");s<0&&(s=0);for(let o=0;o=128&&_f("not-basic"),e.push(t.charCodeAt(o));for(let o=s>0?s+1:0;o=r&&_f("invalid-input");let d=INe(t.charCodeAt(o++));d>=36&&_f("invalid-input"),d>Ou((2147483647-n)/h)&&_f("overflow"),n+=d*h;let p=f<=i?1:f>=i+26?26:f-i;if(dOu(2147483647/m)&&_f("overflow"),h*=m}let u=e.length+1;i=yX(n-l,u,l==0),Ou(n/u)>2147483647-a&&_f("overflow"),a+=Ou(n/u),n%=u,e.splice(n++,0,a)}return String.fromCodePoint(...e)},bX=function(t){let e=[];t=vX(t);let r=t.length,n=128,a=0,i=72;for(let l of t)l<128&&e.push(GR(l));let s=e.length,o=s;for(s&&e.push("-");o=n&&hOu((2147483647-a)/u)&&_f("overflow"),a+=(l-n)*u,n=l;for(let h of t)if(h2147483647&&_f("overflow"),h===n){let f=a;for(let d=36;;d+=36){let p=d<=i?1:d>=i+26?26:d-i;if(f=0))try{e.hostname=UR.toASCII(e.hostname)}catch{}return dk(xg(e))}function $Ne(t){let e=mb(t,!0);if(e.hostname&&(!e.protocol||EX.indexOf(e.protocol)>=0))try{e.hostname=UR.toUnicode(e.hostname)}catch{}return pb(xg(e),pb.defaultChars+"%")}function tl(t,e){if(!(this instanceof tl))return new tl(t,e);e||kk(t)||(e=t||{},t="default"),this.inline=new lX,this.block=new nX,this.core=new YY,this.renderer=new GY,this.linkify=new pX,this.validateLink=FNe,this.normalizeLink=zNe,this.normalizeLinkText=$Ne,this.utils=KL,this.helpers=kg({},eR),this.options={},this.configure(t),e&&this.set(e)}tl.prototype.set=function(t){return kg(this.options,t),this};tl.prototype.configure=function(t){let e=this;if(kk(t)){let r=t;if(t=ONe[r],!t)throw new Error('Wrong `markdown-it` preset "'+r+'", check name')}if(!t)throw new Error("Wrong `markdown-it` preset, can't be empty");return t.options&&e.set(t.options),t.components&&Object.keys(t.components).forEach(function(r){t.components[r].rules&&e[r].ruler.enableOnly(t.components[r].rules),t.components[r].rules2&&e[r].ruler2.enableOnly(t.components[r].rules2)}),this};tl.prototype.enable=function(t,e){let r=[];Array.isArray(t)||(t=[t]),["core","block","inline"].forEach(function(a){r=r.concat(this[a].ruler.enable(t,!0))},this),r=r.concat(this.inline.ruler2.enable(t,!0));let n=t.filter(function(a){return r.indexOf(a)<0});if(n.length&&!e)throw new Error("MarkdownIt. Failed to enable unknown rule(s): "+n);return this};tl.prototype.disable=function(t,e){let r=[];Array.isArray(t)||(t=[t]),["core","block","inline"].forEach(function(a){r=r.concat(this[a].ruler.disable(t,!0))},this),r=r.concat(this.inline.ruler2.disable(t,!0));let n=t.filter(function(a){return r.indexOf(a)<0});if(n.length&&!e)throw new Error("MarkdownIt. Failed to disable unknown rule(s): "+n);return this};tl.prototype.use=function(t){let e=[this].concat(Array.prototype.slice.call(arguments,1));return t.apply(t,e),this};tl.prototype.parse=function(t,e){if(typeof t!="string")throw new Error("Input data should be a String");let r=new this.core.State(t,this,e);return this.core.process(r),r.tokens};tl.prototype.render=function(t,e){return e=e||{},this.renderer.render(this.parse(t,e),this.options,e)};tl.prototype.parseInline=function(t,e){let r=new this.core.State(t,this,e);return r.inlineMode=!0,this.core.process(r),r.tokens};tl.prototype.renderInline=function(t,e){return e=e||{},this.renderer.render(this.parseInline(t,e),this.options,e)};var qR=tl;var CX=!1,Sg={false:"push",true:"unshift",after:"push",before:"unshift"},Lk={isPermalinkSymbol:!0};function VR(t,e,r,n){var a;if(!CX){var i="Using deprecated markdown-it-anchor permalink option, see https://github.com/valeriangalliat/markdown-it-anchor#permalinks";typeof process=="object"&&process&&process.emitWarning?process.emitWarning(i):console.warn(i),CX=!0}var s=[Object.assign(new r.Token("link_open","a",1),{attrs:[].concat(e.permalinkClass?[["class",e.permalinkClass]]:[],[["href",e.permalinkHref(t,r)]],Object.entries(e.permalinkAttrs(t,r)))}),Object.assign(new r.Token("html_block","",0),{content:e.permalinkSymbol,meta:Lk}),new r.Token("link_close","a",-1)];e.permalinkSpace&&r.tokens[n+1].children[Sg[e.permalinkBefore]](Object.assign(new r.Token("text","",0),{content:" "})),(a=r.tokens[n+1].children)[Sg[e.permalinkBefore]].apply(a,s)}function AX(t){return"#"+t}function LX(t){return{}}var GNe={class:"header-anchor",symbol:"#",renderHref:AX,renderAttrs:LX};function xb(t){function e(r){return r=Object.assign({},e.defaults,r),function(n,a,i,s){return t(n,r,a,i,s)}}return e.defaults=Object.assign({},GNe),e.renderPermalinkImpl=t,e}function HR(t){var e=[],r=t.filter(function(n){if(n[0]!=="class")return!0;e.push(n[1])});return e.length>0&&r.unshift(["class",e.join(" ")]),r}var Rk=xb(function(t,e,r,n,a){var i,s=[Object.assign(new n.Token("link_open","a",1),{attrs:HR([].concat(e.class?[["class",e.class]]:[],[["href",e.renderHref(t,n)]],e.ariaHidden?[["aria-hidden","true"]]:[],Object.entries(e.renderAttrs(t,n))))}),Object.assign(new n.Token("html_inline","",0),{content:e.symbol,meta:Lk}),new n.Token("link_close","a",-1)];if(e.space){var o=typeof e.space=="string"?e.space:" ";n.tokens[a+1].children[Sg[e.placement]](Object.assign(new n.Token(typeof e.space=="string"?"html_inline":"text","",0),{content:o}))}(i=n.tokens[a+1].children)[Sg[e.placement]].apply(i,s)});Object.assign(Rk.defaults,{space:!0,placement:"after",ariaHidden:!1});var rp=xb(Rk.renderPermalinkImpl);rp.defaults=Object.assign({},Rk.defaults,{ariaHidden:!0});var RX=xb(function(t,e,r,n,a){var i=[Object.assign(new n.Token("link_open","a",1),{attrs:HR([].concat(e.class?[["class",e.class]]:[],[["href",e.renderHref(t,n)]],Object.entries(e.renderAttrs(t,n))))})].concat(e.safariReaderFix?[new n.Token("span_open","span",1)]:[],n.tokens[a+1].children,e.safariReaderFix?[new n.Token("span_close","span",-1)]:[],[new n.Token("link_close","a",-1)]);n.tokens[a+1].children=i});Object.assign(RX.defaults,{safariReaderFix:!1});var SX=xb(function(t,e,r,n,a){var i;if(!["visually-hidden","aria-label","aria-describedby","aria-labelledby"].includes(e.style))throw new Error("`permalink.linkAfterHeader` called with unknown style option `"+e.style+"`");if(!["aria-describedby","aria-labelledby"].includes(e.style)&&!e.assistiveText)throw new Error("`permalink.linkAfterHeader` called without the `assistiveText` option in `"+e.style+"` style");if(e.style==="visually-hidden"&&!e.visuallyHiddenClass)throw new Error("`permalink.linkAfterHeader` called without the `visuallyHiddenClass` option in `visually-hidden` style");var s=n.tokens[a+1].children.filter(function(f){return f.type==="text"||f.type==="code_inline"}).reduce(function(f,d){return f+d.content},""),o=[],l=[];if(e.class&&l.push(["class",e.class]),l.push(["href",e.renderHref(t,n)]),l.push.apply(l,Object.entries(e.renderAttrs(t,n))),e.style==="visually-hidden"){if(o.push(Object.assign(new n.Token("span_open","span",1),{attrs:[["class",e.visuallyHiddenClass]]}),Object.assign(new n.Token("text","",0),{content:e.assistiveText(s)}),new n.Token("span_close","span",-1)),e.space){var u=typeof e.space=="string"?e.space:" ";o[Sg[e.placement]](Object.assign(new n.Token(typeof e.space=="string"?"html_inline":"text","",0),{content:u}))}o[Sg[e.placement]](Object.assign(new n.Token("span_open","span",1),{attrs:[["aria-hidden","true"]]}),Object.assign(new n.Token("html_inline","",0),{content:e.symbol,meta:Lk}),new n.Token("span_close","span",-1))}else o.push(Object.assign(new n.Token("html_inline","",0),{content:e.symbol,meta:Lk}));e.style==="aria-label"?l.push(["aria-label",e.assistiveText(s)]):["aria-describedby","aria-labelledby"].includes(e.style)&&l.push([e.style,t]);var h=[Object.assign(new n.Token("link_open","a",1),{attrs:HR(l)})].concat(o,[new n.Token("link_close","a",-1)]);(i=n.tokens).splice.apply(i,[a+3,0].concat(h)),e.wrapper&&(n.tokens.splice(a,0,Object.assign(new n.Token("html_block","",0),{content:e.wrapper[0]+` -`})),n.tokens.splice(a+3+h.length+1,0,Object.assign(new n.Token("html_block","",0),{content:e.wrapper[1]+` -`})))});function _X(t,e,r,n){var a=t,i=n;if(r&&Object.prototype.hasOwnProperty.call(e,a))throw new Error("User defined `id` attribute `"+t+"` is not unique. Please fix it in your Markdown to continue.");for(;Object.prototype.hasOwnProperty.call(e,a);)a=t+"-"+i,i+=1;return e[a]=!0,a}function np(t,e){e=Object.assign({},np.defaults,e),t.core.ruler.push("anchor",function(r){for(var n,a={},i=r.tokens,s=Array.isArray(e.level)?(n=e.level,function(f){return n.includes(f)}):(function(f){return function(d){return d>=f}})(e.level),o=0;o{let G="",end:""},i=/<[A-Za-z0-9\\._:-]+\s*\/>/,s={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(B,F)=>{let G=B[0].length+B.index,z=B.input[G];if(z==="<"||z===","){F.ignoreMatch();return}z===">"&&(r(B,{after:G})||F.ignoreMatch());let H,Q=B.input.substring(G);if(H=Q.match(/^\s*=/)){F.ignoreMatch();return}if((H=Q.match(/^\s+extends\s+/))&&H.index===0){F.ignoreMatch();return}}},o={$pattern:nj,keyword:UMe,literal:qMe,built_in:HMe,"variable.language":VMe},l="[0-9](_?[0-9])*",u=`\\.(${l})`,h="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",f={className:"number",variants:[{begin:`(\\b(${h})((${u})|\\.)?|(${u}))[eE][+-]?(${l})\\b`},{begin:`\\b(${h})\\b((${u})\\b|\\.)?|(${u})\\b`},{begin:"\\b(0|[1-9](_?[0-9])*)n\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*n?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*n?\\b"},{begin:"\\b0[0-7]+n?\\b"}],relevance:0},d={className:"subst",begin:"\\$\\{",end:"\\}",keywords:o,contains:[]},p={begin:".?html`",end:"",starts:{end:"`",returnEnd:!1,contains:[t.BACKSLASH_ESCAPE,d],subLanguage:"xml"}},m={begin:".?css`",end:"",starts:{end:"`",returnEnd:!1,contains:[t.BACKSLASH_ESCAPE,d],subLanguage:"css"}},g={begin:".?gql`",end:"",starts:{end:"`",returnEnd:!1,contains:[t.BACKSLASH_ESCAPE,d],subLanguage:"graphql"}},v={className:"string",begin:"`",end:"`",contains:[t.BACKSLASH_ESCAPE,d]},b={className:"comment",variants:[t.COMMENT(/\/\*\*(?!\/)/,"\\*/",{relevance:0,contains:[{begin:"(?=@[A-Za-z]+)",relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"},{className:"type",begin:"\\{",end:"\\}",excludeEnd:!0,excludeBegin:!0,relevance:0},{className:"variable",begin:n+"(?=\\s*(-)|$)",endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),t.C_BLOCK_COMMENT_MODE,t.C_LINE_COMMENT_MODE]},w=[t.APOS_STRING_MODE,t.QUOTE_STRING_MODE,p,m,g,v,{match:/\$\d+/},f];d.contains=w.concat({begin:/\{/,end:/\}/,keywords:o,contains:["self"].concat(w)});let C=[].concat(b,d.contains),k=C.concat([{begin:/(\s*)\(/,end:/\)/,keywords:o,contains:["self"].concat(C)}]),E={className:"params",begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:o,contains:k},_={variants:[{match:[/class/,/\s+/,n,/\s+/,/extends/,/\s+/,e.concat(n,"(",e.concat(/\./,n),")*")],scope:{1:"keyword",3:"title.class",5:"keyword",7:"title.class.inherited"}},{match:[/class/,/\s+/,n],scope:{1:"keyword",3:"title.class"}}]},S={relevance:0,match:e.either(/\bJSON/,/\b[A-Z][a-z]+([A-Z][a-z]*|\d)*/,/\b[A-Z]{2,}([A-Z][a-z]+|\d)+([A-Z][a-z]*)*/,/\b[A-Z]{2,}[a-z]+([A-Z][a-z]+|\d)*([A-Z][a-z]*)*/),className:"title.class",keywords:{_:[...aj,...ij]}},L={label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},M={variants:[{match:[/function/,/\s+/,n,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[E],illegal:/%/},D={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"};function T(B){return e.concat("(?!",B.join("|"),")")}let I={match:e.concat(/\b/,T([...sj,"super","import"].map(B=>`${B}\\s*\\(`)),n,e.lookahead(/\s*\(/)),className:"title.function",relevance:0},N={begin:e.concat(/\./,e.lookahead(e.concat(n,/(?![0-9A-Za-z$_(])/))),end:n,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},O={match:[/get|set/,/\s+/,n,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},E]},R="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+t.UNDERSCORE_IDENT_RE+")\\s*=>",P={match:[/const|var|let/,/\s+/,n,/\s*/,/=\s*/,/(async\s*)?/,e.lookahead(R)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[E]};return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:o,exports:{PARAMS_CONTAINS:k,CLASS_REFERENCE:S},illegal:/#(?![$_A-z])/,contains:[t.SHEBANG({label:"shebang",binary:"node",relevance:5}),L,t.APOS_STRING_MODE,t.QUOTE_STRING_MODE,p,m,g,v,b,{match:/\$\d+/},f,S,{scope:"attr",match:n+e.lookahead(":"),relevance:0},P,{begin:"("+t.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[b,t.REGEXP_MODE,{className:"function",begin:R,returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:t.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:o,contains:k}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:a.begin,end:a.end},{match:i},{begin:s.begin,"on:begin":s.isTrulyOpeningTag,end:s.end}],subLanguage:"xml",contains:[{begin:s.begin,end:s.end,skip:!0,contains:["self"]}]}]},M,{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+t.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[E,t.inherit(t.TITLE_MODE,{begin:n,className:"title.function"})]},{match:/\.\.\./,relevance:0},N,{match:"\\$"+n,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[E]},I,D,_,O,{match:/\$[(.]/}]}}var Ok="[A-Za-z$_][0-9A-Za-z$_]*",oj=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends","using"],lj=["true","false","null","undefined","NaN","Infinity"],uj=["Object","Function","Boolean","Symbol","Math","Date","Number","BigInt","String","RegExp","Array","Float32Array","Float64Array","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Int32Array","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array","Set","Map","WeakSet","WeakMap","ArrayBuffer","SharedArrayBuffer","Atomics","DataView","JSON","Promise","Generator","GeneratorFunction","AsyncFunction","Reflect","Proxy","Intl","WebAssembly"],cj=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],hj=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],fj=["arguments","this","super","console","window","document","localStorage","sessionStorage","module","global"],dj=[].concat(hj,uj,cj);function WMe(t){let e=t.regex,r=(B,{after:F})=>{let G="",end:""},i=/<[A-Za-z0-9\\._:-]+\s*\/>/,s={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(B,F)=>{let G=B[0].length+B.index,z=B.input[G];if(z==="<"||z===","){F.ignoreMatch();return}z===">"&&(r(B,{after:G})||F.ignoreMatch());let H,Q=B.input.substring(G);if(H=Q.match(/^\s*=/)){F.ignoreMatch();return}if((H=Q.match(/^\s+extends\s+/))&&H.index===0){F.ignoreMatch();return}}},o={$pattern:Ok,keyword:oj,literal:lj,built_in:dj,"variable.language":fj},l="[0-9](_?[0-9])*",u=`\\.(${l})`,h="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",f={className:"number",variants:[{begin:`(\\b(${h})((${u})|\\.)?|(${u}))[eE][+-]?(${l})\\b`},{begin:`\\b(${h})\\b((${u})\\b|\\.)?|(${u})\\b`},{begin:"\\b(0|[1-9](_?[0-9])*)n\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*n?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*n?\\b"},{begin:"\\b0[0-7]+n?\\b"}],relevance:0},d={className:"subst",begin:"\\$\\{",end:"\\}",keywords:o,contains:[]},p={begin:".?html`",end:"",starts:{end:"`",returnEnd:!1,contains:[t.BACKSLASH_ESCAPE,d],subLanguage:"xml"}},m={begin:".?css`",end:"",starts:{end:"`",returnEnd:!1,contains:[t.BACKSLASH_ESCAPE,d],subLanguage:"css"}},g={begin:".?gql`",end:"",starts:{end:"`",returnEnd:!1,contains:[t.BACKSLASH_ESCAPE,d],subLanguage:"graphql"}},v={className:"string",begin:"`",end:"`",contains:[t.BACKSLASH_ESCAPE,d]},b={className:"comment",variants:[t.COMMENT(/\/\*\*(?!\/)/,"\\*/",{relevance:0,contains:[{begin:"(?=@[A-Za-z]+)",relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"},{className:"type",begin:"\\{",end:"\\}",excludeEnd:!0,excludeBegin:!0,relevance:0},{className:"variable",begin:n+"(?=\\s*(-)|$)",endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),t.C_BLOCK_COMMENT_MODE,t.C_LINE_COMMENT_MODE]},w=[t.APOS_STRING_MODE,t.QUOTE_STRING_MODE,p,m,g,v,{match:/\$\d+/},f];d.contains=w.concat({begin:/\{/,end:/\}/,keywords:o,contains:["self"].concat(w)});let C=[].concat(b,d.contains),k=C.concat([{begin:/(\s*)\(/,end:/\)/,keywords:o,contains:["self"].concat(C)}]),E={className:"params",begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:o,contains:k},_={variants:[{match:[/class/,/\s+/,n,/\s+/,/extends/,/\s+/,e.concat(n,"(",e.concat(/\./,n),")*")],scope:{1:"keyword",3:"title.class",5:"keyword",7:"title.class.inherited"}},{match:[/class/,/\s+/,n],scope:{1:"keyword",3:"title.class"}}]},S={relevance:0,match:e.either(/\bJSON/,/\b[A-Z][a-z]+([A-Z][a-z]*|\d)*/,/\b[A-Z]{2,}([A-Z][a-z]+|\d)+([A-Z][a-z]*)*/,/\b[A-Z]{2,}[a-z]+([A-Z][a-z]+|\d)*([A-Z][a-z]*)*/),className:"title.class",keywords:{_:[...uj,...cj]}},L={label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},M={variants:[{match:[/function/,/\s+/,n,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[E],illegal:/%/},D={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"};function T(B){return e.concat("(?!",B.join("|"),")")}let I={match:e.concat(/\b/,T([...hj,"super","import"].map(B=>`${B}\\s*\\(`)),n,e.lookahead(/\s*\(/)),className:"title.function",relevance:0},N={begin:e.concat(/\./,e.lookahead(e.concat(n,/(?![0-9A-Za-z$_(])/))),end:n,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},O={match:[/get|set/,/\s+/,n,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},E]},R="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+t.UNDERSCORE_IDENT_RE+")\\s*=>",P={match:[/const|var|let/,/\s+/,n,/\s*/,/=\s*/,/(async\s*)?/,e.lookahead(R)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[E]};return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:o,exports:{PARAMS_CONTAINS:k,CLASS_REFERENCE:S},illegal:/#(?![$_A-z])/,contains:[t.SHEBANG({label:"shebang",binary:"node",relevance:5}),L,t.APOS_STRING_MODE,t.QUOTE_STRING_MODE,p,m,g,v,b,{match:/\$\d+/},f,S,{scope:"attr",match:n+e.lookahead(":"),relevance:0},P,{begin:"("+t.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[b,t.REGEXP_MODE,{className:"function",begin:R,returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:t.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:o,contains:k}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:a.begin,end:a.end},{match:i},{begin:s.begin,"on:begin":s.isTrulyOpeningTag,end:s.end}],subLanguage:"xml",contains:[{begin:s.begin,end:s.end,skip:!0,contains:["self"]}]}]},M,{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+t.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[E,t.inherit(t.TITLE_MODE,{begin:n,className:"title.function"})]},{match:/\.\.\./,relevance:0},N,{match:"\\$"+n,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[E]},I,D,_,O,{match:/\$[(.]/}]}}function rI(t){let e=t.regex,r=WMe(t),n=Ok,a=["any","void","number","boolean","string","object","never","symbol","bigint","unknown"],i={begin:[/namespace/,/\s+/,t.IDENT_RE],beginScope:{1:"keyword",3:"title.class"}},s={beginKeywords:"interface",end:/\{/,excludeEnd:!0,keywords:{keyword:"interface extends",built_in:a},contains:[r.exports.CLASS_REFERENCE]},o={className:"meta",relevance:10,begin:/^\s*['"]use strict['"]/},l=["type","interface","public","private","protected","implements","declare","abstract","readonly","enum","override","satisfies"],u={$pattern:Ok,keyword:oj.concat(l),literal:lj,built_in:dj.concat(a),"variable.language":fj},h={className:"meta",begin:"@"+n},f=(g,v,y)=>{let b=g.contains.findIndex(w=>w.label===v);if(b===-1)throw new Error("can not find mode to replace");g.contains.splice(b,1,y)};Object.assign(r.keywords,u),r.exports.PARAMS_CONTAINS.push(h);let d=r.contains.find(g=>g.scope==="attr"),p=Object.assign({},d,{match:e.concat(n,e.lookahead(/\s*\?:/))});r.exports.PARAMS_CONTAINS.push([r.exports.CLASS_REFERENCE,d,p]),r.contains=r.contains.concat([h,i,s,p]),f(r,"shebang",t.SHEBANG()),f(r,"use_strict",o);let m=r.contains.find(g=>g.label==="func.def");return m.relevance=0,Object.assign(r,{name:"TypeScript",aliases:["ts","tsx","mts","cts"]}),r}function nI(t){let e=t.regex,r=new RegExp("[\\p{XID_Start}_]\\p{XID_Continue}*","u"),n=["and","as","assert","async","await","break","case","class","continue","def","del","elif","else","except","finally","for","from","global","if","import","in","is","lambda","match","nonlocal|10","not","or","pass","raise","return","try","while","with","yield"],o={$pattern:/[A-Za-z]\w+|__\w+__/,keyword:n,built_in:["__import__","abs","all","any","ascii","bin","bool","breakpoint","bytearray","bytes","callable","chr","classmethod","compile","complex","delattr","dict","dir","divmod","enumerate","eval","exec","filter","float","format","frozenset","getattr","globals","hasattr","hash","help","hex","id","input","int","isinstance","issubclass","iter","len","list","locals","map","max","memoryview","min","next","object","oct","open","ord","pow","print","property","range","repr","reversed","round","set","setattr","slice","sorted","staticmethod","str","sum","super","tuple","type","vars","zip"],literal:["__debug__","Ellipsis","False","None","NotImplemented","True"],type:["Any","Callable","Coroutine","Dict","List","Literal","Generic","Optional","Sequence","Set","Tuple","Type","Union"]},l={className:"meta",begin:/^(>>>|\.\.\.) /},u={className:"subst",begin:/\{/,end:/\}/,keywords:o,illegal:/#/},h={begin:/\{\{/,relevance:0},f={className:"string",contains:[t.BACKSLASH_ESCAPE],variants:[{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?'''/,end:/'''/,contains:[t.BACKSLASH_ESCAPE,l],relevance:10},{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?"""/,end:/"""/,contains:[t.BACKSLASH_ESCAPE,l],relevance:10},{begin:/([fF][rR]|[rR][fF]|[fF])'''/,end:/'''/,contains:[t.BACKSLASH_ESCAPE,l,h,u]},{begin:/([fF][rR]|[rR][fF]|[fF])"""/,end:/"""/,contains:[t.BACKSLASH_ESCAPE,l,h,u]},{begin:/([uU]|[rR])'/,end:/'/,relevance:10},{begin:/([uU]|[rR])"/,end:/"/,relevance:10},{begin:/([bB]|[bB][rR]|[rR][bB])'/,end:/'/},{begin:/([bB]|[bB][rR]|[rR][bB])"/,end:/"/},{begin:/([fF][rR]|[rR][fF]|[fF])'/,end:/'/,contains:[t.BACKSLASH_ESCAPE,h,u]},{begin:/([fF][rR]|[rR][fF]|[fF])"/,end:/"/,contains:[t.BACKSLASH_ESCAPE,h,u]},t.APOS_STRING_MODE,t.QUOTE_STRING_MODE]},d="[0-9](_?[0-9])*",p=`(\\b(${d}))?\\.(${d})|\\b(${d})\\.`,m=`\\b|${n.join("|")}`,g={className:"number",relevance:0,variants:[{begin:`(\\b(${d})|(${p}))[eE][+-]?(${d})[jJ]?(?=${m})`},{begin:`(${p})[jJ]?`},{begin:`\\b([1-9](_?[0-9])*|0+(_?0)*)[lLjJ]?(?=${m})`},{begin:`\\b0[bB](_?[01])+[lL]?(?=${m})`},{begin:`\\b0[oO](_?[0-7])+[lL]?(?=${m})`},{begin:`\\b0[xX](_?[0-9a-fA-F])+[lL]?(?=${m})`},{begin:`\\b(${d})[jJ](?=${m})`}]},v={className:"comment",begin:e.lookahead(/# type:/),end:/$/,keywords:o,contains:[{begin:/# type:/},{begin:/#/,end:/\b\B/,endsWithParent:!0}]},y={className:"params",variants:[{className:"",begin:/\(\s*\)/,skip:!0},{begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:o,contains:["self",l,g,f,t.HASH_COMMENT_MODE]}]};return u.contains=[f,g,l],{name:"Python",aliases:["py","gyp","ipython"],unicodeRegex:!0,keywords:o,illegal:/(<\/|\?)|=>/,contains:[l,g,{scope:"variable.language",match:/\bself\b/},{beginKeywords:"if",relevance:0},{match:/\bor\b/,scope:"keyword"},f,v,t.HASH_COMMENT_MODE,{match:[/\bdef/,/\s+/,r],scope:{1:"keyword",3:"title.function"},contains:[y]},{variants:[{match:[/\bclass/,/\s+/,r,/\s*/,/\(\s*/,r,/\s*\)/]},{match:[/\bclass/,/\s+/,r]}],scope:{1:"keyword",3:"title.class",6:"title.class.inherited"}},{className:"meta",begin:/^[\t ]*@/,end:/(?=#)|$/,contains:[g,y,f]}]}}function aI(t){let e=t.regex,r=/(r#)?/,n=e.concat(r,t.UNDERSCORE_IDENT_RE),a=e.concat(r,t.IDENT_RE),i={className:"title.function.invoke",relevance:0,begin:e.concat(/\b/,/(?!let|for|while|if|else|match\b)/,a,e.lookahead(/\s*\(/))},s="([ui](8|16|32|64|128|size)|f(32|64))?",o=["abstract","as","async","await","become","box","break","const","continue","crate","do","dyn","else","enum","extern","false","final","fn","for","if","impl","in","let","loop","macro","match","mod","move","mut","override","priv","pub","ref","return","self","Self","static","struct","super","trait","true","try","type","typeof","union","unsafe","unsized","use","virtual","where","while","yield"],l=["true","false","Some","None","Ok","Err"],u=["drop ","Copy","Send","Sized","Sync","Drop","Fn","FnMut","FnOnce","ToOwned","Clone","Debug","PartialEq","PartialOrd","Eq","Ord","AsRef","AsMut","Into","From","Default","Iterator","Extend","IntoIterator","DoubleEndedIterator","ExactSizeIterator","SliceConcatExt","ToString","assert!","assert_eq!","bitflags!","bytes!","cfg!","col!","concat!","concat_idents!","debug_assert!","debug_assert_eq!","env!","eprintln!","panic!","file!","format!","format_args!","include_bytes!","include_str!","line!","local_data_key!","module_path!","option_env!","print!","println!","select!","stringify!","try!","unimplemented!","unreachable!","vec!","write!","writeln!","macro_rules!","assert_ne!","debug_assert_ne!"],h=["i8","i16","i32","i64","i128","isize","u8","u16","u32","u64","u128","usize","f32","f64","str","char","bool","Box","Option","Result","String","Vec"];return{name:"Rust",aliases:["rs"],keywords:{$pattern:t.IDENT_RE+"!?",type:h,keyword:o,literal:l,built_in:u},illegal:""},i]}}function pj(t){let i={keyword:["break","case","chan","const","continue","default","defer","else","fallthrough","for","func","go","goto","if","import","interface","map","package","range","return","select","struct","switch","type","var"],type:["bool","byte","complex64","complex128","error","float32","float64","int8","int16","int32","int64","string","uint8","uint16","uint32","uint64","int","uint","uintptr","rune"],literal:["true","false","iota","nil"],built_in:["append","cap","close","complex","copy","imag","len","make","new","panic","print","println","real","recover","delete"]};return{name:"Go",aliases:["golang"],keywords:i,illegal:"]([1-9]?[+-])?[ ]*\\n( +)[^ ][^\\n]*\\n(\\2[^\\n]+\\n?)*"},{begin:"<%[%=-]?",end:"[%-]?%>",subLanguage:"ruby",excludeBegin:!0,excludeEnd:!0,relevance:0},{className:"type",begin:"!\\w+!"+r},{className:"type",begin:"!<"+r+">"},{className:"type",begin:"!"+r},{className:"type",begin:"!!"+r},{className:"meta",begin:"&"+t.UNDERSCORE_IDENT_RE+"$"},{className:"meta",begin:"\\*"+t.UNDERSCORE_IDENT_RE+"$"},{className:"bullet",begin:"-(?=[ ]|$)",relevance:0},t.HASH_COMMENT_MODE,{beginKeywords:e,keywords:{literal:e}},d,{className:"number",begin:t.C_NUMBER_RE+"\\b",relevance:0},m,g,i,s],y=[...v];return y.pop(),y.push(o),p.contains=y,{name:"YAML",case_insensitive:!0,aliases:["yml"],contains:v}}function sI(t){let e=t.regex,r={begin:/<\/?[A-Za-z_]/,end:">",subLanguage:"xml",relevance:0},n={begin:"^[-\\*]{3,}",end:"$"},a={className:"code",variants:[{begin:"(`{3,})[^`](.|\\n)*?\\1`*[ ]*"},{begin:"(~{3,})[^~](.|\\n)*?\\1~*[ ]*"},{begin:"```",end:"```+[ ]*$"},{begin:"~~~",end:"~~~+[ ]*$"},{begin:"`.+?`"},{begin:"(?=^( {4}|\\t))",contains:[{begin:"^( {4}|\\t)",end:"(\\n)$"}],relevance:0}]},i={className:"bullet",begin:"^[ ]*([*+-]|(\\d+\\.))(?=\\s+)",end:"\\s+",excludeEnd:!0},s={begin:/^\[[^\n]+\]:/,returnBegin:!0,contains:[{className:"symbol",begin:/\[/,end:/\]/,excludeBegin:!0,excludeEnd:!0},{className:"link",begin:/:\s*/,end:/$/,excludeBegin:!0}]},o=/[A-Za-z][A-Za-z0-9+.-]*/,l={variants:[{begin:/\[.+?\]\[.*?\]/,relevance:0},{begin:/\[.+?\]\(((data|javascript|mailto):|(?:http|ftp)s?:\/\/).*?\)/,relevance:2},{begin:e.concat(/\[.+?\]\(/,o,/:\/\/.*?\)/),relevance:2},{begin:/\[.+?\]\([./?&#].*?\)/,relevance:1},{begin:/\[.*?\]\(.*?\)/,relevance:0}],returnBegin:!0,contains:[{match:/\[(?=\])/},{className:"string",relevance:0,begin:"\\[",end:"\\]",excludeBegin:!0,returnEnd:!0},{className:"link",relevance:0,begin:"\\]\\(",end:"\\)",excludeBegin:!0,excludeEnd:!0},{className:"symbol",relevance:0,begin:"\\]\\[",end:"\\]",excludeBegin:!0,excludeEnd:!0}]},u={className:"strong",contains:[],variants:[{begin:/_{2}(?!\s)/,end:/_{2}/},{begin:/\*{2}(?!\s)/,end:/\*{2}/}]},h={className:"emphasis",contains:[],variants:[{begin:/\*(?![*\s])/,end:/\*/},{begin:/_(?![_\s])/,end:/_/,relevance:0}]},f=t.inherit(u,{contains:[]}),d=t.inherit(h,{contains:[]});u.contains.push(d),h.contains.push(f);let p=[r,l];return[u,h,f,d].forEach(y=>{y.contains=y.contains.concat(p)}),p=p.concat(u,h),{name:"Markdown",aliases:["md","mkdown","mkd"],contains:[{className:"section",variants:[{begin:"^#{1,6}",end:"$",contains:p},{begin:"(?=^.+?\\n[=-]{2,}$)",contains:[{begin:"^[=-]*$"},{begin:"^",end:"\\n",contains:p}]}]},r,i,u,h,{className:"quote",begin:"^>\\s+",contains:p,end:"$"},a,n,l,s,{scope:"literal",match:/&([a-zA-Z0-9]+|#[0-9]{1,7}|#[Xx][0-9a-fA-F]{1,6});/}]}}var Lg="[0-9](_*[0-9])*",Bk=`\\.(${Lg})`,Fk="[0-9a-fA-F](_*[0-9a-fA-F])*",gj={className:"number",variants:[{begin:`(\\b(${Lg})((${Bk})|\\.)?|(${Bk}))[eE][+-]?(${Lg})[fFdD]?\\b`},{begin:`\\b(${Lg})((${Bk})[fFdD]?\\b|\\.([fFdD]\\b)?)`},{begin:`(${Bk})[fFdD]?\\b`},{begin:`\\b(${Lg})[fFdD]\\b`},{begin:`\\b0[xX]((${Fk})\\.?|(${Fk})?\\.(${Fk}))[pP][+-]?(${Lg})[fFdD]?\\b`},{begin:"\\b(0|[1-9](_*[0-9])*)[lL]?\\b"},{begin:`\\b0[xX](${Fk})[lL]?\\b`},{begin:"\\b0(_*[0-7])*[lL]?\\b"},{begin:"\\b0[bB][01](_*[01])*[lL]?\\b"}],relevance:0};function vj(t,e,r){return r===-1?"":t.replace(e,n=>vj(t,e,r-1))}function yj(t){let e=t.regex,r="[\xC0-\u02B8a-zA-Z_$][\xC0-\u02B8a-zA-Z_$0-9]*",n=r+vj("(?:<"+r+"~~~(?:\\s*,\\s*"+r+"~~~)*>)?",/~~~/g,2),l={keyword:["synchronized","abstract","private","var","static","if","const ","for","while","strictfp","finally","protected","import","native","final","void","enum","else","break","transient","catch","instanceof","volatile","case","assert","package","default","public","try","switch","continue","throws","protected","public","private","module","requires","exports","do","sealed","yield","permits","goto","when"],literal:["false","true","null"],type:["char","boolean","long","float","int","byte","short","double"],built_in:["super","this"]},u={className:"meta",begin:"@"+r,contains:[{begin:/\(/,end:/\)/,contains:["self"]}]},h={className:"params",begin:/\(/,end:/\)/,keywords:l,relevance:0,contains:[t.C_BLOCK_COMMENT_MODE],endsParent:!0};return{name:"Java",aliases:["jsp"],keywords:l,illegal:/<\/|#/,contains:[t.COMMENT("/\\*\\*","\\*/",{relevance:0,contains:[{begin:/\w+@/,relevance:0},{className:"doctag",begin:"@[A-Za-z]+"}]}),{begin:/import java\.[a-z]+\./,keywords:"import",relevance:2},t.C_LINE_COMMENT_MODE,t.C_BLOCK_COMMENT_MODE,{begin:/"""/,end:/"""/,className:"string",contains:[t.BACKSLASH_ESCAPE]},t.APOS_STRING_MODE,t.QUOTE_STRING_MODE,{match:[/\b(?:class|interface|enum|extends|implements|new)/,/\s+/,r],className:{1:"keyword",3:"title.class"}},{match:/non-sealed/,scope:"keyword"},{begin:[e.concat(/(?!else)/,r),/\s+/,r,/\s+/,/=(?!=)/],className:{1:"type",3:"variable",5:"operator"}},{begin:[/record/,/\s+/,r],className:{1:"keyword",3:"title.class"},contains:[h,t.C_LINE_COMMENT_MODE,t.C_BLOCK_COMMENT_MODE]},{beginKeywords:"new throw return else",relevance:0},{begin:["(?:"+n+"\\s+)",t.UNDERSCORE_IDENT_RE,/\s*(?=\()/],className:{2:"title.function"},keywords:l,contains:[{className:"params",begin:/\(/,end:/\)/,keywords:l,relevance:0,contains:[u,t.APOS_STRING_MODE,t.QUOTE_STRING_MODE,gj,t.C_BLOCK_COMMENT_MODE]},t.C_LINE_COMMENT_MODE,t.C_BLOCK_COMMENT_MODE]},gj,u]}}function xj(t){let e=t.regex,r=t.COMMENT("//","$",{contains:[{begin:/\\\n/}]}),n="decltype\\(auto\\)",a="[a-zA-Z_]\\w*::",s="("+n+"|"+e.optional(a)+"[a-zA-Z_]\\w*"+e.optional("<[^<>]+>")+")",o={className:"type",variants:[{begin:"\\b[a-z\\d_]*_t\\b"},{match:/\batomic_[a-z]{3,6}\b/}]},u={className:"string",variants:[{begin:'(u8?|U|L)?"',end:'"',illegal:"\\n",contains:[t.BACKSLASH_ESCAPE]},{begin:"(u8?|U|L)?'("+"\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)"+"|.)",end:"'",illegal:"."},t.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},h={className:"number",variants:[{match:/\b(0b[01']+)/},{match:/(-?)\b([\d']+(\.[\d']*)?|\.[\d']+)((ll|LL|l|L)(u|U)?|(u|U)(ll|LL|l|L)?|f|F|b|B)/},{match:/(-?)\b(0[xX][a-fA-F0-9]+(?:'[a-fA-F0-9]+)*(?:\.[a-fA-F0-9]*(?:'[a-fA-F0-9]*)*)?(?:[pP][-+]?[0-9]+)?(l|L)?(u|U)?)/},{match:/(-?)\b\d+(?:'\d+)*(?:\.\d*(?:'\d*)*)?(?:[eE][-+]?\d+)?/}],relevance:0},f={className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line pragma _Pragma ifdef ifndef elifdef elifndef include"},contains:[{begin:/\\\n/,relevance:0},t.inherit(u,{className:"string"}),{className:"string",begin:/<.*?>/},r,t.C_BLOCK_COMMENT_MODE]},d={className:"title",begin:e.optional(a)+t.IDENT_RE,relevance:0},p=e.optional(a)+t.IDENT_RE+"\\s*\\(",v={keyword:["asm","auto","break","case","continue","default","do","else","enum","extern","for","fortran","goto","if","inline","register","restrict","return","sizeof","typeof","typeof_unqual","struct","switch","typedef","union","volatile","while","_Alignas","_Alignof","_Atomic","_Generic","_Noreturn","_Static_assert","_Thread_local","alignas","alignof","noreturn","static_assert","thread_local","_Pragma"],type:["float","double","signed","unsigned","int","short","long","char","void","_Bool","_BitInt","_Complex","_Imaginary","_Decimal32","_Decimal64","_Decimal96","_Decimal128","_Decimal64x","_Decimal128x","_Float16","_Float32","_Float64","_Float128","_Float32x","_Float64x","_Float128x","const","static","constexpr","complex","bool","imaginary"],literal:"true false NULL",built_in:"std string wstring cin cout cerr clog stdin stdout stderr stringstream istringstream ostringstream auto_ptr deque list queue stack vector map set pair bitset multiset multimap unordered_set unordered_map unordered_multiset unordered_multimap priority_queue make_pair array shared_ptr abort terminate abs acos asin atan2 atan calloc ceil cosh cos exit exp fabs floor fmod fprintf fputs free frexp fscanf future isalnum isalpha iscntrl isdigit isgraph islower isprint ispunct isspace isupper isxdigit tolower toupper labs ldexp log10 log malloc realloc memchr memcmp memcpy memset modf pow printf putchar puts scanf sinh sin snprintf sprintf sqrt sscanf strcat strchr strcmp strcpy strcspn strlen strncat strncmp strncpy strpbrk strrchr strspn strstr tanh tan vfprintf vprintf vsprintf endl initializer_list unique_ptr"},y=[f,o,r,t.C_BLOCK_COMMENT_MODE,h,u],b={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:v,contains:y.concat([{begin:/\(/,end:/\)/,keywords:v,contains:y.concat(["self"]),relevance:0}]),relevance:0},w={begin:"("+s+"[\\*&\\s]+)+"+p,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:v,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:n,keywords:v,relevance:0},{begin:p,returnBegin:!0,contains:[t.inherit(d,{className:"title.function"})],relevance:0},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:v,relevance:0,contains:[r,t.C_BLOCK_COMMENT_MODE,u,h,o,{begin:/\(/,end:/\)/,keywords:v,relevance:0,contains:["self",r,t.C_BLOCK_COMMENT_MODE,u,h,o]}]},o,r,t.C_BLOCK_COMMENT_MODE,f]};return{name:"C",aliases:["h"],keywords:v,disableAutodetect:!0,illegal:"=]/,contains:[{beginKeywords:"final class struct"},t.TITLE_MODE]}]),exports:{preprocessor:f,strings:u,keywords:v}}}function bj(t){let e=t.regex,r=t.COMMENT("//","$",{contains:[{begin:/\\\n/}]}),n="decltype\\(auto\\)",a="[a-zA-Z_]\\w*::",s="(?!struct)("+n+"|"+e.optional(a)+"[a-zA-Z_]\\w*"+e.optional("<[^<>]+>")+")",o={className:"type",begin:"\\b[a-z\\d_]*_t\\b"},u={className:"string",variants:[{begin:'(u8?|U|L)?"',end:'"',illegal:"\\n",contains:[t.BACKSLASH_ESCAPE]},{begin:"(u8?|U|L)?'("+"\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)"+"|.)",end:"'",illegal:"."},t.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},h={className:"number",variants:[{begin:"[+-]?(?:(?:[0-9](?:'?[0-9])*\\.(?:[0-9](?:'?[0-9])*)?|\\.[0-9](?:'?[0-9])*)(?:[Ee][+-]?[0-9](?:'?[0-9])*)?|[0-9](?:'?[0-9])*[Ee][+-]?[0-9](?:'?[0-9])*|0[Xx](?:[0-9A-Fa-f](?:'?[0-9A-Fa-f])*(?:\\.(?:[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)?)?|\\.[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)[Pp][+-]?[0-9](?:'?[0-9])*)(?:[Ff](?:16|32|64|128)?|(BF|bf)16|[Ll]|)"},{begin:"[+-]?\\b(?:0[Bb][01](?:'?[01])*|0[Xx][0-9A-Fa-f](?:'?[0-9A-Fa-f])*|0(?:'?[0-7])*|[1-9](?:'?[0-9])*)(?:[Uu](?:LL?|ll?)|[Uu][Zz]?|(?:LL?|ll?)[Uu]?|[Zz][Uu]|)"}],relevance:0},f={className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line pragma _Pragma ifdef ifndef include"},contains:[{begin:/\\\n/,relevance:0},t.inherit(u,{className:"string"}),{className:"string",begin:/<.*?>/},r,t.C_BLOCK_COMMENT_MODE]},d={className:"title",begin:e.optional(a)+t.IDENT_RE,relevance:0},p=e.optional(a)+t.IDENT_RE+"\\s*\\(",m=["alignas","alignof","and","and_eq","asm","atomic_cancel","atomic_commit","atomic_noexcept","auto","bitand","bitor","break","case","catch","class","co_await","co_return","co_yield","compl","concept","const_cast|10","consteval","constexpr","constinit","continue","decltype","default","delete","do","dynamic_cast|10","else","enum","explicit","export","extern","false","final","for","friend","goto","if","import","inline","module","mutable","namespace","new","noexcept","not","not_eq","nullptr","operator","or","or_eq","override","private","protected","public","reflexpr","register","reinterpret_cast|10","requires","return","sizeof","static_assert","static_cast|10","struct","switch","synchronized","template","this","thread_local","throw","transaction_safe","transaction_safe_dynamic","true","try","typedef","typeid","typename","union","using","virtual","volatile","while","xor","xor_eq"],g=["bool","char","char16_t","char32_t","char8_t","double","float","int","long","short","void","wchar_t","unsigned","signed","const","static"],v=["any","auto_ptr","barrier","binary_semaphore","bitset","complex","condition_variable","condition_variable_any","counting_semaphore","deque","false_type","flat_map","flat_set","future","imaginary","initializer_list","istringstream","jthread","latch","lock_guard","multimap","multiset","mutex","optional","ostringstream","packaged_task","pair","promise","priority_queue","queue","recursive_mutex","recursive_timed_mutex","scoped_lock","set","shared_future","shared_lock","shared_mutex","shared_timed_mutex","shared_ptr","stack","string_view","stringstream","timed_mutex","thread","true_type","tuple","unique_lock","unique_ptr","unordered_map","unordered_multimap","unordered_multiset","unordered_set","variant","vector","weak_ptr","wstring","wstring_view"],y=["abort","abs","acos","apply","as_const","asin","atan","atan2","calloc","ceil","cerr","cin","clog","cos","cosh","cout","declval","endl","exchange","exit","exp","fabs","floor","fmod","forward","fprintf","fputs","free","frexp","fscanf","future","invoke","isalnum","isalpha","iscntrl","isdigit","isgraph","islower","isprint","ispunct","isspace","isupper","isxdigit","labs","launder","ldexp","log","log10","make_pair","make_shared","make_shared_for_overwrite","make_tuple","make_unique","malloc","memchr","memcmp","memcpy","memset","modf","move","pow","printf","putchar","puts","realloc","scanf","sin","sinh","snprintf","sprintf","sqrt","sscanf","std","stderr","stdin","stdout","strcat","strchr","strcmp","strcpy","strcspn","strlen","strncat","strncmp","strncpy","strpbrk","strrchr","strspn","strstr","swap","tan","tanh","terminate","to_underlying","tolower","toupper","vfprintf","visit","vprintf","vsprintf"],C={type:g,keyword:m,literal:["NULL","false","nullopt","nullptr","true"],built_in:["_Pragma"],_type_hints:v},k={className:"function.dispatch",relevance:0,keywords:{_hint:y},begin:e.concat(/\b/,/(?!decltype)/,/(?!if)/,/(?!for)/,/(?!switch)/,/(?!while)/,t.IDENT_RE,e.lookahead(/(<[^<>]+>|)\s*\(/))},E=[k,f,o,r,t.C_BLOCK_COMMENT_MODE,h,u],_={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:C,contains:E.concat([{begin:/\(/,end:/\)/,keywords:C,contains:E.concat(["self"]),relevance:0}]),relevance:0},S={className:"function",begin:"("+s+"[\\*&\\s]+)+"+p,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:C,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:n,keywords:C,relevance:0},{begin:p,returnBegin:!0,contains:[d],relevance:0},{begin:/::/,relevance:0},{begin:/:/,endsWithParent:!0,contains:[u,h]},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:C,relevance:0,contains:[r,t.C_BLOCK_COMMENT_MODE,u,h,o,{begin:/\(/,end:/\)/,keywords:C,relevance:0,contains:["self",r,t.C_BLOCK_COMMENT_MODE,u,h,o]}]},o,r,t.C_BLOCK_COMMENT_MODE,f]};return{name:"C++",aliases:["cc","c++","h++","hpp","hh","hxx","cxx"],keywords:C,illegal:"",keywords:C,contains:["self",o]},{begin:t.IDENT_RE+"::",keywords:C},{match:[/\b(?:enum(?:\s+(?:class|struct))?|class|struct|union)/,/\s+/,/\w+/],className:{1:"keyword",3:"title.class"}}])}}function oI(t){let e=t.regex,r=e.concat(/[\p{L}_]/u,e.optional(/[\p{L}0-9_.-]*:/u),/[\p{L}0-9_.-]*/u),n=/[\p{L}0-9._:-]+/u,a={className:"symbol",begin:/&[a-z]+;|&#[0-9]+;|&#x[a-f0-9]+;/},i={begin:/\s/,contains:[{className:"keyword",begin:/#?[a-z_][a-z1-9_-]+/,illegal:/\n/}]},s=t.inherit(i,{begin:/\(/,end:/\)/}),o=t.inherit(t.APOS_STRING_MODE,{className:"string"}),l=t.inherit(t.QUOTE_STRING_MODE,{className:"string"}),u={endsWithParent:!0,illegal:/`]+/}]}]}]};return{name:"HTML, XML",aliases:["html","xhtml","rss","atom","xjb","xsd","xsl","plist","wsf","svg"],case_insensitive:!0,unicodeRegex:!0,contains:[{className:"meta",begin://,relevance:10,contains:[i,l,o,s,{begin:/\[/,end:/\]/,contains:[{className:"meta",begin://,contains:[i,s,l,o]}]}]},t.COMMENT(//,{relevance:10}),{begin://,relevance:10},a,{className:"meta",end:/\?>/,variants:[{begin:/<\?xml/,relevance:10,contains:[l]},{begin:/<\?[a-z][a-z0-9]+/}]},{className:"tag",begin:/)/,end:/>/,keywords:{name:"style"},contains:[u],starts:{end:/<\/style>/,returnEnd:!0,subLanguage:["css","xml"]}},{className:"tag",begin:/)/,end:/>/,keywords:{name:"script"},contains:[u],starts:{end:/<\/script>/,returnEnd:!0,subLanguage:["javascript","handlebars","xml"]}},{className:"tag",begin:/<>|<\/>/},{className:"tag",begin:e.concat(//,/>/,/\s/)))),end:/\/?>/,contains:[{className:"name",begin:r,relevance:0,starts:u}]},{className:"tag",begin:e.concat(/<\//,e.lookahead(e.concat(r,/>/))),contains:[{className:"name",begin:r,relevance:0},{begin:/>/,relevance:0,endsParent:!0}]}]}}var YMe=t=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:t.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},FUNCTION_DISPATCH:{className:"built_in",begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[t.APOS_STRING_MODE,t.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:t.NUMBER_RE+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},CSS_VARIABLE:{className:"attr",begin:/--[A-Za-z_][A-Za-z0-9_-]*/}}),XMe=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","optgroup","option","p","picture","q","quote","samp","section","select","source","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],jMe=["defs","g","marker","mask","pattern","svg","switch","symbol","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feFlood","feGaussianBlur","feImage","feMerge","feMorphology","feOffset","feSpecularLighting","feTile","feTurbulence","linearGradient","radialGradient","stop","circle","ellipse","image","line","path","polygon","polyline","rect","text","use","textPath","tspan","foreignObject","clipPath"],KMe=[...XMe,...jMe],ZMe=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"].sort().reverse(),QMe=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context","hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"].sort().reverse(),JMe=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),eOe=["accent-color","align-content","align-items","align-self","alignment-baseline","all","anchor-name","animation","animation-composition","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-range","animation-range-end","animation-range-start","animation-timeline","animation-timing-function","appearance","aspect-ratio","backdrop-filter","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-position-x","background-position-y","background-repeat","background-size","baseline-shift","block-size","border","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-end-end-radius","border-end-start-radius","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-start-end-radius","border-start-start-radius","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-align","box-decoration-break","box-direction","box-flex","box-flex-group","box-lines","box-ordinal-group","box-orient","box-pack","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","color-scheme","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","contain-intrinsic-block-size","contain-intrinsic-height","contain-intrinsic-inline-size","contain-intrinsic-size","contain-intrinsic-width","container","container-name","container-type","content","content-visibility","counter-increment","counter-reset","counter-set","cue","cue-after","cue-before","cursor","cx","cy","direction","display","dominant-baseline","empty-cells","enable-background","field-sizing","fill","fill-opacity","fill-rule","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","flood-color","flood-opacity","flow","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-optical-sizing","font-palette","font-size","font-size-adjust","font-smooth","font-smoothing","font-stretch","font-style","font-synthesis","font-synthesis-position","font-synthesis-small-caps","font-synthesis-style","font-synthesis-weight","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-emoji","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","forced-color-adjust","gap","glyph-orientation-horizontal","glyph-orientation-vertical","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphenate-character","hyphenate-limit-chars","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","initial-letter","initial-letter-align","inline-size","inset","inset-area","inset-block","inset-block-end","inset-block-start","inset-inline","inset-inline-end","inset-inline-start","isolation","justify-content","justify-items","justify-self","kerning","left","letter-spacing","lighting-color","line-break","line-height","line-height-step","list-style","list-style-image","list-style-position","list-style-type","margin","margin-block","margin-block-end","margin-block-start","margin-bottom","margin-inline","margin-inline-end","margin-inline-start","margin-left","margin-right","margin-top","margin-trim","marker","marker-end","marker-mid","marker-start","marks","mask","mask-border","mask-border-mode","mask-border-outset","mask-border-repeat","mask-border-slice","mask-border-source","mask-border-width","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","masonry-auto-flow","math-depth","math-shift","math-style","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","offset","offset-anchor","offset-distance","offset-path","offset-position","offset-rotate","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-anchor","overflow-block","overflow-clip-margin","overflow-inline","overflow-wrap","overflow-x","overflow-y","overlay","overscroll-behavior","overscroll-behavior-block","overscroll-behavior-inline","overscroll-behavior-x","overscroll-behavior-y","padding","padding-block","padding-block-end","padding-block-start","padding-bottom","padding-inline","padding-inline-end","padding-inline-start","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","paint-order","pause","pause-after","pause-before","perspective","perspective-origin","place-content","place-items","place-self","pointer-events","position","position-anchor","position-visibility","print-color-adjust","quotes","r","resize","rest","rest-after","rest-before","right","rotate","row-gap","ruby-align","ruby-position","scale","scroll-behavior","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-stop","scroll-snap-type","scroll-timeline","scroll-timeline-axis","scroll-timeline-name","scrollbar-color","scrollbar-gutter","scrollbar-width","shape-image-threshold","shape-margin","shape-outside","shape-rendering","speak","speak-as","src","stop-color","stop-opacity","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","tab-size","table-layout","text-align","text-align-all","text-align-last","text-anchor","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-skip-ink","text-decoration-style","text-decoration-thickness","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-indent","text-justify","text-orientation","text-overflow","text-rendering","text-shadow","text-size-adjust","text-transform","text-underline-offset","text-underline-position","text-wrap","text-wrap-mode","text-wrap-style","timeline-scope","top","touch-action","transform","transform-box","transform-origin","transform-style","transition","transition-behavior","transition-delay","transition-duration","transition-property","transition-timing-function","translate","unicode-bidi","user-modify","user-select","vector-effect","vertical-align","view-timeline","view-timeline-axis","view-timeline-inset","view-timeline-name","view-transition-name","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","white-space","white-space-collapse","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","x","y","z-index","zoom"].sort().reverse();function wj(t){let e=t.regex,r=YMe(t),n={begin:/-(webkit|moz|ms|o)-(?=[a-z])/},a="and or not only",i=/@-?\w[\w]*(-\w+)*/,s="[a-zA-Z-][a-zA-Z0-9_-]*",o=[t.APOS_STRING_MODE,t.QUOTE_STRING_MODE];return{name:"CSS",case_insensitive:!0,illegal:/[=|'\$]/,keywords:{keyframePosition:"from to"},classNameAliases:{keyframePosition:"selector-tag"},contains:[r.BLOCK_COMMENT,n,r.CSS_NUMBER_MODE,{className:"selector-id",begin:/#[A-Za-z0-9_-]+/,relevance:0},{className:"selector-class",begin:"\\."+s,relevance:0},r.ATTRIBUTE_SELECTOR_MODE,{className:"selector-pseudo",variants:[{begin:":("+QMe.join("|")+")"},{begin:":(:)?("+JMe.join("|")+")"}]},r.CSS_VARIABLE,{className:"attribute",begin:"\\b("+eOe.join("|")+")\\b"},{begin:/:/,end:/[;}{]/,contains:[r.BLOCK_COMMENT,r.HEXCOLOR,r.IMPORTANT,r.CSS_NUMBER_MODE,...o,{begin:/(url|data-uri)\(/,end:/\)/,relevance:0,keywords:{built_in:"url data-uri"},contains:[...o,{className:"string",begin:/[^)]/,endsWithParent:!0,excludeEnd:!0}]},r.FUNCTION_DISPATCH]},{begin:e.lookahead(/@/),end:"[{;]",relevance:0,illegal:/:/,contains:[{className:"keyword",begin:i},{begin:/\s/,endsWithParent:!0,excludeEnd:!0,relevance:0,keywords:{$pattern:/[a-z-]+/,keyword:a,attribute:ZMe.join(" ")},contains:[{begin:/[a-z-]+(?=:)/,className:"attribute"},...o,r.CSS_NUMBER_MODE]}]},{className:"selector-tag",begin:"\\b("+KMe.join("|")+")\\b"}]}}function kj(t){let e=t.regex,r=t.COMMENT("--","$"),n={scope:"string",variants:[{begin:/'/,end:/'/,contains:[{match:/''/}]}]},a={begin:/"/,end:/"/,contains:[{match:/""/}]},i=["true","false","unknown"],s=["double precision","large object","with timezone","without timezone"],o=["bigint","binary","blob","boolean","char","character","clob","date","dec","decfloat","decimal","float","int","integer","interval","nchar","nclob","national","numeric","real","row","smallint","time","timestamp","varchar","varying","varbinary"],l=["add","asc","collation","desc","final","first","last","view"],u=["abs","acos","all","allocate","alter","and","any","are","array","array_agg","array_max_cardinality","as","asensitive","asin","asymmetric","at","atan","atomic","authorization","avg","begin","begin_frame","begin_partition","between","bigint","binary","blob","boolean","both","by","call","called","cardinality","cascaded","case","cast","ceil","ceiling","char","char_length","character","character_length","check","classifier","clob","close","coalesce","collate","collect","column","commit","condition","connect","constraint","contains","convert","copy","corr","corresponding","cos","cosh","count","covar_pop","covar_samp","create","cross","cube","cume_dist","current","current_catalog","current_date","current_default_transform_group","current_path","current_role","current_row","current_schema","current_time","current_timestamp","current_path","current_role","current_transform_group_for_type","current_user","cursor","cycle","date","day","deallocate","dec","decimal","decfloat","declare","default","define","delete","dense_rank","deref","describe","deterministic","disconnect","distinct","double","drop","dynamic","each","element","else","empty","end","end_frame","end_partition","end-exec","equals","escape","every","except","exec","execute","exists","exp","external","extract","false","fetch","filter","first_value","float","floor","for","foreign","frame_row","free","from","full","function","fusion","get","global","grant","group","grouping","groups","having","hold","hour","identity","in","indicator","initial","inner","inout","insensitive","insert","int","integer","intersect","intersection","interval","into","is","join","json_array","json_arrayagg","json_exists","json_object","json_objectagg","json_query","json_table","json_table_primitive","json_value","lag","language","large","last_value","lateral","lead","leading","left","like","like_regex","listagg","ln","local","localtime","localtimestamp","log","log10","lower","match","match_number","match_recognize","matches","max","member","merge","method","min","minute","mod","modifies","module","month","multiset","national","natural","nchar","nclob","new","no","none","normalize","not","nth_value","ntile","null","nullif","numeric","octet_length","occurrences_regex","of","offset","old","omit","on","one","only","open","or","order","out","outer","over","overlaps","overlay","parameter","partition","pattern","per","percent","percent_rank","percentile_cont","percentile_disc","period","portion","position","position_regex","power","precedes","precision","prepare","primary","procedure","ptf","range","rank","reads","real","recursive","ref","references","referencing","regr_avgx","regr_avgy","regr_count","regr_intercept","regr_r2","regr_slope","regr_sxx","regr_sxy","regr_syy","release","result","return","returns","revoke","right","rollback","rollup","row","row_number","rows","running","savepoint","scope","scroll","search","second","seek","select","sensitive","session_user","set","show","similar","sin","sinh","skip","smallint","some","specific","specifictype","sql","sqlexception","sqlstate","sqlwarning","sqrt","start","static","stddev_pop","stddev_samp","submultiset","subset","substring","substring_regex","succeeds","sum","symmetric","system","system_time","system_user","table","tablesample","tan","tanh","then","time","timestamp","timezone_hour","timezone_minute","to","trailing","translate","translate_regex","translation","treat","trigger","trim","trim_array","true","truncate","uescape","union","unique","unknown","unnest","update","upper","user","using","value","values","value_of","var_pop","var_samp","varbinary","varchar","varying","versioning","when","whenever","where","width_bucket","window","with","within","without","year"],h=["abs","acos","array_agg","asin","atan","avg","cast","ceil","ceiling","coalesce","corr","cos","cosh","count","covar_pop","covar_samp","cume_dist","dense_rank","deref","element","exp","extract","first_value","floor","json_array","json_arrayagg","json_exists","json_object","json_objectagg","json_query","json_table","json_table_primitive","json_value","lag","last_value","lead","listagg","ln","log","log10","lower","max","min","mod","nth_value","ntile","nullif","percent_rank","percentile_cont","percentile_disc","position","position_regex","power","rank","regr_avgx","regr_avgy","regr_count","regr_intercept","regr_r2","regr_slope","regr_sxx","regr_sxy","regr_syy","row_number","sin","sinh","sqrt","stddev_pop","stddev_samp","substring","substring_regex","sum","tan","tanh","translate","translate_regex","treat","trim","trim_array","unnest","upper","value_of","var_pop","var_samp","width_bucket"],f=["current_catalog","current_date","current_default_transform_group","current_path","current_role","current_schema","current_transform_group_for_type","current_user","session_user","system_time","system_user","current_time","localtime","current_timestamp","localtimestamp"],d=["create table","insert into","primary key","foreign key","not null","alter table","add constraint","grouping sets","on overflow","character set","respect nulls","ignore nulls","nulls first","nulls last","depth first","breadth first"],p=h,m=[...u,...l].filter(k=>!h.includes(k)),g={scope:"variable",match:/@[a-z0-9][a-z0-9_]*/},v={scope:"operator",match:/[-+*/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?/,relevance:0},y={match:e.concat(/\b/,e.either(...p),/\s*\(/),relevance:0,keywords:{built_in:p}};function b(k){return e.concat(/\b/,e.either(...k.map(E=>E.replace(/\s+/,"\\s+"))),/\b/)}let w={scope:"keyword",match:b(d),relevance:0};function C(k,{exceptions:E,when:_}={}){let S=_;return E=E||[],k.map(L=>L.match(/\|\d+$/)||E.includes(L)?L:S(L)?`${L}|0`:L)}return{name:"SQL",case_insensitive:!0,illegal:/[{}]|<\//,keywords:{$pattern:/\b[\w\.]+/,keyword:C(m,{when:k=>k.length<3}),literal:i,type:o,built_in:f},contains:[{scope:"type",match:b(s)},w,y,g,n,a,t.C_NUMBER_MODE,t.C_BLOCK_COMMENT_MODE,r,v]}}pn.registerLanguage("javascript",tI);pn.registerLanguage("js",tI);pn.registerLanguage("typescript",rI);pn.registerLanguage("ts",rI);pn.registerLanguage("python",nI);pn.registerLanguage("py",nI);pn.registerLanguage("rust",aI);pn.registerLanguage("rs",aI);pn.registerLanguage("go",pj);pn.registerLanguage("json",mj);pn.registerLanguage("bash",Pk);pn.registerLanguage("sh",Pk);pn.registerLanguage("shell",Pk);pn.registerLanguage("yaml",iI);pn.registerLanguage("yml",iI);pn.registerLanguage("markdown",sI);pn.registerLanguage("md",sI);pn.registerLanguage("java",yj);pn.registerLanguage("c",xj);pn.registerLanguage("cpp",bj);pn.registerLanguage("xml",oI);pn.registerLanguage("html",oI);pn.registerLanguage("css",wj);pn.registerLanguage("sql",kj);function tOe(t){return String(t).trim().toLowerCase().replace(/[^\w一-鿿\- ]+/g,"").replace(/\s+/g,"-").replace(/-+/g,"-").replace(/^-|-$/g,"")||"section"}var Ej=0,kb=new qR({html:!1,linkify:!0,typographer:!0,highlight(t,e){let r=(e||"").toLowerCase();if(r==="mermaid"){let n=`mermaid-${++Ej}`,a=kb.utils.escapeHtml(t.trim());return`
    ${a}
    `}if(r&&pn.getLanguage(r))try{return`
    ${pn.highlight(t,{language:r,ignoreIllegals:!0}).value}
    `}catch{}return`
    ${kb.utils.escapeHtml(t)}
    `}});kb.use(np,{level:[1,2,3],slugify:tOe,permalink:!1});kb.use(Tj.default,{enabled:!0,label:!0,labelAfter:!0});function rOe(t){return t.replace(/]*?)\bsrc=(["'])([^"']+)\2([^>]*)>/gi,(e,r,n,a,i)=>{if(/^(https?:|data:|mdeye-asset:|blob:|file:)/i.test(a)||a.startsWith("#"))return e;let o=`mdeye-asset://local/${a.replace(/^\.\//,"").replace(/^\/+/,"")}`;return``})}function Cj(t){Ej=0;let e=kb.render(t??"");return rOe(e)}function Sj(t){let e=/]*\bid=(["'])([^"']+)\2[^>]*>([\s\S]*?)<\/h\1>/gi,r=[],n;for(;n=e.exec(t);){let a=Number(n[1]),i=n[3],s=n[4].replace(/<[^>]+>/g,"").trim();s&&r.push({level:a,id:i,text:s})}return r}function lI(t){return/```\s*mermaid\b/i.test(t??"")}YT();su();au();sl();Fo();eo();Mo();Fi();ln();UB();mc();ur();nP();cr();var JS="comm",e_="rule",t_="decl";var xme="@import";var bme="@namespace",wme="@keyframes";var kme="@layer";var Tme=Math.abs,im=String.fromCharCode;function r_(t){return t.trim()}function n_(t,e,r){return t.replace(e,r)}function Id(t,e){return t.charCodeAt(e)|0}function Dd(t,e,r){return t.slice(e,r)}function qo(t){return t.length}function Eme(t){return t.length}function sv(t,e){return e.push(t),t}var a_=1,ov=1,Cme=0,gl=0,Na=0,uv="";function i_(t,e,r,n,a,i,s,o){return{value:t,root:e,parent:r,type:n,props:a,children:i,line:a_,column:ov,length:s,return:"",siblings:o}}function Sme(){return Na}function _me(){return Na=gl>0?Id(uv,--gl):0,ov--,Na===10&&(ov=1,a_--),Na}function vl(){return Na=gl2||lv(Na)>3?"":" "}function Ime(t,e){for(;--e&&vl()&&!(Na<48||Na>102||Na>57&&Na<65||Na>70&&Na<97););return s_(t,P3()+(e<6&&Hh()==32&&vl()==32))}function qB(t){for(;vl();)switch(Na){case t:return gl;case 34:case 39:t!==34&&t!==39&&qB(Na);break;case 40:t===41&&qB(t);break;case 92:vl();break}return gl}function Dme(t,e){for(;vl()&&t+Na!==57;)if(t+Na===84&&Hh()===47)break;return"/*"+s_(e,gl-1)+"*"+im(t===47?t:vl())}function Nme(t){for(;!lv(Hh());)vl();return s_(t,gl)}function Pme(t){return Lme(l_("",null,null,null,[""],t=Ame(t),0,[0],t))}function l_(t,e,r,n,a,i,s,o,l){for(var u=0,h=0,f=s,d=0,p=0,m=0,g=1,v=1,y=1,b=0,w=0,C="",k=a,E=i,_=n,S=C;v;)switch(m=w,w=vl()){case 40:m!=108&&Id(S,f-1)==58?(b++,S+="("):S+=o_(w);break;case 41:b--,S+=")";break;case 34:case 39:case 91:S+=o_(w);break;case 9:case 10:case 13:case 32:if(b>0){S+=im(w);break}S+=Rme(m);break;case 92:S+=Ime(P3()-1,7);continue;case 47:switch(Hh()){case 42:case 47:sv(Htt(Dme(vl(),P3()),e,r,l),l),(lv(m||1)==5||lv(Hh()||1)==5)&&qo(S)&&Dd(S,-1,void 0)!==" "&&(S+=" ");break;default:S+="/"}break;case 123*g:o[u++]=qo(S)*y;case 125*g:case 59:case 0:if(b>0&&w){S+=im(w);break}switch(w){case 0:case 125:v=0;case 59+h:y==-1&&(S=n_(S,/\f/g,"")),p>0&&(qo(S)-f||g===0)&&sv(p>32?Ome(S+";",n,r,f-1,l):Ome(n_(S," ","")+";",n,r,f-2,l),l);break;case 59:S+=";";default:if(sv(_=Mme(S,e,r,u,h,a,o,C,k=[],E=[],f,i),i),w===123)if(h===0)l_(S,e,_,_,k,i,f,o,E);else{switch(d){case 99:if(Id(S,3)===110)break;case 108:if(Id(S,2)===97)break;default:h=0;case 100:case 109:case 115:}h?l_(t,_,_,n&&sv(Mme(t,_,_,0,0,a,o,C,a,k=[],f,E),E),a,E,f,o,n?k:E):l_(S,_,_,_,[""],E,0,o,E)}}u=h=p=0,g=y=1,C=S="",f=s;break;case 58:f=1+qo(S),p=m;default:if(g<1){if(w==123)--g;else if(w==125&&g++==0&&_me()==125)continue}switch(S+=im(w),w*g){case 38:y=h>0?1:(S+="\f",-1);break;case 44:if(b>0)break;o[u++]=(qo(S)-1)*y,y=1;break;case 64:Hh()===45&&(S+=o_(vl())),d=Hh(),h=f=qo(C=S+=Nme(P3())),w++;break;case 45:m===45&&qo(S)==2&&(g=0)}}return i}function Mme(t,e,r,n,a,i,s,o,l,u,h,f){for(var d=a-1,p=a===0?i:[""],m=Eme(p),g=0,v=0,y=0;g0?p[b]+" "+w:n_(w,/&\f/g,p[b])))&&(l[y++]=C);return i_(t,e,r,a===0?e_:o,l,u,h,f)}function Htt(t,e,r,n){return i_(t,e,r,JS,im(Sme()),Dd(t,2,-2),0,n)}function Ome(t,e,r,n,a){return i_(t,e,r,t_,Dd(t,0,n),Dd(t,n+1,-1),n,a)}function u_(t,e){for(var r="",n=0;n/^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/.test(t),"detector"),T8t=x(async()=>{let{diagram:t}=await Promise.resolve().then(()=>(Jme(),Qme));return{id:QRe,diagram:t}},"loader"),E8t={id:QRe,detector:k8t,loader:T8t},C8t=E8t,JRe="flowchart",S8t=x((t,e)=>e?.flowchart?.defaultRenderer==="dagre-wrapper"||e?.flowchart?.defaultRenderer==="elk"?!1:/^\s*graph/.test(t),"detector"),_8t=x(async()=>{let{diagram:t}=await Promise.resolve().then(()=>(b_(),x_));return{id:JRe,diagram:t}},"loader"),A8t={id:JRe,detector:S8t,loader:_8t},L8t=A8t,eIe="flowchart-v2",R8t=x((t,e)=>e?.flowchart?.defaultRenderer==="dagre-d3"?!1:(e?.flowchart?.defaultRenderer==="elk"&&(e.layout="elk"),/^\s*graph/.test(t)&&e?.flowchart?.defaultRenderer==="dagre-wrapper"?!0:/^\s*flowchart/.test(t)),"detector"),I8t=x(async()=>{let{diagram:t}=await Promise.resolve().then(()=>(b_(),x_));return{id:eIe,diagram:t}},"loader"),D8t={id:eIe,detector:R8t,loader:I8t},N8t=D8t,tIe="er",M8t=x(t=>/^\s*erDiagram/.test(t),"detector"),O8t=x(async()=>{let{diagram:t}=await Promise.resolve().then(()=>(age(),nge));return{id:tIe,diagram:t}},"loader"),P8t={id:tIe,detector:M8t,loader:O8t},B8t=P8t,rIe="gitGraph",F8t=x(t=>/^\s*gitGraph/.test(t),"detector"),z8t=x(async()=>{let{diagram:t}=await Promise.resolve().then(()=>(KEe(),jEe));return{id:rIe,diagram:t}},"loader"),$8t={id:rIe,detector:F8t,loader:z8t},G8t=$8t,nIe="gantt",U8t=x(t=>/^\s*gantt/.test(t),"detector"),q8t=x(async()=>{let{diagram:t}=await Promise.resolve().then(()=>(gCe(),mCe));return{id:nIe,diagram:t}},"loader"),V8t={id:nIe,detector:U8t,loader:q8t},H8t=V8t,aIe="info",W8t=x(t=>/^\s*info/.test(t),"detector"),Y8t=x(async()=>{let{diagram:t}=await Promise.resolve().then(()=>(yCe(),vCe));return{id:aIe,diagram:t}},"loader"),X8t={id:aIe,detector:W8t,loader:Y8t},iIe="pie",j8t=x(t=>/^\s*pie/.test(t),"detector"),K8t=x(async()=>{let{diagram:t}=await Promise.resolve().then(()=>(kCe(),wCe));return{id:iIe,diagram:t}},"loader"),Z8t={id:iIe,detector:j8t,loader:K8t},sIe="quadrantChart",Q8t=x(t=>/^\s*quadrantChart/.test(t),"detector"),J8t=x(async()=>{let{diagram:t}=await Promise.resolve().then(()=>(zCe(),FCe));return{id:sIe,diagram:t}},"loader"),e7t={id:sIe,detector:Q8t,loader:J8t},t7t=e7t,oIe="xychart",r7t=x(t=>/^\s*xychart-beta/.test(t),"detector"),n7t=x(async()=>{let{diagram:t}=await Promise.resolve().then(()=>(sSe(),iSe));return{id:oIe,diagram:t}},"loader"),a7t={id:oIe,detector:r7t,loader:n7t},i7t=a7t,lIe="requirement",s7t=x(t=>/^\s*requirement(Diagram)?/.test(t),"detector"),o7t=x(async()=>{let{diagram:t}=await Promise.resolve().then(()=>(uSe(),lSe));return{id:lIe,diagram:t}},"loader"),l7t={id:lIe,detector:s7t,loader:o7t},u7t=l7t,uIe="sequence",c7t=x(t=>/^\s*sequenceDiagram/.test(t),"detector"),h7t=x(async()=>{let{diagram:t}=await Promise.resolve().then(()=>(CSe(),ESe));return{id:uIe,diagram:t}},"loader"),f7t={id:uIe,detector:c7t,loader:h7t},d7t=f7t,cIe="class",p7t=x((t,e)=>e?.class?.defaultRenderer==="dagre-wrapper"?!1:/^\s*classDiagram/.test(t),"detector"),m7t=x(async()=>{let{diagram:t}=await Promise.resolve().then(()=>(RSe(),LSe));return{id:cIe,diagram:t}},"loader"),g7t={id:cIe,detector:p7t,loader:m7t},v7t=g7t,hIe="classDiagram",y7t=x((t,e)=>/^\s*classDiagram/.test(t)&&e?.class?.defaultRenderer==="dagre-wrapper"?!0:/^\s*classDiagram-v2/.test(t),"detector"),x7t=x(async()=>{let{diagram:t}=await Promise.resolve().then(()=>(DSe(),ISe));return{id:hIe,diagram:t}},"loader"),b7t={id:hIe,detector:y7t,loader:x7t},w7t=b7t,fIe="state",k7t=x((t,e)=>e?.state?.defaultRenderer==="dagre-wrapper"?!1:/^\s*stateDiagram/.test(t),"detector"),T7t=x(async()=>{let{diagram:t}=await Promise.resolve().then(()=>(u_e(),l_e));return{id:fIe,diagram:t}},"loader"),E7t={id:fIe,detector:k7t,loader:T7t},C7t=E7t,dIe="stateDiagram",S7t=x((t,e)=>!!(/^\s*stateDiagram-v2/.test(t)||/^\s*stateDiagram/.test(t)&&e?.state?.defaultRenderer==="dagre-wrapper"),"detector"),_7t=x(async()=>{let{diagram:t}=await Promise.resolve().then(()=>(h_e(),c_e));return{id:dIe,diagram:t}},"loader"),A7t={id:dIe,detector:S7t,loader:_7t},L7t=A7t,pIe="journey",R7t=x(t=>/^\s*journey/.test(t),"detector"),I7t=x(async()=>{let{diagram:t}=await Promise.resolve().then(()=>(k_e(),w_e));return{id:pIe,diagram:t}},"loader"),D7t={id:pIe,detector:R7t,loader:I7t},N7t=D7t,M7t=x((t,e,r)=>{te.debug(`rendering svg for syntax error -`);let n=yi(e),a=n.append("g");n.attr("viewBox","0 0 2412 512"),gn(n,100,512,!0),a.append("path").attr("class","error-icon").attr("d","m411.313,123.313c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32-9.375,9.375-20.688-20.688c-12.484-12.5-32.766-12.5-45.25,0l-16,16c-1.261,1.261-2.304,2.648-3.31,4.051-21.739-8.561-45.324-13.426-70.065-13.426-105.867,0-192,86.133-192,192s86.133,192 192,192 192-86.133 192-192c0-24.741-4.864-48.327-13.426-70.065 1.402-1.007 2.79-2.049 4.051-3.31l16-16c12.5-12.492 12.5-32.758 0-45.25l-20.688-20.688 9.375-9.375 32.001-31.999zm-219.313,100.687c-52.938,0-96,43.063-96,96 0,8.836-7.164,16-16,16s-16-7.164-16-16c0-70.578 57.422-128 128-128 8.836,0 16,7.164 16,16s-7.164,16-16,16z"),a.append("path").attr("class","error-icon").attr("d","m459.02,148.98c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l16,16c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16.001-16z"),a.append("path").attr("class","error-icon").attr("d","m340.395,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16-16c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l15.999,16z"),a.append("path").attr("class","error-icon").attr("d","m400,64c8.844,0 16-7.164 16-16v-32c0-8.836-7.156-16-16-16-8.844,0-16,7.164-16,16v32c0,8.836 7.156,16 16,16z"),a.append("path").attr("class","error-icon").attr("d","m496,96.586h-32c-8.844,0-16,7.164-16,16 0,8.836 7.156,16 16,16h32c8.844,0 16-7.164 16-16 0-8.836-7.156-16-16-16z"),a.append("path").attr("class","error-icon").attr("d","m436.98,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688l32-32c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32c-6.251,6.25-6.251,16.375-0.001,22.625z"),a.append("text").attr("class","error-text").attr("x",1440).attr("y",250).attr("font-size","150px").style("text-anchor","middle").text("Syntax error in text"),a.append("text").attr("class","error-text").attr("x",1250).attr("y",400).attr("font-size","100px").style("text-anchor","middle").text(`mermaid version ${r}`)},"draw"),mIe={draw:M7t},O7t=mIe,P7t={db:{},renderer:mIe,parser:{parse:x(()=>{},"parse")}},B7t=P7t,gIe="flowchart-elk",F7t=x((t,e={})=>/^\s*flowchart-elk/.test(t)||/^\s*flowchart|graph/.test(t)&&e?.flowchart?.defaultRenderer==="elk"?(e.layout="elk",!0):!1,"detector"),z7t=x(async()=>{let{diagram:t}=await Promise.resolve().then(()=>(b_(),x_));return{id:gIe,diagram:t}},"loader"),$7t={id:gIe,detector:F7t,loader:z7t},G7t=$7t,vIe="timeline",U7t=x(t=>/^\s*timeline/.test(t),"detector"),q7t=x(async()=>{let{diagram:t}=await Promise.resolve().then(()=>(z_e(),F_e));return{id:vIe,diagram:t}},"loader"),V7t={id:vIe,detector:U7t,loader:q7t},H7t=V7t,yIe="mindmap",W7t=x(t=>/^\s*mindmap/.test(t),"detector"),Y7t=x(async()=>{let{diagram:t}=await Promise.resolve().then(()=>(pLe(),dLe));return{id:yIe,diagram:t}},"loader"),X7t={id:yIe,detector:W7t,loader:Y7t},j7t=X7t,xIe="kanban",K7t=x(t=>/^\s*kanban/.test(t),"detector"),Z7t=x(async()=>{let{diagram:t}=await Promise.resolve().then(()=>(vLe(),gLe));return{id:xIe,diagram:t}},"loader"),Q7t={id:xIe,detector:K7t,loader:Z7t},J7t=Q7t,bIe="sankey",eAt=x(t=>/^\s*sankey-beta/.test(t),"detector"),tAt=x(async()=>{let{diagram:t}=await Promise.resolve().then(()=>(ULe(),GLe));return{id:bIe,diagram:t}},"loader"),rAt={id:bIe,detector:eAt,loader:tAt},nAt=rAt,wIe="packet",aAt=x(t=>/^\s*packet-beta/.test(t),"detector"),iAt=x(async()=>{let{diagram:t}=await Promise.resolve().then(()=>(HLe(),VLe));return{id:wIe,diagram:t}},"loader"),sAt={id:wIe,detector:aAt,loader:iAt},kIe="radar",oAt=x(t=>/^\s*radar-beta/.test(t),"detector"),lAt=x(async()=>{let{diagram:t}=await Promise.resolve().then(()=>(JLe(),QLe));return{id:kIe,diagram:t}},"loader"),uAt={id:kIe,detector:oAt,loader:lAt},TIe="block",cAt=x(t=>/^\s*block-beta/.test(t),"detector"),hAt=x(async()=>{let{diagram:t}=await Promise.resolve().then(()=>(RRe(),LRe));return{id:TIe,diagram:t}},"loader"),fAt={id:TIe,detector:cAt,loader:hAt},dAt=fAt,EIe="architecture",pAt=x(t=>/^\s*architecture/.test(t),"detector"),mAt=x(async()=>{let{diagram:t}=await Promise.resolve().then(()=>(YRe(),WRe));return{id:EIe,diagram:t}},"loader"),gAt={id:EIe,detector:pAt,loader:mAt},vAt=gAt,XRe=!1,zL=x(()=>{XRe||(XRe=!0,Hb("error",B7t,t=>t.toLowerCase().trim()==="error"),Hb("---",{db:{clear:x(()=>{},"clear")},styles:{},renderer:{draw:x(()=>{},"draw")},parser:{parse:x(()=>{throw new Error("Diagrams beginning with --- are not valid. If you were trying to use a YAML front-matter, please ensure that you've correctly opened and closed the YAML front-matter with un-indented `---` blocks")},"parse")},init:x(()=>null,"init")},t=>t.toLowerCase().trimStart().startsWith("---")),_D(C8t,J7t,w7t,v7t,B8t,H8t,X8t,Z8t,u7t,d7t,G7t,N8t,L8t,j7t,H7t,G8t,L7t,C7t,N7t,t7t,nAt,sAt,i7t,dAt,vAt,uAt))},"addDiagrams"),yAt=x(async()=>{te.debug("Loading registered diagrams");let e=(await Promise.allSettled(Object.entries(fp).map(async([r,{detector:n,loader:a}])=>{if(a)try{OT(r)}catch{try{let{diagram:i,id:s}=await a();Hb(s,i,n)}catch(i){throw te.error(`Failed to load external diagram with key ${r}. Removing from detectors.`),delete fp[r],i}}}))).filter(r=>r.status==="rejected");if(e.length>0){te.error(`Failed to load ${e.length} external diagrams`);for(let r of e)te.error(r);throw new Error(`Failed to load ${e.length} external diagrams`)}},"loadRegisteredDiagrams"),xAt="graphics-document document";function CIe(t,e){t.attr("role",xAt),e!==""&&t.attr("aria-roledescription",e)}x(CIe,"setA11yDiagramInfo");function SIe(t,e,r,n){if(t.insert!==void 0){if(r){let a=`chart-desc-${n}`;t.attr("aria-describedby",a),t.insert("desc",":first-child").attr("id",a).text(r)}if(e){let a=`chart-title-${n}`;t.attr("aria-labelledby",a),t.insert("title",":first-child").attr("id",a).text(e)}}}x(SIe,"addSVGa11yTitleDescription");var mg,hY=(mg=class{constructor(e,r,n,a,i){this.type=e,this.text=r,this.db=n,this.parser=a,this.renderer=i}static async fromText(e,r={}){let n=wr(),a=Ub(e,n);e=Ule(e)+` -`;try{OT(a)}catch{let u=uQ(a);if(!u)throw new SD(`Diagram ${a} not found.`);let{id:h,diagram:f}=await u();Hb(h,f)}let{db:i,parser:s,renderer:o,init:l}=OT(a);return s.parser&&(s.parser.yy=i),i.clear?.(),l?.(n),r.title&&i.setDiagramTitle?.(r.title),await s.parse(e),new mg(a,e,i,s,o)}async render(e,r){await this.renderer.draw(this.text,e,r,this)}getParser(){return this.parser}getType(){return this.type}},x(mg,"Diagram"),mg),jRe=[],bAt=x(()=>{jRe.forEach(t=>{t()}),jRe=[]},"attachFunctions"),wAt=x(t=>t.replace(/^\s*%%(?!{)[^\n]+\n?/gm,"").trimStart(),"cleanupComments");function _Ie(t){let e=t.match(CD);if(!e)return{text:t,metadata:{}};let r=r1(e[1],{schema:t1})??{};r=typeof r=="object"&&!Array.isArray(r)?r:{};let n={};return r.displayMode&&(n.displayMode=r.displayMode.toString()),r.title&&(n.title=r.title.toString()),r.config&&(n.config=r.config),{text:t.slice(e[0].length),metadata:n}}x(_Ie,"extractFrontMatter");var kAt=x(t=>t.replace(/\r\n?/g,` -`).replace(/<(\w+)([^>]*)>/g,(e,r,n)=>"<"+r+n.replace(/="([^"]*)"/g,"='$1'")+">"),"cleanupText"),TAt=x(t=>{let{text:e,metadata:r}=_Ie(t),{displayMode:n,title:a,config:i={}}=r;return n&&(i.gantt||(i.gantt={}),i.gantt.displayMode=n),{title:a,config:i,text:e}},"processFrontmatter"),EAt=x(t=>{let e=Wt.detectInit(t)??{},r=Wt.detectDirective(t,"wrap");return Array.isArray(r)?e.wrap=r.some(({type:n})=>n==="wrap"):r?.type==="wrap"&&(e.wrap=!0),{text:Ple(t),directive:e}},"processDirectives");function dY(t){let e=kAt(t),r=TAt(e),n=EAt(r.text),a=mi(r.config,n.directive);return t=wAt(n.text),{code:t,title:r.title,config:a}}x(dY,"preprocessDiagram");function AIe(t){let e=new TextEncoder().encode(t),r=Array.from(e,n=>String.fromCodePoint(n)).join("");return btoa(r)}x(AIe,"toBase64");var CAt=5e4,SAt="graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa",_At="sandbox",AAt="loose",LAt="http://www.w3.org/2000/svg",RAt="http://www.w3.org/1999/xlink",IAt="http://www.w3.org/1999/xhtml",DAt="100%",NAt="100%",MAt="border:0;margin:0;",OAt="margin:0",PAt="allow-top-navigation-by-user-activation allow-popups",BAt='The "iframe" tag is not supported by your browser.',FAt=["foreignobject"],zAt=["dominant-baseline"];function pY(t){let e=dY(t);return qb(),vQ(e.config??{}),e}x(pY,"processAndSetConfigs");async function LIe(t,e){zL();try{let{code:r,config:n}=pY(t);return{diagramType:(await IIe(r)).type,config:n}}catch(r){if(e?.suppressErrors)return!1;throw r}}x(LIe,"parse");var KRe=x((t,e,r=[])=>` -.${t} ${e} { ${r.join(" !important; ")} !important; }`,"cssImportantStyles"),$At=x((t,e=new Map)=>{let r="";if(t.themeCSS!==void 0&&(r+=` +`};Pc.text=function(t,e){return dh(t[e].content)};Pc.html_block=function(t,e){return t[e].content};Pc.html_inline=function(t,e){return t[e].content};function Pg(){this.rules=Ng({},Pc)}Pg.prototype.renderAttrs=function(e){let r,n,i;if(!e.attrs)return"";for(i="",r=0,n=e.attrs.length;r +`:">",a};Pg.prototype.renderInline=function(t,e,r){let n="",i=this.rules;for(let a=0,s=t.length;a=0&&(n=this.attrs[r][1]),n};Bg.prototype.attrJoin=function(e,r){let n=this.attrIndex(e);n<0?this.attrPush([e,r]):this.attrs[n][1]=this.attrs[n][1]+" "+r};var ph=Bg;function hZ(t,e,r){this.src=t,this.env=r,this.tokens=[],this.inlineMode=!1,this.md=e}hZ.prototype.Token=ph;var fZ=hZ;var cBe=/\r\n?|\n/g,hBe=/\0/g;function cI(t){let e;e=t.src.replace(cBe,` +`),e=e.replace(hBe,"\uFFFD"),t.src=e}function hI(t){let e;t.inlineMode?(e=new t.Token("inline","",0),e.content=t.src,e.map=[0,1],e.children=[],t.tokens.push(e)):t.md.block.parse(t.src,t.md,t.env,t.tokens)}function fI(t){let e=t.tokens;for(let r=0,n=e.length;r\s]/i.test(t)}function dBe(t){return/^<\/a\s*>/i.test(t)}function dI(t){let e=t.tokens;if(t.md.options.linkify)for(let r=0,n=e.length;r=0;s--){let o=i[s];if(o.type==="link_close"){for(s--;i[s].level!==o.level&&i[s].type!=="link_open";)s--;continue}if(o.type==="html_inline"&&(fBe(o.content)&&a>0&&a--,dBe(o.content)&&a++),!(a>0)&&o.type==="text"&&t.md.linkify.test(o.content)){let l=o.content,u=t.md.linkify.match(l),h=[],f=o.level,d=0;u.length>0&&u[0].index===0&&s>0&&i[s-1].type==="text_special"&&(u=u.slice(1));for(let p=0;pd){let T=new t.Token("text","",0);T.content=l.slice(d,v),T.level=f,h.push(T)}let x=new t.Token("link_open","a",1);x.attrs=[["href",g]],x.level=f++,x.markup="linkify",x.info="auto",h.push(x);let k=new t.Token("text","",0);k.content=y,k.level=f,h.push(k);let _=new t.Token("link_close","a",-1);_.level=--f,_.markup="linkify",_.info="auto",h.push(_),d=u[p].lastIndex}if(d=0;r--){let n=t[r];n.type==="text"&&!e&&(n.content=n.content.replace(mBe,yBe)),n.type==="link_open"&&n.info==="auto"&&e--,n.type==="link_close"&&n.info==="auto"&&e++}}function xBe(t){let e=0;for(let r=t.length-1;r>=0;r--){let n=t[r];n.type==="text"&&!e&&dZ.test(n.content)&&(n.content=n.content.replace(/\+-/g,"\xB1").replace(/\.{2,}/g,"\u2026").replace(/([?!])…/g,"$1..").replace(/([?!]){4,}/g,"$1$1$1").replace(/,{2,}/g,",").replace(/(^|[^-])---(?=[^-]|$)/mg,"$1\u2014").replace(/(^|\s)--(?=\s|$)/mg,"$1\u2013").replace(/(^|[^-\s])--(?=[^-\s]|$)/mg,"$1\u2013")),n.type==="link_open"&&n.info==="auto"&&e--,n.type==="link_close"&&n.info==="auto"&&e++}}function pI(t){let e;if(t.md.options.typographer)for(e=t.tokens.length-1;e>=0;e--)t.tokens[e].type==="inline"&&(pBe.test(t.tokens[e].content)&&vBe(t.tokens[e].children),dZ.test(t.tokens[e].content)&&xBe(t.tokens[e].children))}var bBe=/['"]/,pZ=/['"]/g,mZ="\u2019";function ik(t,e,r,n){t[e]||(t[e]=[]),t[e].push({pos:r,ch:n})}function wBe(t,e){let r="",n=0;e.sort((i,a)=>i.pos-a.pos);for(let i=0;i=0&&!(n[r].level<=o);r--);if(n.length=r+1,s.type!=="text")continue;let l=s.content,u=0,h=l.length;e:for(;u=0)g=l.charCodeAt(f.index-1);else for(r=a-1;r>=0&&!(t[r].type==="softbreak"||t[r].type==="hardbreak");r--)if(t[r].content){g=t[r].content.charCodeAt(t[r].content.length-1);break}let y=32;if(u=48&&g<=57&&(p=d=!1),d&&p&&(d=v,p=x),!d&&!p){m&&ik(i,a,f.index,mZ);continue}if(p)for(r=n.length-1;r>=0;r--){let T=n[r];if(n[r].level=0;e--)t.tokens[e].type!=="inline"||!bBe.test(t.tokens[e].content)||kBe(t.tokens[e].children,t)}function gI(t){let e,r,n=t.tokens,i=n.length;for(let a=0;a0&&this.level++,this.tokens.push(n),n};Bc.prototype.isEmpty=function(e){return this.bMarks[e]+this.tShift[e]>=this.eMarks[e]};Bc.prototype.skipEmptyLines=function(e){for(let r=this.lineMax;er;)if(!Zr(this.src.charCodeAt(--e)))return e+1;return e};Bc.prototype.skipChars=function(e,r){for(let n=this.src.length;en;)if(r!==this.src.charCodeAt(--e))return e+1;return e};Bc.prototype.getLines=function(e,r,n,i){if(e>=r)return"";let a=new Array(r-e);for(let s=0,o=e;on?a[s]=new Array(l-n+1).join(" ")+this.src.slice(h,f):a[s]=this.src.slice(h,f)}return a.join("")};Bc.prototype.Token=ph;var yZ=Bc;var TBe=65536;function xI(t,e){let r=t.bMarks[e]+t.tShift[e],n=t.eMarks[e];return t.src.slice(r,n)}function vZ(t){let e=[],r=t.length,n=0,i=t.charCodeAt(n),a=!1,s=0,o="";for(;nr)return!1;let i=e+1;if(t.sCount[i]=4)return!1;let a=t.bMarks[i]+t.tShift[i];if(a>=t.eMarks[i])return!1;let s=t.src.charCodeAt(a++);if(s!==124&&s!==45&&s!==58||a>=t.eMarks[i])return!1;let o=t.src.charCodeAt(a++);if(o!==124&&o!==45&&o!==58&&!Zr(o)||s===45&&Zr(o))return!1;for(;a=4)return!1;u=vZ(l),u.length&&u[0]===""&&u.shift(),u.length&&u[u.length-1]===""&&u.pop();let f=u.length;if(f===0||f!==h.length)return!1;if(n)return!0;let d=t.parentType;t.parentType="table";let p=t.md.block.ruler.getRules("blockquote"),m=t.push("table_open","table",1),g=[e,0];m.map=g;let y=t.push("thead_open","thead",1);y.map=[e,e+1];let v=t.push("tr_open","tr",1);v.map=[e,e+1];for(let _=0;_=4||(u=vZ(l),u.length&&u[0]===""&&u.shift(),u.length&&u[u.length-1]===""&&u.pop(),k+=f-u.length,k>TBe))break;if(i===e+2){let S=t.push("tbody_open","tbody",1);S.map=x=[e+2,0]}let T=t.push("tr_open","tr",1);T.map=[i,i+1];for(let S=0;S=4){n++,i=n;continue}break}t.line=i;let a=t.push("code_block","code",0);return a.content=t.getLines(e,i,4+t.blkIndent,!1)+` +`,a.map=[e,t.line],!0}function kI(t,e,r,n){let i=t.bMarks[e]+t.tShift[e],a=t.eMarks[e];if(t.sCount[e]-t.blkIndent>=4||i+3>a)return!1;let s=t.src.charCodeAt(i);if(s!==126&&s!==96)return!1;let o=i;i=t.skipChars(i,s);let l=i-o;if(l<3)return!1;let u=t.src.slice(o,i),h=t.src.slice(i,a);if(s===96&&h.indexOf(String.fromCharCode(s))>=0)return!1;if(n)return!0;let f=e,d=!1;for(;f++,!(f>=r||(i=o=t.bMarks[f]+t.tShift[f],a=t.eMarks[f],i=4)&&(i=t.skipChars(i,s),!(i-o=4||t.src.charCodeAt(i)!==62)return!1;if(n)return!0;let o=[],l=[],u=[],h=[],f=t.md.block.ruler.getRules("blockquote"),d=t.parentType;t.parentType="blockquote";let p=!1,m;for(m=e;m=a)break;if(t.src.charCodeAt(i++)===62&&!k){let T=t.sCount[m]+1,S,R;t.src.charCodeAt(i)===32?(i++,T++,R=!1,S=!0):t.src.charCodeAt(i)===9?(S=!0,(t.bsCount[m]+T)%4===3?(i++,T++,R=!1):R=!0):S=!1;let A=T;for(o.push(t.bMarks[m]),t.bMarks[m]=i;i=a,l.push(t.bsCount[m]),t.bsCount[m]=t.sCount[m]+1+(S?1:0),u.push(t.sCount[m]),t.sCount[m]=A-T,h.push(t.tShift[m]),t.tShift[m]=i-t.bMarks[m];continue}if(p)break;let _=!1;for(let T=0,S=f.length;T";let v=[e,0];y.map=v,t.md.block.tokenize(t,e,m);let x=t.push("blockquote_close","blockquote",-1);x.markup=">",t.lineMax=s,t.parentType=d,v[1]=t.line;for(let k=0;k=4)return!1;let a=t.bMarks[e]+t.tShift[e],s=t.src.charCodeAt(a++);if(s!==42&&s!==45&&s!==95)return!1;let o=1;for(;a=n)return-1;let a=t.src.charCodeAt(i++);if(a<48||a>57)return-1;for(;;){if(i>=n)return-1;if(a=t.src.charCodeAt(i++),a>=48&&a<=57){if(i-r>=10)return-1;continue}if(a===41||a===46)break;return-1}return i=4||t.listIndent>=0&&t.sCount[l]-t.listIndent>=4&&t.sCount[l]=t.blkIndent&&(h=!0);let f,d,p;if((p=bZ(t,l))>=0){if(f=!0,s=t.bMarks[l]+t.tShift[l],d=Number(t.src.slice(s,p-1)),h&&d!==1)return!1}else if((p=xZ(t,l))>=0)f=!1;else return!1;if(h&&t.skipSpaces(p)>=t.eMarks[l])return!1;if(n)return!0;let m=t.src.charCodeAt(p-1),g=t.tokens.length;f?(o=t.push("ordered_list_open","ol",1),d!==1&&(o.attrs=[["start",d]])):o=t.push("bullet_list_open","ul",1);let y=[l,0];o.map=y,o.markup=String.fromCharCode(m);let v=!1,x=t.md.block.ruler.getRules("list"),k=t.parentType;for(t.parentType="list";l=i?R=1:R=T-_,R>4&&(R=1);let A=_+R;o=t.push("list_item_open","li",1),o.markup=String.fromCharCode(m);let I=[l,0];o.map=I,f&&(o.info=t.src.slice(s,p-1));let P=t.tight,O=t.tShift[l],C=t.sCount[l],N=t.listIndent;if(t.listIndent=t.blkIndent,t.blkIndent=A,t.tight=!0,t.tShift[l]=S-t.bMarks[l],t.sCount[l]=T,S>=i&&t.isEmpty(l+1)?t.line=Math.min(t.line+2,r):t.md.block.tokenize(t,l,r,!0),(!t.tight||v)&&(u=!1),v=t.line-l>1&&t.isEmpty(t.line-1),t.blkIndent=t.listIndent,t.listIndent=N,t.tShift[l]=O,t.sCount[l]=C,t.tight=P,o=t.push("list_item_close","li",-1),o.markup=String.fromCharCode(m),l=t.line,I[1]=l,l>=r||t.sCount[l]=4)break;let B=!1;for(let F=0,M=x.length;F=4||t.src.charCodeAt(i)!==91)return!1;function o(x){let k=t.lineMax;if(x>=k||t.isEmpty(x))return null;let _=!1;if(t.sCount[x]-t.blkIndent>3&&(_=!0),t.sCount[x]<0&&(_=!0),!_){let R=t.md.block.ruler.getRules("reference"),A=t.parentType;t.parentType="reference";let I=!1;for(let P=0,O=R.length;P"u"&&(t.env.references={}),typeof t.env.references[v]>"u"&&(t.env.references[v]={title:y,href:f}),t.line=s),!0):!1}var wZ=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"];var SBe="[a-zA-Z_:][a-zA-Z0-9:._-]*",CBe="[^\"'=<>`\\x00-\\x20]+",_Be="'[^']*'",ABe='"[^"]*"',LBe="(?:"+CBe+"|"+_Be+"|"+ABe+")",RBe="(?:\\s+"+SBe+"(?:\\s*=\\s*"+LBe+")?)",kZ="<[A-Za-z][A-Za-z0-9\\-]*"+RBe+"*\\s*\\/?>",TZ="<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>",DBe="",IBe="<[?][\\s\\S]*?[?]>",MBe="]*>",NBe="",EZ=new RegExp("^(?:"+kZ+"|"+TZ+"|"+DBe+"|"+IBe+"|"+MBe+"|"+NBe+")"),SZ=new RegExp("^(?:"+kZ+"|"+TZ+")");var c1=[[/^<(script|pre|style|textarea)(?=(\s|>|$))/i,/<\/(script|pre|style|textarea)>/i,!0],[/^/,!0],[/^<\?/,/\?>/,!0],[/^/,!0],[/^/,!0],[new RegExp("^|$))","i"),/^$/,!0],[new RegExp(SZ.source+"\\s*$"),/^$/,!1]];function _I(t,e,r,n){let i=t.bMarks[e]+t.tShift[e],a=t.eMarks[e];if(t.sCount[e]-t.blkIndent>=4||!t.md.options.html||t.src.charCodeAt(i)!==60)return!1;let s=t.src.slice(i,a),o=0;for(;o=4)return!1;let s=t.src.charCodeAt(i);if(s!==35||i>=a)return!1;let o=1;for(s=t.src.charCodeAt(++i);s===35&&i6||ii&&Zr(t.src.charCodeAt(l-1))&&(a=l),t.line=e+1;let u=t.push("heading_open","h"+String(o),1);u.markup="########".slice(0,o),u.map=[e,t.line];let h=t.push("inline","",0);h.content=l1(t.src.slice(i,a)),h.map=[e,t.line],h.children=[];let f=t.push("heading_close","h"+String(o),-1);return f.markup="########".slice(0,o),!0}function LI(t,e,r){let n=t.md.block.ruler.getRules("paragraph");if(t.sCount[e]-t.blkIndent>=4)return!1;let i=t.parentType;t.parentType="paragraph";let a=0,s,o=e+1;for(;o3)continue;if(t.sCount[o]>=t.blkIndent){let p=t.bMarks[o]+t.tShift[o],m=t.eMarks[o];if(p=m))){a=s===61?1:2;break}}if(t.sCount[o]<0)continue;let d=!1;for(let p=0,m=n.length;p3||t.sCount[a]<0)continue;let u=!1;for(let h=0,f=n.length;h=r||t.sCount[s]=a){t.line=r;break}let l=t.line,u=!1;for(let h=0;h=t.line)throw new Error("block rule didn't increment state.line");break}if(!u)throw new Error("none of the block rules matched");t.tight=!o,t.isEmpty(t.line-1)&&(o=!0),s=t.line,s0&&(this.level++,this._prev_delimiters.push(this.delimiters),this.delimiters=[],i={delimiters:this.delimiters}),this.pendingLevel=this.level,this.tokens.push(n),this.tokens_meta.push(i),n};Mb.prototype.scanDelims=function(t,e){let r=this.posMax,n=this.src.charCodeAt(t),i;if(t===0)i=32;else if(t===1)i=this.src.charCodeAt(0),(i&63488)===55296&&(i=65533);else if(i=this.src.charCodeAt(t-1),(i&64512)===56320){let y=this.src.charCodeAt(t-2);i=(y&64512)===55296?65536+(y-55296<<10)+(i-56320):65533}else(i&64512)===55296&&(i=65533);let a=t;for(;a0)return!1;let r=t.pos,n=t.posMax;if(r+3>n||t.src.charCodeAt(r)!==58||t.src.charCodeAt(r+1)!==47||t.src.charCodeAt(r+2)!==47)return!1;let i=t.pending.match(PBe);if(!i)return!1;let a=i[1],s=t.md.linkify.matchAtStart(t.src.slice(r-a.length));if(!s)return!1;let o=s.url;if(o.length<=a.length)return!1;let l=o.length;for(;l>0&&o.charCodeAt(l-1)===42;)l--;l!==o.length&&(o=o.slice(0,l));let u=t.md.normalizeLink(o);if(!t.md.validateLink(u))return!1;if(!e){t.pending=t.pending.slice(0,-a.length);let h=t.push("link_open","a",1);h.attrs=[["href",u]],h.markup="linkify",h.info="auto";let f=t.push("text","",0);f.content=t.md.normalizeLinkText(o);let d=t.push("link_close","a",-1);d.markup="linkify",d.info="auto"}return t.pos+=o.length-a.length,!0}function MI(t,e){let r=t.pos;if(t.src.charCodeAt(r)!==10)return!1;let n=t.pending.length-1,i=t.posMax;if(!e)if(n>=0&&t.pending.charCodeAt(n)===32)if(n>=1&&t.pending.charCodeAt(n-1)===32){let a=n-1;for(;a>=1&&t.pending.charCodeAt(a-1)===32;)a--;t.pending=t.pending.slice(0,a),t.push("hardbreak","br",0)}else t.pending=t.pending.slice(0,-1),t.push("softbreak","br",0);else t.push("softbreak","br",0);for(r++;r?@[]^_`{|}~-".split("").forEach(function(t){NI[t.charCodeAt(0)]=1});function OI(t,e){let r=t.pos,n=t.posMax;if(t.src.charCodeAt(r)!==92||(r++,r>=n))return!1;let i=t.src.charCodeAt(r);if(i===10){for(e||t.push("hardbreak","br",0),r++;r=55296&&i<=56319&&r+1=56320&&o<=57343&&(a+=t.src[r+1],r++)}let s="\\"+a;if(!e){let o=t.push("text_special","",0);i<256&&NI[i]!==0?o.content=a:o.content=s,o.markup=s,o.info="escape"}return t.pos=r+1,!0}function PI(t,e){let r=t.pos;if(t.src.charCodeAt(r)!==96)return!1;let i=r;r++;let a=t.posMax;for(;r=0;n--){let i=e[n];if(i.marker!==95&&i.marker!==42||i.end===-1)continue;let a=e[i.end],s=n>0&&e[n-1].end===i.end+1&&e[n-1].marker===i.marker&&e[n-1].token===i.token-1&&e[i.end+1].token===a.token+1,o=String.fromCharCode(i.marker),l=t.tokens[i.token];l.type=s?"strong_open":"em_open",l.tag=s?"strong":"em",l.nesting=1,l.markup=s?o+o:o,l.content="";let u=t.tokens[a.token];u.type=s?"strong_close":"em_close",u.tag=s?"strong":"em",u.nesting=-1,u.markup=s?o+o:o,u.content="",s&&(t.tokens[e[n-1].token].content="",t.tokens[e[i.end+1].token].content="",n--)}}function $Be(t){let e=t.tokens_meta,r=t.tokens_meta.length;LZ(t,t.delimiters);for(let n=0;n=f)return!1;if(l=m,i=t.md.helpers.parseLinkDestination(t.src,m,t.posMax),i.ok){for(s=t.md.normalizeLink(i.str),t.md.validateLink(s)?m=i.pos:s="",l=m;m=f||t.src.charCodeAt(m)!==41)&&(u=!0),m++}if(u){if(typeof t.env.references>"u")return!1;if(m=0?n=t.src.slice(l,m++):m=p+1):m=p+1,n||(n=t.src.slice(d,p)),a=t.env.references[o1(n)],!a)return t.pos=h,!1;s=a.href,o=a.title}if(!e){t.pos=d,t.posMax=p;let g=t.push("link_open","a",1),y=[["href",s]];g.attrs=y,o&&y.push(["title",o]),t.linkLevel++,t.md.inline.tokenize(t),t.linkLevel--,t.push("link_close","a",-1)}return t.pos=m,t.posMax=f,!0}function $I(t,e){let r,n,i,a,s,o,l,u,h="",f=t.pos,d=t.posMax;if(t.src.charCodeAt(t.pos)!==33||t.src.charCodeAt(t.pos+1)!==91)return!1;let p=t.pos+2,m=t.md.helpers.parseLinkLabel(t,t.pos+1,!1);if(m<0)return!1;if(a=m+1,a=d)return!1;for(u=a,o=t.md.helpers.parseLinkDestination(t.src,a,t.posMax),o.ok&&(h=t.md.normalizeLink(o.str),t.md.validateLink(h)?a=o.pos:h=""),u=a;a=d||t.src.charCodeAt(a)!==41)return t.pos=f,!1;a++}else{if(typeof t.env.references>"u")return!1;if(a=0?i=t.src.slice(u,a++):a=m+1):a=m+1,i||(i=t.src.slice(p,m)),s=t.env.references[o1(i)],!s)return t.pos=f,!1;h=s.href,l=s.title}if(!e){n=t.src.slice(p,m);let g=[];t.md.inline.parse(n,t.md,t.env,g);let y=t.push("image","img",0),v=[["src",h],["alt",""]];y.attrs=v,y.children=g,y.content=n,l&&v.push(["title",l])}return t.pos=a,t.posMax=d,!0}var GBe=/^([a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*)$/,qBe=/^([a-zA-Z][a-zA-Z0-9+.-]{1,31}):([^<>\x00-\x20]*)$/;function GI(t,e){let r=t.pos;if(t.src.charCodeAt(r)!==60)return!1;let n=t.pos,i=t.posMax;for(;;){if(++r>=i)return!1;let s=t.src.charCodeAt(r);if(s===60)return!1;if(s===62)break}let a=t.src.slice(n+1,r);if(qBe.test(a)){let s=t.md.normalizeLink(a);if(!t.md.validateLink(s))return!1;if(!e){let o=t.push("link_open","a",1);o.attrs=[["href",s]],o.markup="autolink",o.info="auto";let l=t.push("text","",0);l.content=t.md.normalizeLinkText(a);let u=t.push("link_close","a",-1);u.markup="autolink",u.info="auto"}return t.pos+=a.length+2,!0}if(GBe.test(a)){let s=t.md.normalizeLink("mailto:"+a);if(!t.md.validateLink(s))return!1;if(!e){let o=t.push("link_open","a",1);o.attrs=[["href",s]],o.markup="autolink",o.info="auto";let l=t.push("text","",0);l.content=t.md.normalizeLinkText(a);let u=t.push("link_close","a",-1);u.markup="autolink",u.info="auto"}return t.pos+=a.length+2,!0}return!1}function UBe(t){return/^\s]/i.test(t)}function HBe(t){return/^<\/a\s*>/i.test(t)}function VBe(t){let e=t|32;return e>=97&&e<=122}function qI(t,e){if(!t.md.options.html)return!1;let r=t.posMax,n=t.pos;if(t.src.charCodeAt(n)!==60||n+2>=r)return!1;let i=t.src.charCodeAt(n+1);if(i!==33&&i!==63&&i!==47&&!VBe(i))return!1;let a=t.src.slice(n).match(EZ);if(!a)return!1;if(!e){let s=t.push("html_inline","",0);s.content=a[0],UBe(s.content)&&t.linkLevel++,HBe(s.content)&&t.linkLevel--}return t.pos+=a[0].length,!0}var WBe=/^&#((?:x[a-f0-9]{1,6}|[0-9]{1,7}));/i,YBe=/^&([a-z][a-z0-9]{1,31});/i;function UI(t,e){let r=t.pos,n=t.posMax;if(t.src.charCodeAt(r)!==38||r+1>=n)return!1;if(t.src.charCodeAt(r+1)===35){let a=t.src.slice(r).match(WBe);if(a){if(!e){let s=a[1][0].toLowerCase()==="x"?parseInt(a[1].slice(1),16):parseInt(a[1],10),o=t.push("text_special","",0);o.content=nk(s)?Og(s):Og(65533),o.markup=a[0],o.info="entity"}return t.pos+=a[0].length,!0}}else{let a=t.src.slice(r).match(YBe);if(a){let s=Ib(a[0]);if(s!==a[0]){if(!e){let o=t.push("text_special","",0);o.content=s,o.markup=a[0],o.info="entity"}return t.pos+=a[0].length,!0}}}return!1}function RZ(t){let e={},r=t.length;if(!r)return;let n=0,i=-2,a=[];for(let s=0;sl;u-=a[u]+1){let f=t[u];if(f.marker===o.marker&&f.open&&f.end<0){let d=!1;if((f.close||o.open)&&(f.length+o.length)%3===0&&(f.length%3!==0||o.length%3!==0)&&(d=!0),!d){let p=u>0&&!t[u-1].open?a[u-1]+1:0;a[s]=s-u+p,a[u]=p,o.open=!1,f.end=s,f.close=!1,h=-1,i=-2;break}}}h!==-1&&(e[o.marker][(o.open?3:0)+(o.length||0)%3]=h)}}function HI(t){let e=t.tokens_meta,r=t.tokens_meta.length;RZ(t.delimiters);for(let n=0;n0&&n++,i[e].type==="text"&&e+1=t.pos)throw new Error("inline rule didn't increment state.pos");break}}else t.pos=t.posMax;s||t.pos++,a[e]=t.pos};Nb.prototype.tokenize=function(t){let e=this.ruler.getRules(""),r=e.length,n=t.posMax,i=t.md.options.maxNesting;for(;t.pos=t.pos)throw new Error("inline rule didn't increment state.pos");break}}if(s){if(t.pos>=n)break;continue}t.pending+=t.src[t.pos++]}t.pending&&t.pushPending()};Nb.prototype.parse=function(t,e,r,n){let i=new this.State(t,e,r,n);this.tokenize(i);let a=this.ruler2.getRules(""),s=a.length;for(let o=0;o|$))`,e.tpl_email_fuzzy=`(^|${r}|"|\\(|${e.src_ZCc})(${e.src_email_name}@${e.tpl_host_fuzzy_strict})`,e.tpl_link_fuzzy=`(^|(?![.:/\\-_@])(?:[$+<=>^\`|\uFF5C]|${e.src_ZPCc}))((?![$+<=>^\`|\uFF5C])${e.tpl_host_port_fuzzy_strict}${e.src_path})`,e.tpl_link_no_ip_fuzzy=`(^|(?![.:/\\-_@])(?:[$+<=>^\`|\uFF5C]|${e.src_ZPCc}))((?![$+<=>^\`|\uFF5C])${e.tpl_host_port_no_ip_fuzzy_strict}${e.src_path})`,e}function XI(t){return Array.prototype.slice.call(arguments,1).forEach(function(r){r&&Object.keys(r).forEach(function(n){t[n]=r[n]})}),t}function lk(t){return Object.prototype.toString.call(t)}function XBe(t){return lk(t)==="[object String]"}function jBe(t){return lk(t)==="[object Object]"}function KBe(t){return lk(t)==="[object RegExp]"}function MZ(t){return lk(t)==="[object Function]"}function ZBe(t){return t.replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}var OZ={fuzzyLink:!0,fuzzyEmail:!0,fuzzyIP:!1};function QBe(t){return Object.keys(t||{}).reduce(function(e,r){return e||OZ.hasOwnProperty(r)},!1)}var JBe={"http:":{validate:function(t,e,r){let n=t.slice(e);return r.re.http||(r.re.http=new RegExp(`^\\/\\/${r.re.src_auth}${r.re.src_host_port_strict}${r.re.src_path}`,"i")),r.re.http.test(n)?n.match(r.re.http)[0].length:0}},"https:":"http:","ftp:":"http:","//":{validate:function(t,e,r){let n=t.slice(e);return r.re.no_http||(r.re.no_http=new RegExp("^"+r.re.src_auth+`(?:localhost|(?:(?:${r.re.src_domain})\\.)+${r.re.src_domain_root})`+r.re.src_port+r.re.src_host_terminator+r.re.src_path,"i")),r.re.no_http.test(n)?e>=3&&t[e-3]===":"||e>=3&&t[e-3]==="/"?0:n.match(r.re.no_http)[0].length:0}},"mailto:":{validate:function(t,e,r){let n=t.slice(e);return r.re.mailto||(r.re.mailto=new RegExp(`^${r.re.src_email_name}@${r.re.src_host_strict}`,"i")),r.re.mailto.test(n)?n.match(r.re.mailto)[0].length:0}}},eFe="a[cdefgilmnoqrstuwxz]|b[abdefghijmnorstvwyz]|c[acdfghiklmnoruvwxyz]|d[ejkmoz]|e[cegrstu]|f[ijkmor]|g[abdefghilmnpqrstuwy]|h[kmnrtu]|i[delmnoqrst]|j[emop]|k[eghimnprwyz]|l[abcikrstuvy]|m[acdeghklmnopqrstuvwxyz]|n[acefgilopruz]|om|p[aefghklmnrstwy]|qa|r[eosuw]|s[abcdeghijklmnortuvxyz]|t[cdfghjklmnortvwz]|u[agksyz]|v[aceginu]|w[fs]|y[et]|z[amw]",tFe="biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|\u0440\u0444".split("|");function rFe(t){return function(e,r){let n=e.slice(r);return t.test(n)?n.match(t)[0].length:0}}function NZ(){return function(t,e){e.normalize(t)}}function ok(t){let e=t.re=IZ(t.__opts__),r=t.__tlds__.slice();t.onCompile(),t.__tlds_replaced__||r.push(eFe),r.push(e.src_xn),e.src_tlds=r.join("|");function n(o){return o.replace("%TLDS%",e.src_tlds)}e.email_fuzzy=RegExp(n(e.tpl_email_fuzzy),"i"),e.email_fuzzy_global=RegExp(n(e.tpl_email_fuzzy),"ig"),e.link_fuzzy=RegExp(n(e.tpl_link_fuzzy),"i"),e.link_fuzzy_global=RegExp(n(e.tpl_link_fuzzy),"ig"),e.link_no_ip_fuzzy=RegExp(n(e.tpl_link_no_ip_fuzzy),"i"),e.link_no_ip_fuzzy_global=RegExp(n(e.tpl_link_no_ip_fuzzy),"ig"),e.host_fuzzy_test=RegExp(n(e.tpl_host_fuzzy_test),"i");let i=[];t.__compiled__={};function a(o,l){throw new Error(`(LinkifyIt) Invalid schema "${o}": ${l}`)}Object.keys(t.__schemas__).forEach(function(o){let l=t.__schemas__[o];if(l===null)return;let u={validate:null,link:null};if(t.__compiled__[o]=u,jBe(l)){KBe(l.validate)?u.validate=rFe(l.validate):MZ(l.validate)?u.validate=l.validate:a(o,l),MZ(l.normalize)?u.normalize=l.normalize:l.normalize?a(o,l):u.normalize=NZ();return}if(XBe(l)){i.push(o);return}a(o,l)}),i.forEach(function(o){t.__compiled__[t.__schemas__[o]]&&(t.__compiled__[o].validate=t.__compiled__[t.__schemas__[o]].validate,t.__compiled__[o].normalize=t.__compiled__[t.__schemas__[o]].normalize)}),t.__compiled__[""]={validate:null,normalize:NZ()};let s=Object.keys(t.__compiled__).filter(function(o){return o.length>0&&t.__compiled__[o]}).map(ZBe).join("|");t.re.schema_test=RegExp(`(^|(?!_)(?:[><\uFF5C]|${e.src_ZPCc}))(${s})`,"i"),t.re.schema_search=RegExp(`(^|(?!_)(?:[><\uFF5C]|${e.src_ZPCc}))(${s})`,"ig"),t.re.schema_at_start=RegExp(`^${t.re.schema_search.source}`,"i"),t.re.pretest=RegExp(`(${t.re.schema_test.source})|(${t.re.host_fuzzy_test.source})|@`,"i")}function PZ(t,e,r,n){let i=t.slice(r,n);this.schema=e.toLowerCase(),this.index=r,this.lastIndex=n,this.raw=i,this.text=i,this.url=i}function kl(t,e){if(!(this instanceof kl))return new kl(t,e);e||QBe(t)&&(e=t,t={}),this.__opts__=XI({},OZ,e),this.__schemas__=XI({},JBe,t),this.__compiled__={},this.__tlds__=tFe,this.__tlds_replaced__=!1,this.re={},ok(this)}kl.prototype.add=function(e,r){return this.__schemas__[e]=r,ok(this),this};kl.prototype.set=function(e){return this.__opts__=XI(this.__opts__,e),this};kl.prototype.test=function(e){if(!e.length)return!1;let r,n;if(this.re.schema_test.test(e)){for(n=this.re.schema_search,n.lastIndex=0;(r=n.exec(e))!==null;)if(this.testSchemaAt(e,r[2],n.lastIndex))return!0}return!!(this.__opts__.fuzzyLink&&this.__compiled__["http:"]&&e.search(this.re.host_fuzzy_test)>=0&&e.match(this.__opts__.fuzzyIP?this.re.link_fuzzy:this.re.link_no_ip_fuzzy)!==null||this.__opts__.fuzzyEmail&&this.__compiled__["mailto:"]&&e.indexOf("@")>=0&&e.match(this.re.email_fuzzy)!==null)};kl.prototype.pretest=function(e){return this.re.pretest.test(e)};kl.prototype.testSchemaAt=function(e,r,n){return this.__compiled__[r.toLowerCase()]?this.__compiled__[r.toLowerCase()].validate(e,n,this):0};kl.prototype.match=function(e){let r=[],n=[],i=[],a=[],s,o,l;function u(d,p){return d?p?d.index!==p.index?d.index=p.lastIndex?d:p:d:p}if(!e.length)return null;if(this.re.schema_test.test(e))for(l=this.re.schema_search,l.lastIndex=0;(s=l.exec(e))!==null;)o=this.testSchemaAt(e,s[2],l.lastIndex),o&&n.push({schema:s[2],index:s.index+s[1].length,lastIndex:s.index+s[0].length+o});if(this.__opts__.fuzzyLink&&this.__compiled__["http:"])for(l=this.__opts__.fuzzyIP?this.re.link_fuzzy_global:this.re.link_no_ip_fuzzy_global,l.lastIndex=0;(s=l.exec(e))!==null;)i.push({schema:"",index:s.index+s[1].length,lastIndex:s.index+s[0].length});if(this.__opts__.fuzzyEmail&&this.__compiled__["mailto:"])for(l=this.re.email_fuzzy_global,l.lastIndex=0;(s=l.exec(e))!==null;)a.push({schema:"mailto:",index:s.index+s[1].length,lastIndex:s.index+s[0].length});let h=[0,0,0],f=0;for(;;){let d=[n[h[0]],a[h[1]],i[h[2]]],p=u(u(d[0],d[1]),d[2]);if(!p)break;if(p===d[0]?h[0]++:p===d[1]?h[1]++:h[2]++,p.index= 0x80 (not a basic code point)","invalid-input":"Invalid input"},jI=35,Fc=Math.floor,KI=String.fromCharCode;function Of(t){throw new RangeError(sFe[t])}function oFe(t,e){let r=[],n=t.length;for(;n--;)r[n]=e(t[n]);return r}function zZ(t,e){let r=t.split("@"),n="";r.length>1&&(n=r[0]+"@",t=r[1]),t=t.replace(aFe,".");let i=t.split("."),a=oFe(i,e).join(".");return n+a}function $Z(t){let e=[],r=0,n=t.length;for(;r=55296&&i<=56319&&rString.fromCodePoint(...t),uFe=function(t){return t>=48&&t<58?26+(t-48):t>=65&&t<91?t-65:t>=97&&t<123?t-97:36},FZ=function(t,e){return t+22+75*(t<26)-((e!=0)<<5)},GZ=function(t,e,r){let n=0;for(t=r?Fc(t/700):t>>1,t+=Fc(t/e);t>jI*26>>1;n+=36)t=Fc(t/jI);return Fc(n+(jI+1)*t/(t+38))},qZ=function(t){let e=[],r=t.length,n=0,i=128,a=72,s=t.lastIndexOf("-");s<0&&(s=0);for(let o=0;o=128&&Of("not-basic"),e.push(t.charCodeAt(o));for(let o=s>0?s+1:0;o=r&&Of("invalid-input");let d=uFe(t.charCodeAt(o++));d>=36&&Of("invalid-input"),d>Fc((2147483647-n)/h)&&Of("overflow"),n+=d*h;let p=f<=a?1:f>=a+26?26:f-a;if(dFc(2147483647/m)&&Of("overflow"),h*=m}let u=e.length+1;a=GZ(n-l,u,l==0),Fc(n/u)>2147483647-i&&Of("overflow"),i+=Fc(n/u),n%=u,e.splice(n++,0,i)}return String.fromCodePoint(...e)},UZ=function(t){let e=[];t=$Z(t);let r=t.length,n=128,i=0,a=72;for(let l of t)l<128&&e.push(KI(l));let s=e.length,o=s;for(s&&e.push("-");o=n&&hFc((2147483647-i)/u)&&Of("overflow"),i+=(l-n)*u,n=l;for(let h of t)if(h2147483647&&Of("overflow"),h===n){let f=i;for(let d=36;;d+=36){let p=d<=a?1:d>=a+26?26:d-a;if(f=0))try{e.hostname=ZI.toASCII(e.hostname)}catch{}return Yw(Dg(e))}function vFe(t){let e=Db(t,!0);if(e.hostname&&(!e.protocol||YZ.indexOf(e.protocol)>=0))try{e.hostname=ZI.toUnicode(e.hostname)}catch{}return Rb(Dg(e),Rb.defaultChars+"%")}function Jl(t,e){if(!(this instanceof Jl))return new Jl(t,e);e||rk(t)||(e=t||{},t="default"),this.inline=new DZ,this.block=new CZ,this.core=new gZ,this.renderer=new cZ,this.linkify=new BZ,this.validateLink=gFe,this.normalizeLink=yFe,this.normalizeLinkText=vFe,this.utils=aI,this.helpers=Ng({},uI),this.options={},this.configure(t),e&&this.set(e)}Jl.prototype.set=function(t){return Ng(this.options,t),this};Jl.prototype.configure=function(t){let e=this;if(rk(t)){let r=t;if(t=dFe[r],!t)throw new Error('Wrong `markdown-it` preset "'+r+'", check name')}if(!t)throw new Error("Wrong `markdown-it` preset, can't be empty");return t.options&&e.set(t.options),t.components&&Object.keys(t.components).forEach(function(r){t.components[r].rules&&e[r].ruler.enableOnly(t.components[r].rules),t.components[r].rules2&&e[r].ruler2.enableOnly(t.components[r].rules2)}),this};Jl.prototype.enable=function(t,e){let r=[];Array.isArray(t)||(t=[t]),["core","block","inline"].forEach(function(i){r=r.concat(this[i].ruler.enable(t,!0))},this),r=r.concat(this.inline.ruler2.enable(t,!0));let n=t.filter(function(i){return r.indexOf(i)<0});if(n.length&&!e)throw new Error("MarkdownIt. Failed to enable unknown rule(s): "+n);return this};Jl.prototype.disable=function(t,e){let r=[];Array.isArray(t)||(t=[t]),["core","block","inline"].forEach(function(i){r=r.concat(this[i].ruler.disable(t,!0))},this),r=r.concat(this.inline.ruler2.disable(t,!0));let n=t.filter(function(i){return r.indexOf(i)<0});if(n.length&&!e)throw new Error("MarkdownIt. Failed to disable unknown rule(s): "+n);return this};Jl.prototype.use=function(t){let e=[this].concat(Array.prototype.slice.call(arguments,1));return t.apply(t,e),this};Jl.prototype.parse=function(t,e){if(typeof t!="string")throw new Error("Input data should be a String");let r=new this.core.State(t,this,e);return this.core.process(r),r.tokens};Jl.prototype.render=function(t,e){return e=e||{},this.renderer.render(this.parse(t,e),this.options,e)};Jl.prototype.parseInline=function(t,e){let r=new this.core.State(t,this,e);return r.inlineMode=!0,this.core.process(r),r.tokens};Jl.prototype.renderInline=function(t,e){return e=e||{},this.renderer.render(this.parseInline(t,e),this.options,e)};var QI=Jl;var XZ=!1,Fg={false:"push",true:"unshift",after:"push",before:"unshift"},uk={isPermalinkSymbol:!0};function JI(t,e,r,n){var i;if(!XZ){var a="Using deprecated markdown-it-anchor permalink option, see https://github.com/valeriangalliat/markdown-it-anchor#permalinks";typeof process=="object"&&process&&process.emitWarning?process.emitWarning(a):console.warn(a),XZ=!0}var s=[Object.assign(new r.Token("link_open","a",1),{attrs:[].concat(e.permalinkClass?[["class",e.permalinkClass]]:[],[["href",e.permalinkHref(t,r)]],Object.entries(e.permalinkAttrs(t,r)))}),Object.assign(new r.Token("html_block","",0),{content:e.permalinkSymbol,meta:uk}),new r.Token("link_close","a",-1)];e.permalinkSpace&&r.tokens[n+1].children[Fg[e.permalinkBefore]](Object.assign(new r.Token("text","",0),{content:" "})),(i=r.tokens[n+1].children)[Fg[e.permalinkBefore]].apply(i,s)}function ZZ(t){return"#"+t}function QZ(t){return{}}var xFe={class:"header-anchor",symbol:"#",renderHref:ZZ,renderAttrs:QZ};function Ob(t){function e(r){return r=Object.assign({},e.defaults,r),function(n,i,a,s){return t(n,r,i,a,s)}}return e.defaults=Object.assign({},xFe),e.renderPermalinkImpl=t,e}function eM(t){var e=[],r=t.filter(function(n){if(n[0]!=="class")return!0;e.push(n[1])});return e.length>0&&r.unshift(["class",e.join(" ")]),r}var ck=Ob(function(t,e,r,n,i){var a,s=[Object.assign(new n.Token("link_open","a",1),{attrs:eM([].concat(e.class?[["class",e.class]]:[],[["href",e.renderHref(t,n)]],e.ariaHidden?[["aria-hidden","true"]]:[],Object.entries(e.renderAttrs(t,n))))}),Object.assign(new n.Token("html_inline","",0),{content:e.symbol,meta:uk}),new n.Token("link_close","a",-1)];if(e.space){var o=typeof e.space=="string"?e.space:" ";n.tokens[i+1].children[Fg[e.placement]](Object.assign(new n.Token(typeof e.space=="string"?"html_inline":"text","",0),{content:o}))}(a=n.tokens[i+1].children)[Fg[e.placement]].apply(a,s)});Object.assign(ck.defaults,{space:!0,placement:"after",ariaHidden:!1});var h1=Ob(ck.renderPermalinkImpl);h1.defaults=Object.assign({},ck.defaults,{ariaHidden:!0});var JZ=Ob(function(t,e,r,n,i){var a=[Object.assign(new n.Token("link_open","a",1),{attrs:eM([].concat(e.class?[["class",e.class]]:[],[["href",e.renderHref(t,n)]],Object.entries(e.renderAttrs(t,n))))})].concat(e.safariReaderFix?[new n.Token("span_open","span",1)]:[],n.tokens[i+1].children,e.safariReaderFix?[new n.Token("span_close","span",-1)]:[],[new n.Token("link_close","a",-1)]);n.tokens[i+1].children=a});Object.assign(JZ.defaults,{safariReaderFix:!1});var jZ=Ob(function(t,e,r,n,i){var a;if(!["visually-hidden","aria-label","aria-describedby","aria-labelledby"].includes(e.style))throw new Error("`permalink.linkAfterHeader` called with unknown style option `"+e.style+"`");if(!["aria-describedby","aria-labelledby"].includes(e.style)&&!e.assistiveText)throw new Error("`permalink.linkAfterHeader` called without the `assistiveText` option in `"+e.style+"` style");if(e.style==="visually-hidden"&&!e.visuallyHiddenClass)throw new Error("`permalink.linkAfterHeader` called without the `visuallyHiddenClass` option in `visually-hidden` style");var s=n.tokens[i+1].children.filter(function(f){return f.type==="text"||f.type==="code_inline"}).reduce(function(f,d){return f+d.content},""),o=[],l=[];if(e.class&&l.push(["class",e.class]),l.push(["href",e.renderHref(t,n)]),l.push.apply(l,Object.entries(e.renderAttrs(t,n))),e.style==="visually-hidden"){if(o.push(Object.assign(new n.Token("span_open","span",1),{attrs:[["class",e.visuallyHiddenClass]]}),Object.assign(new n.Token("text","",0),{content:e.assistiveText(s)}),new n.Token("span_close","span",-1)),e.space){var u=typeof e.space=="string"?e.space:" ";o[Fg[e.placement]](Object.assign(new n.Token(typeof e.space=="string"?"html_inline":"text","",0),{content:u}))}o[Fg[e.placement]](Object.assign(new n.Token("span_open","span",1),{attrs:[["aria-hidden","true"]]}),Object.assign(new n.Token("html_inline","",0),{content:e.symbol,meta:uk}),new n.Token("span_close","span",-1))}else o.push(Object.assign(new n.Token("html_inline","",0),{content:e.symbol,meta:uk}));e.style==="aria-label"?l.push(["aria-label",e.assistiveText(s)]):["aria-describedby","aria-labelledby"].includes(e.style)&&l.push([e.style,t]);var h=[Object.assign(new n.Token("link_open","a",1),{attrs:eM(l)})].concat(o,[new n.Token("link_close","a",-1)]);(a=n.tokens).splice.apply(a,[i+3,0].concat(h)),e.wrapper&&(n.tokens.splice(i,0,Object.assign(new n.Token("html_block","",0),{content:e.wrapper[0]+` +`})),n.tokens.splice(i+3+h.length+1,0,Object.assign(new n.Token("html_block","",0),{content:e.wrapper[1]+` +`})))});function KZ(t,e,r,n){var i=t,a=n;if(r&&Object.prototype.hasOwnProperty.call(e,i))throw new Error("User defined `id` attribute `"+t+"` is not unique. Please fix it in your Markdown to continue.");for(;Object.prototype.hasOwnProperty.call(e,i);)i=t+"-"+a,a+=1;return e[i]=!0,i}function f1(t,e){e=Object.assign({},f1.defaults,e),t.core.ruler.push("anchor",function(r){for(var n,i={},a=r.tokens,s=Array.isArray(e.level)?(n=e.level,function(f){return n.includes(f)}):(function(f){return function(d){return d>=f}})(e.level),o=0;o{let V="",end:""},a=/<[A-Za-z0-9\\._:-]+\s*\/>/,s={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(z,q)=>{let V=z[0].length+z.index,U=z.input[V];if(U==="<"||U===","){q.ignoreMatch();return}U===">"&&(r(z,{after:V})||q.ignoreMatch());let J,se=z.input.substring(V);if(J=se.match(/^\s*=/)){q.ignoreMatch();return}if((J=se.match(/^\s+extends\s+/))&&J.index===0){q.ignoreMatch();return}}},o={$pattern:hee,keyword:lGe,literal:uGe,built_in:hGe,"variable.language":cGe},l="[0-9](_?[0-9])*",u=`\\.(${l})`,h="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",f={className:"number",variants:[{begin:`(\\b(${h})((${u})|\\.)?|(${u}))[eE][+-]?(${l})\\b`},{begin:`\\b(${h})\\b((${u})\\b|\\.)?|(${u})\\b`},{begin:"\\b(0|[1-9](_?[0-9])*)n\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*n?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*n?\\b"},{begin:"\\b0[0-7]+n?\\b"}],relevance:0},d={className:"subst",begin:"\\$\\{",end:"\\}",keywords:o,contains:[]},p={begin:".?html`",end:"",starts:{end:"`",returnEnd:!1,contains:[t.BACKSLASH_ESCAPE,d],subLanguage:"xml"}},m={begin:".?css`",end:"",starts:{end:"`",returnEnd:!1,contains:[t.BACKSLASH_ESCAPE,d],subLanguage:"css"}},g={begin:".?gql`",end:"",starts:{end:"`",returnEnd:!1,contains:[t.BACKSLASH_ESCAPE,d],subLanguage:"graphql"}},y={className:"string",begin:"`",end:"`",contains:[t.BACKSLASH_ESCAPE,d]},x={className:"comment",variants:[t.COMMENT(/\/\*\*(?!\/)/,"\\*/",{relevance:0,contains:[{begin:"(?=@[A-Za-z]+)",relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"},{className:"type",begin:"\\{",end:"\\}",excludeEnd:!0,excludeBegin:!0,relevance:0},{className:"variable",begin:n+"(?=\\s*(-)|$)",endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),t.C_BLOCK_COMMENT_MODE,t.C_LINE_COMMENT_MODE]},k=[t.APOS_STRING_MODE,t.QUOTE_STRING_MODE,p,m,g,y,{match:/\$\d+/},f];d.contains=k.concat({begin:/\{/,end:/\}/,keywords:o,contains:["self"].concat(k)});let _=[].concat(x,d.contains),T=_.concat([{begin:/(\s*)\(/,end:/\)/,keywords:o,contains:["self"].concat(_)}]),S={className:"params",begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:o,contains:T},R={variants:[{match:[/class/,/\s+/,n,/\s+/,/extends/,/\s+/,e.concat(n,"(",e.concat(/\./,n),")*")],scope:{1:"keyword",3:"title.class",5:"keyword",7:"title.class.inherited"}},{match:[/class/,/\s+/,n],scope:{1:"keyword",3:"title.class"}}]},A={relevance:0,match:e.either(/\bJSON/,/\b[A-Z][a-z]+([A-Z][a-z]*|\d)*/,/\b[A-Z]{2,}([A-Z][a-z]+|\d)+([A-Z][a-z]*)*/,/\b[A-Z]{2,}[a-z]+([A-Z][a-z]+|\d)*([A-Z][a-z]*)*/),className:"title.class",keywords:{_:[...fee,...dee]}},I={label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},P={variants:[{match:[/function/,/\s+/,n,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[S],illegal:/%/},O={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"};function C(z){return e.concat("(?!",z.join("|"),")")}let N={match:e.concat(/\b/,C([...pee,"super","import"].map(z=>`${z}\\s*\\(`)),n,e.lookahead(/\s*\(/)),className:"title.function",relevance:0},B={begin:e.concat(/\./,e.lookahead(e.concat(n,/(?![0-9A-Za-z$_(])/))),end:n,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},F={match:[/get|set/,/\s+/,n,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},S]},M="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+t.UNDERSCORE_IDENT_RE+")\\s*=>",$={match:[/const|var|let/,/\s+/,n,/\s*/,/=\s*/,/(async\s*)?/,e.lookahead(M)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[S]};return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:o,exports:{PARAMS_CONTAINS:T,CLASS_REFERENCE:A},illegal:/#(?![$_A-z])/,contains:[t.SHEBANG({label:"shebang",binary:"node",relevance:5}),I,t.APOS_STRING_MODE,t.QUOTE_STRING_MODE,p,m,g,y,x,{match:/\$\d+/},f,A,{scope:"attr",match:n+e.lookahead(":"),relevance:0},$,{begin:"("+t.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[x,t.REGEXP_MODE,{className:"function",begin:M,returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:t.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:o,contains:T}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:i.begin,end:i.end},{match:a},{begin:s.begin,"on:begin":s.isTrulyOpeningTag,end:s.end}],subLanguage:"xml",contains:[{begin:s.begin,end:s.end,skip:!0,contains:["self"]}]}]},P,{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+t.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[S,t.inherit(t.TITLE_MODE,{begin:n,className:"title.function"})]},{match:/\.\.\./,relevance:0},B,{match:"\\$"+n,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[S]},N,O,R,F,{match:/\$[(.]/}]}}var jk="[A-Za-z$_][0-9A-Za-z$_]*",mee=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends","using"],gee=["true","false","null","undefined","NaN","Infinity"],yee=["Object","Function","Boolean","Symbol","Math","Date","Number","BigInt","String","RegExp","Array","Float32Array","Float64Array","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Int32Array","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array","Set","Map","WeakSet","WeakMap","ArrayBuffer","SharedArrayBuffer","Atomics","DataView","JSON","Promise","Generator","GeneratorFunction","AsyncFunction","Reflect","Proxy","Intl","WebAssembly"],vee=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],xee=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],bee=["arguments","this","super","console","window","document","localStorage","sessionStorage","module","global"],wee=[].concat(xee,yee,vee);function fGe(t){let e=t.regex,r=(z,{after:q})=>{let V="",end:""},a=/<[A-Za-z0-9\\._:-]+\s*\/>/,s={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(z,q)=>{let V=z[0].length+z.index,U=z.input[V];if(U==="<"||U===","){q.ignoreMatch();return}U===">"&&(r(z,{after:V})||q.ignoreMatch());let J,se=z.input.substring(V);if(J=se.match(/^\s*=/)){q.ignoreMatch();return}if((J=se.match(/^\s+extends\s+/))&&J.index===0){q.ignoreMatch();return}}},o={$pattern:jk,keyword:mee,literal:gee,built_in:wee,"variable.language":bee},l="[0-9](_?[0-9])*",u=`\\.(${l})`,h="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",f={className:"number",variants:[{begin:`(\\b(${h})((${u})|\\.)?|(${u}))[eE][+-]?(${l})\\b`},{begin:`\\b(${h})\\b((${u})\\b|\\.)?|(${u})\\b`},{begin:"\\b(0|[1-9](_?[0-9])*)n\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*n?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*n?\\b"},{begin:"\\b0[0-7]+n?\\b"}],relevance:0},d={className:"subst",begin:"\\$\\{",end:"\\}",keywords:o,contains:[]},p={begin:".?html`",end:"",starts:{end:"`",returnEnd:!1,contains:[t.BACKSLASH_ESCAPE,d],subLanguage:"xml"}},m={begin:".?css`",end:"",starts:{end:"`",returnEnd:!1,contains:[t.BACKSLASH_ESCAPE,d],subLanguage:"css"}},g={begin:".?gql`",end:"",starts:{end:"`",returnEnd:!1,contains:[t.BACKSLASH_ESCAPE,d],subLanguage:"graphql"}},y={className:"string",begin:"`",end:"`",contains:[t.BACKSLASH_ESCAPE,d]},x={className:"comment",variants:[t.COMMENT(/\/\*\*(?!\/)/,"\\*/",{relevance:0,contains:[{begin:"(?=@[A-Za-z]+)",relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"},{className:"type",begin:"\\{",end:"\\}",excludeEnd:!0,excludeBegin:!0,relevance:0},{className:"variable",begin:n+"(?=\\s*(-)|$)",endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),t.C_BLOCK_COMMENT_MODE,t.C_LINE_COMMENT_MODE]},k=[t.APOS_STRING_MODE,t.QUOTE_STRING_MODE,p,m,g,y,{match:/\$\d+/},f];d.contains=k.concat({begin:/\{/,end:/\}/,keywords:o,contains:["self"].concat(k)});let _=[].concat(x,d.contains),T=_.concat([{begin:/(\s*)\(/,end:/\)/,keywords:o,contains:["self"].concat(_)}]),S={className:"params",begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:o,contains:T},R={variants:[{match:[/class/,/\s+/,n,/\s+/,/extends/,/\s+/,e.concat(n,"(",e.concat(/\./,n),")*")],scope:{1:"keyword",3:"title.class",5:"keyword",7:"title.class.inherited"}},{match:[/class/,/\s+/,n],scope:{1:"keyword",3:"title.class"}}]},A={relevance:0,match:e.either(/\bJSON/,/\b[A-Z][a-z]+([A-Z][a-z]*|\d)*/,/\b[A-Z]{2,}([A-Z][a-z]+|\d)+([A-Z][a-z]*)*/,/\b[A-Z]{2,}[a-z]+([A-Z][a-z]+|\d)*([A-Z][a-z]*)*/),className:"title.class",keywords:{_:[...yee,...vee]}},I={label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},P={variants:[{match:[/function/,/\s+/,n,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[S],illegal:/%/},O={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"};function C(z){return e.concat("(?!",z.join("|"),")")}let N={match:e.concat(/\b/,C([...xee,"super","import"].map(z=>`${z}\\s*\\(`)),n,e.lookahead(/\s*\(/)),className:"title.function",relevance:0},B={begin:e.concat(/\./,e.lookahead(e.concat(n,/(?![0-9A-Za-z$_(])/))),end:n,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},F={match:[/get|set/,/\s+/,n,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},S]},M="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+t.UNDERSCORE_IDENT_RE+")\\s*=>",$={match:[/const|var|let/,/\s+/,n,/\s*/,/=\s*/,/(async\s*)?/,e.lookahead(M)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[S]};return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:o,exports:{PARAMS_CONTAINS:T,CLASS_REFERENCE:A},illegal:/#(?![$_A-z])/,contains:[t.SHEBANG({label:"shebang",binary:"node",relevance:5}),I,t.APOS_STRING_MODE,t.QUOTE_STRING_MODE,p,m,g,y,x,{match:/\$\d+/},f,A,{scope:"attr",match:n+e.lookahead(":"),relevance:0},$,{begin:"("+t.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[x,t.REGEXP_MODE,{className:"function",begin:M,returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:t.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:o,contains:T}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:i.begin,end:i.end},{match:a},{begin:s.begin,"on:begin":s.isTrulyOpeningTag,end:s.end}],subLanguage:"xml",contains:[{begin:s.begin,end:s.end,skip:!0,contains:["self"]}]}]},P,{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+t.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[S,t.inherit(t.TITLE_MODE,{begin:n,className:"title.function"})]},{match:/\.\.\./,relevance:0},B,{match:"\\$"+n,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[S]},N,O,R,F,{match:/\$[(.]/}]}}function uN(t){let e=t.regex,r=fGe(t),n=jk,i=["any","void","number","boolean","string","object","never","symbol","bigint","unknown"],a={begin:[/namespace/,/\s+/,t.IDENT_RE],beginScope:{1:"keyword",3:"title.class"}},s={beginKeywords:"interface",end:/\{/,excludeEnd:!0,keywords:{keyword:"interface extends",built_in:i},contains:[r.exports.CLASS_REFERENCE]},o={className:"meta",relevance:10,begin:/^\s*['"]use strict['"]/},l=["type","interface","public","private","protected","implements","declare","abstract","readonly","enum","override","satisfies"],u={$pattern:jk,keyword:mee.concat(l),literal:gee,built_in:wee.concat(i),"variable.language":bee},h={className:"meta",begin:"@"+n},f=(g,y,v)=>{let x=g.contains.findIndex(k=>k.label===y);if(x===-1)throw new Error("can not find mode to replace");g.contains.splice(x,1,v)};Object.assign(r.keywords,u),r.exports.PARAMS_CONTAINS.push(h);let d=r.contains.find(g=>g.scope==="attr"),p=Object.assign({},d,{match:e.concat(n,e.lookahead(/\s*\?:/))});r.exports.PARAMS_CONTAINS.push([r.exports.CLASS_REFERENCE,d,p]),r.contains=r.contains.concat([h,a,s,p]),f(r,"shebang",t.SHEBANG()),f(r,"use_strict",o);let m=r.contains.find(g=>g.label==="func.def");return m.relevance=0,Object.assign(r,{name:"TypeScript",aliases:["ts","tsx","mts","cts"]}),r}function cN(t){let e=t.regex,r=new RegExp("[\\p{XID_Start}_]\\p{XID_Continue}*","u"),n=["and","as","assert","async","await","break","case","class","continue","def","del","elif","else","except","finally","for","from","global","if","import","in","is","lambda","match","nonlocal|10","not","or","pass","raise","return","try","while","with","yield"],o={$pattern:/[A-Za-z]\w+|__\w+__/,keyword:n,built_in:["__import__","abs","all","any","ascii","bin","bool","breakpoint","bytearray","bytes","callable","chr","classmethod","compile","complex","delattr","dict","dir","divmod","enumerate","eval","exec","filter","float","format","frozenset","getattr","globals","hasattr","hash","help","hex","id","input","int","isinstance","issubclass","iter","len","list","locals","map","max","memoryview","min","next","object","oct","open","ord","pow","print","property","range","repr","reversed","round","set","setattr","slice","sorted","staticmethod","str","sum","super","tuple","type","vars","zip"],literal:["__debug__","Ellipsis","False","None","NotImplemented","True"],type:["Any","Callable","Coroutine","Dict","List","Literal","Generic","Optional","Sequence","Set","Tuple","Type","Union"]},l={className:"meta",begin:/^(>>>|\.\.\.) /},u={className:"subst",begin:/\{/,end:/\}/,keywords:o,illegal:/#/},h={begin:/\{\{/,relevance:0},f={className:"string",contains:[t.BACKSLASH_ESCAPE],variants:[{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?'''/,end:/'''/,contains:[t.BACKSLASH_ESCAPE,l],relevance:10},{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?"""/,end:/"""/,contains:[t.BACKSLASH_ESCAPE,l],relevance:10},{begin:/([fF][rR]|[rR][fF]|[fF])'''/,end:/'''/,contains:[t.BACKSLASH_ESCAPE,l,h,u]},{begin:/([fF][rR]|[rR][fF]|[fF])"""/,end:/"""/,contains:[t.BACKSLASH_ESCAPE,l,h,u]},{begin:/([uU]|[rR])'/,end:/'/,relevance:10},{begin:/([uU]|[rR])"/,end:/"/,relevance:10},{begin:/([bB]|[bB][rR]|[rR][bB])'/,end:/'/},{begin:/([bB]|[bB][rR]|[rR][bB])"/,end:/"/},{begin:/([fF][rR]|[rR][fF]|[fF])'/,end:/'/,contains:[t.BACKSLASH_ESCAPE,h,u]},{begin:/([fF][rR]|[rR][fF]|[fF])"/,end:/"/,contains:[t.BACKSLASH_ESCAPE,h,u]},t.APOS_STRING_MODE,t.QUOTE_STRING_MODE]},d="[0-9](_?[0-9])*",p=`(\\b(${d}))?\\.(${d})|\\b(${d})\\.`,m=`\\b|${n.join("|")}`,g={className:"number",relevance:0,variants:[{begin:`(\\b(${d})|(${p}))[eE][+-]?(${d})[jJ]?(?=${m})`},{begin:`(${p})[jJ]?`},{begin:`\\b([1-9](_?[0-9])*|0+(_?0)*)[lLjJ]?(?=${m})`},{begin:`\\b0[bB](_?[01])+[lL]?(?=${m})`},{begin:`\\b0[oO](_?[0-7])+[lL]?(?=${m})`},{begin:`\\b0[xX](_?[0-9a-fA-F])+[lL]?(?=${m})`},{begin:`\\b(${d})[jJ](?=${m})`}]},y={className:"comment",begin:e.lookahead(/# type:/),end:/$/,keywords:o,contains:[{begin:/# type:/},{begin:/#/,end:/\b\B/,endsWithParent:!0}]},v={className:"params",variants:[{className:"",begin:/\(\s*\)/,skip:!0},{begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:o,contains:["self",l,g,f,t.HASH_COMMENT_MODE]}]};return u.contains=[f,g,l],{name:"Python",aliases:["py","gyp","ipython"],unicodeRegex:!0,keywords:o,illegal:/(<\/|\?)|=>/,contains:[l,g,{scope:"variable.language",match:/\bself\b/},{beginKeywords:"if",relevance:0},{match:/\bor\b/,scope:"keyword"},f,y,t.HASH_COMMENT_MODE,{match:[/\bdef/,/\s+/,r],scope:{1:"keyword",3:"title.function"},contains:[v]},{variants:[{match:[/\bclass/,/\s+/,r,/\s*/,/\(\s*/,r,/\s*\)/]},{match:[/\bclass/,/\s+/,r]}],scope:{1:"keyword",3:"title.class",6:"title.class.inherited"}},{className:"meta",begin:/^[\t ]*@/,end:/(?=#)|$/,contains:[g,v,f]}]}}function hN(t){let e=t.regex,r=/(r#)?/,n=e.concat(r,t.UNDERSCORE_IDENT_RE),i=e.concat(r,t.IDENT_RE),a={className:"title.function.invoke",relevance:0,begin:e.concat(/\b/,/(?!let|for|while|if|else|match\b)/,i,e.lookahead(/\s*\(/))},s="([ui](8|16|32|64|128|size)|f(32|64))?",o=["abstract","as","async","await","become","box","break","const","continue","crate","do","dyn","else","enum","extern","false","final","fn","for","if","impl","in","let","loop","macro","match","mod","move","mut","override","priv","pub","ref","return","self","Self","static","struct","super","trait","true","try","type","typeof","union","unsafe","unsized","use","virtual","where","while","yield"],l=["true","false","Some","None","Ok","Err"],u=["drop ","Copy","Send","Sized","Sync","Drop","Fn","FnMut","FnOnce","ToOwned","Clone","Debug","PartialEq","PartialOrd","Eq","Ord","AsRef","AsMut","Into","From","Default","Iterator","Extend","IntoIterator","DoubleEndedIterator","ExactSizeIterator","SliceConcatExt","ToString","assert!","assert_eq!","bitflags!","bytes!","cfg!","col!","concat!","concat_idents!","debug_assert!","debug_assert_eq!","env!","eprintln!","panic!","file!","format!","format_args!","include_bytes!","include_str!","line!","local_data_key!","module_path!","option_env!","print!","println!","select!","stringify!","try!","unimplemented!","unreachable!","vec!","write!","writeln!","macro_rules!","assert_ne!","debug_assert_ne!"],h=["i8","i16","i32","i64","i128","isize","u8","u16","u32","u64","u128","usize","f32","f64","str","char","bool","Box","Option","Result","String","Vec"];return{name:"Rust",aliases:["rs"],keywords:{$pattern:t.IDENT_RE+"!?",type:h,keyword:o,literal:l,built_in:u},illegal:""},a]}}function kee(t){let a={keyword:["break","case","chan","const","continue","default","defer","else","fallthrough","for","func","go","goto","if","import","interface","map","package","range","return","select","struct","switch","type","var"],type:["bool","byte","complex64","complex128","error","float32","float64","int8","int16","int32","int64","string","uint8","uint16","uint32","uint64","int","uint","uintptr","rune"],literal:["true","false","iota","nil"],built_in:["append","cap","close","complex","copy","imag","len","make","new","panic","print","println","real","recover","delete"]};return{name:"Go",aliases:["golang"],keywords:a,illegal:"]([1-9]?[+-])?[ ]*\\n( +)[^ ][^\\n]*\\n(\\2[^\\n]+\\n?)*"},{begin:"<%[%=-]?",end:"[%-]?%>",subLanguage:"ruby",excludeBegin:!0,excludeEnd:!0,relevance:0},{className:"type",begin:"!\\w+!"+r},{className:"type",begin:"!<"+r+">"},{className:"type",begin:"!"+r},{className:"type",begin:"!!"+r},{className:"meta",begin:"&"+t.UNDERSCORE_IDENT_RE+"$"},{className:"meta",begin:"\\*"+t.UNDERSCORE_IDENT_RE+"$"},{className:"bullet",begin:"-(?=[ ]|$)",relevance:0},t.HASH_COMMENT_MODE,{beginKeywords:e,keywords:{literal:e}},d,{className:"number",begin:t.C_NUMBER_RE+"\\b",relevance:0},m,g,a,s],v=[...y];return v.pop(),v.push(o),p.contains=v,{name:"YAML",case_insensitive:!0,aliases:["yml"],contains:y}}function dN(t){let e=t.regex,r={begin:/<\/?[A-Za-z_]/,end:">",subLanguage:"xml",relevance:0},n={begin:"^[-\\*]{3,}",end:"$"},i={className:"code",variants:[{begin:"(`{3,})[^`](.|\\n)*?\\1`*[ ]*"},{begin:"(~{3,})[^~](.|\\n)*?\\1~*[ ]*"},{begin:"```",end:"```+[ ]*$"},{begin:"~~~",end:"~~~+[ ]*$"},{begin:"`.+?`"},{begin:"(?=^( {4}|\\t))",contains:[{begin:"^( {4}|\\t)",end:"(\\n)$"}],relevance:0}]},a={className:"bullet",begin:"^[ ]*([*+-]|(\\d+\\.))(?=\\s+)",end:"\\s+",excludeEnd:!0},s={begin:/^\[[^\n]+\]:/,returnBegin:!0,contains:[{className:"symbol",begin:/\[/,end:/\]/,excludeBegin:!0,excludeEnd:!0},{className:"link",begin:/:\s*/,end:/$/,excludeBegin:!0}]},o=/[A-Za-z][A-Za-z0-9+.-]*/,l={variants:[{begin:/\[.+?\]\[.*?\]/,relevance:0},{begin:/\[.+?\]\(((data|javascript|mailto):|(?:http|ftp)s?:\/\/).*?\)/,relevance:2},{begin:e.concat(/\[.+?\]\(/,o,/:\/\/.*?\)/),relevance:2},{begin:/\[.+?\]\([./?&#].*?\)/,relevance:1},{begin:/\[.*?\]\(.*?\)/,relevance:0}],returnBegin:!0,contains:[{match:/\[(?=\])/},{className:"string",relevance:0,begin:"\\[",end:"\\]",excludeBegin:!0,returnEnd:!0},{className:"link",relevance:0,begin:"\\]\\(",end:"\\)",excludeBegin:!0,excludeEnd:!0},{className:"symbol",relevance:0,begin:"\\]\\[",end:"\\]",excludeBegin:!0,excludeEnd:!0}]},u={className:"strong",contains:[],variants:[{begin:/_{2}(?!\s)/,end:/_{2}/},{begin:/\*{2}(?!\s)/,end:/\*{2}/}]},h={className:"emphasis",contains:[],variants:[{begin:/\*(?![*\s])/,end:/\*/},{begin:/_(?![_\s])/,end:/_/,relevance:0}]},f=t.inherit(u,{contains:[]}),d=t.inherit(h,{contains:[]});u.contains.push(d),h.contains.push(f);let p=[r,l];return[u,h,f,d].forEach(v=>{v.contains=v.contains.concat(p)}),p=p.concat(u,h),{name:"Markdown",aliases:["md","mkdown","mkd"],contains:[{className:"section",variants:[{begin:"^#{1,6}",end:"$",contains:p},{begin:"(?=^.+?\\n[=-]{2,}$)",contains:[{begin:"^[=-]*$"},{begin:"^",end:"\\n",contains:p}]}]},r,a,u,h,{className:"quote",begin:"^>\\s+",contains:p,end:"$"},i,n,l,s,{scope:"literal",match:/&([a-zA-Z0-9]+|#[0-9]{1,7}|#[Xx][0-9a-fA-F]{1,6});/}]}}var jg="[0-9](_*[0-9])*",Zk=`\\.(${jg})`,Qk="[0-9a-fA-F](_*[0-9a-fA-F])*",Eee={className:"number",variants:[{begin:`(\\b(${jg})((${Zk})|\\.)?|(${Zk}))[eE][+-]?(${jg})[fFdD]?\\b`},{begin:`\\b(${jg})((${Zk})[fFdD]?\\b|\\.([fFdD]\\b)?)`},{begin:`(${Zk})[fFdD]?\\b`},{begin:`\\b(${jg})[fFdD]\\b`},{begin:`\\b0[xX]((${Qk})\\.?|(${Qk})?\\.(${Qk}))[pP][+-]?(${jg})[fFdD]?\\b`},{begin:"\\b(0|[1-9](_*[0-9])*)[lL]?\\b"},{begin:`\\b0[xX](${Qk})[lL]?\\b`},{begin:"\\b0(_*[0-7])*[lL]?\\b"},{begin:"\\b0[bB][01](_*[01])*[lL]?\\b"}],relevance:0};function See(t,e,r){return r===-1?"":t.replace(e,n=>See(t,e,r-1))}function Cee(t){let e=t.regex,r="[\xC0-\u02B8a-zA-Z_$][\xC0-\u02B8a-zA-Z_$0-9]*",n=r+See("(?:<"+r+"~~~(?:\\s*,\\s*"+r+"~~~)*>)?",/~~~/g,2),l={keyword:["synchronized","abstract","private","var","static","if","const ","for","while","strictfp","finally","protected","import","native","final","void","enum","else","break","transient","catch","instanceof","volatile","case","assert","package","default","public","try","switch","continue","throws","protected","public","private","module","requires","exports","do","sealed","yield","permits","goto","when"],literal:["false","true","null"],type:["char","boolean","long","float","int","byte","short","double"],built_in:["super","this"]},u={className:"meta",begin:"@"+r,contains:[{begin:/\(/,end:/\)/,contains:["self"]}]},h={className:"params",begin:/\(/,end:/\)/,keywords:l,relevance:0,contains:[t.C_BLOCK_COMMENT_MODE],endsParent:!0};return{name:"Java",aliases:["jsp"],keywords:l,illegal:/<\/|#/,contains:[t.COMMENT("/\\*\\*","\\*/",{relevance:0,contains:[{begin:/\w+@/,relevance:0},{className:"doctag",begin:"@[A-Za-z]+"}]}),{begin:/import java\.[a-z]+\./,keywords:"import",relevance:2},t.C_LINE_COMMENT_MODE,t.C_BLOCK_COMMENT_MODE,{begin:/"""/,end:/"""/,className:"string",contains:[t.BACKSLASH_ESCAPE]},t.APOS_STRING_MODE,t.QUOTE_STRING_MODE,{match:[/\b(?:class|interface|enum|extends|implements|new)/,/\s+/,r],className:{1:"keyword",3:"title.class"}},{match:/non-sealed/,scope:"keyword"},{begin:[e.concat(/(?!else)/,r),/\s+/,r,/\s+/,/=(?!=)/],className:{1:"type",3:"variable",5:"operator"}},{begin:[/record/,/\s+/,r],className:{1:"keyword",3:"title.class"},contains:[h,t.C_LINE_COMMENT_MODE,t.C_BLOCK_COMMENT_MODE]},{beginKeywords:"new throw return else",relevance:0},{begin:["(?:"+n+"\\s+)",t.UNDERSCORE_IDENT_RE,/\s*(?=\()/],className:{2:"title.function"},keywords:l,contains:[{className:"params",begin:/\(/,end:/\)/,keywords:l,relevance:0,contains:[u,t.APOS_STRING_MODE,t.QUOTE_STRING_MODE,Eee,t.C_BLOCK_COMMENT_MODE]},t.C_LINE_COMMENT_MODE,t.C_BLOCK_COMMENT_MODE]},Eee,u]}}function _ee(t){let e=t.regex,r=t.COMMENT("//","$",{contains:[{begin:/\\\n/}]}),n="decltype\\(auto\\)",i="[a-zA-Z_]\\w*::",s="("+n+"|"+e.optional(i)+"[a-zA-Z_]\\w*"+e.optional("<[^<>]+>")+")",o={className:"type",variants:[{begin:"\\b[a-z\\d_]*_t\\b"},{match:/\batomic_[a-z]{3,6}\b/}]},u={className:"string",variants:[{begin:'(u8?|U|L)?"',end:'"',illegal:"\\n",contains:[t.BACKSLASH_ESCAPE]},{begin:"(u8?|U|L)?'("+"\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)"+"|.)",end:"'",illegal:"."},t.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},h={className:"number",variants:[{match:/\b(0b[01']+)/},{match:/(-?)\b([\d']+(\.[\d']*)?|\.[\d']+)((ll|LL|l|L)(u|U)?|(u|U)(ll|LL|l|L)?|f|F|b|B)/},{match:/(-?)\b(0[xX][a-fA-F0-9]+(?:'[a-fA-F0-9]+)*(?:\.[a-fA-F0-9]*(?:'[a-fA-F0-9]*)*)?(?:[pP][-+]?[0-9]+)?(l|L)?(u|U)?)/},{match:/(-?)\b\d+(?:'\d+)*(?:\.\d*(?:'\d*)*)?(?:[eE][-+]?\d+)?/}],relevance:0},f={className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line pragma _Pragma ifdef ifndef elifdef elifndef include"},contains:[{begin:/\\\n/,relevance:0},t.inherit(u,{className:"string"}),{className:"string",begin:/<.*?>/},r,t.C_BLOCK_COMMENT_MODE]},d={className:"title",begin:e.optional(i)+t.IDENT_RE,relevance:0},p=e.optional(i)+t.IDENT_RE+"\\s*\\(",y={keyword:["asm","auto","break","case","continue","default","do","else","enum","extern","for","fortran","goto","if","inline","register","restrict","return","sizeof","typeof","typeof_unqual","struct","switch","typedef","union","volatile","while","_Alignas","_Alignof","_Atomic","_Generic","_Noreturn","_Static_assert","_Thread_local","alignas","alignof","noreturn","static_assert","thread_local","_Pragma"],type:["float","double","signed","unsigned","int","short","long","char","void","_Bool","_BitInt","_Complex","_Imaginary","_Decimal32","_Decimal64","_Decimal96","_Decimal128","_Decimal64x","_Decimal128x","_Float16","_Float32","_Float64","_Float128","_Float32x","_Float64x","_Float128x","const","static","constexpr","complex","bool","imaginary"],literal:"true false NULL",built_in:"std string wstring cin cout cerr clog stdin stdout stderr stringstream istringstream ostringstream auto_ptr deque list queue stack vector map set pair bitset multiset multimap unordered_set unordered_map unordered_multiset unordered_multimap priority_queue make_pair array shared_ptr abort terminate abs acos asin atan2 atan calloc ceil cosh cos exit exp fabs floor fmod fprintf fputs free frexp fscanf future isalnum isalpha iscntrl isdigit isgraph islower isprint ispunct isspace isupper isxdigit tolower toupper labs ldexp log10 log malloc realloc memchr memcmp memcpy memset modf pow printf putchar puts scanf sinh sin snprintf sprintf sqrt sscanf strcat strchr strcmp strcpy strcspn strlen strncat strncmp strncpy strpbrk strrchr strspn strstr tanh tan vfprintf vprintf vsprintf endl initializer_list unique_ptr"},v=[f,o,r,t.C_BLOCK_COMMENT_MODE,h,u],x={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:y,contains:v.concat([{begin:/\(/,end:/\)/,keywords:y,contains:v.concat(["self"]),relevance:0}]),relevance:0},k={begin:"("+s+"[\\*&\\s]+)+"+p,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:y,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:n,keywords:y,relevance:0},{begin:p,returnBegin:!0,contains:[t.inherit(d,{className:"title.function"})],relevance:0},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:y,relevance:0,contains:[r,t.C_BLOCK_COMMENT_MODE,u,h,o,{begin:/\(/,end:/\)/,keywords:y,relevance:0,contains:["self",r,t.C_BLOCK_COMMENT_MODE,u,h,o]}]},o,r,t.C_BLOCK_COMMENT_MODE,f]};return{name:"C",aliases:["h"],keywords:y,disableAutodetect:!0,illegal:"=]/,contains:[{beginKeywords:"final class struct"},t.TITLE_MODE]}]),exports:{preprocessor:f,strings:u,keywords:y}}}function Aee(t){let e=t.regex,r=t.COMMENT("//","$",{contains:[{begin:/\\\n/}]}),n="decltype\\(auto\\)",i="[a-zA-Z_]\\w*::",s="(?!struct)("+n+"|"+e.optional(i)+"[a-zA-Z_]\\w*"+e.optional("<[^<>]+>")+")",o={className:"type",begin:"\\b[a-z\\d_]*_t\\b"},u={className:"string",variants:[{begin:'(u8?|U|L)?"',end:'"',illegal:"\\n",contains:[t.BACKSLASH_ESCAPE]},{begin:"(u8?|U|L)?'("+"\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)"+"|.)",end:"'",illegal:"."},t.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},h={className:"number",variants:[{begin:"[+-]?(?:(?:[0-9](?:'?[0-9])*\\.(?:[0-9](?:'?[0-9])*)?|\\.[0-9](?:'?[0-9])*)(?:[Ee][+-]?[0-9](?:'?[0-9])*)?|[0-9](?:'?[0-9])*[Ee][+-]?[0-9](?:'?[0-9])*|0[Xx](?:[0-9A-Fa-f](?:'?[0-9A-Fa-f])*(?:\\.(?:[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)?)?|\\.[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)[Pp][+-]?[0-9](?:'?[0-9])*)(?:[Ff](?:16|32|64|128)?|(BF|bf)16|[Ll]|)"},{begin:"[+-]?\\b(?:0[Bb][01](?:'?[01])*|0[Xx][0-9A-Fa-f](?:'?[0-9A-Fa-f])*|0(?:'?[0-7])*|[1-9](?:'?[0-9])*)(?:[Uu](?:LL?|ll?)|[Uu][Zz]?|(?:LL?|ll?)[Uu]?|[Zz][Uu]|)"}],relevance:0},f={className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line pragma _Pragma ifdef ifndef include"},contains:[{begin:/\\\n/,relevance:0},t.inherit(u,{className:"string"}),{className:"string",begin:/<.*?>/},r,t.C_BLOCK_COMMENT_MODE]},d={className:"title",begin:e.optional(i)+t.IDENT_RE,relevance:0},p=e.optional(i)+t.IDENT_RE+"\\s*\\(",m=["alignas","alignof","and","and_eq","asm","atomic_cancel","atomic_commit","atomic_noexcept","auto","bitand","bitor","break","case","catch","class","co_await","co_return","co_yield","compl","concept","const_cast|10","consteval","constexpr","constinit","continue","decltype","default","delete","do","dynamic_cast|10","else","enum","explicit","export","extern","false","final","for","friend","goto","if","import","inline","module","mutable","namespace","new","noexcept","not","not_eq","nullptr","operator","or","or_eq","override","private","protected","public","reflexpr","register","reinterpret_cast|10","requires","return","sizeof","static_assert","static_cast|10","struct","switch","synchronized","template","this","thread_local","throw","transaction_safe","transaction_safe_dynamic","true","try","typedef","typeid","typename","union","using","virtual","volatile","while","xor","xor_eq"],g=["bool","char","char16_t","char32_t","char8_t","double","float","int","long","short","void","wchar_t","unsigned","signed","const","static"],y=["any","auto_ptr","barrier","binary_semaphore","bitset","complex","condition_variable","condition_variable_any","counting_semaphore","deque","false_type","flat_map","flat_set","future","imaginary","initializer_list","istringstream","jthread","latch","lock_guard","multimap","multiset","mutex","optional","ostringstream","packaged_task","pair","promise","priority_queue","queue","recursive_mutex","recursive_timed_mutex","scoped_lock","set","shared_future","shared_lock","shared_mutex","shared_timed_mutex","shared_ptr","stack","string_view","stringstream","timed_mutex","thread","true_type","tuple","unique_lock","unique_ptr","unordered_map","unordered_multimap","unordered_multiset","unordered_set","variant","vector","weak_ptr","wstring","wstring_view"],v=["abort","abs","acos","apply","as_const","asin","atan","atan2","calloc","ceil","cerr","cin","clog","cos","cosh","cout","declval","endl","exchange","exit","exp","fabs","floor","fmod","forward","fprintf","fputs","free","frexp","fscanf","future","invoke","isalnum","isalpha","iscntrl","isdigit","isgraph","islower","isprint","ispunct","isspace","isupper","isxdigit","labs","launder","ldexp","log","log10","make_pair","make_shared","make_shared_for_overwrite","make_tuple","make_unique","malloc","memchr","memcmp","memcpy","memset","modf","move","pow","printf","putchar","puts","realloc","scanf","sin","sinh","snprintf","sprintf","sqrt","sscanf","std","stderr","stdin","stdout","strcat","strchr","strcmp","strcpy","strcspn","strlen","strncat","strncmp","strncpy","strpbrk","strrchr","strspn","strstr","swap","tan","tanh","terminate","to_underlying","tolower","toupper","vfprintf","visit","vprintf","vsprintf"],_={type:g,keyword:m,literal:["NULL","false","nullopt","nullptr","true"],built_in:["_Pragma"],_type_hints:y},T={className:"function.dispatch",relevance:0,keywords:{_hint:v},begin:e.concat(/\b/,/(?!decltype)/,/(?!if)/,/(?!for)/,/(?!switch)/,/(?!while)/,t.IDENT_RE,e.lookahead(/(<[^<>]+>|)\s*\(/))},S=[T,f,o,r,t.C_BLOCK_COMMENT_MODE,h,u],R={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:_,contains:S.concat([{begin:/\(/,end:/\)/,keywords:_,contains:S.concat(["self"]),relevance:0}]),relevance:0},A={className:"function",begin:"("+s+"[\\*&\\s]+)+"+p,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:_,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:n,keywords:_,relevance:0},{begin:p,returnBegin:!0,contains:[d],relevance:0},{begin:/::/,relevance:0},{begin:/:/,endsWithParent:!0,contains:[u,h]},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:_,relevance:0,contains:[r,t.C_BLOCK_COMMENT_MODE,u,h,o,{begin:/\(/,end:/\)/,keywords:_,relevance:0,contains:["self",r,t.C_BLOCK_COMMENT_MODE,u,h,o]}]},o,r,t.C_BLOCK_COMMENT_MODE,f]};return{name:"C++",aliases:["cc","c++","h++","hpp","hh","hxx","cxx"],keywords:_,illegal:"",keywords:_,contains:["self",o]},{begin:t.IDENT_RE+"::",keywords:_},{match:[/\b(?:enum(?:\s+(?:class|struct))?|class|struct|union)/,/\s+/,/\w+/],className:{1:"keyword",3:"title.class"}}])}}function pN(t){let e=t.regex,r=e.concat(/[\p{L}_]/u,e.optional(/[\p{L}0-9_.-]*:/u),/[\p{L}0-9_.-]*/u),n=/[\p{L}0-9._:-]+/u,i={className:"symbol",begin:/&[a-z]+;|&#[0-9]+;|&#x[a-f0-9]+;/},a={begin:/\s/,contains:[{className:"keyword",begin:/#?[a-z_][a-z1-9_-]+/,illegal:/\n/}]},s=t.inherit(a,{begin:/\(/,end:/\)/}),o=t.inherit(t.APOS_STRING_MODE,{className:"string"}),l=t.inherit(t.QUOTE_STRING_MODE,{className:"string"}),u={endsWithParent:!0,illegal:/`]+/}]}]}]};return{name:"HTML, XML",aliases:["html","xhtml","rss","atom","xjb","xsd","xsl","plist","wsf","svg"],case_insensitive:!0,unicodeRegex:!0,contains:[{className:"meta",begin://,relevance:10,contains:[a,l,o,s,{begin:/\[/,end:/\]/,contains:[{className:"meta",begin://,contains:[a,s,l,o]}]}]},t.COMMENT(//,{relevance:10}),{begin://,relevance:10},i,{className:"meta",end:/\?>/,variants:[{begin:/<\?xml/,relevance:10,contains:[l]},{begin:/<\?[a-z][a-z0-9]+/}]},{className:"tag",begin:/)/,end:/>/,keywords:{name:"style"},contains:[u],starts:{end:/<\/style>/,returnEnd:!0,subLanguage:["css","xml"]}},{className:"tag",begin:/)/,end:/>/,keywords:{name:"script"},contains:[u],starts:{end:/<\/script>/,returnEnd:!0,subLanguage:["javascript","handlebars","xml"]}},{className:"tag",begin:/<>|<\/>/},{className:"tag",begin:e.concat(//,/>/,/\s/)))),end:/\/?>/,contains:[{className:"name",begin:r,relevance:0,starts:u}]},{className:"tag",begin:e.concat(/<\//,e.lookahead(e.concat(r,/>/))),contains:[{className:"name",begin:r,relevance:0},{begin:/>/,relevance:0,endsParent:!0}]}]}}var dGe=t=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:t.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},FUNCTION_DISPATCH:{className:"built_in",begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[t.APOS_STRING_MODE,t.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:t.NUMBER_RE+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},CSS_VARIABLE:{className:"attr",begin:/--[A-Za-z_][A-Za-z0-9_-]*/}}),pGe=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","optgroup","option","p","picture","q","quote","samp","section","select","source","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],mGe=["defs","g","marker","mask","pattern","svg","switch","symbol","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feFlood","feGaussianBlur","feImage","feMerge","feMorphology","feOffset","feSpecularLighting","feTile","feTurbulence","linearGradient","radialGradient","stop","circle","ellipse","image","line","path","polygon","polyline","rect","text","use","textPath","tspan","foreignObject","clipPath"],gGe=[...pGe,...mGe],yGe=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"].sort().reverse(),vGe=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context","hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"].sort().reverse(),xGe=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),bGe=["accent-color","align-content","align-items","align-self","alignment-baseline","all","anchor-name","animation","animation-composition","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-range","animation-range-end","animation-range-start","animation-timeline","animation-timing-function","appearance","aspect-ratio","backdrop-filter","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-position-x","background-position-y","background-repeat","background-size","baseline-shift","block-size","border","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-end-end-radius","border-end-start-radius","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-start-end-radius","border-start-start-radius","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-align","box-decoration-break","box-direction","box-flex","box-flex-group","box-lines","box-ordinal-group","box-orient","box-pack","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","color-scheme","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","contain-intrinsic-block-size","contain-intrinsic-height","contain-intrinsic-inline-size","contain-intrinsic-size","contain-intrinsic-width","container","container-name","container-type","content","content-visibility","counter-increment","counter-reset","counter-set","cue","cue-after","cue-before","cursor","cx","cy","direction","display","dominant-baseline","empty-cells","enable-background","field-sizing","fill","fill-opacity","fill-rule","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","flood-color","flood-opacity","flow","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-optical-sizing","font-palette","font-size","font-size-adjust","font-smooth","font-smoothing","font-stretch","font-style","font-synthesis","font-synthesis-position","font-synthesis-small-caps","font-synthesis-style","font-synthesis-weight","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-emoji","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","forced-color-adjust","gap","glyph-orientation-horizontal","glyph-orientation-vertical","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphenate-character","hyphenate-limit-chars","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","initial-letter","initial-letter-align","inline-size","inset","inset-area","inset-block","inset-block-end","inset-block-start","inset-inline","inset-inline-end","inset-inline-start","isolation","justify-content","justify-items","justify-self","kerning","left","letter-spacing","lighting-color","line-break","line-height","line-height-step","list-style","list-style-image","list-style-position","list-style-type","margin","margin-block","margin-block-end","margin-block-start","margin-bottom","margin-inline","margin-inline-end","margin-inline-start","margin-left","margin-right","margin-top","margin-trim","marker","marker-end","marker-mid","marker-start","marks","mask","mask-border","mask-border-mode","mask-border-outset","mask-border-repeat","mask-border-slice","mask-border-source","mask-border-width","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","masonry-auto-flow","math-depth","math-shift","math-style","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","offset","offset-anchor","offset-distance","offset-path","offset-position","offset-rotate","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-anchor","overflow-block","overflow-clip-margin","overflow-inline","overflow-wrap","overflow-x","overflow-y","overlay","overscroll-behavior","overscroll-behavior-block","overscroll-behavior-inline","overscroll-behavior-x","overscroll-behavior-y","padding","padding-block","padding-block-end","padding-block-start","padding-bottom","padding-inline","padding-inline-end","padding-inline-start","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","paint-order","pause","pause-after","pause-before","perspective","perspective-origin","place-content","place-items","place-self","pointer-events","position","position-anchor","position-visibility","print-color-adjust","quotes","r","resize","rest","rest-after","rest-before","right","rotate","row-gap","ruby-align","ruby-position","scale","scroll-behavior","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-stop","scroll-snap-type","scroll-timeline","scroll-timeline-axis","scroll-timeline-name","scrollbar-color","scrollbar-gutter","scrollbar-width","shape-image-threshold","shape-margin","shape-outside","shape-rendering","speak","speak-as","src","stop-color","stop-opacity","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","tab-size","table-layout","text-align","text-align-all","text-align-last","text-anchor","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-skip-ink","text-decoration-style","text-decoration-thickness","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-indent","text-justify","text-orientation","text-overflow","text-rendering","text-shadow","text-size-adjust","text-transform","text-underline-offset","text-underline-position","text-wrap","text-wrap-mode","text-wrap-style","timeline-scope","top","touch-action","transform","transform-box","transform-origin","transform-style","transition","transition-behavior","transition-delay","transition-duration","transition-property","transition-timing-function","translate","unicode-bidi","user-modify","user-select","vector-effect","vertical-align","view-timeline","view-timeline-axis","view-timeline-inset","view-timeline-name","view-transition-name","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","white-space","white-space-collapse","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","x","y","z-index","zoom"].sort().reverse();function Lee(t){let e=t.regex,r=dGe(t),n={begin:/-(webkit|moz|ms|o)-(?=[a-z])/},i="and or not only",a=/@-?\w[\w]*(-\w+)*/,s="[a-zA-Z-][a-zA-Z0-9_-]*",o=[t.APOS_STRING_MODE,t.QUOTE_STRING_MODE];return{name:"CSS",case_insensitive:!0,illegal:/[=|'\$]/,keywords:{keyframePosition:"from to"},classNameAliases:{keyframePosition:"selector-tag"},contains:[r.BLOCK_COMMENT,n,r.CSS_NUMBER_MODE,{className:"selector-id",begin:/#[A-Za-z0-9_-]+/,relevance:0},{className:"selector-class",begin:"\\."+s,relevance:0},r.ATTRIBUTE_SELECTOR_MODE,{className:"selector-pseudo",variants:[{begin:":("+vGe.join("|")+")"},{begin:":(:)?("+xGe.join("|")+")"}]},r.CSS_VARIABLE,{className:"attribute",begin:"\\b("+bGe.join("|")+")\\b"},{begin:/:/,end:/[;}{]/,contains:[r.BLOCK_COMMENT,r.HEXCOLOR,r.IMPORTANT,r.CSS_NUMBER_MODE,...o,{begin:/(url|data-uri)\(/,end:/\)/,relevance:0,keywords:{built_in:"url data-uri"},contains:[...o,{className:"string",begin:/[^)]/,endsWithParent:!0,excludeEnd:!0}]},r.FUNCTION_DISPATCH]},{begin:e.lookahead(/@/),end:"[{;]",relevance:0,illegal:/:/,contains:[{className:"keyword",begin:a},{begin:/\s/,endsWithParent:!0,excludeEnd:!0,relevance:0,keywords:{$pattern:/[a-z-]+/,keyword:i,attribute:yGe.join(" ")},contains:[{begin:/[a-z-]+(?=:)/,className:"attribute"},...o,r.CSS_NUMBER_MODE]}]},{className:"selector-tag",begin:"\\b("+gGe.join("|")+")\\b"}]}}function Ree(t){let e=t.regex,r=t.COMMENT("--","$"),n={scope:"string",variants:[{begin:/'/,end:/'/,contains:[{match:/''/}]}]},i={begin:/"/,end:/"/,contains:[{match:/""/}]},a=["true","false","unknown"],s=["double precision","large object","with timezone","without timezone"],o=["bigint","binary","blob","boolean","char","character","clob","date","dec","decfloat","decimal","float","int","integer","interval","nchar","nclob","national","numeric","real","row","smallint","time","timestamp","varchar","varying","varbinary"],l=["add","asc","collation","desc","final","first","last","view"],u=["abs","acos","all","allocate","alter","and","any","are","array","array_agg","array_max_cardinality","as","asensitive","asin","asymmetric","at","atan","atomic","authorization","avg","begin","begin_frame","begin_partition","between","bigint","binary","blob","boolean","both","by","call","called","cardinality","cascaded","case","cast","ceil","ceiling","char","char_length","character","character_length","check","classifier","clob","close","coalesce","collate","collect","column","commit","condition","connect","constraint","contains","convert","copy","corr","corresponding","cos","cosh","count","covar_pop","covar_samp","create","cross","cube","cume_dist","current","current_catalog","current_date","current_default_transform_group","current_path","current_role","current_row","current_schema","current_time","current_timestamp","current_path","current_role","current_transform_group_for_type","current_user","cursor","cycle","date","day","deallocate","dec","decimal","decfloat","declare","default","define","delete","dense_rank","deref","describe","deterministic","disconnect","distinct","double","drop","dynamic","each","element","else","empty","end","end_frame","end_partition","end-exec","equals","escape","every","except","exec","execute","exists","exp","external","extract","false","fetch","filter","first_value","float","floor","for","foreign","frame_row","free","from","full","function","fusion","get","global","grant","group","grouping","groups","having","hold","hour","identity","in","indicator","initial","inner","inout","insensitive","insert","int","integer","intersect","intersection","interval","into","is","join","json_array","json_arrayagg","json_exists","json_object","json_objectagg","json_query","json_table","json_table_primitive","json_value","lag","language","large","last_value","lateral","lead","leading","left","like","like_regex","listagg","ln","local","localtime","localtimestamp","log","log10","lower","match","match_number","match_recognize","matches","max","member","merge","method","min","minute","mod","modifies","module","month","multiset","national","natural","nchar","nclob","new","no","none","normalize","not","nth_value","ntile","null","nullif","numeric","octet_length","occurrences_regex","of","offset","old","omit","on","one","only","open","or","order","out","outer","over","overlaps","overlay","parameter","partition","pattern","per","percent","percent_rank","percentile_cont","percentile_disc","period","portion","position","position_regex","power","precedes","precision","prepare","primary","procedure","ptf","range","rank","reads","real","recursive","ref","references","referencing","regr_avgx","regr_avgy","regr_count","regr_intercept","regr_r2","regr_slope","regr_sxx","regr_sxy","regr_syy","release","result","return","returns","revoke","right","rollback","rollup","row","row_number","rows","running","savepoint","scope","scroll","search","second","seek","select","sensitive","session_user","set","show","similar","sin","sinh","skip","smallint","some","specific","specifictype","sql","sqlexception","sqlstate","sqlwarning","sqrt","start","static","stddev_pop","stddev_samp","submultiset","subset","substring","substring_regex","succeeds","sum","symmetric","system","system_time","system_user","table","tablesample","tan","tanh","then","time","timestamp","timezone_hour","timezone_minute","to","trailing","translate","translate_regex","translation","treat","trigger","trim","trim_array","true","truncate","uescape","union","unique","unknown","unnest","update","upper","user","using","value","values","value_of","var_pop","var_samp","varbinary","varchar","varying","versioning","when","whenever","where","width_bucket","window","with","within","without","year"],h=["abs","acos","array_agg","asin","atan","avg","cast","ceil","ceiling","coalesce","corr","cos","cosh","count","covar_pop","covar_samp","cume_dist","dense_rank","deref","element","exp","extract","first_value","floor","json_array","json_arrayagg","json_exists","json_object","json_objectagg","json_query","json_table","json_table_primitive","json_value","lag","last_value","lead","listagg","ln","log","log10","lower","max","min","mod","nth_value","ntile","nullif","percent_rank","percentile_cont","percentile_disc","position","position_regex","power","rank","regr_avgx","regr_avgy","regr_count","regr_intercept","regr_r2","regr_slope","regr_sxx","regr_sxy","regr_syy","row_number","sin","sinh","sqrt","stddev_pop","stddev_samp","substring","substring_regex","sum","tan","tanh","translate","translate_regex","treat","trim","trim_array","unnest","upper","value_of","var_pop","var_samp","width_bucket"],f=["current_catalog","current_date","current_default_transform_group","current_path","current_role","current_schema","current_transform_group_for_type","current_user","session_user","system_time","system_user","current_time","localtime","current_timestamp","localtimestamp"],d=["create table","insert into","primary key","foreign key","not null","alter table","add constraint","grouping sets","on overflow","character set","respect nulls","ignore nulls","nulls first","nulls last","depth first","breadth first"],p=h,m=[...u,...l].filter(T=>!h.includes(T)),g={scope:"variable",match:/@[a-z0-9][a-z0-9_]*/},y={scope:"operator",match:/[-+*/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?/,relevance:0},v={match:e.concat(/\b/,e.either(...p),/\s*\(/),relevance:0,keywords:{built_in:p}};function x(T){return e.concat(/\b/,e.either(...T.map(S=>S.replace(/\s+/,"\\s+"))),/\b/)}let k={scope:"keyword",match:x(d),relevance:0};function _(T,{exceptions:S,when:R}={}){let A=R;return S=S||[],T.map(I=>I.match(/\|\d+$/)||S.includes(I)?I:A(I)?`${I}|0`:I)}return{name:"SQL",case_insensitive:!0,illegal:/[{}]|<\//,keywords:{$pattern:/\b[\w\.]+/,keyword:_(m,{when:T=>T.length<3}),literal:a,type:o,built_in:f},contains:[{scope:"type",match:x(s)},k,v,g,n,i,t.C_NUMBER_MODE,t.C_BLOCK_COMMENT_MODE,r,y]}}Qn.registerLanguage("javascript",lN);Qn.registerLanguage("js",lN);Qn.registerLanguage("typescript",uN);Qn.registerLanguage("ts",uN);Qn.registerLanguage("python",cN);Qn.registerLanguage("py",cN);Qn.registerLanguage("rust",hN);Qn.registerLanguage("rs",hN);Qn.registerLanguage("go",kee);Qn.registerLanguage("json",Tee);Qn.registerLanguage("bash",Kk);Qn.registerLanguage("sh",Kk);Qn.registerLanguage("shell",Kk);Qn.registerLanguage("yaml",fN);Qn.registerLanguage("yml",fN);Qn.registerLanguage("markdown",dN);Qn.registerLanguage("md",dN);Qn.registerLanguage("java",Cee);Qn.registerLanguage("c",_ee);Qn.registerLanguage("cpp",Aee);Qn.registerLanguage("xml",pN);Qn.registerLanguage("html",pN);Qn.registerLanguage("css",Lee);Qn.registerLanguage("sql",Ree);function wGe(t){return String(t).trim().toLowerCase().replace(/[^\w一-鿿\- ]+/g,"").replace(/\s+/g,"-").replace(/-+/g,"-").replace(/^-|-$/g,"")||"section"}var Mee=0,Kg=new QI({html:!1,linkify:!0,typographer:!0,highlight(t,e){let r=(e||"").toLowerCase();if(r==="mermaid"){let n=`mermaid-${++Mee}`,i=Kg.utils.escapeHtml(t.trim());return`
    ${i}
    `}if(r&&Qn.getLanguage(r))try{return`
    ${Qn.highlight(t,{language:r,ignoreIllegals:!0}).value}
    `}catch{}return`
    ${Kg.utils.escapeHtml(t)}
    `}});Kg.use(f1,{level:[1,2,3],slugify:wGe,permalink:!1});Kg.use(Dee.default,{enabled:!0,label:!0,labelAfter:!0});Kg.use(Iee.default,{engine:aN,delimiter:"$",katexOptions:{throwOnError:!1,strict:!1,output:"html"}});function kGe(t){return t.replace(/]*?)\bsrc=(["'])([^"']+)\2([^>]*)>/gi,(e,r,n,i,a)=>{if(/^(https?:|data:|mdeye-asset:|blob:|file:)/i.test(i)||i.startsWith("#"))return e;let o=`mdeye-asset://local/${i.replace(/^\.\//,"").replace(/^\/+/,"")}`;return``})}function Nee(t){Mee=0;let e=Kg.render(t??"");return kGe(e)}function Oee(t){let e=/]*\bid=(["'])([^"']+)\2[^>]*>([\s\S]*?)<\/h\1>/gi,r=[],n;for(;n=e.exec(t);){let i=Number(n[1]),a=n[3],s=n[4].replace(/<[^>]+>/g,"").trim();s&&r.push({level:i,id:a,text:s})}return r}function mN(t){return/```\s*mermaid\b/i.test(t??"")}_T();ac();nc();iu();Il();Wo();Al();As();Hn();e$();v0();Nr();mF();Or();var MS="comm",NS="rule",OS="decl";var V2e="@import";var W2e="@namespace",Y2e="@keyframes";var X2e="@layer";var j2e=Math.abs,pm=String.fromCharCode;function PS(t){return t.trim()}function BS(t,e,r){return t.replace(e,r)}function zd(t,e){return t.charCodeAt(e)|0}function $d(t,e,r){return t.slice(e,r)}function Bl(t){return t.length}function K2e(t){return t.length}function xy(t,e){return e.push(t),t}var FS=1,by=1,Z2e=0,pu=0,Ea=0,ky="";function zS(t,e,r,n,i,a,s,o){return{value:t,root:e,parent:r,type:n,props:i,children:a,line:FS,column:by,length:s,return:"",siblings:o}}function Q2e(){return Ea}function J2e(){return Ea=pu>0?zd(ky,--pu):0,by--,Ea===10&&(by=1,FS--),Ea}function mu(){return Ea=pu2||wy(Ea)>3?"":" "}function nye(t,e){for(;--e&&mu()&&!(Ea<48||Ea>102||Ea>57&&Ea<65||Ea>70&&Ea<97););return $S(t,J5()+(e<6&&Kh()==32&&mu()==32))}function t$(t){for(;mu();)switch(Ea){case t:return pu;case 34:case 39:t!==34&&t!==39&&t$(Ea);break;case 40:t===41&&t$(t);break;case 92:mu();break}return pu}function iye(t,e){for(;mu()&&t+Ea!==57;)if(t+Ea===84&&Kh()===47)break;return"/*"+$S(e,pu-1)+"*"+pm(t===47?t:mu())}function aye(t){for(;!wy(Kh());)mu();return $S(t,pu)}function lye(t){return tye(qS("",null,null,null,[""],t=eye(t),0,[0],t))}function qS(t,e,r,n,i,a,s,o,l){for(var u=0,h=0,f=s,d=0,p=0,m=0,g=1,y=1,v=1,x=0,k=0,_="",T=i,S=a,R=n,A=_;y;)switch(m=k,k=mu()){case 40:m!=108&&zd(A,f-1)==58?(x++,A+="("):A+=GS(k);break;case 41:x--,A+=")";break;case 34:case 39:case 91:A+=GS(k);break;case 9:case 10:case 13:case 32:if(x>0){A+=pm(k);break}A+=rye(m);break;case 92:A+=nye(J5()-1,7);continue;case 47:switch(Kh()){case 42:case 47:xy(kst(iye(mu(),J5()),e,r,l),l),(wy(m||1)==5||wy(Kh()||1)==5)&&Bl(A)&&$d(A,-1,void 0)!==" "&&(A+=" ");break;default:A+="/"}break;case 123*g:o[u++]=Bl(A)*v;case 125*g:case 59:case 0:if(x>0&&k){A+=pm(k);break}switch(k){case 0:case 125:y=0;case 59+h:v==-1&&(A=BS(A,/\f/g,"")),p>0&&(Bl(A)-f||g===0)&&xy(p>32?oye(A+";",n,r,f-1,l):oye(BS(A," ","")+";",n,r,f-2,l),l);break;case 59:A+=";";default:if(xy(R=sye(A,e,r,u,h,i,o,_,T=[],S=[],f,a),a),k===123)if(h===0)qS(A,e,R,R,T,a,f,o,S);else{switch(d){case 99:if(zd(A,3)===110)break;case 108:if(zd(A,2)===97)break;default:h=0;case 100:case 109:case 115:}h?qS(t,R,R,n&&xy(sye(t,R,R,0,0,i,o,_,i,T=[],f,S),S),i,S,f,o,n?T:S):qS(A,R,R,R,[""],S,0,o,S)}}u=h=p=0,g=v=1,_=A="",f=s;break;case 58:f=1+Bl(A),p=m;default:if(g<1){if(k==123)--g;else if(k==125&&g++==0&&J2e()==125)continue}switch(A+=pm(k),k*g){case 38:v=h>0?1:(A+="\f",-1);break;case 44:if(x>0)break;o[u++]=(Bl(A)-1)*v,v=1;break;case 64:Kh()===45&&(A+=GS(mu())),d=Kh(),h=f=Bl(_=A+=aye(J5())),k++;break;case 45:m===45&&Bl(A)==2&&(g=0)}}return a}function sye(t,e,r,n,i,a,s,o,l,u,h,f){for(var d=i-1,p=i===0?a:[""],m=K2e(p),g=0,y=0,v=0;g0?p[x]+" "+k:BS(k,/&\f/g,p[x])))&&(l[v++]=_);return zS(t,e,r,i===0?NS:o,l,u,h,f)}function kst(t,e,r,n){return zS(t,e,r,MS,pm(Q2e()),$d(t,2,-2),0,n)}function oye(t,e,r,n,i){return zS(t,e,r,OS,$d(t,0,n),$d(t,n+1,-1),n,i)}function US(t,e){for(var r="",n=0;n/^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/.test(t),"detector"),eRt=b(async()=>{let{diagram:t}=await Promise.resolve().then(()=>(Sye(),Eye));return{id:ENe,diagram:t}},"loader"),tRt={id:ENe,detector:JLt,loader:eRt},rRt=tRt,SNe="flowchart",nRt=b((t,e)=>e?.flowchart?.defaultRenderer==="dagre-wrapper"||e?.flowchart?.defaultRenderer==="elk"?!1:/^\s*graph/.test(t),"detector"),iRt=b(async()=>{let{diagram:t}=await Promise.resolve().then(()=>(eC(),JS));return{id:SNe,diagram:t}},"loader"),aRt={id:SNe,detector:nRt,loader:iRt},sRt=aRt,CNe="flowchart-v2",oRt=b((t,e)=>e?.flowchart?.defaultRenderer==="dagre-d3"?!1:(e?.flowchart?.defaultRenderer==="elk"&&(e.layout="elk"),/^\s*graph/.test(t)&&e?.flowchart?.defaultRenderer==="dagre-wrapper"?!0:/^\s*flowchart/.test(t)),"detector"),lRt=b(async()=>{let{diagram:t}=await Promise.resolve().then(()=>(eC(),JS));return{id:CNe,diagram:t}},"loader"),uRt={id:CNe,detector:oRt,loader:lRt},cRt=uRt,_Ne="er",hRt=b(t=>/^\s*erDiagram/.test(t),"detector"),fRt=b(async()=>{let{diagram:t}=await Promise.resolve().then(()=>(Rye(),Lye));return{id:_Ne,diagram:t}},"loader"),dRt={id:_Ne,detector:hRt,loader:fRt},pRt=dRt,ANe="gitGraph",mRt=b(t=>/^\s*gitGraph/.test(t),"detector"),gRt=b(async()=>{let{diagram:t}=await Promise.resolve().then(()=>(kSe(),wSe));return{id:ANe,diagram:t}},"loader"),yRt={id:ANe,detector:mRt,loader:gRt},vRt=yRt,LNe="gantt",xRt=b(t=>/^\s*gantt/.test(t),"detector"),bRt=b(async()=>{let{diagram:t}=await Promise.resolve().then(()=>(qSe(),GSe));return{id:LNe,diagram:t}},"loader"),wRt={id:LNe,detector:xRt,loader:bRt},kRt=wRt,RNe="info",TRt=b(t=>/^\s*info/.test(t),"detector"),ERt=b(async()=>{let{diagram:t}=await Promise.resolve().then(()=>(HSe(),USe));return{id:RNe,diagram:t}},"loader"),SRt={id:RNe,detector:TRt,loader:ERt},DNe="pie",CRt=b(t=>/^\s*pie/.test(t),"detector"),_Rt=b(async()=>{let{diagram:t}=await Promise.resolve().then(()=>(XSe(),YSe));return{id:DNe,diagram:t}},"loader"),ARt={id:DNe,detector:CRt,loader:_Rt},INe="quadrantChart",LRt=b(t=>/^\s*quadrantChart/.test(t),"detector"),RRt=b(async()=>{let{diagram:t}=await Promise.resolve().then(()=>(hCe(),cCe));return{id:INe,diagram:t}},"loader"),DRt={id:INe,detector:LRt,loader:RRt},IRt=DRt,MNe="xychart",MRt=b(t=>/^\s*xychart-beta/.test(t),"detector"),NRt=b(async()=>{let{diagram:t}=await Promise.resolve().then(()=>(ICe(),DCe));return{id:MNe,diagram:t}},"loader"),ORt={id:MNe,detector:MRt,loader:NRt},PRt=ORt,NNe="requirement",BRt=b(t=>/^\s*requirement(Diagram)?/.test(t),"detector"),FRt=b(async()=>{let{diagram:t}=await Promise.resolve().then(()=>(OCe(),NCe));return{id:NNe,diagram:t}},"loader"),zRt={id:NNe,detector:BRt,loader:FRt},$Rt=zRt,ONe="sequence",GRt=b(t=>/^\s*sequenceDiagram/.test(t),"detector"),qRt=b(async()=>{let{diagram:t}=await Promise.resolve().then(()=>(ZCe(),KCe));return{id:ONe,diagram:t}},"loader"),URt={id:ONe,detector:GRt,loader:qRt},HRt=URt,PNe="class",VRt=b((t,e)=>e?.class?.defaultRenderer==="dagre-wrapper"?!1:/^\s*classDiagram/.test(t),"detector"),WRt=b(async()=>{let{diagram:t}=await Promise.resolve().then(()=>(r_e(),t_e));return{id:PNe,diagram:t}},"loader"),YRt={id:PNe,detector:VRt,loader:WRt},XRt=YRt,BNe="classDiagram",jRt=b((t,e)=>/^\s*classDiagram/.test(t)&&e?.class?.defaultRenderer==="dagre-wrapper"?!0:/^\s*classDiagram-v2/.test(t),"detector"),KRt=b(async()=>{let{diagram:t}=await Promise.resolve().then(()=>(i_e(),n_e));return{id:BNe,diagram:t}},"loader"),ZRt={id:BNe,detector:jRt,loader:KRt},QRt=ZRt,FNe="state",JRt=b((t,e)=>e?.state?.defaultRenderer==="dagre-wrapper"?!1:/^\s*stateDiagram/.test(t),"detector"),eDt=b(async()=>{let{diagram:t}=await Promise.resolve().then(()=>(O_e(),N_e));return{id:FNe,diagram:t}},"loader"),tDt={id:FNe,detector:JRt,loader:eDt},rDt=tDt,zNe="stateDiagram",nDt=b((t,e)=>!!(/^\s*stateDiagram-v2/.test(t)||/^\s*stateDiagram/.test(t)&&e?.state?.defaultRenderer==="dagre-wrapper"),"detector"),iDt=b(async()=>{let{diagram:t}=await Promise.resolve().then(()=>(B_e(),P_e));return{id:zNe,diagram:t}},"loader"),aDt={id:zNe,detector:nDt,loader:iDt},sDt=aDt,$Ne="journey",oDt=b(t=>/^\s*journey/.test(t),"detector"),lDt=b(async()=>{let{diagram:t}=await Promise.resolve().then(()=>(X_e(),Y_e));return{id:$Ne,diagram:t}},"loader"),uDt={id:$Ne,detector:oDt,loader:lDt},cDt=uDt,hDt=b((t,e,r)=>{he.debug(`rendering svg for syntax error +`);let n=cs(e),i=n.append("g");n.attr("viewBox","0 0 2412 512"),ei(n,100,512,!0),i.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"),i.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"),i.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"),i.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"),i.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"),i.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"),i.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"),i.append("text").attr("class","error-text").attr("x",1250).attr("y",400).attr("font-size","100px").style("text-anchor","middle").text(`mermaid version ${r}`)},"draw"),GNe={draw:hDt},fDt=GNe,dDt={db:{},renderer:GNe,parser:{parse:b(()=>{},"parse")}},pDt=dDt,qNe="flowchart-elk",mDt=b((t,e={})=>/^\s*flowchart-elk/.test(t)||/^\s*flowchart|graph/.test(t)&&e?.flowchart?.defaultRenderer==="elk"?(e.layout="elk",!0):!1,"detector"),gDt=b(async()=>{let{diagram:t}=await Promise.resolve().then(()=>(eC(),JS));return{id:qNe,diagram:t}},"loader"),yDt={id:qNe,detector:mDt,loader:gDt},vDt=yDt,UNe="timeline",xDt=b(t=>/^\s*timeline/.test(t),"detector"),bDt=b(async()=>{let{diagram:t}=await Promise.resolve().then(()=>(hAe(),cAe));return{id:UNe,diagram:t}},"loader"),wDt={id:UNe,detector:xDt,loader:bDt},kDt=wDt,HNe="mindmap",TDt=b(t=>/^\s*mindmap/.test(t),"detector"),EDt=b(async()=>{let{diagram:t}=await Promise.resolve().then(()=>($Ie(),zIe));return{id:HNe,diagram:t}},"loader"),SDt={id:HNe,detector:TDt,loader:EDt},CDt=SDt,VNe="kanban",_Dt=b(t=>/^\s*kanban/.test(t),"detector"),ADt=b(async()=>{let{diagram:t}=await Promise.resolve().then(()=>(UIe(),qIe));return{id:VNe,diagram:t}},"loader"),LDt={id:VNe,detector:_Dt,loader:ADt},RDt=LDt,WNe="sankey",DDt=b(t=>/^\s*sankey-beta/.test(t),"detector"),IDt=b(async()=>{let{diagram:t}=await Promise.resolve().then(()=>(pMe(),dMe));return{id:WNe,diagram:t}},"loader"),MDt={id:WNe,detector:DDt,loader:IDt},NDt=MDt,YNe="packet",ODt=b(t=>/^\s*packet-beta/.test(t),"detector"),PDt=b(async()=>{let{diagram:t}=await Promise.resolve().then(()=>(yMe(),gMe));return{id:YNe,diagram:t}},"loader"),BDt={id:YNe,detector:ODt,loader:PDt},XNe="radar",FDt=b(t=>/^\s*radar-beta/.test(t),"detector"),zDt=b(async()=>{let{diagram:t}=await Promise.resolve().then(()=>(SMe(),EMe));return{id:XNe,diagram:t}},"loader"),$Dt={id:XNe,detector:FDt,loader:zDt},jNe="block",GDt=b(t=>/^\s*block-beta/.test(t),"detector"),qDt=b(async()=>{let{diagram:t}=await Promise.resolve().then(()=>(rNe(),tNe));return{id:jNe,diagram:t}},"loader"),UDt={id:jNe,detector:GDt,loader:qDt},HDt=UDt,KNe="architecture",VDt=b(t=>/^\s*architecture/.test(t),"detector"),WDt=b(async()=>{let{diagram:t}=await Promise.resolve().then(()=>(xNe(),vNe));return{id:KNe,diagram:t}},"loader"),YDt={id:KNe,detector:VDt,loader:WDt},XDt=YDt,bNe=!1,xD=b(()=>{bNe||(bNe=!0,l3("error",pDt,t=>t.toLowerCase().trim()==="error"),l3("---",{db:{clear:b(()=>{},"clear")},styles:{},renderer:{draw:b(()=>{},"draw")},parser:{parse:b(()=>{throw new Error("Diagrams beginning with --- are not valid. If you were trying to use a YAML front-matter, please ensure that you've correctly opened and closed the YAML front-matter with un-indented `---` blocks")},"parse")},init:b(()=>null,"init")},t=>t.toLowerCase().trimStart().startsWith("---")),zN(rRt,RDt,QRt,XRt,pRt,kRt,SRt,ARt,$Rt,HRt,vDt,cRt,sRt,CDt,kDt,vRt,sDt,rDt,cDt,IRt,NDt,BDt,PRt,HDt,XDt,$Dt))},"addDiagrams"),jDt=b(async()=>{he.debug("Loading registered diagrams");let e=(await Promise.allSettled(Object.entries(w1).map(async([r,{detector:n,loader:i}])=>{if(i)try{mT(r)}catch{try{let{diagram:a,id:s}=await i();l3(s,a,n)}catch(a){throw he.error(`Failed to load external diagram with key ${r}. Removing from detectors.`),delete w1[r],a}}}))).filter(r=>r.status==="rejected");if(e.length>0){he.error(`Failed to load ${e.length} external diagrams`);for(let r of e)he.error(r);throw new Error(`Failed to load ${e.length} external diagrams`)}},"loadRegisteredDiagrams"),KDt="graphics-document document";function ZNe(t,e){t.attr("role",KDt),e!==""&&t.attr("aria-roledescription",e)}b(ZNe,"setA11yDiagramInfo");function QNe(t,e,r,n){if(t.insert!==void 0){if(r){let i=`chart-desc-${n}`;t.attr("aria-describedby",i),t.insert("desc",":first-child").attr("id",i).text(r)}if(e){let i=`chart-title-${n}`;t.attr("aria-labelledby",i),t.insert("title",":first-child").attr("id",i).text(e)}}}b(QNe,"addSVGa11yTitleDescription");var Eg,Tj=(Eg=class{constructor(e,r,n,i,a){this.type=e,this.text=r,this.db=n,this.parser=i,this.renderer=a}static async fromText(e,r={}){let n=Yr(),i=a3(e,n);e=phe(e)+` +`;try{mT(i)}catch{let u=Ote(i);if(!u)throw new FN(`Diagram ${i} not found.`);let{id:h,diagram:f}=await u();l3(h,f)}let{db:a,parser:s,renderer:o,init:l}=mT(i);return s.parser&&(s.parser.yy=a),a.clear?.(),l?.(n),r.title&&a.setDiagramTitle?.(r.title),await s.parse(e),new Eg(i,e,a,s,o)}async render(e,r){await this.renderer.draw(this.text,e,r,this)}getParser(){return this.parser}getType(){return this.type}},b(Eg,"Diagram"),Eg),wNe=[],ZDt=b(()=>{wNe.forEach(t=>{t()}),wNe=[]},"attachFunctions"),QDt=b(t=>t.replace(/^\s*%%(?!{)[^\n]+\n?/gm,"").trimStart(),"cleanupComments");function JNe(t){let e=t.match(BN);if(!e)return{text:t,metadata:{}};let r=m2(e[1],{schema:p2})??{};r=typeof r=="object"&&!Array.isArray(r)?r:{};let n={};return r.displayMode&&(n.displayMode=r.displayMode.toString()),r.title&&(n.title=r.title.toString()),r.config&&(n.config=r.config),{text:t.slice(e[0].length),metadata:n}}b(JNe,"extractFrontMatter");var JDt=b(t=>t.replace(/\r\n?/g,` +`).replace(/<(\w+)([^>]*)>/g,(e,r,n)=>"<"+r+n.replace(/="([^"]*)"/g,"='$1'")+">"),"cleanupText"),eIt=b(t=>{let{text:e,metadata:r}=JNe(t),{displayMode:n,title:i,config:a={}}=r;return n&&(a.gantt||(a.gantt={}),a.gantt.displayMode=n),{title:i,config:a,text:e}},"processFrontmatter"),tIt=b(t=>{let e=gr.detectInit(t)??{},r=gr.detectDirective(t,"wrap");return Array.isArray(r)?e.wrap=r.some(({type:n})=>n==="wrap"):r?.type==="wrap"&&(e.wrap=!0),{text:lhe(t),directive:e}},"processDirectives");function Sj(t){let e=JDt(t),r=eIt(e),n=tIt(r.text),i=ls(r.config,n.directive);return t=QDt(n.text),{code:t,title:r.title,config:i}}b(Sj,"preprocessDiagram");function eOe(t){let e=new TextEncoder().encode(t),r=Array.from(e,n=>String.fromCodePoint(n)).join("");return btoa(r)}b(eOe,"toBase64");var rIt=5e4,nIt="graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa",iIt="sandbox",aIt="loose",sIt="http://www.w3.org/2000/svg",oIt="http://www.w3.org/1999/xlink",lIt="http://www.w3.org/1999/xhtml",uIt="100%",cIt="100%",hIt="border:0;margin:0;",fIt="margin:0",dIt="allow-top-navigation-by-user-activation allow-popups",pIt='The "iframe" tag is not supported by your browser.',mIt=["foreignobject"],gIt=["dominant-baseline"];function Cj(t){let e=Sj(t);return s3(),Ute(e.config??{}),e}b(Cj,"processAndSetConfigs");async function tOe(t,e){xD();try{let{code:r,config:n}=Cj(t);return{diagramType:(await nOe(r)).type,config:n}}catch(r){if(e?.suppressErrors)return!1;throw r}}b(tOe,"parse");var kNe=b((t,e,r=[])=>` +.${t} ${e} { ${r.join(" !important; ")} !important; }`,"cssImportantStyles"),yIt=b((t,e=new Map)=>{let r="";if(t.themeCSS!==void 0&&(r+=` ${t.themeCSS}`),t.fontFamily!==void 0&&(r+=` :root { --mermaid-font-family: ${t.fontFamily}}`),t.altFontFamily!==void 0&&(r+=` -:root { --mermaid-alt-font-family: ${t.altFontFamily}}`),e instanceof Map){let s=t.htmlLabels??t.flowchart?.htmlLabels?["> *","span"]:["rect","polygon","ellipse","circle","path"];e.forEach(o=>{Vh(o.styles)||s.forEach(l=>{r+=KRe(o.id,l,o.styles)}),Vh(o.textStyles)||(r+=KRe(o.id,"tspan",(o?.textStyles||[]).map(l=>l.replace("color","fill"))))})}return r},"createCssStyles"),GAt=x((t,e,r,n)=>{let a=$At(t,r),i=kQ(e,a,t.themeVariables);return u_(Pme(`${n}{${i}}`),Bme)},"createUserStyles"),UAt=x((t="",e,r)=>{let n=t;return!r&&!e&&(n=n.replace(/marker-end="url\([\d+./:=?A-Za-z-]*?#/g,'marker-end="url(#')),n=oo(n),n=n.replace(/
    /g,"
    "),n},"cleanUpSvgCode"),qAt=x((t="",e)=>{let r=e?.viewBox?.baseVal?.height?e.viewBox.baseVal.height+"px":NAt,n=AIe(`${t}`);return``},"putIntoIFrame"),ZRe=x((t,e,r,n,a)=>{let i=t.append("div");i.attr("id",r),n&&i.attr("style",n);let s=i.append("svg").attr("id",e).attr("width","100%").attr("xmlns",LAt);return a&&s.attr("xmlns:xlink",a),s.append("g"),t},"appendDivSvgG");function fY(t,e){return t.append("iframe").attr("id",e).attr("style","width: 100%; height: 100%;").attr("sandbox","")}x(fY,"sandboxedIframe");var VAt=x((t,e,r,n)=>{t.getElementById(e)?.remove(),t.getElementById(r)?.remove(),t.getElementById(n)?.remove()},"removeExistingElements"),HAt=x(async function(t,e,r){zL();let n=pY(e);e=n.code;let a=wr();te.debug(a),e.length>(a?.maxTextSize??CAt)&&(e=SAt);let i="#"+t,s="i"+t,o="#"+s,l="d"+t,u="#"+l,h=x(()=>{let I=We(d?o:u).node();I&&"remove"in I&&I.remove()},"removeTempElements"),f=We("body"),d=a.securityLevel===_At,p=a.securityLevel===AAt,m=a.fontFamily;if(r!==void 0){if(r&&(r.innerHTML=""),d){let T=fY(We(r),s);f=We(T.nodes()[0].contentDocument.body),f.node().style.margin=0}else f=We(r);ZRe(f,t,l,`font-family: ${m}`,RAt)}else{if(VAt(document,t,l,s),d){let T=fY(We("body"),s);f=We(T.nodes()[0].contentDocument.body),f.node().style.margin=0}else f=We("body");ZRe(f,t,l)}let g,v;try{g=await hY.fromText(e,{title:n.title})}catch(T){if(a.suppressErrorRendering)throw h(),T;g=await hY.fromText("error"),v=T}let y=f.select(u).node(),b=g.type,w=y.firstChild,C=w.firstChild,k=g.renderer.getClasses?.(e,g),E=GAt(a,b,k,i),_=document.createElement("style");_.innerHTML=E,w.insertBefore(_,C);try{await g.renderer.draw(e,t,O3.version,g)}catch(T){throw a.suppressErrorRendering?h():O7t.draw(e,t,O3.version),T}let S=f.select(`${u} svg`),L=g.db.getAccTitle?.(),M=g.db.getAccDescription?.();DIe(b,S,L,M),f.select(`[id="${t}"]`).selectAll("foreignobject > *").attr("xmlns",IAt);let D=f.select(u).node().innerHTML;if(te.debug("config.arrowMarkerAbsolute",a.arrowMarkerAbsolute),D=UAt(D,d,Br(a.arrowMarkerAbsolute)),d){let T=f.select(u+" svg").node();D=qAt(D,T)}else p||(D=Df.sanitize(D,{ADD_TAGS:FAt,ADD_ATTR:zAt,HTML_INTEGRATION_POINTS:{foreignobject:!0}}));if(bAt(),v)throw v;return h(),{diagramType:b,svg:D,bindFunctions:g.db.bindFunctions}},"render");function RIe(t={}){let e=ra({},t);e?.fontFamily&&!e.themeVariables?.fontFamily&&(e.themeVariables||(e.themeVariables={}),e.themeVariables.fontFamily=e.fontFamily),pQ(e),e?.theme&&e.theme in Hu?e.themeVariables=Hu[e.theme].getThemeVariables(e.themeVariables):e&&(e.themeVariables=Hu.default.getThemeVariables(e.themeVariables));let r=typeof e=="object"?dQ(e):AD();AT(r.logLevel),zL()}x(RIe,"initialize");var IIe=x((t,e={})=>{let{code:r}=dY(t);return hY.fromText(r,e)},"getDiagramFromText");function DIe(t,e,r,n){CIe(e,t),SIe(e,r,n,e.attr("id"))}x(DIe,"addA11yInfo");var gg=Object.freeze({render:HAt,parse:LIe,getDiagramFromText:IIe,initialize:RIe,getConfig:wr,setConfig:LD,getSiteConfig:AD,updateSiteConfig:mQ,reset:x(()=>{qb()},"reset"),globalReset:x(()=>{qb(mp)},"globalReset"),defaultConfig:mp});AT(wr().logLevel);qb(wr());var WAt=x((t,e,r)=>{te.warn(t),DC(t)?(r&&r(t.str,t.hash),e.push({...t,message:t.str,error:t})):(r&&r(t),t instanceof Error&&e.push({str:t.message,message:t.message,hash:t.name,error:t}))},"handleError"),NIe=x(async function(t={querySelector:".mermaid"}){try{await YAt(t)}catch(e){if(DC(e)&&te.error(e.str),Ef.parseError&&Ef.parseError(e),!t.suppressErrors)throw te.error("Use the suppressErrors option to suppress these errors"),e}},"run"),YAt=x(async function({postRenderCallback:t,querySelector:e,nodes:r}={querySelector:".mermaid"}){let n=gg.getConfig();te.debug(`${t?"":"No "}Callback function found`);let a;if(r)a=r;else if(e)a=document.querySelectorAll(e);else throw new Error("Nodes and querySelector are both undefined");te.debug(`Found ${a.length} diagrams`),n?.startOnLoad!==void 0&&(te.debug("Start On Load: "+n?.startOnLoad),gg.updateSiteConfig({startOnLoad:n?.startOnLoad}));let i=new Wt.InitIDGenerator(n.deterministicIds,n.deterministicIDSeed),s,o=[];for(let l of Array.from(a)){if(te.info("Rendering diagram: "+l.id),l.getAttribute("data-processed"))continue;l.setAttribute("data-processed","true");let u=`mermaid-${i.next()}`;s=l.innerHTML,s=$C(Wt.entityDecode(s)).trim().replace(//gi,"
    ");let h=Wt.detectInit(s);h&&te.debug("Detected early reinit: ",h);try{let{svg:f,bindFunctions:d}=await BIe(u,s,l);l.innerHTML=f,t&&await t(u),d&&d(l)}catch(f){WAt(f,o,Ef.parseError)}}if(o.length>0)throw o[0]},"runThrowsErrors"),MIe=x(function(t){gg.initialize(t)},"initialize"),XAt=x(async function(t,e,r){te.warn("mermaid.init is deprecated. Please use run instead."),t&&MIe(t);let n={postRenderCallback:r,querySelector:".mermaid"};typeof e=="string"?n.querySelector=e:e&&(e instanceof HTMLElement?n.nodes=[e]:n.nodes=e),await NIe(n)},"init"),jAt=x(async(t,{lazyLoad:e=!0}={})=>{zL(),_D(...t),e===!1&&await yAt()},"registerExternalDiagrams"),OIe=x(function(){if(Ef.startOnLoad){let{startOnLoad:t}=gg.getConfig();t&&Ef.run().catch(e=>te.error("Mermaid failed to initialize",e))}},"contentLoaded");typeof document<"u"&&window.addEventListener("load",OIe,!1);var KAt=x(function(t){Ef.parseError=t},"setParseErrorHandler"),FL=[],cY=!1,PIe=x(async()=>{if(!cY){for(cY=!0;FL.length>0;){let t=FL.shift();if(t)try{await t()}catch(e){te.error("Error executing queue",e)}}cY=!1}},"executeQueue"),ZAt=x(async(t,e)=>new Promise((r,n)=>{let a=x(()=>new Promise((i,s)=>{gg.parse(t,e).then(o=>{i(o),r(o)},o=>{te.error("Error parsing",o),Ef.parseError?.(o),s(o),n(o)})}),"performCall");FL.push(a),PIe().catch(n)}),"parse"),BIe=x((t,e,r)=>new Promise((n,a)=>{let i=x(()=>new Promise((s,o)=>{gg.render(t,e,r).then(l=>{s(l),n(l)},l=>{te.error("Error parsing",l),Ef.parseError?.(l),o(l),a(l)})}),"performCall");FL.push(i),PIe().catch(a)}),"render"),Ef={startOnLoad:!0,mermaidAPI:gg,parse:ZAt,render:BIe,init:XAt,run:NIe,registerExternalDiagrams:jAt,registerLayoutLoaders:GB,initialize:MIe,parseError:void 0,contentLoaded:OIe,setParseErrorHandler:KAt,detectType:Ub,registerIconPacks:JT},ik=Ef;var zl=t=>document.querySelector(t),oa={path:null,baseDir:null,text:"",theme:"sepia",outlineOpen:!0,mermaidReady:!1,printPreparation:null};function Du(t){try{window.webkit?.messageHandlers?.mdeye?.postMessage(t)}catch(e){console.warn("bridge post failed",e)}}function yY(t){let e=["light","dark","sepia","green"].includes(t)?t:"sepia";oa.theme=e,document.documentElement.setAttribute("data-theme",e);let r=zl("#theme-select");r&&(r.value=e),oa.mermaidReady&&document.querySelector(".mermaid, .mermaid-block svg")&&UIe().catch(()=>{})}function QAt(t){oa.outlineOpen=t,zl("#outline")?.classList.toggle("hidden",!t)}function JAt(t){if(!t)return"MDEye";let e=t.split(/[/\\]/);return e[e.length-1]||t}function zIe(t){let e=zl("#outline");if(!e)return;if(!t.length){e.innerHTML='

    Outline

    No headings
    ';return}let r=t.map(n=>`
    ${$Ie(n.text)}`).join("");e.innerHTML=`

    Outline

    ${r}`,e.querySelectorAll("a").forEach(n=>{n.addEventListener("click",a=>{a.preventDefault();let i=document.getElementById(n.dataset.id);i&&(i.scrollIntoView({behavior:"smooth",block:"start"}),xY())})})}function $Ie(t){return String(t).replaceAll("&","&").replaceAll("<","<").replaceAll(">",">").replaceAll('"',""")}function xY(){let t=[...document.querySelectorAll("#outline a[data-id]")];if(!t.length)return;let e=t.map(a=>document.getElementById(a.dataset.id)).filter(Boolean),r=e[0],n=96;for(let a of e)a.getBoundingClientRect().top<=n&&(r=a);t.forEach(a=>{a.classList.toggle("active",a.dataset.id===r?.id)})}function e9t(){return oa.mermaidReady?ik:(ik.initialize(GIe()),window.mermaid=ik,oa.mermaidReady=!0,ik)}function GIe(){return{startOnLoad:!1,securityLevel:"strict",theme:oa.theme==="dark"?"dark":"default",fontFamily:"-apple-system, BlinkMacSystemFont, sans-serif"}}async function UIe(){let t=[...document.querySelectorAll(".mermaid-block .mermaid, pre.mermaid")];if(!t.length)return;let e;try{e=e9t()}catch(r){t.forEach(n=>{let a=n.closest(".mermaid-block")||n;a.innerHTML=`
    Mermaid failed: ${$Ie(String(r?.message||r))}
    `});return}e.initialize(GIe());try{await e.run({nodes:t,suppressErrors:!0})}catch(r){console.warn("mermaid.run error",r)}}async function gY({path:t,text:e}){let r=t===oa.path;oa.path=t,oa.text=e??"",oa.printPreparation=null;let n=JAt(t),a=zl("#doc-title");a&&(a.textContent=n),document.title=`${n} \xB7 MDEye`;let i=Cj(oa.text),s=zl("#content");if(!s)return;s.classList.remove("empty"),s.innerHTML=i,s.setAttribute("data-mdeye-path",t||""),s.setAttribute("data-mdeye-rendered","1"),s.setAttribute("data-mdeye-chars",String((e||"").length));let o=Sj(i);zIe(o),r||(s.scrollTop=0),requestAnimationFrame(xY),(lI(oa.text)||s.querySelector(".mermaid"))&&await UIe(),Du({type:"doc-shown",path:t||"",chars:(e||"").length,hasMermaid:lI(e||"")})}async function t9t(){return oa.printPreparation||(oa.printPreparation=(async()=>{document.fonts?.ready&&await Promise.race([document.fonts.ready,mY(2e3)]);let t=[...document.images];await Promise.all(t.map(async e=>{e.complete||await Promise.race([new Promise(r=>{e.addEventListener("load",r,{once:!0}),e.addEventListener("error",r,{once:!0})}),mY(5e3)]),typeof e.decode=="function"&&await Promise.race([e.decode().catch(()=>{}),mY(5e3)])})),await FIe(),await FIe(),Du({type:"print-ready"})})().catch(t=>{oa.printPreparation=null,Du({type:"error",message:`Print preparation failed: ${String(t?.message||t)}`})})),oa.printPreparation}function mY(t){return new Promise(e=>setTimeout(e,t))}function FIe(){return new Promise(t=>{let e=!1,r=()=>{e||(e=!0,t())};requestAnimationFrame(r),setTimeout(r,100)})}function r9t(){oa.path=null,oa.text="";let t=zl("#doc-title");t&&(t.textContent="MDEye"),document.title="MDEye";let e=zl("#content");e&&(e.classList.add("empty"),e.innerHTML='

    MDEye

    Open a Markdown file to start reading.

    \u2318O open \xB7 drag & drop \xB7 double-click .md
    Menu: MDEye \u2192 Set as Default Markdown App

    ',zIe([]))}function n9t(t){if(!(!t||typeof t!="object"))try{switch(t.type){case"doc":oa.baseDir=t.baseDir,console.info("mdeye: doc received",t.path,"chars=",(t.text||"").length),gY({path:t.path,text:t.text});break;case"file-changed":gY({path:t.path||oa.path,text:t.text});break;case"theme":yY(t.name);break;case"toggle-outline":vY();break;case"prepare-print":t9t();break;case"ping":Du({type:"pong",version:window.__mdeyeVersion||"unknown"});break;default:break}}catch(e){console.error("mdeye: handle failed",e),Du({type:"error",message:String(e?.message||e)})}}function vY(){QAt(!oa.outlineOpen),Du({type:"set-preference",key:"outlineOpen",value:oa.outlineOpen})}function a9t(){zl("#btn-outline")?.addEventListener("click",vY),zl("#btn-export-pdf")?.addEventListener("click",()=>{Du({type:"export-pdf"})}),zl("#theme-select")?.addEventListener("change",t=>{let e=t.target.value;yY(e),Du({type:"set-preference",key:"theme",value:e})}),zl("#content")?.addEventListener("scroll",()=>{xY()}),zl("#content")?.addEventListener("click",t=>{let e=t.target?.closest?.("a[href]");if(!e)return;let r=e.getAttribute("href")||"";r.startsWith("#")||/^(https?:|mailto:|tel:|data:)/i.test(r)||/^\.md$|(?:^|\/|\.)(?:md|markdown|mdx|mdown|mkd|mkdn|mdwn)$/i.test(r)&&(t.preventDefault(),Du({type:"open-md-link",href:r}))}),document.addEventListener("keydown",t=>{(t.metaKey||t.ctrlKey)&&t.key.toLowerCase()==="b"&&(t.preventDefault(),vY())})}window.__mdeye={handle:n9t};window.__mdeyeVersion="0.6.0";a9t();yY("sepia");r9t();Du({type:"ready",version:window.__mdeyeVersion});setTimeout(()=>Du({type:"ready",version:window.__mdeyeVersion}),50);window.webkit?.messageHandlers?.mdeye||(gY({path:"preview.md",text:`# MDEye preview +:root { --mermaid-alt-font-family: ${t.altFontFamily}}`),e instanceof Map){let s=t.htmlLabels??t.flowchart?.htmlLabels?["> *","span"]:["rect","polygon","ellipse","circle","path"];e.forEach(o=>{jh(o.styles)||s.forEach(l=>{r+=kNe(o.id,l,o.styles)}),jh(o.textStyles)||(r+=kNe(o.id,"tspan",(o?.textStyles||[]).map(l=>l.replace("color","fill"))))})}return r},"createCssStyles"),vIt=b((t,e,r,n)=>{let i=yIt(t,r),a=Xte(e,i,t.themeVariables);return US(lye(`${n}{${a}}`),uye)},"createUserStyles"),xIt=b((t="",e,r)=>{let n=t;return!r&&!e&&(n=n.replace(/marker-end="url\([\d+./:=?A-Za-z-]*?#/g,'marker-end="url(#')),n=Jo(n),n=n.replace(/
    /g,"
    "),n},"cleanUpSvgCode"),bIt=b((t="",e)=>{let r=e?.viewBox?.baseVal?.height?e.viewBox.baseVal.height+"px":cIt,n=eOe(`${t}`);return``},"putIntoIFrame"),TNe=b((t,e,r,n,i)=>{let a=t.append("div");a.attr("id",r),n&&a.attr("style",n);let s=a.append("svg").attr("id",e).attr("width","100%").attr("xmlns",sIt);return i&&s.attr("xmlns:xlink",i),s.append("g"),t},"appendDivSvgG");function Ej(t,e){return t.append("iframe").attr("id",e).attr("style","width: 100%; height: 100%;").attr("sandbox","")}b(Ej,"sandboxedIframe");var wIt=b((t,e,r,n)=>{t.getElementById(e)?.remove(),t.getElementById(r)?.remove(),t.getElementById(n)?.remove()},"removeExistingElements"),kIt=b(async function(t,e,r){xD();let n=Cj(e);e=n.code;let i=Yr();he.debug(i),e.length>(i?.maxTextSize??rIt)&&(e=nIt);let a="#"+t,s="i"+t,o="#"+s,l="d"+t,u="#"+l,h=b(()=>{let N=dt(d?o:u).node();N&&"remove"in N&&N.remove()},"removeTempElements"),f=dt("body"),d=i.securityLevel===iIt,p=i.securityLevel===aIt,m=i.fontFamily;if(r!==void 0){if(r&&(r.innerHTML=""),d){let C=Ej(dt(r),s);f=dt(C.nodes()[0].contentDocument.body),f.node().style.margin=0}else f=dt(r);TNe(f,t,l,`font-family: ${m}`,oIt)}else{if(wIt(document,t,l,s),d){let C=Ej(dt("body"),s);f=dt(C.nodes()[0].contentDocument.body),f.node().style.margin=0}else f=dt("body");TNe(f,t,l)}let g,y;try{g=await Tj.fromText(e,{title:n.title})}catch(C){if(i.suppressErrorRendering)throw h(),C;g=await Tj.fromText("error"),y=C}let v=f.select(u).node(),x=g.type,k=v.firstChild,_=k.firstChild,T=g.renderer.getClasses?.(e,g),S=vIt(i,x,T,a),R=document.createElement("style");R.innerHTML=S,k.insertBefore(R,_);try{await g.renderer.draw(e,t,Q5.version,g)}catch(C){throw i.suppressErrorRendering?h():fDt.draw(e,t,Q5.version),C}let A=f.select(`${u} svg`),I=g.db.getAccTitle?.(),P=g.db.getAccDescription?.();iOe(x,A,I,P),f.select(`[id="${t}"]`).selectAll("foreignobject > *").attr("xmlns",lIt);let O=f.select(u).node().innerHTML;if(he.debug("config.arrowMarkerAbsolute",i.arrowMarkerAbsolute),O=xIt(O,d,dn(i.arrowMarkerAbsolute)),d){let C=f.select(u+" svg").node();O=bIt(O,C)}else p||(O=Xf.sanitize(O,{ADD_TAGS:mIt,ADD_ATTR:gIt,HTML_INTEGRATION_POINTS:{foreignobject:!0}}));if(ZDt(),y)throw y;return h(),{diagramType:x,svg:O,bindFunctions:g.db.bindFunctions}},"render");function rOe(t={}){let e=Gi({},t);e?.fontFamily&&!e.themeVariables?.fontFamily&&(e.themeVariables||(e.themeVariables={}),e.themeVariables.fontFamily=e.fontFamily),$te(e),e?.theme&&e.theme in Xc?e.themeVariables=Xc[e.theme].getThemeVariables(e.themeVariables):e&&(e.themeVariables=Xc.default.getThemeVariables(e.themeVariables));let r=typeof e=="object"?zte(e):$N();lT(r.logLevel),xD()}b(rOe,"initialize");var nOe=b((t,e={})=>{let{code:r}=Sj(t);return Tj.fromText(r,e)},"getDiagramFromText");function iOe(t,e,r,n){ZNe(e,t),QNe(e,r,n,e.attr("id"))}b(iOe,"addA11yInfo");var Sg=Object.freeze({render:kIt,parse:tOe,getDiagramFromText:nOe,initialize:rOe,getConfig:Yr,setConfig:GN,getSiteConfig:$N,updateSiteConfig:Gte,reset:b(()=>{s3()},"reset"),globalReset:b(()=>{s3(E1)},"globalReset"),defaultConfig:E1});lT(Yr().logLevel);s3(Yr());var TIt=b((t,e,r)=>{he.warn(t),fE(t)?(r&&r(t.str,t.hash),e.push({...t,message:t.str,error:t})):(r&&r(t),t instanceof Error&&e.push({str:t.message,message:t.message,hash:t.name,error:t}))},"handleError"),aOe=b(async function(t={querySelector:".mermaid"}){try{await EIt(t)}catch(e){if(fE(e)&&he.error(e.str),Lf.parseError&&Lf.parseError(e),!t.suppressErrors)throw he.error("Use the suppressErrors option to suppress these errors"),e}},"run"),EIt=b(async function({postRenderCallback:t,querySelector:e,nodes:r}={querySelector:".mermaid"}){let n=Sg.getConfig();he.debug(`${t?"":"No "}Callback function found`);let i;if(r)i=r;else if(e)i=document.querySelectorAll(e);else throw new Error("Nodes and querySelector are both undefined");he.debug(`Found ${i.length} diagrams`),n?.startOnLoad!==void 0&&(he.debug("Start On Load: "+n?.startOnLoad),Sg.updateSiteConfig({startOnLoad:n?.startOnLoad}));let a=new gr.InitIDGenerator(n.deterministicIds,n.deterministicIDSeed),s,o=[];for(let l of Array.from(i)){if(he.info("Rendering diagram: "+l.id),l.getAttribute("data-processed"))continue;l.setAttribute("data-processed","true");let u=`mermaid-${a.next()}`;s=l.innerHTML,s=bE(gr.entityDecode(s)).trim().replace(//gi,"
    ");let h=gr.detectInit(s);h&&he.debug("Detected early reinit: ",h);try{let{svg:f,bindFunctions:d}=await uOe(u,s,l);l.innerHTML=f,t&&await t(u),d&&d(l)}catch(f){TIt(f,o,Lf.parseError)}}if(o.length>0)throw o[0]},"runThrowsErrors"),sOe=b(function(t){Sg.initialize(t)},"initialize"),SIt=b(async function(t,e,r){he.warn("mermaid.init is deprecated. Please use run instead."),t&&sOe(t);let n={postRenderCallback:r,querySelector:".mermaid"};typeof e=="string"?n.querySelector=e:e&&(e instanceof HTMLElement?n.nodes=[e]:n.nodes=e),await aOe(n)},"init"),CIt=b(async(t,{lazyLoad:e=!0}={})=>{xD(),zN(...t),e===!1&&await jDt()},"registerExternalDiagrams"),oOe=b(function(){if(Lf.startOnLoad){let{startOnLoad:t}=Sg.getConfig();t&&Lf.run().catch(e=>he.error("Mermaid failed to initialize",e))}},"contentLoaded");typeof document<"u"&&window.addEventListener("load",oOe,!1);var _It=b(function(t){Lf.parseError=t},"setParseErrorHandler"),vD=[],kj=!1,lOe=b(async()=>{if(!kj){for(kj=!0;vD.length>0;){let t=vD.shift();if(t)try{await t()}catch(e){he.error("Error executing queue",e)}}kj=!1}},"executeQueue"),AIt=b(async(t,e)=>new Promise((r,n)=>{let i=b(()=>new Promise((a,s)=>{Sg.parse(t,e).then(o=>{a(o),r(o)},o=>{he.error("Error parsing",o),Lf.parseError?.(o),s(o),n(o)})}),"performCall");vD.push(i),lOe().catch(n)}),"parse"),uOe=b((t,e,r)=>new Promise((n,i)=>{let a=b(()=>new Promise((s,o)=>{Sg.render(t,e,r).then(l=>{s(l),n(l)},l=>{he.error("Error parsing",l),Lf.parseError?.(l),o(l),i(l)})}),"performCall");vD.push(a),lOe().catch(i)}),"render"),Lf={startOnLoad:!0,mermaidAPI:Sg,parse:AIt,render:uOe,init:SIt,run:aOe,registerExternalDiagrams:CIt,registerLayoutLoaders:Jz,initialize:sOe,parseError:void 0,contentLoaded:oOe,setParseErrorHandler:_It,detectType:a3,registerIconPacks:MT},kw=Lf;var Bu=t=>document.querySelector(t),Ln={path:null,baseDir:null,text:"",theme:"sepia",outlineOpen:!0,mermaidReady:!1,printPreparation:null,fontSizeScale:1,contentMaxWidth:672,findOpen:!1};function Dc(t){try{window.webkit?.messageHandlers?.mdeye?.postMessage(t)}catch(e){console.warn("bridge post failed",e)}}function Rj(t){let e=["light","dark","sepia","green"].includes(t)?t:"sepia";Ln.theme=e,document.documentElement.setAttribute("data-theme",e);let r=Bu("#theme-select");r&&(r.value=e),Ln.mermaidReady&&document.querySelector(".mermaid, .mermaid-block svg")&&gOe().catch(()=>{})}function LIt(t){Ln.outlineOpen=t,Bu("#outline")?.classList.toggle("hidden",!t)}function cOe(t,e,r){return Math.min(r,Math.max(e,t))}function fOe(){let t=document.documentElement;t.style.setProperty("--font-scale",String(Ln.fontSizeScale)),t.style.setProperty("--content-max-width-px",`${Ln.contentMaxWidth}px`)}function RIt(t,e="info"){if(!t)return;let r=document.querySelector(".mdeye-toast");r&&r.remove();let n=document.createElement("div");n.className=`mdeye-toast ${e==="warn"?"warn":"info"}`,n.textContent=t,document.body.appendChild(n),setTimeout(()=>n.remove(),3e3)}function DIt(t){if(!t)return"MDEye";let e=t.split(/[/\\]/);return e[e.length-1]||t}function dOe(t){let e=Bu("#outline");if(!e)return;if(!t.length){e.innerHTML='

    Outline

    No headings
    ';return}let r=t.map(n=>`${pOe(n.text)}`).join("");e.innerHTML=`

    Outline

    ${r}`,e.querySelectorAll("a").forEach(n=>{n.addEventListener("click",i=>{i.preventDefault();let a=document.getElementById(n.dataset.id);a&&(a.scrollIntoView({behavior:"smooth",block:"start"}),Dj())})})}function pOe(t){return String(t).replaceAll("&","&").replaceAll("<","<").replaceAll(">",">").replaceAll('"',""")}function Dj(){let t=[...document.querySelectorAll("#outline a[data-id]")];if(!t.length)return;let e=t.map(i=>document.getElementById(i.dataset.id)).filter(Boolean),r=e[0],n=96;for(let i of e)i.getBoundingClientRect().top<=n&&(r=i);t.forEach(i=>{i.classList.toggle("active",i.dataset.id===r?.id)})}function IIt(){return Ln.mermaidReady?kw:(kw.initialize(mOe()),window.mermaid=kw,Ln.mermaidReady=!0,kw)}function mOe(){return{startOnLoad:!1,securityLevel:"strict",theme:Ln.theme==="dark"?"dark":"default",fontFamily:"-apple-system, BlinkMacSystemFont, sans-serif"}}async function gOe(){let t=[...document.querySelectorAll(".mermaid-block .mermaid, pre.mermaid")];if(!t.length)return;let e;try{e=IIt()}catch(r){t.forEach(n=>{let i=n.closest(".mermaid-block")||n;i.innerHTML=`
    Mermaid failed: ${pOe(String(r?.message||r))}
    `});return}e.initialize(mOe());try{await e.run({nodes:t,suppressErrors:!0})}catch(r){console.warn("mermaid.run error",r)}}async function Aj({path:t,text:e}){let r=t===Ln.path;Ln.path=t,Ln.text=e??"",Ln.printPreparation=null;let n=DIt(t),i=Bu("#doc-title");i&&(i.textContent=n),document.title=`${n} \xB7 MDEye`;let a=Nee(Ln.text),s=Bu("#content");if(!s)return;s.classList.remove("empty"),s.innerHTML=a,s.setAttribute("data-mdeye-path",t||""),s.setAttribute("data-mdeye-rendered","1"),s.setAttribute("data-mdeye-chars",String((e||"").length));let o=Oee(a);dOe(o),r||(s.scrollTop=0),requestAnimationFrame(Dj),(mN(Ln.text)||s.querySelector(".mermaid"))&&await gOe(),Dc({type:"doc-shown",path:t||"",chars:(e||"").length,hasMermaid:mN(e||""),hasMath:!!s.querySelector(".katex")})}async function MIt(){return Ln.printPreparation||(Ln.printPreparation=(async()=>{document.fonts?.ready&&await Promise.race([document.fonts.ready,_j(2e3)]);let t=[...document.images];await Promise.all(t.map(async e=>{e.complete||await Promise.race([new Promise(r=>{e.addEventListener("load",r,{once:!0}),e.addEventListener("error",r,{once:!0})}),_j(5e3)]),typeof e.decode=="function"&&await Promise.race([e.decode().catch(()=>{}),_j(5e3)])})),await hOe(),await hOe(),Dc({type:"print-ready"})})().catch(t=>{Ln.printPreparation=null,Dc({type:"error",message:`Print preparation failed: ${String(t?.message||t)}`})})),Ln.printPreparation}function _j(t){return new Promise(e=>setTimeout(e,t))}function hOe(){return new Promise(t=>{let e=!1,r=()=>{e||(e=!0,t())};requestAnimationFrame(r),setTimeout(r,100)})}function NIt(){Ln.path=null,Ln.text="";let t=Bu("#doc-title");t&&(t.textContent="MDEye"),document.title="MDEye";let e=Bu("#content");e&&(e.classList.add("empty"),e.innerHTML='

    MDEye

    Open a Markdown file to start reading.

    \u2318O open \xB7 drag & drop \xB7 double-click .md
    Menu: MDEye \u2192 Set as Default Markdown App

    ',dOe([]))}function OIt(t){if(!(!t||typeof t!="object"))try{switch(t.type){case"doc":Ln.baseDir=t.baseDir,console.info("mdeye: doc received",t.path,"chars=",(t.text||"").length),Aj({path:t.path,text:t.text});break;case"file-changed":Aj({path:t.path||Ln.path,text:t.text});break;case"theme":Rj(t.name);break;case"toggle-outline":Lj();break;case"prepare-print":MIt();break;case"apply-prefs":typeof t.fontSizeScale=="number"&&(Ln.fontSizeScale=cOe(t.fontSizeScale,.85,2)),typeof t.contentMaxWidth=="number"&&(Ln.contentMaxWidth=cOe(t.contentMaxWidth|0,600,1100)),fOe();break;case"toast":RIt(t.message||"",t.level||"info");break;case"ping":Dc({type:"pong",version:window.__mdeyeVersion||"unknown"});break;default:break}}catch(e){console.error("mdeye: handle failed",e),Dc({type:"error",message:String(e?.message||e)})}}function Lj(){LIt(!Ln.outlineOpen),Dc({type:"set-preference",key:"outlineOpen",value:Ln.outlineOpen})}function PIt(){Bu("#btn-outline")?.addEventListener("click",Lj),Bu("#btn-export-pdf")?.addEventListener("click",()=>{Dc({type:"export-pdf"})}),Bu("#theme-select")?.addEventListener("change",t=>{let e=t.target.value;Rj(e),Dc({type:"set-preference",key:"theme",value:e})}),Bu("#content")?.addEventListener("scroll",()=>{Dj()}),Bu("#content")?.addEventListener("click",t=>{let e=t.target?.closest?.("a[href]");if(!e)return;let r=e.getAttribute("href")||"";r.startsWith("#")||/^(https?:|mailto:|tel:|data:)/i.test(r)||/^\.md$|(?:^|\/|\.)(?:md|markdown|mdx|mdown|mkd|mkdn|mdwn)$/i.test(r)&&(t.preventDefault(),Dc({type:"open-md-link",href:r}))}),document.addEventListener("keydown",t=>{(t.metaKey||t.ctrlKey)&&t.key.toLowerCase()==="b"&&(t.preventDefault(),Lj())}),BIt()}function BIt(){let t=document.createElement("div");t.id="find-bar",t.className="find-bar hidden",t.innerHTML=` + + + + + + `,document.body.appendChild(t);let e=t.querySelector("#find-input"),r=t.querySelector("#find-case"),n=[],i=-1;function a(){document.querySelectorAll("mark.mdeye-find").forEach(d=>{let p=d.parentNode;p.replaceChild(document.createTextNode(d.textContent),d),p.normalize?.()}),n=[],i=-1}function s(d){if(a(),!d)return;let p=document.getElementById("content");if(!p)return;let m=r.checked?"g":"gi",g=new RegExp(d.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),m),y=document.createTreeWalker(p,NodeFilter.SHOW_TEXT,{acceptNode(x){if(!x.nodeValue.trim())return NodeFilter.FILTER_REJECT;let k=x.parentElement;return k&&k.closest("script, style, mark.mdeye-find")?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT}}),v=[];for(;y.nextNode();)v.push(y.currentNode);for(let x of v){let k=x.nodeValue,_=0,T,S=document.createDocumentFragment();for(;T=g.exec(k);){T.index>_&&S.appendChild(document.createTextNode(k.slice(_,T.index)));let R=document.createElement("mark");R.className="mdeye-find",R.textContent=T[0],S.appendChild(R),n.push(R),_=T.index+T[0].length,T.index===g.lastIndex&&g.lastIndex++}_&&(S.appendChild(document.createTextNode(k.slice(_))),x.parentNode.replaceChild(S,x))}i=n.length?0:-1,o()}function o(){n.forEach((d,p)=>d.classList.toggle("current",p===i)),n[i]&&n[i].scrollIntoView({block:"center",behavior:"smooth"})}function l(){n.length&&(i=(i+1)%n.length,o())}function u(){n.length&&(i=(i-1+n.length)%n.length,o())}function h(){Ln.findOpen=!0,t.classList.remove("hidden"),e.focus(),e.select()}function f(){Ln.findOpen=!1,t.classList.add("hidden"),a(),e.value=""}t.querySelector("#find-next").addEventListener("click",l),t.querySelector("#find-prev").addEventListener("click",u),t.querySelector("#find-close").addEventListener("click",f),e.addEventListener("input",()=>s(e.value)),r.addEventListener("change",()=>s(e.value)),document.addEventListener("keydown",d=>{if(Ln.findOpen&&d.key==="Escape"){d.preventDefault(),f();return}if(!(d.metaKey||d.ctrlKey))return;let m=d.key.toLowerCase();m==="f"?(d.preventDefault(),h()):Ln.findOpen&&m==="g"&&(d.preventDefault(),d.shiftKey?u():l())})}window.__mdeye={handle:OIt};window.__mdeyeVersion="0.7.0";PIt();Rj("sepia");fOe();NIt();Dc({type:"ready",version:window.__mdeyeVersion});setTimeout(()=>Dc({type:"ready",version:window.__mdeyeVersion}),50);window.webkit?.messageHandlers?.mdeye||(Aj({path:"preview.md",text:`# MDEye preview Browser preview of the **IIFE** full pack. @@ -2724,7 +2986,7 @@ dompurify/dist/purify.es.mjs: mermaid/dist/chunks/mermaid.core/chunk-6JRP7KZX.mjs: (*! Bundled license information: - + js-yaml/dist/js-yaml.mjs: (*! js-yaml 4.1.0 https://github.com/nodeca/js-yaml @license MIT *) *) @@ -2760,7 +3022,7 @@ cytoscape/dist/cytoscape.esm.mjs: *) (*! Event object based on jQuery events, MIT license - + https://jquery.org/license/ https://tldrlegal.com/license/mit-license https://github.com/jquery/jquery/blob/master/src/event.js diff --git a/App/Resources/reader/fonts/KaTeX_AMS-Regular.woff2 b/App/Resources/reader/fonts/KaTeX_AMS-Regular.woff2 new file mode 100644 index 0000000..0acaaff Binary files /dev/null and b/App/Resources/reader/fonts/KaTeX_AMS-Regular.woff2 differ diff --git a/App/Resources/reader/fonts/KaTeX_Caligraphic-Bold.woff2 b/App/Resources/reader/fonts/KaTeX_Caligraphic-Bold.woff2 new file mode 100644 index 0000000..f390922 Binary files /dev/null and b/App/Resources/reader/fonts/KaTeX_Caligraphic-Bold.woff2 differ diff --git a/App/Resources/reader/fonts/KaTeX_Caligraphic-Regular.woff2 b/App/Resources/reader/fonts/KaTeX_Caligraphic-Regular.woff2 new file mode 100644 index 0000000..75344a1 Binary files /dev/null and b/App/Resources/reader/fonts/KaTeX_Caligraphic-Regular.woff2 differ diff --git a/App/Resources/reader/fonts/KaTeX_Fraktur-Bold.woff2 b/App/Resources/reader/fonts/KaTeX_Fraktur-Bold.woff2 new file mode 100644 index 0000000..395f28b Binary files /dev/null and b/App/Resources/reader/fonts/KaTeX_Fraktur-Bold.woff2 differ diff --git a/App/Resources/reader/fonts/KaTeX_Fraktur-Regular.woff2 b/App/Resources/reader/fonts/KaTeX_Fraktur-Regular.woff2 new file mode 100644 index 0000000..735f694 Binary files /dev/null and b/App/Resources/reader/fonts/KaTeX_Fraktur-Regular.woff2 differ diff --git a/App/Resources/reader/fonts/KaTeX_Main-Bold.woff2 b/App/Resources/reader/fonts/KaTeX_Main-Bold.woff2 new file mode 100644 index 0000000..ab2ad21 Binary files /dev/null and b/App/Resources/reader/fonts/KaTeX_Main-Bold.woff2 differ diff --git a/App/Resources/reader/fonts/KaTeX_Main-BoldItalic.woff2 b/App/Resources/reader/fonts/KaTeX_Main-BoldItalic.woff2 new file mode 100644 index 0000000..5931794 Binary files /dev/null and b/App/Resources/reader/fonts/KaTeX_Main-BoldItalic.woff2 differ diff --git a/App/Resources/reader/fonts/KaTeX_Main-Italic.woff2 b/App/Resources/reader/fonts/KaTeX_Main-Italic.woff2 new file mode 100644 index 0000000..b50920e Binary files /dev/null and b/App/Resources/reader/fonts/KaTeX_Main-Italic.woff2 differ diff --git a/App/Resources/reader/fonts/KaTeX_Main-Regular.woff2 b/App/Resources/reader/fonts/KaTeX_Main-Regular.woff2 new file mode 100644 index 0000000..eb24a7b Binary files /dev/null and b/App/Resources/reader/fonts/KaTeX_Main-Regular.woff2 differ diff --git a/App/Resources/reader/fonts/KaTeX_Math-BoldItalic.woff2 b/App/Resources/reader/fonts/KaTeX_Math-BoldItalic.woff2 new file mode 100644 index 0000000..2965702 Binary files /dev/null and b/App/Resources/reader/fonts/KaTeX_Math-BoldItalic.woff2 differ diff --git a/App/Resources/reader/fonts/KaTeX_Math-Italic.woff2 b/App/Resources/reader/fonts/KaTeX_Math-Italic.woff2 new file mode 100644 index 0000000..215c143 Binary files /dev/null and b/App/Resources/reader/fonts/KaTeX_Math-Italic.woff2 differ diff --git a/App/Resources/reader/fonts/KaTeX_SansSerif-Bold.woff2 b/App/Resources/reader/fonts/KaTeX_SansSerif-Bold.woff2 new file mode 100644 index 0000000..cfaa3bd Binary files /dev/null and b/App/Resources/reader/fonts/KaTeX_SansSerif-Bold.woff2 differ diff --git a/App/Resources/reader/fonts/KaTeX_SansSerif-Italic.woff2 b/App/Resources/reader/fonts/KaTeX_SansSerif-Italic.woff2 new file mode 100644 index 0000000..349c06d Binary files /dev/null and b/App/Resources/reader/fonts/KaTeX_SansSerif-Italic.woff2 differ diff --git a/App/Resources/reader/fonts/KaTeX_SansSerif-Regular.woff2 b/App/Resources/reader/fonts/KaTeX_SansSerif-Regular.woff2 new file mode 100644 index 0000000..a90eea8 Binary files /dev/null and b/App/Resources/reader/fonts/KaTeX_SansSerif-Regular.woff2 differ diff --git a/App/Resources/reader/fonts/KaTeX_Script-Regular.woff2 b/App/Resources/reader/fonts/KaTeX_Script-Regular.woff2 new file mode 100644 index 0000000..b3048fc Binary files /dev/null and b/App/Resources/reader/fonts/KaTeX_Script-Regular.woff2 differ diff --git a/App/Resources/reader/fonts/KaTeX_Size1-Regular.woff2 b/App/Resources/reader/fonts/KaTeX_Size1-Regular.woff2 new file mode 100644 index 0000000..c5a8462 Binary files /dev/null and b/App/Resources/reader/fonts/KaTeX_Size1-Regular.woff2 differ diff --git a/App/Resources/reader/fonts/KaTeX_Size2-Regular.woff2 b/App/Resources/reader/fonts/KaTeX_Size2-Regular.woff2 new file mode 100644 index 0000000..e1bccfe Binary files /dev/null and b/App/Resources/reader/fonts/KaTeX_Size2-Regular.woff2 differ diff --git a/App/Resources/reader/fonts/KaTeX_Size3-Regular.woff2 b/App/Resources/reader/fonts/KaTeX_Size3-Regular.woff2 new file mode 100644 index 0000000..249a286 Binary files /dev/null and b/App/Resources/reader/fonts/KaTeX_Size3-Regular.woff2 differ diff --git a/App/Resources/reader/fonts/KaTeX_Size4-Regular.woff2 b/App/Resources/reader/fonts/KaTeX_Size4-Regular.woff2 new file mode 100644 index 0000000..680c130 Binary files /dev/null and b/App/Resources/reader/fonts/KaTeX_Size4-Regular.woff2 differ diff --git a/App/Resources/reader/fonts/KaTeX_Typewriter-Regular.woff2 b/App/Resources/reader/fonts/KaTeX_Typewriter-Regular.woff2 new file mode 100644 index 0000000..771f1af Binary files /dev/null and b/App/Resources/reader/fonts/KaTeX_Typewriter-Regular.woff2 differ diff --git a/App/Resources/reader/index.html b/App/Resources/reader/index.html index 3f12d8a..57ee85a 100644 --- a/App/Resources/reader/index.html +++ b/App/Resources/reader/index.html @@ -12,6 +12,8 @@ + +
    diff --git a/App/Resources/reader/styles/katex.min.css b/App/Resources/reader/styles/katex.min.css new file mode 100644 index 0000000..91f78ed --- /dev/null +++ b/App/Resources/reader/styles/katex.min.css @@ -0,0 +1 @@ +@font-face{font-display:block;font-family:KaTeX_AMS;font-style:normal;font-weight:400;src:url(fonts/KaTeX_AMS-Regular.woff2) format("woff2") format("woff") format("truetype")}@font-face{font-display:block;font-family:KaTeX_Caligraphic;font-style:normal;font-weight:700;src:url(fonts/KaTeX_Caligraphic-Bold.woff2) format("woff2") format("woff") format("truetype")}@font-face{font-display:block;font-family:KaTeX_Caligraphic;font-style:normal;font-weight:400;src:url(fonts/KaTeX_Caligraphic-Regular.woff2) format("woff2") format("woff") format("truetype")}@font-face{font-display:block;font-family:KaTeX_Fraktur;font-style:normal;font-weight:700;src:url(fonts/KaTeX_Fraktur-Bold.woff2) format("woff2") format("woff") format("truetype")}@font-face{font-display:block;font-family:KaTeX_Fraktur;font-style:normal;font-weight:400;src:url(fonts/KaTeX_Fraktur-Regular.woff2) format("woff2") format("woff") format("truetype")}@font-face{font-display:block;font-family:KaTeX_Main;font-style:normal;font-weight:700;src:url(fonts/KaTeX_Main-Bold.woff2) format("woff2") format("woff") format("truetype")}@font-face{font-display:block;font-family:KaTeX_Main;font-style:italic;font-weight:700;src:url(fonts/KaTeX_Main-BoldItalic.woff2) format("woff2") format("woff") format("truetype")}@font-face{font-display:block;font-family:KaTeX_Main;font-style:italic;font-weight:400;src:url(fonts/KaTeX_Main-Italic.woff2) format("woff2") format("woff") format("truetype")}@font-face{font-display:block;font-family:KaTeX_Main;font-style:normal;font-weight:400;src:url(fonts/KaTeX_Main-Regular.woff2) format("woff2") format("woff") format("truetype")}@font-face{font-display:block;font-family:KaTeX_Math;font-style:italic;font-weight:700;src:url(fonts/KaTeX_Math-BoldItalic.woff2) format("woff2") format("woff") format("truetype")}@font-face{font-display:block;font-family:KaTeX_Math;font-style:italic;font-weight:400;src:url(fonts/KaTeX_Math-Italic.woff2) format("woff2") format("woff") format("truetype")}@font-face{font-display:block;font-family:"KaTeX_SansSerif";font-style:normal;font-weight:700;src:url(fonts/KaTeX_SansSerif-Bold.woff2) format("woff2") format("woff") format("truetype")}@font-face{font-display:block;font-family:"KaTeX_SansSerif";font-style:italic;font-weight:400;src:url(fonts/KaTeX_SansSerif-Italic.woff2) format("woff2") format("woff") format("truetype")}@font-face{font-display:block;font-family:"KaTeX_SansSerif";font-style:normal;font-weight:400;src:url(fonts/KaTeX_SansSerif-Regular.woff2) format("woff2") format("woff") format("truetype")}@font-face{font-display:block;font-family:KaTeX_Script;font-style:normal;font-weight:400;src:url(fonts/KaTeX_Script-Regular.woff2) format("woff2") format("woff") format("truetype")}@font-face{font-display:block;font-family:KaTeX_Size1;font-style:normal;font-weight:400;src:url(fonts/KaTeX_Size1-Regular.woff2) format("woff2") format("woff") format("truetype")}@font-face{font-display:block;font-family:KaTeX_Size2;font-style:normal;font-weight:400;src:url(fonts/KaTeX_Size2-Regular.woff2) format("woff2") format("woff") format("truetype")}@font-face{font-display:block;font-family:KaTeX_Size3;font-style:normal;font-weight:400;src:url(fonts/KaTeX_Size3-Regular.woff2) format("woff2") format("woff") format("truetype")}@font-face{font-display:block;font-family:KaTeX_Size4;font-style:normal;font-weight:400;src:url(fonts/KaTeX_Size4-Regular.woff2) format("woff2") format("woff") format("truetype")}@font-face{font-display:block;font-family:KaTeX_Typewriter;font-style:normal;font-weight:400;src:url(fonts/KaTeX_Typewriter-Regular.woff2) format("woff2") format("woff") format("truetype")}.katex{font:normal 1.21em KaTeX_Main,Times New Roman,serif;line-height:1.2;position:relative;text-indent:0;text-rendering:auto}.katex *{-ms-high-contrast-adjust:none!important;border-color:currentColor}.katex .katex-version:after{content:"0.16.47"}.katex .katex-mathml{border:0;-webkit-clip-path:inset(50%);clip-path:inset(50%);height:1px;overflow:hidden;padding:0;position:absolute;width:1px}.katex .katex-html>.newline{display:block}.katex .base{position:relative;white-space:nowrap;width:-webkit-min-content;width:-moz-min-content;width:min-content}.katex .base,.katex .strut{display:inline-block}.katex .textbf{font-weight:700}.katex .textit{font-style:italic}.katex .textrm{font-family:KaTeX_Main}.katex .textsf{font-family:KaTeX_SansSerif}.katex .texttt{font-family:KaTeX_Typewriter}.katex .mathnormal{font-family:KaTeX_Math;font-style:italic}.katex .mathit{font-family:KaTeX_Main;font-style:italic}.katex .mathrm{font-style:normal}.katex .mathbf{font-family:KaTeX_Main;font-weight:700}.katex .boldsymbol{font-family:KaTeX_Math;font-style:italic;font-weight:700}.katex .amsrm,.katex .mathbb,.katex .textbb{font-family:KaTeX_AMS}.katex .mathcal{font-family:KaTeX_Caligraphic}.katex .mathfrak,.katex .textfrak{font-family:KaTeX_Fraktur}.katex .mathboldfrak,.katex .textboldfrak{font-family:KaTeX_Fraktur;font-weight:700}.katex .mathtt{font-family:KaTeX_Typewriter}.katex .mathscr,.katex .textscr{font-family:KaTeX_Script}.katex .mathsf,.katex .textsf{font-family:KaTeX_SansSerif}.katex .mathboldsf,.katex .textboldsf{font-family:KaTeX_SansSerif;font-weight:700}.katex .mathitsf,.katex .mathsfit,.katex .textitsf{font-family:KaTeX_SansSerif;font-style:italic}.katex .mainrm{font-family:KaTeX_Main;font-style:normal}.katex .vlist-t{border-collapse:collapse;display:inline-table;table-layout:fixed}.katex .vlist-r{display:table-row}.katex .vlist{display:table-cell;position:relative;vertical-align:bottom}.katex .vlist>span{display:block;height:0;position:relative}.katex .vlist>span>span{display:inline-block}.katex .vlist>span>.pstrut{overflow:hidden;width:0}.katex .vlist-t2{margin-right:-2px}.katex .vlist-s{display:table-cell;font-size:1px;min-width:2px;vertical-align:bottom;width:2px}.katex .vbox{align-items:baseline;display:inline-flex;flex-direction:column}.katex .hbox{width:100%}.katex .hbox,.katex .thinbox{display:inline-flex;flex-direction:row}.katex .thinbox{max-width:0;width:0}.katex .msupsub{text-align:left}.katex .mfrac>span>span{text-align:center}.katex .mfrac .frac-line{border-bottom-style:solid;display:inline-block;width:100%}.katex .hdashline,.katex .hline,.katex .mfrac .frac-line,.katex .overline .overline-line,.katex .rule,.katex .underline .underline-line{min-height:1px}.katex .mspace{display:inline-block}.katex .smash{display:inline;line-height:0}.katex .clap,.katex .llap,.katex .rlap{position:relative;width:0}.katex .clap>.inner,.katex .llap>.inner,.katex .rlap>.inner{position:absolute}.katex .clap>.fix,.katex .llap>.fix,.katex .rlap>.fix{display:inline-block}.katex .llap>.inner{right:0}.katex .clap>.inner,.katex .rlap>.inner{left:0}.katex .clap>.inner>span{margin-left:-50%;margin-right:50%}.katex .rule{border:0 solid;display:inline-block;position:relative}.katex .hline,.katex .overline .overline-line,.katex .underline .underline-line{border-bottom-style:solid;display:inline-block;width:100%}.katex .hdashline{border-bottom-style:dashed;display:inline-block;width:100%}.katex .sqrt>.root{margin-left:.2777777778em;margin-right:-.5555555556em}.katex .fontsize-ensurer.reset-size1.size1,.katex .sizing.reset-size1.size1{font-size:1em}.katex .fontsize-ensurer.reset-size1.size2,.katex .sizing.reset-size1.size2{font-size:1.2em}.katex .fontsize-ensurer.reset-size1.size3,.katex .sizing.reset-size1.size3{font-size:1.4em}.katex .fontsize-ensurer.reset-size1.size4,.katex .sizing.reset-size1.size4{font-size:1.6em}.katex .fontsize-ensurer.reset-size1.size5,.katex .sizing.reset-size1.size5{font-size:1.8em}.katex .fontsize-ensurer.reset-size1.size6,.katex .sizing.reset-size1.size6{font-size:2em}.katex .fontsize-ensurer.reset-size1.size7,.katex .sizing.reset-size1.size7{font-size:2.4em}.katex .fontsize-ensurer.reset-size1.size8,.katex .sizing.reset-size1.size8{font-size:2.88em}.katex .fontsize-ensurer.reset-size1.size9,.katex .sizing.reset-size1.size9{font-size:3.456em}.katex .fontsize-ensurer.reset-size1.size10,.katex .sizing.reset-size1.size10{font-size:4.148em}.katex .fontsize-ensurer.reset-size1.size11,.katex .sizing.reset-size1.size11{font-size:4.976em}.katex .fontsize-ensurer.reset-size2.size1,.katex .sizing.reset-size2.size1{font-size:.8333333333em}.katex .fontsize-ensurer.reset-size2.size2,.katex .sizing.reset-size2.size2{font-size:1em}.katex .fontsize-ensurer.reset-size2.size3,.katex .sizing.reset-size2.size3{font-size:1.1666666667em}.katex .fontsize-ensurer.reset-size2.size4,.katex .sizing.reset-size2.size4{font-size:1.3333333333em}.katex .fontsize-ensurer.reset-size2.size5,.katex .sizing.reset-size2.size5{font-size:1.5em}.katex .fontsize-ensurer.reset-size2.size6,.katex .sizing.reset-size2.size6{font-size:1.6666666667em}.katex .fontsize-ensurer.reset-size2.size7,.katex .sizing.reset-size2.size7{font-size:2em}.katex .fontsize-ensurer.reset-size2.size8,.katex .sizing.reset-size2.size8{font-size:2.4em}.katex .fontsize-ensurer.reset-size2.size9,.katex .sizing.reset-size2.size9{font-size:2.88em}.katex .fontsize-ensurer.reset-size2.size10,.katex .sizing.reset-size2.size10{font-size:3.4566666667em}.katex .fontsize-ensurer.reset-size2.size11,.katex .sizing.reset-size2.size11{font-size:4.1466666667em}.katex .fontsize-ensurer.reset-size3.size1,.katex .sizing.reset-size3.size1{font-size:.7142857143em}.katex .fontsize-ensurer.reset-size3.size2,.katex .sizing.reset-size3.size2{font-size:.8571428571em}.katex .fontsize-ensurer.reset-size3.size3,.katex .sizing.reset-size3.size3{font-size:1em}.katex .fontsize-ensurer.reset-size3.size4,.katex .sizing.reset-size3.size4{font-size:1.1428571429em}.katex .fontsize-ensurer.reset-size3.size5,.katex .sizing.reset-size3.size5{font-size:1.2857142857em}.katex .fontsize-ensurer.reset-size3.size6,.katex .sizing.reset-size3.size6{font-size:1.4285714286em}.katex .fontsize-ensurer.reset-size3.size7,.katex .sizing.reset-size3.size7{font-size:1.7142857143em}.katex .fontsize-ensurer.reset-size3.size8,.katex .sizing.reset-size3.size8{font-size:2.0571428571em}.katex .fontsize-ensurer.reset-size3.size9,.katex .sizing.reset-size3.size9{font-size:2.4685714286em}.katex .fontsize-ensurer.reset-size3.size10,.katex .sizing.reset-size3.size10{font-size:2.9628571429em}.katex .fontsize-ensurer.reset-size3.size11,.katex .sizing.reset-size3.size11{font-size:3.5542857143em}.katex .fontsize-ensurer.reset-size4.size1,.katex .sizing.reset-size4.size1{font-size:.625em}.katex .fontsize-ensurer.reset-size4.size2,.katex .sizing.reset-size4.size2{font-size:.75em}.katex .fontsize-ensurer.reset-size4.size3,.katex .sizing.reset-size4.size3{font-size:.875em}.katex .fontsize-ensurer.reset-size4.size4,.katex .sizing.reset-size4.size4{font-size:1em}.katex .fontsize-ensurer.reset-size4.size5,.katex .sizing.reset-size4.size5{font-size:1.125em}.katex .fontsize-ensurer.reset-size4.size6,.katex .sizing.reset-size4.size6{font-size:1.25em}.katex .fontsize-ensurer.reset-size4.size7,.katex .sizing.reset-size4.size7{font-size:1.5em}.katex .fontsize-ensurer.reset-size4.size8,.katex .sizing.reset-size4.size8{font-size:1.8em}.katex .fontsize-ensurer.reset-size4.size9,.katex .sizing.reset-size4.size9{font-size:2.16em}.katex .fontsize-ensurer.reset-size4.size10,.katex .sizing.reset-size4.size10{font-size:2.5925em}.katex .fontsize-ensurer.reset-size4.size11,.katex .sizing.reset-size4.size11{font-size:3.11em}.katex .fontsize-ensurer.reset-size5.size1,.katex .sizing.reset-size5.size1{font-size:.5555555556em}.katex .fontsize-ensurer.reset-size5.size2,.katex .sizing.reset-size5.size2{font-size:.6666666667em}.katex .fontsize-ensurer.reset-size5.size3,.katex .sizing.reset-size5.size3{font-size:.7777777778em}.katex .fontsize-ensurer.reset-size5.size4,.katex .sizing.reset-size5.size4{font-size:.8888888889em}.katex .fontsize-ensurer.reset-size5.size5,.katex .sizing.reset-size5.size5{font-size:1em}.katex .fontsize-ensurer.reset-size5.size6,.katex .sizing.reset-size5.size6{font-size:1.1111111111em}.katex .fontsize-ensurer.reset-size5.size7,.katex .sizing.reset-size5.size7{font-size:1.3333333333em}.katex .fontsize-ensurer.reset-size5.size8,.katex .sizing.reset-size5.size8{font-size:1.6em}.katex .fontsize-ensurer.reset-size5.size9,.katex .sizing.reset-size5.size9{font-size:1.92em}.katex .fontsize-ensurer.reset-size5.size10,.katex .sizing.reset-size5.size10{font-size:2.3044444444em}.katex .fontsize-ensurer.reset-size5.size11,.katex .sizing.reset-size5.size11{font-size:2.7644444444em}.katex .fontsize-ensurer.reset-size6.size1,.katex .sizing.reset-size6.size1{font-size:.5em}.katex .fontsize-ensurer.reset-size6.size2,.katex .sizing.reset-size6.size2{font-size:.6em}.katex .fontsize-ensurer.reset-size6.size3,.katex .sizing.reset-size6.size3{font-size:.7em}.katex .fontsize-ensurer.reset-size6.size4,.katex .sizing.reset-size6.size4{font-size:.8em}.katex .fontsize-ensurer.reset-size6.size5,.katex .sizing.reset-size6.size5{font-size:.9em}.katex .fontsize-ensurer.reset-size6.size6,.katex .sizing.reset-size6.size6{font-size:1em}.katex .fontsize-ensurer.reset-size6.size7,.katex .sizing.reset-size6.size7{font-size:1.2em}.katex .fontsize-ensurer.reset-size6.size8,.katex .sizing.reset-size6.size8{font-size:1.44em}.katex .fontsize-ensurer.reset-size6.size9,.katex .sizing.reset-size6.size9{font-size:1.728em}.katex .fontsize-ensurer.reset-size6.size10,.katex .sizing.reset-size6.size10{font-size:2.074em}.katex .fontsize-ensurer.reset-size6.size11,.katex .sizing.reset-size6.size11{font-size:2.488em}.katex .fontsize-ensurer.reset-size7.size1,.katex .sizing.reset-size7.size1{font-size:.4166666667em}.katex .fontsize-ensurer.reset-size7.size2,.katex .sizing.reset-size7.size2{font-size:.5em}.katex .fontsize-ensurer.reset-size7.size3,.katex .sizing.reset-size7.size3{font-size:.5833333333em}.katex .fontsize-ensurer.reset-size7.size4,.katex .sizing.reset-size7.size4{font-size:.6666666667em}.katex .fontsize-ensurer.reset-size7.size5,.katex .sizing.reset-size7.size5{font-size:.75em}.katex .fontsize-ensurer.reset-size7.size6,.katex .sizing.reset-size7.size6{font-size:.8333333333em}.katex .fontsize-ensurer.reset-size7.size7,.katex .sizing.reset-size7.size7{font-size:1em}.katex .fontsize-ensurer.reset-size7.size8,.katex .sizing.reset-size7.size8{font-size:1.2em}.katex .fontsize-ensurer.reset-size7.size9,.katex .sizing.reset-size7.size9{font-size:1.44em}.katex .fontsize-ensurer.reset-size7.size10,.katex .sizing.reset-size7.size10{font-size:1.7283333333em}.katex .fontsize-ensurer.reset-size7.size11,.katex .sizing.reset-size7.size11{font-size:2.0733333333em}.katex .fontsize-ensurer.reset-size8.size1,.katex .sizing.reset-size8.size1{font-size:.3472222222em}.katex .fontsize-ensurer.reset-size8.size2,.katex .sizing.reset-size8.size2{font-size:.4166666667em}.katex .fontsize-ensurer.reset-size8.size3,.katex .sizing.reset-size8.size3{font-size:.4861111111em}.katex .fontsize-ensurer.reset-size8.size4,.katex .sizing.reset-size8.size4{font-size:.5555555556em}.katex .fontsize-ensurer.reset-size8.size5,.katex .sizing.reset-size8.size5{font-size:.625em}.katex .fontsize-ensurer.reset-size8.size6,.katex .sizing.reset-size8.size6{font-size:.6944444444em}.katex .fontsize-ensurer.reset-size8.size7,.katex .sizing.reset-size8.size7{font-size:.8333333333em}.katex .fontsize-ensurer.reset-size8.size8,.katex .sizing.reset-size8.size8{font-size:1em}.katex .fontsize-ensurer.reset-size8.size9,.katex .sizing.reset-size8.size9{font-size:1.2em}.katex .fontsize-ensurer.reset-size8.size10,.katex .sizing.reset-size8.size10{font-size:1.4402777778em}.katex .fontsize-ensurer.reset-size8.size11,.katex .sizing.reset-size8.size11{font-size:1.7277777778em}.katex .fontsize-ensurer.reset-size9.size1,.katex .sizing.reset-size9.size1{font-size:.2893518519em}.katex .fontsize-ensurer.reset-size9.size2,.katex .sizing.reset-size9.size2{font-size:.3472222222em}.katex .fontsize-ensurer.reset-size9.size3,.katex .sizing.reset-size9.size3{font-size:.4050925926em}.katex .fontsize-ensurer.reset-size9.size4,.katex .sizing.reset-size9.size4{font-size:.462962963em}.katex .fontsize-ensurer.reset-size9.size5,.katex .sizing.reset-size9.size5{font-size:.5208333333em}.katex .fontsize-ensurer.reset-size9.size6,.katex .sizing.reset-size9.size6{font-size:.5787037037em}.katex .fontsize-ensurer.reset-size9.size7,.katex .sizing.reset-size9.size7{font-size:.6944444444em}.katex .fontsize-ensurer.reset-size9.size8,.katex .sizing.reset-size9.size8{font-size:.8333333333em}.katex .fontsize-ensurer.reset-size9.size9,.katex .sizing.reset-size9.size9{font-size:1em}.katex .fontsize-ensurer.reset-size9.size10,.katex .sizing.reset-size9.size10{font-size:1.2002314815em}.katex .fontsize-ensurer.reset-size9.size11,.katex .sizing.reset-size9.size11{font-size:1.4398148148em}.katex .fontsize-ensurer.reset-size10.size1,.katex .sizing.reset-size10.size1{font-size:.2410800386em}.katex .fontsize-ensurer.reset-size10.size2,.katex .sizing.reset-size10.size2{font-size:.2892960463em}.katex .fontsize-ensurer.reset-size10.size3,.katex .sizing.reset-size10.size3{font-size:.337512054em}.katex .fontsize-ensurer.reset-size10.size4,.katex .sizing.reset-size10.size4{font-size:.3857280617em}.katex .fontsize-ensurer.reset-size10.size5,.katex .sizing.reset-size10.size5{font-size:.4339440694em}.katex .fontsize-ensurer.reset-size10.size6,.katex .sizing.reset-size10.size6{font-size:.4821600771em}.katex .fontsize-ensurer.reset-size10.size7,.katex .sizing.reset-size10.size7{font-size:.5785920926em}.katex .fontsize-ensurer.reset-size10.size8,.katex .sizing.reset-size10.size8{font-size:.6943105111em}.katex .fontsize-ensurer.reset-size10.size9,.katex .sizing.reset-size10.size9{font-size:.8331726133em}.katex .fontsize-ensurer.reset-size10.size10,.katex .sizing.reset-size10.size10{font-size:1em}.katex .fontsize-ensurer.reset-size10.size11,.katex .sizing.reset-size10.size11{font-size:1.1996142719em}.katex .fontsize-ensurer.reset-size11.size1,.katex .sizing.reset-size11.size1{font-size:.2009646302em}.katex .fontsize-ensurer.reset-size11.size2,.katex .sizing.reset-size11.size2{font-size:.2411575563em}.katex .fontsize-ensurer.reset-size11.size3,.katex .sizing.reset-size11.size3{font-size:.2813504823em}.katex .fontsize-ensurer.reset-size11.size4,.katex .sizing.reset-size11.size4{font-size:.3215434084em}.katex .fontsize-ensurer.reset-size11.size5,.katex .sizing.reset-size11.size5{font-size:.3617363344em}.katex .fontsize-ensurer.reset-size11.size6,.katex .sizing.reset-size11.size6{font-size:.4019292605em}.katex .fontsize-ensurer.reset-size11.size7,.katex .sizing.reset-size11.size7{font-size:.4823151125em}.katex .fontsize-ensurer.reset-size11.size8,.katex .sizing.reset-size11.size8{font-size:.578778135em}.katex .fontsize-ensurer.reset-size11.size9,.katex .sizing.reset-size11.size9{font-size:.6945337621em}.katex .fontsize-ensurer.reset-size11.size10,.katex .sizing.reset-size11.size10{font-size:.8336012862em}.katex .fontsize-ensurer.reset-size11.size11,.katex .sizing.reset-size11.size11{font-size:1em}.katex .delimsizing.size1{font-family:KaTeX_Size1}.katex .delimsizing.size2{font-family:KaTeX_Size2}.katex .delimsizing.size3{font-family:KaTeX_Size3}.katex .delimsizing.size4{font-family:KaTeX_Size4}.katex .delimsizing.mult .delim-size1>span{font-family:KaTeX_Size1}.katex .delimsizing.mult .delim-size4>span{font-family:KaTeX_Size4}.katex .nulldelimiter{display:inline-block;width:.12em}.katex .delimcenter,.katex .op-symbol{position:relative}.katex .op-symbol.small-op{font-family:KaTeX_Size1}.katex .op-symbol.large-op{font-family:KaTeX_Size2}.katex .accent>.vlist-t,.katex .op-limits>.vlist-t{text-align:center}.katex .accent .accent-body{position:relative}.katex .accent .accent-body:not(.accent-full){width:0}.katex .overlay{display:block}.katex .mtable .vertical-separator{display:inline-block;min-width:1px}.katex .mtable .arraycolsep{display:inline-block}.katex .mtable .col-align-c>.vlist-t{text-align:center}.katex .mtable .col-align-l>.vlist-t{text-align:left}.katex .mtable .col-align-r>.vlist-t{text-align:right}.katex .svg-align{text-align:left}.katex svg{fill:currentColor;stroke:currentColor;display:block;height:inherit;position:absolute;width:100%}.katex svg path{stroke:none}.katex svg{fill-rule:nonzero;fill-opacity:1;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1}.katex img{border-style:none;max-height:none;max-width:none;min-height:0;min-width:0}.katex .stretchy{display:block;overflow:hidden;position:relative;width:100%}.katex .stretchy:after,.katex .stretchy:before{content:""}.katex .hide-tail{overflow:hidden;position:relative;width:100%}.katex .halfarrow-left{left:0;overflow:hidden;position:absolute;width:50.2%}.katex .halfarrow-right{overflow:hidden;position:absolute;right:0;width:50.2%}.katex .brace-left{left:0;overflow:hidden;position:absolute;width:25.1%}.katex .brace-center{left:25%;overflow:hidden;position:absolute;width:50%}.katex .brace-right{overflow:hidden;position:absolute;right:0;width:25.1%}.katex .x-arrow-pad{padding:0 .5em}.katex .cd-arrow-pad{padding:0 .55556em 0 .27778em}.katex .mover,.katex .munder,.katex .x-arrow{text-align:center}.katex .boxpad{padding:0 .3em}.katex .fbox,.katex .fcolorbox{border:.04em solid;box-sizing:border-box}.katex .cancel-pad{padding:0 .2em}.katex .cancel-lap{margin-left:-.2em;margin-right:-.2em}.katex .sout{border-bottom-style:solid;border-bottom-width:.08em}.katex .angl{border-right:.049em solid;border-top:.049em solid;box-sizing:border-box;margin-right:.03889em}.katex .anglpad{padding:0 .03889em}.katex .eqn-num:before{content:"(" counter(katexEqnNo) ")";counter-increment:katexEqnNo}.katex .mml-eqn-num:before{content:"(" counter(mmlEqnNo) ")";counter-increment:mmlEqnNo}.katex .mtr-glue{width:50%}.katex .cd-vert-arrow{display:inline-block;position:relative}.katex .cd-label-left{display:inline-block;position:absolute;right:calc(50% + .3em);text-align:left}.katex .cd-label-right{display:inline-block;left:calc(50% + .3em);position:absolute;text-align:right}.katex-display{display:block;margin:1em 0;text-align:center}.katex-display>.katex{display:block;text-align:center;white-space:nowrap}.katex-display>.katex>.katex-html{display:block;position:relative}.katex-display>.katex>.katex-html>.tag{position:absolute;right:0}.katex-display.leqno>.katex>.katex-html>.tag{left:0;right:auto}.katex-display.fleqn>.katex{padding-left:2em;text-align:left}body{counter-reset:katexEqnNo mmlEqnNo} diff --git a/App/Resources/reader/styles/reader.css b/App/Resources/reader/styles/reader.css index f5dfbac..8613164 100644 --- a/App/Resources/reader/styles/reader.css +++ b/App/Resources/reader/styles/reader.css @@ -2,6 +2,11 @@ box-sizing: border-box; } +:root { + --font-scale: 1; + --content-max-width-px: 672px; +} + html, body { margin: 0; @@ -10,7 +15,8 @@ body { color: var(--fg); font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif; - font-size: 16px; + /* F1:屏幕字号随 --font-scale 缩放;rem 的 h1-h3 自动跟动。打印用 @media print 固定。 */ + font-size: calc(16px * var(--font-scale, 1)); line-height: 1.65; } @@ -135,7 +141,7 @@ body { } .markdown-body > * { - max-width: 42rem; + max-width: var(--content-max-width-px, 42rem); margin-left: auto; margin-right: auto; } @@ -264,7 +270,7 @@ body { border: none; border-top: 1px solid var(--border); margin: 2em auto; - max-width: 42rem; + max-width: var(--content-max-width-px, 42rem); } .markdown-body input[type="checkbox"] { @@ -301,6 +307,100 @@ body { border-color: #8a4040; } +/* F4:KaTeX 块级公式横向溢出可滚,避免宽公式撑破栏宽。 */ +.markdown-body .katex-display { + overflow-x: auto; + overflow-y: hidden; + padding: 4px 0; +} + +/* F5:文内查找条(纯 JS,fixed top-right 胶囊)。 */ +.find-bar { + position: fixed; + top: 8px; + right: 14px; + z-index: 10; + display: flex; + align-items: center; + gap: 6px; + background: var(--bg-elevated); + border: 1px solid var(--border); + border-radius: 8px; + padding: 4px 8px; + box-shadow: 0 2px 8px var(--shadow); +} +.find-bar.hidden { + display: none; +} +.find-bar input { + border: 1px solid var(--border); + background: var(--bg); + color: var(--fg); + border-radius: 6px; + padding: 2px 6px; + font-size: 13px; + width: 200px; + outline: none; +} +.find-bar input:focus { + border-color: var(--link); +} +.find-bar button { + border: 1px solid var(--border); + background: var(--bg); + color: var(--fg); + border-radius: 6px; + padding: 2px 8px; + font-size: 12px; + cursor: pointer; +} +.find-bar button:hover { + border-color: var(--fg-muted); +} +.find-case { + font-size: 12px; + color: var(--fg-muted); + display: flex; + align-items: center; + gap: 3px; + user-select: none; +} +mark.mdeye-find { + background: #ffe89a; + color: inherit; + border-radius: 2px; +} +mark.mdeye-find.current { + background: #ff9a3c; +} +[data-theme="dark"] mark.mdeye-find { + background: rgba(255, 200, 80, 0.4); +} +[data-theme="dark"] mark.mdeye-find.current { + background: rgba(255, 140, 40, 0.7); +} + +/* F6:阅读器轻提示浮层(fixed bottom-center 胶囊,3s 自动消失)。 */ +.mdeye-toast { + position: fixed; + left: 50%; + bottom: 28px; + transform: translateX(-50%); + background: var(--bg-elevated); + color: var(--fg); + border: 1px solid var(--border); + border-radius: 8px; + padding: 10px 14px; + font-size: 13px; + line-height: 1.45; + box-shadow: 0 4px 16px var(--shadow); + z-index: 20; + max-width: 80vw; +} +.mdeye-toast.warn { + border-color: #d39b00; +} + /* PDF export uses a dedicated WKWebView and WebKit's print pagination. Paper size and 16 mm margins are configured by NSPrintInfo, not duplicated here. */ @media print { @@ -338,6 +438,8 @@ body { body { background: #ffffff !important; color: var(--fg) !important; + /* F1:打印固定字号,屏幕缩放不污染 PDF。 */ + font-size: 16px !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; } @@ -354,6 +456,29 @@ body { margin-right: 0; } + /* F1:栏宽变量在打印时同样收起铺满纸面。 */ + .markdown-body hr { + max-width: none !important; + } + + /* F4:块级公式横向溢出在分页时安全滚动,不再保留屏显的外边距。 */ + .markdown-body .katex-display { + overflow: visible !important; + break-inside: avoid; + } + + /* F5/F6:阅读器浮层不进 PDF。 */ + .find-bar, + .mdeye-toast { + display: none !important; + } + + /* F5:查找高亮在打印中退化为普通文本样式。 */ + mark.mdeye-find { + background: transparent !important; + color: inherit !important; + } + a { color: inherit !important; text-decoration: none !important; diff --git a/App/Sources/AppDelegate.swift b/App/Sources/AppDelegate.swift index b22ec06..80ff043 100644 --- a/App/Sources/AppDelegate.swift +++ b/App/Sources/AppDelegate.swift @@ -26,8 +26,29 @@ final class AppDelegate: NSObject, NSApplicationDelegate { // Some Launch Services paths only show up slightly after launch. DispatchQueue.main.async { [weak self] in - self?.flushPendingPaths() + guard let self else { return } + self.flushPendingPaths() + // F2: 仍无外部传入 path → 尝试恢复上次打开的文件(单文件语义, + // 复用 openFile 入口,不开新窗/标签)。失效路径会被清空,不再重试。 + if self.pendingPaths.isEmpty, self.windowController != nil { + self.restoreLastOpenedPath() + } + } + } + + private func restoreLastOpenedPath() { + guard let last = Preferences.shared.lastOpenedPath, + !last.isEmpty, + FileManager.default.fileExists(atPath: last) else { + // 失效路径清空,避免下次启动再尝试并触发错误对话框。 + if Preferences.shared.lastOpenedPath != nil { + Preferences.shared.lastOpenedPath = nil + NSLog("mdeye: lastOpenedPath cleared (missing)") + } + return } + NSLog("mdeye: restoring lastOpenedPath → %@", last) + windowController?.openFile(path: last) } func applicationShouldTerminateAfterLastWindowClosed(_ sender: NSApplication) -> Bool { diff --git a/App/Sources/FileService.swift b/App/Sources/FileService.swift index e9e9b80..c56c42e 100644 --- a/App/Sources/FileService.swift +++ b/App/Sources/FileService.swift @@ -90,6 +90,15 @@ enum FileService { if let s = String(data: data, encoding: .utf8) { return (s, "utf-8") } + // GB18030(GBK 超集):常见 Windows 中文 .md。.gb18030 便捷常量只在 Apple + // Foundation 提供,corelibs-foundation(CI 的 swift-corelibs)无此成员; + // 用 CFStringConvert 跨平台拿到 NSStringEncoding。 + let gb18030 = String.Encoding(rawValue: CFStringConvertEncodingToNSStringEncoding( + CFStringEncoding(CFStringEncodings.GB_18030_2000.rawValue) + )) + if let s = String(data: data, encoding: gb18030) { + return (s, "gb18030") + } if let s = String(data: data, encoding: .utf16) { return (s, "utf-16") } @@ -97,4 +106,24 @@ enum FileService { let s = String(decoding: data, as: UTF8.self) return (s, "utf-8-lossy") } + + /// 富文本标记命中检测(纯函数,便于 CI 自检)。命中即提示用户在 TextEdit 里用 + /// 「格式→制作纯文本」清理,避免富文本保存破坏 Markdown 源。阈值保守:纯 + /// ASCII / UTF-8 / GB18030 文本的非预期控制符正常为 0,不会误报。 + static func looksLikeRichText(_ text: String) -> Bool { + if text.hasPrefix("{\\rtf1") { return true } + if text.range(of: "\\\\object\\\\objhtml", options: .regularExpression) != nil { return true } + if text.range(of: "\\\\fonttbl", options: .regularExpression) != nil { return true } + // 前 2KB 内非预期控制符密集出现(\x00-\x08 \x0B \x0C \x0E-\x1F;放行 \t \n \r)。 + let head = text.prefix(2048) + var ctrl = 0 + for c in head { + guard let s = c.asciiValue else { continue } + if s < 9 || (s > 10 && s < 13) || (s > 13 && s < 32) { + ctrl += 1 + if ctrl >= 4 { return true } + } + } + return false + } } diff --git a/App/Sources/MainWindowController.swift b/App/Sources/MainWindowController.swift index 85d485a..84e86e2 100644 --- a/App/Sources/MainWindowController.swift +++ b/App/Sources/MainWindowController.swift @@ -75,6 +75,18 @@ final class MainWindowController: NSWindowController, NSWindowDelegate { viewMenu.addItem(withTitle: "Theme: Dark", action: #selector(setThemeDark(_:)), keyEquivalent: "2") viewMenu.addItem(withTitle: "Theme: Sepia", action: #selector(setThemeSepia(_:)), keyEquivalent: "3") viewMenu.addItem(withTitle: "Theme: Green", action: #selector(setThemeGreen(_:)), keyEquivalent: "4") + viewMenu.addItem(NSMenuItem.separator()) + // F1:字号缩放(⌘+/⌘-/⌘0)与栏宽调整(⌥+/⌥-)。 + viewMenu.addItem(withTitle: "Zoom In (Text)", action: #selector(zoomTextIn(_:)), keyEquivalent: "+") + viewMenu.addItem(withTitle: "Zoom Out (Text)", action: #selector(zoomTextOut(_:)), keyEquivalent: "-") + viewMenu.addItem(withTitle: "Reset Text Zoom", action: #selector(zoomTextReset(_:)), keyEquivalent: "0") + viewMenu.addItem(NSMenuItem.separator()) + let widen = NSMenuItem(title: "Widen Column", action: #selector(widenColumn(_:)), keyEquivalent: "+") + widen.keyEquivalentModifierMask = [.option] + viewMenu.addItem(widen) + let narrow = NSMenuItem(title: "Narrow Column", action: #selector(narrowColumn(_:)), keyEquivalent: "-") + narrow.keyEquivalentModifierMask = [.option] + viewMenu.addItem(narrow) let windowMenuItem = NSMenuItem() mainMenu.addItem(windowMenuItem) @@ -132,6 +144,13 @@ final class MainWindowController: NSWindowController, NSWindowDelegate { @objc private func setThemeSepia(_ sender: Any?) { contentController.setTheme("sepia") } @objc private func setThemeGreen(_ sender: Any?) { contentController.setTheme("green") } + // F1:屏幕缩放(字号 / 栏宽)。打印不沿用——CSS @media print 固定字号与 max-width。 + @objc private func zoomTextIn(_ sender: Any?) { contentController.adjustFontSizeScale(by: 0.1) } + @objc private func zoomTextOut(_ sender: Any?) { contentController.adjustFontSizeScale(by: -0.1) } + @objc private func zoomTextReset(_ sender: Any?) { contentController.setFontSizeScale(1.0) } + @objc private func widenColumn(_ sender: Any?) { contentController.adjustContentMaxWidth(by: 32) } + @objc private func narrowColumn(_ sender: Any?) { contentController.adjustContentMaxWidth(by: -32) } + @objc private func setAsDefaultApp(_ sender: Any?) { let result = DefaultAppService.setAsDefaultMarkdownViewer() let alert = NSAlert() diff --git a/App/Sources/Preferences.swift b/App/Sources/Preferences.swift index adde502..f18af46 100644 --- a/App/Sources/Preferences.swift +++ b/App/Sources/Preferences.swift @@ -8,6 +8,8 @@ final class Preferences { static let theme = "theme" static let lastOpenedPath = "lastOpenedPath" static let outlineOpen = "outlineOpen" + static let fontSizeScale = "fontSizeScale" + static let contentMaxWidth = "contentMaxWidth" } var theme: String { @@ -28,6 +30,24 @@ final class Preferences { set { defaults.set(newValue, forKey: Key.outlineOpen) } } + /// 字号缩放系数,默认 1.0,范围 0.85–2.0。屏幕阅读用;打印不沿用(@media print 固定)。 + var fontSizeScale: Double { + get { + let v = defaults.object(forKey: Key.fontSizeScale) as? Double ?? 1.0 + return min(max(v, 0.85), 2.0) + } + set { defaults.set(min(max(newValue, 0.85), 2.0), forKey: Key.fontSizeScale) } + } + + /// 正文内容最大宽度(px),默认 672(= 42rem @ 16px),范围 600–1100。 + var contentMaxWidth: Int { + get { + let v = defaults.object(forKey: Key.contentMaxWidth) as? Int ?? 672 + return min(max(v, 600), 1100) + } + set { defaults.set(min(max(newValue, 600), 1100), forKey: Key.contentMaxWidth) } + } + func set(key: String, value: Any?) { switch key { case "theme": @@ -36,6 +56,13 @@ final class Preferences { if let b = value as? Bool { outlineOpen = b } case "lastOpenedPath": lastOpenedPath = value as? String + case "fontSizeScale": + // JS JSON 可能把整数化的 Double 传成 Int,统一转 Double。 + if let n = value as? Double { fontSizeScale = n } + else if let n = value as? Int { fontSizeScale = Double(n) } + case "contentMaxWidth": + if let n = value as? Int { contentMaxWidth = n } + else if let n = value as? Double { contentMaxWidth = Int(n) } default: break } diff --git a/App/Sources/ReaderViewController.swift b/App/Sources/ReaderViewController.swift index 7a6a8fa..d94afde 100644 --- a/App/Sources/ReaderViewController.swift +++ b/App/Sources/ReaderViewController.swift @@ -149,6 +149,18 @@ final class ReaderViewController: NSViewController, WKScriptMessageHandler, WKNa latestDoc = doc NSLog("mdeye: document ready (%d chars) readerReady=%@", payload.text.count, readerReady ? "yes" : "no") pushLatestDocument(reason: "openFile") + + // F6:读时检测富文本标记(RTF 头/控制序列/非预期控制符),命中后弹轻提示, + // 建议在 TextEdit 用「格式→制作纯文本」清理,避免富文本保存破坏 Markdown 源。 + if FileService.looksLikeRichText(payload.text) { + DispatchQueue.main.asyncAfter(deadline: .now() + 0.4) { [weak self] in + self?.sendBridgeEvent([ + "type": "toast", + "message": "检测到富文本标记,建议在 TextEdit 中用「格式→制作纯文本」清理后再阅读。", + "level": "info", + ]) + } + } } catch { presentError(error.localizedDescription) } @@ -236,20 +248,14 @@ final class ReaderViewController: NSViewController, WKScriptMessageHandler, WKNa func openInEditor() { guard let path = currentPath else { return } let url = URL(fileURLWithPath: path) - // Avoid recursion: mdeye is itself a registered Markdown handler, so a plain - // NSWorkspace.open(url) may re-launch ourselves. Pick an explicit editor app, - // skipping ourselves; fall back to TextEdit, then Finder reveal. - let ownBundleId = Bundle.main.bundleIdentifier - let config = NSWorkspace.OpenConfiguration() - config.activates = true - if let appURL = NSWorkspace.shared.urlForApplication(toOpen: url), - Bundle(url: appURL)?.bundleIdentifier != ownBundleId { - NSWorkspace.shared.open([url], withApplicationAt: appURL, configuration: config) { _, _ in } - } else if let textEdit = NSWorkspace.shared.urlForApplication(withBundleIdentifier: "com.apple.TextEdit") { - NSWorkspace.shared.open([url], withApplicationAt: textEdit, configuration: config) { _, _ in } - } else { + // F6: 默认只用自带的 TextEdit(不自定义编辑器白名单/行号)。失败再回退 Finder reveal。 + guard let textEdit = NSWorkspace.shared.urlForApplication(withBundleIdentifier: "com.apple.TextEdit") else { revealInFinder() + return } + let config = NSWorkspace.OpenConfiguration() + config.activates = true + NSWorkspace.shared.open([url], withApplicationAt: textEdit, configuration: config) { _, _ in } } func setTheme(_ name: String) { @@ -257,6 +263,32 @@ final class ReaderViewController: NSViewController, WKScriptMessageHandler, WKNa sendBridgeEvent(["type": "theme", "name": name]) } + // F1: 字号/栏宽缩放(屏幕阅读用,打印不沿用)。 + func adjustFontSizeScale(by delta: Double) { + let s = min(max(Preferences.shared.fontSizeScale + delta, 0.85), 2.0) + setFontSizeScale(s) + } + + func setFontSizeScale(_ scale: Double) { + Preferences.shared.fontSizeScale = scale + sendApplyPrefs() + } + + func adjustContentMaxWidth(by delta: Int) { + let w = min(max(Preferences.shared.contentMaxWidth + delta, 600), 1100) + Preferences.shared.contentMaxWidth = w + sendApplyPrefs() + } + + private func sendApplyPrefs() { + guard readerReady else { return } + sendBridgeEvent([ + "type": "apply-prefs", + "fontSizeScale": Preferences.shared.fontSizeScale, + "contentMaxWidth": Preferences.shared.contentMaxWidth, + ]) + } + func sendBridgeEvent(_ object: [String: Any], completion: ((Error?) -> Void)? = nil) { guard let webView else { completion?(BridgeError.noWebView) @@ -449,6 +481,8 @@ final class ReaderViewController: NSViewController, WKScriptMessageHandler, WKNa "type": "theme", "name": Preferences.shared.theme ]) + // F1: 一次性把屏幕字号/栏宽偏好下发,与 theme 同模式(启动时 JS 先用默认,再被覆盖)。 + sendApplyPrefs() pushLatestDocument(reason: "js-ready") case "doc-shown": // Proof that the web reader actually rendered content (not just native open). diff --git a/App/Sources/main.swift b/App/Sources/main.swift index f62e3b9..df6d1fc 100644 --- a/App/Sources/main.swift +++ b/App/Sources/main.swift @@ -6,6 +6,44 @@ import PDFKit let argv = CommandLine.arguments +// Headless encoding detection check for CI: +// mdeye --encoding-selftest +if argv.count >= 4, argv[1] == "--encoding-selftest" { + do { + let payload = try FileService.readMarkdown(path: argv[2]) + if payload.encoding == argv[3] { + print("ENCODING SELFTEST OK \(payload.encoding)") + exit(0) + } else { + print("ENCODING SELFTEST FAIL: expected \(argv[3]) got \(payload.encoding)") + exit(1) + } + } catch { + print("ENCODING SELFTEST FAIL: \(error.localizedDescription)") + exit(1) + } +} + +// Headless rich-text marker check for CI: +// mdeye --rich-text-selftest <0|1> +if argv.count >= 4, argv[1] == "--rich-text-selftest" { + do { + let payload = try FileService.readMarkdown(path: argv[2]) + let hit = FileService.looksLikeRichText(payload.text) + let expect = (argv[3] == "1") + if hit == expect { + print("RICHTEXT SELFTEST OK hit=\(hit)") + exit(0) + } else { + print("RICHTEXT SELFTEST FAIL: expected \(expect) got \(hit)") + exit(1) + } + } catch { + print("RICHTEXT SELFTEST FAIL: \(error.localizedDescription)") + exit(1) + } +} + // Headless PDF export check for CI: // mdeye --pdf-selftest // Uses the production PDFExportCoordinator and requires a valid multi-page result. diff --git a/fixtures/ascii.md b/fixtures/ascii.md new file mode 100644 index 0000000..b33bafd --- /dev/null +++ b/fixtures/ascii.md @@ -0,0 +1,10 @@ +# ASCII Fixture + +Plain ASCII Markdown for encoding detection self-checks. + +## Section + +- item one +- item two + +Expected encoding: utf-8. diff --git a/fixtures/gb18030.utf8.src b/fixtures/gb18030.utf8.src new file mode 100644 index 0000000..451a7a3 --- /dev/null +++ b/fixtures/gb18030.utf8.src @@ -0,0 +1,11 @@ +# 中文 GB18030 编码测试 + +这是一个用于编码探测的中文 Markdown 源文件(UTF-8 存储)。 + +CI 会在 `scripts/ci-selftest.sh` 里用 `iconv -f UTF-8 -t GB18030` 把本文件转成 +GB18030 字节序列后再交给 `--encoding-selftest`,期望探测结果为 `gb18030`。 + +## 章节 + +- 第一节:常见 Windows 旧笔记默认 GBK/GB18030 编码 +- 第二节:以前打开会乱码或报错,现在自动识别并正常预览 diff --git a/fixtures/rich-text-marker.md b/fixtures/rich-text-marker.md new file mode 100644 index 0000000..9640ee5 --- /dev/null +++ b/fixtures/rich-text-marker.md @@ -0,0 +1,5 @@ +{\rtf1\ansi\ansicpg936\deff0 +{\fonttbl{\f0\fnil\fcharset134 StSong;}} +\f0\fs24 This looks like rich text pasted into a .md file. The reader should +detect RTF control words and suggest cleaning via Format > Make Plain Text +in TextEdit before the source gets mangled by a rich-text save.} diff --git a/reader/build.mjs b/reader/build.mjs index 283503f..9d9c854 100644 --- a/reader/build.mjs +++ b/reader/build.mjs @@ -1,6 +1,6 @@ import * as esbuild from "esbuild"; -import { cpSync, mkdirSync, rmSync, existsSync, readFileSync } from "node:fs"; -import { dirname, join } from "node:path"; +import { cpSync, mkdirSync, rmSync, existsSync, readFileSync, readdirSync, writeFileSync } from "node:fs"; +import { dirname, join, extname } from "node:path"; import { fileURLToPath } from "node:url"; const __dirname = dirname(fileURLToPath(import.meta.url)); @@ -23,6 +23,37 @@ function copyStatic() { mkdirSync(dist, { recursive: true }); // index.html is patched (see writeIndex) to use a classic IIFE script. cpSync(join(__dirname, "styles"), join(dist, "styles"), { recursive: true }); + + // F4:仅拷贝 KaTeX 的 woff2 字体到 dist/fonts/(删 woff/ttf,省 ~800KB)。 + // katex.min.css 内的 url(fonts/KaTeX_*.woff2) 相对路径在 mdeye-app://reader/ 与 + // 打印 WebView 的 file://.../reader/ 两种 base 下都指向同目录,自洽。 + const katexFonts = join(__dirname, "node_modules", "katex", "dist", "fonts"); + if (existsSync(katexFonts)) { + const outFonts = join(dist, "fonts"); + mkdirSync(outFonts, { recursive: true }); + for (const f of readdirSync(katexFonts)) { + if (extname(f) === ".woff2") cpSync(join(katexFonts, f), join(outFonts, f)); + } + // 拷一份剥离 woff/ttf src 的 katex.min.css(避免浏览器对不存在字体 404)。 + const cssOut = writeStrippedKatexCss(join(katexFonts, "..", "katex.min.css"), join(dist, "styles", "katex.min.css")); + if (!cssOut) console.warn("katex.min.css not found; styles/katex.min.css not written"); + } else { + console.warn("katex dist/fonts not found; formulas will render without fonts"); + } +} + +// F4:删 katex.min.css 里的 woff/ttf url 声明,仅保留 woff2。 +function writeStrippedKatexCss(srcPath, outPath) { + if (!existsSync(srcPath)) return false; + let css = readFileSync(srcPath, "utf8"); + // 形如 src:url(x.woff2) format("woff2"),url(x.woff) format("woff"),url(x.ttf) + // 删除 woff/ttf 的 url 段,保留 woff2。 + css = css.replace(/,\s*url\([^)]*\.woff\)/g, ""); + css = css.replace(/,\s*url\([^)]*\.ttf\)/g, ""); + // 清理可能的尾随逗号 (src:url(x.woff2), → src:url(x.woff2)) + css = css.replace(/,\s*\)/g, ")"); + writeFileSync(outPath, css, "utf8"); + return true; } function writeIndex() { diff --git a/reader/index.html b/reader/index.html index 3f12d8a..57ee85a 100644 --- a/reader/index.html +++ b/reader/index.html @@ -12,6 +12,8 @@ + +
    diff --git a/reader/package-lock.json b/reader/package-lock.json index 8ca9171..972d4a3 100644 --- a/reader/package-lock.json +++ b/reader/package-lock.json @@ -9,9 +9,11 @@ "version": "0.3.0", "dependencies": { "highlight.js": "^11.11.1", + "katex": "^0.16.9", "markdown-it": "^14.1.0", "markdown-it-anchor": "^9.2.0", "markdown-it-task-lists": "^2.1.1", + "markdown-it-texmath": "^1.0.0", "mermaid": "^11.6.0" }, "devDependencies": { @@ -1726,6 +1728,12 @@ "integrity": "sha512-TxFAc76Jnhb2OUu+n3yz9RMu4CwGfaT788br6HhEDlvWfdeJcLUsxk1Hgw2yJio0OXsxv7pyIPmvECY7bMbluA==", "license": "ISC" }, + "node_modules/markdown-it-texmath": { + "version": "1.0.0", + "resolved": "https://registry.npmmirror.com/markdown-it-texmath/-/markdown-it-texmath-1.0.0.tgz", + "integrity": "sha512-4hhkiX8/gus+6e53PLCUmUrsa6ZWGgJW2XCW6O0ASvZUiezIK900ZicinTDtG3kAO2kon7oUA/ReWmpW2FByxg==", + "license": "MIT" + }, "node_modules/marked": { "version": "15.0.12", "resolved": "https://registry.npmmirror.com/marked/-/marked-15.0.12.tgz", diff --git a/reader/package.json b/reader/package.json index 1f62608..1457043 100644 --- a/reader/package.json +++ b/reader/package.json @@ -11,9 +11,11 @@ }, "dependencies": { "highlight.js": "^11.11.1", + "katex": "^0.16.9", "markdown-it": "^14.1.0", "markdown-it-anchor": "^9.2.0", "markdown-it-task-lists": "^2.1.1", + "markdown-it-texmath": "^1.0.0", "mermaid": "^11.6.0" }, "devDependencies": { diff --git a/reader/src/app.js b/reader/src/app.js index df819aa..f704b25 100644 --- a/reader/src/app.js +++ b/reader/src/app.js @@ -13,6 +13,9 @@ const state = { outlineOpen: true, mermaidReady: false, printPreparation: null, + fontSizeScale: 1.0, + contentMaxWidth: 672, + findOpen: false, }; function post(msg) { @@ -39,6 +42,29 @@ function setOutlineOpen(open) { $("#outline")?.classList.toggle("hidden", !open); } +function clamp(v, lo, hi) { + return Math.min(hi, Math.max(lo, v)); +} + +// F1:把屏幕字号/栏宽偏好写到 :root CSS 变量。PDF 打印用 @media print 固定值,不沿用。 +function applyPrefsToDom() { + const html = document.documentElement; + html.style.setProperty("--font-scale", String(state.fontSizeScale)); + html.style.setProperty("--content-max-width-px", `${state.contentMaxWidth}px`); +} + +// F6:阅读器内轻提示浮层(富文本命中、编辑器说明等),3 秒自动消失。 +function showToast(message, level = "info") { + if (!message) return; + const old = document.querySelector(".mdeye-toast"); + if (old) old.remove(); + const el = document.createElement("div"); + el.className = `mdeye-toast ${level === "warn" ? "warn" : "info"}`; + el.textContent = message; + document.body.appendChild(el); + setTimeout(() => el.remove(), 3000); +} + function basename(path) { if (!path) return "MDEye"; const parts = path.split(/[/\\]/); @@ -178,6 +204,7 @@ async function showDoc({ path, text }) { path: path || "", chars: (text || "").length, hasMermaid: documentHasMermaid(text || ""), + hasMath: !!content.querySelector(".katex"), }); } @@ -271,6 +298,20 @@ function handleNativeEvent(msg) { case "prepare-print": preparePrint(); break; + case "apply-prefs": + // F1:屏幕字号/栏宽偏好(number 进 JS 后 typeof 判断即可)。 + if (typeof msg.fontSizeScale === "number") { + state.fontSizeScale = clamp(msg.fontSizeScale, 0.85, 2.0); + } + if (typeof msg.contentMaxWidth === "number") { + state.contentMaxWidth = clamp(msg.contentMaxWidth | 0, 600, 1100); + } + applyPrefsToDom(); + break; + case "toast": + // F6:纯文本轻提示。 + showToast(msg.message || "", msg.level || "info"); + break; case "ping": post({ type: "pong", version: window.__mdeyeVersion || "unknown" }); break; @@ -325,6 +366,144 @@ function bindUi() { toggleOutline(); } }); + + // F5:文内查找(纯 JS TreeWalker 高亮,不碰桥接)。 + setupFindBar(); +} + +// F5:查找条。纯 JS TreeWalker 高亮,不碰桥接。 +function setupFindBar() { + const bar = document.createElement("div"); + bar.id = "find-bar"; + bar.className = "find-bar hidden"; + bar.innerHTML = ` + + + + + + `; + document.body.appendChild(bar); + + const input = bar.querySelector("#find-input"); + const caseCb = bar.querySelector("#find-case"); + let matches = []; + let idx = -1; + + function clearMarks() { + document.querySelectorAll("mark.mdeye-find").forEach((m) => { + const parent = m.parentNode; + parent.replaceChild(document.createTextNode(m.textContent), m); + parent.normalize?.(); + }); + matches = []; + idx = -1; + } + + function search(query) { + clearMarks(); + if (!query) return; + const root = document.getElementById("content"); + if (!root) return; + const flags = caseCb.checked ? "g" : "gi"; + const re = new RegExp(query.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), flags); + // 仅在文本节点遍历,避免拆坏 KaTeX/mermaid/代码块既有 DOM。 + const walker = document.createTreeWalker(root, NodeFilter.SHOW_TEXT, { + acceptNode(n) { + if (!n.nodeValue.trim()) return NodeFilter.FILTER_REJECT; + const p = n.parentElement; + if (p && p.closest("script, style, mark.mdeye-find")) { + return NodeFilter.FILTER_REJECT; + } + return NodeFilter.FILTER_ACCEPT; + }, + }); + const nodes = []; + while (walker.nextNode()) nodes.push(walker.currentNode); + for (const tn of nodes) { + const text = tn.nodeValue; + let last = 0; + let m; + const frag = document.createDocumentFragment(); + while ((m = re.exec(text))) { + if (m.index > last) { + frag.appendChild(document.createTextNode(text.slice(last, m.index))); + } + const mk = document.createElement("mark"); + mk.className = "mdeye-find"; + mk.textContent = m[0]; + frag.appendChild(mk); + matches.push(mk); + last = m.index + m[0].length; + if (m.index === re.lastIndex) re.lastIndex++; // 防零宽死循环 + } + if (last) { + frag.appendChild(document.createTextNode(text.slice(last))); + tn.parentNode.replaceChild(frag, tn); + } + } + idx = matches.length ? 0 : -1; + highlightCurrent(); + } + + function highlightCurrent() { + matches.forEach((m, i) => m.classList.toggle("current", i === idx)); + if (matches[idx]) { + matches[idx].scrollIntoView({ block: "center", behavior: "smooth" }); + } + } + + function next() { + if (!matches.length) return; + idx = (idx + 1) % matches.length; + highlightCurrent(); + } + + function prev() { + if (!matches.length) return; + idx = (idx - 1 + matches.length) % matches.length; + highlightCurrent(); + } + + function openFindBar() { + state.findOpen = true; + bar.classList.remove("hidden"); + input.focus(); + input.select(); + } + + function closeFindBar() { + state.findOpen = false; + bar.classList.add("hidden"); + clearMarks(); + input.value = ""; + } + + bar.querySelector("#find-next").addEventListener("click", next); + bar.querySelector("#find-prev").addEventListener("click", prev); + bar.querySelector("#find-close").addEventListener("click", closeFindBar); + input.addEventListener("input", () => search(input.value)); + caseCb.addEventListener("change", () => search(input.value)); + + document.addEventListener("keydown", (e) => { + // 查找条打开时输入框优先处理 Esc;否则全局 ⌘F 唤起。 + if (state.findOpen && e.key === "Escape") { + e.preventDefault(); + closeFindBar(); + return; + } + const meta = e.metaKey || e.ctrlKey; + if (!meta) return; + const k = e.key.toLowerCase(); + if (k === "f") { + e.preventDefault(); + openFindBar(); + } else if (state.findOpen && k === "g") { + e.preventDefault(); + if (e.shiftKey) prev(); + else next(); + } + }); } window.__mdeye = { @@ -336,6 +515,7 @@ window.__mdeyeVersion = __MDEYE_VERSION__; bindUi(); setTheme("sepia"); +applyPrefsToDom(); showEmpty(); post({ type: "ready", version: window.__mdeyeVersion }); setTimeout(() => post({ type: "ready", version: window.__mdeyeVersion }), 50); diff --git a/reader/src/md.js b/reader/src/md.js index 78b03d3..9012ab4 100644 --- a/reader/src/md.js +++ b/reader/src/md.js @@ -3,6 +3,10 @@ import anchor from "markdown-it-anchor"; import taskLists from "markdown-it-task-lists"; import hljs from "highlight.js/lib/core"; +// F4:KaTeX 数学公式(离线,esbuild 静态 import → 打进同一 IIFE,禁止动态 import)。 +import katex from "katex"; +import texmath from "markdown-it-texmath"; + import javascript from "highlight.js/lib/languages/javascript"; import typescript from "highlight.js/lib/languages/typescript"; import python from "highlight.js/lib/languages/python"; @@ -86,6 +90,14 @@ md.use(anchor, { md.use(taskLists, { enabled: true, label: true, labelAfter: true }); +// F4:行内 $...$ 与块级 $$...$$。texmath 默认对 fenced code / code_block 跳过, +// 不会把代码块里的 $ 误当公式。 +md.use(texmath, { + engine: katex, + delimiter: "$", + katexOptions: { throwOnError: false, strict: false, output: "html" }, +}); + /** * Rewrite relative image src to mdeye-asset:// scheme. * Absolute http(s)/data/mdeye-asset left as-is (http blocked by CSP). diff --git a/reader/styles/reader.css b/reader/styles/reader.css index f5dfbac..8613164 100644 --- a/reader/styles/reader.css +++ b/reader/styles/reader.css @@ -2,6 +2,11 @@ box-sizing: border-box; } +:root { + --font-scale: 1; + --content-max-width-px: 672px; +} + html, body { margin: 0; @@ -10,7 +15,8 @@ body { color: var(--fg); font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif; - font-size: 16px; + /* F1:屏幕字号随 --font-scale 缩放;rem 的 h1-h3 自动跟动。打印用 @media print 固定。 */ + font-size: calc(16px * var(--font-scale, 1)); line-height: 1.65; } @@ -135,7 +141,7 @@ body { } .markdown-body > * { - max-width: 42rem; + max-width: var(--content-max-width-px, 42rem); margin-left: auto; margin-right: auto; } @@ -264,7 +270,7 @@ body { border: none; border-top: 1px solid var(--border); margin: 2em auto; - max-width: 42rem; + max-width: var(--content-max-width-px, 42rem); } .markdown-body input[type="checkbox"] { @@ -301,6 +307,100 @@ body { border-color: #8a4040; } +/* F4:KaTeX 块级公式横向溢出可滚,避免宽公式撑破栏宽。 */ +.markdown-body .katex-display { + overflow-x: auto; + overflow-y: hidden; + padding: 4px 0; +} + +/* F5:文内查找条(纯 JS,fixed top-right 胶囊)。 */ +.find-bar { + position: fixed; + top: 8px; + right: 14px; + z-index: 10; + display: flex; + align-items: center; + gap: 6px; + background: var(--bg-elevated); + border: 1px solid var(--border); + border-radius: 8px; + padding: 4px 8px; + box-shadow: 0 2px 8px var(--shadow); +} +.find-bar.hidden { + display: none; +} +.find-bar input { + border: 1px solid var(--border); + background: var(--bg); + color: var(--fg); + border-radius: 6px; + padding: 2px 6px; + font-size: 13px; + width: 200px; + outline: none; +} +.find-bar input:focus { + border-color: var(--link); +} +.find-bar button { + border: 1px solid var(--border); + background: var(--bg); + color: var(--fg); + border-radius: 6px; + padding: 2px 8px; + font-size: 12px; + cursor: pointer; +} +.find-bar button:hover { + border-color: var(--fg-muted); +} +.find-case { + font-size: 12px; + color: var(--fg-muted); + display: flex; + align-items: center; + gap: 3px; + user-select: none; +} +mark.mdeye-find { + background: #ffe89a; + color: inherit; + border-radius: 2px; +} +mark.mdeye-find.current { + background: #ff9a3c; +} +[data-theme="dark"] mark.mdeye-find { + background: rgba(255, 200, 80, 0.4); +} +[data-theme="dark"] mark.mdeye-find.current { + background: rgba(255, 140, 40, 0.7); +} + +/* F6:阅读器轻提示浮层(fixed bottom-center 胶囊,3s 自动消失)。 */ +.mdeye-toast { + position: fixed; + left: 50%; + bottom: 28px; + transform: translateX(-50%); + background: var(--bg-elevated); + color: var(--fg); + border: 1px solid var(--border); + border-radius: 8px; + padding: 10px 14px; + font-size: 13px; + line-height: 1.45; + box-shadow: 0 4px 16px var(--shadow); + z-index: 20; + max-width: 80vw; +} +.mdeye-toast.warn { + border-color: #d39b00; +} + /* PDF export uses a dedicated WKWebView and WebKit's print pagination. Paper size and 16 mm margins are configured by NSPrintInfo, not duplicated here. */ @media print { @@ -338,6 +438,8 @@ body { body { background: #ffffff !important; color: var(--fg) !important; + /* F1:打印固定字号,屏幕缩放不污染 PDF。 */ + font-size: 16px !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; } @@ -354,6 +456,29 @@ body { margin-right: 0; } + /* F1:栏宽变量在打印时同样收起铺满纸面。 */ + .markdown-body hr { + max-width: none !important; + } + + /* F4:块级公式横向溢出在分页时安全滚动,不再保留屏显的外边距。 */ + .markdown-body .katex-display { + overflow: visible !important; + break-inside: avoid; + } + + /* F5/F6:阅读器浮层不进 PDF。 */ + .find-bar, + .mdeye-toast { + display: none !important; + } + + /* F5:查找高亮在打印中退化为普通文本样式。 */ + mark.mdeye-find { + background: transparent !important; + color: inherit !important; + } + a { color: inherit !important; text-decoration: none !important; diff --git a/reader/test/md.test.mjs b/reader/test/md.test.mjs index a6cdec7..3de7be0 100644 --- a/reader/test/md.test.mjs +++ b/reader/test/md.test.mjs @@ -112,3 +112,11 @@ test("extractOutlineFromHtml: empty html returns []", () => { assert.deepEqual(extractOutlineFromHtml(""), []); assert.deepEqual(extractOutlineFromHtml("

    no headings

    "), []); }); + +test("renderMarkdown: inline and block math render via KaTeX", () => { + const html = renderMarkdown("行内 $a^2+b^2=c^2$ 公式\n\n$$\\int_0^1 x\\,dx = 0.5$$\n"); + assert.match(html, /"$ENC_DIR/gb18030.md" 2>/dev/null; then + : +else + echo "WARN: iconv GB18030 conversion failed; skipping gb18030 case" >&2 + : >"$ENC_DIR/gb18030.md" +fi +cp "$ROOT/fixtures/ascii.md" "$ENC_DIR/ascii.md" +cp "$ROOT/fixtures/rich-text-marker.md" "$ENC_DIR/rich-text-marker.md" + +echo "== encoding selftest ==" +"$BIN" --encoding-selftest "$ENC_DIR/ascii.md" utf-8 +if [[ -s "$ENC_DIR/gb18030.md" ]]; then + "$BIN" --encoding-selftest "$ENC_DIR/gb18030.md" gb18030 +fi + +echo "== rich-text marker selftest ==" +"$BIN" --rich-text-selftest "$ENC_DIR/rich-text-marker.md" 1 +"$BIN" --rich-text-selftest "$ENC_DIR/ascii.md" 0 + cat >"$MD" <<'EOF' # Selftest A paragraph with **bold** and `inline code`. +行内公式 $E=mc^2$,块级: + +$$\sum_{i=1}^n i = \frac{n(n+1)}{2}$$ + | a | b | | - | - | | 1 | 2 |