@flowfuse/node-red-dashboard 1.31.0 → 1.31.1-0abe89c-202609211346.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/nodes/config/ui_base.js +15 -1
- package/nodes/store/clients.js +71 -0
- package/nodes/utils/index.js +8 -1
- package/nodes/widgets/locales/en-US/ui_control.json +2 -1
- package/nodes/widgets/ui_chart.js +7 -3
- package/nodes/widgets/ui_control.html +1 -1
- package/nodes/widgets/ui_control.js +28 -0
- package/package.json +4 -4
- package/dist/apple-touch-icon.png +0 -0
- package/dist/assets/abnfDiagram-N423BO3Z-BOzAedUe.js +0 -1
- package/dist/assets/architectureDiagram-T3A2C74G-zEM8gtfO.js +0 -36
- package/dist/assets/blockDiagram-VBNYF7ZC-eKuDT4u2.js +0 -132
- package/dist/assets/c4Diagram-5PPSVZJV-CRPvpwR2.js +0 -10
- package/dist/assets/chunk-2GRJ4B5K-BUP9p1Ar.js +0 -1
- package/dist/assets/chunk-2Q5K7J3B-DASHHxaC.js +0 -1
- package/dist/assets/chunk-5RXB4S5H-C76llYJF.js +0 -231
- package/dist/assets/chunk-5VM5RSS4-DnmzQEFn.js +0 -15
- package/dist/assets/chunk-6Q2QTUOP-DpGB6o5S.js +0 -88
- package/dist/assets/chunk-GF5L2VYU-Bhzwn3VL.js +0 -206
- package/dist/assets/chunk-JWPE2WC7-UNqcBwu_.js +0 -1
- package/dist/assets/chunk-KBJHAD2P-C38IW_UU.js +0 -1
- package/dist/assets/chunk-RYQCIY6F-COKxTTcO.js +0 -1
- package/dist/assets/chunk-XXDRQBXY-BS0ojEzX.js +0 -1
- package/dist/assets/classDiagram-JCYQIIEL-CxMqqBtQ.js +0 -1
- package/dist/assets/classDiagram-v2-OCEON4UE-CxMqqBtQ.js +0 -1
- package/dist/assets/cose-bilkent-JH36ORCC-9jRlXuji.js +0 -1
- package/dist/assets/cynefin-VYW2F7L2-BDPznSFQ.js +0 -178
- package/dist/assets/cynefinDiagram-MW4NZA55-lSqlEkCZ.js +0 -62
- package/dist/assets/cytoscape.esm-D_LviqZs.js +0 -331
- package/dist/assets/dagre-VZM6K2ZE-Dfoe_jp9.js +0 -4
- package/dist/assets/diagram-7IWD3JNH-Df2T__dV.js +0 -30
- package/dist/assets/diagram-B4RE2ZJO-DoGtC0h7.js +0 -3
- package/dist/assets/diagram-LBJQPF4R-cH8DVJ6C.js +0 -24
- package/dist/assets/diagram-Q27KOJAE-8JJAGHRF.js +0 -24
- package/dist/assets/diagram-UB23O5K3-BGCDqdpG.js +0 -41
- package/dist/assets/disconnected-BuxohaUu.png +0 -0
- package/dist/assets/ebnfDiagram-BXEA7PRR-r2bgA64b.js +0 -1
- package/dist/assets/echarts-BB8VCqSB.js +0 -73
- package/dist/assets/erDiagram-JOGREHBK-BExdsKTd.js +0 -85
- package/dist/assets/flowDiagram-UKHOOZJN-B8wwUqLz.js +0 -156
- package/dist/assets/ganttDiagram-PKOTCBZU-SViiTCQN.js +0 -292
- package/dist/assets/gitGraphDiagram-DS77QQ5N-CmktWysd.js +0 -106
- package/dist/assets/graph-C9eacEi8.js +0 -1
- package/dist/assets/index-CizlQbSv.css +0 -13
- package/dist/assets/index-CrLoQPpq.js +0 -124
- package/dist/assets/infoDiagram-6WML65LV-BwUFVmXD.js +0 -2
- package/dist/assets/ishikawaDiagram-WSZJBQD7-Df6P2A6T.js +0 -70
- package/dist/assets/journeyDiagram-NVQOT4AX-Cjk4fifu.js +0 -139
- package/dist/assets/kanban-definition-27J2QSJJ-BcoyAznM.js +0 -89
- package/dist/assets/katex-C5jXJg4s.js +0 -257
- package/dist/assets/layout-DEXfKzaS.js +0 -1
- package/dist/assets/logo-DIAzbBuw.png +0 -0
- package/dist/assets/map-Czzmt4hB.js +0 -1
- package/dist/assets/materialdesignicons-webfont-B7mPwVP_.ttf +0 -0
- package/dist/assets/materialdesignicons-webfont-CSr8KVlo.eot +0 -0
- package/dist/assets/materialdesignicons-webfont-Dp5v-WZN.woff2 +0 -0
- package/dist/assets/materialdesignicons-webfont-PXm3-2wK.woff +0 -0
- package/dist/assets/mermaid-CX4mRs5N.js +0 -314
- package/dist/assets/mindmap-definition-FAOFIHXS-D6njotiS.js +0 -96
- package/dist/assets/pegDiagram-VL7TDLO6-CaA_iXxT.js +0 -1
- package/dist/assets/pieDiagram-7S7Q4E2Y-aYh5694F.js +0 -39
- package/dist/assets/quadrantDiagram-CIZ2JOQS-CaWyb4Jw.js +0 -7
- package/dist/assets/railroadDiagram-AXF67PYL-Bd_vMLsE.js +0 -1
- package/dist/assets/requirementDiagram-LRYGKXZP-CMxISoyd.js +0 -84
- package/dist/assets/sankeyDiagram-W5VNT64P-DLbFAyXe.js +0 -40
- package/dist/assets/sequenceDiagram-SI44F4Z6-CzdhMpvP.js +0 -162
- package/dist/assets/sizeCapture-X5ZJPWSS-CnezfYZ6.js +0 -1
- package/dist/assets/stateDiagram-OKZ733FA-5R9RLDEM.js +0 -1
- package/dist/assets/stateDiagram-v2-UEYNNEHI-Ck4l-gcT.js +0 -1
- package/dist/assets/swimlanes-SLNWSIFB-CeEnGZwJ.js +0 -2
- package/dist/assets/swimlanesDiagram-ULZ7WXOC-DSebamlh.js +0 -8
- package/dist/assets/timeline-definition-Z64GVDOM-ZMWCENQJ.js +0 -120
- package/dist/assets/vennDiagram-T6HMQDX7-DVr1jz1I.js +0 -34
- package/dist/assets/vue-vendor-Bmy9n80X.js +0 -49
- package/dist/assets/wardleyDiagram-T6FBY63Y-DNp6yzs5.js +0 -78
- package/dist/assets/workbox-window.prod.es5-BIl4cyR9.js +0 -2
- package/dist/assets/xychartDiagram-ELKLHX3M-DC4NZzl1.js +0 -7
- package/dist/favicon.ico +0 -0
- package/dist/favicon.svg +0 -482
- package/dist/index.html +0 -24
- package/dist/logo-512x512.png +0 -0
- package/dist/logo.svg +0 -482
- package/dist/maskable-icon-512x512.png +0 -0
- package/dist/pwa-192x192.png +0 -0
- package/dist/pwa-512x512.png +0 -0
- package/dist/pwa-64x64.png +0 -0
- package/dist/sw.js +0 -2
|
@@ -1,314 +0,0 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./dagre-VZM6K2ZE-Dfoe_jp9.js","./chunk-RYQCIY6F-COKxTTcO.js","./graph-C9eacEi8.js","./map-Czzmt4hB.js","./layout-DEXfKzaS.js","./swimlanes-SLNWSIFB-CeEnGZwJ.js","./cose-bilkent-JH36ORCC-9jRlXuji.js","./cytoscape.esm-D_LviqZs.js","./c4Diagram-5PPSVZJV-CRPvpwR2.js","./chunk-2GRJ4B5K-BUP9p1Ar.js","./flowDiagram-UKHOOZJN-B8wwUqLz.js","./chunk-5VM5RSS4-DnmzQEFn.js","./chunk-XXDRQBXY-BS0ojEzX.js","./chunk-KBJHAD2P-C38IW_UU.js","./swimlanesDiagram-ULZ7WXOC-DSebamlh.js","./erDiagram-JOGREHBK-BExdsKTd.js","./gitGraphDiagram-DS77QQ5N-CmktWysd.js","./chunk-2Q5K7J3B-DASHHxaC.js","./chunk-JWPE2WC7-UNqcBwu_.js","./cynefin-VYW2F7L2-BDPznSFQ.js","./infoDiagram-6WML65LV-BwUFVmXD.js","./pieDiagram-7S7Q4E2Y-aYh5694F.js","./requirementDiagram-LRYGKXZP-CMxISoyd.js","./sequenceDiagram-SI44F4Z6-CzdhMpvP.js","./classDiagram-JCYQIIEL-CxMqqBtQ.js","./chunk-GF5L2VYU-Bhzwn3VL.js","./classDiagram-v2-OCEON4UE-CxMqqBtQ.js","./stateDiagram-OKZ733FA-5R9RLDEM.js","./chunk-5RXB4S5H-C76llYJF.js","./stateDiagram-v2-UEYNNEHI-Ck4l-gcT.js","./journeyDiagram-NVQOT4AX-Cjk4fifu.js","./mindmap-definition-FAOFIHXS-D6njotiS.js","./kanban-definition-27J2QSJJ-BcoyAznM.js","./diagram-LBJQPF4R-cH8DVJ6C.js","./diagram-UB23O5K3-BGCDqdpG.js","./blockDiagram-VBNYF7ZC-eKuDT4u2.js","./diagram-7IWD3JNH-Df2T__dV.js","./architectureDiagram-T3A2C74G-zEM8gtfO.js","./diagram-B4RE2ZJO-DoGtC0h7.js","./diagram-Q27KOJAE-8JJAGHRF.js","./wardleyDiagram-T6FBY63Y-DNp6yzs5.js","./cynefinDiagram-MW4NZA55-lSqlEkCZ.js","./railroadDiagram-AXF67PYL-Bd_vMLsE.js","./chunk-6Q2QTUOP-DpGB6o5S.js","./ebnfDiagram-BXEA7PRR-r2bgA64b.js","./abnfDiagram-N423BO3Z-BOzAedUe.js","./pegDiagram-VL7TDLO6-CaA_iXxT.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
var ux=Object.defineProperty;var dx=(e,t,r)=>t in e?ux(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var Et=(e,t,r)=>dx(e,typeof t!="symbol"?t+"":t,r);const fx="modulepreload",gx=function(e,t){return new URL(e,t).href},zc={},kt=function(t,r,i){let a=Promise.resolve();if(r&&r.length>0){const o=document.getElementsByTagName("link"),n=document.querySelector("meta[property=csp-nonce]"),l=(n==null?void 0:n.nonce)||(n==null?void 0:n.getAttribute("nonce"));a=Promise.allSettled(r.map(h=>{if(h=gx(h,i),h in zc)return;zc[h]=!0;const c=h.endsWith(".css"),u=c?'[rel="stylesheet"]':"";if(!!i)for(let g=o.length-1;g>=0;g--){const p=o[g];if(p.href===h&&(!c||p.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${h}"]${u}`))return;const d=document.createElement("link");if(d.rel=c?"stylesheet":fx,c||(d.as="script"),d.crossOrigin="",d.href=h,l&&d.setAttribute("nonce",l),document.head.appendChild(d),c)return new Promise((g,p)=>{d.addEventListener("load",g),d.addEventListener("error",()=>p(new Error(`Unable to preload CSS for ${h}`)))})}))}function s(o){const n=new Event("vite:preloadError",{cancelable:!0});if(n.payload=o,window.dispatchEvent(n),!n.defaultPrevented)throw o}return a.then(o=>{for(const n of o||[])n.status==="rejected"&&s(n.reason);return t().catch(s)})};/*! @license DOMPurify 3.4.13 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.4.13/LICENSE */function Hc(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,i=Array(t);r<t;r++)i[r]=e[r];return i}function px(e){if(Array.isArray(e))return e}function mx(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var i,a,s,o,n=[],l=!0,h=!1;try{if(s=(r=r.call(e)).next,t!==0)for(;!(l=(i=s.call(r)).done)&&(n.push(i.value),n.length!==t);l=!0);}catch(c){h=!0,a=c}finally{try{if(!l&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(h)throw a}}return n}}function yx(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
3
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Cx(e,t){return px(e)||mx(e,t)||xx(e,t)||yx()}function xx(e,t){if(e){if(typeof e=="string")return Hc(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Hc(e,t):void 0}}const Yd=Object.entries,Uc=Object.setPrototypeOf,bx=Object.isFrozen,kx=Object.getPrototypeOf,wx=Object.getOwnPropertyDescriptor;let Jt=Object.freeze,te=Object.seal,mi=Object.create,Gd=typeof Reflect<"u"&&Reflect,rl=Gd.apply,il=Gd.construct;Jt||(Jt=function(t){return t});te||(te=function(t){return t});rl||(rl=function(t,r){for(var i=arguments.length,a=new Array(i>2?i-2:0),s=2;s<i;s++)a[s-2]=arguments[s];return t.apply(r,a)});il||(il=function(t){for(var r=arguments.length,i=new Array(r>1?r-1:0),a=1;a<r;a++)i[a-1]=arguments[a];return new t(...i)});const ui=Wt(Array.prototype.forEach),Tx=Wt(Array.prototype.lastIndexOf),Yc=Wt(Array.prototype.pop),di=Wt(Array.prototype.push),Sx=Wt(Array.prototype.splice),wr=Array.isArray,ba=Wt(String.prototype.toLowerCase),Sn=Wt(String.prototype.toString),Gc=Wt(String.prototype.match),oa=Wt(String.prototype.replace),Xc=Wt(String.prototype.indexOf),_x=Wt(String.prototype.trim),vx=Wt(Number.prototype.toString),Bx=Wt(Boolean.prototype.toString),jc=typeof BigInt>"u"?null:Wt(BigInt.prototype.toString),Vc=typeof Symbol>"u"?null:Wt(Symbol.prototype.toString),Yt=Wt(Object.prototype.hasOwnProperty),na=Wt(Object.prototype.toString),Ut=Wt(RegExp.prototype.test),Or=Lx(TypeError);function Wt(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var r=arguments.length,i=new Array(r>1?r-1:0),a=1;a<r;a++)i[a-1]=arguments[a];return rl(e,t,i)}}function Lx(e){return function(){for(var t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];return il(e,r)}}function vt(e,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:ba;if(Uc&&Uc(e,null),!wr(t))return e;let i=t.length;for(;i--;){let a=t[i];if(typeof a=="string"){const s=r(a);s!==a&&(bx(t)||(t[i]=s),a=s)}e[a]=!0}return e}function Fx(e){for(let t=0;t<e.length;t++)Yt(e,t)||(e[t]=null);return e}function re(e){const t=mi(null);for(const i of Yd(e)){var r=Cx(i,2);const a=r[0],s=r[1];Yt(e,a)&&(wr(s)?t[a]=Fx(s):s&&typeof s=="object"&&s.constructor===Object?t[a]=re(s):t[a]=s)}return t}function Mx(e){switch(typeof e){case"string":return e;case"number":return vx(e);case"boolean":return Bx(e);case"bigint":return jc?jc(e):"0";case"symbol":return Vc?Vc(e):"Symbol()";case"undefined":return na(e);case"function":case"object":{if(e===null)return na(e);const t=e,r=Be(t,"toString");if(typeof r=="function"){const i=r(t);return typeof i=="string"?i:na(i)}return na(e)}default:return na(e)}}function Be(e,t){for(;e!==null;){const i=wx(e,t);if(i){if(i.get)return Wt(i.get);if(typeof i.value=="function")return Wt(i.value)}e=kx(e)}function r(){return null}return r}function Ax(e){try{return Ut(e,""),!0}catch{return!1}}const Zc=Jt(["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=Jt(["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"]),vn=Jt(["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"]),Ex=Jt(["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"]),Bn=Jt(["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"]),$x=Jt(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),Qc=Jt(["#text"]),Kc=Jt(["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"]),Ln=Jt(["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"]),Jc=Jt(["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"]),Cs=Jt(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),Ox=te(/{{[\w\W]*|^[\w\W]*}}/g),Dx=te(/<%[\w\W]*|^[\w\W]*%>/g),Ix=te(/\${[\w\W]*/g),Px=te(/^data-[\-\w.\u00B7-\uFFFF]+$/),Rx=te(/^aria-[\-\w]+$/),tu=te(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Nx=te(/^(?:\w+script|data):/i),qx=te(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Wx=te(/^html$/i),zx=te(/^[a-z][.\w]*(-[.\w]+)+$/i),eu=te(/<[/\w!]/g),ru=te(/<[/\w]/g),Hx=te(/<\/no(script|embed|frames)/i),Ux=te(/\/>/i),be={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,processingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},Yx=function(){return typeof window>"u"?null:window},Gx=function(t,r){if(typeof t!="object"||typeof t.createPolicy!="function")return null;let i=null;const a="data-tt-policy-suffix";r&&r.hasAttribute(a)&&(i=r.getAttribute(a));const s="dompurify"+(i?"#"+i:"");try{return t.createPolicy(s,{createHTML(o){return o},createScriptURL(o){return o}})}catch{return console.warn("TrustedTypes policy "+s+" could not be created."),null}},iu=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},br=function(t,r,i,a){return Yt(t,r)&&wr(t[r])?vt(a.base?re(a.base):{},t[r],a.transform):i};function Xd(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Yx();const t=K=>Xd(K);if(t.version="3.4.13",t.removed=[],!e||!e.document||e.document.nodeType!==be.document||!e.Element)return t.isSupported=!1,t;let r=e.document;const i=r,a=i.currentScript;e.DocumentFragment;const s=e.HTMLTemplateElement,o=e.Node,n=e.Element,l=e.NodeFilter,h=e.NamedNodeMap;h===void 0&&(e.NamedNodeMap||e.MozNamedAttrMap),e.HTMLFormElement;const c=e.DOMParser,u=e.trustedTypes,f=n.prototype,d=Be(f,"cloneNode"),g=Be(f,"remove"),p=Be(f,"nextSibling"),m=Be(f,"childNodes"),C=Be(f,"parentNode"),x=Be(f,"shadowRoot"),k=Be(f,"attributes"),w=o&&o.prototype?Be(o.prototype,"nodeType"):null,S=o&&o.prototype?Be(o.prototype,"nodeName"):null,_=o&&o.prototype?Be(o.prototype,"ownerDocument"):null;if(typeof s=="function"){const K=r.createElement("template");K.content&&K.content.ownerDocument&&(r=K.content.ownerDocument)}let v,D="",H,R=!1,B=0;const U=function(){if(B>0)throw Or('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.')},A=function(T){U(),B++;try{return v.createHTML(T)}finally{B--}},M=function(T){U(),B++;try{return v.createScriptURL(T)}finally{B--}},E=function(){return R||(H=Gx(u,a),R=!0),H},L=r,I=L.implementation,$=L.createNodeIterator,q=L.createDocumentFragment,X=L.getElementsByTagName,J=i.importNode;let Q=iu();t.isSupported=typeof Yd=="function"&&typeof C=="function"&&I&&I.createHTMLDocument!==void 0;const lt=Ox,st=Dx,ot=Ix,xt=Px,Ct=Rx,St=Nx,V=qx,Y=zx;let Z=tu,N=null;const dt=vt({},[...Zc,..._n,...vn,...Bn,...Qc]);let F=null;const it=vt({},[...Kc,...Ln,...Jc,...Cs]);let Tt=Object.seal(mi(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}})),ge=null,er=null;const mr=Object.seal(mi(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let kc=!0,cn=!0,wc=!1,Tc=!0,yr=!1,Cr=!0,Er=!1,un=!1,ns=null,ls=null,dn=!1,oi=!1,hs=!1,cs=!1,Sc=!0,_c=!1;const vc="user-content-";let fn=!0,us=!1,ni={},qe=null;const gn=vt({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","selectedcontent","style","svg","template","thead","title","video","xmp"]);let Bc=null;const Lc=vt({},["audio","video","img","source","image","track"]);let pn=null;const Fc=vt({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),ds="http://www.w3.org/1998/Math/MathML",fs="http://www.w3.org/2000/svg",We="http://www.w3.org/1999/xhtml";let li=We,mn=!1,yn=null;const VC=vt({},[ds,fs,We],Sn),Mc=Jt(["mi","mo","mn","ms","mtext"]);let Cn=vt({},Mc);const Ac=Jt(["annotation-xml"]);let xn=vt({},Ac);const ZC=vt({},["title","style","font","a","script"]);let ia=null;const QC=["application/xhtml+xml","text/html"],KC="text/html";let Ot=null,hi=null;const JC=r.createElement("form"),Ec=function(T){return T instanceof RegExp||T instanceof Function},bn=function(){let T=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(hi&&hi===T)return;(!T||typeof T!="object")&&(T={}),T=re(T),ia=QC.indexOf(T.PARSER_MEDIA_TYPE)===-1?KC:T.PARSER_MEDIA_TYPE,Ot=ia==="application/xhtml+xml"?Sn:ba,N=br(T,"ALLOWED_TAGS",dt,{transform:Ot}),F=br(T,"ALLOWED_ATTR",it,{transform:Ot}),yn=br(T,"ALLOWED_NAMESPACES",VC,{transform:Sn}),pn=br(T,"ADD_URI_SAFE_ATTR",Fc,{transform:Ot,base:Fc}),Bc=br(T,"ADD_DATA_URI_TAGS",Lc,{transform:Ot,base:Lc}),qe=br(T,"FORBID_CONTENTS",gn,{transform:Ot}),ge=br(T,"FORBID_TAGS",re({}),{transform:Ot}),er=br(T,"FORBID_ATTR",re({}),{transform:Ot}),ni=Yt(T,"USE_PROFILES")?T.USE_PROFILES&&typeof T.USE_PROFILES=="object"?re(T.USE_PROFILES):T.USE_PROFILES:!1,kc=T.ALLOW_ARIA_ATTR!==!1,cn=T.ALLOW_DATA_ATTR!==!1,wc=T.ALLOW_UNKNOWN_PROTOCOLS||!1,Tc=T.ALLOW_SELF_CLOSE_IN_ATTR!==!1,yr=T.SAFE_FOR_TEMPLATES||!1,Cr=T.SAFE_FOR_XML!==!1,Er=T.WHOLE_DOCUMENT||!1,oi=T.RETURN_DOM||!1,hs=T.RETURN_DOM_FRAGMENT||!1,cs=T.RETURN_TRUSTED_TYPE||!1,dn=T.FORCE_BODY||!1,Sc=T.SANITIZE_DOM!==!1,_c=T.SANITIZE_NAMED_PROPS||!1,fn=T.KEEP_CONTENT!==!1,us=T.IN_PLACE||!1,Z=Ax(T.ALLOWED_URI_REGEXP)?T.ALLOWED_URI_REGEXP:tu,li=typeof T.NAMESPACE=="string"?T.NAMESPACE:We,Cn=Yt(T,"MATHML_TEXT_INTEGRATION_POINTS")&&T.MATHML_TEXT_INTEGRATION_POINTS&&typeof T.MATHML_TEXT_INTEGRATION_POINTS=="object"?re(T.MATHML_TEXT_INTEGRATION_POINTS):vt({},Mc),xn=Yt(T,"HTML_INTEGRATION_POINTS")&&T.HTML_INTEGRATION_POINTS&&typeof T.HTML_INTEGRATION_POINTS=="object"?re(T.HTML_INTEGRATION_POINTS):vt({},Ac);const P=Yt(T,"CUSTOM_ELEMENT_HANDLING")&&T.CUSTOM_ELEMENT_HANDLING&&typeof T.CUSTOM_ELEMENT_HANDLING=="object"?re(T.CUSTOM_ELEMENT_HANDLING):mi(null);if(Tt=mi(null),Yt(P,"tagNameCheck")&&Ec(P.tagNameCheck)&&(Tt.tagNameCheck=P.tagNameCheck),Yt(P,"attributeNameCheck")&&Ec(P.attributeNameCheck)&&(Tt.attributeNameCheck=P.attributeNameCheck),Yt(P,"allowCustomizedBuiltInElements")&&typeof P.allowCustomizedBuiltInElements=="boolean"&&(Tt.allowCustomizedBuiltInElements=P.allowCustomizedBuiltInElements),te(Tt),yr&&(cn=!1),hs&&(oi=!0),ni&&(N=vt({},Qc),F=mi(null),ni.html===!0&&(vt(N,Zc),vt(F,Kc)),ni.svg===!0&&(vt(N,_n),vt(F,Ln),vt(F,Cs)),ni.svgFilters===!0&&(vt(N,vn),vt(F,Ln),vt(F,Cs)),ni.mathMl===!0&&(vt(N,Bn),vt(F,Jc),vt(F,Cs))),mr.tagCheck=null,mr.attributeCheck=null,Yt(T,"ADD_TAGS")&&(typeof T.ADD_TAGS=="function"?mr.tagCheck=T.ADD_TAGS:wr(T.ADD_TAGS)&&(N===dt&&(N=re(N)),vt(N,T.ADD_TAGS,Ot))),Yt(T,"ADD_ATTR")&&(typeof T.ADD_ATTR=="function"?mr.attributeCheck=T.ADD_ATTR:wr(T.ADD_ATTR)&&(F===it&&(F=re(F)),vt(F,T.ADD_ATTR,Ot))),Yt(T,"ADD_URI_SAFE_ATTR")&&wr(T.ADD_URI_SAFE_ATTR)&&vt(pn,T.ADD_URI_SAFE_ATTR,Ot),Yt(T,"FORBID_CONTENTS")&&wr(T.FORBID_CONTENTS)&&(qe===gn&&(qe=re(qe)),vt(qe,T.FORBID_CONTENTS,Ot)),Yt(T,"ADD_FORBID_CONTENTS")&&wr(T.ADD_FORBID_CONTENTS)&&(qe===gn&&(qe=re(qe)),vt(qe,T.ADD_FORBID_CONTENTS,Ot)),fn&&(N["#text"]=!0),Er&&vt(N,["html","head","body"]),N.table&&(vt(N,["tbody"]),delete ge.tbody),T.TRUSTED_TYPES_POLICY){if(typeof T.TRUSTED_TYPES_POLICY.createHTML!="function")throw Or('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof T.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw Or('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');const j=v;v=T.TRUSTED_TYPES_POLICY;try{D=A("")}catch(ht){throw v=j,ht}}else T.TRUSTED_TYPES_POLICY===null?(v=void 0,D=""):(v===void 0&&(v=E()),v&&typeof D=="string"&&(D=A("")));Jt&&Jt(T),hi=T},$c=vt({},[..._n,...vn,...Ex]),Oc=vt({},[...Bn,...$x]),tx=function(T,P,j){return P.namespaceURI===We?T==="svg":P.namespaceURI===ds?T==="svg"&&(j==="annotation-xml"||Cn[j]):!!$c[T]},ex=function(T,P,j){return P.namespaceURI===We?T==="math":P.namespaceURI===fs?T==="math"&&xn[j]:!!Oc[T]},rx=function(T,P,j){return P.namespaceURI===fs&&!xn[j]||P.namespaceURI===ds&&!Cn[j]?!1:!Oc[T]&&(ZC[T]||!$c[T])},ix=function(T){let P=C(T);(!P||!P.tagName)&&(P={namespaceURI:li,tagName:"template"});const j=ba(T.tagName),ht=ba(P.tagName);return yn[T.namespaceURI]?T.namespaceURI===fs?tx(j,P,ht):T.namespaceURI===ds?ex(j,P,ht):T.namespaceURI===We?rx(j,P,ht):!!(ia==="application/xhtml+xml"&&yn[T.namespaceURI]):!1},xr=function(T){di(t.removed,{element:T});try{C(T).removeChild(T)}catch{if(g(T),!C(T))throw Or("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place")}},gs=function(T){aa(T);const P=m(T);if(P){const ht=[];ui(P,ut=>{di(ht,ut)}),ui(ht,ut=>{try{g(ut)}catch{}})}const j=k(T);if(j)for(let ht=j.length-1;ht>=0;--ht){const ut=j[ht],bt=ut&&ut.name;if(typeof bt=="string")try{T.removeAttribute(bt)}catch{}}},$r=function(T,P){try{di(t.removed,{attribute:P.getAttributeNode(T),from:P})}catch{di(t.removed,{attribute:null,from:P})}if(P.removeAttribute(T),T==="is")if(oi||hs)try{xr(P)}catch{}else try{P.setAttribute(T,"")}catch{}},ax=function(T){const P=k(T);if(P)for(let j=P.length-1;j>=0;--j){const ht=P[j],ut=ht&&ht.name;if(!(typeof ut!="string"||F[Ot(ut)]))try{T.removeAttribute(ut)}catch{}}},aa=function(T){const P=[T];for(;P.length>0;){const j=P.pop();(w?w(j):j.nodeType)===be.element&&ax(j);const ut=m(j);if(ut)for(let bt=ut.length-1;bt>=0;--bt)P.push(ut[bt])}},sx=function(T){if(!Cr)return;const P=[T];for(;P.length>0;){const j=P.pop(),ht=w?w(j):j.nodeType;if(ht===be.processingInstruction||ht===be.comment&&Ut(ru,j.data)){try{g(j)}catch{}continue}if(ht===be.element){const bt=j,At=Ot(S?S(j):j.nodeName);try{bt.hasAttribute&&bt.hasAttribute("patchsrc")&&bt.removeAttribute("patchsrc"),bt.hasAttribute&&bt.hasAttribute("for")&&At!=="label"&&At!=="output"&&bt.removeAttribute("for")}catch{}}const ut=m(j);if(ut)for(let bt=ut.length-1;bt>=0;--bt)P.push(ut[bt])}},Dc=function(T){let P=null,j=null;if(dn)T="<remove></remove>"+T;else{const bt=Gc(T,/^[\r\n\t ]+/);j=bt&&bt[0]}ia==="application/xhtml+xml"&&li===We&&(T='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+T+"</body></html>");const ht=v?A(T):T;if(li===We)try{P=new c().parseFromString(ht,ia)}catch{}if(!P||!P.documentElement){P=I.createDocument(li,"template",null);try{P.documentElement.innerHTML=mn?D:ht}catch{}}const ut=P.body||P.documentElement;return T&&j&&ut.insertBefore(r.createTextNode(j),ut.childNodes[0]||null),li===We?X.call(P,Er?"html":"body")[0]:Er?P.documentElement:ut},Ic=function(T){const P=_?_(T):T.ownerDocument;return $.call(P||T,T,l.SHOW_ELEMENT|l.SHOW_COMMENT|l.SHOW_TEXT|l.SHOW_PROCESSING_INSTRUCTION|l.SHOW_CDATA_SECTION,null)},ps=function(T){return T=oa(T,lt," "),T=oa(T,st," "),T=oa(T,ot," "),T},kn=function(T){var P;T.normalize();const j=_?_(T):T.ownerDocument,ht=$.call(j||T,T,l.SHOW_TEXT|l.SHOW_COMMENT|l.SHOW_CDATA_SECTION|l.SHOW_PROCESSING_INSTRUCTION,null);let ut=ht.nextNode();for(;ut;)ut.data=ps(ut.data),ut=ht.nextNode();const bt=(P=T.querySelectorAll)===null||P===void 0?void 0:P.call(T,"template");bt&&ui(bt,At=>{ci(At.content)&&kn(At.content)})},ms=function(T){const P=S?S(T):null;return typeof P!="string"||Ot(P)!=="form"?!1:typeof T.nodeName!="string"||typeof T.textContent!="string"||typeof T.removeChild!="function"||T.attributes!==k(T)||typeof T.removeAttribute!="function"||typeof T.setAttribute!="function"||typeof T.namespaceURI!="string"||typeof T.insertBefore!="function"||typeof T.hasChildNodes!="function"||T.nodeType!==w(T)||T.childNodes!==m(T)},ci=function(T){if(!w||typeof T!="object"||T===null)return!1;try{return w(T)===be.documentFragment}catch{return!1}},sa=function(T){if(!w||typeof T!="object"||T===null)return!1;try{return typeof w(T)=="number"}catch{return!1}};function ze(K,T,P){K.length!==0&&ui(K,j=>{j.call(t,T,P,hi)})}const ox=function(T,P){return!!(Cr&&T.hasChildNodes()&&!sa(T.firstElementChild)&&Ut(eu,T.textContent)&&Ut(eu,T.innerHTML)||Cr&&T.namespaceURI===We&&P==="style"&&sa(T.firstElementChild)||T.nodeType===be.processingInstruction||Cr&&T.nodeType===be.comment&&Ut(ru,T.data))},nx=function(T,P,j){if(!ge[P]&&qc(P)&&(Tt.tagNameCheck instanceof RegExp&&Ut(Tt.tagNameCheck,P)||Tt.tagNameCheck instanceof Function&&Tt.tagNameCheck(P)))return!1;if(fn&&!qe[P]){const ht=C(T),ut=m(T);if(ut&&ht){const bt=ut.length;for(let At=bt-1;At>=0;--At){const Dt=T===j?d(ut[At],!0):ut[At];ht.insertBefore(Dt,p(T))}}}return xr(T),!0},Pc=function(T,P,j,ht){return T.length===0?P:P===j||P===ht?re(P):P},Rc=function(T,P){if(ze(Q.beforeSanitizeElements,T,null),T!==P&&C(T)===null)return us&&aa(T),!0;if(ms(T))return xr(T),!0;const j=Ot(S?S(T):T.nodeName);if(N=Pc(Q.uponSanitizeElement,N,dt,ns),ze(Q.uponSanitizeElement,T,{tagName:j,allowedTags:N}),T!==P&&C(T)===null)return us&&aa(T),!0;if(ox(T,j))return xr(T),!0;if(ge[j]||!(mr.tagCheck instanceof Function&&mr.tagCheck(j))&&!N[j]){const ut=nx(T,j,P);return ut===!1&&ze(Q.afterSanitizeElements,T,null),ut}if((w?w(T):T.nodeType)===be.element&&!ix(T)||(j==="noscript"||j==="noembed"||j==="noframes")&&Ut(Hx,T.innerHTML))return xr(T),!0;if(yr&&T.nodeType===be.text){const ut=ps(T.textContent);T.textContent!==ut&&(di(t.removed,{element:T.cloneNode()}),T.textContent=ut)}return ze(Q.afterSanitizeElements,T,null),!1},Nc=function(T,P,j){if(er[P]||Cr&&P==="patchsrc"||Cr&&P==="for"&&T!=="label"&&T!=="output"||Sc&&(P==="id"||P==="name")&&(j in r||j in JC))return!1;const ht=F[P]||mr.attributeCheck instanceof Function&&mr.attributeCheck(P,T);if(!(cn&&Ut(xt,P))){if(!(kc&&Ut(Ct,P))){if(ht){if(!pn[P]){if(!Ut(Z,oa(j,V,""))){if(!((P==="src"||P==="xlink:href"||P==="href")&&T!=="script"&&Xc(j,"data:")===0&&Bc[T])){if(!(wc&&!Ut(St,oa(j,V,"")))){if(j)return!1}}}}}else if(!(qc(T)&&(Tt.tagNameCheck instanceof RegExp&&Ut(Tt.tagNameCheck,T)||Tt.tagNameCheck instanceof Function&&Tt.tagNameCheck(T))&&(Tt.attributeNameCheck instanceof RegExp&&Ut(Tt.attributeNameCheck,P)||Tt.attributeNameCheck instanceof Function&&Tt.attributeNameCheck(P,T))||P==="is"&&Tt.allowCustomizedBuiltInElements&&(Tt.tagNameCheck instanceof RegExp&&Ut(Tt.tagNameCheck,j)||Tt.tagNameCheck instanceof Function&&Tt.tagNameCheck(j))))return!1}}return!0},lx=vt({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),qc=function(T){return!lx[ba(T)]&&Ut(Y,T)},hx=function(T,P,j,ht){if(v&&typeof u=="object"&&typeof u.getAttributeType=="function"&&!j)switch(u.getAttributeType(T,P)){case"TrustedHTML":return A(ht);case"TrustedScriptURL":return M(ht)}return ht},cx=function(T,P,j,ht){try{j?T.setAttributeNS(j,P,ht):T.setAttribute(P,ht),ms(T)?xr(T):Yc(t.removed)}catch{$r(P,T)}},Wc=function(T){ze(Q.beforeSanitizeAttributes,T,null);const P=T.attributes;if(!P||ms(T))return;F=Pc(Q.uponSanitizeAttribute,F,it,ls);const j={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:F,forceKeepAttr:void 0};let ht=P.length;const ut=Ot(T.nodeName);for(;ht--;){const bt=P[ht],At=bt.name,Dt=bt.namespaceURI,pe=bt.value,me=Ot(At),Tn=pe;let ce=At==="value"?Tn:_x(Tn);if(j.attrName=me,j.attrValue=ce,j.keepAttr=!0,j.forceKeepAttr=void 0,ze(Q.uponSanitizeAttribute,T,j),ce=j.attrValue,_c&&(me==="id"||me==="name")&&Xc(ce,vc)!==0&&($r(At,T),ce=vc+ce),Cr&&Ut(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,ce)){$r(At,T);continue}if(me==="attributename"&&Gc(ce,"href")){$r(At,T);continue}if(!j.forceKeepAttr){if(!j.keepAttr){$r(At,T);continue}if(!Tc&&Ut(Ux,ce)){$r(At,T);continue}if(yr&&(ce=ps(ce)),!Nc(ut,me,ce)){$r(At,T);continue}ce=hx(ut,me,Dt,ce),ce!==Tn&&cx(T,At,Dt,ce)}}ze(Q.afterSanitizeAttributes,T,null)},ys=function(T){let P=null;const j=Ic(T);for(ze(Q.beforeSanitizeShadowDOM,T,null);P=j.nextNode();)if(ze(Q.uponSanitizeShadowNode,P,null),Rc(P,T),Wc(P),ci(P.content)&&ys(P.content),(w?w(P):P.nodeType)===be.element){const ut=x(P);ci(ut)&&(wn(ut),ys(ut))}ze(Q.afterSanitizeShadowDOM,T,null)},wn=function(T){const P=[{node:T,shadow:null}];for(;P.length>0;){const j=P.pop();if(j.shadow){ys(j.shadow);continue}const ht=j.node,bt=(w?w(ht):ht.nodeType)===be.element,At=m(ht);if(At)for(let Dt=At.length-1;Dt>=0;--Dt)P.push({node:At[Dt],shadow:null});if(bt){const Dt=S?S(ht):null;if(typeof Dt=="string"&&Ot(Dt)==="template"){const pe=ht.content;ci(pe)&&P.push({node:pe,shadow:null})}}if(bt){const Dt=x(ht);ci(Dt)&&P.push({node:null,shadow:Dt},{node:Dt,shadow:null})}}};return t.sanitize=function(K){let T=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},P=null,j=null,ht=null,ut=null;if(mn=!K,mn&&(K="<!-->"),typeof K!="string"&&!sa(K)&&(K=Mx(K),typeof K!="string"))throw Or("dirty is not a string, aborting");if(!t.isSupported)return K;un?(N=ns,F=ls):bn(T),(Q.uponSanitizeElement.length>0||Q.uponSanitizeAttribute.length>0)&&(N=re(N)),Q.uponSanitizeAttribute.length>0&&(F=re(F)),t.removed=[];const bt=us&&typeof K!="string"&&sa(K);if(bt){sx(K);const pe=S?S(K):K.nodeName;if(typeof pe=="string"){const me=Ot(pe);if(!N[me]||ge[me])throw gs(K),Or("root node is forbidden and cannot be sanitized in-place")}if(ms(K))throw gs(K),Or("root node is clobbered and cannot be sanitized in-place");try{wn(K)}catch(me){throw gs(K),me}}else if(sa(K))P=Dc("<!---->"),j=P.ownerDocument.importNode(K,!0),j.nodeType===be.element&&j.nodeName==="BODY"||j.nodeName==="HTML"?P=j:P.appendChild(j),wn(j);else{if(!oi&&!yr&&!Er&&K.indexOf("<")===-1)return v&&cs?A(K):K;if(P=Dc(K),!P)return oi?null:cs?D:""}P&&dn&&xr(P.firstChild);const At=bt?K:P;try{const pe=Ic(At);for(;ht=pe.nextNode();)Rc(ht,At),Wc(ht),ci(ht.content)&&ys(ht.content)}catch(pe){throw bt&&(gs(K),ui(t.removed,me=>{me.element&&aa(me.element)})),pe}if(bt)return ui(t.removed,pe=>{pe.element&&aa(pe.element)}),yr&&kn(K),K;if(oi){if(yr&&kn(P),hs)for(ut=q.call(P.ownerDocument);P.firstChild;)ut.appendChild(P.firstChild);else ut=P;return(F.shadowroot||F.shadowrootmode)&&(ut=J.call(i,ut,!0)),ut}let Dt=Er?P.outerHTML:P.innerHTML;return Er&&N["!doctype"]&&P.ownerDocument&&P.ownerDocument.doctype&&P.ownerDocument.doctype.name&&Ut(Wx,P.ownerDocument.doctype.name)&&(Dt="<!DOCTYPE "+P.ownerDocument.doctype.name+`>
|
|
4
|
-
`+Dt),yr&&(Dt=ps(Dt)),v&&cs?A(Dt):Dt},t.setConfig=function(){let K=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};bn(K),un=!0,ns=N,ls=F},t.clearConfig=function(){hi=null,un=!1,ns=null,ls=null,v=H,D=""},t.isValidAttribute=function(K,T,P){hi||bn({});const j=Ot(K),ht=Ot(T);return Nc(j,ht,P)},t.addHook=function(K,T){typeof T=="function"&&Yt(Q,K)&&di(Q[K],T)},t.removeHook=function(K,T){if(Yt(Q,K)){if(T!==void 0){const P=Tx(Q[K],T);return P===-1?void 0:Sx(Q[K],P,1)[0]}return Yc(Q[K])}},t.removeHooks=function(K){Yt(Q,K)&&(Q[K]=[])},t.removeAllHooks=function(){Q=iu()},t}var Hi=Xd();function $s(e,t){return e==null||t==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function Xx(e,t){return e==null||t==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function oh(e){let t,r,i;e.length!==2?(t=$s,r=(n,l)=>$s(e(n),l),i=(n,l)=>e(n)-l):(t=e===$s||e===Xx?e:jx,r=e,i=e);function a(n,l,h=0,c=n.length){if(h<c){if(t(l,l)!==0)return c;do{const u=h+c>>>1;r(n[u],l)<0?h=u+1:c=u}while(h<c)}return h}function s(n,l,h=0,c=n.length){if(h<c){if(t(l,l)!==0)return c;do{const u=h+c>>>1;r(n[u],l)<=0?h=u+1:c=u}while(h<c)}return h}function o(n,l,h=0,c=n.length){const u=a(n,l,h,c-1);return u>h&&i(n[u-1],l)>-i(n[u],l)?u-1:u}return{left:a,center:o,right:s}}function jx(){return 0}function Vx(e){return e===null?NaN:+e}const Zx=oh($s),Qx=Zx.right;oh(Vx).center;class au extends Map{constructor(t,r=tb){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:r}}),t!=null)for(const[i,a]of t)this.set(i,a)}get(t){return super.get(su(this,t))}has(t){return super.has(su(this,t))}set(t,r){return super.set(Kx(this,t),r)}delete(t){return super.delete(Jx(this,t))}}function su({_intern:e,_key:t},r){const i=t(r);return e.has(i)?e.get(i):r}function Kx({_intern:e,_key:t},r){const i=t(r);return e.has(i)?e.get(i):(e.set(i,r),r)}function Jx({_intern:e,_key:t},r){const i=t(r);return e.has(i)&&(r=e.get(i),e.delete(i)),r}function tb(e){return e!==null&&typeof e=="object"?e.valueOf():e}const eb=Math.sqrt(50),rb=Math.sqrt(10),ib=Math.sqrt(2);function Vs(e,t,r){const i=(t-e)/Math.max(0,r),a=Math.floor(Math.log10(i)),s=i/Math.pow(10,a),o=s>=eb?10:s>=rb?5:s>=ib?2:1;let n,l,h;return a<0?(h=Math.pow(10,-a)/o,n=Math.round(e*h),l=Math.round(t*h),n/h<e&&++n,l/h>t&&--l,h=-h):(h=Math.pow(10,a)*o,n=Math.round(e/h),l=Math.round(t/h),n*h<e&&++n,l*h>t&&--l),l<n&&.5<=r&&r<2?Vs(e,t,r*2):[n,l,h]}function ab(e,t,r){if(t=+t,e=+e,r=+r,!(r>0))return[];if(e===t)return[e];const i=t<e,[a,s,o]=i?Vs(t,e,r):Vs(e,t,r);if(!(s>=a))return[];const n=s-a+1,l=new Array(n);if(i)if(o<0)for(let h=0;h<n;++h)l[h]=(s-h)/-o;else for(let h=0;h<n;++h)l[h]=(s-h)*o;else if(o<0)for(let h=0;h<n;++h)l[h]=(a+h)/-o;else for(let h=0;h<n;++h)l[h]=(a+h)*o;return l}function al(e,t,r){return t=+t,e=+e,r=+r,Vs(e,t,r)[2]}function sl(e,t,r){t=+t,e=+e,r=+r;const i=t<e,a=i?al(t,e,r):al(e,t,r);return(i?-1:1)*(a<0?1/-a:a)}function s3(e,t){let r;if(t===void 0)for(const i of e)i!=null&&(r<i||r===void 0&&i>=i)&&(r=i);else{let i=-1;for(let a of e)(a=t(a,++i,e))!=null&&(r<a||r===void 0&&a>=a)&&(r=a)}return r}function o3(e,t){let r;if(t===void 0)for(const i of e)i!=null&&(r>i||r===void 0&&i>=i)&&(r=i);else{let i=-1;for(let a of e)(a=t(a,++i,e))!=null&&(r>a||r===void 0&&a>=a)&&(r=a)}return r}function sb(e,t,r){e=+e,t=+t,r=(a=arguments.length)<2?(t=e,e=0,1):a<3?1:+r;for(var i=-1,a=Math.max(0,Math.ceil((t-e)/r))|0,s=new Array(a);++i<a;)s[i]=e+i*r;return s}function ob(e){return e}var Os=1,Fn=2,ol=3,xs=4,ou=1e-6;function nb(e){return"translate("+e+",0)"}function lb(e){return"translate(0,"+e+")"}function hb(e){return t=>+e(t)}function cb(e,t){return t=Math.max(0,e.bandwidth()-t*2)/2,e.round()&&(t=Math.round(t)),r=>+e(r)+t}function ub(){return!this.__axis}function jd(e,t){var r=[],i=null,a=null,s=6,o=6,n=3,l=typeof window<"u"&&window.devicePixelRatio>1?0:.5,h=e===Os||e===xs?-1:1,c=e===xs||e===Fn?"x":"y",u=e===Os||e===ol?nb:lb;function f(d){var g=i??(t.ticks?t.ticks.apply(t,r):t.domain()),p=a??(t.tickFormat?t.tickFormat.apply(t,r):ob),m=Math.max(s,0)+n,C=t.range(),x=+C[0]+l,k=+C[C.length-1]+l,w=(t.bandwidth?cb:hb)(t.copy(),l),S=d.selection?d.selection():d,_=S.selectAll(".domain").data([null]),v=S.selectAll(".tick").data(g,t).order(),D=v.exit(),H=v.enter().append("g").attr("class","tick"),R=v.select("line"),B=v.select("text");_=_.merge(_.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),v=v.merge(H),R=R.merge(H.append("line").attr("stroke","currentColor").attr(c+"2",h*s)),B=B.merge(H.append("text").attr("fill","currentColor").attr(c,h*m).attr("dy",e===Os?"0em":e===ol?"0.71em":"0.32em")),d!==S&&(_=_.transition(d),v=v.transition(d),R=R.transition(d),B=B.transition(d),D=D.transition(d).attr("opacity",ou).attr("transform",function(U){return isFinite(U=w(U))?u(U+l):this.getAttribute("transform")}),H.attr("opacity",ou).attr("transform",function(U){var A=this.parentNode.__axis;return u((A&&isFinite(A=A(U))?A:w(U))+l)})),D.remove(),_.attr("d",e===xs||e===Fn?o?"M"+h*o+","+x+"H"+l+"V"+k+"H"+h*o:"M"+l+","+x+"V"+k:o?"M"+x+","+h*o+"V"+l+"H"+k+"V"+h*o:"M"+x+","+l+"H"+k),v.attr("opacity",1).attr("transform",function(U){return u(w(U)+l)}),R.attr(c+"2",h*s),B.attr(c,h*m).text(p),S.filter(ub).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",e===Fn?"start":e===xs?"end":"middle"),S.each(function(){this.__axis=w})}return f.scale=function(d){return arguments.length?(t=d,f):t},f.ticks=function(){return r=Array.from(arguments),f},f.tickArguments=function(d){return arguments.length?(r=d==null?[]:Array.from(d),f):r.slice()},f.tickValues=function(d){return arguments.length?(i=d==null?null:Array.from(d),f):i&&i.slice()},f.tickFormat=function(d){return arguments.length?(a=d,f):a},f.tickSize=function(d){return arguments.length?(s=o=+d,f):s},f.tickSizeInner=function(d){return arguments.length?(s=+d,f):s},f.tickSizeOuter=function(d){return arguments.length?(o=+d,f):o},f.tickPadding=function(d){return arguments.length?(n=+d,f):n},f.offset=function(d){return arguments.length?(l=+d,f):l},f}function n3(e){return jd(Os,e)}function l3(e){return jd(ol,e)}var db={value:()=>{}};function Vd(){for(var e=0,t=arguments.length,r={},i;e<t;++e){if(!(i=arguments[e]+"")||i in r||/[\s.]/.test(i))throw new Error("illegal type: "+i);r[i]=[]}return new Ds(r)}function Ds(e){this._=e}function fb(e,t){return e.trim().split(/^|\s+/).map(function(r){var i="",a=r.indexOf(".");if(a>=0&&(i=r.slice(a+1),r=r.slice(0,a)),r&&!t.hasOwnProperty(r))throw new Error("unknown type: "+r);return{type:r,name:i}})}Ds.prototype=Vd.prototype={constructor:Ds,on:function(e,t){var r=this._,i=fb(e+"",r),a,s=-1,o=i.length;if(arguments.length<2){for(;++s<o;)if((a=(e=i[s]).type)&&(a=gb(r[a],e.name)))return a;return}if(t!=null&&typeof t!="function")throw new Error("invalid callback: "+t);for(;++s<o;)if(a=(e=i[s]).type)r[a]=nu(r[a],e.name,t);else if(t==null)for(a in r)r[a]=nu(r[a],e.name,null);return this},copy:function(){var e={},t=this._;for(var r in t)e[r]=t[r].slice();return new Ds(e)},call:function(e,t){if((a=arguments.length-2)>0)for(var r=new Array(a),i=0,a,s;i<a;++i)r[i]=arguments[i+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(s=this._[e],i=0,a=s.length;i<a;++i)s[i].value.apply(t,r)},apply:function(e,t,r){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var i=this._[e],a=0,s=i.length;a<s;++a)i[a].value.apply(t,r)}};function gb(e,t){for(var r=0,i=e.length,a;r<i;++r)if((a=e[r]).name===t)return a.value}function nu(e,t,r){for(var i=0,a=e.length;i<a;++i)if(e[i].name===t){e[i]=db,e=e.slice(0,i).concat(e.slice(i+1));break}return r!=null&&e.push({name:t,value:r}),e}var nl="http://www.w3.org/1999/xhtml";const lu={svg:"http://www.w3.org/2000/svg",xhtml:nl,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Po(e){var t=e+="",r=t.indexOf(":");return r>=0&&(t=e.slice(0,r))!=="xmlns"&&(e=e.slice(r+1)),lu.hasOwnProperty(t)?{space:lu[t],local:e}:e}function pb(e){return function(){var t=this.ownerDocument,r=this.namespaceURI;return r===nl&&t.documentElement.namespaceURI===nl?t.createElement(e):t.createElementNS(r,e)}}function mb(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function Zd(e){var t=Po(e);return(t.local?mb:pb)(t)}function yb(){}function nh(e){return e==null?yb:function(){return this.querySelector(e)}}function Cb(e){typeof e!="function"&&(e=nh(e));for(var t=this._groups,r=t.length,i=new Array(r),a=0;a<r;++a)for(var s=t[a],o=s.length,n=i[a]=new Array(o),l,h,c=0;c<o;++c)(l=s[c])&&(h=e.call(l,l.__data__,c,s))&&("__data__"in l&&(h.__data__=l.__data__),n[c]=h);return new Te(i,this._parents)}function xb(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function bb(){return[]}function Qd(e){return e==null?bb:function(){return this.querySelectorAll(e)}}function kb(e){return function(){return xb(e.apply(this,arguments))}}function wb(e){typeof e=="function"?e=kb(e):e=Qd(e);for(var t=this._groups,r=t.length,i=[],a=[],s=0;s<r;++s)for(var o=t[s],n=o.length,l,h=0;h<n;++h)(l=o[h])&&(i.push(e.call(l,l.__data__,h,o)),a.push(l));return new Te(i,a)}function Kd(e){return function(){return this.matches(e)}}function Jd(e){return function(t){return t.matches(e)}}var Tb=Array.prototype.find;function Sb(e){return function(){return Tb.call(this.children,e)}}function _b(){return this.firstElementChild}function vb(e){return this.select(e==null?_b:Sb(typeof e=="function"?e:Jd(e)))}var Bb=Array.prototype.filter;function Lb(){return Array.from(this.children)}function Fb(e){return function(){return Bb.call(this.children,e)}}function Mb(e){return this.selectAll(e==null?Lb:Fb(typeof e=="function"?e:Jd(e)))}function Ab(e){typeof e!="function"&&(e=Kd(e));for(var t=this._groups,r=t.length,i=new Array(r),a=0;a<r;++a)for(var s=t[a],o=s.length,n=i[a]=[],l,h=0;h<o;++h)(l=s[h])&&e.call(l,l.__data__,h,s)&&n.push(l);return new Te(i,this._parents)}function tf(e){return new Array(e.length)}function Eb(){return new Te(this._enter||this._groups.map(tf),this._parents)}function Zs(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}Zs.prototype={constructor:Zs,appendChild:function(e){return this._parent.insertBefore(e,this._next)},insertBefore:function(e,t){return this._parent.insertBefore(e,t)},querySelector:function(e){return this._parent.querySelector(e)},querySelectorAll:function(e){return this._parent.querySelectorAll(e)}};function $b(e){return function(){return e}}function Ob(e,t,r,i,a,s){for(var o=0,n,l=t.length,h=s.length;o<h;++o)(n=t[o])?(n.__data__=s[o],i[o]=n):r[o]=new Zs(e,s[o]);for(;o<l;++o)(n=t[o])&&(a[o]=n)}function Db(e,t,r,i,a,s,o){var n,l,h=new Map,c=t.length,u=s.length,f=new Array(c),d;for(n=0;n<c;++n)(l=t[n])&&(f[n]=d=o.call(l,l.__data__,n,t)+"",h.has(d)?a[n]=l:h.set(d,l));for(n=0;n<u;++n)d=o.call(e,s[n],n,s)+"",(l=h.get(d))?(i[n]=l,l.__data__=s[n],h.delete(d)):r[n]=new Zs(e,s[n]);for(n=0;n<c;++n)(l=t[n])&&h.get(f[n])===l&&(a[n]=l)}function Ib(e){return e.__data__}function Pb(e,t){if(!arguments.length)return Array.from(this,Ib);var r=t?Db:Ob,i=this._parents,a=this._groups;typeof e!="function"&&(e=$b(e));for(var s=a.length,o=new Array(s),n=new Array(s),l=new Array(s),h=0;h<s;++h){var c=i[h],u=a[h],f=u.length,d=Rb(e.call(c,c&&c.__data__,h,i)),g=d.length,p=n[h]=new Array(g),m=o[h]=new Array(g),C=l[h]=new Array(f);r(c,u,p,m,C,d,t);for(var x=0,k=0,w,S;x<g;++x)if(w=p[x]){for(x>=k&&(k=x+1);!(S=m[k])&&++k<g;);w._next=S||null}}return o=new Te(o,i),o._enter=n,o._exit=l,o}function Rb(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function Nb(){return new Te(this._exit||this._groups.map(tf),this._parents)}function qb(e,t,r){var i=this.enter(),a=this,s=this.exit();return typeof e=="function"?(i=e(i),i&&(i=i.selection())):i=i.append(e+""),t!=null&&(a=t(a),a&&(a=a.selection())),r==null?s.remove():r(s),i&&a?i.merge(a).order():a}function Wb(e){for(var t=e.selection?e.selection():e,r=this._groups,i=t._groups,a=r.length,s=i.length,o=Math.min(a,s),n=new Array(a),l=0;l<o;++l)for(var h=r[l],c=i[l],u=h.length,f=n[l]=new Array(u),d,g=0;g<u;++g)(d=h[g]||c[g])&&(f[g]=d);for(;l<a;++l)n[l]=r[l];return new Te(n,this._parents)}function zb(){for(var e=this._groups,t=-1,r=e.length;++t<r;)for(var i=e[t],a=i.length-1,s=i[a],o;--a>=0;)(o=i[a])&&(s&&o.compareDocumentPosition(s)^4&&s.parentNode.insertBefore(o,s),s=o);return this}function Hb(e){e||(e=Ub);function t(u,f){return u&&f?e(u.__data__,f.__data__):!u-!f}for(var r=this._groups,i=r.length,a=new Array(i),s=0;s<i;++s){for(var o=r[s],n=o.length,l=a[s]=new Array(n),h,c=0;c<n;++c)(h=o[c])&&(l[c]=h);l.sort(t)}return new Te(a,this._parents).order()}function Ub(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function Yb(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function Gb(){return Array.from(this)}function Xb(){for(var e=this._groups,t=0,r=e.length;t<r;++t)for(var i=e[t],a=0,s=i.length;a<s;++a){var o=i[a];if(o)return o}return null}function jb(){let e=0;for(const t of this)++e;return e}function Vb(){return!this.node()}function Zb(e){for(var t=this._groups,r=0,i=t.length;r<i;++r)for(var a=t[r],s=0,o=a.length,n;s<o;++s)(n=a[s])&&e.call(n,n.__data__,s,a);return this}function Qb(e){return function(){this.removeAttribute(e)}}function Kb(e){return function(){this.removeAttributeNS(e.space,e.local)}}function Jb(e,t){return function(){this.setAttribute(e,t)}}function t1(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function e1(e,t){return function(){var r=t.apply(this,arguments);r==null?this.removeAttribute(e):this.setAttribute(e,r)}}function r1(e,t){return function(){var r=t.apply(this,arguments);r==null?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,r)}}function i1(e,t){var r=Po(e);if(arguments.length<2){var i=this.node();return r.local?i.getAttributeNS(r.space,r.local):i.getAttribute(r)}return this.each((t==null?r.local?Kb:Qb:typeof t=="function"?r.local?r1:e1:r.local?t1:Jb)(r,t))}function ef(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function a1(e){return function(){this.style.removeProperty(e)}}function s1(e,t,r){return function(){this.style.setProperty(e,t,r)}}function o1(e,t,r){return function(){var i=t.apply(this,arguments);i==null?this.style.removeProperty(e):this.style.setProperty(e,i,r)}}function n1(e,t,r){return arguments.length>1?this.each((t==null?a1:typeof t=="function"?o1:s1)(e,t,r??"")):Ui(this.node(),e)}function Ui(e,t){return e.style.getPropertyValue(t)||ef(e).getComputedStyle(e,null).getPropertyValue(t)}function l1(e){return function(){delete this[e]}}function h1(e,t){return function(){this[e]=t}}function c1(e,t){return function(){var r=t.apply(this,arguments);r==null?delete this[e]:this[e]=r}}function u1(e,t){return arguments.length>1?this.each((t==null?l1:typeof t=="function"?c1:h1)(e,t)):this.node()[e]}function rf(e){return e.trim().split(/^|\s+/)}function lh(e){return e.classList||new af(e)}function af(e){this._node=e,this._names=rf(e.getAttribute("class")||"")}af.prototype={add:function(e){var t=this._names.indexOf(e);t<0&&(this._names.push(e),this._node.setAttribute("class",this._names.join(" ")))},remove:function(e){var t=this._names.indexOf(e);t>=0&&(this._names.splice(t,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(e){return this._names.indexOf(e)>=0}};function sf(e,t){for(var r=lh(e),i=-1,a=t.length;++i<a;)r.add(t[i])}function of(e,t){for(var r=lh(e),i=-1,a=t.length;++i<a;)r.remove(t[i])}function d1(e){return function(){sf(this,e)}}function f1(e){return function(){of(this,e)}}function g1(e,t){return function(){(t.apply(this,arguments)?sf:of)(this,e)}}function p1(e,t){var r=rf(e+"");if(arguments.length<2){for(var i=lh(this.node()),a=-1,s=r.length;++a<s;)if(!i.contains(r[a]))return!1;return!0}return this.each((typeof t=="function"?g1:t?d1:f1)(r,t))}function m1(){this.textContent=""}function y1(e){return function(){this.textContent=e}}function C1(e){return function(){var t=e.apply(this,arguments);this.textContent=t??""}}function x1(e){return arguments.length?this.each(e==null?m1:(typeof e=="function"?C1:y1)(e)):this.node().textContent}function b1(){this.innerHTML=""}function k1(e){return function(){this.innerHTML=e}}function w1(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??""}}function T1(e){return arguments.length?this.each(e==null?b1:(typeof e=="function"?w1:k1)(e)):this.node().innerHTML}function S1(){this.nextSibling&&this.parentNode.appendChild(this)}function _1(){return this.each(S1)}function v1(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function B1(){return this.each(v1)}function L1(e){var t=typeof e=="function"?e:Zd(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function F1(){return null}function M1(e,t){var r=typeof e=="function"?e:Zd(e),i=t==null?F1:typeof t=="function"?t:nh(t);return this.select(function(){return this.insertBefore(r.apply(this,arguments),i.apply(this,arguments)||null)})}function A1(){var e=this.parentNode;e&&e.removeChild(this)}function E1(){return this.each(A1)}function $1(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function O1(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function D1(e){return this.select(e?O1:$1)}function I1(e){return arguments.length?this.property("__data__",e):this.node().__data__}function P1(e){return function(t){e.call(this,t,this.__data__)}}function R1(e){return e.trim().split(/^|\s+/).map(function(t){var r="",i=t.indexOf(".");return i>=0&&(r=t.slice(i+1),t=t.slice(0,i)),{type:t,name:r}})}function N1(e){return function(){var t=this.__on;if(t){for(var r=0,i=-1,a=t.length,s;r<a;++r)s=t[r],(!e.type||s.type===e.type)&&s.name===e.name?this.removeEventListener(s.type,s.listener,s.options):t[++i]=s;++i?t.length=i:delete this.__on}}}function q1(e,t,r){return function(){var i=this.__on,a,s=P1(t);if(i){for(var o=0,n=i.length;o<n;++o)if((a=i[o]).type===e.type&&a.name===e.name){this.removeEventListener(a.type,a.listener,a.options),this.addEventListener(a.type,a.listener=s,a.options=r),a.value=t;return}}this.addEventListener(e.type,s,r),a={type:e.type,name:e.name,value:t,listener:s,options:r},i?i.push(a):this.__on=[a]}}function W1(e,t,r){var i=R1(e+""),a,s=i.length,o;if(arguments.length<2){var n=this.node().__on;if(n){for(var l=0,h=n.length,c;l<h;++l)for(a=0,c=n[l];a<s;++a)if((o=i[a]).type===c.type&&o.name===c.name)return c.value}return}for(n=t?q1:N1,a=0;a<s;++a)this.each(n(i[a],t,r));return this}function nf(e,t,r){var i=ef(e),a=i.CustomEvent;typeof a=="function"?a=new a(t,r):(a=i.document.createEvent("Event"),r?(a.initEvent(t,r.bubbles,r.cancelable),a.detail=r.detail):a.initEvent(t,!1,!1)),e.dispatchEvent(a)}function z1(e,t){return function(){return nf(this,e,t)}}function H1(e,t){return function(){return nf(this,e,t.apply(this,arguments))}}function U1(e,t){return this.each((typeof t=="function"?H1:z1)(e,t))}function*Y1(){for(var e=this._groups,t=0,r=e.length;t<r;++t)for(var i=e[t],a=0,s=i.length,o;a<s;++a)(o=i[a])&&(yield o)}var lf=[null];function Te(e,t){this._groups=e,this._parents=t}function Va(){return new Te([[document.documentElement]],lf)}function G1(){return this}Te.prototype=Va.prototype={constructor:Te,select:Cb,selectAll:wb,selectChild:vb,selectChildren:Mb,filter:Ab,data:Pb,enter:Eb,exit:Nb,join:qb,merge:Wb,selection:G1,order:zb,sort:Hb,call:Yb,nodes:Gb,node:Xb,size:jb,empty:Vb,each:Zb,attr:i1,style:n1,property:u1,classed:p1,text:x1,html:T1,raise:_1,lower:B1,append:L1,insert:M1,remove:E1,clone:D1,datum:I1,on:W1,dispatch:U1,[Symbol.iterator]:Y1};function wt(e){return typeof e=="string"?new Te([[document.querySelector(e)]],[document.documentElement]):new Te([[e]],lf)}function Za(e,t,r){e.prototype=t.prototype=r,r.constructor=e}function Ro(e,t){var r=Object.create(e.prototype);for(var i in t)r[i]=t[i];return r}function ei(){}var Ia=.7,Qs=1/Ia,_i="\\s*([+-]?\\d+)\\s*",Pa="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Xe="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",X1=/^#([0-9a-f]{3,8})$/,j1=new RegExp(`^rgb\\(${_i},${_i},${_i}\\)$`),V1=new RegExp(`^rgb\\(${Xe},${Xe},${Xe}\\)$`),Z1=new RegExp(`^rgba\\(${_i},${_i},${_i},${Pa}\\)$`),Q1=new RegExp(`^rgba\\(${Xe},${Xe},${Xe},${Pa}\\)$`),K1=new RegExp(`^hsl\\(${Pa},${Xe},${Xe}\\)$`),J1=new RegExp(`^hsla\\(${Pa},${Xe},${Xe},${Pa}\\)$`),hu={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};Za(ei,Gr,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:cu,formatHex:cu,formatHex8:tk,formatHsl:ek,formatRgb:uu,toString:uu});function cu(){return this.rgb().formatHex()}function tk(){return this.rgb().formatHex8()}function ek(){return cf(this).formatHsl()}function uu(){return this.rgb().formatRgb()}function Gr(e){var t,r;return e=(e+"").trim().toLowerCase(),(t=X1.exec(e))?(r=t[1].length,t=parseInt(t[1],16),r===6?du(t):r===3?new ne(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):r===8?bs(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):r===4?bs(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=j1.exec(e))?new ne(t[1],t[2],t[3],1):(t=V1.exec(e))?new ne(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=Z1.exec(e))?bs(t[1],t[2],t[3],t[4]):(t=Q1.exec(e))?bs(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=K1.exec(e))?pu(t[1],t[2]/100,t[3]/100,1):(t=J1.exec(e))?pu(t[1],t[2]/100,t[3]/100,t[4]):hu.hasOwnProperty(e)?du(hu[e]):e==="transparent"?new ne(NaN,NaN,NaN,0):null}function du(e){return new ne(e>>16&255,e>>8&255,e&255,1)}function bs(e,t,r,i){return i<=0&&(e=t=r=NaN),new ne(e,t,r,i)}function hf(e){return e instanceof ei||(e=Gr(e)),e?(e=e.rgb(),new ne(e.r,e.g,e.b,e.opacity)):new ne}function ll(e,t,r,i){return arguments.length===1?hf(e):new ne(e,t,r,i??1)}function ne(e,t,r,i){this.r=+e,this.g=+t,this.b=+r,this.opacity=+i}Za(ne,ll,Ro(ei,{brighter(e){return e=e==null?Qs:Math.pow(Qs,e),new ne(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?Ia:Math.pow(Ia,e),new ne(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new ne(Ur(this.r),Ur(this.g),Ur(this.b),Ks(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:fu,formatHex:fu,formatHex8:rk,formatRgb:gu,toString:gu}));function fu(){return`#${qr(this.r)}${qr(this.g)}${qr(this.b)}`}function rk(){return`#${qr(this.r)}${qr(this.g)}${qr(this.b)}${qr((isNaN(this.opacity)?1:this.opacity)*255)}`}function gu(){const e=Ks(this.opacity);return`${e===1?"rgb(":"rgba("}${Ur(this.r)}, ${Ur(this.g)}, ${Ur(this.b)}${e===1?")":`, ${e})`}`}function Ks(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Ur(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function qr(e){return e=Ur(e),(e<16?"0":"")+e.toString(16)}function pu(e,t,r,i){return i<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new Ee(e,t,r,i)}function cf(e){if(e instanceof Ee)return new Ee(e.h,e.s,e.l,e.opacity);if(e instanceof ei||(e=Gr(e)),!e)return new Ee;if(e instanceof Ee)return e;e=e.rgb();var t=e.r/255,r=e.g/255,i=e.b/255,a=Math.min(t,r,i),s=Math.max(t,r,i),o=NaN,n=s-a,l=(s+a)/2;return n?(t===s?o=(r-i)/n+(r<i)*6:r===s?o=(i-t)/n+2:o=(t-r)/n+4,n/=l<.5?s+a:2-s-a,o*=60):n=l>0&&l<1?0:o,new Ee(o,n,l,e.opacity)}function ik(e,t,r,i){return arguments.length===1?cf(e):new Ee(e,t,r,i??1)}function Ee(e,t,r,i){this.h=+e,this.s=+t,this.l=+r,this.opacity=+i}Za(Ee,ik,Ro(ei,{brighter(e){return e=e==null?Qs:Math.pow(Qs,e),new Ee(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Ia:Math.pow(Ia,e),new Ee(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,r=this.l,i=r+(r<.5?r:1-r)*t,a=2*r-i;return new ne(Mn(e>=240?e-240:e+120,a,i),Mn(e,a,i),Mn(e<120?e+240:e-120,a,i),this.opacity)},clamp(){return new Ee(mu(this.h),ks(this.s),ks(this.l),Ks(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=Ks(this.opacity);return`${e===1?"hsl(":"hsla("}${mu(this.h)}, ${ks(this.s)*100}%, ${ks(this.l)*100}%${e===1?")":`, ${e})`}`}}));function mu(e){return e=(e||0)%360,e<0?e+360:e}function ks(e){return Math.max(0,Math.min(1,e||0))}function Mn(e,t,r){return(e<60?t+(r-t)*e/60:e<180?r:e<240?t+(r-t)*(240-e)/60:t)*255}const ak=Math.PI/180,sk=180/Math.PI,Js=18,uf=.96422,df=1,ff=.82521,gf=4/29,vi=6/29,pf=3*vi*vi,ok=vi*vi*vi;function mf(e){if(e instanceof je)return new je(e.l,e.a,e.b,e.opacity);if(e instanceof or)return yf(e);e instanceof ne||(e=hf(e));var t=On(e.r),r=On(e.g),i=On(e.b),a=An((.2225045*t+.7168786*r+.0606169*i)/df),s,o;return t===r&&r===i?s=o=a:(s=An((.4360747*t+.3850649*r+.1430804*i)/uf),o=An((.0139322*t+.0971045*r+.7141733*i)/ff)),new je(116*a-16,500*(s-a),200*(a-o),e.opacity)}function nk(e,t,r,i){return arguments.length===1?mf(e):new je(e,t,r,i??1)}function je(e,t,r,i){this.l=+e,this.a=+t,this.b=+r,this.opacity=+i}Za(je,nk,Ro(ei,{brighter(e){return new je(this.l+Js*(e??1),this.a,this.b,this.opacity)},darker(e){return new je(this.l-Js*(e??1),this.a,this.b,this.opacity)},rgb(){var e=(this.l+16)/116,t=isNaN(this.a)?e:e+this.a/500,r=isNaN(this.b)?e:e-this.b/200;return t=uf*En(t),e=df*En(e),r=ff*En(r),new ne($n(3.1338561*t-1.6168667*e-.4906146*r),$n(-.9787684*t+1.9161415*e+.033454*r),$n(.0719453*t-.2289914*e+1.4052427*r),this.opacity)}}));function An(e){return e>ok?Math.pow(e,1/3):e/pf+gf}function En(e){return e>vi?e*e*e:pf*(e-gf)}function $n(e){return 255*(e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055)}function On(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function lk(e){if(e instanceof or)return new or(e.h,e.c,e.l,e.opacity);if(e instanceof je||(e=mf(e)),e.a===0&&e.b===0)return new or(NaN,0<e.l&&e.l<100?0:NaN,e.l,e.opacity);var t=Math.atan2(e.b,e.a)*sk;return new or(t<0?t+360:t,Math.sqrt(e.a*e.a+e.b*e.b),e.l,e.opacity)}function hl(e,t,r,i){return arguments.length===1?lk(e):new or(e,t,r,i??1)}function or(e,t,r,i){this.h=+e,this.c=+t,this.l=+r,this.opacity=+i}function yf(e){if(isNaN(e.h))return new je(e.l,0,0,e.opacity);var t=e.h*ak;return new je(e.l,Math.cos(t)*e.c,Math.sin(t)*e.c,e.opacity)}Za(or,hl,Ro(ei,{brighter(e){return new or(this.h,this.c,this.l+Js*(e??1),this.opacity)},darker(e){return new or(this.h,this.c,this.l-Js*(e??1),this.opacity)},rgb(){return yf(this).rgb()}}));const No=e=>()=>e;function Cf(e,t){return function(r){return e+r*t}}function hk(e,t,r){return e=Math.pow(e,r),t=Math.pow(t,r)-e,r=1/r,function(i){return Math.pow(e+i*t,r)}}function ck(e,t){var r=t-e;return r?Cf(e,r>180||r<-180?r-360*Math.round(r/360):r):No(isNaN(e)?t:e)}function uk(e){return(e=+e)==1?Fa:function(t,r){return r-t?hk(t,r,e):No(isNaN(t)?r:t)}}function Fa(e,t){var r=t-e;return r?Cf(e,r):No(isNaN(e)?t:e)}const to=(function e(t){var r=uk(t);function i(a,s){var o=r((a=ll(a)).r,(s=ll(s)).r),n=r(a.g,s.g),l=r(a.b,s.b),h=Fa(a.opacity,s.opacity);return function(c){return a.r=o(c),a.g=n(c),a.b=l(c),a.opacity=h(c),a+""}}return i.gamma=e,i})(1);function dk(e,t){t||(t=[]);var r=e?Math.min(t.length,e.length):0,i=t.slice(),a;return function(s){for(a=0;a<r;++a)i[a]=e[a]*(1-s)+t[a]*s;return i}}function fk(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function gk(e,t){var r=t?t.length:0,i=e?Math.min(r,e.length):0,a=new Array(i),s=new Array(r),o;for(o=0;o<i;++o)a[o]=hh(e[o],t[o]);for(;o<r;++o)s[o]=t[o];return function(n){for(o=0;o<i;++o)s[o]=a[o](n);return s}}function pk(e,t){var r=new Date;return e=+e,t=+t,function(i){return r.setTime(e*(1-i)+t*i),r}}function Fe(e,t){return e=+e,t=+t,function(r){return e*(1-r)+t*r}}function mk(e,t){var r={},i={},a;(e===null||typeof e!="object")&&(e={}),(t===null||typeof t!="object")&&(t={});for(a in t)a in e?r[a]=hh(e[a],t[a]):i[a]=t[a];return function(s){for(a in r)i[a]=r[a](s);return i}}var cl=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Dn=new RegExp(cl.source,"g");function yk(e){return function(){return e}}function Ck(e){return function(t){return e(t)+""}}function xf(e,t){var r=cl.lastIndex=Dn.lastIndex=0,i,a,s,o=-1,n=[],l=[];for(e=e+"",t=t+"";(i=cl.exec(e))&&(a=Dn.exec(t));)(s=a.index)>r&&(s=t.slice(r,s),n[o]?n[o]+=s:n[++o]=s),(i=i[0])===(a=a[0])?n[o]?n[o]+=a:n[++o]=a:(n[++o]=null,l.push({i:o,x:Fe(i,a)})),r=Dn.lastIndex;return r<t.length&&(s=t.slice(r),n[o]?n[o]+=s:n[++o]=s),n.length<2?l[0]?Ck(l[0].x):yk(t):(t=l.length,function(h){for(var c=0,u;c<t;++c)n[(u=l[c]).i]=u.x(h);return n.join("")})}function hh(e,t){var r=typeof t,i;return t==null||r==="boolean"?No(t):(r==="number"?Fe:r==="string"?(i=Gr(t))?(t=i,to):xf:t instanceof Gr?to:t instanceof Date?pk:fk(t)?dk:Array.isArray(t)?gk:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?mk:Fe)(e,t)}function xk(e,t){return e=+e,t=+t,function(r){return Math.round(e*(1-r)+t*r)}}var yu=180/Math.PI,ul={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function bf(e,t,r,i,a,s){var o,n,l;return(o=Math.sqrt(e*e+t*t))&&(e/=o,t/=o),(l=e*r+t*i)&&(r-=e*l,i-=t*l),(n=Math.sqrt(r*r+i*i))&&(r/=n,i/=n,l/=n),e*i<t*r&&(e=-e,t=-t,l=-l,o=-o),{translateX:a,translateY:s,rotate:Math.atan2(t,e)*yu,skewX:Math.atan(l)*yu,scaleX:o,scaleY:n}}var ws;function bk(e){const t=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?ul:bf(t.a,t.b,t.c,t.d,t.e,t.f)}function kk(e){return e==null||(ws||(ws=document.createElementNS("http://www.w3.org/2000/svg","g")),ws.setAttribute("transform",e),!(e=ws.transform.baseVal.consolidate()))?ul:(e=e.matrix,bf(e.a,e.b,e.c,e.d,e.e,e.f))}function kf(e,t,r,i){function a(h){return h.length?h.pop()+" ":""}function s(h,c,u,f,d,g){if(h!==u||c!==f){var p=d.push("translate(",null,t,null,r);g.push({i:p-4,x:Fe(h,u)},{i:p-2,x:Fe(c,f)})}else(u||f)&&d.push("translate("+u+t+f+r)}function o(h,c,u,f){h!==c?(h-c>180?c+=360:c-h>180&&(h+=360),f.push({i:u.push(a(u)+"rotate(",null,i)-2,x:Fe(h,c)})):c&&u.push(a(u)+"rotate("+c+i)}function n(h,c,u,f){h!==c?f.push({i:u.push(a(u)+"skewX(",null,i)-2,x:Fe(h,c)}):c&&u.push(a(u)+"skewX("+c+i)}function l(h,c,u,f,d,g){if(h!==u||c!==f){var p=d.push(a(d)+"scale(",null,",",null,")");g.push({i:p-4,x:Fe(h,u)},{i:p-2,x:Fe(c,f)})}else(u!==1||f!==1)&&d.push(a(d)+"scale("+u+","+f+")")}return function(h,c){var u=[],f=[];return h=e(h),c=e(c),s(h.translateX,h.translateY,c.translateX,c.translateY,u,f),o(h.rotate,c.rotate,u,f),n(h.skewX,c.skewX,u,f),l(h.scaleX,h.scaleY,c.scaleX,c.scaleY,u,f),h=c=null,function(d){for(var g=-1,p=f.length,m;++g<p;)u[(m=f[g]).i]=m.x(d);return u.join("")}}}var wk=kf(bk,"px, ","px)","deg)"),Tk=kf(kk,", ",")",")");function Sk(e){return function(t,r){var i=e((t=hl(t)).h,(r=hl(r)).h),a=Fa(t.c,r.c),s=Fa(t.l,r.l),o=Fa(t.opacity,r.opacity);return function(n){return t.h=i(n),t.c=a(n),t.l=s(n),t.opacity=o(n),t+""}}}const h3=Sk(ck);var Yi=0,ka=0,la=0,wf=1e3,eo,wa,ro=0,Xr=0,qo=0,Ra=typeof performance=="object"&&performance.now?performance:Date,Tf=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function ch(){return Xr||(Tf(_k),Xr=Ra.now()+qo)}function _k(){Xr=0}function io(){this._call=this._time=this._next=null}io.prototype=Sf.prototype={constructor:io,restart:function(e,t,r){if(typeof e!="function")throw new TypeError("callback is not a function");r=(r==null?ch():+r)+(t==null?0:+t),!this._next&&wa!==this&&(wa?wa._next=this:eo=this,wa=this),this._call=e,this._time=r,dl()},stop:function(){this._call&&(this._call=null,this._time=1/0,dl())}};function Sf(e,t,r){var i=new io;return i.restart(e,t,r),i}function vk(){ch(),++Yi;for(var e=eo,t;e;)(t=Xr-e._time)>=0&&e._call.call(void 0,t),e=e._next;--Yi}function Cu(){Xr=(ro=Ra.now())+qo,Yi=ka=0;try{vk()}finally{Yi=0,Lk(),Xr=0}}function Bk(){var e=Ra.now(),t=e-ro;t>wf&&(qo-=t,ro=e)}function Lk(){for(var e,t=eo,r,i=1/0;t;)t._call?(i>t._time&&(i=t._time),e=t,t=t._next):(r=t._next,t._next=null,t=e?e._next=r:eo=r);wa=e,dl(i)}function dl(e){if(!Yi){ka&&(ka=clearTimeout(ka));var t=e-Xr;t>24?(e<1/0&&(ka=setTimeout(Cu,e-Ra.now()-qo)),la&&(la=clearInterval(la))):(la||(ro=Ra.now(),la=setInterval(Bk,wf)),Yi=1,Tf(Cu))}}function xu(e,t,r){var i=new io;return t=t==null?0:+t,i.restart(a=>{i.stop(),e(a+t)},t,r),i}var Fk=Vd("start","end","cancel","interrupt"),Mk=[],_f=0,bu=1,fl=2,Is=3,ku=4,gl=5,Ps=6;function Wo(e,t,r,i,a,s){var o=e.__transition;if(!o)e.__transition={};else if(r in o)return;Ak(e,r,{name:t,index:i,group:a,on:Fk,tween:Mk,time:s.time,delay:s.delay,duration:s.duration,ease:s.ease,timer:null,state:_f})}function uh(e,t){var r=Re(e,t);if(r.state>_f)throw new Error("too late; already scheduled");return r}function Ze(e,t){var r=Re(e,t);if(r.state>Is)throw new Error("too late; already running");return r}function Re(e,t){var r=e.__transition;if(!r||!(r=r[t]))throw new Error("transition not found");return r}function Ak(e,t,r){var i=e.__transition,a;i[t]=r,r.timer=Sf(s,0,r.time);function s(h){r.state=bu,r.timer.restart(o,r.delay,r.time),r.delay<=h&&o(h-r.delay)}function o(h){var c,u,f,d;if(r.state!==bu)return l();for(c in i)if(d=i[c],d.name===r.name){if(d.state===Is)return xu(o);d.state===ku?(d.state=Ps,d.timer.stop(),d.on.call("interrupt",e,e.__data__,d.index,d.group),delete i[c]):+c<t&&(d.state=Ps,d.timer.stop(),d.on.call("cancel",e,e.__data__,d.index,d.group),delete i[c])}if(xu(function(){r.state===Is&&(r.state=ku,r.timer.restart(n,r.delay,r.time),n(h))}),r.state=fl,r.on.call("start",e,e.__data__,r.index,r.group),r.state===fl){for(r.state=Is,a=new Array(f=r.tween.length),c=0,u=-1;c<f;++c)(d=r.tween[c].value.call(e,e.__data__,r.index,r.group))&&(a[++u]=d);a.length=u+1}}function n(h){for(var c=h<r.duration?r.ease.call(null,h/r.duration):(r.timer.restart(l),r.state=gl,1),u=-1,f=a.length;++u<f;)a[u].call(e,c);r.state===gl&&(r.on.call("end",e,e.__data__,r.index,r.group),l())}function l(){r.state=Ps,r.timer.stop(),delete i[t];for(var h in i)return;delete e.__transition}}function Ek(e,t){var r=e.__transition,i,a,s=!0,o;if(r){t=t==null?null:t+"";for(o in r){if((i=r[o]).name!==t){s=!1;continue}a=i.state>fl&&i.state<gl,i.state=Ps,i.timer.stop(),i.on.call(a?"interrupt":"cancel",e,e.__data__,i.index,i.group),delete r[o]}s&&delete e.__transition}}function $k(e){return this.each(function(){Ek(this,e)})}function Ok(e,t){var r,i;return function(){var a=Ze(this,e),s=a.tween;if(s!==r){i=r=s;for(var o=0,n=i.length;o<n;++o)if(i[o].name===t){i=i.slice(),i.splice(o,1);break}}a.tween=i}}function Dk(e,t,r){var i,a;if(typeof r!="function")throw new Error;return function(){var s=Ze(this,e),o=s.tween;if(o!==i){a=(i=o).slice();for(var n={name:t,value:r},l=0,h=a.length;l<h;++l)if(a[l].name===t){a[l]=n;break}l===h&&a.push(n)}s.tween=a}}function Ik(e,t){var r=this._id;if(e+="",arguments.length<2){for(var i=Re(this.node(),r).tween,a=0,s=i.length,o;a<s;++a)if((o=i[a]).name===e)return o.value;return null}return this.each((t==null?Ok:Dk)(r,e,t))}function dh(e,t,r){var i=e._id;return e.each(function(){var a=Ze(this,i);(a.value||(a.value={}))[t]=r.apply(this,arguments)}),function(a){return Re(a,i).value[t]}}function vf(e,t){var r;return(typeof t=="number"?Fe:t instanceof Gr?to:(r=Gr(t))?(t=r,to):xf)(e,t)}function Pk(e){return function(){this.removeAttribute(e)}}function Rk(e){return function(){this.removeAttributeNS(e.space,e.local)}}function Nk(e,t,r){var i,a=r+"",s;return function(){var o=this.getAttribute(e);return o===a?null:o===i?s:s=t(i=o,r)}}function qk(e,t,r){var i,a=r+"",s;return function(){var o=this.getAttributeNS(e.space,e.local);return o===a?null:o===i?s:s=t(i=o,r)}}function Wk(e,t,r){var i,a,s;return function(){var o,n=r(this),l;return n==null?void this.removeAttribute(e):(o=this.getAttribute(e),l=n+"",o===l?null:o===i&&l===a?s:(a=l,s=t(i=o,n)))}}function zk(e,t,r){var i,a,s;return function(){var o,n=r(this),l;return n==null?void this.removeAttributeNS(e.space,e.local):(o=this.getAttributeNS(e.space,e.local),l=n+"",o===l?null:o===i&&l===a?s:(a=l,s=t(i=o,n)))}}function Hk(e,t){var r=Po(e),i=r==="transform"?Tk:vf;return this.attrTween(e,typeof t=="function"?(r.local?zk:Wk)(r,i,dh(this,"attr."+e,t)):t==null?(r.local?Rk:Pk)(r):(r.local?qk:Nk)(r,i,t))}function Uk(e,t){return function(r){this.setAttribute(e,t.call(this,r))}}function Yk(e,t){return function(r){this.setAttributeNS(e.space,e.local,t.call(this,r))}}function Gk(e,t){var r,i;function a(){var s=t.apply(this,arguments);return s!==i&&(r=(i=s)&&Yk(e,s)),r}return a._value=t,a}function Xk(e,t){var r,i;function a(){var s=t.apply(this,arguments);return s!==i&&(r=(i=s)&&Uk(e,s)),r}return a._value=t,a}function jk(e,t){var r="attr."+e;if(arguments.length<2)return(r=this.tween(r))&&r._value;if(t==null)return this.tween(r,null);if(typeof t!="function")throw new Error;var i=Po(e);return this.tween(r,(i.local?Gk:Xk)(i,t))}function Vk(e,t){return function(){uh(this,e).delay=+t.apply(this,arguments)}}function Zk(e,t){return t=+t,function(){uh(this,e).delay=t}}function Qk(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?Vk:Zk)(t,e)):Re(this.node(),t).delay}function Kk(e,t){return function(){Ze(this,e).duration=+t.apply(this,arguments)}}function Jk(e,t){return t=+t,function(){Ze(this,e).duration=t}}function t2(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?Kk:Jk)(t,e)):Re(this.node(),t).duration}function e2(e,t){if(typeof t!="function")throw new Error;return function(){Ze(this,e).ease=t}}function r2(e){var t=this._id;return arguments.length?this.each(e2(t,e)):Re(this.node(),t).ease}function i2(e,t){return function(){var r=t.apply(this,arguments);if(typeof r!="function")throw new Error;Ze(this,e).ease=r}}function a2(e){if(typeof e!="function")throw new Error;return this.each(i2(this._id,e))}function s2(e){typeof e!="function"&&(e=Kd(e));for(var t=this._groups,r=t.length,i=new Array(r),a=0;a<r;++a)for(var s=t[a],o=s.length,n=i[a]=[],l,h=0;h<o;++h)(l=s[h])&&e.call(l,l.__data__,h,s)&&n.push(l);return new ur(i,this._parents,this._name,this._id)}function o2(e){if(e._id!==this._id)throw new Error;for(var t=this._groups,r=e._groups,i=t.length,a=r.length,s=Math.min(i,a),o=new Array(i),n=0;n<s;++n)for(var l=t[n],h=r[n],c=l.length,u=o[n]=new Array(c),f,d=0;d<c;++d)(f=l[d]||h[d])&&(u[d]=f);for(;n<i;++n)o[n]=t[n];return new ur(o,this._parents,this._name,this._id)}function n2(e){return(e+"").trim().split(/^|\s+/).every(function(t){var r=t.indexOf(".");return r>=0&&(t=t.slice(0,r)),!t||t==="start"})}function l2(e,t,r){var i,a,s=n2(t)?uh:Ze;return function(){var o=s(this,e),n=o.on;n!==i&&(a=(i=n).copy()).on(t,r),o.on=a}}function h2(e,t){var r=this._id;return arguments.length<2?Re(this.node(),r).on.on(e):this.each(l2(r,e,t))}function c2(e){return function(){var t=this.parentNode;for(var r in this.__transition)if(+r!==e)return;t&&t.removeChild(this)}}function u2(){return this.on("end.remove",c2(this._id))}function d2(e){var t=this._name,r=this._id;typeof e!="function"&&(e=nh(e));for(var i=this._groups,a=i.length,s=new Array(a),o=0;o<a;++o)for(var n=i[o],l=n.length,h=s[o]=new Array(l),c,u,f=0;f<l;++f)(c=n[f])&&(u=e.call(c,c.__data__,f,n))&&("__data__"in c&&(u.__data__=c.__data__),h[f]=u,Wo(h[f],t,r,f,h,Re(c,r)));return new ur(s,this._parents,t,r)}function f2(e){var t=this._name,r=this._id;typeof e!="function"&&(e=Qd(e));for(var i=this._groups,a=i.length,s=[],o=[],n=0;n<a;++n)for(var l=i[n],h=l.length,c,u=0;u<h;++u)if(c=l[u]){for(var f=e.call(c,c.__data__,u,l),d,g=Re(c,r),p=0,m=f.length;p<m;++p)(d=f[p])&&Wo(d,t,r,p,f,g);s.push(f),o.push(c)}return new ur(s,o,t,r)}var g2=Va.prototype.constructor;function p2(){return new g2(this._groups,this._parents)}function m2(e,t){var r,i,a;return function(){var s=Ui(this,e),o=(this.style.removeProperty(e),Ui(this,e));return s===o?null:s===r&&o===i?a:a=t(r=s,i=o)}}function Bf(e){return function(){this.style.removeProperty(e)}}function y2(e,t,r){var i,a=r+"",s;return function(){var o=Ui(this,e);return o===a?null:o===i?s:s=t(i=o,r)}}function C2(e,t,r){var i,a,s;return function(){var o=Ui(this,e),n=r(this),l=n+"";return n==null&&(l=n=(this.style.removeProperty(e),Ui(this,e))),o===l?null:o===i&&l===a?s:(a=l,s=t(i=o,n))}}function x2(e,t){var r,i,a,s="style."+t,o="end."+s,n;return function(){var l=Ze(this,e),h=l.on,c=l.value[s]==null?n||(n=Bf(t)):void 0;(h!==r||a!==c)&&(i=(r=h).copy()).on(o,a=c),l.on=i}}function b2(e,t,r){var i=(e+="")=="transform"?wk:vf;return t==null?this.styleTween(e,m2(e,i)).on("end.style."+e,Bf(e)):typeof t=="function"?this.styleTween(e,C2(e,i,dh(this,"style."+e,t))).each(x2(this._id,e)):this.styleTween(e,y2(e,i,t),r).on("end.style."+e,null)}function k2(e,t,r){return function(i){this.style.setProperty(e,t.call(this,i),r)}}function w2(e,t,r){var i,a;function s(){var o=t.apply(this,arguments);return o!==a&&(i=(a=o)&&k2(e,o,r)),i}return s._value=t,s}function T2(e,t,r){var i="style."+(e+="");if(arguments.length<2)return(i=this.tween(i))&&i._value;if(t==null)return this.tween(i,null);if(typeof t!="function")throw new Error;return this.tween(i,w2(e,t,r??""))}function S2(e){return function(){this.textContent=e}}function _2(e){return function(){var t=e(this);this.textContent=t??""}}function v2(e){return this.tween("text",typeof e=="function"?_2(dh(this,"text",e)):S2(e==null?"":e+""))}function B2(e){return function(t){this.textContent=e.call(this,t)}}function L2(e){var t,r;function i(){var a=e.apply(this,arguments);return a!==r&&(t=(r=a)&&B2(a)),t}return i._value=e,i}function F2(e){var t="text";if(arguments.length<1)return(t=this.tween(t))&&t._value;if(e==null)return this.tween(t,null);if(typeof e!="function")throw new Error;return this.tween(t,L2(e))}function M2(){for(var e=this._name,t=this._id,r=Lf(),i=this._groups,a=i.length,s=0;s<a;++s)for(var o=i[s],n=o.length,l,h=0;h<n;++h)if(l=o[h]){var c=Re(l,t);Wo(l,e,r,h,o,{time:c.time+c.delay+c.duration,delay:0,duration:c.duration,ease:c.ease})}return new ur(i,this._parents,e,r)}function A2(){var e,t,r=this,i=r._id,a=r.size();return new Promise(function(s,o){var n={value:o},l={value:function(){--a===0&&s()}};r.each(function(){var h=Ze(this,i),c=h.on;c!==e&&(t=(e=c).copy(),t._.cancel.push(n),t._.interrupt.push(n),t._.end.push(l)),h.on=t}),a===0&&s()})}var E2=0;function ur(e,t,r,i){this._groups=e,this._parents=t,this._name=r,this._id=i}function Lf(){return++E2}var rr=Va.prototype;ur.prototype={constructor:ur,select:d2,selectAll:f2,selectChild:rr.selectChild,selectChildren:rr.selectChildren,filter:s2,merge:o2,selection:p2,transition:M2,call:rr.call,nodes:rr.nodes,node:rr.node,size:rr.size,empty:rr.empty,each:rr.each,on:h2,attr:Hk,attrTween:jk,style:b2,styleTween:T2,text:v2,textTween:F2,remove:u2,tween:Ik,delay:Qk,duration:t2,ease:r2,easeVarying:a2,end:A2,[Symbol.iterator]:rr[Symbol.iterator]};function $2(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var O2={time:null,delay:0,duration:250,ease:$2};function D2(e,t){for(var r;!(r=e.__transition)||!(r=r[t]);)if(!(e=e.parentNode))throw new Error(`transition ${t} not found`);return r}function I2(e){var t,r;e instanceof ur?(t=e._id,e=e._name):(t=Lf(),(r=O2).time=ch(),e=e==null?null:e+"");for(var i=this._groups,a=i.length,s=0;s<a;++s)for(var o=i[s],n=o.length,l,h=0;h<n;++h)(l=o[h])&&Wo(l,e,t,h,o,r||D2(l,t));return new ur(i,this._parents,e,t)}Va.prototype.interrupt=$k;Va.prototype.transition=I2;const pl=Math.PI,ml=2*pl,Rr=1e-6,P2=ml-Rr;function Ff(e){this._+=e[0];for(let t=1,r=e.length;t<r;++t)this._+=arguments[t]+e[t]}function R2(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return Ff;const r=10**t;return function(i){this._+=i[0];for(let a=1,s=i.length;a<s;++a)this._+=Math.round(arguments[a]*r)/r+i[a]}}class N2{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=t==null?Ff:R2(t)}moveTo(t,r){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+r}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(t,r){this._append`L${this._x1=+t},${this._y1=+r}`}quadraticCurveTo(t,r,i,a){this._append`Q${+t},${+r},${this._x1=+i},${this._y1=+a}`}bezierCurveTo(t,r,i,a,s,o){this._append`C${+t},${+r},${+i},${+a},${this._x1=+s},${this._y1=+o}`}arcTo(t,r,i,a,s){if(t=+t,r=+r,i=+i,a=+a,s=+s,s<0)throw new Error(`negative radius: ${s}`);let o=this._x1,n=this._y1,l=i-t,h=a-r,c=o-t,u=n-r,f=c*c+u*u;if(this._x1===null)this._append`M${this._x1=t},${this._y1=r}`;else if(f>Rr)if(!(Math.abs(u*l-h*c)>Rr)||!s)this._append`L${this._x1=t},${this._y1=r}`;else{let d=i-o,g=a-n,p=l*l+h*h,m=d*d+g*g,C=Math.sqrt(p),x=Math.sqrt(f),k=s*Math.tan((pl-Math.acos((p+f-m)/(2*C*x)))/2),w=k/x,S=k/C;Math.abs(w-1)>Rr&&this._append`L${t+w*c},${r+w*u}`,this._append`A${s},${s},0,0,${+(u*d>c*g)},${this._x1=t+S*l},${this._y1=r+S*h}`}}arc(t,r,i,a,s,o){if(t=+t,r=+r,i=+i,o=!!o,i<0)throw new Error(`negative radius: ${i}`);let n=i*Math.cos(a),l=i*Math.sin(a),h=t+n,c=r+l,u=1^o,f=o?a-s:s-a;this._x1===null?this._append`M${h},${c}`:(Math.abs(this._x1-h)>Rr||Math.abs(this._y1-c)>Rr)&&this._append`L${h},${c}`,i&&(f<0&&(f=f%ml+ml),f>P2?this._append`A${i},${i},0,1,${u},${t-n},${r-l}A${i},${i},0,1,${u},${this._x1=h},${this._y1=c}`:f>Rr&&this._append`A${i},${i},0,${+(f>=pl)},${u},${this._x1=t+i*Math.cos(s)},${this._y1=r+i*Math.sin(s)}`)}rect(t,r,i,a){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+r}h${i=+i}v${+a}h${-i}Z`}toString(){return this._}}function q2(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function ao(e,t){if((r=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null;var r,i=e.slice(0,r);return[i.length>1?i[0]+i.slice(2):i,+e.slice(r+1)]}function Gi(e){return e=ao(Math.abs(e)),e?e[1]:NaN}function W2(e,t){return function(r,i){for(var a=r.length,s=[],o=0,n=e[0],l=0;a>0&&n>0&&(l+n+1>i&&(n=Math.max(1,i-l)),s.push(r.substring(a-=n,a+n)),!((l+=n+1)>i));)n=e[o=(o+1)%e.length];return s.reverse().join(t)}}function z2(e){return function(t){return t.replace(/[0-9]/g,function(r){return e[+r]})}}var H2=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function so(e){if(!(t=H2.exec(e)))throw new Error("invalid format: "+e);var t;return new fh({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}so.prototype=fh.prototype;function fh(e){this.fill=e.fill===void 0?" ":e.fill+"",this.align=e.align===void 0?">":e.align+"",this.sign=e.sign===void 0?"-":e.sign+"",this.symbol=e.symbol===void 0?"":e.symbol+"",this.zero=!!e.zero,this.width=e.width===void 0?void 0:+e.width,this.comma=!!e.comma,this.precision=e.precision===void 0?void 0:+e.precision,this.trim=!!e.trim,this.type=e.type===void 0?"":e.type+""}fh.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 U2(e){t:for(var t=e.length,r=1,i=-1,a;r<t;++r)switch(e[r]){case".":i=a=r;break;case"0":i===0&&(i=r),a=r;break;default:if(!+e[r])break t;i>0&&(i=0);break}return i>0?e.slice(0,i)+e.slice(a+1):e}var Mf;function Y2(e,t){var r=ao(e,t);if(!r)return e+"";var i=r[0],a=r[1],s=a-(Mf=Math.max(-8,Math.min(8,Math.floor(a/3)))*3)+1,o=i.length;return s===o?i:s>o?i+new Array(s-o+1).join("0"):s>0?i.slice(0,s)+"."+i.slice(s):"0."+new Array(1-s).join("0")+ao(e,Math.max(0,t+s-1))[0]}function wu(e,t){var r=ao(e,t);if(!r)return e+"";var i=r[0],a=r[1];return a<0?"0."+new Array(-a).join("0")+i:i.length>a+1?i.slice(0,a+1)+"."+i.slice(a+1):i+new Array(a-i.length+2).join("0")}const Tu={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:q2,e:(e,t)=>e.toExponential(t),f:(e,t)=>e.toFixed(t),g:(e,t)=>e.toPrecision(t),o:e=>Math.round(e).toString(8),p:(e,t)=>wu(e*100,t),r:wu,s:Y2,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function Su(e){return e}var _u=Array.prototype.map,vu=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function G2(e){var t=e.grouping===void 0||e.thousands===void 0?Su:W2(_u.call(e.grouping,Number),e.thousands+""),r=e.currency===void 0?"":e.currency[0]+"",i=e.currency===void 0?"":e.currency[1]+"",a=e.decimal===void 0?".":e.decimal+"",s=e.numerals===void 0?Su:z2(_u.call(e.numerals,String)),o=e.percent===void 0?"%":e.percent+"",n=e.minus===void 0?"−":e.minus+"",l=e.nan===void 0?"NaN":e.nan+"";function h(u){u=so(u);var f=u.fill,d=u.align,g=u.sign,p=u.symbol,m=u.zero,C=u.width,x=u.comma,k=u.precision,w=u.trim,S=u.type;S==="n"?(x=!0,S="g"):Tu[S]||(k===void 0&&(k=12),w=!0,S="g"),(m||f==="0"&&d==="=")&&(m=!0,f="0",d="=");var _=p==="$"?r:p==="#"&&/[boxX]/.test(S)?"0"+S.toLowerCase():"",v=p==="$"?i:/[%p]/.test(S)?o:"",D=Tu[S],H=/[defgprs%]/.test(S);k=k===void 0?6:/[gprs]/.test(S)?Math.max(1,Math.min(21,k)):Math.max(0,Math.min(20,k));function R(B){var U=_,A=v,M,E,L;if(S==="c")A=D(B)+A,B="";else{B=+B;var I=B<0||1/B<0;if(B=isNaN(B)?l:D(Math.abs(B),k),w&&(B=U2(B)),I&&+B==0&&g!=="+"&&(I=!1),U=(I?g==="("?g:n:g==="-"||g==="("?"":g)+U,A=(S==="s"?vu[8+Mf/3]:"")+A+(I&&g==="("?")":""),H){for(M=-1,E=B.length;++M<E;)if(L=B.charCodeAt(M),48>L||L>57){A=(L===46?a+B.slice(M+1):B.slice(M))+A,B=B.slice(0,M);break}}}x&&!m&&(B=t(B,1/0));var $=U.length+B.length+A.length,q=$<C?new Array(C-$+1).join(f):"";switch(x&&m&&(B=t(q+B,q.length?C-A.length:1/0),q=""),d){case"<":B=U+B+A+q;break;case"=":B=U+q+B+A;break;case"^":B=q.slice(0,$=q.length>>1)+U+B+A+q.slice($);break;default:B=q+U+B+A;break}return s(B)}return R.toString=function(){return u+""},R}function c(u,f){var d=h((u=so(u),u.type="f",u)),g=Math.max(-8,Math.min(8,Math.floor(Gi(f)/3)))*3,p=Math.pow(10,-g),m=vu[8+g/3];return function(C){return d(p*C)+m}}return{format:h,formatPrefix:c}}var Ts,Af,Ef;X2({thousands:",",grouping:[3],currency:["$",""]});function X2(e){return Ts=G2(e),Af=Ts.format,Ef=Ts.formatPrefix,Ts}function j2(e){return Math.max(0,-Gi(Math.abs(e)))}function V2(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(Gi(t)/3)))*3-Gi(Math.abs(e)))}function Z2(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,Gi(t)-Gi(e))+1}function Q2(e){var t=0,r=e.children,i=r&&r.length;if(!i)t=1;else for(;--i>=0;)t+=r[i].value;e.value=t}function K2(){return this.eachAfter(Q2)}function J2(e,t){let r=-1;for(const i of this)e.call(t,i,++r,this);return this}function tw(e,t){for(var r=this,i=[r],a,s,o=-1;r=i.pop();)if(e.call(t,r,++o,this),a=r.children)for(s=a.length-1;s>=0;--s)i.push(a[s]);return this}function ew(e,t){for(var r=this,i=[r],a=[],s,o,n,l=-1;r=i.pop();)if(a.push(r),s=r.children)for(o=0,n=s.length;o<n;++o)i.push(s[o]);for(;r=a.pop();)e.call(t,r,++l,this);return this}function rw(e,t){let r=-1;for(const i of this)if(e.call(t,i,++r,this))return i}function iw(e){return this.eachAfter(function(t){for(var r=+e(t.data)||0,i=t.children,a=i&&i.length;--a>=0;)r+=i[a].value;t.value=r})}function aw(e){return this.eachBefore(function(t){t.children&&t.children.sort(e)})}function sw(e){for(var t=this,r=ow(t,e),i=[t];t!==r;)t=t.parent,i.push(t);for(var a=i.length;e!==r;)i.splice(a,0,e),e=e.parent;return i}function ow(e,t){if(e===t)return e;var r=e.ancestors(),i=t.ancestors(),a=null;for(e=r.pop(),t=i.pop();e===t;)a=e,e=r.pop(),t=i.pop();return a}function nw(){for(var e=this,t=[e];e=e.parent;)t.push(e);return t}function lw(){return Array.from(this)}function hw(){var e=[];return this.eachBefore(function(t){t.children||e.push(t)}),e}function cw(){var e=this,t=[];return e.each(function(r){r!==e&&t.push({source:r.parent,target:r})}),t}function*uw(){var e=this,t,r=[e],i,a,s;do for(t=r.reverse(),r=[];e=t.pop();)if(yield e,i=e.children)for(a=0,s=i.length;a<s;++a)r.push(i[a]);while(r.length)}function $f(e,t){e instanceof Map?(e=[void 0,e],t===void 0&&(t=gw)):t===void 0&&(t=fw);for(var r=new oo(e),i,a=[r],s,o,n,l;i=a.pop();)if((o=t(i.data))&&(l=(o=Array.from(o)).length))for(i.children=o,n=l-1;n>=0;--n)a.push(s=o[n]=new oo(o[n])),s.parent=i,s.depth=i.depth+1;return r.eachBefore(mw)}function dw(){return $f(this).eachBefore(pw)}function fw(e){return e.children}function gw(e){return Array.isArray(e)?e[1]:null}function pw(e){e.data.value!==void 0&&(e.value=e.data.value),e.data=e.data.data}function mw(e){var t=0;do e.height=t;while((e=e.parent)&&e.height<++t)}function oo(e){this.data=e,this.depth=this.height=0,this.parent=null}oo.prototype=$f.prototype={constructor:oo,count:K2,each:J2,eachAfter:ew,eachBefore:tw,find:rw,sum:iw,sort:aw,path:sw,ancestors:nw,descendants:lw,leaves:hw,links:cw,copy:dw,[Symbol.iterator]:uw};function yw(e){if(typeof e!="function")throw new Error;return e}function ha(){return 0}function ca(e){return function(){return e}}function Cw(e){e.x0=Math.round(e.x0),e.y0=Math.round(e.y0),e.x1=Math.round(e.x1),e.y1=Math.round(e.y1)}function xw(e,t,r,i,a){for(var s=e.children,o,n=-1,l=s.length,h=e.value&&(i-t)/e.value;++n<l;)o=s[n],o.y0=r,o.y1=a,o.x0=t,o.x1=t+=o.value*h}function bw(e,t,r,i,a){for(var s=e.children,o,n=-1,l=s.length,h=e.value&&(a-r)/e.value;++n<l;)o=s[n],o.x0=t,o.x1=i,o.y0=r,o.y1=r+=o.value*h}var kw=(1+Math.sqrt(5))/2;function ww(e,t,r,i,a,s){for(var o=[],n=t.children,l,h,c=0,u=0,f=n.length,d,g,p=t.value,m,C,x,k,w,S,_;c<f;){d=a-r,g=s-i;do m=n[u++].value;while(!m&&u<f);for(C=x=m,S=Math.max(g/d,d/g)/(p*e),_=m*m*S,w=Math.max(x/_,_/C);u<f;++u){if(m+=h=n[u].value,h<C&&(C=h),h>x&&(x=h),_=m*m*S,k=Math.max(x/_,_/C),k>w){m-=h;break}w=k}o.push(l={value:m,dice:d<g,children:n.slice(c,u)}),l.dice?xw(l,r,i,a,p?i+=g*m/p:s):bw(l,r,i,p?r+=d*m/p:a,s),p-=m,c=u}return o}const Tw=(function e(t){function r(i,a,s,o,n){ww(t,i,a,s,o,n)}return r.ratio=function(i){return e((i=+i)>1?i:1)},r})(kw);function c3(){var e=Tw,t=!1,r=1,i=1,a=[0],s=ha,o=ha,n=ha,l=ha,h=ha;function c(f){return f.x0=f.y0=0,f.x1=r,f.y1=i,f.eachBefore(u),a=[0],t&&f.eachBefore(Cw),f}function u(f){var d=a[f.depth],g=f.x0+d,p=f.y0+d,m=f.x1-d,C=f.y1-d;m<g&&(g=m=(g+m)/2),C<p&&(p=C=(p+C)/2),f.x0=g,f.y0=p,f.x1=m,f.y1=C,f.children&&(d=a[f.depth+1]=s(f)/2,g+=h(f)-d,p+=o(f)-d,m-=n(f)-d,C-=l(f)-d,m<g&&(g=m=(g+m)/2),C<p&&(p=C=(p+C)/2),e(f,g,p,m,C))}return c.round=function(f){return arguments.length?(t=!!f,c):t},c.size=function(f){return arguments.length?(r=+f[0],i=+f[1],c):[r,i]},c.tile=function(f){return arguments.length?(e=yw(f),c):e},c.padding=function(f){return arguments.length?c.paddingInner(f).paddingOuter(f):c.paddingInner()},c.paddingInner=function(f){return arguments.length?(s=typeof f=="function"?f:ca(+f),c):s},c.paddingOuter=function(f){return arguments.length?c.paddingTop(f).paddingRight(f).paddingBottom(f).paddingLeft(f):c.paddingTop()},c.paddingTop=function(f){return arguments.length?(o=typeof f=="function"?f:ca(+f),c):o},c.paddingRight=function(f){return arguments.length?(n=typeof f=="function"?f:ca(+f),c):n},c.paddingBottom=function(f){return arguments.length?(l=typeof f=="function"?f:ca(+f),c):l},c.paddingLeft=function(f){return arguments.length?(h=typeof f=="function"?f:ca(+f),c):h},c}function zo(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e);break}return this}const Bu=Symbol("implicit");function Of(){var e=new au,t=[],r=[],i=Bu;function a(s){let o=e.get(s);if(o===void 0){if(i!==Bu)return i;e.set(s,o=t.push(s)-1)}return r[o%r.length]}return a.domain=function(s){if(!arguments.length)return t.slice();t=[],e=new au;for(const o of s)e.has(o)||e.set(o,t.push(o)-1);return a},a.range=function(s){return arguments.length?(r=Array.from(s),a):r.slice()},a.unknown=function(s){return arguments.length?(i=s,a):i},a.copy=function(){return Of(t,r).unknown(i)},zo.apply(a,arguments),a}function Sw(){var e=Of().unknown(void 0),t=e.domain,r=e.range,i=0,a=1,s,o,n=!1,l=0,h=0,c=.5;delete e.unknown;function u(){var f=t().length,d=a<i,g=d?a:i,p=d?i:a;s=(p-g)/Math.max(1,f-l+h*2),n&&(s=Math.floor(s)),g+=(p-g-s*(f-l))*c,o=s*(1-l),n&&(g=Math.round(g),o=Math.round(o));var m=sb(f).map(function(C){return g+s*C});return r(d?m.reverse():m)}return e.domain=function(f){return arguments.length?(t(f),u()):t()},e.range=function(f){return arguments.length?([i,a]=f,i=+i,a=+a,u()):[i,a]},e.rangeRound=function(f){return[i,a]=f,i=+i,a=+a,n=!0,u()},e.bandwidth=function(){return o},e.step=function(){return s},e.round=function(f){return arguments.length?(n=!!f,u()):n},e.padding=function(f){return arguments.length?(l=Math.min(1,h=+f),u()):l},e.paddingInner=function(f){return arguments.length?(l=Math.min(1,f),u()):l},e.paddingOuter=function(f){return arguments.length?(h=+f,u()):h},e.align=function(f){return arguments.length?(c=Math.max(0,Math.min(1,f)),u()):c},e.copy=function(){return Sw(t(),[i,a]).round(n).paddingInner(l).paddingOuter(h).align(c)},zo.apply(u(),arguments)}function _w(e){return function(){return e}}function vw(e){return+e}var Lu=[0,1];function bi(e){return e}function yl(e,t){return(t-=e=+e)?function(r){return(r-e)/t}:_w(isNaN(t)?NaN:.5)}function Bw(e,t){var r;return e>t&&(r=e,e=t,t=r),function(i){return Math.max(e,Math.min(t,i))}}function Lw(e,t,r){var i=e[0],a=e[1],s=t[0],o=t[1];return a<i?(i=yl(a,i),s=r(o,s)):(i=yl(i,a),s=r(s,o)),function(n){return s(i(n))}}function Fw(e,t,r){var i=Math.min(e.length,t.length)-1,a=new Array(i),s=new Array(i),o=-1;for(e[i]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++o<i;)a[o]=yl(e[o],e[o+1]),s[o]=r(t[o],t[o+1]);return function(n){var l=Qx(e,n,1,i)-1;return s[l](a[l](n))}}function Df(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function Mw(){var e=Lu,t=Lu,r=hh,i,a,s,o=bi,n,l,h;function c(){var f=Math.min(e.length,t.length);return o!==bi&&(o=Bw(e[0],e[f-1])),n=f>2?Fw:Lw,l=h=null,u}function u(f){return f==null||isNaN(f=+f)?s:(l||(l=n(e.map(i),t,r)))(i(o(f)))}return u.invert=function(f){return o(a((h||(h=n(t,e.map(i),Fe)))(f)))},u.domain=function(f){return arguments.length?(e=Array.from(f,vw),c()):e.slice()},u.range=function(f){return arguments.length?(t=Array.from(f),c()):t.slice()},u.rangeRound=function(f){return t=Array.from(f),r=xk,c()},u.clamp=function(f){return arguments.length?(o=f?!0:bi,c()):o!==bi},u.interpolate=function(f){return arguments.length?(r=f,c()):r},u.unknown=function(f){return arguments.length?(s=f,u):s},function(f,d){return i=f,a=d,c()}}function If(){return Mw()(bi,bi)}function Aw(e,t,r,i){var a=sl(e,t,r),s;switch(i=so(i??",f"),i.type){case"s":{var o=Math.max(Math.abs(e),Math.abs(t));return i.precision==null&&!isNaN(s=V2(a,o))&&(i.precision=s),Ef(i,o)}case"":case"e":case"g":case"p":case"r":{i.precision==null&&!isNaN(s=Z2(a,Math.max(Math.abs(e),Math.abs(t))))&&(i.precision=s-(i.type==="e"));break}case"f":case"%":{i.precision==null&&!isNaN(s=j2(a))&&(i.precision=s-(i.type==="%")*2);break}}return Af(i)}function Ew(e){var t=e.domain;return e.ticks=function(r){var i=t();return ab(i[0],i[i.length-1],r??10)},e.tickFormat=function(r,i){var a=t();return Aw(a[0],a[a.length-1],r??10,i)},e.nice=function(r){r==null&&(r=10);var i=t(),a=0,s=i.length-1,o=i[a],n=i[s],l,h,c=10;for(n<o&&(h=o,o=n,n=h,h=a,a=s,s=h);c-- >0;){if(h=al(o,n,r),h===l)return i[a]=o,i[s]=n,t(i);if(h>0)o=Math.floor(o/h)*h,n=Math.ceil(n/h)*h;else if(h<0)o=Math.ceil(o*h)/h,n=Math.floor(n*h)/h;else break;l=h}return e},e}function $w(){var e=If();return e.copy=function(){return Df(e,$w())},zo.apply(e,arguments),Ew(e)}function Ow(e,t){e=e.slice();var r=0,i=e.length-1,a=e[r],s=e[i],o;return s<a&&(o=r,r=i,i=o,o=a,a=s,s=o),e[r]=t.floor(a),e[i]=t.ceil(s),e}const In=new Date,Pn=new Date;function Ht(e,t,r,i){function a(s){return e(s=arguments.length===0?new Date:new Date(+s)),s}return a.floor=s=>(e(s=new Date(+s)),s),a.ceil=s=>(e(s=new Date(s-1)),t(s,1),e(s),s),a.round=s=>{const o=a(s),n=a.ceil(s);return s-o<n-s?o:n},a.offset=(s,o)=>(t(s=new Date(+s),o==null?1:Math.floor(o)),s),a.range=(s,o,n)=>{const l=[];if(s=a.ceil(s),n=n==null?1:Math.floor(n),!(s<o)||!(n>0))return l;let h;do l.push(h=new Date(+s)),t(s,n),e(s);while(h<s&&s<o);return l},a.filter=s=>Ht(o=>{if(o>=o)for(;e(o),!s(o);)o.setTime(o-1)},(o,n)=>{if(o>=o)if(n<0)for(;++n<=0;)for(;t(o,-1),!s(o););else for(;--n>=0;)for(;t(o,1),!s(o););}),r&&(a.count=(s,o)=>(In.setTime(+s),Pn.setTime(+o),e(In),e(Pn),Math.floor(r(In,Pn))),a.every=s=>(s=Math.floor(s),!isFinite(s)||!(s>0)?null:s>1?a.filter(i?o=>i(o)%s===0:o=>a.count(0,o)%s===0):a)),a}const no=Ht(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);no.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?Ht(t=>{t.setTime(Math.floor(t/e)*e)},(t,r)=>{t.setTime(+t+r*e)},(t,r)=>(r-t)/e):no);no.range;const nr=1e3,_e=nr*60,lr=_e*60,dr=lr*24,gh=dr*7,Fu=dr*30,Rn=dr*365,ki=Ht(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*nr)},(e,t)=>(t-e)/nr,e=>e.getUTCSeconds());ki.range;const ph=Ht(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*nr)},(e,t)=>{e.setTime(+e+t*_e)},(e,t)=>(t-e)/_e,e=>e.getMinutes());ph.range;const Dw=Ht(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*_e)},(e,t)=>(t-e)/_e,e=>e.getUTCMinutes());Dw.range;const mh=Ht(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*nr-e.getMinutes()*_e)},(e,t)=>{e.setTime(+e+t*lr)},(e,t)=>(t-e)/lr,e=>e.getHours());mh.range;const Iw=Ht(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*lr)},(e,t)=>(t-e)/lr,e=>e.getUTCHours());Iw.range;const Qa=Ht(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*_e)/dr,e=>e.getDate()-1);Qa.range;const yh=Ht(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/dr,e=>e.getUTCDate()-1);yh.range;const Pw=Ht(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/dr,e=>Math.floor(e/dr));Pw.range;function ri(e){return Ht(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(t,r)=>{t.setDate(t.getDate()+r*7)},(t,r)=>(r-t-(r.getTimezoneOffset()-t.getTimezoneOffset())*_e)/gh)}const Ho=ri(0),lo=ri(1),Rw=ri(2),Nw=ri(3),Xi=ri(4),qw=ri(5),Ww=ri(6);Ho.range;lo.range;Rw.range;Nw.range;Xi.range;qw.range;Ww.range;function ii(e){return Ht(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},(t,r)=>{t.setUTCDate(t.getUTCDate()+r*7)},(t,r)=>(r-t)/gh)}const Pf=ii(0),ho=ii(1),zw=ii(2),Hw=ii(3),ji=ii(4),Uw=ii(5),Yw=ii(6);Pf.range;ho.range;zw.range;Hw.range;ji.range;Uw.range;Yw.range;const Ch=Ht(e=>{e.setDate(1),e.setHours(0,0,0,0)},(e,t)=>{e.setMonth(e.getMonth()+t)},(e,t)=>t.getMonth()-e.getMonth()+(t.getFullYear()-e.getFullYear())*12,e=>e.getMonth());Ch.range;const Gw=Ht(e=>{e.setUTCDate(1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCMonth(e.getUTCMonth()+t)},(e,t)=>t.getUTCMonth()-e.getUTCMonth()+(t.getUTCFullYear()-e.getUTCFullYear())*12,e=>e.getUTCMonth());Gw.range;const fr=Ht(e=>{e.setMonth(0,1),e.setHours(0,0,0,0)},(e,t)=>{e.setFullYear(e.getFullYear()+t)},(e,t)=>t.getFullYear()-e.getFullYear(),e=>e.getFullYear());fr.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Ht(t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},(t,r)=>{t.setFullYear(t.getFullYear()+r*e)});fr.range;const jr=Ht(e=>{e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCFullYear(e.getUTCFullYear()+t)},(e,t)=>t.getUTCFullYear()-e.getUTCFullYear(),e=>e.getUTCFullYear());jr.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Ht(t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,r)=>{t.setUTCFullYear(t.getUTCFullYear()+r*e)});jr.range;function Xw(e,t,r,i,a,s){const o=[[ki,1,nr],[ki,5,5*nr],[ki,15,15*nr],[ki,30,30*nr],[s,1,_e],[s,5,5*_e],[s,15,15*_e],[s,30,30*_e],[a,1,lr],[a,3,3*lr],[a,6,6*lr],[a,12,12*lr],[i,1,dr],[i,2,2*dr],[r,1,gh],[t,1,Fu],[t,3,3*Fu],[e,1,Rn]];function n(h,c,u){const f=c<h;f&&([h,c]=[c,h]);const d=u&&typeof u.range=="function"?u:l(h,c,u),g=d?d.range(h,+c+1):[];return f?g.reverse():g}function l(h,c,u){const f=Math.abs(c-h)/u,d=oh(([,,m])=>m).right(o,f);if(d===o.length)return e.every(sl(h/Rn,c/Rn,u));if(d===0)return no.every(Math.max(sl(h,c,u),1));const[g,p]=o[f/o[d-1][2]<o[d][2]/f?d-1:d];return g.every(p)}return[n,l]}const[jw,Vw]=Xw(fr,Ch,Ho,Qa,mh,ph);function Nn(e){if(0<=e.y&&e.y<100){var t=new Date(-1,e.m,e.d,e.H,e.M,e.S,e.L);return t.setFullYear(e.y),t}return new Date(e.y,e.m,e.d,e.H,e.M,e.S,e.L)}function qn(e){if(0<=e.y&&e.y<100){var t=new Date(Date.UTC(-1,e.m,e.d,e.H,e.M,e.S,e.L));return t.setUTCFullYear(e.y),t}return new Date(Date.UTC(e.y,e.m,e.d,e.H,e.M,e.S,e.L))}function ua(e,t,r){return{y:e,m:t,d:r,H:0,M:0,S:0,L:0}}function Zw(e){var t=e.dateTime,r=e.date,i=e.time,a=e.periods,s=e.days,o=e.shortDays,n=e.months,l=e.shortMonths,h=da(a),c=fa(a),u=da(s),f=fa(s),d=da(o),g=fa(o),p=da(n),m=fa(n),C=da(l),x=fa(l),k={a:I,A:$,b:q,B:X,c:null,d:Du,e:Du,f:xT,g:FT,G:AT,H:mT,I:yT,j:CT,L:Rf,m:bT,M:kT,p:J,q:Q,Q:Ru,s:Nu,S:wT,u:TT,U:ST,V:_T,w:vT,W:BT,x:null,X:null,y:LT,Y:MT,Z:ET,"%":Pu},w={a:lt,A:st,b:ot,B:xt,c:null,d:Iu,e:Iu,f:IT,g:GT,G:jT,H:$T,I:OT,j:DT,L:qf,m:PT,M:RT,p:Ct,q:St,Q:Ru,s:Nu,S:NT,u:qT,U:WT,V:zT,w:HT,W:UT,x:null,X:null,y:YT,Y:XT,Z:VT,"%":Pu},S={a:R,A:B,b:U,B:A,c:M,d:$u,e:$u,f:dT,g:Eu,G:Au,H:Ou,I:Ou,j:lT,L:uT,m:nT,M:hT,p:H,q:oT,Q:gT,s:pT,S:cT,u:eT,U:rT,V:iT,w:tT,W:aT,x:E,X:L,y:Eu,Y:Au,Z:sT,"%":fT};k.x=_(r,k),k.X=_(i,k),k.c=_(t,k),w.x=_(r,w),w.X=_(i,w),w.c=_(t,w);function _(V,Y){return function(Z){var N=[],dt=-1,F=0,it=V.length,Tt,ge,er;for(Z instanceof Date||(Z=new Date(+Z));++dt<it;)V.charCodeAt(dt)===37&&(N.push(V.slice(F,dt)),(ge=Mu[Tt=V.charAt(++dt)])!=null?Tt=V.charAt(++dt):ge=Tt==="e"?" ":"0",(er=Y[Tt])&&(Tt=er(Z,ge)),N.push(Tt),F=dt+1);return N.push(V.slice(F,dt)),N.join("")}}function v(V,Y){return function(Z){var N=ua(1900,void 0,1),dt=D(N,V,Z+="",0),F,it;if(dt!=Z.length)return null;if("Q"in N)return new Date(N.Q);if("s"in N)return new Date(N.s*1e3+("L"in N?N.L:0));if(Y&&!("Z"in N)&&(N.Z=0),"p"in N&&(N.H=N.H%12+N.p*12),N.m===void 0&&(N.m="q"in N?N.q:0),"V"in N){if(N.V<1||N.V>53)return null;"w"in N||(N.w=1),"Z"in N?(F=qn(ua(N.y,0,1)),it=F.getUTCDay(),F=it>4||it===0?ho.ceil(F):ho(F),F=yh.offset(F,(N.V-1)*7),N.y=F.getUTCFullYear(),N.m=F.getUTCMonth(),N.d=F.getUTCDate()+(N.w+6)%7):(F=Nn(ua(N.y,0,1)),it=F.getDay(),F=it>4||it===0?lo.ceil(F):lo(F),F=Qa.offset(F,(N.V-1)*7),N.y=F.getFullYear(),N.m=F.getMonth(),N.d=F.getDate()+(N.w+6)%7)}else("W"in N||"U"in N)&&("w"in N||(N.w="u"in N?N.u%7:"W"in N?1:0),it="Z"in N?qn(ua(N.y,0,1)).getUTCDay():Nn(ua(N.y,0,1)).getDay(),N.m=0,N.d="W"in N?(N.w+6)%7+N.W*7-(it+5)%7:N.w+N.U*7-(it+6)%7);return"Z"in N?(N.H+=N.Z/100|0,N.M+=N.Z%100,qn(N)):Nn(N)}}function D(V,Y,Z,N){for(var dt=0,F=Y.length,it=Z.length,Tt,ge;dt<F;){if(N>=it)return-1;if(Tt=Y.charCodeAt(dt++),Tt===37){if(Tt=Y.charAt(dt++),ge=S[Tt in Mu?Y.charAt(dt++):Tt],!ge||(N=ge(V,Z,N))<0)return-1}else if(Tt!=Z.charCodeAt(N++))return-1}return N}function H(V,Y,Z){var N=h.exec(Y.slice(Z));return N?(V.p=c.get(N[0].toLowerCase()),Z+N[0].length):-1}function R(V,Y,Z){var N=d.exec(Y.slice(Z));return N?(V.w=g.get(N[0].toLowerCase()),Z+N[0].length):-1}function B(V,Y,Z){var N=u.exec(Y.slice(Z));return N?(V.w=f.get(N[0].toLowerCase()),Z+N[0].length):-1}function U(V,Y,Z){var N=C.exec(Y.slice(Z));return N?(V.m=x.get(N[0].toLowerCase()),Z+N[0].length):-1}function A(V,Y,Z){var N=p.exec(Y.slice(Z));return N?(V.m=m.get(N[0].toLowerCase()),Z+N[0].length):-1}function M(V,Y,Z){return D(V,t,Y,Z)}function E(V,Y,Z){return D(V,r,Y,Z)}function L(V,Y,Z){return D(V,i,Y,Z)}function I(V){return o[V.getDay()]}function $(V){return s[V.getDay()]}function q(V){return l[V.getMonth()]}function X(V){return n[V.getMonth()]}function J(V){return a[+(V.getHours()>=12)]}function Q(V){return 1+~~(V.getMonth()/3)}function lt(V){return o[V.getUTCDay()]}function st(V){return s[V.getUTCDay()]}function ot(V){return l[V.getUTCMonth()]}function xt(V){return n[V.getUTCMonth()]}function Ct(V){return a[+(V.getUTCHours()>=12)]}function St(V){return 1+~~(V.getUTCMonth()/3)}return{format:function(V){var Y=_(V+="",k);return Y.toString=function(){return V},Y},parse:function(V){var Y=v(V+="",!1);return Y.toString=function(){return V},Y},utcFormat:function(V){var Y=_(V+="",w);return Y.toString=function(){return V},Y},utcParse:function(V){var Y=v(V+="",!0);return Y.toString=function(){return V},Y}}}var Mu={"-":"",_:" ",0:"0"},Vt=/^\s*\d+/,Qw=/^%/,Kw=/[\\^$*+?|[\]().{}]/g;function Lt(e,t,r){var i=e<0?"-":"",a=(i?-e:e)+"",s=a.length;return i+(s<r?new Array(r-s+1).join(t)+a:a)}function Jw(e){return e.replace(Kw,"\\$&")}function da(e){return new RegExp("^(?:"+e.map(Jw).join("|")+")","i")}function fa(e){return new Map(e.map((t,r)=>[t.toLowerCase(),r]))}function tT(e,t,r){var i=Vt.exec(t.slice(r,r+1));return i?(e.w=+i[0],r+i[0].length):-1}function eT(e,t,r){var i=Vt.exec(t.slice(r,r+1));return i?(e.u=+i[0],r+i[0].length):-1}function rT(e,t,r){var i=Vt.exec(t.slice(r,r+2));return i?(e.U=+i[0],r+i[0].length):-1}function iT(e,t,r){var i=Vt.exec(t.slice(r,r+2));return i?(e.V=+i[0],r+i[0].length):-1}function aT(e,t,r){var i=Vt.exec(t.slice(r,r+2));return i?(e.W=+i[0],r+i[0].length):-1}function Au(e,t,r){var i=Vt.exec(t.slice(r,r+4));return i?(e.y=+i[0],r+i[0].length):-1}function Eu(e,t,r){var i=Vt.exec(t.slice(r,r+2));return i?(e.y=+i[0]+(+i[0]>68?1900:2e3),r+i[0].length):-1}function sT(e,t,r){var i=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(r,r+6));return i?(e.Z=i[1]?0:-(i[2]+(i[3]||"00")),r+i[0].length):-1}function oT(e,t,r){var i=Vt.exec(t.slice(r,r+1));return i?(e.q=i[0]*3-3,r+i[0].length):-1}function nT(e,t,r){var i=Vt.exec(t.slice(r,r+2));return i?(e.m=i[0]-1,r+i[0].length):-1}function $u(e,t,r){var i=Vt.exec(t.slice(r,r+2));return i?(e.d=+i[0],r+i[0].length):-1}function lT(e,t,r){var i=Vt.exec(t.slice(r,r+3));return i?(e.m=0,e.d=+i[0],r+i[0].length):-1}function Ou(e,t,r){var i=Vt.exec(t.slice(r,r+2));return i?(e.H=+i[0],r+i[0].length):-1}function hT(e,t,r){var i=Vt.exec(t.slice(r,r+2));return i?(e.M=+i[0],r+i[0].length):-1}function cT(e,t,r){var i=Vt.exec(t.slice(r,r+2));return i?(e.S=+i[0],r+i[0].length):-1}function uT(e,t,r){var i=Vt.exec(t.slice(r,r+3));return i?(e.L=+i[0],r+i[0].length):-1}function dT(e,t,r){var i=Vt.exec(t.slice(r,r+6));return i?(e.L=Math.floor(i[0]/1e3),r+i[0].length):-1}function fT(e,t,r){var i=Qw.exec(t.slice(r,r+1));return i?r+i[0].length:-1}function gT(e,t,r){var i=Vt.exec(t.slice(r));return i?(e.Q=+i[0],r+i[0].length):-1}function pT(e,t,r){var i=Vt.exec(t.slice(r));return i?(e.s=+i[0],r+i[0].length):-1}function Du(e,t){return Lt(e.getDate(),t,2)}function mT(e,t){return Lt(e.getHours(),t,2)}function yT(e,t){return Lt(e.getHours()%12||12,t,2)}function CT(e,t){return Lt(1+Qa.count(fr(e),e),t,3)}function Rf(e,t){return Lt(e.getMilliseconds(),t,3)}function xT(e,t){return Rf(e,t)+"000"}function bT(e,t){return Lt(e.getMonth()+1,t,2)}function kT(e,t){return Lt(e.getMinutes(),t,2)}function wT(e,t){return Lt(e.getSeconds(),t,2)}function TT(e){var t=e.getDay();return t===0?7:t}function ST(e,t){return Lt(Ho.count(fr(e)-1,e),t,2)}function Nf(e){var t=e.getDay();return t>=4||t===0?Xi(e):Xi.ceil(e)}function _T(e,t){return e=Nf(e),Lt(Xi.count(fr(e),e)+(fr(e).getDay()===4),t,2)}function vT(e){return e.getDay()}function BT(e,t){return Lt(lo.count(fr(e)-1,e),t,2)}function LT(e,t){return Lt(e.getFullYear()%100,t,2)}function FT(e,t){return e=Nf(e),Lt(e.getFullYear()%100,t,2)}function MT(e,t){return Lt(e.getFullYear()%1e4,t,4)}function AT(e,t){var r=e.getDay();return e=r>=4||r===0?Xi(e):Xi.ceil(e),Lt(e.getFullYear()%1e4,t,4)}function ET(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+Lt(t/60|0,"0",2)+Lt(t%60,"0",2)}function Iu(e,t){return Lt(e.getUTCDate(),t,2)}function $T(e,t){return Lt(e.getUTCHours(),t,2)}function OT(e,t){return Lt(e.getUTCHours()%12||12,t,2)}function DT(e,t){return Lt(1+yh.count(jr(e),e),t,3)}function qf(e,t){return Lt(e.getUTCMilliseconds(),t,3)}function IT(e,t){return qf(e,t)+"000"}function PT(e,t){return Lt(e.getUTCMonth()+1,t,2)}function RT(e,t){return Lt(e.getUTCMinutes(),t,2)}function NT(e,t){return Lt(e.getUTCSeconds(),t,2)}function qT(e){var t=e.getUTCDay();return t===0?7:t}function WT(e,t){return Lt(Pf.count(jr(e)-1,e),t,2)}function Wf(e){var t=e.getUTCDay();return t>=4||t===0?ji(e):ji.ceil(e)}function zT(e,t){return e=Wf(e),Lt(ji.count(jr(e),e)+(jr(e).getUTCDay()===4),t,2)}function HT(e){return e.getUTCDay()}function UT(e,t){return Lt(ho.count(jr(e)-1,e),t,2)}function YT(e,t){return Lt(e.getUTCFullYear()%100,t,2)}function GT(e,t){return e=Wf(e),Lt(e.getUTCFullYear()%100,t,2)}function XT(e,t){return Lt(e.getUTCFullYear()%1e4,t,4)}function jT(e,t){var r=e.getUTCDay();return e=r>=4||r===0?ji(e):ji.ceil(e),Lt(e.getUTCFullYear()%1e4,t,4)}function VT(){return"+0000"}function Pu(){return"%"}function Ru(e){return+e}function Nu(e){return Math.floor(+e/1e3)}var fi,zf;ZT({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"]});function ZT(e){return fi=Zw(e),zf=fi.format,fi.parse,fi.utcFormat,fi.utcParse,fi}function QT(e){return new Date(e)}function KT(e){return e instanceof Date?+e:+new Date(+e)}function Hf(e,t,r,i,a,s,o,n,l,h){var c=If(),u=c.invert,f=c.domain,d=h(".%L"),g=h(":%S"),p=h("%I:%M"),m=h("%I %p"),C=h("%a %d"),x=h("%b %d"),k=h("%B"),w=h("%Y");function S(_){return(l(_)<_?d:n(_)<_?g:o(_)<_?p:s(_)<_?m:i(_)<_?a(_)<_?C:x:r(_)<_?k:w)(_)}return c.invert=function(_){return new Date(u(_))},c.domain=function(_){return arguments.length?f(Array.from(_,KT)):f().map(QT)},c.ticks=function(_){var v=f();return e(v[0],v[v.length-1],_??10)},c.tickFormat=function(_,v){return v==null?S:h(v)},c.nice=function(_){var v=f();return(!_||typeof _.range!="function")&&(_=t(v[0],v[v.length-1],_??10)),_?f(Ow(v,_)):c},c.copy=function(){return Df(c,Hf(e,t,r,i,a,s,o,n,l,h))},c}function u3(){return zo.apply(Hf(jw,Vw,fr,Ch,Ho,Qa,mh,ph,ki,zf).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function JT(e){for(var t=e.length/6|0,r=new Array(t),i=0;i<t;)r[i]="#"+e.slice(i*6,++i*6);return r}const d3=JT("4e79a7f28e2ce1575976b7b259a14fedc949af7aa1ff9da79c755fbab0ab");function Rt(e){return function(){return e}}const qu=Math.abs,ee=Math.atan2,Dr=Math.cos,tS=Math.max,Wn=Math.min,He=Math.sin,wi=Math.sqrt,ie=1e-12,Na=Math.PI,co=Na/2,Rs=2*Na;function eS(e){return e>1?0:e<-1?Na:Math.acos(e)}function Wu(e){return e>=1?co:e<=-1?-co:Math.asin(e)}function Uf(e){let t=3;return e.digits=function(r){if(!arguments.length)return t;if(r==null)t=null;else{const i=Math.floor(r);if(!(i>=0))throw new RangeError(`invalid digits: ${r}`);t=i}return e},()=>new N2(t)}function rS(e){return e.innerRadius}function iS(e){return e.outerRadius}function aS(e){return e.startAngle}function sS(e){return e.endAngle}function oS(e){return e&&e.padAngle}function nS(e,t,r,i,a,s,o,n){var l=r-e,h=i-t,c=o-a,u=n-s,f=u*l-c*h;if(!(f*f<ie))return f=(c*(t-s)-u*(e-a))/f,[e+f*l,t+f*h]}function Ss(e,t,r,i,a,s,o){var n=e-r,l=t-i,h=(o?s:-s)/wi(n*n+l*l),c=h*l,u=-h*n,f=e+c,d=t+u,g=r+c,p=i+u,m=(f+g)/2,C=(d+p)/2,x=g-f,k=p-d,w=x*x+k*k,S=a-s,_=f*p-g*d,v=(k<0?-1:1)*wi(tS(0,S*S*w-_*_)),D=(_*k-x*v)/w,H=(-_*x-k*v)/w,R=(_*k+x*v)/w,B=(-_*x+k*v)/w,U=D-m,A=H-C,M=R-m,E=B-C;return U*U+A*A>M*M+E*E&&(D=R,H=B),{cx:D,cy:H,x01:-c,y01:-u,x11:D*(a/S-1),y11:H*(a/S-1)}}function f3(){var e=rS,t=iS,r=Rt(0),i=null,a=aS,s=sS,o=oS,n=null,l=Uf(h);function h(){var c,u,f=+e.apply(this,arguments),d=+t.apply(this,arguments),g=a.apply(this,arguments)-co,p=s.apply(this,arguments)-co,m=qu(p-g),C=p>g;if(n||(n=c=l()),d<f&&(u=d,d=f,f=u),!(d>ie))n.moveTo(0,0);else if(m>Rs-ie)n.moveTo(d*Dr(g),d*He(g)),n.arc(0,0,d,g,p,!C),f>ie&&(n.moveTo(f*Dr(p),f*He(p)),n.arc(0,0,f,p,g,C));else{var x=g,k=p,w=g,S=p,_=m,v=m,D=o.apply(this,arguments)/2,H=D>ie&&(i?+i.apply(this,arguments):wi(f*f+d*d)),R=Wn(qu(d-f)/2,+r.apply(this,arguments)),B=R,U=R,A,M;if(H>ie){var E=Wu(H/f*He(D)),L=Wu(H/d*He(D));(_-=E*2)>ie?(E*=C?1:-1,w+=E,S-=E):(_=0,w=S=(g+p)/2),(v-=L*2)>ie?(L*=C?1:-1,x+=L,k-=L):(v=0,x=k=(g+p)/2)}var I=d*Dr(x),$=d*He(x),q=f*Dr(S),X=f*He(S);if(R>ie){var J=d*Dr(k),Q=d*He(k),lt=f*Dr(w),st=f*He(w),ot;if(m<Na)if(ot=nS(I,$,lt,st,J,Q,q,X)){var xt=I-ot[0],Ct=$-ot[1],St=J-ot[0],V=Q-ot[1],Y=1/He(eS((xt*St+Ct*V)/(wi(xt*xt+Ct*Ct)*wi(St*St+V*V)))/2),Z=wi(ot[0]*ot[0]+ot[1]*ot[1]);B=Wn(R,(f-Z)/(Y-1)),U=Wn(R,(d-Z)/(Y+1))}else B=U=0}v>ie?U>ie?(A=Ss(lt,st,I,$,d,U,C),M=Ss(J,Q,q,X,d,U,C),n.moveTo(A.cx+A.x01,A.cy+A.y01),U<R?n.arc(A.cx,A.cy,U,ee(A.y01,A.x01),ee(M.y01,M.x01),!C):(n.arc(A.cx,A.cy,U,ee(A.y01,A.x01),ee(A.y11,A.x11),!C),n.arc(0,0,d,ee(A.cy+A.y11,A.cx+A.x11),ee(M.cy+M.y11,M.cx+M.x11),!C),n.arc(M.cx,M.cy,U,ee(M.y11,M.x11),ee(M.y01,M.x01),!C))):(n.moveTo(I,$),n.arc(0,0,d,x,k,!C)):n.moveTo(I,$),!(f>ie)||!(_>ie)?n.lineTo(q,X):B>ie?(A=Ss(q,X,J,Q,f,-B,C),M=Ss(I,$,lt,st,f,-B,C),n.lineTo(A.cx+A.x01,A.cy+A.y01),B<R?n.arc(A.cx,A.cy,B,ee(A.y01,A.x01),ee(M.y01,M.x01),!C):(n.arc(A.cx,A.cy,B,ee(A.y01,A.x01),ee(A.y11,A.x11),!C),n.arc(0,0,f,ee(A.cy+A.y11,A.cx+A.x11),ee(M.cy+M.y11,M.cx+M.x11),C),n.arc(M.cx,M.cy,B,ee(M.y11,M.x11),ee(M.y01,M.x01),!C))):n.arc(0,0,f,S,w,C)}if(n.closePath(),c)return n=null,c+""||null}return h.centroid=function(){var c=(+e.apply(this,arguments)+ +t.apply(this,arguments))/2,u=(+a.apply(this,arguments)+ +s.apply(this,arguments))/2-Na/2;return[Dr(u)*c,He(u)*c]},h.innerRadius=function(c){return arguments.length?(e=typeof c=="function"?c:Rt(+c),h):e},h.outerRadius=function(c){return arguments.length?(t=typeof c=="function"?c:Rt(+c),h):t},h.cornerRadius=function(c){return arguments.length?(r=typeof c=="function"?c:Rt(+c),h):r},h.padRadius=function(c){return arguments.length?(i=c==null?null:typeof c=="function"?c:Rt(+c),h):i},h.startAngle=function(c){return arguments.length?(a=typeof c=="function"?c:Rt(+c),h):a},h.endAngle=function(c){return arguments.length?(s=typeof c=="function"?c:Rt(+c),h):s},h.padAngle=function(c){return arguments.length?(o=typeof c=="function"?c:Rt(+c),h):o},h.context=function(c){return arguments.length?(n=c??null,h):n},h}function Yf(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function Gf(e){this._context=e}Gf.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t);break}}};function Ma(e){return new Gf(e)}function lS(e){return e[0]}function hS(e){return e[1]}function cS(e,t){var r=Rt(!0),i=null,a=Ma,s=null,o=Uf(n);e=typeof e=="function"?e:e===void 0?lS:Rt(e),t=typeof t=="function"?t:t===void 0?hS:Rt(t);function n(l){var h,c=(l=Yf(l)).length,u,f=!1,d;for(i==null&&(s=a(d=o())),h=0;h<=c;++h)!(h<c&&r(u=l[h],h,l))===f&&((f=!f)?s.lineStart():s.lineEnd()),f&&s.point(+e(u,h,l),+t(u,h,l));if(d)return s=null,d+""||null}return n.x=function(l){return arguments.length?(e=typeof l=="function"?l:Rt(+l),n):e},n.y=function(l){return arguments.length?(t=typeof l=="function"?l:Rt(+l),n):t},n.defined=function(l){return arguments.length?(r=typeof l=="function"?l:Rt(!!l),n):r},n.curve=function(l){return arguments.length?(a=l,i!=null&&(s=a(i)),n):a},n.context=function(l){return arguments.length?(l==null?i=s=null:s=a(i=l),n):i},n}function uS(e,t){return t<e?-1:t>e?1:t>=e?0:NaN}function dS(e){return e}function g3(){var e=dS,t=uS,r=null,i=Rt(0),a=Rt(Rs),s=Rt(0);function o(n){var l,h=(n=Yf(n)).length,c,u,f=0,d=new Array(h),g=new Array(h),p=+i.apply(this,arguments),m=Math.min(Rs,Math.max(-Rs,a.apply(this,arguments)-p)),C,x=Math.min(Math.abs(m)/h,s.apply(this,arguments)),k=x*(m<0?-1:1),w;for(l=0;l<h;++l)(w=g[d[l]=l]=+e(n[l],l,n))>0&&(f+=w);for(t!=null?d.sort(function(S,_){return t(g[S],g[_])}):r!=null&&d.sort(function(S,_){return r(n[S],n[_])}),l=0,u=f?(m-h*k)/f:0;l<h;++l,p=C)c=d[l],w=g[c],C=p+(w>0?w*u:0)+k,g[c]={data:n[c],index:l,value:w,startAngle:p,endAngle:C,padAngle:x};return g}return o.value=function(n){return arguments.length?(e=typeof n=="function"?n:Rt(+n),o):e},o.sortValues=function(n){return arguments.length?(t=n,r=null,o):t},o.sort=function(n){return arguments.length?(r=n,t=null,o):r},o.startAngle=function(n){return arguments.length?(i=typeof n=="function"?n:Rt(+n),o):i},o.endAngle=function(n){return arguments.length?(a=typeof n=="function"?n:Rt(+n),o):a},o.padAngle=function(n){return arguments.length?(s=typeof n=="function"?n:Rt(+n),o):s},o}class Xf{constructor(t,r){this._context=t,this._x=r}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(t,r){switch(t=+t,r=+r,this._point){case 0:{this._point=1,this._line?this._context.lineTo(t,r):this._context.moveTo(t,r);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,r,t,r):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+r)/2,t,this._y0,t,r);break}}this._x0=t,this._y0=r}}function jf(e){return new Xf(e,!0)}function Vf(e){return new Xf(e,!1)}function Br(){}function uo(e,t,r){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+r)/6)}function Uo(e){this._context=e}Uo.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:uo(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:uo(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function Cl(e){return new Uo(e)}function Zf(e){this._context=e}Zf.prototype={areaStart:Br,areaEnd:Br,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:uo(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function fS(e){return new Zf(e)}function Qf(e){this._context=e}Qf.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var r=(this._x0+4*this._x1+e)/6,i=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(r,i):this._context.moveTo(r,i);break;case 3:this._point=4;default:uo(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function gS(e){return new Qf(e)}function Kf(e,t){this._basis=new Uo(e),this._beta=t}Kf.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var e=this._x,t=this._y,r=e.length-1;if(r>0)for(var i=e[0],a=t[0],s=e[r]-i,o=t[r]-a,n=-1,l;++n<=r;)l=n/r,this._basis.point(this._beta*e[n]+(1-this._beta)*(i+l*s),this._beta*t[n]+(1-this._beta)*(a+l*o));this._x=this._y=null,this._basis.lineEnd()},point:function(e,t){this._x.push(+e),this._y.push(+t)}};const pS=(function e(t){function r(i){return t===1?new Uo(i):new Kf(i,t)}return r.beta=function(i){return e(+i)},r})(.85);function fo(e,t,r){e._context.bezierCurveTo(e._x1+e._k*(e._x2-e._x0),e._y1+e._k*(e._y2-e._y0),e._x2+e._k*(e._x1-t),e._y2+e._k*(e._y1-r),e._x2,e._y2)}function xh(e,t){this._context=e,this._k=(1-t)/6}xh.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:fo(this,this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2,this._x1=e,this._y1=t;break;case 2:this._point=3;default:fo(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const Jf=(function e(t){function r(i){return new xh(i,t)}return r.tension=function(i){return e(+i)},r})(0);function bh(e,t){this._context=e,this._k=(1-t)/6}bh.prototype={areaStart:Br,areaEnd:Br,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:fo(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const mS=(function e(t){function r(i){return new bh(i,t)}return r.tension=function(i){return e(+i)},r})(0);function kh(e,t){this._context=e,this._k=(1-t)/6}kh.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:fo(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const yS=(function e(t){function r(i){return new kh(i,t)}return r.tension=function(i){return e(+i)},r})(0);function wh(e,t,r){var i=e._x1,a=e._y1,s=e._x2,o=e._y2;if(e._l01_a>ie){var n=2*e._l01_2a+3*e._l01_a*e._l12_a+e._l12_2a,l=3*e._l01_a*(e._l01_a+e._l12_a);i=(i*n-e._x0*e._l12_2a+e._x2*e._l01_2a)/l,a=(a*n-e._y0*e._l12_2a+e._y2*e._l01_2a)/l}if(e._l23_a>ie){var h=2*e._l23_2a+3*e._l23_a*e._l12_a+e._l12_2a,c=3*e._l23_a*(e._l23_a+e._l12_a);s=(s*h+e._x1*e._l23_2a-t*e._l12_2a)/c,o=(o*h+e._y1*e._l23_2a-r*e._l12_2a)/c}e._context.bezierCurveTo(i,a,s,o,e._x2,e._y2)}function tg(e,t){this._context=e,this._alpha=t}tg.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var r=this._x2-e,i=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+i*i,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3;default:wh(this,e,t);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const eg=(function e(t){function r(i){return t?new tg(i,t):new xh(i,0)}return r.alpha=function(i){return e(+i)},r})(.5);function rg(e,t){this._context=e,this._alpha=t}rg.prototype={areaStart:Br,areaEnd:Br,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(e,t){if(e=+e,t=+t,this._point){var r=this._x2-e,i=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+i*i,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:wh(this,e,t);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const CS=(function e(t){function r(i){return t?new rg(i,t):new bh(i,0)}return r.alpha=function(i){return e(+i)},r})(.5);function ig(e,t){this._context=e,this._alpha=t}ig.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var r=this._x2-e,i=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+i*i,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:wh(this,e,t);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const xS=(function e(t){function r(i){return t?new ig(i,t):new kh(i,0)}return r.alpha=function(i){return e(+i)},r})(.5);function ag(e){this._context=e}ag.prototype={areaStart:Br,areaEnd:Br,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}};function bS(e){return new ag(e)}function zu(e){return e<0?-1:1}function Hu(e,t,r){var i=e._x1-e._x0,a=t-e._x1,s=(e._y1-e._y0)/(i||a<0&&-0),o=(r-e._y1)/(a||i<0&&-0),n=(s*a+o*i)/(i+a);return(zu(s)+zu(o))*Math.min(Math.abs(s),Math.abs(o),.5*Math.abs(n))||0}function Uu(e,t){var r=e._x1-e._x0;return r?(3*(e._y1-e._y0)/r-t)/2:t}function zn(e,t,r){var i=e._x0,a=e._y0,s=e._x1,o=e._y1,n=(s-i)/3;e._context.bezierCurveTo(i+n,a+n*t,s-n,o-n*r,s,o)}function go(e){this._context=e}go.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:zn(this,this._t0,Uu(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var r=NaN;if(e=+e,t=+t,!(e===this._x1&&t===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,zn(this,Uu(this,r=Hu(this,e,t)),r);break;default:zn(this,this._t0,r=Hu(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=r}}};function sg(e){this._context=new og(e)}(sg.prototype=Object.create(go.prototype)).point=function(e,t){go.prototype.point.call(this,t,e)};function og(e){this._context=e}og.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,r,i,a,s){this._context.bezierCurveTo(t,e,i,r,s,a)}};function ng(e){return new go(e)}function lg(e){return new sg(e)}function hg(e){this._context=e}hg.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,r=e.length;if(r)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),r===2)this._context.lineTo(e[1],t[1]);else for(var i=Yu(e),a=Yu(t),s=0,o=1;o<r;++s,++o)this._context.bezierCurveTo(i[0][s],a[0][s],i[1][s],a[1][s],e[o],t[o]);(this._line||this._line!==0&&r===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(e,t){this._x.push(+e),this._y.push(+t)}};function Yu(e){var t,r=e.length-1,i,a=new Array(r),s=new Array(r),o=new Array(r);for(a[0]=0,s[0]=2,o[0]=e[0]+2*e[1],t=1;t<r-1;++t)a[t]=1,s[t]=4,o[t]=4*e[t]+2*e[t+1];for(a[r-1]=2,s[r-1]=7,o[r-1]=8*e[r-1]+e[r],t=1;t<r;++t)i=a[t]/s[t-1],s[t]-=i,o[t]-=i*o[t-1];for(a[r-1]=o[r-1]/s[r-1],t=r-2;t>=0;--t)a[t]=(o[t]-a[t+1])/s[t];for(s[r-1]=(e[r]+a[r-1])/2,t=0;t<r-1;++t)s[t]=2*e[t+1]-a[t+1];return[a,s]}function cg(e){return new hg(e)}function Yo(e,t){this._context=e,this._t=t}Yo.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var r=this._x*(1-this._t)+e*this._t;this._context.lineTo(r,this._y),this._context.lineTo(r,t)}break}}this._x=e,this._y=t}};function ug(e){return new Yo(e,.5)}function dg(e){return new Yo(e,0)}function fg(e){return new Yo(e,1)}function Ta(e,t,r){this.k=e,this.x=t,this.y=r}Ta.prototype={constructor:Ta,scale:function(e){return e===1?this:new Ta(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new Ta(this.k,this.x+this.k*e,this.y+this.k*t)},apply:function(e){return[e[0]*this.k+this.x,e[1]*this.k+this.y]},applyX:function(e){return e*this.k+this.x},applyY:function(e){return e*this.k+this.y},invert:function(e){return[(e[0]-this.x)/this.k,(e[1]-this.y)/this.k]},invertX:function(e){return(e-this.x)/this.k},invertY:function(e){return(e-this.y)/this.k},rescaleX:function(e){return e.copy().domain(e.range().map(this.invertX,this).map(e.invert,e))},rescaleY:function(e){return e.copy().domain(e.range().map(this.invertY,this).map(e.invert,e))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};Ta.prototype;var kS=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function wS(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var gg=Object.defineProperty,y=(e,t)=>gg(e,"name",{value:t,configurable:!0}),TS=(e,t)=>{for(var r in t)gg(e,r,{get:t[r],enumerable:!0})},pg={exports:{}};(function(e,t){(function(r,i){e.exports=i()})(kS,(function(){var r=1e3,i=6e4,a=36e5,s="millisecond",o="second",n="minute",l="hour",h="day",c="week",u="month",f="quarter",d="year",g="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+)?$/,C=/\[([^\]]+)]|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,x={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(M){var E=["th","st","nd","rd"],L=M%100;return"["+M+(E[(L-20)%10]||E[L]||E[0])+"]"}},k=function(M,E,L){var I=String(M);return!I||I.length>=E?M:""+Array(E+1-I.length).join(L)+M},w={s:k,z:function(M){var E=-M.utcOffset(),L=Math.abs(E),I=Math.floor(L/60),$=L%60;return(E<=0?"+":"-")+k(I,2,"0")+":"+k($,2,"0")},m:function M(E,L){if(E.date()<L.date())return-M(L,E);var I=12*(L.year()-E.year())+(L.month()-E.month()),$=E.clone().add(I,u),q=L-$<0,X=E.clone().add(I+(q?-1:1),u);return+(-(I+(L-$)/(q?$-X:X-$))||0)},a:function(M){return M<0?Math.ceil(M)||0:Math.floor(M)},p:function(M){return{M:u,y:d,w:c,d:h,D:g,h:l,m:n,s:o,ms:s,Q:f}[M]||String(M||"").toLowerCase().replace(/s$/,"")},u:function(M){return M===void 0}},S="en",_={};_[S]=x;var v="$isDayjsObject",D=function(M){return M instanceof U||!(!M||!M[v])},H=function M(E,L,I){var $;if(!E)return S;if(typeof E=="string"){var q=E.toLowerCase();_[q]&&($=q),L&&(_[q]=L,$=q);var X=E.split("-");if(!$&&X.length>1)return M(X[0])}else{var J=E.name;_[J]=E,$=J}return!I&&$&&(S=$),$||!I&&S},R=function(M,E){if(D(M))return M.clone();var L=typeof E=="object"?E:{};return L.date=M,L.args=arguments,new U(L)},B=w;B.l=H,B.i=D,B.w=function(M,E){return R(M,{locale:E.$L,utc:E.$u,x:E.$x,$offset:E.$offset})};var U=(function(){function M(L){this.$L=H(L.locale,null,!0),this.parse(L),this.$x=this.$x||L.x||{},this[v]=!0}var E=M.prototype;return E.parse=function(L){this.$d=(function(I){var $=I.date,q=I.utc;if($===null)return new Date(NaN);if(B.u($))return new Date;if($ instanceof Date)return new Date($);if(typeof $=="string"&&!/Z$/i.test($)){var X=$.match(m);if(X){var J=X[2]-1||0,Q=(X[7]||"0").substring(0,3);return q?new Date(Date.UTC(X[1],J,X[3]||1,X[4]||0,X[5]||0,X[6]||0,Q)):new Date(X[1],J,X[3]||1,X[4]||0,X[5]||0,X[6]||0,Q)}}return new Date($)})(L),this.init()},E.init=function(){var L=this.$d;this.$y=L.getFullYear(),this.$M=L.getMonth(),this.$D=L.getDate(),this.$W=L.getDay(),this.$H=L.getHours(),this.$m=L.getMinutes(),this.$s=L.getSeconds(),this.$ms=L.getMilliseconds()},E.$utils=function(){return B},E.isValid=function(){return this.$d.toString()!==p},E.isSame=function(L,I){var $=R(L);return this.startOf(I)<=$&&$<=this.endOf(I)},E.isAfter=function(L,I){return R(L)<this.startOf(I)},E.isBefore=function(L,I){return this.endOf(I)<R(L)},E.$g=function(L,I,$){return B.u(L)?this[I]:this.set($,L)},E.unix=function(){return Math.floor(this.valueOf()/1e3)},E.valueOf=function(){return this.$d.getTime()},E.startOf=function(L,I){var $=this,q=!!B.u(I)||I,X=B.p(L),J=function(V,Y){var Z=B.w($.$u?Date.UTC($.$y,Y,V):new Date($.$y,Y,V),$);return q?Z:Z.endOf(h)},Q=function(V,Y){return B.w($.toDate()[V].apply($.toDate("s"),(q?[0,0,0,0]:[23,59,59,999]).slice(Y)),$)},lt=this.$W,st=this.$M,ot=this.$D,xt="set"+(this.$u?"UTC":"");switch(X){case d:return q?J(1,0):J(31,11);case u:return q?J(1,st):J(0,st+1);case c:var Ct=this.$locale().weekStart||0,St=(lt<Ct?lt+7:lt)-Ct;return J(q?ot-St:ot+(6-St),st);case h:case g:return Q(xt+"Hours",0);case l:return Q(xt+"Minutes",1);case n:return Q(xt+"Seconds",2);case o:return Q(xt+"Milliseconds",3);default:return this.clone()}},E.endOf=function(L){return this.startOf(L,!1)},E.$set=function(L,I){var $,q=B.p(L),X="set"+(this.$u?"UTC":""),J=($={},$[h]=X+"Date",$[g]=X+"Date",$[u]=X+"Month",$[d]=X+"FullYear",$[l]=X+"Hours",$[n]=X+"Minutes",$[o]=X+"Seconds",$[s]=X+"Milliseconds",$)[q],Q=q===h?this.$D+(I-this.$W):I;if(q===u||q===d){var lt=this.clone().set(g,1);lt.$d[J](Q),lt.init(),this.$d=lt.set(g,Math.min(this.$D,lt.daysInMonth())).$d}else J&&this.$d[J](Q);return this.init(),this},E.set=function(L,I){return this.clone().$set(L,I)},E.get=function(L){return this[B.p(L)]()},E.add=function(L,I){var $,q=this;L=Number(L);var X=B.p(I),J=function(st){var ot=R(q);return B.w(ot.date(ot.date()+Math.round(st*L)),q)};if(X===u)return this.set(u,this.$M+L);if(X===d)return this.set(d,this.$y+L);if(X===h)return J(1);if(X===c)return J(7);var Q=($={},$[n]=i,$[l]=a,$[o]=r,$)[X]||1,lt=this.$d.getTime()+L*Q;return B.w(lt,this)},E.subtract=function(L,I){return this.add(-1*L,I)},E.format=function(L){var I=this,$=this.$locale();if(!this.isValid())return $.invalidDate||p;var q=L||"YYYY-MM-DDTHH:mm:ssZ",X=B.z(this),J=this.$H,Q=this.$m,lt=this.$M,st=$.weekdays,ot=$.months,xt=$.meridiem,Ct=function(Y,Z,N,dt){return Y&&(Y[Z]||Y(I,q))||N[Z].slice(0,dt)},St=function(Y){return B.s(J%12||12,Y,"0")},V=xt||function(Y,Z,N){var dt=Y<12?"AM":"PM";return N?dt.toLowerCase():dt};return q.replace(C,(function(Y,Z){return Z||(function(N){switch(N){case"YY":return String(I.$y).slice(-2);case"YYYY":return B.s(I.$y,4,"0");case"M":return lt+1;case"MM":return B.s(lt+1,2,"0");case"MMM":return Ct($.monthsShort,lt,ot,3);case"MMMM":return Ct(ot,lt);case"D":return I.$D;case"DD":return B.s(I.$D,2,"0");case"d":return String(I.$W);case"dd":return Ct($.weekdaysMin,I.$W,st,2);case"ddd":return Ct($.weekdaysShort,I.$W,st,3);case"dddd":return st[I.$W];case"H":return String(J);case"HH":return B.s(J,2,"0");case"h":return St(1);case"hh":return St(2);case"a":return V(J,Q,!0);case"A":return V(J,Q,!1);case"m":return String(Q);case"mm":return B.s(Q,2,"0");case"s":return String(I.$s);case"ss":return B.s(I.$s,2,"0");case"SSS":return B.s(I.$ms,3,"0");case"Z":return X}return null})(Y)||X.replace(":","")}))},E.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},E.diff=function(L,I,$){var q,X=this,J=B.p(I),Q=R(L),lt=(Q.utcOffset()-this.utcOffset())*i,st=this-Q,ot=function(){return B.m(X,Q)};switch(J){case d:q=ot()/12;break;case u:q=ot();break;case f:q=ot()/3;break;case c:q=(st-lt)/6048e5;break;case h:q=(st-lt)/864e5;break;case l:q=st/a;break;case n:q=st/i;break;case o:q=st/r;break;default:q=st}return $?q:B.a(q)},E.daysInMonth=function(){return this.endOf(u).$D},E.$locale=function(){return _[this.$L]},E.locale=function(L,I){if(!L)return this.$L;var $=this.clone(),q=H(L,I,!0);return q&&($.$L=q),$},E.clone=function(){return B.w(this.$d,this)},E.toDate=function(){return new Date(this.valueOf())},E.toJSON=function(){return this.isValid()?this.toISOString():null},E.toISOString=function(){return this.$d.toISOString()},E.toString=function(){return this.$d.toUTCString()},M})(),A=U.prototype;return R.prototype=A,[["$ms",s],["$s",o],["$m",n],["$H",l],["$W",h],["$M",u],["$y",d],["$D",g]].forEach((function(M){A[M[1]]=function(E){return this.$g(E,M[0],M[1])}})),R.extend=function(M,E){return M.$i||(M(E,U,R),M.$i=!0),R},R.locale=H,R.isDayjs=D,R.unix=function(M){return R(1e3*M)},R.en=_[S],R.Ls=_,R.p={},R}))})(pg);var SS=pg.exports;const _S=wS(SS);var ir={trace:0,debug:1,info:2,warn:3,error:4,fatal:5},G={trace:y((...e)=>{},"trace"),debug:y((...e)=>{},"debug"),info:y((...e)=>{},"info"),warn:y((...e)=>{},"warn"),error:y((...e)=>{},"error"),fatal:y((...e)=>{},"fatal")},Th=y(function(e="fatal"){let t=ir.fatal;typeof e=="string"?e.toLowerCase()in ir&&(t=ir[e]):typeof e=="number"&&(t=e),G.trace=()=>{},G.debug=()=>{},G.info=()=>{},G.warn=()=>{},G.error=()=>{},G.fatal=()=>{},t<=ir.fatal&&(G.fatal=console.error?console.error.bind(console,Se("FATAL"),"color: orange"):console.log.bind(console,"\x1B[35m",Se("FATAL"))),t<=ir.error&&(G.error=console.error?console.error.bind(console,Se("ERROR"),"color: orange"):console.log.bind(console,"\x1B[31m",Se("ERROR"))),t<=ir.warn&&(G.warn=console.warn?console.warn.bind(console,Se("WARN"),"color: orange"):console.log.bind(console,"\x1B[33m",Se("WARN"))),t<=ir.info&&(G.info=console.info?console.info.bind(console,Se("INFO"),"color: lightblue"):console.log.bind(console,"\x1B[34m",Se("INFO"))),t<=ir.debug&&(G.debug=console.debug?console.debug.bind(console,Se("DEBUG"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",Se("DEBUG"))),t<=ir.trace&&(G.trace=console.debug?console.debug.bind(console,Se("TRACE"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",Se("TRACE")))},"setLogLevel"),Se=y(e=>`%c${_S().format("ss.SSS")} : ${e} : `,"format");const Ns={min:{r:0,g:0,b:0,s:0,l:0,a:0},max:{r:255,g:255,b:255,h:360,s:100,l:100,a:1},clamp:{r:e=>e>=255?255:e<0?0:e,g:e=>e>=255?255:e<0?0:e,b:e=>e>=255?255:e<0?0:e,h:e=>e%360,s:e=>e>=100?100:e<0?0:e,l:e=>e>=100?100:e<0?0:e,a:e=>e>=1?1:e<0?0:e},toLinear:e=>{const t=e/255;return e>.03928?Math.pow((t+.055)/1.055,2.4):t/12.92},hue2rgb:(e,t,r)=>(r<0&&(r+=1),r>1&&(r-=1),r<1/6?e+(t-e)*6*r:r<1/2?t:r<2/3?e+(t-e)*(2/3-r)*6:e),hsl2rgb:({h:e,s:t,l:r},i)=>{if(!t)return r*2.55;e/=360,t/=100,r/=100;const a=r<.5?r*(1+t):r+t-r*t,s=2*r-a;switch(i){case"r":return Ns.hue2rgb(s,a,e+1/3)*255;case"g":return Ns.hue2rgb(s,a,e)*255;case"b":return Ns.hue2rgb(s,a,e-1/3)*255}},rgb2hsl:({r:e,g:t,b:r},i)=>{e/=255,t/=255,r/=255;const a=Math.max(e,t,r),s=Math.min(e,t,r),o=(a+s)/2;if(i==="l")return o*100;if(a===s)return 0;const n=a-s,l=o>.5?n/(2-a-s):n/(a+s);if(i==="s")return l*100;switch(a){case e:return((t-r)/n+(t<r?6:0))*60;case t:return((r-e)/n+2)*60;case r:return((e-t)/n+4)*60;default:return-1}}},vS={clamp:(e,t,r)=>t>r?Math.min(t,Math.max(r,e)):Math.min(r,Math.max(t,e)),round:e=>Math.round(e*1e10)/1e10},BS={dec2hex:e=>{const t=Math.round(e).toString(16);return t.length>1?t:`0${t}`}},yt={channel:Ns,lang:vS,unit:BS},kr={};for(let e=0;e<=255;e++)kr[e]=yt.unit.dec2hex(e);const ae={ALL:0,RGB:1,HSL:2};class LS{constructor(){this.type=ae.ALL}get(){return this.type}set(t){if(this.type&&this.type!==t)throw new Error("Cannot change both RGB and HSL channels at the same time");this.type=t}reset(){this.type=ae.ALL}is(t){return this.type===t}}class FS{constructor(t,r){this.color=r,this.changed=!1,this.data=t,this.type=new LS}set(t,r){return this.color=r,this.changed=!1,this.data=t,this.type.type=ae.ALL,this}_ensureHSL(){const t=this.data,{h:r,s:i,l:a}=t;r===void 0&&(t.h=yt.channel.rgb2hsl(t,"h")),i===void 0&&(t.s=yt.channel.rgb2hsl(t,"s")),a===void 0&&(t.l=yt.channel.rgb2hsl(t,"l"))}_ensureRGB(){const t=this.data,{r,g:i,b:a}=t;r===void 0&&(t.r=yt.channel.hsl2rgb(t,"r")),i===void 0&&(t.g=yt.channel.hsl2rgb(t,"g")),a===void 0&&(t.b=yt.channel.hsl2rgb(t,"b"))}get r(){const t=this.data,r=t.r;return!this.type.is(ae.HSL)&&r!==void 0?r:(this._ensureHSL(),yt.channel.hsl2rgb(t,"r"))}get g(){const t=this.data,r=t.g;return!this.type.is(ae.HSL)&&r!==void 0?r:(this._ensureHSL(),yt.channel.hsl2rgb(t,"g"))}get b(){const t=this.data,r=t.b;return!this.type.is(ae.HSL)&&r!==void 0?r:(this._ensureHSL(),yt.channel.hsl2rgb(t,"b"))}get h(){const t=this.data,r=t.h;return!this.type.is(ae.RGB)&&r!==void 0?r:(this._ensureRGB(),yt.channel.rgb2hsl(t,"h"))}get s(){const t=this.data,r=t.s;return!this.type.is(ae.RGB)&&r!==void 0?r:(this._ensureRGB(),yt.channel.rgb2hsl(t,"s"))}get l(){const t=this.data,r=t.l;return!this.type.is(ae.RGB)&&r!==void 0?r:(this._ensureRGB(),yt.channel.rgb2hsl(t,"l"))}get a(){return this.data.a}set r(t){this.type.set(ae.RGB),this.changed=!0,this.data.r=t}set g(t){this.type.set(ae.RGB),this.changed=!0,this.data.g=t}set b(t){this.type.set(ae.RGB),this.changed=!0,this.data.b=t}set h(t){this.type.set(ae.HSL),this.changed=!0,this.data.h=t}set s(t){this.type.set(ae.HSL),this.changed=!0,this.data.s=t}set l(t){this.type.set(ae.HSL),this.changed=!0,this.data.l=t}set a(t){this.changed=!0,this.data.a=t}}const Go=new FS({r:0,g:0,b:0,a:0},"transparent"),Bi={re:/^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i,parse:e=>{if(e.charCodeAt(0)!==35)return;const t=e.match(Bi.re);if(!t)return;const r=t[1],i=parseInt(r,16),a=r.length,s=a%4===0,o=a>4,n=o?1:17,l=o?8:4,h=s?0:-1,c=o?255:15;return Go.set({r:(i>>l*(h+3)&c)*n,g:(i>>l*(h+2)&c)*n,b:(i>>l*(h+1)&c)*n,a:s?(i&c)*n/255:1},e)},stringify:e=>{const{r:t,g:r,b:i,a}=e;return a<1?`#${kr[Math.round(t)]}${kr[Math.round(r)]}${kr[Math.round(i)]}${kr[Math.round(a*255)]}`:`#${kr[Math.round(t)]}${kr[Math.round(r)]}${kr[Math.round(i)]}`}},Wr={re:/^hsla?\(\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?(?:deg|grad|rad|turn)?)\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?%)\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?%)(?:\s*?(?:,|\/)\s*?\+?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?(%)?))?\s*?\)$/i,hueRe:/^(.+?)(deg|grad|rad|turn)$/i,_hue2deg:e=>{const t=e.match(Wr.hueRe);if(t){const[,r,i]=t;switch(i){case"grad":return yt.channel.clamp.h(parseFloat(r)*.9);case"rad":return yt.channel.clamp.h(parseFloat(r)*180/Math.PI);case"turn":return yt.channel.clamp.h(parseFloat(r)*360)}}return yt.channel.clamp.h(parseFloat(e))},parse:e=>{const t=e.charCodeAt(0);if(t!==104&&t!==72)return;const r=e.match(Wr.re);if(!r)return;const[,i,a,s,o,n]=r;return Go.set({h:Wr._hue2deg(i),s:yt.channel.clamp.s(parseFloat(a)),l:yt.channel.clamp.l(parseFloat(s)),a:o?yt.channel.clamp.a(n?parseFloat(o)/100:parseFloat(o)):1},e)},stringify:e=>{const{h:t,s:r,l:i,a}=e;return a<1?`hsla(${yt.lang.round(t)}, ${yt.lang.round(r)}%, ${yt.lang.round(i)}%, ${a})`:`hsl(${yt.lang.round(t)}, ${yt.lang.round(r)}%, ${yt.lang.round(i)}%)`}},Aa={colors:{aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyanaqua:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",transparent:"#00000000",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"},parse:e=>{e=e.toLowerCase();const t=Aa.colors[e];if(t)return Bi.parse(t)},stringify:e=>{const t=Bi.stringify(e);for(const r in Aa.colors)if(Aa.colors[r]===t)return r}},Sa={re:/^rgba?\(\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))(?:\s*?(?:,|\/)\s*?\+?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?)))?\s*?\)$/i,parse:e=>{const t=e.charCodeAt(0);if(t!==114&&t!==82)return;const r=e.match(Sa.re);if(!r)return;const[,i,a,s,o,n,l,h,c]=r;return Go.set({r:yt.channel.clamp.r(a?parseFloat(i)*2.55:parseFloat(i)),g:yt.channel.clamp.g(o?parseFloat(s)*2.55:parseFloat(s)),b:yt.channel.clamp.b(l?parseFloat(n)*2.55:parseFloat(n)),a:h?yt.channel.clamp.a(c?parseFloat(h)/100:parseFloat(h)):1},e)},stringify:e=>{const{r:t,g:r,b:i,a}=e;return a<1?`rgba(${yt.lang.round(t)}, ${yt.lang.round(r)}, ${yt.lang.round(i)}, ${yt.lang.round(a)})`:`rgb(${yt.lang.round(t)}, ${yt.lang.round(r)}, ${yt.lang.round(i)})`}},Ie={format:{keyword:Aa,hex:Bi,rgb:Sa,rgba:Sa,hsl:Wr,hsla:Wr},parse:e=>{if(typeof e!="string")return e;const t=Bi.parse(e)||Sa.parse(e)||Wr.parse(e)||Aa.parse(e);if(t)return t;throw new Error(`Unsupported color format: "${e}"`)},stringify:e=>!e.changed&&e.color?e.color:e.type.is(ae.HSL)||e.data.r===void 0?Wr.stringify(e):e.a<1||!Number.isInteger(e.r)||!Number.isInteger(e.g)||!Number.isInteger(e.b)?Sa.stringify(e):Bi.stringify(e)},mg=(e,t)=>{const r=Ie.parse(e);for(const i in t)r[i]=yt.channel.clamp[i](t[i]);return Ie.stringify(r)},_r=(e,t,r=0,i=1)=>{if(typeof e!="number")return mg(e,{a:t});const a=Go.set({r:yt.channel.clamp.r(e),g:yt.channel.clamp.g(t),b:yt.channel.clamp.b(r),a:yt.channel.clamp.a(i)});return Ie.stringify(a)},p3=(e,t)=>yt.lang.round(Ie.parse(e)[t]),MS=e=>{const{r:t,g:r,b:i}=Ie.parse(e),a=.2126*yt.channel.toLinear(t)+.7152*yt.channel.toLinear(r)+.0722*yt.channel.toLinear(i);return yt.lang.round(a)},AS=e=>MS(e)>=.5,Ne=e=>!AS(e),Sh=(e,t,r)=>{const i=Ie.parse(e),a=i[t],s=yt.channel.clamp[t](a+r);return a!==s&&(i[t]=s),Ie.stringify(i)},W=(e,t)=>Sh(e,"l",t),z=(e,t)=>Sh(e,"l",-t),m3=(e,t)=>Sh(e,"a",-t),b=(e,t)=>{const r=Ie.parse(e),i={};for(const a in t)t[a]&&(i[a]=r[a]+t[a]);return mg(e,i)},ES=(e,t,r=50)=>{const{r:i,g:a,b:s,a:o}=Ie.parse(e),{r:n,g:l,b:h,a:c}=Ie.parse(t),u=r/100,f=u*2-1,d=o-c,p=((f*d===-1?f:(f+d)/(1+f*d))+1)/2,m=1-p,C=i*p+n*m,x=a*p+l*m,k=s*p+h*m,w=o*u+c*(1-u);return _r(C,x,k,w)},O=(e,t=100)=>{const r=Ie.parse(e);return r.r=255-r.r,r.g=255-r.g,r.b=255-r.b,ES(r,e,t)};var xl=y((e,t,{depth:r=2}={})=>{const i={depth:r};if(Array.isArray(t)&&!Array.isArray(e))return t.forEach(a=>xl(e,a,i)),e;if(Array.isArray(t)&&Array.isArray(e))return t.forEach(a=>{e.includes(a)||e.push(a)}),e;if(e==null||r<=0)return e!=null&&typeof e=="object"&&typeof t=="object"?Object.assign(e,t):t;if(t!=null&&typeof e=="object"&&typeof t=="object"){const a=e;Object.entries(t).forEach(([s,o])=>{if(typeof o=="object"){if(o===null)return;Object.hasOwn(e,s)||Object.defineProperty(e,s,{value:void 0,writable:!0,enumerable:!0,configurable:!0}),a[s]===void 0&&(a[s]=Array.isArray(o)?[]:{}),typeof a[s]=="object"&&(a[s]=xl(a[s],o,{depth:r-1}))}else typeof a[s]!="object"&&(Object.hasOwn(e,s)?a[s]=o:Object.defineProperty(e,s,{value:o,writable:!0,enumerable:!0,configurable:!0}))})}return e},"assignWithDepth"),Xt=xl,Qe="#ffffff",Ke="#f2f2f2",mt=y((e,t)=>t?b(e,{s:-40,l:10}):b(e,{s:-40,l:-10}),"mkBorder"),Fi,$S=(Fi=class{constructor(){this.background="#f4f4f4",this.primaryColor="#fff4dd",this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.useGradient=!0,this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,1))"}updateColors(){var r,i,a,s,o,n,l,h,c,u,f,d,g,p,m,C,x,k,w,S,_,v,D,H,R,B,U,A,M,E,L,I,$,q,X,J,Q,lt,st,ot,xt,Ct,St,V,Y,Z,N,dt,F;if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||b(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||b(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||mt(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||mt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||mt(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||mt(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||O(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||O(this.tertiaryColor),this.lineColor=this.lineColor||O(this.background),this.arrowheadColor=this.arrowheadColor||O(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?z(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||z(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||O(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||W(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.vertLineColor=this.vertLineColor||"navy",this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.noteFontWeight=this.noteFontWeight||"normal",this.fontWeight=this.fontWeight||"normal",this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.darkMode?(this.rowOdd=this.rowOdd||z(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||z(this.mainBkg,10)):(this.rowOdd=this.rowOdd||W(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||W(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||b(this.primaryColor,{h:30}),this.cScale4=this.cScale4||b(this.primaryColor,{h:60}),this.cScale5=this.cScale5||b(this.primaryColor,{h:90}),this.cScale6=this.cScale6||b(this.primaryColor,{h:120}),this.cScale7=this.cScale7||b(this.primaryColor,{h:150}),this.cScale8=this.cScale8||b(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||b(this.primaryColor,{h:270}),this.cScale10=this.cScale10||b(this.primaryColor,{h:300}),this.cScale11=this.cScale11||b(this.primaryColor,{h:330}),this.darkMode)for(let it=0;it<this.THEME_COLOR_LIMIT;it++)this["cScale"+it]=z(this["cScale"+it],75);else for(let it=0;it<this.THEME_COLOR_LIMIT;it++)this["cScale"+it]=z(this["cScale"+it],25);for(let it=0;it<this.THEME_COLOR_LIMIT;it++)this["cScaleInv"+it]=this["cScaleInv"+it]||O(this["cScale"+it]);for(let it=0;it<this.THEME_COLOR_LIMIT;it++)this.darkMode?this["cScalePeer"+it]=this["cScalePeer"+it]||W(this["cScale"+it],10):this["cScalePeer"+it]=this["cScalePeer"+it]||z(this["cScale"+it],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let it=0;it<this.THEME_COLOR_LIMIT;it++)this["cScaleLabel"+it]=this["cScaleLabel"+it]||this.scaleLabelColor;const t=this.darkMode?-4:-1;for(let it=0;it<5;it++)this["surface"+it]=this["surface"+it]||b(this.mainBkg,{h:180,s:-15,l:t*(5+it*3)}),this["surfacePeer"+it]=this["surfacePeer"+it]||b(this.mainBkg,{h:180,s:-15,l:t*(8+it*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||b(this.primaryColor,{h:64}),this.fillType3=this.fillType3||b(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||b(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||b(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||b(this.primaryColor,{h:128}),this.fillType7=this.fillType7||b(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||this.tertiaryColor,this.pie4=this.pie4||b(this.primaryColor,{l:-10}),this.pie5=this.pie5||b(this.secondaryColor,{l:-10}),this.pie6=this.pie6||b(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||b(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||b(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||b(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||b(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||b(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||b(this.primaryColor,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.venn1=this.venn1??b(this.primaryColor,{l:-30}),this.venn2=this.venn2??b(this.secondaryColor,{l:-30}),this.venn3=this.venn3??b(this.tertiaryColor,{l:-30}),this.venn4=this.venn4??b(this.primaryColor,{h:60,l:-30}),this.venn5=this.venn5??b(this.primaryColor,{h:-60,l:-30}),this.venn6=this.venn6??b(this.secondaryColor,{h:60,l:-30}),this.venn7=this.venn7??b(this.primaryColor,{h:120,l:-30}),this.venn8=this.venn8??b(this.secondaryColor,{h:120,l:-30}),this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.cynefin={domainFontSize:((r=this.cynefin)==null?void 0:r.domainFontSize)||16,itemFontSize:((i=this.cynefin)==null?void 0:i.itemFontSize)||12,boundaryColor:((a=this.cynefin)==null?void 0:a.boundaryColor)||this.lineColor,boundaryWidth:((s=this.cynefin)==null?void 0:s.boundaryWidth)||2,cliffColor:((o=this.cynefin)==null?void 0:o.cliffColor)||"#8B0000",cliffWidth:((n=this.cynefin)==null?void 0:n.cliffWidth)||4,arrowColor:((l=this.cynefin)==null?void 0:l.arrowColor)||this.lineColor,arrowWidth:((h=this.cynefin)==null?void 0:h.arrowWidth)||2,complexBg:((c=this.cynefin)==null?void 0:c.complexBg)||"#E8F5E9",complicatedBg:((u=this.cynefin)==null?void 0:u.complicatedBg)||"#E3F2FD",chaoticBg:((f=this.cynefin)==null?void 0:f.chaoticBg)||"#FBE9E7",clearBg:((d=this.cynefin)==null?void 0:d.clearBg)||"#FFF8E1",confusionBg:((g=this.cynefin)==null?void 0:g.confusionBg)||"#F3E5F5",textColor:((p=this.cynefin)==null?void 0:p.textColor)||this.textColor,labelColor:((m=this.cynefin)==null?void 0:m.labelColor)||this.primaryTextColor},this.radar={axisColor:((C=this.radar)==null?void 0:C.axisColor)||this.lineColor,axisStrokeWidth:((x=this.radar)==null?void 0:x.axisStrokeWidth)||2,axisLabelFontSize:((k=this.radar)==null?void 0:k.axisLabelFontSize)||12,curveOpacity:((w=this.radar)==null?void 0:w.curveOpacity)||.5,curveStrokeWidth:((S=this.radar)==null?void 0:S.curveStrokeWidth)||2,graticuleColor:((_=this.radar)==null?void 0:_.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((v=this.radar)==null?void 0:v.graticuleStrokeWidth)||1,graticuleOpacity:((D=this.radar)==null?void 0:D.graticuleOpacity)||.3,legendBoxSize:((H=this.radar)==null?void 0:H.legendBoxSize)||12,legendFontSize:((R=this.radar)==null?void 0:R.legendFontSize)||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#dc3545",this.wardley={backgroundColor:((B=this.wardley)==null?void 0:B.backgroundColor)||this.background,axisColor:((U=this.wardley)==null?void 0:U.axisColor)||this.lineColor,axisTextColor:((A=this.wardley)==null?void 0:A.axisTextColor)||this.primaryTextColor,gridColor:((M=this.wardley)==null?void 0:M.gridColor)||this.gridColor,componentFill:((E=this.wardley)==null?void 0:E.componentFill)||this.background,componentStroke:((L=this.wardley)==null?void 0:L.componentStroke)||this.lineColor,componentLabelColor:((I=this.wardley)==null?void 0:I.componentLabelColor)||this.primaryTextColor,linkStroke:(($=this.wardley)==null?void 0:$.linkStroke)||this.lineColor,evolutionStroke:((q=this.wardley)==null?void 0:q.evolutionStroke)||this.wardleyEvolutionColor,annotationStroke:((X=this.wardley)==null?void 0:X.annotationStroke)||this.lineColor,annotationTextColor:((J=this.wardley)==null?void 0:J.annotationTextColor)||this.primaryTextColor,annotationFill:((Q=this.wardley)==null?void 0:Q.annotationFill)||this.background},this.archEdgeColor=this.archEdgeColor||"#777",this.archEdgeArrowColor=this.archEdgeArrowColor||"#777",this.archEdgeWidth=this.archEdgeWidth||"3",this.archGroupBorderColor=this.archGroupBorderColor||"#000",this.archGroupBorderWidth=this.archGroupBorderWidth||"2px",this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||b(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||b(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||b(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||b(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||b(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||b(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Ne(this.quadrant1Fill)?W(this.quadrant1Fill):z(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:((lt=this.xyChart)==null?void 0:lt.backgroundColor)||this.background,titleColor:((st=this.xyChart)==null?void 0:st.titleColor)||this.primaryTextColor,dataLabelColor:((ot=this.xyChart)==null?void 0:ot.dataLabelColor)||this.primaryTextColor,xAxisTitleColor:((xt=this.xyChart)==null?void 0:xt.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((Ct=this.xyChart)==null?void 0:Ct.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((St=this.xyChart)==null?void 0:St.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((V=this.xyChart)==null?void 0:V.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((Y=this.xyChart)==null?void 0:Y.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((Z=this.xyChart)==null?void 0:Z.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((N=this.xyChart)==null?void 0:N.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((dt=this.xyChart)==null?void 0:dt.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((F=this.xyChart)==null?void 0:F.plotColorPalette)||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?z(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||b(this.primaryColor,{h:-30}),this.git4=this.git4||b(this.primaryColor,{h:-60}),this.git5=this.git5||b(this.primaryColor,{h:-90}),this.git6=this.git6||b(this.primaryColor,{h:60}),this.git7=this.git7||b(this.primaryColor,{h:120}),this.darkMode?(this.git0=W(this.git0,25),this.git1=W(this.git1,25),this.git2=W(this.git2,25),this.git3=W(this.git3,25),this.git4=W(this.git4,25),this.git5=W(this.git5,25),this.git6=W(this.git6,25),this.git7=W(this.git7,25)):(this.git0=z(this.git0,25),this.git1=z(this.git1,25),this.git2=z(this.git2,25),this.git3=z(this.git3,25),this.git4=z(this.git4,25),this.git5=z(this.git5,25),this.git6=z(this.git6,25),this.git7=z(this.git7,25)),this.gitInv0=this.gitInv0||O(this.git0),this.gitInv1=this.gitInv1||O(this.git1),this.gitInv2=this.gitInv2||O(this.git2),this.gitInv3=this.gitInv3||O(this.git3),this.gitInv4=this.gitInv4||O(this.git4),this.gitInv5=this.gitInv5||O(this.git5),this.gitInv6=this.gitInv6||O(this.git6),this.gitInv7=this.gitInv7||O(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?"black":this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.emUiFill=this.emUiFill||"white",this.emUiStroke=this.emUiStroke||"#dbdada",this.emProcessorFill=this.emProcessorFill||"#edb3f6",this.emProcessorStroke=this.emProcessorStroke||"#b88cbf",this.emReadModelFill=this.emReadModelFill||"#d3f1a2",this.emReadModelStroke=this.emReadModelStroke||"#a3b732",this.emCommandFill=this.emCommandFill||"#bcd6fe",this.emCommandStroke=this.emCommandStroke||"#679ac3",this.emEventFill=this.emEventFill||"#ffb778",this.emEventStroke=this.emEventStroke||"#c19a0f",this.emSwimlaneBackgroundOdd=this.emSwimlaneBackgroundOdd||"rgb(250,250,250)",this.emSwimlaneBackgroundStroke=this.emSwimlaneBackgroundStroke||"rgb(240,240,240)",this.emArrowhead=this.emArrowhead||this.lineColor,this.emRelationStroke=this.emRelationStroke||this.lineColor,this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Qe,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Ke,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},y(Fi,"Theme"),Fi),OS=y(e=>{const t=new $S;return t.calculate(e),t},"getThemeVariables"),Mi,DS=(Mi=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=W(this.primaryColor,16),this.tertiaryColor=b(this.primaryColor,{h:-160}),this.primaryBorderColor=O(this.background),this.secondaryBorderColor=mt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=mt(this.tertiaryColor,this.darkMode),this.primaryTextColor=O(this.primaryColor),this.secondaryTextColor=O(this.secondaryColor),this.tertiaryTextColor=O(this.tertiaryColor),this.lineColor=O(this.background),this.textColor=O(this.background),this.mainBkg="#1f2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=W(O("#323D47"),10),this.lineColor="calculated",this.border1="#ccc",this.border2=_r(255,255,255,.25),this.arrowheadColor="calculated",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.labelBackground="#181818",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="#F9FFFE",this.edgeLabelBackground="calculated",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="calculated",this.actorLineColor="calculated",this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="calculated",this.activationBkgColor="calculated",this.sequenceNumberColor="black",this.clusterBkg="#302F3D",this.sectionBkgColor=z("#EAE8D9",30),this.altSectionBkgColor="calculated",this.sectionBkgColor2="#EAE8D9",this.excludeBkgColor=z(this.sectionBkgColor,10),this.taskBorderColor=_r(255,255,255,70),this.taskBkgColor="calculated",this.taskTextColor="calculated",this.taskTextLightColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor=_r(255,255,255,50),this.activeTaskBkgColor="#81B1DB",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="grey",this.critBorderColor="#E83737",this.critBkgColor="#E83737",this.taskTextDarkColor="calculated",this.todayLineColor="#DB5757",this.vertLineColor="#00BFFF",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.rowOdd=this.rowOdd||W(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||z(this.mainBkg,10),this.labelColor="calculated",this.errorBkgColor="#a44141",this.errorTextColor="#ddd",this.useGradient=!0,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,1))",this.noteFontWeight=this.noteFontWeight||"normal",this.fontWeight=this.fontWeight||"normal"}updateColors(){var t,r,i,a,s,o,n,l,h,c,u,f,d,g,p,m,C,x,k,w,S,_,v,D,H,R,B,U,A,M,E,L,I,$,q,X,J,Q,lt,st,ot,xt,Ct,St,V,Y,Z,N,dt;this.secondBkg=W(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=W(this.labelBackground,25),this.actorBorder=this.border1,this.actorBkg=this.mainBkg,this.actorTextColor=this.mainContrastColor,this.actorLineColor=this.actorBorder,this.signalColor=this.mainContrastColor,this.signalTextColor=this.mainContrastColor,this.labelBoxBkgColor=this.actorBkg,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.mainContrastColor,this.loopTextColor=this.mainContrastColor,this.noteBorderColor=this.secondaryBorderColor,this.noteBkgColor=this.secondBkg,this.noteTextColor=this.secondaryTextColor,this.activationBorderColor=this.border1,this.activationBkgColor=this.secondBkg,this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.background,this.taskBkgColor=W(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=O(this.doneTaskBkgColor),this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#555",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.primaryBorderColor,this.specialStateColor="#f4f4f4",this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=b(this.primaryColor,{h:64}),this.fillType3=b(this.secondaryColor,{h:64}),this.fillType4=b(this.primaryColor,{h:-64}),this.fillType5=b(this.secondaryColor,{h:-64}),this.fillType6=b(this.primaryColor,{h:128}),this.fillType7=b(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||b(this.primaryColor,{h:30}),this.cScale4=this.cScale4||b(this.primaryColor,{h:60}),this.cScale5=this.cScale5||b(this.primaryColor,{h:90}),this.cScale6=this.cScale6||b(this.primaryColor,{h:120}),this.cScale7=this.cScale7||b(this.primaryColor,{h:150}),this.cScale8=this.cScale8||b(this.primaryColor,{h:210}),this.cScale9=this.cScale9||b(this.primaryColor,{h:270}),this.cScale10=this.cScale10||b(this.primaryColor,{h:300}),this.cScale11=this.cScale11||b(this.primaryColor,{h:330});for(let F=0;F<this.THEME_COLOR_LIMIT;F++)this["cScaleInv"+F]=this["cScaleInv"+F]||O(this["cScale"+F]);for(let F=0;F<this.THEME_COLOR_LIMIT;F++)this["cScalePeer"+F]=this["cScalePeer"+F]||W(this["cScale"+F],10);for(let F=0;F<5;F++)this["surface"+F]=this["surface"+F]||b(this.mainBkg,{h:30,s:-30,l:-(-10+F*4)}),this["surfacePeer"+F]=this["surfacePeer"+F]||b(this.mainBkg,{h:30,s:-30,l:-(-7+F*4)});this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?"black":this.labelTextColor);for(let F=0;F<this.THEME_COLOR_LIMIT;F++)this["cScaleLabel"+F]=this["cScaleLabel"+F]||this.scaleLabelColor;for(let F=0;F<this.THEME_COLOR_LIMIT;F++)this["pie"+F]=this["cScale"+F];this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.mainContrastColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.mainContrastColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7";for(let F=0;F<8;F++)this["venn"+(F+1)]=this["venn"+(F+1)]??W(this["cScale"+F],30);this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.cynefin={domainFontSize:((t=this.cynefin)==null?void 0:t.domainFontSize)||16,itemFontSize:((r=this.cynefin)==null?void 0:r.itemFontSize)||12,boundaryColor:((i=this.cynefin)==null?void 0:i.boundaryColor)||this.lineColor,boundaryWidth:((a=this.cynefin)==null?void 0:a.boundaryWidth)||2,cliffColor:((s=this.cynefin)==null?void 0:s.cliffColor)||"#FF6B6B",cliffWidth:((o=this.cynefin)==null?void 0:o.cliffWidth)||4,arrowColor:((n=this.cynefin)==null?void 0:n.arrowColor)||this.lineColor,arrowWidth:((l=this.cynefin)==null?void 0:l.arrowWidth)||2,complexBg:((h=this.cynefin)==null?void 0:h.complexBg)||"#1B5E20",complicatedBg:((c=this.cynefin)==null?void 0:c.complicatedBg)||"#0D47A1",chaoticBg:((u=this.cynefin)==null?void 0:u.chaoticBg)||"#BF360C",clearBg:((f=this.cynefin)==null?void 0:f.clearBg)||"#F57F17",confusionBg:((d=this.cynefin)==null?void 0:d.confusionBg)||"#4A148C",textColor:((g=this.cynefin)==null?void 0:g.textColor)||this.textColor,labelColor:((p=this.cynefin)==null?void 0:p.labelColor)||this.primaryTextColor},this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||b(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||b(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||b(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||b(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||b(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||b(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Ne(this.quadrant1Fill)?W(this.quadrant1Fill):z(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:((m=this.xyChart)==null?void 0:m.backgroundColor)||this.background,titleColor:((C=this.xyChart)==null?void 0:C.titleColor)||this.primaryTextColor,dataLabelColor:((x=this.xyChart)==null?void 0:x.dataLabelColor)||this.primaryTextColor,xAxisTitleColor:((k=this.xyChart)==null?void 0:k.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((w=this.xyChart)==null?void 0:w.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((S=this.xyChart)==null?void 0:S.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((_=this.xyChart)==null?void 0:_.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((v=this.xyChart)==null?void 0:v.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((D=this.xyChart)==null?void 0:D.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((H=this.xyChart)==null?void 0:H.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((R=this.xyChart)==null?void 0:R.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((B=this.xyChart)==null?void 0:B.plotColorPalette)||"#3498db,#2ecc71,#e74c3c,#f1c40f,#bdc3c7,#ffffff,#34495e,#9b59b6,#1abc9c,#e67e22"},this.packet={startByteColor:this.primaryTextColor,endByteColor:this.primaryTextColor,labelColor:this.primaryTextColor,titleColor:this.primaryTextColor,blockStrokeColor:this.primaryTextColor,blockFillColor:this.background},this.radar={axisColor:((U=this.radar)==null?void 0:U.axisColor)||this.lineColor,axisStrokeWidth:((A=this.radar)==null?void 0:A.axisStrokeWidth)||2,axisLabelFontSize:((M=this.radar)==null?void 0:M.axisLabelFontSize)||12,curveOpacity:((E=this.radar)==null?void 0:E.curveOpacity)||.5,curveStrokeWidth:((L=this.radar)==null?void 0:L.curveStrokeWidth)||2,graticuleColor:((I=this.radar)==null?void 0:I.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:(($=this.radar)==null?void 0:$.graticuleStrokeWidth)||1,graticuleOpacity:((q=this.radar)==null?void 0:q.graticuleOpacity)||.3,legendBoxSize:((X=this.radar)==null?void 0:X.legendBoxSize)||12,legendFontSize:((J=this.radar)==null?void 0:J.legendFontSize)||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#ff6b6b",this.wardley={backgroundColor:((Q=this.wardley)==null?void 0:Q.backgroundColor)||this.background,axisColor:((lt=this.wardley)==null?void 0:lt.axisColor)||this.lineColor,axisTextColor:((st=this.wardley)==null?void 0:st.axisTextColor)||this.primaryTextColor,gridColor:((ot=this.wardley)==null?void 0:ot.gridColor)||this.gridColor,componentFill:((xt=this.wardley)==null?void 0:xt.componentFill)||this.mainBkg,componentStroke:((Ct=this.wardley)==null?void 0:Ct.componentStroke)||this.lineColor,componentLabelColor:((St=this.wardley)==null?void 0:St.componentLabelColor)||this.primaryTextColor,linkStroke:((V=this.wardley)==null?void 0:V.linkStroke)||this.lineColor,evolutionStroke:((Y=this.wardley)==null?void 0:Y.evolutionStroke)||this.wardleyEvolutionColor,annotationStroke:((Z=this.wardley)==null?void 0:Z.annotationStroke)||this.lineColor,annotationTextColor:((N=this.wardley)==null?void 0:N.annotationTextColor)||this.primaryTextColor,annotationFill:((dt=this.wardley)==null?void 0:dt.annotationFill)||this.mainBkg},this.classText=this.primaryTextColor,this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?z(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=W(this.secondaryColor,20),this.git1=W(this.pie2||this.secondaryColor,20),this.git2=W(this.pie3||this.tertiaryColor,20),this.git3=W(this.pie4||b(this.primaryColor,{h:-30}),20),this.git4=W(this.pie5||b(this.primaryColor,{h:-60}),20),this.git5=W(this.pie6||b(this.primaryColor,{h:-90}),10),this.git6=W(this.pie7||b(this.primaryColor,{h:60}),10),this.git7=W(this.pie8||b(this.primaryColor,{h:120}),20),this.gitInv0=this.gitInv0||O(this.git0),this.gitInv1=this.gitInv1||O(this.git1),this.gitInv2=this.gitInv2||O(this.git2),this.gitInv3=this.gitInv3||O(this.git3),this.gitInv4=this.gitInv4||O(this.git4),this.gitInv5=this.gitInv5||O(this.git5),this.gitInv6=this.gitInv6||O(this.git6),this.gitInv7=this.gitInv7||O(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||O(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||O(this.labelTextColor),this.gitBranchLabel4=this.gitBranchLabel4||this.labelTextColor,this.gitBranchLabel5=this.gitBranchLabel5||this.labelTextColor,this.gitBranchLabel6=this.gitBranchLabel6||this.labelTextColor,this.gitBranchLabel7=this.gitBranchLabel7||this.labelTextColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.emUiFill=this.emUiFill||"#2d2d2d",this.emUiStroke=this.emUiStroke||"#555",this.emProcessorFill=this.emProcessorFill||W("#5a3d5c",10),this.emProcessorStroke=this.emProcessorStroke||"#8a6d8c",this.emReadModelFill=this.emReadModelFill||W("#3d5a2d",10),this.emReadModelStroke=this.emReadModelStroke||"#6d8c5c",this.emCommandFill=this.emCommandFill||W("#2d3d5a",10),this.emCommandStroke=this.emCommandStroke||"#5c6d8c",this.emEventFill=this.emEventFill||W("#5a452d",10),this.emEventStroke=this.emEventStroke||"#8c755c",this.emSwimlaneBackgroundOdd=this.emSwimlaneBackgroundOdd||W(this.background,5),this.emSwimlaneBackgroundStroke=this.emSwimlaneBackgroundStroke||W(this.background,12),this.emArrowhead=this.emArrowhead||this.lineColor,this.emRelationStroke=this.emRelationStroke||this.lineColor,this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||W(this.background,12),this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||W(this.background,2),this.nodeBorder=this.nodeBorder||"#999"}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},y(Mi,"Theme"),Mi),IS=y(e=>{const t=new DS;return t.calculate(e),t},"getThemeVariables"),Ai,PS=(Ai=class{constructor(){this.background="#f4f4f4",this.primaryColor="#ECECFF",this.secondaryColor=b(this.primaryColor,{h:120}),this.secondaryColor="#ffffde",this.tertiaryColor=b(this.primaryColor,{h:-160}),this.primaryBorderColor=mt(this.primaryColor,this.darkMode),this.secondaryBorderColor=mt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=mt(this.tertiaryColor,this.darkMode),this.primaryTextColor=O(this.primaryColor),this.secondaryTextColor=O(this.secondaryColor),this.tertiaryTextColor=O(this.tertiaryColor),this.lineColor=O(this.background),this.textColor=O(this.background),this.background="white",this.mainBkg="#ECECFF",this.secondBkg="#ffffde",this.lineColor="#333333",this.border1="#9370DB",this.primaryBorderColor=mt(this.primaryColor,this.darkMode),this.border2="#aaaa33",this.arrowheadColor="#333333",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.labelBackground="rgba(232,232,232, 0.8)",this.textColor="#333",this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="calculated",this.edgeLabelBackground="calculated",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="black",this.actorLineColor="calculated",this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.clusterBkg="#FBFBFF",this.sectionBkgColor="calculated",this.altSectionBkgColor="calculated",this.sectionBkgColor2="calculated",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="calculated",this.taskTextLightColor="calculated",this.taskTextColor=this.taskTextLightColor,this.taskTextDarkColor="calculated",this.taskTextOutsideColor=this.taskTextDarkColor,this.taskTextClickableColor="calculated",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="calculated",this.critBorderColor="calculated",this.critBkgColor="calculated",this.todayLineColor="calculated",this.vertLineColor="calculated",this.sectionBkgColor=_r(102,102,255,.49),this.altSectionBkgColor="white",this.sectionBkgColor2="#fff400",this.taskBorderColor="#534fbc",this.taskBkgColor="#8a90dd",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="black",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="#534fbc",this.activeTaskBkgColor="#bfc7ff",this.gridColor="lightgrey",this.doneTaskBkgColor="lightgrey",this.doneTaskBorderColor="grey",this.critBorderColor="#ff8888",this.critBkgColor="red",this.todayLineColor="red",this.vertLineColor="navy",this.noteFontWeight=this.noteFontWeight||"normal",this.fontWeight=this.fontWeight||"normal",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.rowOdd="calculated",this.rowEven="calculated",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.useGradient=!1,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow="drop-shadow(1px 2px 2px rgba(185, 185, 185, 1))",this.updateColors()}updateColors(){var t,r,i,a,s,o,n,l,h,c,u,f,d,g,p,m,C,x,k,w,S,_,v,D,H,R,B,U,A,M,E,L,I,$,q,X,J,Q,lt,st,ot,xt,Ct,St,V,Y,Z,N,dt;this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||b(this.primaryColor,{h:30}),this.cScale4=this.cScale4||b(this.primaryColor,{h:60}),this.cScale5=this.cScale5||b(this.primaryColor,{h:90}),this.cScale6=this.cScale6||b(this.primaryColor,{h:120}),this.cScale7=this.cScale7||b(this.primaryColor,{h:150}),this.cScale8=this.cScale8||b(this.primaryColor,{h:210}),this.cScale9=this.cScale9||b(this.primaryColor,{h:270}),this.cScale10=this.cScale10||b(this.primaryColor,{h:300}),this.cScale11=this.cScale11||b(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||z(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||z(this.tertiaryColor,40);for(let F=0;F<this.THEME_COLOR_LIMIT;F++)this["cScale"+F]=z(this["cScale"+F],10),this["cScalePeer"+F]=this["cScalePeer"+F]||z(this["cScale"+F],25);for(let F=0;F<this.THEME_COLOR_LIMIT;F++)this["cScaleInv"+F]=this["cScaleInv"+F]||b(this["cScale"+F],{h:180});for(let F=0;F<5;F++)this["surface"+F]=this["surface"+F]||b(this.mainBkg,{h:30,l:-(5+F*5)}),this["surfacePeer"+F]=this["surfacePeer"+F]||b(this.mainBkg,{h:30,l:-(7+F*5)});if(this.scaleLabelColor=this.scaleLabelColor!=="calculated"&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor,this.labelTextColor!=="calculated"){this.cScaleLabel0=this.cScaleLabel0||O(this.labelTextColor),this.cScaleLabel3=this.cScaleLabel3||O(this.labelTextColor);for(let F=0;F<this.THEME_COLOR_LIMIT;F++)this["cScaleLabel"+F]=this["cScaleLabel"+F]||this.labelTextColor}this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.titleColor=this.textColor,this.edgeLabelBackground=this.labelBackground,this.actorBorder=this.border1,this.actorBkg=this.mainBkg,this.labelBoxBkgColor=this.actorBkg,this.signalColor=this.textColor,this.signalTextColor=this.textColor,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.actorTextColor,this.loopTextColor=this.actorTextColor,this.noteBorderColor=this.border2,this.noteTextColor=this.actorTextColor,this.actorLineColor=this.actorBorder,this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.taskTextColor=this.taskTextLightColor,this.taskTextOutsideColor=this.taskTextDarkColor,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.rowOdd=this.rowOdd||W(this.primaryColor,75)||"#ffffff",this.rowEven=this.rowEven||W(this.primaryColor,1),this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.specialStateColor=this.lineColor,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.classText=this.primaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=b(this.primaryColor,{h:64}),this.fillType3=b(this.secondaryColor,{h:64}),this.fillType4=b(this.primaryColor,{h:-64}),this.fillType5=b(this.secondaryColor,{h:-64}),this.fillType6=b(this.primaryColor,{h:128}),this.fillType7=b(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||b(this.tertiaryColor,{l:-40}),this.pie4=this.pie4||b(this.primaryColor,{l:-10}),this.pie5=this.pie5||b(this.secondaryColor,{l:-30}),this.pie6=this.pie6||b(this.tertiaryColor,{l:-20}),this.pie7=this.pie7||b(this.primaryColor,{h:60,l:-20}),this.pie8=this.pie8||b(this.primaryColor,{h:-60,l:-40}),this.pie9=this.pie9||b(this.primaryColor,{h:120,l:-40}),this.pie10=this.pie10||b(this.primaryColor,{h:60,l:-40}),this.pie11=this.pie11||b(this.primaryColor,{h:-90,l:-40}),this.pie12=this.pie12||b(this.primaryColor,{h:120,l:-30}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.venn1=this.venn1??b(this.primaryColor,{l:-30}),this.venn2=this.venn2??b(this.secondaryColor,{l:-30}),this.venn3=this.venn3??b(this.tertiaryColor,{l:-40}),this.venn4=this.venn4??b(this.primaryColor,{h:60,l:-30}),this.venn5=this.venn5??b(this.primaryColor,{h:-60,l:-30}),this.venn6=this.venn6??b(this.secondaryColor,{h:60,l:-30}),this.venn7=this.venn7??b(this.primaryColor,{h:120,l:-30}),this.venn8=this.venn8??b(this.secondaryColor,{h:120,l:-30}),this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.cynefin={domainFontSize:((t=this.cynefin)==null?void 0:t.domainFontSize)||16,itemFontSize:((r=this.cynefin)==null?void 0:r.itemFontSize)||12,boundaryColor:((i=this.cynefin)==null?void 0:i.boundaryColor)||this.lineColor,boundaryWidth:((a=this.cynefin)==null?void 0:a.boundaryWidth)||2,cliffColor:((s=this.cynefin)==null?void 0:s.cliffColor)||"#8B0000",cliffWidth:((o=this.cynefin)==null?void 0:o.cliffWidth)||4,arrowColor:((n=this.cynefin)==null?void 0:n.arrowColor)||this.lineColor,arrowWidth:((l=this.cynefin)==null?void 0:l.arrowWidth)||2,complexBg:((h=this.cynefin)==null?void 0:h.complexBg)||"#E8F5E9",complicatedBg:((c=this.cynefin)==null?void 0:c.complicatedBg)||"#E3F2FD",chaoticBg:((u=this.cynefin)==null?void 0:u.chaoticBg)||"#FBE9E7",clearBg:((f=this.cynefin)==null?void 0:f.clearBg)||"#FFF8E1",confusionBg:((d=this.cynefin)==null?void 0:d.confusionBg)||"#F3E5F5",textColor:((g=this.cynefin)==null?void 0:g.textColor)||this.textColor,labelColor:((p=this.cynefin)==null?void 0:p.labelColor)||this.primaryTextColor},this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||b(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||b(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||b(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||b(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||b(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||b(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Ne(this.quadrant1Fill)?W(this.quadrant1Fill):z(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.radar={axisColor:((m=this.radar)==null?void 0:m.axisColor)||this.lineColor,axisStrokeWidth:((C=this.radar)==null?void 0:C.axisStrokeWidth)||2,axisLabelFontSize:((x=this.radar)==null?void 0:x.axisLabelFontSize)||12,curveOpacity:((k=this.radar)==null?void 0:k.curveOpacity)||.5,curveStrokeWidth:((w=this.radar)==null?void 0:w.curveStrokeWidth)||2,graticuleColor:((S=this.radar)==null?void 0:S.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((_=this.radar)==null?void 0:_.graticuleStrokeWidth)||1,graticuleOpacity:((v=this.radar)==null?void 0:v.graticuleOpacity)||.3,legendBoxSize:((D=this.radar)==null?void 0:D.legendBoxSize)||12,legendFontSize:((H=this.radar)==null?void 0:H.legendFontSize)||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#dc3545",this.wardley={backgroundColor:((R=this.wardley)==null?void 0:R.backgroundColor)||this.background,axisColor:((B=this.wardley)==null?void 0:B.axisColor)||this.lineColor,axisTextColor:((U=this.wardley)==null?void 0:U.axisTextColor)||this.primaryTextColor,gridColor:((A=this.wardley)==null?void 0:A.gridColor)||this.gridColor,componentFill:((M=this.wardley)==null?void 0:M.componentFill)||this.background,componentStroke:((E=this.wardley)==null?void 0:E.componentStroke)||this.lineColor,componentLabelColor:((L=this.wardley)==null?void 0:L.componentLabelColor)||this.primaryTextColor,linkStroke:((I=this.wardley)==null?void 0:I.linkStroke)||this.lineColor,evolutionStroke:(($=this.wardley)==null?void 0:$.evolutionStroke)||this.wardleyEvolutionColor,annotationStroke:((q=this.wardley)==null?void 0:q.annotationStroke)||this.lineColor,annotationTextColor:((X=this.wardley)==null?void 0:X.annotationTextColor)||this.primaryTextColor,annotationFill:((J=this.wardley)==null?void 0:J.annotationFill)||this.background},this.xyChart={backgroundColor:((Q=this.xyChart)==null?void 0:Q.backgroundColor)||this.background,titleColor:((lt=this.xyChart)==null?void 0:lt.titleColor)||this.primaryTextColor,dataLabelColor:((st=this.xyChart)==null?void 0:st.dataLabelColor)||this.primaryTextColor,xAxisTitleColor:((ot=this.xyChart)==null?void 0:ot.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((xt=this.xyChart)==null?void 0:xt.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((Ct=this.xyChart)==null?void 0:Ct.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((St=this.xyChart)==null?void 0:St.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((V=this.xyChart)==null?void 0:V.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((Y=this.xyChart)==null?void 0:Y.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((Z=this.xyChart)==null?void 0:Z.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((N=this.xyChart)==null?void 0:N.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((dt=this.xyChart)==null?void 0:dt.plotColorPalette)||"#ECECFF,#8493A6,#FFC3A0,#DCDDE1,#B8E994,#D1A36F,#C3CDE6,#FFB6C1,#496078,#F8F3E3"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.labelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||b(this.primaryColor,{h:-30}),this.git4=this.git4||b(this.primaryColor,{h:-60}),this.git5=this.git5||b(this.primaryColor,{h:-90}),this.git6=this.git6||b(this.primaryColor,{h:60}),this.git7=this.git7||b(this.primaryColor,{h:120}),this.darkMode?(this.git0=W(this.git0,25),this.git1=W(this.git1,25),this.git2=W(this.git2,25),this.git3=W(this.git3,25),this.git4=W(this.git4,25),this.git5=W(this.git5,25),this.git6=W(this.git6,25),this.git7=W(this.git7,25)):(this.git0=z(this.git0,25),this.git1=z(this.git1,25),this.git2=z(this.git2,25),this.git3=z(this.git3,25),this.git4=z(this.git4,25),this.git5=z(this.git5,25),this.git6=z(this.git6,25),this.git7=z(this.git7,25)),this.gitInv0=this.gitInv0||z(O(this.git0),25),this.gitInv1=this.gitInv1||O(this.git1),this.gitInv2=this.gitInv2||O(this.git2),this.gitInv3=this.gitInv3||O(this.git3),this.gitInv4=this.gitInv4||O(this.git4),this.gitInv5=this.gitInv5||O(this.git5),this.gitInv6=this.gitInv6||O(this.git6),this.gitInv7=this.gitInv7||O(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||O(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||O(this.labelTextColor),this.gitBranchLabel4=this.gitBranchLabel4||this.labelTextColor,this.gitBranchLabel5=this.gitBranchLabel5||this.labelTextColor,this.gitBranchLabel6=this.gitBranchLabel6||this.labelTextColor,this.gitBranchLabel7=this.gitBranchLabel7||this.labelTextColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.emUiFill=this.emUiFill||"white",this.emUiStroke=this.emUiStroke||"#dbdada",this.emProcessorFill=this.emProcessorFill||"#edb3f6",this.emProcessorStroke=this.emProcessorStroke||"#b88cbf",this.emReadModelFill=this.emReadModelFill||"#d3f1a2",this.emReadModelStroke=this.emReadModelStroke||"#a3b732",this.emCommandFill=this.emCommandFill||"#bcd6fe",this.emCommandStroke=this.emCommandStroke||"#679ac3",this.emEventFill=this.emEventFill||"#ffb778",this.emEventStroke=this.emEventStroke||"#c19a0f",this.emSwimlaneBackgroundOdd=this.emSwimlaneBackgroundOdd||"rgb(250,250,250)",this.emSwimlaneBackgroundStroke=this.emSwimlaneBackgroundStroke||"rgb(240,240,240)",this.emArrowhead=this.emArrowhead||this.lineColor,this.emRelationStroke=this.emRelationStroke||this.lineColor,this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Qe,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Ke}calculate(t){if(Object.keys(this).forEach(i=>{this[i]==="calculated"&&(this[i]=void 0)}),typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},y(Ai,"Theme"),Ai),RS=y(e=>{const t=new PS;return t.calculate(e),t},"getThemeVariables"),Ei,NS=(Ei=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=W("#cde498",10),this.primaryBorderColor=mt(this.primaryColor,this.darkMode),this.secondaryBorderColor=mt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=mt(this.tertiaryColor,this.darkMode),this.primaryTextColor=O(this.primaryColor),this.secondaryTextColor=O(this.secondaryColor),this.tertiaryTextColor=O(this.primaryColor),this.lineColor=O(this.background),this.textColor=O(this.background),this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="#333",this.edgeLabelBackground="#e8e8e8",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="black",this.actorLineColor="calculated",this.signalColor="#333",this.signalTextColor="#333",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="#326932",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="#6eaa49",this.altSectionBkgColor="white",this.sectionBkgColor2="#6eaa49",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="#487e3a",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="black",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="lightgrey",this.doneTaskBkgColor="lightgrey",this.doneTaskBorderColor="grey",this.critBorderColor="#ff8888",this.critBkgColor="red",this.todayLineColor="red",this.vertLineColor="#00BFFF",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.noteFontWeight="normal",this.fontWeight="normal",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.useGradient=!0,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,0.5))"}updateColors(){var t,r,i,a,s,o,n,l,h,c,u,f,d,g,p,m,C,x,k,w,S,_,v,D,H,R,B,U,A,M,E,L,I,$,q,X,J,Q,lt,st,ot,xt,Ct,St,V,Y,Z,N,dt;this.actorBorder=z(this.mainBkg,20),this.actorBkg=this.mainBkg,this.labelBoxBkgColor=this.actorBkg,this.labelTextColor=this.actorTextColor,this.loopTextColor=this.actorTextColor,this.noteBorderColor=this.border2,this.noteTextColor=this.actorTextColor,this.actorLineColor=this.actorBorder,this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||b(this.primaryColor,{h:30}),this.cScale4=this.cScale4||b(this.primaryColor,{h:60}),this.cScale5=this.cScale5||b(this.primaryColor,{h:90}),this.cScale6=this.cScale6||b(this.primaryColor,{h:120}),this.cScale7=this.cScale7||b(this.primaryColor,{h:150}),this.cScale8=this.cScale8||b(this.primaryColor,{h:210}),this.cScale9=this.cScale9||b(this.primaryColor,{h:270}),this.cScale10=this.cScale10||b(this.primaryColor,{h:300}),this.cScale11=this.cScale11||b(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||z(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||z(this.tertiaryColor,40);for(let F=0;F<this.THEME_COLOR_LIMIT;F++)this["cScale"+F]=z(this["cScale"+F],10),this["cScalePeer"+F]=this["cScalePeer"+F]||z(this["cScale"+F],25);for(let F=0;F<this.THEME_COLOR_LIMIT;F++)this["cScaleInv"+F]=this["cScaleInv"+F]||b(this["cScale"+F],{h:180});this.scaleLabelColor=this.scaleLabelColor!=="calculated"&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor;for(let F=0;F<this.THEME_COLOR_LIMIT;F++)this["cScaleLabel"+F]=this["cScaleLabel"+F]||this.scaleLabelColor;for(let F=0;F<5;F++)this["surface"+F]=this["surface"+F]||b(this.mainBkg,{h:30,s:-30,l:-(5+F*5)}),this["surfacePeer"+F]=this["surfacePeer"+F]||b(this.mainBkg,{h:30,s:-30,l:-(8+F*5)});this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.taskBorderColor=this.border1,this.taskTextColor=this.taskTextLightColor,this.taskTextOutsideColor=this.taskTextDarkColor,this.activeTaskBorderColor=this.taskBorderColor,this.activeTaskBkgColor=this.mainBkg,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.rowOdd=this.rowOdd||W(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||W(this.mainBkg,20),this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.primaryBorderColor,this.specialStateColor=this.lineColor,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.classText=this.primaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=b(this.primaryColor,{h:64}),this.fillType3=b(this.secondaryColor,{h:64}),this.fillType4=b(this.primaryColor,{h:-64}),this.fillType5=b(this.secondaryColor,{h:-64}),this.fillType6=b(this.primaryColor,{h:128}),this.fillType7=b(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||this.tertiaryColor,this.pie4=this.pie4||b(this.primaryColor,{l:-30}),this.pie5=this.pie5||b(this.secondaryColor,{l:-30}),this.pie6=this.pie6||b(this.tertiaryColor,{h:40,l:-40}),this.pie7=this.pie7||b(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||b(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||b(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||b(this.primaryColor,{h:60,l:-50}),this.pie11=this.pie11||b(this.primaryColor,{h:-60,l:-50}),this.pie12=this.pie12||b(this.primaryColor,{h:120,l:-50}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.venn1=this.venn1??b(this.primaryColor,{l:-30}),this.venn2=this.venn2??b(this.secondaryColor,{l:-30}),this.venn3=this.venn3??b(this.tertiaryColor,{l:-30}),this.venn4=this.venn4??b(this.primaryColor,{h:60,l:-30}),this.venn5=this.venn5??b(this.primaryColor,{h:-60,l:-30}),this.venn6=this.venn6??b(this.secondaryColor,{h:60,l:-30}),this.venn7=this.venn7??b(this.primaryColor,{h:120,l:-30}),this.venn8=this.venn8??b(this.secondaryColor,{h:120,l:-30}),this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.cynefin={domainFontSize:((t=this.cynefin)==null?void 0:t.domainFontSize)||16,itemFontSize:((r=this.cynefin)==null?void 0:r.itemFontSize)||12,boundaryColor:((i=this.cynefin)==null?void 0:i.boundaryColor)||this.lineColor,boundaryWidth:((a=this.cynefin)==null?void 0:a.boundaryWidth)||2,cliffColor:((s=this.cynefin)==null?void 0:s.cliffColor)||"#8B4513",cliffWidth:((o=this.cynefin)==null?void 0:o.cliffWidth)||4,arrowColor:((n=this.cynefin)==null?void 0:n.arrowColor)||this.lineColor,arrowWidth:((l=this.cynefin)==null?void 0:l.arrowWidth)||2,complexBg:((h=this.cynefin)==null?void 0:h.complexBg)||"#C8E6C9",complicatedBg:((c=this.cynefin)==null?void 0:c.complicatedBg)||"#DCEDC8",chaoticBg:((u=this.cynefin)==null?void 0:u.chaoticBg)||"#FFE0B2",clearBg:((f=this.cynefin)==null?void 0:f.clearBg)||"#FFF9C4",confusionBg:((d=this.cynefin)==null?void 0:d.confusionBg)||"#D7CCC8",textColor:((g=this.cynefin)==null?void 0:g.textColor)||this.textColor,labelColor:((p=this.cynefin)==null?void 0:p.labelColor)||this.primaryTextColor},this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||b(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||b(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||b(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||b(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||b(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||b(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Ne(this.quadrant1Fill)?W(this.quadrant1Fill):z(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.packet={startByteColor:this.primaryTextColor,endByteColor:this.primaryTextColor,labelColor:this.primaryTextColor,titleColor:this.primaryTextColor,blockStrokeColor:this.primaryTextColor,blockFillColor:this.mainBkg},this.radar={axisColor:((m=this.radar)==null?void 0:m.axisColor)||this.lineColor,axisStrokeWidth:((C=this.radar)==null?void 0:C.axisStrokeWidth)||2,axisLabelFontSize:((x=this.radar)==null?void 0:x.axisLabelFontSize)||12,curveOpacity:((k=this.radar)==null?void 0:k.curveOpacity)||.5,curveStrokeWidth:((w=this.radar)==null?void 0:w.curveStrokeWidth)||2,graticuleColor:((S=this.radar)==null?void 0:S.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((_=this.radar)==null?void 0:_.graticuleStrokeWidth)||1,graticuleOpacity:((v=this.radar)==null?void 0:v.graticuleOpacity)||.3,legendBoxSize:((D=this.radar)==null?void 0:D.legendBoxSize)||12,legendFontSize:((H=this.radar)==null?void 0:H.legendFontSize)||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#dc3545",this.wardley={backgroundColor:((R=this.wardley)==null?void 0:R.backgroundColor)||this.background,axisColor:((B=this.wardley)==null?void 0:B.axisColor)||this.lineColor,axisTextColor:((U=this.wardley)==null?void 0:U.axisTextColor)||this.primaryTextColor,gridColor:((A=this.wardley)==null?void 0:A.gridColor)||this.gridColor,componentFill:((M=this.wardley)==null?void 0:M.componentFill)||this.background,componentStroke:((E=this.wardley)==null?void 0:E.componentStroke)||this.lineColor,componentLabelColor:((L=this.wardley)==null?void 0:L.componentLabelColor)||this.primaryTextColor,linkStroke:((I=this.wardley)==null?void 0:I.linkStroke)||this.lineColor,evolutionStroke:(($=this.wardley)==null?void 0:$.evolutionStroke)||this.wardleyEvolutionColor,annotationStroke:((q=this.wardley)==null?void 0:q.annotationStroke)||this.lineColor,annotationTextColor:((X=this.wardley)==null?void 0:X.annotationTextColor)||this.primaryTextColor,annotationFill:((J=this.wardley)==null?void 0:J.annotationFill)||this.background},this.xyChart={backgroundColor:((Q=this.xyChart)==null?void 0:Q.backgroundColor)||this.background,titleColor:((lt=this.xyChart)==null?void 0:lt.titleColor)||this.primaryTextColor,dataLabelColor:((st=this.xyChart)==null?void 0:st.dataLabelColor)||this.primaryTextColor,xAxisTitleColor:((ot=this.xyChart)==null?void 0:ot.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((xt=this.xyChart)==null?void 0:xt.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((Ct=this.xyChart)==null?void 0:Ct.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((St=this.xyChart)==null?void 0:St.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((V=this.xyChart)==null?void 0:V.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((Y=this.xyChart)==null?void 0:Y.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((Z=this.xyChart)==null?void 0:Z.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((N=this.xyChart)==null?void 0:N.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((dt=this.xyChart)==null?void 0:dt.plotColorPalette)||"#CDE498,#FF6B6B,#A0D2DB,#D7BDE2,#F0F0F0,#FFC3A0,#7FD8BE,#FF9A8B,#FAF3E0,#FFF176"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.edgeLabelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||b(this.primaryColor,{h:-30}),this.git4=this.git4||b(this.primaryColor,{h:-60}),this.git5=this.git5||b(this.primaryColor,{h:-90}),this.git6=this.git6||b(this.primaryColor,{h:60}),this.git7=this.git7||b(this.primaryColor,{h:120}),this.darkMode?(this.git0=W(this.git0,25),this.git1=W(this.git1,25),this.git2=W(this.git2,25),this.git3=W(this.git3,25),this.git4=W(this.git4,25),this.git5=W(this.git5,25),this.git6=W(this.git6,25),this.git7=W(this.git7,25)):(this.git0=z(this.git0,25),this.git1=z(this.git1,25),this.git2=z(this.git2,25),this.git3=z(this.git3,25),this.git4=z(this.git4,25),this.git5=z(this.git5,25),this.git6=z(this.git6,25),this.git7=z(this.git7,25)),this.gitInv0=this.gitInv0||O(this.git0),this.gitInv1=this.gitInv1||O(this.git1),this.gitInv2=this.gitInv2||O(this.git2),this.gitInv3=this.gitInv3||O(this.git3),this.gitInv4=this.gitInv4||O(this.git4),this.gitInv5=this.gitInv5||O(this.git5),this.gitInv6=this.gitInv6||O(this.git6),this.gitInv7=this.gitInv7||O(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||O(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||O(this.labelTextColor),this.gitBranchLabel4=this.gitBranchLabel4||this.labelTextColor,this.gitBranchLabel5=this.gitBranchLabel5||this.labelTextColor,this.gitBranchLabel6=this.gitBranchLabel6||this.labelTextColor,this.gitBranchLabel7=this.gitBranchLabel7||this.labelTextColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.emUiFill=this.emUiFill||"white",this.emUiStroke=this.emUiStroke||"#dbdada",this.emProcessorFill=this.emProcessorFill||"#edb3f6",this.emProcessorStroke=this.emProcessorStroke||"#b88cbf",this.emReadModelFill=this.emReadModelFill||"#d3f1a2",this.emReadModelStroke=this.emReadModelStroke||"#a3b732",this.emCommandFill=this.emCommandFill||"#bcd6fe",this.emCommandStroke=this.emCommandStroke||"#679ac3",this.emEventFill=this.emEventFill||"#ffb778",this.emEventStroke=this.emEventStroke||"#c19a0f",this.emSwimlaneBackgroundOdd=this.emSwimlaneBackgroundOdd||"rgb(250,250,250)",this.emSwimlaneBackgroundStroke=this.emSwimlaneBackgroundStroke||"rgb(240,240,240)",this.emArrowhead=this.emArrowhead||this.lineColor,this.emRelationStroke=this.emRelationStroke||this.lineColor,this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Qe,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Ke}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},y(Ei,"Theme"),Ei),qS=y(e=>{const t=new NS;return t.calculate(e),t},"getThemeVariables"),$i,WS=($i=class{constructor(){this.primaryColor="#eee",this.contrast="#707070",this.secondaryColor=W(this.contrast,55),this.background="#ffffff",this.tertiaryColor=b(this.primaryColor,{h:-160}),this.primaryBorderColor=mt(this.primaryColor,this.darkMode),this.secondaryBorderColor=mt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=mt(this.tertiaryColor,this.darkMode),this.primaryTextColor=O(this.primaryColor),this.secondaryTextColor=O(this.secondaryColor),this.tertiaryTextColor=O(this.tertiaryColor),this.lineColor=O(this.background),this.textColor=O(this.background),this.mainBkg="#eee",this.secondBkg="calculated",this.lineColor="#666",this.border1="#999",this.border2="calculated",this.note="#ffa",this.text="#333",this.critical="#d42",this.done="#bbb",this.arrowheadColor="#333333",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="calculated",this.edgeLabelBackground="white",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="calculated",this.actorLineColor=this.actorBorder,this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="calculated",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="calculated",this.altSectionBkgColor="white",this.sectionBkgColor2="calculated",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="calculated",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="calculated",this.critBkgColor="calculated",this.critBorderColor="calculated",this.todayLineColor="calculated",this.vertLineColor="calculated",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.noteFontWeight="normal",this.fontWeight="normal",this.rowOdd=this.rowOdd||W(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||"#f4f4f4",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.useGradient=!0,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,1))"}updateColors(){var t,r,i,a,s,o,n,l,h,c,u,f,d,g,p,m,C,x,k,w,S,_,v,D,H,R,B,U,A,M,E,L,I,$,q,X,J,Q,lt,st,ot,xt,Ct,St,V,Y,Z,N,dt;this.secondBkg=W(this.contrast,55),this.border2=this.contrast,this.actorBorder=W(this.border1,23),this.actorBkg=this.mainBkg,this.actorTextColor=this.text,this.actorLineColor=this.actorBorder,this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.signalColor=this.text,this.signalTextColor=this.text,this.labelBoxBkgColor=this.actorBkg,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.text,this.loopTextColor=this.text,this.noteBorderColor="#999",this.noteBkgColor="#666",this.noteTextColor="#fff",this.cScale0=this.cScale0||"#555",this.cScale1=this.cScale1||"#F4F4F4",this.cScale2=this.cScale2||"#555",this.cScale3=this.cScale3||"#BBB",this.cScale4=this.cScale4||"#777",this.cScale5=this.cScale5||"#999",this.cScale6=this.cScale6||"#DDD",this.cScale7=this.cScale7||"#FFF",this.cScale8=this.cScale8||"#DDD",this.cScale9=this.cScale9||"#BBB",this.cScale10=this.cScale10||"#999",this.cScale11=this.cScale11||"#777";for(let F=0;F<this.THEME_COLOR_LIMIT;F++)this["cScaleInv"+F]=this["cScaleInv"+F]||O(this["cScale"+F]);for(let F=0;F<this.THEME_COLOR_LIMIT;F++)this.darkMode?this["cScalePeer"+F]=this["cScalePeer"+F]||W(this["cScale"+F],10):this["cScalePeer"+F]=this["cScalePeer"+F]||z(this["cScale"+F],10);this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?"black":this.labelTextColor),this.cScaleLabel0=this.cScaleLabel0||this.cScale1,this.cScaleLabel2=this.cScaleLabel2||this.cScale1;for(let F=0;F<this.THEME_COLOR_LIMIT;F++)this["cScaleLabel"+F]=this["cScaleLabel"+F]||this.scaleLabelColor;for(let F=0;F<5;F++)this["surface"+F]=this["surface"+F]||b(this.mainBkg,{l:-(5+F*5)}),this["surfacePeer"+F]=this["surfacePeer"+F]||b(this.mainBkg,{l:-(8+F*5)});this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.titleColor=this.text,this.sectionBkgColor=W(this.contrast,30),this.sectionBkgColor2=W(this.contrast,30),this.taskBorderColor=z(this.contrast,10),this.taskBkgColor=this.contrast,this.taskTextColor=this.taskTextLightColor,this.taskTextDarkColor=this.text,this.taskTextOutsideColor=this.taskTextDarkColor,this.activeTaskBorderColor=this.taskBorderColor,this.activeTaskBkgColor=this.mainBkg,this.gridColor=W(this.border1,30),this.doneTaskBkgColor=this.done,this.doneTaskBorderColor=this.lineColor,this.critBkgColor=this.critical,this.critBorderColor=z(this.critBkgColor,10),this.todayLineColor=this.critBkgColor,this.vertLineColor=this.critBkgColor,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.transitionColor=this.transitionColor||"#000",this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f4f4f4",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.stateBorder=this.stateBorder||"#000",this.innerEndBackground=this.primaryBorderColor,this.specialStateColor="#222",this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.classText=this.primaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=b(this.primaryColor,{h:64}),this.fillType3=b(this.secondaryColor,{h:64}),this.fillType4=b(this.primaryColor,{h:-64}),this.fillType5=b(this.secondaryColor,{h:-64}),this.fillType6=b(this.primaryColor,{h:128}),this.fillType7=b(this.secondaryColor,{h:128});for(let F=0;F<this.THEME_COLOR_LIMIT;F++)this["pie"+F]=this["cScale"+F];this.pie12=this.pie0,this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7";for(let F=0;F<8;F++)this["venn"+(F+1)]=this["venn"+(F+1)]??this["cScale"+F];this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.cynefin={domainFontSize:((t=this.cynefin)==null?void 0:t.domainFontSize)||16,itemFontSize:((r=this.cynefin)==null?void 0:r.itemFontSize)||12,boundaryColor:((i=this.cynefin)==null?void 0:i.boundaryColor)||this.lineColor,boundaryWidth:((a=this.cynefin)==null?void 0:a.boundaryWidth)||2,cliffColor:((s=this.cynefin)==null?void 0:s.cliffColor)||"#8B0000",cliffWidth:((o=this.cynefin)==null?void 0:o.cliffWidth)||4,arrowColor:((n=this.cynefin)==null?void 0:n.arrowColor)||this.lineColor,arrowWidth:((l=this.cynefin)==null?void 0:l.arrowWidth)||2,complexBg:((h=this.cynefin)==null?void 0:h.complexBg)||"#E8F5E9",complicatedBg:((c=this.cynefin)==null?void 0:c.complicatedBg)||"#E3F2FD",chaoticBg:((u=this.cynefin)==null?void 0:u.chaoticBg)||"#FBE9E7",clearBg:((f=this.cynefin)==null?void 0:f.clearBg)||"#FFF8E1",confusionBg:((d=this.cynefin)==null?void 0:d.confusionBg)||"#F3E5F5",textColor:((g=this.cynefin)==null?void 0:g.textColor)||this.textColor,labelColor:((p=this.cynefin)==null?void 0:p.labelColor)||this.primaryTextColor},this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||b(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||b(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||b(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||b(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||b(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||b(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Ne(this.quadrant1Fill)?W(this.quadrant1Fill):z(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:((m=this.xyChart)==null?void 0:m.backgroundColor)||this.background,titleColor:((C=this.xyChart)==null?void 0:C.titleColor)||this.primaryTextColor,dataLabelColor:((x=this.xyChart)==null?void 0:x.dataLabelColor)||this.primaryTextColor,xAxisTitleColor:((k=this.xyChart)==null?void 0:k.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((w=this.xyChart)==null?void 0:w.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((S=this.xyChart)==null?void 0:S.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((_=this.xyChart)==null?void 0:_.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((v=this.xyChart)==null?void 0:v.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((D=this.xyChart)==null?void 0:D.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((H=this.xyChart)==null?void 0:H.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((R=this.xyChart)==null?void 0:R.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((B=this.xyChart)==null?void 0:B.plotColorPalette)||"#EEE,#6BB8E4,#8ACB88,#C7ACD6,#E8DCC2,#FFB2A8,#FFF380,#7E8D91,#FFD8B1,#FAF3E0"},this.radar={axisColor:((U=this.radar)==null?void 0:U.axisColor)||this.lineColor,axisStrokeWidth:((A=this.radar)==null?void 0:A.axisStrokeWidth)||2,axisLabelFontSize:((M=this.radar)==null?void 0:M.axisLabelFontSize)||12,curveOpacity:((E=this.radar)==null?void 0:E.curveOpacity)||.5,curveStrokeWidth:((L=this.radar)==null?void 0:L.curveStrokeWidth)||2,graticuleColor:((I=this.radar)==null?void 0:I.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:(($=this.radar)==null?void 0:$.graticuleStrokeWidth)||1,graticuleOpacity:((q=this.radar)==null?void 0:q.graticuleOpacity)||.3,legendBoxSize:((X=this.radar)==null?void 0:X.legendBoxSize)||12,legendFontSize:((J=this.radar)==null?void 0:J.legendFontSize)||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#dc3545",this.wardley={backgroundColor:((Q=this.wardley)==null?void 0:Q.backgroundColor)||this.background,axisColor:((lt=this.wardley)==null?void 0:lt.axisColor)||this.lineColor,axisTextColor:((st=this.wardley)==null?void 0:st.axisTextColor)||this.primaryTextColor,gridColor:((ot=this.wardley)==null?void 0:ot.gridColor)||this.gridColor,componentFill:((xt=this.wardley)==null?void 0:xt.componentFill)||this.background,componentStroke:((Ct=this.wardley)==null?void 0:Ct.componentStroke)||this.lineColor,componentLabelColor:((St=this.wardley)==null?void 0:St.componentLabelColor)||this.primaryTextColor,linkStroke:((V=this.wardley)==null?void 0:V.linkStroke)||this.lineColor,evolutionStroke:((Y=this.wardley)==null?void 0:Y.evolutionStroke)||this.wardleyEvolutionColor,annotationStroke:((Z=this.wardley)==null?void 0:Z.annotationStroke)||this.lineColor,annotationTextColor:((N=this.wardley)==null?void 0:N.annotationTextColor)||this.primaryTextColor,annotationFill:((dt=this.wardley)==null?void 0:dt.annotationFill)||this.background},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.edgeLabelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=z(this.pie1,25)||this.primaryColor,this.git1=this.pie2||this.secondaryColor,this.git2=this.pie3||this.tertiaryColor,this.git3=this.pie4||b(this.primaryColor,{h:-30}),this.git4=this.pie5||b(this.primaryColor,{h:-60}),this.git5=this.pie6||b(this.primaryColor,{h:-90}),this.git6=this.pie7||b(this.primaryColor,{h:60}),this.git7=this.pie8||b(this.primaryColor,{h:120}),this.gitInv0=this.gitInv0||O(this.git0),this.gitInv1=this.gitInv1||O(this.git1),this.gitInv2=this.gitInv2||O(this.git2),this.gitInv3=this.gitInv3||O(this.git3),this.gitInv4=this.gitInv4||O(this.git4),this.gitInv5=this.gitInv5||O(this.git5),this.gitInv6=this.gitInv6||O(this.git6),this.gitInv7=this.gitInv7||O(this.git7),this.branchLabelColor=this.branchLabelColor||this.labelTextColor,this.gitBranchLabel0=this.branchLabelColor,this.gitBranchLabel1="white",this.gitBranchLabel2=this.branchLabelColor,this.gitBranchLabel3="white",this.gitBranchLabel4=this.branchLabelColor,this.gitBranchLabel5=this.branchLabelColor,this.gitBranchLabel6=this.branchLabelColor,this.gitBranchLabel7=this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.emUiFill=this.emUiFill||"white",this.emUiStroke=this.emUiStroke||"#dbdada",this.emProcessorFill=this.emProcessorFill||"#edb3f6",this.emProcessorStroke=this.emProcessorStroke||"#b88cbf",this.emReadModelFill=this.emReadModelFill||"#d3f1a2",this.emReadModelStroke=this.emReadModelStroke||"#a3b732",this.emCommandFill=this.emCommandFill||"#bcd6fe",this.emCommandStroke=this.emCommandStroke||"#679ac3",this.emEventFill=this.emEventFill||"#ffb778",this.emEventStroke=this.emEventStroke||"#c19a0f",this.emSwimlaneBackgroundOdd=this.emSwimlaneBackgroundOdd||"rgb(250,250,250)",this.emSwimlaneBackgroundStroke=this.emSwimlaneBackgroundStroke||"rgb(240,240,240)",this.emArrowhead=this.emArrowhead||this.lineColor,this.emRelationStroke=this.emRelationStroke||this.lineColor,this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Qe,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Ke}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},y($i,"Theme"),$i),zS=y(e=>{const t=new WS;return t.calculate(e),t},"getThemeVariables"),Oi,HS=(Oi=class{constructor(){this.background="#ffffff",this.primaryColor="#cccccc",this.mainBkg="#ffffff",this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.radius=3,this.strokeWidth=2,this.primaryBorderColor=mt(this.primaryColor,this.darkMode),this.fontFamily="arial, sans-serif",this.fontSize="14px",this.nodeBorder="#000000",this.stateBorder="#000000",this.useGradient=!0,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="drop-shadow( 0px 1px 2px rgba(0, 0, 0, 0.25));",this.tertiaryColor="#ffffff",this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.noteFontWeight="normal",this.fontWeight="normal"}updateColors(){var s,o,n,l,h,c,u,f,d,g,p;this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||b(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||b(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||mt(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||mt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||mt(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||mt(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||O(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||O(this.tertiaryColor),this.lineColor=this.lineColor||O(this.background),this.arrowheadColor=this.arrowheadColor||O(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?z(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||z(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||O(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor;const t="#ECECFE",r="#E9E9F1",i=b(t,{h:180,l:5});if(this.sectionBkgColor=this.sectionBkgColor||i,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||r,this.sectionBkgColor2=this.sectionBkgColor2||t,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||t,this.activeTaskBorderColor=this.activeTaskBorderColor||t,this.activeTaskBkgColor=this.activeTaskBkgColor||W(t,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||t,this.cScale1=this.cScale1||r,this.cScale2=this.cScale2||i,this.cScale3=this.cScale3||b(t,{h:30}),this.cScale4=this.cScale4||b(t,{h:60}),this.cScale5=this.cScale5||b(t,{h:90}),this.cScale6=this.cScale6||b(t,{h:120}),this.cScale7=this.cScale7||b(t,{h:150}),this.cScale8=this.cScale8||b(t,{h:210,l:150}),this.cScale9=this.cScale9||b(t,{h:270}),this.cScale10=this.cScale10||b(t,{h:300}),this.cScale11=this.cScale11||b(t,{h:330}),this.darkMode)for(let m=0;m<this.THEME_COLOR_LIMIT;m++)this["cScale"+m]=z(this["cScale"+m],75);else for(let m=0;m<this.THEME_COLOR_LIMIT;m++)this["cScale"+m]=z(this["cScale"+m],25);for(let m=0;m<this.THEME_COLOR_LIMIT;m++)this["cScaleInv"+m]=this["cScaleInv"+m]||O(this["cScale"+m]);for(let m=0;m<this.THEME_COLOR_LIMIT;m++)this.darkMode?this["cScalePeer"+m]=this["cScalePeer"+m]||W(this["cScale"+m],10):this["cScalePeer"+m]=this["cScalePeer"+m]||z(this["cScale"+m],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let m=0;m<this.THEME_COLOR_LIMIT;m++)this["cScaleLabel"+m]=this["cScaleLabel"+m]||this.scaleLabelColor;const a=this.darkMode?-4:-1;for(let m=0;m<5;m++)this["surface"+m]=this["surface"+m]||b(this.mainBkg,{h:180,s:-15,l:a*(5+m*3)}),this["surfacePeer"+m]=this["surfacePeer"+m]||b(this.mainBkg,{h:180,s:-15,l:a*(8+m*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||t,this.fillType1=this.fillType1||r,this.fillType2=this.fillType2||b(t,{h:64}),this.fillType3=this.fillType3||b(r,{h:64}),this.fillType4=this.fillType4||b(t,{h:-64}),this.fillType5=this.fillType5||b(r,{h:-64}),this.fillType6=this.fillType6||b(t,{h:128}),this.fillType7=this.fillType7||b(r,{h:128}),this.pie1=this.pie1||t,this.pie2=this.pie2||r,this.pie3=this.pie3||i,this.pie4=this.pie4||b(t,{l:-10}),this.pie5=this.pie5||b(r,{l:-10}),this.pie6=this.pie6||b(i,{l:-10}),this.pie7=this.pie7||b(t,{h:60,l:-10}),this.pie8=this.pie8||b(t,{h:-60,l:-10}),this.pie9=this.pie9||b(t,{h:120,l:0}),this.pie10=this.pie10||b(t,{h:60,l:-20}),this.pie11=this.pie11||b(t,{h:-60,l:-20}),this.pie12=this.pie12||b(t,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||t,this.quadrant2Fill=this.quadrant2Fill||b(t,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||b(t,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||b(t,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||b(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||b(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||b(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Ne(this.quadrant1Fill)?W(this.quadrant1Fill):z(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:((s=this.xyChart)==null?void 0:s.backgroundColor)||this.background,titleColor:((o=this.xyChart)==null?void 0:o.titleColor)||this.primaryTextColor,xAxisTitleColor:((n=this.xyChart)==null?void 0:n.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((l=this.xyChart)==null?void 0:l.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((h=this.xyChart)==null?void 0:h.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((c=this.xyChart)==null?void 0:c.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((u=this.xyChart)==null?void 0:u.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((f=this.xyChart)==null?void 0:f.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((d=this.xyChart)==null?void 0:d.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((g=this.xyChart)==null?void 0:g.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((p=this.xyChart)==null?void 0:p.plotColorPalette)||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||t,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?z(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||t,this.git1=this.git1||r,this.git2=this.git2||i,this.git3=this.git3||b(t,{h:-30}),this.git4=this.git4||b(t,{h:-60}),this.git5=this.git5||b(t,{h:-90}),this.git6=this.git6||b(t,{h:60}),this.git7=this.git7||b(t,{h:120}),this.darkMode?(this.git0=W(this.git0,25),this.git1=W(this.git1,25),this.git2=W(this.git2,25),this.git3=W(this.git3,25),this.git4=W(this.git4,25),this.git5=W(this.git5,25),this.git6=W(this.git6,25),this.git7=W(this.git7,25)):(this.git0=z(this.git0,25),this.git1=z(this.git1,25),this.git2=z(this.git2,25),this.git3=z(this.git3,25),this.git4=z(this.git4,25),this.git5=z(this.git5,25),this.git6=z(this.git6,25),this.git7=z(this.git7,25)),this.gitInv0=this.gitInv0||O(this.git0),this.gitInv1=this.gitInv1||O(this.git1),this.gitInv2=this.gitInv2||O(this.git2),this.gitInv3=this.gitInv3||O(this.git3),this.gitInv4=this.gitInv4||O(this.git4),this.gitInv5=this.gitInv5||O(this.git5),this.gitInv6=this.gitInv6||O(this.git6),this.gitInv7=this.gitInv7||O(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?"black":this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Qe,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Ke}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},y(Oi,"Theme"),Oi),US=y(e=>{const t=new HS;return t.calculate(e),t},"getThemeVariables"),Di,YS=(Di=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=W(this.primaryColor,16),this.tertiaryColor=b(this.primaryColor,{h:-160}),this.primaryBorderColor=O(this.background),this.secondaryBorderColor=mt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=mt(this.tertiaryColor,this.darkMode),this.primaryTextColor=O(this.primaryColor),this.secondaryTextColor=O(this.secondaryColor),this.tertiaryTextColor=O(this.tertiaryColor),this.mainBkg="#2a2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=W(O("#323D47"),10),this.border1="#ccc",this.border2=_r(255,255,255,.25),this.arrowheadColor=O(this.background),this.fontFamily="arial, sans-serif",this.fontSize="14px",this.labelBackground="#181818",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.radius=3,this.strokeWidth=1,this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.fontFamily="arial, sans-serif",this.fontSize="14px",this.useGradient=!0,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,0.2))",this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.noteFontWeight="normal",this.fontWeight="normal"}updateColors(){var r,i,a,s,o,n,l,h,c,u,f;if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||b(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||b(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||mt(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||mt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||mt(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||mt(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||O(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||O(this.tertiaryColor),this.lineColor=this.lineColor||O(this.background),this.arrowheadColor=this.arrowheadColor||O(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.border1,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?z(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||z(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||O(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||W(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||b(this.primaryColor,{h:30}),this.cScale4=this.cScale4||b(this.primaryColor,{h:60}),this.cScale5=this.cScale5||b(this.primaryColor,{h:90}),this.cScale6=this.cScale6||b(this.primaryColor,{h:120}),this.cScale7=this.cScale7||b(this.primaryColor,{h:150}),this.cScale8=this.cScale8||b(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||b(this.primaryColor,{h:270}),this.cScale10=this.cScale10||b(this.primaryColor,{h:300}),this.cScale11=this.cScale11||b(this.primaryColor,{h:330}),this.darkMode)for(let d=0;d<this.THEME_COLOR_LIMIT;d++)this["cScale"+d]=z(this["cScale"+d],75);else for(let d=0;d<this.THEME_COLOR_LIMIT;d++)this["cScale"+d]=z(this["cScale"+d],25);for(let d=0;d<this.THEME_COLOR_LIMIT;d++)this["cScaleInv"+d]=this["cScaleInv"+d]||O(this["cScale"+d]);for(let d=0;d<this.THEME_COLOR_LIMIT;d++)this.darkMode?this["cScalePeer"+d]=this["cScalePeer"+d]||W(this["cScale"+d],10):this["cScalePeer"+d]=this["cScalePeer"+d]||z(this["cScale"+d],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let d=0;d<this.THEME_COLOR_LIMIT;d++)this["cScaleLabel"+d]=this["cScaleLabel"+d]||this.scaleLabelColor;const t=this.darkMode?-4:-1;for(let d=0;d<5;d++)this["surface"+d]=this["surface"+d]||b(this.mainBkg,{h:180,s:-15,l:t*(5+d*3)}),this["surfacePeer"+d]=this["surfacePeer"+d]||b(this.mainBkg,{h:180,s:-15,l:t*(8+d*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||b(this.primaryColor,{h:64}),this.fillType3=this.fillType3||b(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||b(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||b(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||b(this.primaryColor,{h:128}),this.fillType7=this.fillType7||b(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||this.tertiaryColor,this.pie4=this.pie4||b(this.primaryColor,{l:-10}),this.pie5=this.pie5||b(this.secondaryColor,{l:-10}),this.pie6=this.pie6||b(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||b(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||b(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||b(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||b(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||b(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||b(this.primaryColor,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||b(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||b(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||b(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||b(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||b(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||b(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Ne(this.quadrant1Fill)?W(this.quadrant1Fill):z(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:((r=this.xyChart)==null?void 0:r.backgroundColor)||this.background,titleColor:((i=this.xyChart)==null?void 0:i.titleColor)||this.primaryTextColor,xAxisTitleColor:((a=this.xyChart)==null?void 0:a.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((s=this.xyChart)==null?void 0:s.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((o=this.xyChart)==null?void 0:o.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((n=this.xyChart)==null?void 0:n.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((l=this.xyChart)==null?void 0:l.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((h=this.xyChart)==null?void 0:h.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((c=this.xyChart)==null?void 0:c.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((u=this.xyChart)==null?void 0:u.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((f=this.xyChart)==null?void 0:f.plotColorPalette)||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?z(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||"#0b0000",this.git1=this.git1||"#4d1037",this.git2=this.git2||"#3f5258",this.git3=this.git3||"#4f2f1b",this.git4=this.git4||"#6e0a0a",this.git5=this.git5||"#3b0048",this.git6=this.git6||"#995a01",this.git7=this.git7||"#154706",this.gitDarkMode=!0,this.gitDarkMode?(this.git0=W(this.git0,25),this.git1=W(this.git1,25),this.git2=W(this.git2,25),this.git3=W(this.git3,25),this.git4=W(this.git4,25),this.git5=W(this.git5,25),this.git6=W(this.git6,25),this.git7=W(this.git7,25)):(this.git0=z(this.git0,25),this.git1=z(this.git1,25),this.git2=z(this.git2,25),this.git3=z(this.git3,25),this.git4=z(this.git4,25),this.git5=z(this.git5,25),this.git6=z(this.git6,25),this.git7=z(this.git7,25)),this.gitInv0=this.gitInv0||O(this.git0),this.gitInv1=this.gitInv1||O(this.git1),this.gitInv2=this.gitInv2||O(this.git2),this.gitInv3=this.gitInv3||O(this.git3),this.gitInv4=this.gitInv4||O(this.git4),this.gitInv5=this.gitInv5||O(this.git5),this.gitInv6=this.gitInv6||O(this.git6),this.gitInv7=this.gitInv7||O(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?"black":this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Qe,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Ke}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},y(Di,"Theme"),Di),GS=y(e=>{const t=new YS;return t.calculate(e),t},"getThemeVariables"),Ii,XS=(Ii=class{constructor(){this.background="#ffffff",this.primaryColor="#cccccc",this.mainBkg="#ffffff",this.noteBkgColor="#fff5ad",this.noteTextColor="#28253D",this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.primaryBorderColor=mt("#28253D",this.darkMode),this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.nodeBorder="#28253D",this.stateBorder="#28253D",this.useGradient=!1,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="url(#drop-shadow)",this.nodeShadow=!0,this.tertiaryColor="#ffffff",this.clusterBkg="#F9F9FB",this.clusterBorder="#BDBCCC",this.noteBorderColor="#FACC15",this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.actorBorder="#28253D",this.filterColor="#000000"}updateColors(){var s,o,n,l,h,c,u,f,d,g,p;this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#28253D"),this.secondaryColor=this.secondaryColor||b(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||b(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||mt(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||mt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||mt(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||mt(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#FEF9C3",this.noteTextColor=this.noteTextColor||"#28253D",this.secondaryTextColor=this.secondaryTextColor||O(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||O(this.tertiaryColor),this.lineColor=this.lineColor||O(this.background),this.arrowheadColor=this.arrowheadColor||O(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?z(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.noteFontWeight=600,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||z(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||O(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor;const t="#ECECFE",r="#E9E9F1",i=b(t,{h:180,l:5});this.sectionBkgColor=this.sectionBkgColor||i,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||r,this.sectionBkgColor2=this.sectionBkgColor2||t,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||t,this.activeTaskBorderColor=this.activeTaskBorderColor||t,this.activeTaskBkgColor=this.activeTaskBkgColor||W(t,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.compositeTitleBackground="#F9F9FB",this.altBackground="#F9F9FB",this.stateEdgeLabelBackground="#FFFFFF",this.fontWeight=600,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor;for(let m=0;m<this.THEME_COLOR_LIMIT;m++)this["cScale"+m]=this.mainBkg;if(this.darkMode)for(let m=0;m<this.THEME_COLOR_LIMIT;m++)this["cScale"+m]=z(this["cScale"+m],75);else for(let m=0;m<this.THEME_COLOR_LIMIT;m++)this["cScale"+m]=z(this["cScale"+m],25);for(let m=0;m<this.THEME_COLOR_LIMIT;m++)this["cScaleInv"+m]=this["cScaleInv"+m]||O(this["cScale"+m]);for(let m=0;m<this.THEME_COLOR_LIMIT;m++)this.darkMode?this["cScalePeer"+m]=this["cScalePeer"+m]||W(this["cScale"+m],10):this["cScalePeer"+m]=this["cScalePeer"+m]||z(this["cScale"+m],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let m=0;m<this.THEME_COLOR_LIMIT;m++)this["cScaleLabel"+m]=this["cScaleLabel"+m]||this.scaleLabelColor;const a=this.darkMode?-4:-1;for(let m=0;m<5;m++)this["surface"+m]=this["surface"+m]||b(this.mainBkg,{h:180,s:-15,l:a*(5+m*3)}),this["surfacePeer"+m]=this["surfacePeer"+m]||b(this.mainBkg,{h:180,s:-15,l:a*(8+m*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||t,this.fillType1=this.fillType1||r,this.fillType2=this.fillType2||b(t,{h:64}),this.fillType3=this.fillType3||b(r,{h:64}),this.fillType4=this.fillType4||b(t,{h:-64}),this.fillType5=this.fillType5||b(r,{h:-64}),this.fillType6=this.fillType6||b(t,{h:128}),this.fillType7=this.fillType7||b(r,{h:128}),this.pie1=this.pie1||t,this.pie2=this.pie2||r,this.pie3=this.pie3||i,this.pie4=this.pie4||b(t,{l:-10}),this.pie5=this.pie5||b(r,{l:-10}),this.pie6=this.pie6||b(i,{l:-10}),this.pie7=this.pie7||b(t,{h:60,l:-10}),this.pie8=this.pie8||b(t,{h:-60,l:-10}),this.pie9=this.pie9||b(t,{h:120,l:0}),this.pie10=this.pie10||b(t,{h:60,l:-20}),this.pie11=this.pie11||b(t,{h:-60,l:-20}),this.pie12=this.pie12||b(t,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||t,this.quadrant2Fill=this.quadrant2Fill||b(t,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||b(t,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||b(t,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||b(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||b(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||b(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Ne(this.quadrant1Fill)?W(this.quadrant1Fill):z(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:((s=this.xyChart)==null?void 0:s.backgroundColor)||this.background,titleColor:((o=this.xyChart)==null?void 0:o.titleColor)||this.primaryTextColor,xAxisTitleColor:((n=this.xyChart)==null?void 0:n.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((l=this.xyChart)==null?void 0:l.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((h=this.xyChart)==null?void 0:h.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((c=this.xyChart)==null?void 0:c.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((u=this.xyChart)==null?void 0:u.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((f=this.xyChart)==null?void 0:f.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((d=this.xyChart)==null?void 0:d.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((g=this.xyChart)==null?void 0:g.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((p=this.xyChart)==null?void 0:p.plotColorPalette)||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||t,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?z(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.requirementEdgeLabelBackground="#FFFFFF",this.git0=this.git0||t,this.git1=this.git1||r,this.git2=this.git2||i,this.git3=this.git3||b(t,{h:-30}),this.git4=this.git4||b(t,{h:-60}),this.git5=this.git5||b(t,{h:-90}),this.git6=this.git6||b(t,{h:60}),this.git7=this.git7||b(t,{h:120}),this.darkMode?(this.git0=W(this.git0,25),this.git1=W(this.git1,25),this.git2=W(this.git2,25),this.git3=W(this.git3,25),this.git4=W(this.git4,25),this.git5=W(this.git5,25),this.git6=W(this.git6,25),this.git7=W(this.git7,25)):(this.git0=z(this.git0,25),this.git1=z(this.git1,25),this.git2=z(this.git2,25),this.git3=z(this.git3,25),this.git4=z(this.git4,25),this.git5=z(this.git5,25),this.git6=z(this.git6,25),this.git7=z(this.git7,25)),this.gitInv0=this.gitInv0||O(this.git0),this.gitInv1=this.gitInv1||O(this.git1),this.gitInv2=this.gitInv2||O(this.git2),this.gitInv3=this.gitInv3||O(this.git3),this.gitInv4=this.gitInv4||O(this.git4),this.gitInv5=this.gitInv5||O(this.git5),this.gitInv6=this.gitInv6||O(this.git6),this.gitInv7=this.gitInv7||O(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?"black":this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.commitLineColor=this.commitLineColor??"#BDBCCC",this.erEdgeLabelBackground="#FFFFFF",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Qe,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Ke}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},y(Ii,"Theme"),Ii),jS=y(e=>{const t=new XS;return t.calculate(e),t},"getThemeVariables"),Pi,VS=(Pi=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=W(this.primaryColor,16),this.tertiaryColor=b(this.primaryColor,{h:-160}),this.primaryBorderColor=O(this.background),this.secondaryBorderColor=mt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=mt(this.tertiaryColor,this.darkMode),this.primaryTextColor=O(this.primaryColor),this.secondaryTextColor=O(this.secondaryColor),this.tertiaryTextColor=O(this.tertiaryColor),this.mainBkg="#111113",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=W(O("#323D47"),10),this.border1="#ccc",this.border2=_r(255,255,255,.25),this.arrowheadColor=O(this.background),this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.labelBackground="#111113",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.noteBkgColor=this.noteBkgColor??"#FEF9C3",this.noteTextColor=this.noteTextColor??"#28253D",this.THEME_COLOR_LIMIT=12,this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.nodeBorder="#FFFFFF",this.stateBorder="#FFFFFF",this.useGradient=!1,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="url(#drop-shadow)",this.nodeShadow=!0,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.clusterBkg="#1E1A2E",this.clusterBorder="#BDBCCC",this.noteBorderColor="#FACC15",this.noteFontWeight=600,this.filterColor="#FFFFFF"}updateColors(){var r,i,a,s,o,n,l,h,c,u,f;if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#FFFFFF"),this.secondaryColor=this.secondaryColor||b(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||b(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||mt(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||mt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||mt(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||mt(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#FFFFFF",this.secondaryTextColor=this.secondaryTextColor||O(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||O(this.tertiaryColor),this.lineColor=this.lineColor||O(this.background),this.arrowheadColor=this.arrowheadColor||O(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.border1,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?z(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder="#FFFFFF",this.signalColor="#FFFFFF",this.labelBoxBorderColor="#BDBCCC",this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||z(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||O(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||W(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.compositeBackground="#16141F",this.altBackground="#16141F",this.compositeTitleBackground="#16141F",this.stateEdgeLabelBackground="#16141F",this.fontWeight=600,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||b(this.primaryColor,{h:30}),this.cScale4=this.cScale4||b(this.primaryColor,{h:60}),this.cScale5=this.cScale5||b(this.primaryColor,{h:90}),this.cScale6=this.cScale6||b(this.primaryColor,{h:120}),this.cScale7=this.cScale7||b(this.primaryColor,{h:150}),this.cScale8=this.cScale8||b(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||b(this.primaryColor,{h:270}),this.cScale10=this.cScale10||b(this.primaryColor,{h:300}),this.cScale11=this.cScale11||b(this.primaryColor,{h:330}),this.darkMode)for(let d=0;d<this.THEME_COLOR_LIMIT;d++)this["cScale"+d]=z(this["cScale"+d],75);else for(let d=0;d<this.THEME_COLOR_LIMIT;d++)this["cScale"+d]=z(this["cScale"+d],25);for(let d=0;d<this.THEME_COLOR_LIMIT;d++)this["cScaleInv"+d]=this["cScaleInv"+d]||O(this["cScale"+d]);for(let d=0;d<this.THEME_COLOR_LIMIT;d++)this.darkMode?this["cScalePeer"+d]=this["cScalePeer"+d]||W(this["cScale"+d],10):this["cScalePeer"+d]=this["cScalePeer"+d]||z(this["cScale"+d],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let d=0;d<this.THEME_COLOR_LIMIT;d++)this["cScaleLabel"+d]=this["cScaleLabel"+d]||this.scaleLabelColor;const t=this.darkMode?-4:-1;for(let d=0;d<5;d++)this["surface"+d]=this["surface"+d]||b(this.mainBkg,{h:180,s:-15,l:t*(5+d*3)}),this["surfacePeer"+d]=this["surfacePeer"+d]||b(this.mainBkg,{h:180,s:-15,l:t*(8+d*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||b(this.primaryColor,{h:64}),this.fillType3=this.fillType3||b(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||b(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||b(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||b(this.primaryColor,{h:128}),this.fillType7=this.fillType7||b(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||this.tertiaryColor,this.pie4=this.pie4||b(this.primaryColor,{l:-10}),this.pie5=this.pie5||b(this.secondaryColor,{l:-10}),this.pie6=this.pie6||b(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||b(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||b(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||b(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||b(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||b(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||b(this.primaryColor,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||b(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||b(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||b(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||b(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||b(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||b(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Ne(this.quadrant1Fill)?W(this.quadrant1Fill):z(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:((r=this.xyChart)==null?void 0:r.backgroundColor)||this.background,titleColor:((i=this.xyChart)==null?void 0:i.titleColor)||this.primaryTextColor,xAxisTitleColor:((a=this.xyChart)==null?void 0:a.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((s=this.xyChart)==null?void 0:s.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((o=this.xyChart)==null?void 0:o.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((n=this.xyChart)==null?void 0:n.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((l=this.xyChart)==null?void 0:l.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((h=this.xyChart)==null?void 0:h.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((c=this.xyChart)==null?void 0:c.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((u=this.xyChart)==null?void 0:u.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((f=this.xyChart)==null?void 0:f.plotColorPalette)||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?z(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.requirementEdgeLabelBackground="#16141F",this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||b(this.primaryColor,{h:-30}),this.git4=this.git4||b(this.primaryColor,{h:-60}),this.git5=this.git5||b(this.primaryColor,{h:-90}),this.git6=this.git6||b(this.primaryColor,{h:60}),this.git7=this.git7||b(this.primaryColor,{h:120}),this.darkMode?(this.git0=W(this.git0,25),this.git1=W(this.git1,25),this.git2=W(this.git2,25),this.git3=W(this.git3,25),this.git4=W(this.git4,25),this.git5=W(this.git5,25),this.git6=W(this.git6,25),this.git7=W(this.git7,25)):(this.git0=z(this.git0,25),this.git1=z(this.git1,25),this.git2=z(this.git2,25),this.git3=z(this.git3,25),this.git4=z(this.git4,25),this.git5=z(this.git5,25),this.git6=z(this.git6,25),this.git7=z(this.git7,25)),this.gitInv0=this.gitInv0||O(this.git0),this.gitInv1=this.gitInv1||O(this.git1),this.gitInv2=this.gitInv2||O(this.git2),this.gitInv3=this.gitInv3||O(this.git3),this.gitInv4=this.gitInv4||O(this.git4),this.gitInv5=this.gitInv5||O(this.git5),this.gitInv6=this.gitInv6||O(this.git6),this.gitInv7=this.gitInv7||O(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?"black":this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.commitLineColor=this.commitLineColor??"#BDBCCC",this.erEdgeLabelBackground="#16141F",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Qe,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Ke}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},y(Pi,"Theme"),Pi),ZS=y(e=>{const t=new VS;return t.calculate(e),t},"getThemeVariables"),Ri,QS=(Ri=class{constructor(){this.background="#ffffff",this.primaryColor="#cccccc",this.mainBkg="#ffffff",this.noteBkgColor="#fff5ad",this.noteTextColor="#28253D",this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.primaryBorderColor=mt(this.primaryColor,this.darkMode),this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.nodeBorder="#28253D",this.stateBorder="#28253D",this.useGradient=!1,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="url(#drop-shadow)",this.nodeShadow=!0,this.tertiaryColor="#ffffff",this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.actorBorder="#28253D",this.noteBorderColor="#FACC15",this.noteFontWeight=600,this.borderColorArray=["#E879F9","#2DD4BF","#FB923C","#22D3EE","#4ADE80","#A78BFA","#F87171","#FACC15","#818CF8","#A3E635 ","#38BDF8","#FB7185"],this.bkgColorArray=["#FDF4FF","#F0FDFA","#FFF7ED","#ECFEFF","#F0FDF4","#F5F3FF","#FEF2F2","#FEFCE8","#EEF2FF","#F7FEE7","#F0F9FF","#FFF1F2"],this.filterColor="#000000"}updateColors(){var s,o,n,l,h,c,u,f,d,g,p;this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#28253D"),this.secondaryColor=this.secondaryColor||b(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||b(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||mt(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||mt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||mt(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||mt(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#28253D",this.secondaryTextColor=this.secondaryTextColor||O(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||O(this.tertiaryColor),this.lineColor=this.lineColor||O(this.background),this.arrowheadColor=this.arrowheadColor||O(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?z(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||z(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||O(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor;const t="#ECECFE",r="#E9E9F1",i=b(t,{h:180,l:5});this.sectionBkgColor=this.sectionBkgColor||i,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||r,this.sectionBkgColor2=this.sectionBkgColor2||t,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||t,this.activeTaskBorderColor=this.activeTaskBorderColor||t,this.activeTaskBkgColor=this.activeTaskBkgColor||W(t,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||"#f4a8ff",this.cScale1=this.cScale1||"#46ecd5",this.cScale2=this.cScale2||"#ffb86a",this.cScale3=this.cScale3||"#dab2ff",this.cScale4=this.cScale4||"#7bf1a8",this.cScale5=this.cScale5||"#c4b4ff",this.cScale6=this.cScale6||"#ffa2a2",this.cScale7=this.cScale7||"#ffdf20",this.cScale8=this.cScale8||"#a3b3ff",this.cScale9=this.cScale9||"#bbf451",this.cScale10=this.cScale10||"#74d4ff",this.cScale11=this.cScale11||"#ffa1ad";for(let m=0;m<this.THEME_COLOR_LIMIT;m++)this["cScaleInv"+m]=this["cScaleInv"+m]||O(this["cScale"+m]);for(let m=0;m<this.THEME_COLOR_LIMIT;m++)this.darkMode?this["cScalePeer"+m]=this["cScalePeer"+m]||W(this["cScale"+m],10):this["cScalePeer"+m]=this["cScalePeer"+m]||z(this["cScale"+m],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let m=0;m<this.THEME_COLOR_LIMIT;m++)this["cScaleLabel"+m]=this["cScaleLabel"+m]||this.scaleLabelColor;const a=this.darkMode?-4:-1;for(let m=0;m<5;m++)this["surface"+m]=this["surface"+m]||b(this.mainBkg,{h:180,s:-15,l:a*(5+m*3)}),this["surfacePeer"+m]=this["surfacePeer"+m]||b(this.mainBkg,{h:180,s:-15,l:a*(8+m*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||t,this.fillType1=this.fillType1||r,this.fillType2=this.fillType2||b(t,{h:64}),this.fillType3=this.fillType3||b(r,{h:64}),this.fillType4=this.fillType4||b(t,{h:-64}),this.fillType5=this.fillType5||b(r,{h:-64}),this.fillType6=this.fillType6||b(t,{h:128}),this.fillType7=this.fillType7||b(r,{h:128}),this.pie1=this.pie1||t,this.pie2=this.pie2||r,this.pie3=this.pie3||i,this.pie4=this.pie4||b(t,{l:-10}),this.pie5=this.pie5||b(r,{l:-10}),this.pie6=this.pie6||b(i,{l:-10}),this.pie7=this.pie7||b(t,{h:60,l:-10}),this.pie8=this.pie8||b(t,{h:-60,l:-10}),this.pie9=this.pie9||b(t,{h:120,l:0}),this.pie10=this.pie10||b(t,{h:60,l:-20}),this.pie11=this.pie11||b(t,{h:-60,l:-20}),this.pie12=this.pie12||b(t,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||t,this.quadrant2Fill=this.quadrant2Fill||b(t,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||b(t,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||b(t,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||b(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||b(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||b(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Ne(this.quadrant1Fill)?W(this.quadrant1Fill):z(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:((s=this.xyChart)==null?void 0:s.backgroundColor)||this.background,titleColor:((o=this.xyChart)==null?void 0:o.titleColor)||this.primaryTextColor,xAxisTitleColor:((n=this.xyChart)==null?void 0:n.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((l=this.xyChart)==null?void 0:l.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((h=this.xyChart)==null?void 0:h.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((c=this.xyChart)==null?void 0:c.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((u=this.xyChart)==null?void 0:u.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((f=this.xyChart)==null?void 0:f.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((d=this.xyChart)==null?void 0:d.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((g=this.xyChart)==null?void 0:g.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((p=this.xyChart)==null?void 0:p.plotColorPalette)||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||t,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?z(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||t,this.git1=this.git1||r,this.git2=this.git2||i,this.git3=this.git3||b(t,{h:-30}),this.git4=this.git4||b(t,{h:-60}),this.git5=this.git5||b(t,{h:-90}),this.git6=this.git6||b(t,{h:60}),this.git7=this.git7||b(t,{h:120}),this.darkMode?(this.git0=W(this.git0,25),this.git1=W(this.git1,25),this.git2=W(this.git2,25),this.git3=W(this.git3,25),this.git4=W(this.git4,25),this.git5=W(this.git5,25),this.git6=W(this.git6,25),this.git7=W(this.git7,25)):(this.git0=z(this.git0,25),this.git1=z(this.git1,25),this.git2=z(this.git2,25),this.git3=z(this.git3,25),this.git4=z(this.git4,25),this.git5=z(this.git5,25),this.git6=z(this.git6,25),this.git7=z(this.git7,25)),this.gitInv0=this.gitInv0||O(this.git0),this.gitInv1=this.gitInv1||O(this.git1),this.gitInv2=this.gitInv2||O(this.git2),this.gitInv3=this.gitInv3||O(this.git3),this.gitInv4=this.gitInv4||O(this.git4),this.gitInv5=this.gitInv5||O(this.git5),this.gitInv6=this.gitInv6||O(this.git6),this.gitInv7=this.gitInv7||O(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?"black":this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLineColor=this.commitLineColor??"#BDBCCC",this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.fontWeight=600,this.erEdgeLabelBackground="#FFFFFF",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Qe,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Ke}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},y(Ri,"Theme"),Ri),KS=y(e=>{const t=new QS;return t.calculate(e),t},"getThemeVariables"),Ni,JS=(Ni=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=W(this.primaryColor,16),this.tertiaryColor=b(this.primaryColor,{h:-160}),this.primaryBorderColor=O(this.background),this.secondaryBorderColor=mt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=mt(this.tertiaryColor,this.darkMode),this.primaryTextColor=O(this.primaryColor),this.secondaryTextColor=O(this.secondaryColor),this.tertiaryTextColor=O(this.tertiaryColor),this.mainBkg="#111113",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=W(O("#323D47"),10),this.border1="#ccc",this.border2=_r(255,255,255,.25),this.arrowheadColor=O(this.background),this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.labelBackground="#111113",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.noteBkgColor=this.noteBkgColor??"#FEF9C3",this.noteTextColor=this.noteTextColor??"#28253D",this.THEME_COLOR_LIMIT=12,this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.nodeBorder="#FFFFFF",this.stateBorder="#FFFFFF",this.useGradient=!1,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="url(#drop-shadow)",this.nodeShadow=!0,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.clusterBkg="#1E1A2E",this.clusterBorder="#BDBCCC",this.noteBorderColor="#FACC15",this.noteFontWeight=600,this.borderColorArray=["#E879F9","#2DD4BF","#FB923C","#22D3EE","#4ADE80","#A78BFA","#F87171","#FACC15","#818CF8","#A3E635 ","#38BDF8","#FB7185"],this.bkgColorArray=[],this.filterColor="#FFFFFF"}updateColors(){var r,i,a,s,o,n,l,h,c,u,f;this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#FFFFFF"),this.secondaryColor=this.secondaryColor||b(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||b(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||mt(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||mt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||mt(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||mt(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#FFFFFF",this.secondaryTextColor=this.secondaryTextColor||O(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||O(this.tertiaryColor),this.lineColor=this.lineColor||O(this.background),this.arrowheadColor=this.arrowheadColor||O(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.border1,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?z(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder="#FFFFFF",this.signalColor="#FFFFFF",this.labelBoxBorderColor="#BDBCCC",this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||z(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||O(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.rootLabelColor="#FFFFFF",this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||W(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||"#f4a8ff",this.cScale1=this.cScale1||"#46ecd5",this.cScale2=this.cScale2||"#ffb86a",this.cScale3=this.cScale3||"#dab2ff",this.cScale4=this.cScale4||"#7bf1a8",this.cScale5=this.cScale5||"#c4b4ff",this.cScale6=this.cScale6||"#ffa2a2",this.cScale7=this.cScale7||"#ffdf20",this.cScale8=this.cScale8||"#a3b3ff",this.cScale9=this.cScale9||"#bbf451",this.cScale10=this.cScale10||"#74d4ff",this.cScale11=this.cScale11||"#ffa1ad";for(let d=0;d<this.THEME_COLOR_LIMIT;d++)this["cScaleInv"+d]=this["cScaleInv"+d]||O(this["cScale"+d]);for(let d=0;d<this.THEME_COLOR_LIMIT;d++)this.darkMode?this["cScalePeer"+d]=this["cScalePeer"+d]||W(this["cScale"+d],10):this["cScalePeer"+d]=this["cScalePeer"+d]||z(this["cScale"+d],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let d=0;d<this.THEME_COLOR_LIMIT;d++)this["cScaleLabel"+d]=z(this["cScale"+d],75);const t=this.darkMode?-4:-1;for(let d=0;d<5;d++)this["surface"+d]=this["surface"+d]||b(this.mainBkg,{h:180,s:-15,l:t*(5+d*3)}),this["surfacePeer"+d]=this["surfacePeer"+d]||b(this.mainBkg,{h:180,s:-15,l:t*(8+d*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||b(this.primaryColor,{h:64}),this.fillType3=this.fillType3||b(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||b(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||b(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||b(this.primaryColor,{h:128}),this.fillType7=this.fillType7||b(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||this.tertiaryColor,this.pie4=this.pie4||b(this.primaryColor,{l:-10}),this.pie5=this.pie5||b(this.secondaryColor,{l:-10}),this.pie6=this.pie6||b(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||b(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||b(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||b(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||b(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||b(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||b(this.primaryColor,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||b(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||b(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||b(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||b(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||b(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||b(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Ne(this.quadrant1Fill)?W(this.quadrant1Fill):z(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:((r=this.xyChart)==null?void 0:r.backgroundColor)||this.background,titleColor:((i=this.xyChart)==null?void 0:i.titleColor)||this.primaryTextColor,xAxisTitleColor:((a=this.xyChart)==null?void 0:a.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((s=this.xyChart)==null?void 0:s.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((o=this.xyChart)==null?void 0:o.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((n=this.xyChart)==null?void 0:n.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((l=this.xyChart)==null?void 0:l.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((h=this.xyChart)==null?void 0:h.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((c=this.xyChart)==null?void 0:c.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((u=this.xyChart)==null?void 0:u.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((f=this.xyChart)==null?void 0:f.plotColorPalette)||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?z(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||b(this.primaryColor,{h:-30}),this.git4=this.git4||b(this.primaryColor,{h:-60}),this.git5=this.git5||b(this.primaryColor,{h:-90}),this.git6=this.git6||b(this.primaryColor,{h:60}),this.git7=this.git7||b(this.primaryColor,{h:120}),this.darkMode?(this.git0=W(this.git0,25),this.git1=W(this.git1,25),this.git2=W(this.git2,25),this.git3=W(this.git3,25),this.git4=W(this.git4,25),this.git5=W(this.git5,25),this.git6=W(this.git6,25),this.git7=W(this.git7,25)):(this.git0=z(this.git0,25),this.git1=z(this.git1,25),this.git2=z(this.git2,25),this.git3=z(this.git3,25),this.git4=z(this.git4,25),this.git5=z(this.git5,25),this.git6=z(this.git6,25),this.git7=z(this.git7,25)),this.gitInv0=this.gitInv0||O(this.git0),this.gitInv1=this.gitInv1||O(this.git1),this.gitInv2=this.gitInv2||O(this.git2),this.gitInv3=this.gitInv3||O(this.git3),this.gitInv4=this.gitInv4||O(this.git4),this.gitInv5=this.gitInv5||O(this.git5),this.gitInv6=this.gitInv6||O(this.git6),this.gitInv7=this.gitInv7||O(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?"black":this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.commitLineColor=this.commitLineColor??"#BDBCCC",this.fontWeight=600,this.erEdgeLabelBackground="#16141F",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Qe,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Ke}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},y(Ni,"Theme"),Ni),t_=y(e=>{const t=new JS;return t.calculate(e),t},"getThemeVariables"),hr={base:{getThemeVariables:OS},dark:{getThemeVariables:IS},default:{getThemeVariables:RS},forest:{getThemeVariables:qS},neutral:{getThemeVariables:zS},neo:{getThemeVariables:US},"neo-dark":{getThemeVariables:GS},redux:{getThemeVariables:jS},"redux-dark":{getThemeVariables:ZS},"redux-color":{getThemeVariables:KS},"redux-dark-color":{getThemeVariables:t_}},Zt={flowchart:{useMaxWidth:!0,titleTopMargin:25,subGraphTitleMargin:{top:0,bottom:0},diagramPadding:8,htmlLabels:null,nodeSpacing:50,rankSpacing:50,curve:"basis",padding:15,defaultRenderer:"dagre-wrapper",wrappingWidth:200,inheritDir:!1},swimlane:{useMaxWidth:!0,lineHops:"arc",ignoreCrossLaneEdges:!0,optimizeRanksByCrossings:!0,automaticLaneOrdering:!1},sequence:{useMaxWidth:!0,hideUnusedParticipants:!1,activationWidth:10,diagramMarginX:50,diagramMarginY:10,actorMargin:50,width:150,height:65,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",mirrorActors:!0,forceMenus:!1,bottomMarginAdj:1,rightAngles:!1,showSequenceNumbers:!1,actorFontSize:14,actorFontFamily:'"Open Sans", sans-serif',actorFontWeight:400,noteFontSize:14,noteFontFamily:'"trebuchet ms", verdana, arial, sans-serif',noteFontWeight:400,noteAlign:"center",messageFontSize:16,messageFontFamily:'"trebuchet ms", verdana, arial, sans-serif',messageFontWeight:400,wrap:!1,wrapPadding:10,labelBoxWidth:50,labelBoxHeight:20},gantt:{useMaxWidth:!0,titleTopMargin:25,barHeight:20,barGap:4,topPadding:50,rightPadding:75,leftPadding:75,gridLineStartPadding:35,fontSize:11,sectionFontSize:11,numberSectionStyles:4,axisFormat:"%Y-%m-%d",topAxis:!1,displayMode:"",weekday:"sunday"},journey:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,leftMargin:150,maxLabelWidth:360,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",bottomMarginAdj:1,rightAngles:!1,taskFontSize:14,taskFontFamily:'"Open Sans", sans-serif',taskMargin:50,activationWidth:10,textPlacement:"fo",actorColours:["#8FBC8F","#7CFC00","#00FFFF","#20B2AA","#B0E0E6","#FFFFE0"],sectionFills:["#191970","#8B008B","#4B0082","#2F4F4F","#800000","#8B4513","#00008B"],sectionColours:["#fff"],titleColor:"",titleFontFamily:'"trebuchet ms", verdana, arial, sans-serif',titleFontSize:"4ex"},class:{useMaxWidth:!0,titleTopMargin:25,arrowMarkerAbsolute:!1,dividerMargin:10,padding:5,textHeight:10,defaultRenderer:"dagre-wrapper",htmlLabels:!1,hideEmptyMembersBox:!1,hierarchicalNamespaces:!0},state:{useMaxWidth:!0,titleTopMargin:25,dividerMargin:10,sizeUnit:5,padding:8,textHeight:10,titleShift:-15,noteMargin:10,forkWidth:70,forkHeight:7,miniPadding:2,fontSizeFactor:5.02,fontSize:24,labelHeight:16,edgeLengthFactor:"20",compositTitleSize:35,radius:5,defaultRenderer:"dagre-wrapper"},er:{useMaxWidth:!0,titleTopMargin:25,diagramPadding:20,layoutDirection:"TB",minEntityWidth:100,minEntityHeight:75,entityPadding:15,nodeSpacing:140,rankSpacing:80,stroke:"gray",fill:"honeydew",fontSize:12},pie:{useMaxWidth:!0,textPosition:.75,donutHole:0,legendPosition:"right",highlightSlice:""},quadrantChart:{useMaxWidth:!0,chartWidth:500,chartHeight:500,titleFontSize:20,titlePadding:10,quadrantPadding:5,xAxisLabelPadding:5,yAxisLabelPadding:5,xAxisLabelFontSize:16,yAxisLabelFontSize:16,quadrantLabelFontSize:16,quadrantTextTopPadding:5,pointTextPadding:5,pointLabelFontSize:12,pointRadius:5,xAxisPosition:"top",yAxisPosition:"left",quadrantInternalBorderStrokeWidth:1,quadrantExternalBorderStrokeWidth:2},xyChart:{useMaxWidth:!0,width:700,height:500,titleFontSize:20,titlePadding:10,showDataLabel:!1,showDataLabelOutsideBar:!1,showTitle:!0,xAxis:{$ref:"#/$defs/XYChartAxisConfig",showLabel:!0,labelFontSize:14,labelPadding:5,showTitle:!0,titleFontSize:16,titlePadding:5,showTick:!0,tickLength:5,tickWidth:2,showAxisLine:!0,axisLineWidth:2,labelRotation:0},yAxis:{$ref:"#/$defs/XYChartAxisConfig",showLabel:!0,labelFontSize:14,labelPadding:5,showTitle:!0,titleFontSize:16,titlePadding:5,showTick:!0,tickLength:5,tickWidth:2,showAxisLine:!0,axisLineWidth:2,labelRotation:0},chartOrientation:"vertical",plotReservedSpacePercent:50},requirement:{useMaxWidth:!0,rect_fill:"#f9f9f9",text_color:"#333",rect_border_size:"0.5px",rect_border_color:"#bbb",rect_min_width:200,rect_min_height:200,fontSize:14,rect_padding:10,line_height:20},mindmap:{useMaxWidth:!0,padding:10,maxNodeWidth:200,layoutAlgorithm:"cose-bilkent"},ishikawa:{useMaxWidth:!0,diagramPadding:20},kanban:{useMaxWidth:!0,padding:8,sectionWidth:200,ticketBaseUrl:""},timeline:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,leftMargin:150,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",bottomMarginAdj:1,rightAngles:!1,taskFontSize:14,taskFontFamily:'"Open Sans", sans-serif',taskMargin:50,activationWidth:10,textPlacement:"fo",actorColours:["#8FBC8F","#7CFC00","#00FFFF","#20B2AA","#B0E0E6","#FFFFE0"],sectionFills:["#191970","#8B008B","#4B0082","#2F4F4F","#800000","#8B4513","#00008B"],sectionColours:["#fff"],disableMulticolor:!1},gitGraph:{useMaxWidth:!0,titleTopMargin:25,diagramPadding:8,nodeLabel:{width:75,height:100,x:-25,y:0},mainBranchName:"main",mainBranchOrder:0,showCommitLabel:!0,showBranches:!0,rotateCommitLabel:!0,parallelCommits:!1,arrowMarkerAbsolute:!1},c4:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,c4ShapeMargin:50,c4ShapePadding:20,width:216,height:60,boxMargin:10,c4ShapeInRow:4,nextLinePaddingX:0,c4BoundaryInRow:2,personFontSize:14,personFontFamily:'"Open Sans", sans-serif',personFontWeight:"normal",external_personFontSize:14,external_personFontFamily:'"Open Sans", sans-serif',external_personFontWeight:"normal",systemFontSize:14,systemFontFamily:'"Open Sans", sans-serif',systemFontWeight:"normal",external_systemFontSize:14,external_systemFontFamily:'"Open Sans", sans-serif',external_systemFontWeight:"normal",system_dbFontSize:14,system_dbFontFamily:'"Open Sans", sans-serif',system_dbFontWeight:"normal",external_system_dbFontSize:14,external_system_dbFontFamily:'"Open Sans", sans-serif',external_system_dbFontWeight:"normal",system_queueFontSize:14,system_queueFontFamily:'"Open Sans", sans-serif',system_queueFontWeight:"normal",external_system_queueFontSize:14,external_system_queueFontFamily:'"Open Sans", sans-serif',external_system_queueFontWeight:"normal",boundaryFontSize:14,boundaryFontFamily:'"Open Sans", sans-serif',boundaryFontWeight:"normal",messageFontSize:12,messageFontFamily:'"Open Sans", sans-serif',messageFontWeight:"normal",containerFontSize:14,containerFontFamily:'"Open Sans", sans-serif',containerFontWeight:"normal",external_containerFontSize:14,external_containerFontFamily:'"Open Sans", sans-serif',external_containerFontWeight:"normal",container_dbFontSize:14,container_dbFontFamily:'"Open Sans", sans-serif',container_dbFontWeight:"normal",external_container_dbFontSize:14,external_container_dbFontFamily:'"Open Sans", sans-serif',external_container_dbFontWeight:"normal",container_queueFontSize:14,container_queueFontFamily:'"Open Sans", sans-serif',container_queueFontWeight:"normal",external_container_queueFontSize:14,external_container_queueFontFamily:'"Open Sans", sans-serif',external_container_queueFontWeight:"normal",componentFontSize:14,componentFontFamily:'"Open Sans", sans-serif',componentFontWeight:"normal",external_componentFontSize:14,external_componentFontFamily:'"Open Sans", sans-serif',external_componentFontWeight:"normal",component_dbFontSize:14,component_dbFontFamily:'"Open Sans", sans-serif',component_dbFontWeight:"normal",external_component_dbFontSize:14,external_component_dbFontFamily:'"Open Sans", sans-serif',external_component_dbFontWeight:"normal",component_queueFontSize:14,component_queueFontFamily:'"Open Sans", sans-serif',component_queueFontWeight:"normal",external_component_queueFontSize:14,external_component_queueFontFamily:'"Open Sans", sans-serif',external_component_queueFontWeight:"normal",wrap:!0,wrapPadding:10,person_bg_color:"#08427B",person_border_color:"#073B6F",external_person_bg_color:"#686868",external_person_border_color:"#8A8A8A",system_bg_color:"#1168BD",system_border_color:"#3C7FC0",system_db_bg_color:"#1168BD",system_db_border_color:"#3C7FC0",system_queue_bg_color:"#1168BD",system_queue_border_color:"#3C7FC0",external_system_bg_color:"#999999",external_system_border_color:"#8A8A8A",external_system_db_bg_color:"#999999",external_system_db_border_color:"#8A8A8A",external_system_queue_bg_color:"#999999",external_system_queue_border_color:"#8A8A8A",container_bg_color:"#438DD5",container_border_color:"#3C7FC0",container_db_bg_color:"#438DD5",container_db_border_color:"#3C7FC0",container_queue_bg_color:"#438DD5",container_queue_border_color:"#3C7FC0",external_container_bg_color:"#B3B3B3",external_container_border_color:"#A6A6A6",external_container_db_bg_color:"#B3B3B3",external_container_db_border_color:"#A6A6A6",external_container_queue_bg_color:"#B3B3B3",external_container_queue_border_color:"#A6A6A6",component_bg_color:"#85BBF0",component_border_color:"#78A8D8",component_db_bg_color:"#85BBF0",component_db_border_color:"#78A8D8",component_queue_bg_color:"#85BBF0",component_queue_border_color:"#78A8D8",external_component_bg_color:"#CCCCCC",external_component_border_color:"#BFBFBF",external_component_db_bg_color:"#CCCCCC",external_component_db_border_color:"#BFBFBF",external_component_queue_bg_color:"#CCCCCC",external_component_queue_border_color:"#BFBFBF"},sankey:{useMaxWidth:!0,width:600,height:400,linkColor:"gradient",nodeAlignment:"justify",showValues:!0,prefix:"",suffix:"",nodeWidth:10,nodePadding:12,labelStyle:"legacy"},block:{useMaxWidth:!0,padding:8},packet:{useMaxWidth:!0,rowHeight:32,bitWidth:32,bitsPerRow:32,showBits:!0,paddingX:5,paddingY:5},treeView:{useMaxWidth:!0,rowIndent:10,paddingX:5,paddingY:5,lineThickness:1,showIcons:!1,defaultIconPack:"",filenameIcons:{},extensionIcons:{}},architecture:{useMaxWidth:!0,padding:40,iconSize:80,fontSize:16,randomize:!1,nodeSeparation:75,idealEdgeLengthMultiplier:1.5,edgeElasticity:.45,numIter:2500,seed:1},eventmodeling:{useMaxWidth:!0,padding:30,rowHeight:32},radar:{useMaxWidth:!0,width:600,height:600,marginTop:50,marginRight:50,marginBottom:50,marginLeft:50,axisScaleFactor:1,axisLabelFactor:1.05,curveTension:.17},venn:{useMaxWidth:!0,width:800,height:450,padding:8,useDebugLayout:!1},cynefin:{useMaxWidth:!0,width:800,height:600,padding:40,showDomainDescriptions:!0,boundaryAmplitude:8,seed:0},theme:"default",look:"classic",handDrawnSeed:0,layout:"dagre",maxTextSize:5e4,maxEdges:500,darkMode:!1,fontFamily:'"trebuchet ms", verdana, arial, sans-serif;',logLevel:5,securityLevel:"strict",startOnLoad:!0,arrowMarkerAbsolute:!1,secure:["secure","securityLevel","startOnLoad","maxTextSize","suppressErrorRendering","maxEdges"],legacyMathML:!1,forceLegacyMathML:!1,deterministicIds:!1,fontSize:16,markdownAutoWrap:!0,suppressErrorRendering:!1},yg={...Zt,deterministicIDSeed:void 0,elk:{mergeEdges:!1,nodePlacementStrategy:"BRANDES_KOEPF",forceNodeModelOrder:!1,considerModelOrder:"NODES_AND_EDGES"},themeCSS:void 0,themeVariables:hr.default.getThemeVariables(),sequence:{...Zt.sequence,messageFont:y(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont"),noteFont:y(function(){return{fontFamily:this.noteFontFamily,fontSize:this.noteFontSize,fontWeight:this.noteFontWeight}},"noteFont"),actorFont:y(function(){return{fontFamily:this.actorFontFamily,fontSize:this.actorFontSize,fontWeight:this.actorFontWeight}},"actorFont")},class:{hideEmptyMembersBox:!1,hierarchicalNamespaces:!0},gantt:{...Zt.gantt,tickInterval:void 0,useWidth:void 0},c4:{...Zt.c4,useWidth:void 0,personFont:y(function(){return{fontFamily:this.personFontFamily,fontSize:this.personFontSize,fontWeight:this.personFontWeight}},"personFont"),flowchart:{...Zt.flowchart,inheritDir:!1},external_personFont:y(function(){return{fontFamily:this.external_personFontFamily,fontSize:this.external_personFontSize,fontWeight:this.external_personFontWeight}},"external_personFont"),systemFont:y(function(){return{fontFamily:this.systemFontFamily,fontSize:this.systemFontSize,fontWeight:this.systemFontWeight}},"systemFont"),external_systemFont:y(function(){return{fontFamily:this.external_systemFontFamily,fontSize:this.external_systemFontSize,fontWeight:this.external_systemFontWeight}},"external_systemFont"),system_dbFont:y(function(){return{fontFamily:this.system_dbFontFamily,fontSize:this.system_dbFontSize,fontWeight:this.system_dbFontWeight}},"system_dbFont"),external_system_dbFont:y(function(){return{fontFamily:this.external_system_dbFontFamily,fontSize:this.external_system_dbFontSize,fontWeight:this.external_system_dbFontWeight}},"external_system_dbFont"),system_queueFont:y(function(){return{fontFamily:this.system_queueFontFamily,fontSize:this.system_queueFontSize,fontWeight:this.system_queueFontWeight}},"system_queueFont"),external_system_queueFont:y(function(){return{fontFamily:this.external_system_queueFontFamily,fontSize:this.external_system_queueFontSize,fontWeight:this.external_system_queueFontWeight}},"external_system_queueFont"),containerFont:y(function(){return{fontFamily:this.containerFontFamily,fontSize:this.containerFontSize,fontWeight:this.containerFontWeight}},"containerFont"),external_containerFont:y(function(){return{fontFamily:this.external_containerFontFamily,fontSize:this.external_containerFontSize,fontWeight:this.external_containerFontWeight}},"external_containerFont"),container_dbFont:y(function(){return{fontFamily:this.container_dbFontFamily,fontSize:this.container_dbFontSize,fontWeight:this.container_dbFontWeight}},"container_dbFont"),external_container_dbFont:y(function(){return{fontFamily:this.external_container_dbFontFamily,fontSize:this.external_container_dbFontSize,fontWeight:this.external_container_dbFontWeight}},"external_container_dbFont"),container_queueFont:y(function(){return{fontFamily:this.container_queueFontFamily,fontSize:this.container_queueFontSize,fontWeight:this.container_queueFontWeight}},"container_queueFont"),external_container_queueFont:y(function(){return{fontFamily:this.external_container_queueFontFamily,fontSize:this.external_container_queueFontSize,fontWeight:this.external_container_queueFontWeight}},"external_container_queueFont"),componentFont:y(function(){return{fontFamily:this.componentFontFamily,fontSize:this.componentFontSize,fontWeight:this.componentFontWeight}},"componentFont"),external_componentFont:y(function(){return{fontFamily:this.external_componentFontFamily,fontSize:this.external_componentFontSize,fontWeight:this.external_componentFontWeight}},"external_componentFont"),component_dbFont:y(function(){return{fontFamily:this.component_dbFontFamily,fontSize:this.component_dbFontSize,fontWeight:this.component_dbFontWeight}},"component_dbFont"),external_component_dbFont:y(function(){return{fontFamily:this.external_component_dbFontFamily,fontSize:this.external_component_dbFontSize,fontWeight:this.external_component_dbFontWeight}},"external_component_dbFont"),component_queueFont:y(function(){return{fontFamily:this.component_queueFontFamily,fontSize:this.component_queueFontSize,fontWeight:this.component_queueFontWeight}},"component_queueFont"),external_component_queueFont:y(function(){return{fontFamily:this.external_component_queueFontFamily,fontSize:this.external_component_queueFontSize,fontWeight:this.external_component_queueFontWeight}},"external_component_queueFont"),boundaryFont:y(function(){return{fontFamily:this.boundaryFontFamily,fontSize:this.boundaryFontSize,fontWeight:this.boundaryFontWeight}},"boundaryFont"),messageFont:y(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont")},pie:{...Zt.pie,useWidth:984},xyChart:{...Zt.xyChart,useWidth:void 0},requirement:{...Zt.requirement,useWidth:void 0},packet:{...Zt.packet},eventmodeling:{...Zt.eventmodeling},treeView:{...Zt.treeView,useWidth:void 0},radar:{...Zt.radar},railroad:{...Zt.railroad,fontSize:void 0,fontFamily:void 0,terminalFill:void 0,terminalStroke:void 0,terminalTextColor:void 0,nonTerminalFill:void 0,nonTerminalStroke:void 0,nonTerminalTextColor:void 0,lineColor:void 0,markerFill:void 0,commentFill:void 0,commentStroke:void 0,commentTextColor:void 0,specialFill:void 0,specialStroke:void 0,ruleNameColor:void 0},ishikawa:{...Zt.ishikawa},sankey:{...Zt.sankey,nodeColors:void 0},treemap:{useMaxWidth:!0,padding:10,diagramPadding:8,showValues:!0,nodeWidth:100,nodeHeight:40,borderWidth:1,valueFontSize:12,labelFontSize:14,valueFormat:","},venn:{...Zt.venn},cynefin:{...Zt.cynefin}},Cg=y((e,t="")=>Object.keys(e).reduce((r,i)=>Array.isArray(e[i])?r:typeof e[i]=="object"&&e[i]!==null?[...r,t+i,...Cg(e[i],"")]:[...r,t+i],[]),"keyify"),e_=new Set(Cg(yg,"")),xg=yg,r_={nodeColors:/^#[\da-f]{3,8}$|^rgb\([\d\s%,.]+\)$|^hsl\([\d\s%,.]+\)$|^[a-z]+$/i,filenameIcons:/^[\w-]+(?::[\w-]+)?$/,extensionIcons:/^[\w-]+(?::[\w-]+)?$/},i_=y((e,t)=>{for(const r of Object.keys(e)){const i=e[r];(r.startsWith("__")||r.includes("proto")||r.includes("constr")||typeof i!="string"||!t.test(i))&&(G.debug("sanitize deleting dictionary entry:",r,i),delete e[r])}},"sanitizeDictionaryConfig"),po=y(e=>{if(G.debug("sanitizeDirective called with",e),!(typeof e!="object"||e==null)){if(Array.isArray(e)){e.forEach(t=>po(t));return}for(const t of Object.keys(e)){if(G.debug("Checking key",t),t.startsWith("__")||t.includes("proto")||t.includes("constr")||!e_.has(t)||e[t]==null){G.debug("sanitize deleting key: ",t),delete e[t];continue}if(typeof e[t]=="object"){const i=r_[t];i?i_(e[t],i):(G.debug("sanitizing object",t),po(e[t]));continue}const r=["themeCSS","fontFamily","altFontFamily"];for(const i of r)t.includes(i)&&(G.debug("sanitizing css option",t),e[t]=bg(e[t]))}if(e.themeVariables)for(const t of Object.keys(e.themeVariables)){const r=e.themeVariables[t];r!=null&&r.match&&!r.match(/^[\d "#%(),.;A-Za-z]+$/)&&(e.themeVariables[t]="")}G.debug("After sanitization",e)}},"sanitizeDirective"),bg=y(e=>{let t=0,r=0;for(const i of e){if(t<r)return"{ /* ERROR: Unbalanced CSS */ }";i==="{"?t++:i==="}"&&r++}return t!==r?"{ /* ERROR: Unbalanced CSS */ }":e},"sanitizeCss"),Vi=Object.freeze(xg),Je=y(e=>!(e===!1||["false","null","0"].includes(String(e).trim().toLowerCase())),"evaluate"),Ce=Xt({},Vi),mo,Vr=[],Ea=Xt({},Vi),Ka=y((e,t)=>{let r=Xt({},e),i={};for(const a of t)Tg(a),i=Xt(i,a);if(r=Xt(r,i),i.theme&&i.theme in hr){const a=Xt({},mo),s=Xt(a.themeVariables||{},i.themeVariables);r.theme&&r.theme in hr&&(r.themeVariables=hr[r.theme].getThemeVariables(s))}return Ea=r,h_(Ea),Ea},"updateCurrentConfig"),a_=y(e=>(Ce=Xt({},Vi),Ce=Xt(Ce,e),e.theme&&hr[e.theme]&&(Ce.themeVariables=hr[e.theme].getThemeVariables(e.themeVariables)),Ka(Ce,Vr),Ce),"setSiteConfig"),s_=y(e=>{mo=Xt({},e)},"saveConfigFromInitialize"),o_=y(e=>(Ce=Xt(Ce,e),Ka(Ce,Vr),Ce),"updateSiteConfig"),kg=y(()=>Xt({},Ce),"getSiteConfig"),wg=y(e=>(Ka(Ea,[e]),It()),"setConfig"),It=y(()=>Xt({},Ea),"getConfig"),Tg=y(e=>{e&&(["secure",...Ce.secure??[]].forEach(t=>{Object.hasOwn(e,t)&&(G.debug(`Denied attempt to modify a secure key ${t}`,e[t]),delete e[t])}),Object.keys(e).forEach(t=>{t.startsWith("__")&&delete e[t]}),Object.keys(e).forEach(t=>{typeof e[t]=="string"&&(e[t].includes("<")||e[t].includes(">")||e[t].includes("url(data:"))&&delete e[t],typeof e[t]=="object"&&Tg(e[t])}))},"sanitize"),n_=y(e=>{var t;po(e),e.fontFamily&&!((t=e.themeVariables)!=null&&t.fontFamily)&&(e.themeVariables={...e.themeVariables,fontFamily:e.fontFamily}),Vr.push(e),Ka(Ce,Vr)},"addDirective"),yo=y((e=Ce)=>{Vr=[],Ka(e,Vr)},"reset"),l_={LAZY_LOAD_DEPRECATED:"The configuration options lazyLoadedDiagrams and loadExternalDiagramsAtStartup are deprecated. Please use registerExternalDiagrams instead.",FLOWCHART_HTML_LABELS_DEPRECATED:"flowchart.htmlLabels is deprecated. Please use global htmlLabels instead."},Gu={},Sg=y(e=>{Gu[e]||(G.warn(l_[e]),Gu[e]=!0)},"issueWarning"),h_=y(e=>{e&&(e.lazyLoadedDiagrams||e.loadExternalDiagramsAtStartup)&&Sg("LAZY_LOAD_DEPRECATED")},"checkConfig"),y3=y(()=>{let e={};mo&&(e=Xt(e,mo));for(const t of Vr)e=Xt(e,t);return e},"getUserDefinedConfig"),fe=y(e=>{var t,r;return((t=e.flowchart)==null?void 0:t.htmlLabels)!=null&&Sg("FLOWCHART_HTML_LABELS_DEPRECATED"),Je(e.htmlLabels??((r=e.flowchart)==null?void 0:r.htmlLabels)??!0)},"getEffectiveHtmlLabels"),_g=/^([^\S\n\r]*)-{3}\s*[\n\r](.*?)[\n\r]\1-{3}\s*[\n\r]+/s,$a=/%{2}{\s*(?:(\w+)\s*:|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,c_=/\s*%%.*\n/gm,qi,vg=(qi=class extends Error{constructor(t){super(t),this.name="UnknownDiagramError"}},y(qi,"UnknownDiagramError"),qi),Zr={},_h=y(function(e,t){e=e.replace(_g,"").replace($a,"").replace(c_,`
|
|
5
|
-
`);for(const[r,{detector:i}]of Object.entries(Zr))if(i(e,t))return r;throw new vg(`No diagram type detected matching given configuration for text: ${e}`)},"detectType"),bl=y((...e)=>{for(const{id:t,detector:r,loader:i}of e)Bg(t,r,i)},"registerLazyLoadedDiagrams"),Bg=y((e,t,r)=>{Zr[e]&&G.warn(`Detector with key ${e} already exists. Overwriting.`),Zr[e]={detector:t,loader:r},G.debug(`Detector with key ${e} added${r?" with loader":""}`)},"addDetector"),u_=y(e=>Zr[e].loader,"getDiagramLoader"),Ja=/<br\s*\/?>/gi,d_=y(e=>e?Mg(e).replace(/\\n/g,"#br#").split("#br#"):[""],"getRows"),f_=(()=>{let e=!1;return()=>{e||(Lg(),e=!0)}})();function Lg(){const e="data-temp-href-target";Hi.addHook("beforeSanitizeAttributes",t=>{t.tagName==="A"&&t.hasAttribute("target")&&t.setAttribute(e,t.getAttribute("target")??"")}),Hi.addHook("afterSanitizeAttributes",t=>{t.tagName==="A"&&t.hasAttribute(e)&&(t.setAttribute("target",t.getAttribute(e)??""),t.removeAttribute(e),t.getAttribute("target")==="_blank"&&t.setAttribute("rel","noopener"))})}y(Lg,"setupDompurifyHooks");var Fg=y(e=>(f_(),Hi.sanitize(e)),"removeScript"),Xu=y((e,t)=>{if(fe(t)){const r=t.securityLevel;r==="antiscript"||r==="strict"||r==="sandbox"?e=Fg(e):r!=="loose"&&(e=Mg(e),e=e.replace(/</g,"<").replace(/>/g,">"),e=e.replace(/=/g,"="),e=y_(e))}return e},"sanitizeMore"),Pe=y((e,t)=>e&&(t.dompurifyConfig?e=Hi.sanitize(Xu(e,t),t.dompurifyConfig).toString():e=Hi.sanitize(Xu(e,t),{FORBID_TAGS:["style"]}).toString(),e),"sanitizeText"),g_=y((e,t)=>typeof e=="string"?Pe(e,t):e.flat().map(r=>Pe(r,t)),"sanitizeTextOrArray"),p_=y(e=>Ja.test(e),"hasBreaks"),m_=y(e=>e.split(Ja),"splitBreaks"),y_=y(e=>e.replace(/#br#/g,"<br/>"),"placeholderToBreak"),Mg=y(e=>e.replace(Ja,"#br#"),"breakToPlaceholder"),C_=y(e=>{let t="";return e&&(t=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,t=CSS.escape(t)),t},"getUrl"),x_=y(function(...e){const t=e.filter(r=>!isNaN(r));return Math.max(...t)},"getMax"),b_=y(function(...e){const t=e.filter(r=>!isNaN(r));return Math.min(...t)},"getMin"),ju=y(function(e){const t=e.split(/(,)/),r=[];for(let i=0;i<t.length;i++){let a=t[i];if(a===","&&i>0&&i+1<t.length){const s=t[i-1],o=t[i+1];k_(s,o)&&(a=s+","+o,i++,r.pop())}r.push(w_(a))}return r.join("")},"parseGenericTypes"),kl=y((e,t)=>Math.max(0,e.split(t).length-1),"countOccurrence"),k_=y((e,t)=>{const r=kl(e,"~"),i=kl(t,"~");return r===1&&i===1},"shouldCombineSets"),w_=y(e=>{const t=kl(e,"~");let r=!1;if(t<=1)return e;t%2!==0&&e.startsWith("~")&&(e=e.substring(1),r=!0);const i=[...e];let a=i.indexOf("~"),s=i.lastIndexOf("~");for(;a!==-1&&s!==-1&&a!==s;)i[a]="<",i[s]=">",a=i.indexOf("~"),s=i.lastIndexOf("~");return r&&i.unshift("~"),i.join("")},"processSet"),Vu=y(()=>window.MathMLElement!==void 0,"isMathMLSupported"),wl=/\$\$(.*?)\$\$/g,qa=y(e=>{var t;return(((t=e.match(wl))==null?void 0:t.length)??0)>0},"hasKatex"),C3=y(async(e,t)=>{const r=document.createElement("div");r.innerHTML=await Ag(e,t),r.id="katex-temp",r.style.visibility="hidden",r.style.position="absolute",r.style.top="0";const i=document.querySelector("body");i==null||i.insertAdjacentElement("beforeend",r);const a={width:r.clientWidth,height:r.clientHeight};return r.remove(),a},"calculateMathMLDimensions"),T_=y(async(e,t)=>{if(!qa(e))return e;if(!(Vu()||t.legacyMathML||t.forceLegacyMathML))return e.replace(wl,"MathML is unsupported in this environment.");{const{default:r}=await kt(async()=>{const{default:a}=await import("./katex-C5jXJg4s.js");return{default:a}},[],import.meta.url),i=t.forceLegacyMathML||!Vu()&&t.legacyMathML?"htmlAndMathml":"mathml";return e.split(Ja).map(a=>qa(a)?`<div style="display: flex; align-items: center; justify-content: center; white-space: nowrap;">${a}</div>`:`<div>${a}</div>`).join("").replace(wl,(a,s)=>r.renderToString(s,{throwOnError:!0,displayMode:!0,output:i}).replace(/\n/g," ").replace(/<annotation.*<\/annotation>/g,""))}},"renderKatexUnsanitized"),Ag=y(async(e,t)=>Pe(await T_(e,t),t),"renderKatexSanitized"),ts={getRows:d_,sanitizeText:Pe,sanitizeTextOrArray:g_,hasBreaks:p_,splitBreaks:m_,lineBreakRegex:Ja,removeScript:Fg,getUrl:C_,evaluate:Je,getMax:x_,getMin:b_},S_=y(function(e,t){for(let r of t)e.attr(r[0],r[1])},"d3Attrs"),__=y(function(e,t,r){let i=new Map;return r?(i.set("width","100%"),i.set("style",`max-width: ${t}px;`)):(i.set("height",e),i.set("width",t)),i},"calculateSvgSizeAttrs"),Eg=y(function(e,t,r,i){const a=__(t,r,i);S_(e,a)},"configureSvgSize"),v_=y(function(e,t,r,i){const a=t.node().getBBox(),s=a.width,o=a.height;G.info(`SVG bounds: ${s}x${o}`,a);let n=0,l=0;G.info(`Graph bounds: ${n}x${l}`,e),n=s+r*2,l=o+r*2,G.info(`Calculated bounds: ${n}x${l}`),Eg(t,l,n,i);const h=`${a.x-r} ${a.y-r} ${a.width+2*r} ${a.height+2*r}`;t.attr("viewBox",h)},"setupGraphViewbox"),qs={};function Tl(e){return[...e.cssRules].map(t=>t.cssText).join(`
|
|
6
|
-
`)}y(Tl,"cssStyleSheetToString");var B_=y((e,t,r,i)=>{let a="";return e in qs&&qs[e]?a=qs[e]({...r,svgId:i}):G.warn(`No theme found for ${e}`),`& {
|
|
7
|
-
font-family: ${r.fontFamily};
|
|
8
|
-
font-size: ${r.fontSize};
|
|
9
|
-
fill: ${r.textColor}
|
|
10
|
-
}
|
|
11
|
-
@keyframes edge-animation-frame {
|
|
12
|
-
from {
|
|
13
|
-
stroke-dashoffset: 0;
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
@keyframes dash {
|
|
17
|
-
to {
|
|
18
|
-
stroke-dashoffset: 0;
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
& .edge-animation-slow {
|
|
22
|
-
stroke-dasharray: 9,5 !important;
|
|
23
|
-
stroke-dashoffset: 900;
|
|
24
|
-
animation: dash 50s linear infinite;
|
|
25
|
-
stroke-linecap: round;
|
|
26
|
-
}
|
|
27
|
-
& .edge-animation-fast {
|
|
28
|
-
stroke-dasharray: 9,5 !important;
|
|
29
|
-
stroke-dashoffset: 900;
|
|
30
|
-
animation: dash 20s linear infinite;
|
|
31
|
-
stroke-linecap: round;
|
|
32
|
-
}
|
|
33
|
-
/* Classes common for multiple diagrams */
|
|
34
|
-
|
|
35
|
-
& .error-icon {
|
|
36
|
-
fill: ${r.errorBkgColor};
|
|
37
|
-
}
|
|
38
|
-
& .error-text {
|
|
39
|
-
fill: ${r.errorTextColor};
|
|
40
|
-
stroke: ${r.errorTextColor};
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
& .edge-thickness-normal {
|
|
44
|
-
stroke-width: ${r.strokeWidth??1}px;
|
|
45
|
-
}
|
|
46
|
-
& .edge-thickness-thick {
|
|
47
|
-
stroke-width: 3.5px
|
|
48
|
-
}
|
|
49
|
-
& .edge-pattern-solid {
|
|
50
|
-
stroke-dasharray: 0;
|
|
51
|
-
}
|
|
52
|
-
& .edge-thickness-invisible {
|
|
53
|
-
stroke-width: 0;
|
|
54
|
-
fill: none;
|
|
55
|
-
}
|
|
56
|
-
& .edge-pattern-dashed{
|
|
57
|
-
stroke-dasharray: 3;
|
|
58
|
-
}
|
|
59
|
-
.edge-pattern-dotted {
|
|
60
|
-
stroke-dasharray: 2;
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
& .marker {
|
|
64
|
-
fill: ${r.lineColor};
|
|
65
|
-
stroke: ${r.lineColor};
|
|
66
|
-
}
|
|
67
|
-
& .marker.cross {
|
|
68
|
-
stroke: ${r.lineColor};
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
& svg {
|
|
72
|
-
font-family: ${r.fontFamily};
|
|
73
|
-
font-size: ${r.fontSize};
|
|
74
|
-
}
|
|
75
|
-
& p {
|
|
76
|
-
margin: 0
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
${a}
|
|
80
|
-
.node .neo-node {
|
|
81
|
-
stroke: ${r.nodeBorder};
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
[data-look="neo"].node rect, [data-look="neo"].cluster rect, [data-look="neo"].node polygon {
|
|
85
|
-
stroke: ${r.useGradient?"url("+i+"-gradient)":r.nodeBorder};
|
|
86
|
-
filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${i}-drop-shadow)`):"none"};
|
|
87
|
-
}
|
|
88
|
-
[data-look="neo"].swimlane.cluster rect {
|
|
89
|
-
filter: none;
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
[data-look="neo"].node path {
|
|
94
|
-
stroke: ${r.useGradient?"url("+i+"-gradient)":r.nodeBorder};
|
|
95
|
-
stroke-width: ${r.strokeWidth??1}px;
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
[data-look="neo"].node .outer-path {
|
|
99
|
-
filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${i}-drop-shadow)`):"none"};
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
[data-look="neo"].node .neo-line path {
|
|
103
|
-
stroke: ${r.nodeBorder};
|
|
104
|
-
filter: none;
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
[data-look="neo"].node circle{
|
|
108
|
-
stroke: ${r.useGradient?"url("+i+"-gradient)":r.nodeBorder};
|
|
109
|
-
filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${i}-drop-shadow)`):"none"};
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
[data-look="neo"].node circle .state-start{
|
|
113
|
-
fill: #000000;
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
[data-look="neo"].icon-shape .icon {
|
|
117
|
-
fill: ${r.useGradient?"url("+i+"-gradient)":r.nodeBorder};
|
|
118
|
-
filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${i}-drop-shadow)`):"none"};
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
[data-look="neo"].icon-shape .icon-neo path {
|
|
122
|
-
stroke: ${r.useGradient?"url("+i+"-gradient)":r.nodeBorder};
|
|
123
|
-
filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${i}-drop-shadow)`):"none"};
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
${t}
|
|
127
|
-
`},"getStyles"),L_=y((e,t)=>{t!==void 0&&(qs[e]=t)},"addStylesForDiagram"),F_=B_,$g={};TS($g,{clear:()=>M_,getAccDescription:()=>O_,getAccTitle:()=>E_,getDiagramTitle:()=>I_,setAccDescription:()=>$_,setAccTitle:()=>A_,setDiagramTitle:()=>D_});var vh="",Bh="",Lh="",Fh=y(e=>Pe(e,It()),"sanitizeText"),M_=y(()=>{vh="",Lh="",Bh=""},"clear"),A_=y(e=>{vh=Fh(e).replace(/^\s+/g,"")},"setAccTitle"),E_=y(()=>vh,"getAccTitle"),$_=y(e=>{Lh=Fh(e).replace(/\n\s+/g,`
|
|
128
|
-
`)},"setAccDescription"),O_=y(()=>Lh,"getAccDescription"),D_=y(e=>{Bh=Fh(e)},"setDiagramTitle"),I_=y(()=>Bh,"getDiagramTitle"),Zu=G,P_=Th,Bt=It,x3=wg,b3=Vi,Mh=y(e=>Pe(e,Bt()),"sanitizeText"),R_=v_,N_=y(()=>$g,"getCommonDb"),Co={},xo=y((e,t,r)=>{var i;Co[e]&&Zu.warn(`Diagram with id ${e} already registered. Overwriting.`),Co[e]=t,r&&Bg(e,r),L_(e,t.styles),(i=t.injectUtils)==null||i.call(t,Zu,P_,Bt,Mh,R_,N_(),()=>{})},"registerDiagram"),Sl=y(e=>{if(e in Co)return Co[e];throw new q_(e)},"getDiagram"),Wi,q_=(Wi=class extends Error{constructor(t){super(`Diagram ${t} not found.`)}},y(Wi,"DiagramNotFoundError"),Wi),W_=y(e=>{var a;const{securityLevel:t}=Bt();let r=wt("body");if(t==="sandbox"){const o=((a=wt(`#i${e}`).node())==null?void 0:a.contentDocument)??document;r=wt(o.body)}return r.select(`#${e}`)},"selectSvgElement");function Ah(e){return typeof e>"u"||e===null}y(Ah,"isNothing");function Og(e){return typeof e=="object"&&e!==null}y(Og,"isObject");function Dg(e){return Array.isArray(e)?e:Ah(e)?[]:[e]}y(Dg,"toArray");function Ig(e,t){var r,i,a,s;if(t)for(s=Object.keys(t),r=0,i=s.length;r<i;r+=1)a=s[r],e[a]=t[a];return e}y(Ig,"extend");function Pg(e,t){var r="",i;for(i=0;i<t;i+=1)r+=e;return r}y(Pg,"repeat");function Rg(e){return e===0&&Number.NEGATIVE_INFINITY===1/e}y(Rg,"isNegativeZero");var z_=Ah,H_=Og,U_=Dg,Y_=Pg,G_=Rg,X_=Ig,zt={isNothing:z_,isObject:H_,toArray:U_,repeat:Y_,isNegativeZero:G_,extend:X_};function Eh(e,t){var r="",i=e.reason||"(unknown reason)";return e.mark?(e.mark.name&&(r+='in "'+e.mark.name+'" '),r+="("+(e.mark.line+1)+":"+(e.mark.column+1)+")",!t&&e.mark.snippet&&(r+=`
|
|
129
|
-
|
|
130
|
-
`+e.mark.snippet),i+" "+r):i}y(Eh,"formatError");function Zi(e,t){Error.call(this),this.name="YAMLException",this.reason=e,this.mark=t,this.message=Eh(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}y(Zi,"YAMLException$1");Zi.prototype=Object.create(Error.prototype);Zi.prototype.constructor=Zi;Zi.prototype.toString=y(function(t){return this.name+": "+Eh(this,t)},"toString");var xe=Zi;function Ws(e,t,r,i,a){var s="",o="",n=Math.floor(a/2)-1;return i-t>n&&(s=" ... ",t=i-n+s.length),r-i>n&&(o=" ...",r=i+n-o.length),{str:s+e.slice(t,r).replace(/\t/g,"→")+o,pos:i-t+s.length}}y(Ws,"getLine");function zs(e,t){return zt.repeat(" ",t-e.length)+e}y(zs,"padStart");function Ng(e,t){if(t=Object.create(t||null),!e.buffer)return null;t.maxLength||(t.maxLength=79),typeof t.indent!="number"&&(t.indent=1),typeof t.linesBefore!="number"&&(t.linesBefore=3),typeof t.linesAfter!="number"&&(t.linesAfter=2);for(var r=/\r?\n|\r|\0/g,i=[0],a=[],s,o=-1;s=r.exec(e.buffer);)a.push(s.index),i.push(s.index+s[0].length),e.position<=s.index&&o<0&&(o=i.length-2);o<0&&(o=i.length-1);var n="",l,h,c=Math.min(e.line+t.linesAfter,a.length).toString().length,u=t.maxLength-(t.indent+c+3);for(l=1;l<=t.linesBefore&&!(o-l<0);l++)h=Ws(e.buffer,i[o-l],a[o-l],e.position-(i[o]-i[o-l]),u),n=zt.repeat(" ",t.indent)+zs((e.line-l+1).toString(),c)+" | "+h.str+`
|
|
131
|
-
`+n;for(h=Ws(e.buffer,i[o],a[o],e.position,u),n+=zt.repeat(" ",t.indent)+zs((e.line+1).toString(),c)+" | "+h.str+`
|
|
132
|
-
`,n+=zt.repeat("-",t.indent+c+3+h.pos)+`^
|
|
133
|
-
`,l=1;l<=t.linesAfter&&!(o+l>=a.length);l++)h=Ws(e.buffer,i[o+l],a[o+l],e.position-(i[o]-i[o+l]),u),n+=zt.repeat(" ",t.indent)+zs((e.line+l+1).toString(),c)+" | "+h.str+`
|
|
134
|
-
`;return n.replace(/\n$/,"")}y(Ng,"makeSnippet");var j_=Ng,V_=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],Z_=["scalar","sequence","mapping"];function qg(e){var t={};return e!==null&&Object.keys(e).forEach(function(r){e[r].forEach(function(i){t[String(i)]=r})}),t}y(qg,"compileStyleAliases");function Wg(e,t){if(t=t||{},Object.keys(t).forEach(function(r){if(V_.indexOf(r)===-1)throw new xe('Unknown option "'+r+'" is met in definition of "'+e+'" YAML type.')}),this.options=t,this.tag=e,this.kind=t.kind||null,this.resolve=t.resolve||function(){return!0},this.construct=t.construct||function(r){return r},this.instanceOf=t.instanceOf||null,this.predicate=t.predicate||null,this.represent=t.represent||null,this.representName=t.representName||null,this.defaultStyle=t.defaultStyle||null,this.multi=t.multi||!1,this.styleAliases=qg(t.styleAliases||null),Z_.indexOf(this.kind)===-1)throw new xe('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')}y(Wg,"Type$1");var le=Wg;function _l(e,t){var r=[];return e[t].forEach(function(i){var a=r.length;r.forEach(function(s,o){s.tag===i.tag&&s.kind===i.kind&&s.multi===i.multi&&(a=o)}),r[a]=i}),r}y(_l,"compileList");function zg(){var e={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}},t,r;function i(a){a.multi?(e.multi[a.kind].push(a),e.multi.fallback.push(a)):e[a.kind][a.tag]=e.fallback[a.tag]=a}for(y(i,"collectType"),t=0,r=arguments.length;t<r;t+=1)arguments[t].forEach(i);return e}y(zg,"compileMap");function bo(e){return this.extend(e)}y(bo,"Schema$1");bo.prototype.extend=y(function(t){var r=[],i=[];if(t instanceof le)i.push(t);else if(Array.isArray(t))i=i.concat(t);else if(t&&(Array.isArray(t.implicit)||Array.isArray(t.explicit)))t.implicit&&(r=r.concat(t.implicit)),t.explicit&&(i=i.concat(t.explicit));else throw new xe("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");r.forEach(function(s){if(!(s instanceof le))throw new xe("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(s.loadKind&&s.loadKind!=="scalar")throw new xe("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(s.multi)throw new xe("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),i.forEach(function(s){if(!(s instanceof le))throw new xe("Specified list of YAML types (or a single Type object) contains a non-Type object.")});var a=Object.create(bo.prototype);return a.implicit=(this.implicit||[]).concat(r),a.explicit=(this.explicit||[]).concat(i),a.compiledImplicit=_l(a,"implicit"),a.compiledExplicit=_l(a,"explicit"),a.compiledTypeMap=zg(a.compiledImplicit,a.compiledExplicit),a},"extend");var Q_=bo,K_=new le("tag:yaml.org,2002:str",{kind:"scalar",construct:y(function(e){return e!==null?e:""},"construct")}),J_=new le("tag:yaml.org,2002:seq",{kind:"sequence",construct:y(function(e){return e!==null?e:[]},"construct")}),tv=new le("tag:yaml.org,2002:map",{kind:"mapping",construct:y(function(e){return e!==null?e:{}},"construct")}),ev=new Q_({explicit:[K_,J_,tv]});function Hg(e){if(e===null)return!0;var t=e.length;return t===1&&e==="~"||t===4&&(e==="null"||e==="Null"||e==="NULL")}y(Hg,"resolveYamlNull");function Ug(){return null}y(Ug,"constructYamlNull");function Yg(e){return e===null}y(Yg,"isNull");var rv=new le("tag:yaml.org,2002:null",{kind:"scalar",resolve:Hg,construct:Ug,predicate:Yg,represent:{canonical:y(function(){return"~"},"canonical"),lowercase:y(function(){return"null"},"lowercase"),uppercase:y(function(){return"NULL"},"uppercase"),camelcase:y(function(){return"Null"},"camelcase"),empty:y(function(){return""},"empty")},defaultStyle:"lowercase"});function Gg(e){if(e===null)return!1;var t=e.length;return t===4&&(e==="true"||e==="True"||e==="TRUE")||t===5&&(e==="false"||e==="False"||e==="FALSE")}y(Gg,"resolveYamlBoolean");function Xg(e){return e==="true"||e==="True"||e==="TRUE"}y(Xg,"constructYamlBoolean");function jg(e){return Object.prototype.toString.call(e)==="[object Boolean]"}y(jg,"isBoolean");var iv=new le("tag:yaml.org,2002:bool",{kind:"scalar",resolve:Gg,construct:Xg,predicate:jg,represent:{lowercase:y(function(e){return e?"true":"false"},"lowercase"),uppercase:y(function(e){return e?"TRUE":"FALSE"},"uppercase"),camelcase:y(function(e){return e?"True":"False"},"camelcase")},defaultStyle:"lowercase"});function Vg(e){return 48<=e&&e<=57||65<=e&&e<=70||97<=e&&e<=102}y(Vg,"isHexCode");function Zg(e){return 48<=e&&e<=55}y(Zg,"isOctCode");function Qg(e){return 48<=e&&e<=57}y(Qg,"isDecCode");function Kg(e){if(e===null)return!1;var t=e.length,r=0,i=!1,a;if(!t)return!1;if(a=e[r],(a==="-"||a==="+")&&(a=e[++r]),a==="0"){if(r+1===t)return!0;if(a=e[++r],a==="b"){for(r++;r<t;r++)if(a=e[r],a!=="_"){if(a!=="0"&&a!=="1")return!1;i=!0}return i&&a!=="_"}if(a==="x"){for(r++;r<t;r++)if(a=e[r],a!=="_"){if(!Vg(e.charCodeAt(r)))return!1;i=!0}return i&&a!=="_"}if(a==="o"){for(r++;r<t;r++)if(a=e[r],a!=="_"){if(!Zg(e.charCodeAt(r)))return!1;i=!0}return i&&a!=="_"}}if(a==="_")return!1;for(;r<t;r++)if(a=e[r],a!=="_"){if(!Qg(e.charCodeAt(r)))return!1;i=!0}return!(!i||a==="_")}y(Kg,"resolveYamlInteger");function Jg(e){var t=e,r=1,i;if(t.indexOf("_")!==-1&&(t=t.replace(/_/g,"")),i=t[0],(i==="-"||i==="+")&&(i==="-"&&(r=-1),t=t.slice(1),i=t[0]),t==="0")return 0;if(i==="0"){if(t[1]==="b")return r*parseInt(t.slice(2),2);if(t[1]==="x")return r*parseInt(t.slice(2),16);if(t[1]==="o")return r*parseInt(t.slice(2),8)}return r*parseInt(t,10)}y(Jg,"constructYamlInteger");function tp(e){return Object.prototype.toString.call(e)==="[object Number]"&&e%1===0&&!zt.isNegativeZero(e)}y(tp,"isInteger");var av=new le("tag:yaml.org,2002:int",{kind:"scalar",resolve:Kg,construct:Jg,predicate:tp,represent:{binary:y(function(e){return e>=0?"0b"+e.toString(2):"-0b"+e.toString(2).slice(1)},"binary"),octal:y(function(e){return e>=0?"0o"+e.toString(8):"-0o"+e.toString(8).slice(1)},"octal"),decimal:y(function(e){return e.toString(10)},"decimal"),hexadecimal:y(function(e){return e>=0?"0x"+e.toString(16).toUpperCase():"-0x"+e.toString(16).toUpperCase().slice(1)},"hexadecimal")},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),sv=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function ep(e){return!(e===null||!sv.test(e)||e[e.length-1]==="_")}y(ep,"resolveYamlFloat");function rp(e){var t,r;return t=e.replace(/_/g,"").toLowerCase(),r=t[0]==="-"?-1:1,"+-".indexOf(t[0])>=0&&(t=t.slice(1)),t===".inf"?r===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:t===".nan"?NaN:r*parseFloat(t,10)}y(rp,"constructYamlFloat");var ov=/^[-+]?[0-9]+e/;function ip(e,t){var r;if(isNaN(e))switch(t){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===e)switch(t){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===e)switch(t){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(zt.isNegativeZero(e))return"-0.0";return r=e.toString(10),ov.test(r)?r.replace("e",".e"):r}y(ip,"representYamlFloat");function ap(e){return Object.prototype.toString.call(e)==="[object Number]"&&(e%1!==0||zt.isNegativeZero(e))}y(ap,"isFloat");var nv=new le("tag:yaml.org,2002:float",{kind:"scalar",resolve:ep,construct:rp,predicate:ap,represent:ip,defaultStyle:"lowercase"}),sp=ev.extend({implicit:[rv,iv,av,nv]}),lv=sp,op=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),np=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");function lp(e){return e===null?!1:op.exec(e)!==null||np.exec(e)!==null}y(lp,"resolveYamlTimestamp");function hp(e){var t,r,i,a,s,o,n,l=0,h=null,c,u,f;if(t=op.exec(e),t===null&&(t=np.exec(e)),t===null)throw new Error("Date resolve error");if(r=+t[1],i=+t[2]-1,a=+t[3],!t[4])return new Date(Date.UTC(r,i,a));if(s=+t[4],o=+t[5],n=+t[6],t[7]){for(l=t[7].slice(0,3);l.length<3;)l+="0";l=+l}return t[9]&&(c=+t[10],u=+(t[11]||0),h=(c*60+u)*6e4,t[9]==="-"&&(h=-h)),f=new Date(Date.UTC(r,i,a,s,o,n,l)),h&&f.setTime(f.getTime()-h),f}y(hp,"constructYamlTimestamp");function cp(e){return e.toISOString()}y(cp,"representYamlTimestamp");var hv=new le("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:lp,construct:hp,instanceOf:Date,represent:cp});function up(e){return e==="<<"||e===null}y(up,"resolveYamlMerge");var cv=new le("tag:yaml.org,2002:merge",{kind:"scalar",resolve:up}),$h=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
|
|
135
|
-
\r`;function dp(e){if(e===null)return!1;var t,r,i=0,a=e.length,s=$h;for(r=0;r<a;r++)if(t=s.indexOf(e.charAt(r)),!(t>64)){if(t<0)return!1;i+=6}return i%8===0}y(dp,"resolveYamlBinary");function fp(e){var t,r,i=e.replace(/[\r\n=]/g,""),a=i.length,s=$h,o=0,n=[];for(t=0;t<a;t++)t%4===0&&t&&(n.push(o>>16&255),n.push(o>>8&255),n.push(o&255)),o=o<<6|s.indexOf(i.charAt(t));return r=a%4*6,r===0?(n.push(o>>16&255),n.push(o>>8&255),n.push(o&255)):r===18?(n.push(o>>10&255),n.push(o>>2&255)):r===12&&n.push(o>>4&255),new Uint8Array(n)}y(fp,"constructYamlBinary");function gp(e){var t="",r=0,i,a,s=e.length,o=$h;for(i=0;i<s;i++)i%3===0&&i&&(t+=o[r>>18&63],t+=o[r>>12&63],t+=o[r>>6&63],t+=o[r&63]),r=(r<<8)+e[i];return a=s%3,a===0?(t+=o[r>>18&63],t+=o[r>>12&63],t+=o[r>>6&63],t+=o[r&63]):a===2?(t+=o[r>>10&63],t+=o[r>>4&63],t+=o[r<<2&63],t+=o[64]):a===1&&(t+=o[r>>2&63],t+=o[r<<4&63],t+=o[64],t+=o[64]),t}y(gp,"representYamlBinary");function pp(e){return Object.prototype.toString.call(e)==="[object Uint8Array]"}y(pp,"isBinary");var uv=new le("tag:yaml.org,2002:binary",{kind:"scalar",resolve:dp,construct:fp,predicate:pp,represent:gp}),dv=Object.prototype.hasOwnProperty,fv=Object.prototype.toString;function mp(e){if(e===null)return!0;var t=[],r,i,a,s,o,n=e;for(r=0,i=n.length;r<i;r+=1){if(a=n[r],o=!1,fv.call(a)!=="[object Object]")return!1;for(s in a)if(dv.call(a,s))if(!o)o=!0;else return!1;if(!o)return!1;if(t.indexOf(s)===-1)t.push(s);else return!1}return!0}y(mp,"resolveYamlOmap");function yp(e){return e!==null?e:[]}y(yp,"constructYamlOmap");var gv=new le("tag:yaml.org,2002:omap",{kind:"sequence",resolve:mp,construct:yp}),pv=Object.prototype.toString;function Cp(e){if(e===null)return!0;var t,r,i,a,s,o=e;for(s=new Array(o.length),t=0,r=o.length;t<r;t+=1){if(i=o[t],pv.call(i)!=="[object Object]"||(a=Object.keys(i),a.length!==1))return!1;s[t]=[a[0],i[a[0]]]}return!0}y(Cp,"resolveYamlPairs");function xp(e){if(e===null)return[];var t,r,i,a,s,o=e;for(s=new Array(o.length),t=0,r=o.length;t<r;t+=1)i=o[t],a=Object.keys(i),s[t]=[a[0],i[a[0]]];return s}y(xp,"constructYamlPairs");var mv=new le("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:Cp,construct:xp}),yv=Object.prototype.hasOwnProperty;function bp(e){if(e===null)return!0;var t,r=e;for(t in r)if(yv.call(r,t)&&r[t]!==null)return!1;return!0}y(bp,"resolveYamlSet");function kp(e){return e!==null?e:{}}y(kp,"constructYamlSet");var Cv=new le("tag:yaml.org,2002:set",{kind:"mapping",resolve:bp,construct:kp}),wp=lv.extend({implicit:[hv,cv],explicit:[uv,gv,mv,Cv]}),Lr=Object.prototype.hasOwnProperty,ko=1,Tp=2,Sp=3,wo=4,Hn=1,xv=2,Qu=3,bv=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,kv=/[\x85\u2028\u2029]/,wv=/[,\[\]\{\}]/,_p=/^(?:!|!!|![a-z\-]+!)$/i,vp=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function vl(e){return Object.prototype.toString.call(e)}y(vl,"_class");function Oe(e){return e===10||e===13}y(Oe,"is_EOL");function vr(e){return e===9||e===32}y(vr,"is_WHITE_SPACE");function ue(e){return e===9||e===32||e===10||e===13}y(ue,"is_WS_OR_EOL");function zr(e){return e===44||e===91||e===93||e===123||e===125}y(zr,"is_FLOW_INDICATOR");function Bp(e){var t;return 48<=e&&e<=57?e-48:(t=e|32,97<=t&&t<=102?t-97+10:-1)}y(Bp,"fromHexCode");function Lp(e){return e===120?2:e===117?4:e===85?8:0}y(Lp,"escapedHexLen");function Fp(e){return 48<=e&&e<=57?e-48:-1}y(Fp,"fromDecimalCode");function Bl(e){return e===48?"\0":e===97?"\x07":e===98?"\b":e===116||e===9?" ":e===110?`
|
|
136
|
-
`:e===118?"\v":e===102?"\f":e===114?"\r":e===101?"\x1B":e===32?" ":e===34?'"':e===47?"/":e===92?"\\":e===78?"
":e===95?" ":e===76?"\u2028":e===80?"\u2029":""}y(Bl,"simpleEscapeSequence");function Mp(e){return e<=65535?String.fromCharCode(e):String.fromCharCode((e-65536>>10)+55296,(e-65536&1023)+56320)}y(Mp,"charFromCodepoint");function Oh(e,t,r){t==="__proto__"?Object.defineProperty(e,t,{configurable:!0,enumerable:!0,writable:!0,value:r}):e[t]=r}y(Oh,"setProperty");var Ap=new Array(256),Ep=new Array(256);for(Ir=0;Ir<256;Ir++)Ap[Ir]=Bl(Ir)?1:0,Ep[Ir]=Bl(Ir);var Ir;function $p(e,t){this.input=e,this.filename=t.filename||null,this.schema=t.schema||wp,this.onWarning=t.onWarning||null,this.legacy=t.legacy||!1,this.json=t.json||!1,this.listener=t.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=e.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.firstTabInLine=-1,this.documents=[]}y($p,"State$1");function Dh(e,t){var r={name:e.filename,buffer:e.input.slice(0,-1),position:e.position,line:e.line,column:e.position-e.lineStart};return r.snippet=j_(r),new xe(t,r)}y(Dh,"generateError");function ct(e,t){throw Dh(e,t)}y(ct,"throwError");function Wa(e,t){e.onWarning&&e.onWarning.call(null,Dh(e,t))}y(Wa,"throwWarning");var Ku={YAML:y(function(t,r,i){var a,s,o;t.version!==null&&ct(t,"duplication of %YAML directive"),i.length!==1&&ct(t,"YAML directive accepts exactly one argument"),a=/^([0-9]+)\.([0-9]+)$/.exec(i[0]),a===null&&ct(t,"ill-formed argument of the YAML directive"),s=parseInt(a[1],10),o=parseInt(a[2],10),s!==1&&ct(t,"unacceptable YAML version of the document"),t.version=i[0],t.checkLineBreaks=o<2,o!==1&&o!==2&&Wa(t,"unsupported YAML version of the document")},"handleYamlDirective"),TAG:y(function(t,r,i){var a,s;i.length!==2&&ct(t,"TAG directive accepts exactly two arguments"),a=i[0],s=i[1],_p.test(a)||ct(t,"ill-formed tag handle (first argument) of the TAG directive"),Lr.call(t.tagMap,a)&&ct(t,'there is a previously declared suffix for "'+a+'" tag handle'),vp.test(s)||ct(t,"ill-formed tag prefix (second argument) of the TAG directive");try{s=decodeURIComponent(s)}catch{ct(t,"tag prefix is malformed: "+s)}t.tagMap[a]=s},"handleTagDirective")};function cr(e,t,r,i){var a,s,o,n;if(t<r){if(n=e.input.slice(t,r),i)for(a=0,s=n.length;a<s;a+=1)o=n.charCodeAt(a),o===9||32<=o&&o<=1114111||ct(e,"expected valid JSON character");else bv.test(n)&&ct(e,"the stream contains non-printable characters");e.result+=n}}y(cr,"captureSegment");function Ll(e,t,r,i){var a,s,o,n;for(zt.isObject(r)||ct(e,"cannot merge mappings; the provided source object is unacceptable"),a=Object.keys(r),o=0,n=a.length;o<n;o+=1)s=a[o],Lr.call(t,s)||(Oh(t,s,r[s]),i[s]=!0)}y(Ll,"mergeMappings");function Hr(e,t,r,i,a,s,o,n,l){var h,c;if(Array.isArray(a))for(a=Array.prototype.slice.call(a),h=0,c=a.length;h<c;h+=1)Array.isArray(a[h])&&ct(e,"nested arrays are not supported inside keys"),typeof a=="object"&&vl(a[h])==="[object Object]"&&(a[h]="[object Object]");if(typeof a=="object"&&vl(a)==="[object Object]"&&(a="[object Object]"),a=String(a),t===null&&(t={}),i==="tag:yaml.org,2002:merge")if(Array.isArray(s))for(h=0,c=s.length;h<c;h+=1)Ll(e,t,s[h],r);else Ll(e,t,s,r);else!e.json&&!Lr.call(r,a)&&Lr.call(t,a)&&(e.line=o||e.line,e.lineStart=n||e.lineStart,e.position=l||e.position,ct(e,"duplicated mapping key")),Oh(t,a,s),delete r[a];return t}y(Hr,"storeMappingPair");function Xo(e){var t;t=e.input.charCodeAt(e.position),t===10?e.position++:t===13?(e.position++,e.input.charCodeAt(e.position)===10&&e.position++):ct(e,"a line break is expected"),e.line+=1,e.lineStart=e.position,e.firstTabInLine=-1}y(Xo,"readLineBreak");function Nt(e,t,r){for(var i=0,a=e.input.charCodeAt(e.position);a!==0;){for(;vr(a);)a===9&&e.firstTabInLine===-1&&(e.firstTabInLine=e.position),a=e.input.charCodeAt(++e.position);if(t&&a===35)do a=e.input.charCodeAt(++e.position);while(a!==10&&a!==13&&a!==0);if(Oe(a))for(Xo(e),a=e.input.charCodeAt(e.position),i++,e.lineIndent=0;a===32;)e.lineIndent++,a=e.input.charCodeAt(++e.position);else break}return r!==-1&&i!==0&&e.lineIndent<r&&Wa(e,"deficient indentation"),i}y(Nt,"skipSeparationSpace");function es(e){var t=e.position,r;return r=e.input.charCodeAt(t),!!((r===45||r===46)&&r===e.input.charCodeAt(t+1)&&r===e.input.charCodeAt(t+2)&&(t+=3,r=e.input.charCodeAt(t),r===0||ue(r)))}y(es,"testDocumentSeparator");function jo(e,t){t===1?e.result+=" ":t>1&&(e.result+=zt.repeat(`
|
|
137
|
-
`,t-1))}y(jo,"writeFoldedLines");function Op(e,t,r){var i,a,s,o,n,l,h,c,u=e.kind,f=e.result,d;if(d=e.input.charCodeAt(e.position),ue(d)||zr(d)||d===35||d===38||d===42||d===33||d===124||d===62||d===39||d===34||d===37||d===64||d===96||(d===63||d===45)&&(a=e.input.charCodeAt(e.position+1),ue(a)||r&&zr(a)))return!1;for(e.kind="scalar",e.result="",s=o=e.position,n=!1;d!==0;){if(d===58){if(a=e.input.charCodeAt(e.position+1),ue(a)||r&&zr(a))break}else if(d===35){if(i=e.input.charCodeAt(e.position-1),ue(i))break}else{if(e.position===e.lineStart&&es(e)||r&&zr(d))break;if(Oe(d))if(l=e.line,h=e.lineStart,c=e.lineIndent,Nt(e,!1,-1),e.lineIndent>=t){n=!0,d=e.input.charCodeAt(e.position);continue}else{e.position=o,e.line=l,e.lineStart=h,e.lineIndent=c;break}}n&&(cr(e,s,o,!1),jo(e,e.line-l),s=o=e.position,n=!1),vr(d)||(o=e.position+1),d=e.input.charCodeAt(++e.position)}return cr(e,s,o,!1),e.result?!0:(e.kind=u,e.result=f,!1)}y(Op,"readPlainScalar");function Dp(e,t){var r,i,a;if(r=e.input.charCodeAt(e.position),r!==39)return!1;for(e.kind="scalar",e.result="",e.position++,i=a=e.position;(r=e.input.charCodeAt(e.position))!==0;)if(r===39)if(cr(e,i,e.position,!0),r=e.input.charCodeAt(++e.position),r===39)i=e.position,e.position++,a=e.position;else return!0;else Oe(r)?(cr(e,i,a,!0),jo(e,Nt(e,!1,t)),i=a=e.position):e.position===e.lineStart&&es(e)?ct(e,"unexpected end of the document within a single quoted scalar"):(e.position++,a=e.position);ct(e,"unexpected end of the stream within a single quoted scalar")}y(Dp,"readSingleQuotedScalar");function Ip(e,t){var r,i,a,s,o,n;if(n=e.input.charCodeAt(e.position),n!==34)return!1;for(e.kind="scalar",e.result="",e.position++,r=i=e.position;(n=e.input.charCodeAt(e.position))!==0;){if(n===34)return cr(e,r,e.position,!0),e.position++,!0;if(n===92){if(cr(e,r,e.position,!0),n=e.input.charCodeAt(++e.position),Oe(n))Nt(e,!1,t);else if(n<256&&Ap[n])e.result+=Ep[n],e.position++;else if((o=Lp(n))>0){for(a=o,s=0;a>0;a--)n=e.input.charCodeAt(++e.position),(o=Bp(n))>=0?s=(s<<4)+o:ct(e,"expected hexadecimal character");e.result+=Mp(s),e.position++}else ct(e,"unknown escape sequence");r=i=e.position}else Oe(n)?(cr(e,r,i,!0),jo(e,Nt(e,!1,t)),r=i=e.position):e.position===e.lineStart&&es(e)?ct(e,"unexpected end of the document within a double quoted scalar"):(e.position++,i=e.position)}ct(e,"unexpected end of the stream within a double quoted scalar")}y(Ip,"readDoubleQuotedScalar");function Pp(e,t){var r=!0,i,a,s,o=e.tag,n,l=e.anchor,h,c,u,f,d,g=Object.create(null),p,m,C,x;if(x=e.input.charCodeAt(e.position),x===91)c=93,d=!1,n=[];else if(x===123)c=125,d=!0,n={};else return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=n),x=e.input.charCodeAt(++e.position);x!==0;){if(Nt(e,!0,t),x=e.input.charCodeAt(e.position),x===c)return e.position++,e.tag=o,e.anchor=l,e.kind=d?"mapping":"sequence",e.result=n,!0;r?x===44&&ct(e,"expected the node content, but found ','"):ct(e,"missed comma between flow collection entries"),m=p=C=null,u=f=!1,x===63&&(h=e.input.charCodeAt(e.position+1),ue(h)&&(u=f=!0,e.position++,Nt(e,!0,t))),i=e.line,a=e.lineStart,s=e.position,Qr(e,t,ko,!1,!0),m=e.tag,p=e.result,Nt(e,!0,t),x=e.input.charCodeAt(e.position),(f||e.line===i)&&x===58&&(u=!0,x=e.input.charCodeAt(++e.position),Nt(e,!0,t),Qr(e,t,ko,!1,!0),C=e.result),d?Hr(e,n,g,m,p,C,i,a,s):u?n.push(Hr(e,null,g,m,p,C,i,a,s)):n.push(p),Nt(e,!0,t),x=e.input.charCodeAt(e.position),x===44?(r=!0,x=e.input.charCodeAt(++e.position)):r=!1}ct(e,"unexpected end of the stream within a flow collection")}y(Pp,"readFlowCollection");function Rp(e,t){var r,i,a=Hn,s=!1,o=!1,n=t,l=0,h=!1,c,u;if(u=e.input.charCodeAt(e.position),u===124)i=!1;else if(u===62)i=!0;else return!1;for(e.kind="scalar",e.result="";u!==0;)if(u=e.input.charCodeAt(++e.position),u===43||u===45)Hn===a?a=u===43?Qu:xv:ct(e,"repeat of a chomping mode identifier");else if((c=Fp(u))>=0)c===0?ct(e,"bad explicit indentation width of a block scalar; it cannot be less than one"):o?ct(e,"repeat of an indentation width identifier"):(n=t+c-1,o=!0);else break;if(vr(u)){do u=e.input.charCodeAt(++e.position);while(vr(u));if(u===35)do u=e.input.charCodeAt(++e.position);while(!Oe(u)&&u!==0)}for(;u!==0;){for(Xo(e),e.lineIndent=0,u=e.input.charCodeAt(e.position);(!o||e.lineIndent<n)&&u===32;)e.lineIndent++,u=e.input.charCodeAt(++e.position);if(!o&&e.lineIndent>n&&(n=e.lineIndent),Oe(u)){l++;continue}if(e.lineIndent<n){a===Qu?e.result+=zt.repeat(`
|
|
138
|
-
`,s?1+l:l):a===Hn&&s&&(e.result+=`
|
|
139
|
-
`);break}for(i?vr(u)?(h=!0,e.result+=zt.repeat(`
|
|
140
|
-
`,s?1+l:l)):h?(h=!1,e.result+=zt.repeat(`
|
|
141
|
-
`,l+1)):l===0?s&&(e.result+=" "):e.result+=zt.repeat(`
|
|
142
|
-
`,l):e.result+=zt.repeat(`
|
|
143
|
-
`,s?1+l:l),s=!0,o=!0,l=0,r=e.position;!Oe(u)&&u!==0;)u=e.input.charCodeAt(++e.position);cr(e,r,e.position,!1)}return!0}y(Rp,"readBlockScalar");function Fl(e,t){var r,i=e.tag,a=e.anchor,s=[],o,n=!1,l;if(e.firstTabInLine!==-1)return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=s),l=e.input.charCodeAt(e.position);l!==0&&(e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,ct(e,"tab characters must not be used in indentation")),!(l!==45||(o=e.input.charCodeAt(e.position+1),!ue(o))));){if(n=!0,e.position++,Nt(e,!0,-1)&&e.lineIndent<=t){s.push(null),l=e.input.charCodeAt(e.position);continue}if(r=e.line,Qr(e,t,Sp,!1,!0),s.push(e.result),Nt(e,!0,-1),l=e.input.charCodeAt(e.position),(e.line===r||e.lineIndent>t)&&l!==0)ct(e,"bad indentation of a sequence entry");else if(e.lineIndent<t)break}return n?(e.tag=i,e.anchor=a,e.kind="sequence",e.result=s,!0):!1}y(Fl,"readBlockSequence");function Np(e,t,r){var i,a,s,o,n,l,h=e.tag,c=e.anchor,u={},f=Object.create(null),d=null,g=null,p=null,m=!1,C=!1,x;if(e.firstTabInLine!==-1)return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=u),x=e.input.charCodeAt(e.position);x!==0;){if(!m&&e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,ct(e,"tab characters must not be used in indentation")),i=e.input.charCodeAt(e.position+1),s=e.line,(x===63||x===58)&&ue(i))x===63?(m&&(Hr(e,u,f,d,g,null,o,n,l),d=g=p=null),C=!0,m=!0,a=!0):m?(m=!1,a=!0):ct(e,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),e.position+=1,x=i;else{if(o=e.line,n=e.lineStart,l=e.position,!Qr(e,r,Tp,!1,!0))break;if(e.line===s){for(x=e.input.charCodeAt(e.position);vr(x);)x=e.input.charCodeAt(++e.position);if(x===58)x=e.input.charCodeAt(++e.position),ue(x)||ct(e,"a whitespace character is expected after the key-value separator within a block mapping"),m&&(Hr(e,u,f,d,g,null,o,n,l),d=g=p=null),C=!0,m=!1,a=!1,d=e.tag,g=e.result;else if(C)ct(e,"can not read an implicit mapping pair; a colon is missed");else return e.tag=h,e.anchor=c,!0}else if(C)ct(e,"can not read a block mapping entry; a multiline key may not be an implicit key");else return e.tag=h,e.anchor=c,!0}if((e.line===s||e.lineIndent>t)&&(m&&(o=e.line,n=e.lineStart,l=e.position),Qr(e,t,wo,!0,a)&&(m?g=e.result:p=e.result),m||(Hr(e,u,f,d,g,p,o,n,l),d=g=p=null),Nt(e,!0,-1),x=e.input.charCodeAt(e.position)),(e.line===s||e.lineIndent>t)&&x!==0)ct(e,"bad indentation of a mapping entry");else if(e.lineIndent<t)break}return m&&Hr(e,u,f,d,g,null,o,n,l),C&&(e.tag=h,e.anchor=c,e.kind="mapping",e.result=u),C}y(Np,"readBlockMapping");function qp(e){var t,r=!1,i=!1,a,s,o;if(o=e.input.charCodeAt(e.position),o!==33)return!1;if(e.tag!==null&&ct(e,"duplication of a tag property"),o=e.input.charCodeAt(++e.position),o===60?(r=!0,o=e.input.charCodeAt(++e.position)):o===33?(i=!0,a="!!",o=e.input.charCodeAt(++e.position)):a="!",t=e.position,r){do o=e.input.charCodeAt(++e.position);while(o!==0&&o!==62);e.position<e.length?(s=e.input.slice(t,e.position),o=e.input.charCodeAt(++e.position)):ct(e,"unexpected end of the stream within a verbatim tag")}else{for(;o!==0&&!ue(o);)o===33&&(i?ct(e,"tag suffix cannot contain exclamation marks"):(a=e.input.slice(t-1,e.position+1),_p.test(a)||ct(e,"named tag handle cannot contain such characters"),i=!0,t=e.position+1)),o=e.input.charCodeAt(++e.position);s=e.input.slice(t,e.position),wv.test(s)&&ct(e,"tag suffix cannot contain flow indicator characters")}s&&!vp.test(s)&&ct(e,"tag name cannot contain such characters: "+s);try{s=decodeURIComponent(s)}catch{ct(e,"tag name is malformed: "+s)}return r?e.tag=s:Lr.call(e.tagMap,a)?e.tag=e.tagMap[a]+s:a==="!"?e.tag="!"+s:a==="!!"?e.tag="tag:yaml.org,2002:"+s:ct(e,'undeclared tag handle "'+a+'"'),!0}y(qp,"readTagProperty");function Wp(e){var t,r;if(r=e.input.charCodeAt(e.position),r!==38)return!1;for(e.anchor!==null&&ct(e,"duplication of an anchor property"),r=e.input.charCodeAt(++e.position),t=e.position;r!==0&&!ue(r)&&!zr(r);)r=e.input.charCodeAt(++e.position);return e.position===t&&ct(e,"name of an anchor node must contain at least one character"),e.anchor=e.input.slice(t,e.position),!0}y(Wp,"readAnchorProperty");function zp(e){var t,r,i;if(i=e.input.charCodeAt(e.position),i!==42)return!1;for(i=e.input.charCodeAt(++e.position),t=e.position;i!==0&&!ue(i)&&!zr(i);)i=e.input.charCodeAt(++e.position);return e.position===t&&ct(e,"name of an alias node must contain at least one character"),r=e.input.slice(t,e.position),Lr.call(e.anchorMap,r)||ct(e,'unidentified alias "'+r+'"'),e.result=e.anchorMap[r],Nt(e,!0,-1),!0}y(zp,"readAlias");function Qr(e,t,r,i,a){var s,o,n,l=1,h=!1,c=!1,u,f,d,g,p,m;if(e.listener!==null&&e.listener("open",e),e.tag=null,e.anchor=null,e.kind=null,e.result=null,s=o=n=wo===r||Sp===r,i&&Nt(e,!0,-1)&&(h=!0,e.lineIndent>t?l=1:e.lineIndent===t?l=0:e.lineIndent<t&&(l=-1)),l===1)for(;qp(e)||Wp(e);)Nt(e,!0,-1)?(h=!0,n=s,e.lineIndent>t?l=1:e.lineIndent===t?l=0:e.lineIndent<t&&(l=-1)):n=!1;if(n&&(n=h||a),(l===1||wo===r)&&(ko===r||Tp===r?p=t:p=t+1,m=e.position-e.lineStart,l===1?n&&(Fl(e,m)||Np(e,m,p))||Pp(e,p)?c=!0:(o&&Rp(e,p)||Dp(e,p)||Ip(e,p)?c=!0:zp(e)?(c=!0,(e.tag!==null||e.anchor!==null)&&ct(e,"alias node should not have any properties")):Op(e,p,ko===r)&&(c=!0,e.tag===null&&(e.tag="?")),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):l===0&&(c=n&&Fl(e,m))),e.tag===null)e.anchor!==null&&(e.anchorMap[e.anchor]=e.result);else if(e.tag==="?"){for(e.result!==null&&e.kind!=="scalar"&&ct(e,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+e.kind+'"'),u=0,f=e.implicitTypes.length;u<f;u+=1)if(g=e.implicitTypes[u],g.resolve(e.result)){e.result=g.construct(e.result),e.tag=g.tag,e.anchor!==null&&(e.anchorMap[e.anchor]=e.result);break}}else if(e.tag!=="!"){if(Lr.call(e.typeMap[e.kind||"fallback"],e.tag))g=e.typeMap[e.kind||"fallback"][e.tag];else for(g=null,d=e.typeMap.multi[e.kind||"fallback"],u=0,f=d.length;u<f;u+=1)if(e.tag.slice(0,d[u].tag.length)===d[u].tag){g=d[u];break}g||ct(e,"unknown tag !<"+e.tag+">"),e.result!==null&&g.kind!==e.kind&&ct(e,"unacceptable node kind for !<"+e.tag+'> tag; it should be "'+g.kind+'", not "'+e.kind+'"'),g.resolve(e.result,e.tag)?(e.result=g.construct(e.result,e.tag),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):ct(e,"cannot resolve a node with !<"+e.tag+"> explicit tag")}return e.listener!==null&&e.listener("close",e),e.tag!==null||e.anchor!==null||c}y(Qr,"composeNode");function Hp(e){var t=e.position,r,i,a,s=!1,o;for(e.version=null,e.checkLineBreaks=e.legacy,e.tagMap=Object.create(null),e.anchorMap=Object.create(null);(o=e.input.charCodeAt(e.position))!==0&&(Nt(e,!0,-1),o=e.input.charCodeAt(e.position),!(e.lineIndent>0||o!==37));){for(s=!0,o=e.input.charCodeAt(++e.position),r=e.position;o!==0&&!ue(o);)o=e.input.charCodeAt(++e.position);for(i=e.input.slice(r,e.position),a=[],i.length<1&&ct(e,"directive name must not be less than one character in length");o!==0;){for(;vr(o);)o=e.input.charCodeAt(++e.position);if(o===35){do o=e.input.charCodeAt(++e.position);while(o!==0&&!Oe(o));break}if(Oe(o))break;for(r=e.position;o!==0&&!ue(o);)o=e.input.charCodeAt(++e.position);a.push(e.input.slice(r,e.position))}o!==0&&Xo(e),Lr.call(Ku,i)?Ku[i](e,i,a):Wa(e,'unknown document directive "'+i+'"')}if(Nt(e,!0,-1),e.lineIndent===0&&e.input.charCodeAt(e.position)===45&&e.input.charCodeAt(e.position+1)===45&&e.input.charCodeAt(e.position+2)===45?(e.position+=3,Nt(e,!0,-1)):s&&ct(e,"directives end mark is expected"),Qr(e,e.lineIndent-1,wo,!1,!0),Nt(e,!0,-1),e.checkLineBreaks&&kv.test(e.input.slice(t,e.position))&&Wa(e,"non-ASCII line breaks are interpreted as content"),e.documents.push(e.result),e.position===e.lineStart&&es(e)){e.input.charCodeAt(e.position)===46&&(e.position+=3,Nt(e,!0,-1));return}if(e.position<e.length-1)ct(e,"end of the stream or a document separator is expected");else return}y(Hp,"readDocument");function Ih(e,t){e=String(e),t=t||{},e.length!==0&&(e.charCodeAt(e.length-1)!==10&&e.charCodeAt(e.length-1)!==13&&(e+=`
|
|
144
|
-
`),e.charCodeAt(0)===65279&&(e=e.slice(1)));var r=new $p(e,t),i=e.indexOf("\0");for(i!==-1&&(r.position=i,ct(r,"null byte is not allowed in input")),r.input+="\0";r.input.charCodeAt(r.position)===32;)r.lineIndent+=1,r.position+=1;for(;r.position<r.length-1;)Hp(r);return r.documents}y(Ih,"loadDocuments");function Tv(e,t,r){t!==null&&typeof t=="object"&&typeof r>"u"&&(r=t,t=null);var i=Ih(e,r);if(typeof t!="function")return i;for(var a=0,s=i.length;a<s;a+=1)t(i[a])}y(Tv,"loadAll$1");function Up(e,t){var r=Ih(e,t);if(r.length!==0){if(r.length===1)return r[0];throw new xe("expected a single document in the stream, but found more")}}y(Up,"load$1");var Sv=Up,_v={load:Sv},Yp=Object.prototype.toString,Gp=Object.prototype.hasOwnProperty,Ph=65279,vv=9,za=10,Bv=13,Lv=32,Fv=33,Mv=34,Ml=35,Av=37,Ev=38,$v=39,Ov=42,Xp=44,Dv=45,To=58,Iv=61,Pv=62,Rv=63,Nv=64,jp=91,Vp=93,qv=96,Zp=123,Wv=124,Qp=125,he={};he[0]="\\0";he[7]="\\a";he[8]="\\b";he[9]="\\t";he[10]="\\n";he[11]="\\v";he[12]="\\f";he[13]="\\r";he[27]="\\e";he[34]='\\"';he[92]="\\\\";he[133]="\\N";he[160]="\\_";he[8232]="\\L";he[8233]="\\P";var zv=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],Hv=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function Kp(e,t){var r,i,a,s,o,n,l;if(t===null)return{};for(r={},i=Object.keys(t),a=0,s=i.length;a<s;a+=1)o=i[a],n=String(t[o]),o.slice(0,2)==="!!"&&(o="tag:yaml.org,2002:"+o.slice(2)),l=e.compiledTypeMap.fallback[o],l&&Gp.call(l.styleAliases,n)&&(n=l.styleAliases[n]),r[o]=n;return r}y(Kp,"compileStyleMap");function Jp(e){var t,r,i;if(t=e.toString(16).toUpperCase(),e<=255)r="x",i=2;else if(e<=65535)r="u",i=4;else if(e<=4294967295)r="U",i=8;else throw new xe("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+r+zt.repeat("0",i-t.length)+t}y(Jp,"encodeHex");var Uv=1,Ha=2;function tm(e){this.schema=e.schema||wp,this.indent=Math.max(1,e.indent||2),this.noArrayIndent=e.noArrayIndent||!1,this.skipInvalid=e.skipInvalid||!1,this.flowLevel=zt.isNothing(e.flowLevel)?-1:e.flowLevel,this.styleMap=Kp(this.schema,e.styles||null),this.sortKeys=e.sortKeys||!1,this.lineWidth=e.lineWidth||80,this.noRefs=e.noRefs||!1,this.noCompatMode=e.noCompatMode||!1,this.condenseFlow=e.condenseFlow||!1,this.quotingType=e.quotingType==='"'?Ha:Uv,this.forceQuotes=e.forceQuotes||!1,this.replacer=typeof e.replacer=="function"?e.replacer:null,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}y(tm,"State");function Al(e,t){for(var r=zt.repeat(" ",t),i=0,a=-1,s="",o,n=e.length;i<n;)a=e.indexOf(`
|
|
145
|
-
`,i),a===-1?(o=e.slice(i),i=n):(o=e.slice(i,a+1),i=a+1),o.length&&o!==`
|
|
146
|
-
`&&(s+=r),s+=o;return s}y(Al,"indentString");function So(e,t){return`
|
|
147
|
-
`+zt.repeat(" ",e.indent*t)}y(So,"generateNextLine");function em(e,t){var r,i,a;for(r=0,i=e.implicitTypes.length;r<i;r+=1)if(a=e.implicitTypes[r],a.resolve(t))return!0;return!1}y(em,"testImplicitResolving");function Ua(e){return e===Lv||e===vv}y(Ua,"isWhitespace");function Qi(e){return 32<=e&&e<=126||161<=e&&e<=55295&&e!==8232&&e!==8233||57344<=e&&e<=65533&&e!==Ph||65536<=e&&e<=1114111}y(Qi,"isPrintable");function El(e){return Qi(e)&&e!==Ph&&e!==Bv&&e!==za}y(El,"isNsCharOrWhitespace");function $l(e,t,r){var i=El(e),a=i&&!Ua(e);return(r?i:i&&e!==Xp&&e!==jp&&e!==Vp&&e!==Zp&&e!==Qp)&&e!==Ml&&!(t===To&&!a)||El(t)&&!Ua(t)&&e===Ml||t===To&&a}y($l,"isPlainSafe");function rm(e){return Qi(e)&&e!==Ph&&!Ua(e)&&e!==Dv&&e!==Rv&&e!==To&&e!==Xp&&e!==jp&&e!==Vp&&e!==Zp&&e!==Qp&&e!==Ml&&e!==Ev&&e!==Ov&&e!==Fv&&e!==Wv&&e!==Iv&&e!==Pv&&e!==$v&&e!==Mv&&e!==Av&&e!==Nv&&e!==qv}y(rm,"isPlainSafeFirst");function im(e){return!Ua(e)&&e!==To}y(im,"isPlainSafeLast");function Ti(e,t){var r=e.charCodeAt(t),i;return r>=55296&&r<=56319&&t+1<e.length&&(i=e.charCodeAt(t+1),i>=56320&&i<=57343)?(r-55296)*1024+i-56320+65536:r}y(Ti,"codePointAt");function Rh(e){var t=/^\n* /;return t.test(e)}y(Rh,"needIndentIndicator");var am=1,Ol=2,sm=3,om=4,yi=5;function nm(e,t,r,i,a,s,o,n){var l,h=0,c=null,u=!1,f=!1,d=i!==-1,g=-1,p=rm(Ti(e,0))&&im(Ti(e,e.length-1));if(t||o)for(l=0;l<e.length;h>=65536?l+=2:l++){if(h=Ti(e,l),!Qi(h))return yi;p=p&&$l(h,c,n),c=h}else{for(l=0;l<e.length;h>=65536?l+=2:l++){if(h=Ti(e,l),h===za)u=!0,d&&(f=f||l-g-1>i&&e[g+1]!==" ",g=l);else if(!Qi(h))return yi;p=p&&$l(h,c,n),c=h}f=f||d&&l-g-1>i&&e[g+1]!==" "}return!u&&!f?p&&!o&&!a(e)?am:s===Ha?yi:Ol:r>9&&Rh(e)?yi:o?s===Ha?yi:Ol:f?om:sm}y(nm,"chooseScalarStyle");function lm(e,t,r,i,a){e.dump=(function(){if(t.length===0)return e.quotingType===Ha?'""':"''";if(!e.noCompatMode&&(zv.indexOf(t)!==-1||Hv.test(t)))return e.quotingType===Ha?'"'+t+'"':"'"+t+"'";var s=e.indent*Math.max(1,r),o=e.lineWidth===-1?-1:Math.max(Math.min(e.lineWidth,40),e.lineWidth-s),n=i||e.flowLevel>-1&&r>=e.flowLevel;function l(h){return em(e,h)}switch(y(l,"testAmbiguity"),nm(t,n,e.indent,o,l,e.quotingType,e.forceQuotes&&!i,a)){case am:return t;case Ol:return"'"+t.replace(/'/g,"''")+"'";case sm:return"|"+Dl(t,e.indent)+Il(Al(t,s));case om:return">"+Dl(t,e.indent)+Il(Al(hm(t,o),s));case yi:return'"'+cm(t)+'"';default:throw new xe("impossible error: invalid scalar style")}})()}y(lm,"writeScalar");function Dl(e,t){var r=Rh(e)?String(t):"",i=e[e.length-1]===`
|
|
148
|
-
`,a=i&&(e[e.length-2]===`
|
|
149
|
-
`||e===`
|
|
150
|
-
`),s=a?"+":i?"":"-";return r+s+`
|
|
151
|
-
`}y(Dl,"blockHeader");function Il(e){return e[e.length-1]===`
|
|
152
|
-
`?e.slice(0,-1):e}y(Il,"dropEndingNewline");function hm(e,t){for(var r=/(\n+)([^\n]*)/g,i=(function(){var h=e.indexOf(`
|
|
153
|
-
`);return h=h!==-1?h:e.length,r.lastIndex=h,Pl(e.slice(0,h),t)})(),a=e[0]===`
|
|
154
|
-
`||e[0]===" ",s,o;o=r.exec(e);){var n=o[1],l=o[2];s=l[0]===" ",i+=n+(!a&&!s&&l!==""?`
|
|
155
|
-
`:"")+Pl(l,t),a=s}return i}y(hm,"foldString");function Pl(e,t){if(e===""||e[0]===" ")return e;for(var r=/ [^ ]/g,i,a=0,s,o=0,n=0,l="";i=r.exec(e);)n=i.index,n-a>t&&(s=o>a?o:n,l+=`
|
|
156
|
-
`+e.slice(a,s),a=s+1),o=n;return l+=`
|
|
157
|
-
`,e.length-a>t&&o>a?l+=e.slice(a,o)+`
|
|
158
|
-
`+e.slice(o+1):l+=e.slice(a),l.slice(1)}y(Pl,"foldLine");function cm(e){for(var t="",r=0,i,a=0;a<e.length;r>=65536?a+=2:a++)r=Ti(e,a),i=he[r],!i&&Qi(r)?(t+=e[a],r>=65536&&(t+=e[a+1])):t+=i||Jp(r);return t}y(cm,"escapeString");function um(e,t,r){var i="",a=e.tag,s,o,n;for(s=0,o=r.length;s<o;s+=1)n=r[s],e.replacer&&(n=e.replacer.call(r,String(s),n)),(Ve(e,t,n,!1,!1)||typeof n>"u"&&Ve(e,t,null,!1,!1))&&(i!==""&&(i+=","+(e.condenseFlow?"":" ")),i+=e.dump);e.tag=a,e.dump="["+i+"]"}y(um,"writeFlowSequence");function Rl(e,t,r,i){var a="",s=e.tag,o,n,l;for(o=0,n=r.length;o<n;o+=1)l=r[o],e.replacer&&(l=e.replacer.call(r,String(o),l)),(Ve(e,t+1,l,!0,!0,!1,!0)||typeof l>"u"&&Ve(e,t+1,null,!0,!0,!1,!0))&&((!i||a!=="")&&(a+=So(e,t)),e.dump&&za===e.dump.charCodeAt(0)?a+="-":a+="- ",a+=e.dump);e.tag=s,e.dump=a||"[]"}y(Rl,"writeBlockSequence");function dm(e,t,r){var i="",a=e.tag,s=Object.keys(r),o,n,l,h,c;for(o=0,n=s.length;o<n;o+=1)c="",i!==""&&(c+=", "),e.condenseFlow&&(c+='"'),l=s[o],h=r[l],e.replacer&&(h=e.replacer.call(r,l,h)),Ve(e,t,l,!1,!1)&&(e.dump.length>1024&&(c+="? "),c+=e.dump+(e.condenseFlow?'"':"")+":"+(e.condenseFlow?"":" "),Ve(e,t,h,!1,!1)&&(c+=e.dump,i+=c));e.tag=a,e.dump="{"+i+"}"}y(dm,"writeFlowMapping");function fm(e,t,r,i){var a="",s=e.tag,o=Object.keys(r),n,l,h,c,u,f;if(e.sortKeys===!0)o.sort();else if(typeof e.sortKeys=="function")o.sort(e.sortKeys);else if(e.sortKeys)throw new xe("sortKeys must be a boolean or a function");for(n=0,l=o.length;n<l;n+=1)f="",(!i||a!=="")&&(f+=So(e,t)),h=o[n],c=r[h],e.replacer&&(c=e.replacer.call(r,h,c)),Ve(e,t+1,h,!0,!0,!0)&&(u=e.tag!==null&&e.tag!=="?"||e.dump&&e.dump.length>1024,u&&(e.dump&&za===e.dump.charCodeAt(0)?f+="?":f+="? "),f+=e.dump,u&&(f+=So(e,t)),Ve(e,t+1,c,!0,u)&&(e.dump&&za===e.dump.charCodeAt(0)?f+=":":f+=": ",f+=e.dump,a+=f));e.tag=s,e.dump=a||"{}"}y(fm,"writeBlockMapping");function Nl(e,t,r){var i,a,s,o,n,l;for(a=r?e.explicitTypes:e.implicitTypes,s=0,o=a.length;s<o;s+=1)if(n=a[s],(n.instanceOf||n.predicate)&&(!n.instanceOf||typeof t=="object"&&t instanceof n.instanceOf)&&(!n.predicate||n.predicate(t))){if(r?n.multi&&n.representName?e.tag=n.representName(t):e.tag=n.tag:e.tag="?",n.represent){if(l=e.styleMap[n.tag]||n.defaultStyle,Yp.call(n.represent)==="[object Function]")i=n.represent(t,l);else if(Gp.call(n.represent,l))i=n.represent[l](t,l);else throw new xe("!<"+n.tag+'> tag resolver accepts not "'+l+'" style');e.dump=i}return!0}return!1}y(Nl,"detectType");function Ve(e,t,r,i,a,s,o){e.tag=null,e.dump=r,Nl(e,r,!1)||Nl(e,r,!0);var n=Yp.call(e.dump),l=i,h;i&&(i=e.flowLevel<0||e.flowLevel>t);var c=n==="[object Object]"||n==="[object Array]",u,f;if(c&&(u=e.duplicates.indexOf(r),f=u!==-1),(e.tag!==null&&e.tag!=="?"||f||e.indent!==2&&t>0)&&(a=!1),f&&e.usedDuplicates[u])e.dump="*ref_"+u;else{if(c&&f&&!e.usedDuplicates[u]&&(e.usedDuplicates[u]=!0),n==="[object Object]")i&&Object.keys(e.dump).length!==0?(fm(e,t,e.dump,a),f&&(e.dump="&ref_"+u+e.dump)):(dm(e,t,e.dump),f&&(e.dump="&ref_"+u+" "+e.dump));else if(n==="[object Array]")i&&e.dump.length!==0?(e.noArrayIndent&&!o&&t>0?Rl(e,t-1,e.dump,a):Rl(e,t,e.dump,a),f&&(e.dump="&ref_"+u+e.dump)):(um(e,t,e.dump),f&&(e.dump="&ref_"+u+" "+e.dump));else if(n==="[object String]")e.tag!=="?"&&lm(e,e.dump,t,s,l);else{if(n==="[object Undefined]")return!1;if(e.skipInvalid)return!1;throw new xe("unacceptable kind of an object to dump "+n)}e.tag!==null&&e.tag!=="?"&&(h=encodeURI(e.tag[0]==="!"?e.tag.slice(1):e.tag).replace(/!/g,"%21"),e.tag[0]==="!"?h="!"+h:h.slice(0,18)==="tag:yaml.org,2002:"?h="!!"+h.slice(18):h="!<"+h+">",e.dump=h+" "+e.dump)}return!0}y(Ve,"writeNode");function gm(e,t){var r=[],i=[],a,s;for(_o(e,r,i),a=0,s=i.length;a<s;a+=1)t.duplicates.push(r[i[a]]);t.usedDuplicates=new Array(s)}y(gm,"getDuplicateReferences");function _o(e,t,r){var i,a,s;if(e!==null&&typeof e=="object")if(a=t.indexOf(e),a!==-1)r.indexOf(a)===-1&&r.push(a);else if(t.push(e),Array.isArray(e))for(a=0,s=e.length;a<s;a+=1)_o(e[a],t,r);else for(i=Object.keys(e),a=0,s=i.length;a<s;a+=1)_o(e[i[a]],t,r)}y(_o,"inspectNode");function Yv(e,t){t=t||{};var r=new tm(t);r.noRefs||gm(e,r);var i=e;return r.replacer&&(i=r.replacer.call({"":i},"",i)),Ve(r,0,i,!0,!0)?r.dump+`
|
|
159
|
-
`:""}y(Yv,"dump$1");function Gv(e,t){return function(){throw new Error("Function yaml."+e+" is removed in js-yaml 4. Use yaml."+t+" instead, which is now safe by default.")}}y(Gv,"renamed");var Xv=sp,jv=_v.load;/*! Bundled license information:
|
|
160
|
-
|
|
161
|
-
js-yaml/dist/js-yaml.mjs:
|
|
162
|
-
(*! js-yaml 4.1.1 https://github.com/nodeca/js-yaml @license MIT *)
|
|
163
|
-
*/var Vv=y(e=>{const{handDrawnSeed:t}=Bt();return{fill:e,hachureAngle:120,hachureGap:4,fillWeight:2,roughness:.7,stroke:e,seed:t}},"solidStateFill"),ta=y(e=>{const t=Zv([...e.cssCompiledStyles||[],...e.cssStyles||[],...e.labelStyle||[]]);return{stylesMap:t,stylesArray:[...t]}},"compileStyles"),Zv=y(e=>{const t=new Map;return e.forEach(r=>{const[i,a]=r.split(":");t.set(i.trim(),a==null?void 0:a.trim())}),t},"styles2Map"),pm=y(e=>e==="color"||e==="font-size"||e==="font-family"||e==="font-weight"||e==="font-style"||e==="text-decoration"||e==="text-align"||e==="text-transform"||e==="line-height"||e==="letter-spacing"||e==="word-spacing"||e==="text-shadow"||e==="text-overflow"||e==="white-space"||e==="word-wrap"||e==="word-break"||e==="overflow-wrap"||e==="hyphens","isLabelStyle"),at=y(e=>{const{stylesArray:t}=ta(e),r=[],i=[],a=[],s=[];return t.forEach(o=>{const n=o[0];pm(n)?r.push(o.join(":")+" !important"):(i.push(o.join(":")+" !important"),n.includes("stroke")&&a.push(o.join(":")+" !important"),n==="fill"&&s.push(o.join(":")+" !important"))}),{labelStyles:r.join(";"),nodeStyles:i.join(";"),stylesArray:t,borderStyles:a,backgroundStyles:s}},"styles2String"),et=y((e,t)=>{var l;const{themeVariables:r,handDrawnSeed:i}=Bt(),{nodeBorder:a,mainBkg:s}=r,{stylesMap:o}=ta(e);return Object.assign({roughness:.7,fill:o.get("fill")||s,fillStyle:"hachure",fillWeight:4,hachureGap:5.2,stroke:o.get("stroke")||a,seed:i,strokeWidth:((l=o.get("stroke-width"))==null?void 0:l.replace("px",""))||1.3,fillLineDash:[0,0],strokeLineDash:Qv(o.get("stroke-dasharray"))},t)},"userNodeOverrides"),Qv=y(e=>{if(!e)return[0,0];const t=e.trim().split(/\s+/).map(Number);if(t.length===1){const a=isNaN(t[0])?0:t[0];return[a,a]}const r=isNaN(t[0])?0:t[0],i=isNaN(t[1])?0:t[1];return[r,i]},"getStrokeDashArray"),mm={},Gt={};Object.defineProperty(Gt,"__esModule",{value:!0});Gt.BLANK_URL=Gt.relativeFirstCharacters=Gt.whitespaceEscapeCharsRegex=Gt.urlSchemeRegex=Gt.ctrlCharactersRegex=Gt.htmlCtrlEntityRegex=Gt.htmlEntitiesRegex=Gt.invalidProtocolRegex=void 0;Gt.invalidProtocolRegex=/^([^\w]*)(javascript|data|vbscript)/im;Gt.htmlEntitiesRegex=/&#(\w+)(^\w|;)?/g;Gt.htmlCtrlEntityRegex=/&(newline|tab);/gi;Gt.ctrlCharactersRegex=/[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim;Gt.urlSchemeRegex=/^.+(:|:)/gim;Gt.whitespaceEscapeCharsRegex=/(\\|%5[cC])((%(6[eE]|72|74))|[nrt])/g;Gt.relativeFirstCharacters=[".","/"];Gt.BLANK_URL="about:blank";Object.defineProperty(mm,"__esModule",{value:!0});var Kv=mm.sanitizeUrl=rB,se=Gt;function Jv(e){return se.relativeFirstCharacters.indexOf(e[0])>-1}function tB(e){var t=e.replace(se.ctrlCharactersRegex,"");return t.replace(se.htmlEntitiesRegex,function(r,i){return String.fromCharCode(i)})}function eB(e){return URL.canParse(e)}function Ju(e){try{return decodeURIComponent(e)}catch{return e}}function rB(e){if(!e)return se.BLANK_URL;var t,r=Ju(e.trim());do r=tB(r).replace(se.htmlCtrlEntityRegex,"").replace(se.ctrlCharactersRegex,"").replace(se.whitespaceEscapeCharsRegex,"").trim(),r=Ju(r),t=r.match(se.ctrlCharactersRegex)||r.match(se.htmlEntitiesRegex)||r.match(se.htmlCtrlEntityRegex)||r.match(se.whitespaceEscapeCharsRegex);while(t&&t.length>0);var i=r;if(!i)return se.BLANK_URL;if(Jv(i))return i;var a=i.trimStart(),s=a.match(se.urlSchemeRegex);if(!s)return i;var o=s[0].toLowerCase().trim();if(se.invalidProtocolRegex.test(o))return se.BLANK_URL;var n=a.replace(/\\/g,"/");if(o==="mailto:"||o.includes("://"))return n;if(o==="http:"||o==="https:"){if(!eB(n))return se.BLANK_URL;var l=new URL(n);return l.protocol=l.protocol.toLowerCase(),l.hostname=l.hostname.toLowerCase(),l.toString()}return n}function iB(e){return Number.isSafeInteger(e)&&e>=0}function ym(e){return e!=null&&typeof e!="function"&&iB(e.length)}function aB(e){return e==="__proto__"}function Vo(e){return e==null||typeof e!="object"&&typeof e!="function"}function Cm(e){return Object.getOwnPropertySymbols(e).filter(t=>Object.prototype.propertyIsEnumerable.call(e,t))}function rs(e){return e==null?e===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(e)}const Nh="[object RegExp]",Ya="[object String]",Zo="[object Number]",Qo="[object Boolean]",Ko="[object Arguments]",qh="[object Symbol]",Wh="[object Date]",zh="[object Map]",Hh="[object Set]",xm="[object Array]",Uh="[object ArrayBuffer]",Yh="[object Object]",Gh="[object DataView]",bm="[object Uint8Array]",km="[object Uint8ClampedArray]",wm="[object Uint16Array]",Tm="[object Uint32Array]",Sm="[object Int8Array]",_m="[object Int16Array]",vm="[object Int32Array]",Bm="[object Float32Array]",Lm="[object Float64Array]",td=typeof globalThis=="object"&&globalThis||typeof window=="object"&&window||typeof self=="object"&&self||typeof global=="object"&&global||(function(){return this})()||Function("return this")();function Xh(e){return typeof td.Buffer<"u"&&td.Buffer.isBuffer(e)}function jh(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function sB(e,t){return Si(e,void 0,e,new Map,t)}function Si(e,t,r,i=new Map,a=void 0){const s=a==null?void 0:a(e,t,r,i);if(s!==void 0)return s;if(Vo(e))return e;if(i.has(e))return i.get(e);if(Array.isArray(e)){const o=new Array(e.length);i.set(e,o);for(let n=0;n<e.length;n++)o[n]=Si(e[n],n,r,i,a);return Object.hasOwn(e,"index")&&(o.index=e.index),Object.hasOwn(e,"input")&&(o.input=e.input),o}if(e instanceof Date)return new Date(e.getTime());if(e instanceof RegExp){const o=new RegExp(e.source,e.flags);return o.lastIndex=e.lastIndex,o}if(e instanceof Map){const o=new Map;i.set(e,o);for(const[n,l]of e)o.set(n,Si(l,n,r,i,a));return o}if(e instanceof Set){const o=new Set;i.set(e,o);for(const n of e)o.add(Si(n,void 0,r,i,a));return o}if(Xh(e))return e.subarray();if(jh(e)){const o=new(Object.getPrototypeOf(e)).constructor(e.length);i.set(e,o);for(let n=0;n<e.length;n++)o[n]=Si(e[n],n,r,i,a);return o}if(e instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&e instanceof SharedArrayBuffer)return e.slice(0);if(e instanceof DataView){const o=new DataView(e.buffer.slice(0),e.byteOffset,e.byteLength);return i.set(e,o),Le(o,e,r,i,a),o}if(typeof File<"u"&&e instanceof File){const o=new File([e],e.name,{type:e.type});return i.set(e,o),Le(o,e,r,i,a),o}if(typeof Blob<"u"&&e instanceof Blob){const o=new Blob([e],{type:e.type});return i.set(e,o),Le(o,e,r,i,a),o}if(e instanceof Error){const o=structuredClone(e);return i.set(e,o),o.message=e.message,o.name=e.name,o.stack=e.stack,o.cause=e.cause,o.constructor=e.constructor,Le(o,e,r,i,a),o}if(e instanceof Boolean){const o=new Boolean(e.valueOf());return i.set(e,o),Le(o,e,r,i,a),o}if(e instanceof Number){const o=new Number(e.valueOf());return i.set(e,o),Le(o,e,r,i,a),o}if(e instanceof String){const o=new String(e.valueOf());return i.set(e,o),Le(o,e,r,i,a),o}if(typeof e=="object"&&oB(e)){const o=Object.create(Object.getPrototypeOf(e));return i.set(e,o),Le(o,e,r,i,a),o}return e}function Le(e,t,r=e,i,a){const s=[...Object.keys(t),...Cm(t)];for(let o=0;o<s.length;o++){const n=s[o],l=Object.getOwnPropertyDescriptor(e,n);(l==null||l.writable)&&(e[n]=Si(t[n],n,r,i,a))}}function oB(e){switch(rs(e)){case Ko:case xm:case Uh:case Gh:case Qo:case Wh:case Bm:case Lm:case Sm:case _m:case vm:case zh:case Zo:case Yh:case Nh:case Hh:case Ya:case qh:case bm:case km:case wm:case Tm:return!0;default:return!1}}function nB(e,t){return sB(e,(r,i,a,s)=>{if(typeof e=="object"){if(rs(e)===Yh&&typeof e.constructor!="function"){const o={};return s.set(e,o),Le(o,e,a,s),o}switch(Object.prototype.toString.call(e)){case Zo:case Ya:case Qo:{const o=new e.constructor(e==null?void 0:e.valueOf());return Le(o,e),o}case Ko:{const o={};return Le(o,e),o.length=e.length,o[Symbol.iterator]=e[Symbol.iterator],o}default:return}}})}function ed(e){return nB(e)}function ql(e){return e!==null&&typeof e=="object"&&rs(e)==="[object Arguments]"}function Wl(e){return typeof e=="object"&&e!==null}function lB(e){return Wl(e)&&ym(e)}function hB(e){return Array.isArray(e)}function is(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError("Expected a function");const r=function(...a){const s=t?t.apply(this,a):a[0],o=r.cache;if(o.has(s))return o.get(s);const n=e.apply(this,a);return r.cache=o.set(s,n)||o,n},i=is.Cache||Map;return r.cache=new i,r}is.Cache=Map;function cB(){}function uB(e){const t=e==null?void 0:e.constructor,r=typeof t=="function"?t.prototype:Object.prototype;return e===r}function Oa(e){return jh(e)}function k3(e){if(Vo(e))return e;const t=rs(e);if(!dB(e))return{};if(hB(e)){const i=Array.from(e);return e.length>0&&typeof e[0]=="string"&&Object.hasOwn(e,"index")&&(i.index=e.index,i.input=e.input),i}if(Oa(e)){const i=e,a=i.constructor;return new a(i.buffer,i.byteOffset,i.length)}if(t===Uh)return new ArrayBuffer(e.byteLength);if(t===Gh){const i=e,a=i.buffer,s=i.byteOffset,o=i.byteLength,n=new ArrayBuffer(o),l=new Uint8Array(a,s,o);return new Uint8Array(n).set(l),new DataView(n)}if(t===Qo||t===Zo||t===Ya){const i=e.constructor,a=new i(e.valueOf());return t===Ya?gB(a,e):Un(a,e),a}if(t===Wh)return new Date(Number(e));if(t===Nh){const i=e,a=new RegExp(i.source,i.flags);return a.lastIndex=i.lastIndex,a}if(t===qh)return Object(Symbol.prototype.valueOf.call(e));if(t===zh){const i=e,a=new Map;return i.forEach((s,o)=>{a.set(o,s)}),a}if(t===Hh){const i=e,a=new Set;return i.forEach(s=>{a.add(s)}),a}if(t===Ko){const i=e,a={};return Un(a,i),a.length=i.length,a[Symbol.iterator]=i[Symbol.iterator],a}const r={};return pB(r,e),Un(r,e),fB(r,e),r}function dB(e){switch(rs(e)){case Ko:case xm:case Uh:case Gh:case Qo:case Wh:case Bm:case Lm:case Sm:case _m:case vm:case zh:case Zo:case Yh:case Nh:case Hh:case Ya:case qh:case bm:case km:case wm:case Tm:return!0;default:return!1}}function Un(e,t){for(const r in t)Object.hasOwn(t,r)&&(e[r]=t[r])}function fB(e,t){const r=Object.getOwnPropertySymbols(t);for(let i=0;i<r.length;i++){const a=r[i];Object.prototype.propertyIsEnumerable.call(t,a)&&(e[a]=t[a])}}function gB(e,t){const r=t.valueOf().length;for(const i in t)Object.hasOwn(t,i)&&(Number.isNaN(Number(i))||Number(i)>=r)&&(e[i]=t[i])}function pB(e,t){const r=Object.getPrototypeOf(t);r!==null&&typeof t.constructor=="function"&&Object.setPrototypeOf(e,r)}function Yn(e){var r;if(typeof e!="object"||e==null)return!1;if(Object.getPrototypeOf(e)===null)return!0;if(Object.prototype.toString.call(e)!=="[object Object]"){const i=e[Symbol.toStringTag];return i==null||!((r=Object.getOwnPropertyDescriptor(e,Symbol.toStringTag))!=null&&r.writable)?!1:e.toString()===`[object ${i}]`}let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function mB(e){if(Vo(e))return e;if(Array.isArray(e)||jh(e)||e instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&e instanceof SharedArrayBuffer)return e.slice(0);const t=Object.getPrototypeOf(e);if(t==null)return Object.assign(Object.create(t),e);const r=t.constructor;if(e instanceof Date||e instanceof Map||e instanceof Set)return new r(e);if(e instanceof RegExp){const i=new r(e);return i.lastIndex=e.lastIndex,i}if(e instanceof DataView)return new r(e.buffer.slice(0));if(e instanceof Error){let i;return e instanceof AggregateError?i=new r(e.errors,e.message,{cause:e.cause}):i=new r(e.message,{cause:e.cause}),i.stack=e.stack,Object.assign(i,e),i}if(typeof File<"u"&&e instanceof File)return new r([e],e.name,{type:e.type,lastModified:e.lastModified});if(typeof e=="object"){const i=Object.create(t);return Object.assign(i,e)}return e}function yB(e,...t){const r=t.slice(0,-1),i=t[t.length-1];let a=e;for(let s=0;s<r.length;s++){const o=r[s];a=Hs(a,o,i,new Map)}return a}function Hs(e,t,r,i){if(Vo(e)&&(e=Object(e)),t==null||typeof t!="object")return e;if(i.has(t))return mB(i.get(t));if(i.set(t,e),Array.isArray(t)){t=t.slice();for(let s=0;s<t.length;s++)t[s]=t[s]??void 0}const a=[...Object.keys(t),...Cm(t)];for(let s=0;s<a.length;s++){const o=a[s];if(aB(o))continue;let n=t[o],l=e[o];if(ql(n)&&(n={...n}),ql(l)&&(l={...l}),Xh(n)&&(n=ed(n)),Array.isArray(n))if(Array.isArray(l)){const c=[],u=Reflect.ownKeys(l);for(let f=0;f<u.length;f++){const d=u[f];c[d]=l[d]}l=c}else if(lB(l)){const c=[];for(let u=0;u<l.length;u++)c[u]=l[u];l=c}else l=[];const h=r(l,n,o,e,t,i);h!==void 0?e[o]=h:Array.isArray(n)||Wl(l)&&Wl(n)&&(Yn(l)||Yn(n)||Oa(l)||Oa(n))?e[o]=Hs(l,n,r,i):l==null&&Yn(n)?e[o]=Hs({},n,r,i):l==null&&Oa(n)?e[o]=ed(n):(l===void 0||n!==void 0)&&(e[o]=n)}return e}function CB(e,...t){return yB(e,...t,cB)}function rd(e){if(e==null)return!0;if(ym(e))return typeof e.splice!="function"&&typeof e!="string"&&!Xh(e)&&!Oa(e)&&!ql(e)?!1:e.length===0;if(typeof e=="object"){if(e instanceof Map||e instanceof Set)return e.size===0;const t=Object.keys(e);return uB(e)?t.filter(r=>r!=="constructor").length===0:t.length===0}return!0}var xB="",bB={curveBasis:Cl,curveBasisClosed:fS,curveBasisOpen:gS,curveBumpX:jf,curveBumpY:Vf,curveBundle:pS,curveCardinalClosed:mS,curveCardinalOpen:yS,curveCardinal:Jf,curveCatmullRomClosed:CS,curveCatmullRomOpen:xS,curveCatmullRom:eg,curveLinear:Ma,curveLinearClosed:bS,curveMonotoneX:ng,curveMonotoneY:lg,curveNatural:cg,curveStep:ug,curveStepAfter:fg,curveStepBefore:dg},kB=/\s*(?:(\w+)(?=:):|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,wB=y(function(e,t){const r=Fm(e,/(?:init\b)|(?:initialize\b)/);let i={};if(Array.isArray(r)){const o=r.map(n=>n.args);po(o),i=Xt(i,[...o])}else i=r.args;if(!i)return;let a=_h(e,t);const s="config";return i[s]!==void 0&&(a==="flowchart-v2"&&(a="flowchart"),i[a]=i[s],delete i[s]),i},"detectInit"),Fm=y(function(e,t=null){var r,i;try{const a=new RegExp(`[%]{2}(?![{]${kB.source})(?=[}][%]{2}).*
|
|
164
|
-
`,"ig");e=e.trim().replace(a,"").replace(/'/gm,'"'),G.debug(`Detecting diagram directive${t!==null?" type:"+t:""} based on the text:${e}`);let s;const o=[];for(;(s=$a.exec(e))!==null;)if(s.index===$a.lastIndex&&$a.lastIndex++,s&&!t||t&&((r=s[1])!=null&&r.match(t))||t&&((i=s[2])!=null&&i.match(t))){const n=s[1]?s[1]:s[2],l=s[3]?s[3].trim():s[4]?JSON.parse(s[4].trim()):null;o.push({type:n,args:l})}return o.length===0?{type:e,args:null}:o.length===1?o[0]:o}catch(a){return G.error(`ERROR: ${a.message} - Unable to parse directive type: '${t}' based on the text: '${e}'`),{type:void 0,args:null}}},"detectDirective"),TB=y(function(e){return e.replace($a,"")},"removeDirectives"),SB=y(function(e,t){for(const[r,i]of t.entries())if(i.match(e))return r;return-1},"isSubstringInArray");function Vh(e,t){if(!e)return t;const r=`curve${e.charAt(0).toUpperCase()+e.slice(1)}`;return bB[r]??t}y(Vh,"interpolateToCurve");function Mm(e,t){const r=e.trim();if(r)return t.securityLevel!=="loose"?Kv(r):r}y(Mm,"formatUrl");var _B=y((e,...t)=>{const r=e.split("."),i=r.length-1,a=r[i];let s=window;for(let o=0;o<i;o++)if(s=s[r[o]],!s){G.error(`Function name: ${e} not found in window`);return}s[a](...t)},"runFunc");function Zh(e,t){return!e||!t?0:Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))}y(Zh,"distance");function Am(e){let t,r=0;e.forEach(a=>{r+=Zh(a,t),t=a});const i=r/2;return Qh(e,i)}y(Am,"traverseEdge");function Em(e){return e.length===1?e[0]:Am(e)}y(Em,"calcLabelPosition");var id=y((e,t=2)=>{const r=Math.pow(10,t);return Math.round(e*r)/r},"roundNumber"),Qh=y((e,t)=>{let r,i=t;for(const a of e){if(r){const s=Zh(a,r);if(s===0)return r;if(s<i)i-=s;else{const o=i/s;if(o<=0)return r;if(o>=1)return{x:a.x,y:a.y};if(o>0&&o<1)return{x:id((1-o)*r.x+o*a.x,5),y:id((1-o)*r.y+o*a.y,5)}}}r=a}throw new Error("Could not find a suitable point for the given distance")},"calculatePoint"),vB=y((e,t,r)=>{G.info(`our points ${JSON.stringify(t)}`),t[0]!==r&&(t=t.reverse());const a=Qh(t,25),s=e?10:5,o=Math.atan2(t[0].y-a.y,t[0].x-a.x),n={x:0,y:0};return n.x=Math.sin(o)*s+(t[0].x+a.x)/2,n.y=-Math.cos(o)*s+(t[0].y+a.y)/2,n},"calcCardinalityPosition");function $m(e,t,r){const i=structuredClone(r);G.info("our points",i),t!=="start_left"&&t!=="start_right"&&i.reverse();const a=25+e,s=Qh(i,a),o=10+e*.5,n=Math.atan2(i[0].y-s.y,i[0].x-s.x),l={x:0,y:0};return t==="start_left"?(l.x=Math.sin(n+Math.PI)*o+(i[0].x+s.x)/2,l.y=-Math.cos(n+Math.PI)*o+(i[0].y+s.y)/2):t==="end_right"?(l.x=Math.sin(n-Math.PI)*o+(i[0].x+s.x)/2-5,l.y=-Math.cos(n-Math.PI)*o+(i[0].y+s.y)/2-5):t==="end_left"?(l.x=Math.sin(n)*o+(i[0].x+s.x)/2-5,l.y=-Math.cos(n)*o+(i[0].y+s.y)/2-5):(l.x=Math.sin(n)*o+(i[0].x+s.x)/2,l.y=-Math.cos(n)*o+(i[0].y+s.y)/2),l}y($m,"calcTerminalLabelPosition");function Om(e){let t="",r="";for(const i of e)i!==void 0&&(i.startsWith("color:")||i.startsWith("text-align:")?r=r+i+";":t=t+i+";");return{style:t,labelStyle:r}}y(Om,"getStylesFromArray");var ad=0,BB=y(()=>(ad++,"id-"+Math.random().toString(36).substr(2,12)+"-"+ad),"generateId");function Dm(e){let t="";const r="0123456789abcdef",i=r.length;for(let a=0;a<e;a++)t+=r.charAt(Math.floor(Math.random()*i));return t}y(Dm,"makeRandomHex");var LB=y(e=>Dm(e.length),"random"),FB=y(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"),MB=y(function(e,t){const r=t.text.replace(ts.lineBreakRegex," "),[,i]=Jo(t.fontSize),a=e.append("text");a.attr("x",t.x),a.attr("y",t.y),a.style("text-anchor",t.anchor),a.style("font-family",t.fontFamily),a.style("font-size",i),a.style("font-weight",t.fontWeight),a.attr("fill",t.fill),t.class!==void 0&&a.attr("class",t.class);const s=a.append("tspan");return s.attr("x",t.x+t.textMargin*2),s.attr("fill",t.fill),s.text(r),a},"drawSimpleText"),AB=is((e,t,r)=>{if(!e||(r=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",joinWith:"<br/>"},r),ts.lineBreakRegex.test(e)))return e;const i=e.split(" ").filter(Boolean),a=[];let s="";return i.forEach((o,n)=>{const l=gr(`${o} `,r),h=gr(s,r);if(l>t){const{hyphenatedStrings:f,remainingWord:d}=EB(o,t,"-",r);a.push(s,...f),s=d}else h+l>=t?(a.push(s),s=o):s=[s,o].filter(Boolean).join(" ");n+1===i.length&&a.push(s)}),a.filter(o=>o!=="").join(r.joinWith)},(e,t,r)=>`${e}${t}${r.fontSize}${r.fontWeight}${r.fontFamily}${r.joinWith}`),EB=is((e,t,r="-",i)=>{i=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",margin:0},i);const a=[...e],s=[];let o="";return a.forEach((n,l)=>{const h=`${o}${n}`;if(gr(h,i)>=t){const u=l+1,f=a.length===u,d=`${h}${r}`;s.push(f?h:d),o=""}else o=h}),{hyphenatedStrings:s,remainingWord:o}},(e,t,r="-",i)=>`${e}${t}${r}${i.fontSize}${i.fontWeight}${i.fontFamily}`);function Im(e,t){return Kh(e,t).height}y(Im,"calculateTextHeight");function gr(e,t){return Kh(e,t).width}y(gr,"calculateTextWidth");var Kh=is((e,t)=>{const{fontSize:r=12,fontFamily:i="Arial",fontWeight:a=400}=t;if(!e)return{width:0,height:0};const[,s]=Jo(r),o=["sans-serif",i],n=e.split(ts.lineBreakRegex),l=[],h=wt("body");if(!h.remove)return{width:0,height:0,lineHeight:0};const c=h.append("svg");for(const f of o){let d=0;const g={width:0,height:0,lineHeight:0};for(const p of n){const m=FB();m.text=p||xB;const C=MB(c,m).style("font-size",s).style("font-weight",a).style("font-family",f),x=(C._groups||C)[0][0].getBBox();if(x.width===0&&x.height===0)throw new Error("svg element not in render tree");g.width=Math.round(Math.max(g.width,x.width)),d=Math.round(x.height),g.height+=d,g.lineHeight=Math.round(Math.max(g.lineHeight,d))}l.push(g)}c.remove();const u=isNaN(l[1].height)||isNaN(l[1].width)||isNaN(l[1].lineHeight)||l[0].height>l[1].height&&l[0].width>l[1].width&&l[0].lineHeight>l[1].lineHeight?0:1;return l[u]},(e,t)=>`${e}${t.fontSize}${t.fontWeight}${t.fontFamily}`),zi,$B=(zi=class{constructor(t=!1,r){this.count=0,this.count=r?r.length:0,this.next=t?()=>this.count++:()=>Date.now()}},y(zi,"InitIDGenerator"),zi),_s,OB=y(function(e){return _s=_s||document.createElement("div"),e=escape(e).replace(/%26/g,"&").replace(/%23/g,"#").replace(/%3B/g,";"),_s.innerHTML=e,unescape(_s.textContent)},"entityDecode");function Jh(e){return"str"in e}y(Jh,"isDetailedError");var DB=y((e,t,r,i)=>{var s;if(!i)return;const a=(s=e.node())==null?void 0:s.getBBox();a&&e.append("text").text(i).attr("text-anchor","middle").attr("x",a.x+a.width/2).attr("y",-r).attr("class",t)},"insertTitle"),Jo=y(e=>{if(typeof e=="number")return[e,e+"px"];const t=parseInt(e??"",10);return Number.isNaN(t)?[void 0,void 0]:e===String(t)?[t,e+"px"]:[t,e]},"parseFontSize");function tc(e,t){return CB({},e,t)}y(tc,"cleanAndMerge");var $e={assignWithDepth:Xt,wrapLabel:AB,calculateTextHeight:Im,calculateTextWidth:gr,calculateTextDimensions:Kh,cleanAndMerge:tc,detectInit:wB,detectDirective:Fm,isSubstringInArray:SB,interpolateToCurve:Vh,calcLabelPosition:Em,calcCardinalityPosition:vB,calcTerminalLabelPosition:$m,formatUrl:Mm,getStylesFromArray:Om,generateId:BB,random:LB,runFunc:_B,entityDecode:OB,insertTitle:DB,isLabelCoordinateInPath:Pm,parseFontSize:Jo,InitIDGenerator:$B},IB=y(function(e){let t=e;return t=t.replace(/style.*:\S*#.*;/g,function(r){return r.substring(0,r.length-1)}),t=t.replace(/classDef.*:\S*#.*;/g,function(r){return r.substring(0,r.length-1)}),t=t.replace(/#\w+;/g,function(r){const i=r.substring(1,r.length-1);return/^\+?\d+$/.test(i)?"fl°°"+i+"¶ß":"fl°"+i+"¶ß"}),t},"encodeEntities"),Kr=y(function(e){return e.replace(/fl°°/g,"&#").replace(/fl°/g,"&").replace(/¶ß/g,";")},"decodeEntities"),w3=y((e,t,{counter:r=0,prefix:i,suffix:a},s)=>s||`${i?`${i}_`:""}${e}_${t}_${r}${a?`_${a}`:""}`,"getEdgeId");function jt(e){return e??null}y(jt,"handleUndefinedAttr");function Pm(e,t){const r=Math.round(e.x),i=Math.round(e.y),a=t.replace(/(\d+\.\d+)/g,s=>Math.round(parseFloat(s)).toString());return a.includes(r.toString())||a.includes(i.toString())}y(Pm,"isLabelCoordinateInPath");var ec=y(({flowchart:e})=>{var a,s;const t=((a=e==null?void 0:e.subGraphTitleMargin)==null?void 0:a.top)??0,r=((s=e==null?void 0:e.subGraphTitleMargin)==null?void 0:s.bottom)??0,i=t+r;return{subGraphTitleTopMargin:t,subGraphTitleBottomMargin:r,subGraphTitleTotalMargin:i}},"getSubGraphTitleMargins");async function Rm(e,t){const r=e.getElementsByTagName("img");if(!r||r.length===0)return;const i=t.replace(/<img[^>]*>/g,"").trim()==="";await Promise.all([...r].map(a=>new Promise(s=>{function o(){if(a.style.display="flex",a.style.flexDirection="column",i){const n=Bt().fontSize?Bt().fontSize:window.getComputedStyle(document.body).fontSize,l=5,[h=xg.fontSize]=Jo(n),c=h*l+"px";a.style.minWidth=c,a.style.maxWidth=c}else a.style.width="100%";s(a)}y(o,"setupImage"),setTimeout(()=>{a.complete&&o()}),a.addEventListener("error",o),a.addEventListener("load",o)})))}y(Rm,"configureLabelImages");const PB=Object.freeze({left:0,top:0,width:16,height:16}),vo=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),Nm=Object.freeze({...PB,...vo}),RB=Object.freeze({...Nm,body:"",hidden:!1}),NB=Object.freeze({width:null,height:null}),qB=Object.freeze({...NB,...vo}),WB=(e,t,r,i="")=>{const a=e.split(":");if(e.slice(0,1)==="@"){if(a.length<2||a.length>3)return null;i=a.shift().slice(1)}if(a.length>3||!a.length)return null;if(a.length>1){const n=a.pop(),l=a.pop(),h={provider:a.length>0?a[0]:i,prefix:l,name:n};return Gn(h)?h:null}const s=a[0],o=s.split("-");if(o.length>1){const n={provider:i,prefix:o.shift(),name:o.join("-")};return Gn(n)?n:null}if(r&&i===""){const n={provider:i,prefix:"",name:s};return Gn(n,r)?n:null}return null},Gn=(e,t)=>e?!!((t&&e.prefix===""||e.prefix)&&e.name):!1;function zB(e,t){const r={};!e.hFlip!=!t.hFlip&&(r.hFlip=!0),!e.vFlip!=!t.vFlip&&(r.vFlip=!0);const i=((e.rotate||0)+(t.rotate||0))%4;return i&&(r.rotate=i),r}function sd(e,t){const r=zB(e,t);for(const i in RB)i in vo?i in e&&!(i in r)&&(r[i]=vo[i]):i in t?r[i]=t[i]:i in e&&(r[i]=e[i]);return r}function HB(e,t){const r=e.icons,i=e.aliases||Object.create(null),a=Object.create(null);function s(o){if(r[o])return a[o]=[];if(!(o in a)){a[o]=null;const n=i[o]&&i[o].parent,l=n&&s(n);l&&(a[o]=[n].concat(l))}return a[o]}return(t||Object.keys(r).concat(Object.keys(i))).forEach(s),a}function od(e,t,r){const i=e.icons,a=e.aliases||Object.create(null);let s={};function o(n){s=sd(i[n]||a[n],s)}return o(t),r.forEach(o),sd(e,s)}function UB(e,t){if(e.icons[t])return od(e,t,[]);const r=HB(e,[t])[t];return r?od(e,t,r):null}const YB=/(-?[0-9.]*[0-9]+[0-9.]*)/g,GB=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function nd(e,t,r){if(t===1)return e;if(r=r||100,typeof e=="number")return Math.ceil(e*t*r)/r;if(typeof e!="string")return e;const i=e.split(YB);if(i===null||!i.length)return e;const a=[];let s=i.shift(),o=GB.test(s);for(;;){if(o){const n=parseFloat(s);isNaN(n)?a.push(s):a.push(Math.ceil(n*t*r)/r)}else a.push(s);if(s=i.shift(),s===void 0)return a.join("");o=!o}}function XB(e,t="defs"){let r="";const i=e.indexOf("<"+t);for(;i>=0;){const a=e.indexOf(">",i),s=e.indexOf("</"+t);if(a===-1||s===-1)break;const o=e.indexOf(">",s);if(o===-1)break;r+=e.slice(a+1,s).trim(),e=e.slice(0,i).trim()+e.slice(o+1)}return{defs:r,content:e}}function jB(e,t){return e?"<defs>"+e+"</defs>"+t:t}function VB(e,t,r){const i=XB(e);return jB(i.defs,t+i.content+r)}const ZB=e=>e==="unset"||e==="undefined"||e==="none";function QB(e,t){const r={...Nm,...e},i={...qB,...t},a={left:r.left,top:r.top,width:r.width,height:r.height};let s=r.body;[r,i].forEach(p=>{const m=[],C=p.hFlip,x=p.vFlip;let k=p.rotate;C?x?k+=2:(m.push("translate("+(a.width+a.left).toString()+" "+(0-a.top).toString()+")"),m.push("scale(-1 1)"),a.top=a.left=0):x&&(m.push("translate("+(0-a.left).toString()+" "+(a.height+a.top).toString()+")"),m.push("scale(1 -1)"),a.top=a.left=0);let w;switch(k<0&&(k-=Math.floor(k/4)*4),k=k%4,k){case 1:w=a.height/2+a.top,m.unshift("rotate(90 "+w.toString()+" "+w.toString()+")");break;case 2:m.unshift("rotate(180 "+(a.width/2+a.left).toString()+" "+(a.height/2+a.top).toString()+")");break;case 3:w=a.width/2+a.left,m.unshift("rotate(-90 "+w.toString()+" "+w.toString()+")");break}k%2===1&&(a.left!==a.top&&(w=a.left,a.left=a.top,a.top=w),a.width!==a.height&&(w=a.width,a.width=a.height,a.height=w)),m.length&&(s=VB(s,'<g transform="'+m.join(" ")+'">',"</g>"))});const o=i.width,n=i.height,l=a.width,h=a.height;let c,u;o===null?(u=n===null?"1em":n==="auto"?h:n,c=nd(u,l/h)):(c=o==="auto"?l:o,u=n===null?nd(c,h/l):n==="auto"?h:n);const f={},d=(p,m)=>{ZB(m)||(f[p]=m.toString())};d("width",c),d("height",u);const g=[a.left,a.top,l,h];return f.viewBox=g.join(" "),{attributes:f,viewBox:g,body:s}}const KB=/\sid="(\S+)"/g,ld=new Map;function JB(e){e=e.replace(/[0-9]+$/,"")||"a";const t=ld.get(e)||0;return ld.set(e,t+1),t?`${e}${t}`:e}function tL(e){const t=[];let r;for(;r=KB.exec(e);)t.push(r[1]);if(!t.length)return e;const i="suffix"+(Math.random()*16777216|Date.now()).toString(16);return t.forEach(a=>{const s=JB(a),o=a.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");e=e.replace(new RegExp('([#;"])('+o+')([")]|\\.[a-z])',"g"),"$1"+s+i+"$3")}),e=e.replace(new RegExp(i,"g"),""),e}function eL(e,t){let r=e.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const i in t)r+=" "+i+'="'+t[i]+'"';return'<svg xmlns="http://www.w3.org/2000/svg"'+r+">"+e+"</svg>"}var rL={body:'<g><rect width="80" height="80" style="fill: #087ebf; stroke-width: 0px;"/><text transform="translate(21.16 64.67)" style="fill: #fff; font-family: ArialMT, Arial; font-size: 67.75px;"><tspan x="0" y="0">?</tspan></text></g>',height:80,width:80},zl=new Map,qm=new Map,iL=y(e=>{for(const t of e){if(!t.name)throw new Error('Invalid icon loader. Must have a "name" property with non-empty string value.');if(G.debug("Registering icon pack:",t.name),"loader"in t)qm.set(t.name,t.loader);else if("icons"in t)zl.set(t.name,t.icons);else throw G.error("Invalid icon loader:",t),new Error('Invalid icon loader. Must have either "icons" or "loader" property.')}},"registerIconPacks"),Wm=y(async(e,t)=>{const r=WB(e,!0,t!==void 0);if(!r)throw new Error(`Invalid icon name: ${e}`);const i=r.prefix||t;if(!i)throw new Error(`Icon name must contain a prefix: ${e}`);let a=zl.get(i);if(!a){const o=qm.get(i);if(!o)throw new Error(`Icon set not found: ${r.prefix}`);try{a={...await o(),prefix:i},zl.set(i,a)}catch(n){throw G.error(n),new Error(`Failed to load icon set: ${r.prefix}`)}}const s=UB(a,r.name);if(!s)throw new Error(`Icon not found: ${e}`);return s},"getRegisteredIconData"),aL=y(async e=>{try{return await Wm(e),!0}catch{return!1}},"isIconAvailable"),as=y(async(e,t,r)=>{let i;try{i=await Wm(e,t==null?void 0:t.fallbackPrefix)}catch(o){G.error(o),i=rL}const a=QB(i,t),s=eL(tL(a.body),{...a.attributes,...r});return Pe(s,It())},"getIconSVG");function rc(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var ai=rc();function zm(e){ai=e}var Da={exec:()=>null};function Ft(e,t=""){let r=typeof e=="string"?e:e.source,i={replace:(a,s)=>{let o=typeof s=="string"?s:s.source;return o=o.replace(de.caret,"$1"),r=r.replace(a,o),i},getRegex:()=>new RegExp(r,t)};return i}var sL=(()=>{try{return!!new RegExp("(?<=1)(?<!1)")}catch{return!1}})(),de={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:e=>new RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}#`),htmlBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}<(?:[a-z].*>|!--)`,"i")},oL=/^(?:[ \t]*(?:\n|$))+/,nL=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,lL=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,ss=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,hL=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,ic=/(?:[*+-]|\d{1,9}[.)])/,Hm=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,Um=Ft(Hm).replace(/bull/g,ic).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(),cL=Ft(Hm).replace(/bull/g,ic).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(),ac=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,uL=/^[^\n]+/,sc=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,dL=Ft(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",sc).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),fL=Ft(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,ic).getRegex(),tn="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",oc=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,gL=Ft("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",oc).replace("tag",tn).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Ym=Ft(ac).replace("hr",ss).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",tn).getRegex(),pL=Ft(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",Ym).getRegex(),nc={blockquote:pL,code:nL,def:dL,fences:lL,heading:hL,hr:ss,html:gL,lheading:Um,list:fL,newline:oL,paragraph:Ym,table:Da,text:uL},hd=Ft("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",ss).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",tn).getRegex(),mL={...nc,lheading:cL,table:hd,paragraph:Ft(ac).replace("hr",ss).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",hd).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",tn).getRegex()},yL={...nc,html:Ft(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",oc).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:Da,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:Ft(ac).replace("hr",ss).replace("heading",` *#{1,6} *[^
|
|
165
|
-
]`).replace("lheading",Um).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},CL=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,xL=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,Gm=/^( {2,}|\\)\n(?!\s*$)/,bL=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,en=/[\p{P}\p{S}]/u,lc=/[\s\p{P}\p{S}]/u,Xm=/[^\s\p{P}\p{S}]/u,kL=Ft(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,lc).getRegex(),jm=/(?!~)[\p{P}\p{S}]/u,wL=/(?!~)[\s\p{P}\p{S}]/u,TL=/(?:[^\s\p{P}\p{S}]|~)/u,SL=Ft(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",sL?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),Vm=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,_L=Ft(Vm,"u").replace(/punct/g,en).getRegex(),vL=Ft(Vm,"u").replace(/punct/g,jm).getRegex(),Zm="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",BL=Ft(Zm,"gu").replace(/notPunctSpace/g,Xm).replace(/punctSpace/g,lc).replace(/punct/g,en).getRegex(),LL=Ft(Zm,"gu").replace(/notPunctSpace/g,TL).replace(/punctSpace/g,wL).replace(/punct/g,jm).getRegex(),FL=Ft("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,Xm).replace(/punctSpace/g,lc).replace(/punct/g,en).getRegex(),ML=Ft(/\\(punct)/,"gu").replace(/punct/g,en).getRegex(),AL=Ft(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),EL=Ft(oc).replace("(?:-->|$)","-->").getRegex(),$L=Ft("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",EL).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),Bo=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/,OL=Ft(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",Bo).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),Qm=Ft(/^!?\[(label)\]\[(ref)\]/).replace("label",Bo).replace("ref",sc).getRegex(),Km=Ft(/^!?\[(ref)\](?:\[\])?/).replace("ref",sc).getRegex(),DL=Ft("reflink|nolink(?!\\()","g").replace("reflink",Qm).replace("nolink",Km).getRegex(),cd=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,hc={_backpedal:Da,anyPunctuation:ML,autolink:AL,blockSkip:SL,br:Gm,code:xL,del:Da,emStrongLDelim:_L,emStrongRDelimAst:BL,emStrongRDelimUnd:FL,escape:CL,link:OL,nolink:Km,punctuation:kL,reflink:Qm,reflinkSearch:DL,tag:$L,text:bL,url:Da},IL={...hc,link:Ft(/^!?\[(label)\]\((.*?)\)/).replace("label",Bo).getRegex(),reflink:Ft(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Bo).getRegex()},Hl={...hc,emStrongRDelimAst:LL,emStrongLDelim:vL,url:Ft(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",cd).replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:Ft(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",cd).getRegex()},PL={...Hl,br:Ft(Gm).replace("{2,}","*").getRegex(),text:Ft(Hl.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},vs={normal:nc,gfm:mL,pedantic:yL},ga={normal:hc,gfm:Hl,breaks:PL,pedantic:IL},RL={"&":"&","<":"<",">":">",'"':""","'":"'"},ud=e=>RL[e];function Ue(e,t){if(t){if(de.escapeTest.test(e))return e.replace(de.escapeReplace,ud)}else if(de.escapeTestNoEncode.test(e))return e.replace(de.escapeReplaceNoEncode,ud);return e}function dd(e){try{e=encodeURI(e).replace(de.percentDecode,"%")}catch{return null}return e}function fd(e,t){var s;let r=e.replace(de.findPipe,(o,n,l)=>{let h=!1,c=n;for(;--c>=0&&l[c]==="\\";)h=!h;return h?"|":" |"}),i=r.split(de.splitPipe),a=0;if(i[0].trim()||i.shift(),i.length>0&&!((s=i.at(-1))!=null&&s.trim())&&i.pop(),t)if(i.length>t)i.splice(t);else for(;i.length<t;)i.push("");for(;a<i.length;a++)i[a]=i[a].trim().replace(de.slashPipe,"|");return i}function pa(e,t,r){let i=e.length;if(i===0)return"";let a=0;for(;a<i&&e.charAt(i-a-1)===t;)a++;return e.slice(0,i-a)}function NL(e,t){if(e.indexOf(t[1])===-1)return-1;let r=0;for(let i=0;i<e.length;i++)if(e[i]==="\\")i++;else if(e[i]===t[0])r++;else if(e[i]===t[1]&&(r--,r<0))return i;return r>0?-2:-1}function gd(e,t,r,i,a){let s=t.href,o=t.title||null,n=e[1].replace(a.other.outputLinkReplace,"$1");i.state.inLink=!0;let l={type:e[0].charAt(0)==="!"?"image":"link",raw:r,href:s,title:o,text:n,tokens:i.inlineTokens(n)};return i.state.inLink=!1,l}function qL(e,t,r){let i=e.match(r.other.indentCodeCompensation);if(i===null)return t;let a=i[1];return t.split(`
|
|
166
|
-
`).map(s=>{let o=s.match(r.other.beginningSpace);if(o===null)return s;let[n]=o;return n.length>=a.length?s.slice(a.length):s}).join(`
|
|
167
|
-
`)}var Lo=class{constructor(t){Et(this,"options");Et(this,"rules");Et(this,"lexer");this.options=t||ai}space(t){let r=this.rules.block.newline.exec(t);if(r&&r[0].length>0)return{type:"space",raw:r[0]}}code(t){let r=this.rules.block.code.exec(t);if(r){let i=r[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:r[0],codeBlockStyle:"indented",text:this.options.pedantic?i:pa(i,`
|
|
168
|
-
`)}}}fences(t){let r=this.rules.block.fences.exec(t);if(r){let i=r[0],a=qL(i,r[3]||"",this.rules);return{type:"code",raw:i,lang:r[2]?r[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):r[2],text:a}}}heading(t){let r=this.rules.block.heading.exec(t);if(r){let i=r[2].trim();if(this.rules.other.endingHash.test(i)){let a=pa(i,"#");(this.options.pedantic||!a||this.rules.other.endingSpaceChar.test(a))&&(i=a.trim())}return{type:"heading",raw:r[0],depth:r[1].length,text:i,tokens:this.lexer.inline(i)}}}hr(t){let r=this.rules.block.hr.exec(t);if(r)return{type:"hr",raw:pa(r[0],`
|
|
169
|
-
`)}}blockquote(t){let r=this.rules.block.blockquote.exec(t);if(r){let i=pa(r[0],`
|
|
170
|
-
`).split(`
|
|
171
|
-
`),a="",s="",o=[];for(;i.length>0;){let n=!1,l=[],h;for(h=0;h<i.length;h++)if(this.rules.other.blockquoteStart.test(i[h]))l.push(i[h]),n=!0;else if(!n)l.push(i[h]);else break;i=i.slice(h);let c=l.join(`
|
|
172
|
-
`),u=c.replace(this.rules.other.blockquoteSetextReplace,`
|
|
173
|
-
$1`).replace(this.rules.other.blockquoteSetextReplace2,"");a=a?`${a}
|
|
174
|
-
${c}`:c,s=s?`${s}
|
|
175
|
-
${u}`:u;let f=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(u,o,!0),this.lexer.state.top=f,i.length===0)break;let d=o.at(-1);if((d==null?void 0:d.type)==="code")break;if((d==null?void 0:d.type)==="blockquote"){let g=d,p=g.raw+`
|
|
176
|
-
`+i.join(`
|
|
177
|
-
`),m=this.blockquote(p);o[o.length-1]=m,a=a.substring(0,a.length-g.raw.length)+m.raw,s=s.substring(0,s.length-g.text.length)+m.text;break}else if((d==null?void 0:d.type)==="list"){let g=d,p=g.raw+`
|
|
178
|
-
`+i.join(`
|
|
179
|
-
`),m=this.list(p);o[o.length-1]=m,a=a.substring(0,a.length-d.raw.length)+m.raw,s=s.substring(0,s.length-g.raw.length)+m.raw,i=p.substring(o.at(-1).raw.length).split(`
|
|
180
|
-
`);continue}}return{type:"blockquote",raw:a,tokens:o,text:s}}}list(t){let r=this.rules.block.list.exec(t);if(r){let i=r[1].trim(),a=i.length>1,s={type:"list",raw:"",ordered:a,start:a?+i.slice(0,-1):"",loose:!1,items:[]};i=a?`\\d{1,9}\\${i.slice(-1)}`:`\\${i}`,this.options.pedantic&&(i=a?i:"[*+-]");let o=this.rules.other.listItemRegex(i),n=!1;for(;t;){let h=!1,c="",u="";if(!(r=o.exec(t))||this.rules.block.hr.test(t))break;c=r[0],t=t.substring(c.length);let f=r[2].split(`
|
|
181
|
-
`,1)[0].replace(this.rules.other.listReplaceTabs,x=>" ".repeat(3*x.length)),d=t.split(`
|
|
182
|
-
`,1)[0],g=!f.trim(),p=0;if(this.options.pedantic?(p=2,u=f.trimStart()):g?p=r[1].length+1:(p=r[2].search(this.rules.other.nonSpaceChar),p=p>4?1:p,u=f.slice(p),p+=r[1].length),g&&this.rules.other.blankLine.test(d)&&(c+=d+`
|
|
183
|
-
`,t=t.substring(d.length+1),h=!0),!h){let x=this.rules.other.nextBulletRegex(p),k=this.rules.other.hrRegex(p),w=this.rules.other.fencesBeginRegex(p),S=this.rules.other.headingBeginRegex(p),_=this.rules.other.htmlBeginRegex(p);for(;t;){let v=t.split(`
|
|
184
|
-
`,1)[0],D;if(d=v,this.options.pedantic?(d=d.replace(this.rules.other.listReplaceNesting," "),D=d):D=d.replace(this.rules.other.tabCharGlobal," "),w.test(d)||S.test(d)||_.test(d)||x.test(d)||k.test(d))break;if(D.search(this.rules.other.nonSpaceChar)>=p||!d.trim())u+=`
|
|
185
|
-
`+D.slice(p);else{if(g||f.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||w.test(f)||S.test(f)||k.test(f))break;u+=`
|
|
186
|
-
`+d}!g&&!d.trim()&&(g=!0),c+=v+`
|
|
187
|
-
`,t=t.substring(v.length+1),f=D.slice(p)}}s.loose||(n?s.loose=!0:this.rules.other.doubleBlankLine.test(c)&&(n=!0));let m=null,C;this.options.gfm&&(m=this.rules.other.listIsTask.exec(u),m&&(C=m[0]!=="[ ] ",u=u.replace(this.rules.other.listReplaceTask,""))),s.items.push({type:"list_item",raw:c,task:!!m,checked:C,loose:!1,text:u,tokens:[]}),s.raw+=c}let l=s.items.at(-1);if(l)l.raw=l.raw.trimEnd(),l.text=l.text.trimEnd();else return;s.raw=s.raw.trimEnd();for(let h=0;h<s.items.length;h++)if(this.lexer.state.top=!1,s.items[h].tokens=this.lexer.blockTokens(s.items[h].text,[]),!s.loose){let c=s.items[h].tokens.filter(f=>f.type==="space"),u=c.length>0&&c.some(f=>this.rules.other.anyLine.test(f.raw));s.loose=u}if(s.loose)for(let h=0;h<s.items.length;h++)s.items[h].loose=!0;return s}}html(t){let r=this.rules.block.html.exec(t);if(r)return{type:"html",block:!0,raw:r[0],pre:r[1]==="pre"||r[1]==="script"||r[1]==="style",text:r[0]}}def(t){let r=this.rules.block.def.exec(t);if(r){let i=r[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),a=r[2]?r[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",s=r[3]?r[3].substring(1,r[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):r[3];return{type:"def",tag:i,raw:r[0],href:a,title:s}}}table(t){var n;let r=this.rules.block.table.exec(t);if(!r||!this.rules.other.tableDelimiter.test(r[2]))return;let i=fd(r[1]),a=r[2].replace(this.rules.other.tableAlignChars,"").split("|"),s=(n=r[3])!=null&&n.trim()?r[3].replace(this.rules.other.tableRowBlankLine,"").split(`
|
|
188
|
-
`):[],o={type:"table",raw:r[0],header:[],align:[],rows:[]};if(i.length===a.length){for(let l of a)this.rules.other.tableAlignRight.test(l)?o.align.push("right"):this.rules.other.tableAlignCenter.test(l)?o.align.push("center"):this.rules.other.tableAlignLeft.test(l)?o.align.push("left"):o.align.push(null);for(let l=0;l<i.length;l++)o.header.push({text:i[l],tokens:this.lexer.inline(i[l]),header:!0,align:o.align[l]});for(let l of s)o.rows.push(fd(l,o.header.length).map((h,c)=>({text:h,tokens:this.lexer.inline(h),header:!1,align:o.align[c]})));return o}}lheading(t){let r=this.rules.block.lheading.exec(t);if(r)return{type:"heading",raw:r[0],depth:r[2].charAt(0)==="="?1:2,text:r[1],tokens:this.lexer.inline(r[1])}}paragraph(t){let r=this.rules.block.paragraph.exec(t);if(r){let i=r[1].charAt(r[1].length-1)===`
|
|
189
|
-
`?r[1].slice(0,-1):r[1];return{type:"paragraph",raw:r[0],text:i,tokens:this.lexer.inline(i)}}}text(t){let r=this.rules.block.text.exec(t);if(r)return{type:"text",raw:r[0],text:r[0],tokens:this.lexer.inline(r[0])}}escape(t){let r=this.rules.inline.escape.exec(t);if(r)return{type:"escape",raw:r[0],text:r[1]}}tag(t){let r=this.rules.inline.tag.exec(t);if(r)return!this.lexer.state.inLink&&this.rules.other.startATag.test(r[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(r[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(r[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(r[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:r[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:r[0]}}link(t){let r=this.rules.inline.link.exec(t);if(r){let i=r[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(i)){if(!this.rules.other.endAngleBracket.test(i))return;let o=pa(i.slice(0,-1),"\\");if((i.length-o.length)%2===0)return}else{let o=NL(r[2],"()");if(o===-2)return;if(o>-1){let n=(r[0].indexOf("!")===0?5:4)+r[1].length+o;r[2]=r[2].substring(0,o),r[0]=r[0].substring(0,n).trim(),r[3]=""}}let a=r[2],s="";if(this.options.pedantic){let o=this.rules.other.pedanticHrefTitle.exec(a);o&&(a=o[1],s=o[3])}else s=r[3]?r[3].slice(1,-1):"";return a=a.trim(),this.rules.other.startAngleBracket.test(a)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(i)?a=a.slice(1):a=a.slice(1,-1)),gd(r,{href:a&&a.replace(this.rules.inline.anyPunctuation,"$1"),title:s&&s.replace(this.rules.inline.anyPunctuation,"$1")},r[0],this.lexer,this.rules)}}reflink(t,r){let i;if((i=this.rules.inline.reflink.exec(t))||(i=this.rules.inline.nolink.exec(t))){let a=(i[2]||i[1]).replace(this.rules.other.multipleSpaceGlobal," "),s=r[a.toLowerCase()];if(!s){let o=i[0].charAt(0);return{type:"text",raw:o,text:o}}return gd(i,s,i[0],this.lexer,this.rules)}}emStrong(t,r,i=""){let a=this.rules.inline.emStrongLDelim.exec(t);if(!(!a||a[3]&&i.match(this.rules.other.unicodeAlphaNumeric))&&(!(a[1]||a[2])||!i||this.rules.inline.punctuation.exec(i))){let s=[...a[0]].length-1,o,n,l=s,h=0,c=a[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(c.lastIndex=0,r=r.slice(-1*t.length+s);(a=c.exec(r))!=null;){if(o=a[1]||a[2]||a[3]||a[4]||a[5]||a[6],!o)continue;if(n=[...o].length,a[3]||a[4]){l+=n;continue}else if((a[5]||a[6])&&s%3&&!((s+n)%3)){h+=n;continue}if(l-=n,l>0)continue;n=Math.min(n,n+l+h);let u=[...a[0]][0].length,f=t.slice(0,s+a.index+u+n);if(Math.min(s,n)%2){let g=f.slice(1,-1);return{type:"em",raw:f,text:g,tokens:this.lexer.inlineTokens(g)}}let d=f.slice(2,-2);return{type:"strong",raw:f,text:d,tokens:this.lexer.inlineTokens(d)}}}}codespan(t){let r=this.rules.inline.code.exec(t);if(r){let i=r[2].replace(this.rules.other.newLineCharGlobal," "),a=this.rules.other.nonSpaceChar.test(i),s=this.rules.other.startingSpaceChar.test(i)&&this.rules.other.endingSpaceChar.test(i);return a&&s&&(i=i.substring(1,i.length-1)),{type:"codespan",raw:r[0],text:i}}}br(t){let r=this.rules.inline.br.exec(t);if(r)return{type:"br",raw:r[0]}}del(t){let r=this.rules.inline.del.exec(t);if(r)return{type:"del",raw:r[0],text:r[2],tokens:this.lexer.inlineTokens(r[2])}}autolink(t){let r=this.rules.inline.autolink.exec(t);if(r){let i,a;return r[2]==="@"?(i=r[1],a="mailto:"+i):(i=r[1],a=i),{type:"link",raw:r[0],text:i,href:a,tokens:[{type:"text",raw:i,text:i}]}}}url(t){var i;let r;if(r=this.rules.inline.url.exec(t)){let a,s;if(r[2]==="@")a=r[0],s="mailto:"+a;else{let o;do o=r[0],r[0]=((i=this.rules.inline._backpedal.exec(r[0]))==null?void 0:i[0])??"";while(o!==r[0]);a=r[0],r[1]==="www."?s="http://"+r[0]:s=r[0]}return{type:"link",raw:r[0],text:a,href:s,tokens:[{type:"text",raw:a,text:a}]}}}inlineText(t){let r=this.rules.inline.text.exec(t);if(r){let i=this.lexer.state.inRawBlock;return{type:"text",raw:r[0],text:r[0],escaped:i}}}},Me=class Ul{constructor(t){Et(this,"tokens");Et(this,"options");Et(this,"state");Et(this,"tokenizer");Et(this,"inlineQueue");this.tokens=[],this.tokens.links=Object.create(null),this.options=t||ai,this.options.tokenizer=this.options.tokenizer||new Lo,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:de,block:vs.normal,inline:ga.normal};this.options.pedantic?(r.block=vs.pedantic,r.inline=ga.pedantic):this.options.gfm&&(r.block=vs.gfm,this.options.breaks?r.inline=ga.breaks:r.inline=ga.gfm),this.tokenizer.rules=r}static get rules(){return{block:vs,inline:ga}}static lex(t,r){return new Ul(r).lex(t)}static lexInline(t,r){return new Ul(r).inlineTokens(t)}lex(t){t=t.replace(de.carriageReturn,`
|
|
190
|
-
`),this.blockTokens(t,this.tokens);for(let r=0;r<this.inlineQueue.length;r++){let i=this.inlineQueue[r];this.inlineTokens(i.src,i.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(t,r=[],i=!1){var a,s,o;for(this.options.pedantic&&(t=t.replace(de.tabCharGlobal," ").replace(de.spaceLine,""));t;){let n;if((s=(a=this.options.extensions)==null?void 0:a.block)!=null&&s.some(h=>(n=h.call({lexer:this},t,r))?(t=t.substring(n.raw.length),r.push(n),!0):!1))continue;if(n=this.tokenizer.space(t)){t=t.substring(n.raw.length);let h=r.at(-1);n.raw.length===1&&h!==void 0?h.raw+=`
|
|
191
|
-
`:r.push(n);continue}if(n=this.tokenizer.code(t)){t=t.substring(n.raw.length);let h=r.at(-1);(h==null?void 0:h.type)==="paragraph"||(h==null?void 0:h.type)==="text"?(h.raw+=(h.raw.endsWith(`
|
|
192
|
-
`)?"":`
|
|
193
|
-
`)+n.raw,h.text+=`
|
|
194
|
-
`+n.text,this.inlineQueue.at(-1).src=h.text):r.push(n);continue}if(n=this.tokenizer.fences(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.heading(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.hr(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.blockquote(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.list(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.html(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.def(t)){t=t.substring(n.raw.length);let h=r.at(-1);(h==null?void 0:h.type)==="paragraph"||(h==null?void 0:h.type)==="text"?(h.raw+=(h.raw.endsWith(`
|
|
195
|
-
`)?"":`
|
|
196
|
-
`)+n.raw,h.text+=`
|
|
197
|
-
`+n.raw,this.inlineQueue.at(-1).src=h.text):this.tokens.links[n.tag]||(this.tokens.links[n.tag]={href:n.href,title:n.title},r.push(n));continue}if(n=this.tokenizer.table(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.lheading(t)){t=t.substring(n.raw.length),r.push(n);continue}let l=t;if((o=this.options.extensions)!=null&&o.startBlock){let h=1/0,c=t.slice(1),u;this.options.extensions.startBlock.forEach(f=>{u=f.call({lexer:this},c),typeof u=="number"&&u>=0&&(h=Math.min(h,u))}),h<1/0&&h>=0&&(l=t.substring(0,h+1))}if(this.state.top&&(n=this.tokenizer.paragraph(l))){let h=r.at(-1);i&&(h==null?void 0:h.type)==="paragraph"?(h.raw+=(h.raw.endsWith(`
|
|
198
|
-
`)?"":`
|
|
199
|
-
`)+n.raw,h.text+=`
|
|
200
|
-
`+n.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=h.text):r.push(n),i=l.length!==t.length,t=t.substring(n.raw.length);continue}if(n=this.tokenizer.text(t)){t=t.substring(n.raw.length);let h=r.at(-1);(h==null?void 0:h.type)==="text"?(h.raw+=(h.raw.endsWith(`
|
|
201
|
-
`)?"":`
|
|
202
|
-
`)+n.raw,h.text+=`
|
|
203
|
-
`+n.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=h.text):r.push(n);continue}if(t){let h="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(h);break}else throw new Error(h)}}return this.state.top=!0,r}inline(t,r=[]){return this.inlineQueue.push({src:t,tokens:r}),r}inlineTokens(t,r=[]){var l,h,c,u,f;let i=t,a=null;if(this.tokens.links){let d=Object.keys(this.tokens.links);if(d.length>0)for(;(a=this.tokenizer.rules.inline.reflinkSearch.exec(i))!=null;)d.includes(a[0].slice(a[0].lastIndexOf("[")+1,-1))&&(i=i.slice(0,a.index)+"["+"a".repeat(a[0].length-2)+"]"+i.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(a=this.tokenizer.rules.inline.anyPunctuation.exec(i))!=null;)i=i.slice(0,a.index)+"++"+i.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);let s;for(;(a=this.tokenizer.rules.inline.blockSkip.exec(i))!=null;)s=a[2]?a[2].length:0,i=i.slice(0,a.index+s)+"["+"a".repeat(a[0].length-s-2)+"]"+i.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);i=((h=(l=this.options.hooks)==null?void 0:l.emStrongMask)==null?void 0:h.call({lexer:this},i))??i;let o=!1,n="";for(;t;){o||(n=""),o=!1;let d;if((u=(c=this.options.extensions)==null?void 0:c.inline)!=null&&u.some(p=>(d=p.call({lexer:this},t,r))?(t=t.substring(d.raw.length),r.push(d),!0):!1))continue;if(d=this.tokenizer.escape(t)){t=t.substring(d.raw.length),r.push(d);continue}if(d=this.tokenizer.tag(t)){t=t.substring(d.raw.length),r.push(d);continue}if(d=this.tokenizer.link(t)){t=t.substring(d.raw.length),r.push(d);continue}if(d=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(d.raw.length);let p=r.at(-1);d.type==="text"&&(p==null?void 0:p.type)==="text"?(p.raw+=d.raw,p.text+=d.text):r.push(d);continue}if(d=this.tokenizer.emStrong(t,i,n)){t=t.substring(d.raw.length),r.push(d);continue}if(d=this.tokenizer.codespan(t)){t=t.substring(d.raw.length),r.push(d);continue}if(d=this.tokenizer.br(t)){t=t.substring(d.raw.length),r.push(d);continue}if(d=this.tokenizer.del(t)){t=t.substring(d.raw.length),r.push(d);continue}if(d=this.tokenizer.autolink(t)){t=t.substring(d.raw.length),r.push(d);continue}if(!this.state.inLink&&(d=this.tokenizer.url(t))){t=t.substring(d.raw.length),r.push(d);continue}let g=t;if((f=this.options.extensions)!=null&&f.startInline){let p=1/0,m=t.slice(1),C;this.options.extensions.startInline.forEach(x=>{C=x.call({lexer:this},m),typeof C=="number"&&C>=0&&(p=Math.min(p,C))}),p<1/0&&p>=0&&(g=t.substring(0,p+1))}if(d=this.tokenizer.inlineText(g)){t=t.substring(d.raw.length),d.raw.slice(-1)!=="_"&&(n=d.raw.slice(-1)),o=!0;let p=r.at(-1);(p==null?void 0:p.type)==="text"?(p.raw+=d.raw,p.text+=d.text):r.push(d);continue}if(t){let p="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(p);break}else throw new Error(p)}}return r}},Fo=class{constructor(t){Et(this,"options");Et(this,"parser");this.options=t||ai}space(t){return""}code({text:t,lang:r,escaped:i}){var o;let a=(o=(r||"").match(de.notSpaceStart))==null?void 0:o[0],s=t.replace(de.endingNewline,"")+`
|
|
204
|
-
`;return a?'<pre><code class="language-'+Ue(a)+'">'+(i?s:Ue(s,!0))+`</code></pre>
|
|
205
|
-
`:"<pre><code>"+(i?s:Ue(s,!0))+`</code></pre>
|
|
206
|
-
`}blockquote({tokens:t}){return`<blockquote>
|
|
207
|
-
${this.parser.parse(t)}</blockquote>
|
|
208
|
-
`}html({text:t}){return t}def(t){return""}heading({tokens:t,depth:r}){return`<h${r}>${this.parser.parseInline(t)}</h${r}>
|
|
209
|
-
`}hr(t){return`<hr>
|
|
210
|
-
`}list(t){let r=t.ordered,i=t.start,a="";for(let n=0;n<t.items.length;n++){let l=t.items[n];a+=this.listitem(l)}let s=r?"ol":"ul",o=r&&i!==1?' start="'+i+'"':"";return"<"+s+o+`>
|
|
211
|
-
`+a+"</"+s+`>
|
|
212
|
-
`}listitem(t){var i;let r="";if(t.task){let a=this.checkbox({checked:!!t.checked});t.loose?((i=t.tokens[0])==null?void 0:i.type)==="paragraph"?(t.tokens[0].text=a+" "+t.tokens[0].text,t.tokens[0].tokens&&t.tokens[0].tokens.length>0&&t.tokens[0].tokens[0].type==="text"&&(t.tokens[0].tokens[0].text=a+" "+Ue(t.tokens[0].tokens[0].text),t.tokens[0].tokens[0].escaped=!0)):t.tokens.unshift({type:"text",raw:a+" ",text:a+" ",escaped:!0}):r+=a+" "}return r+=this.parser.parse(t.tokens,!!t.loose),`<li>${r}</li>
|
|
213
|
-
`}checkbox({checked:t}){return"<input "+(t?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph({tokens:t}){return`<p>${this.parser.parseInline(t)}</p>
|
|
214
|
-
`}table(t){let r="",i="";for(let s=0;s<t.header.length;s++)i+=this.tablecell(t.header[s]);r+=this.tablerow({text:i});let a="";for(let s=0;s<t.rows.length;s++){let o=t.rows[s];i="";for(let n=0;n<o.length;n++)i+=this.tablecell(o[n]);a+=this.tablerow({text:i})}return a&&(a=`<tbody>${a}</tbody>`),`<table>
|
|
215
|
-
<thead>
|
|
216
|
-
`+r+`</thead>
|
|
217
|
-
`+a+`</table>
|
|
218
|
-
`}tablerow({text:t}){return`<tr>
|
|
219
|
-
${t}</tr>
|
|
220
|
-
`}tablecell(t){let r=this.parser.parseInline(t.tokens),i=t.header?"th":"td";return(t.align?`<${i} align="${t.align}">`:`<${i}>`)+r+`</${i}>
|
|
221
|
-
`}strong({tokens:t}){return`<strong>${this.parser.parseInline(t)}</strong>`}em({tokens:t}){return`<em>${this.parser.parseInline(t)}</em>`}codespan({text:t}){return`<code>${Ue(t,!0)}</code>`}br(t){return"<br>"}del({tokens:t}){return`<del>${this.parser.parseInline(t)}</del>`}link({href:t,title:r,tokens:i}){let a=this.parser.parseInline(i),s=dd(t);if(s===null)return a;t=s;let o='<a href="'+t+'"';return r&&(o+=' title="'+Ue(r)+'"'),o+=">"+a+"</a>",o}image({href:t,title:r,text:i,tokens:a}){a&&(i=this.parser.parseInline(a,this.parser.textRenderer));let s=dd(t);if(s===null)return Ue(i);t=s;let o=`<img src="${t}" alt="${i}"`;return r&&(o+=` title="${Ue(r)}"`),o+=">",o}text(t){return"tokens"in t&&t.tokens?this.parser.parseInline(t.tokens):"escaped"in t&&t.escaped?t.text:Ue(t.text)}},cc=class{strong({text:t}){return t}em({text:t}){return t}codespan({text:t}){return t}del({text:t}){return t}html({text:t}){return t}text({text:t}){return t}link({text:t}){return""+t}image({text:t}){return""+t}br(){return""}},Ae=class Yl{constructor(t){Et(this,"options");Et(this,"renderer");Et(this,"textRenderer");this.options=t||ai,this.options.renderer=this.options.renderer||new Fo,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new cc}static parse(t,r){return new Yl(r).parse(t)}static parseInline(t,r){return new Yl(r).parseInline(t)}parse(t,r=!0){var a,s;let i="";for(let o=0;o<t.length;o++){let n=t[o];if((s=(a=this.options.extensions)==null?void 0:a.renderers)!=null&&s[n.type]){let h=n,c=this.options.extensions.renderers[h.type].call({parser:this},h);if(c!==!1||!["space","hr","heading","code","table","blockquote","list","html","def","paragraph","text"].includes(h.type)){i+=c||"";continue}}let l=n;switch(l.type){case"space":{i+=this.renderer.space(l);continue}case"hr":{i+=this.renderer.hr(l);continue}case"heading":{i+=this.renderer.heading(l);continue}case"code":{i+=this.renderer.code(l);continue}case"table":{i+=this.renderer.table(l);continue}case"blockquote":{i+=this.renderer.blockquote(l);continue}case"list":{i+=this.renderer.list(l);continue}case"html":{i+=this.renderer.html(l);continue}case"def":{i+=this.renderer.def(l);continue}case"paragraph":{i+=this.renderer.paragraph(l);continue}case"text":{let h=l,c=this.renderer.text(h);for(;o+1<t.length&&t[o+1].type==="text";)h=t[++o],c+=`
|
|
222
|
-
`+this.renderer.text(h);r?i+=this.renderer.paragraph({type:"paragraph",raw:c,text:c,tokens:[{type:"text",raw:c,text:c,escaped:!0}]}):i+=c;continue}default:{let h='Token with "'+l.type+'" type was not found.';if(this.options.silent)return console.error(h),"";throw new Error(h)}}}return i}parseInline(t,r=this.renderer){var a,s;let i="";for(let o=0;o<t.length;o++){let n=t[o];if((s=(a=this.options.extensions)==null?void 0:a.renderers)!=null&&s[n.type]){let h=this.options.extensions.renderers[n.type].call({parser:this},n);if(h!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(n.type)){i+=h||"";continue}}let l=n;switch(l.type){case"escape":{i+=r.text(l);break}case"html":{i+=r.html(l);break}case"link":{i+=r.link(l);break}case"image":{i+=r.image(l);break}case"strong":{i+=r.strong(l);break}case"em":{i+=r.em(l);break}case"codespan":{i+=r.codespan(l);break}case"br":{i+=r.br(l);break}case"del":{i+=r.del(l);break}case"text":{i+=r.text(l);break}default:{let h='Token with "'+l.type+'" type was not found.';if(this.options.silent)return console.error(h),"";throw new Error(h)}}}return i}},Es,_a=(Es=class{constructor(t){Et(this,"options");Et(this,"block");this.options=t||ai}preprocess(t){return t}postprocess(t){return t}processAllTokens(t){return t}emStrongMask(t){return t}provideLexer(){return this.block?Me.lex:Me.lexInline}provideParser(){return this.block?Ae.parse:Ae.parseInline}},Et(Es,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens","emStrongMask"])),Et(Es,"passThroughHooksRespectAsync",new Set(["preprocess","postprocess","processAllTokens"])),Es),WL=class{constructor(...t){Et(this,"defaults",rc());Et(this,"options",this.setOptions);Et(this,"parse",this.parseMarkdown(!0));Et(this,"parseInline",this.parseMarkdown(!1));Et(this,"Parser",Ae);Et(this,"Renderer",Fo);Et(this,"TextRenderer",cc);Et(this,"Lexer",Me);Et(this,"Tokenizer",Lo);Et(this,"Hooks",_a);this.use(...t)}walkTokens(t,r){var a,s;let i=[];for(let o of t)switch(i=i.concat(r.call(this,o)),o.type){case"table":{let n=o;for(let l of n.header)i=i.concat(this.walkTokens(l.tokens,r));for(let l of n.rows)for(let h of l)i=i.concat(this.walkTokens(h.tokens,r));break}case"list":{let n=o;i=i.concat(this.walkTokens(n.items,r));break}default:{let n=o;(s=(a=this.defaults.extensions)==null?void 0:a.childTokens)!=null&&s[n.type]?this.defaults.extensions.childTokens[n.type].forEach(l=>{let h=n[l].flat(1/0);i=i.concat(this.walkTokens(h,r))}):n.tokens&&(i=i.concat(this.walkTokens(n.tokens,r)))}}return i}use(...t){let r=this.defaults.extensions||{renderers:{},childTokens:{}};return t.forEach(i=>{let a={...i};if(a.async=this.defaults.async||a.async||!1,i.extensions&&(i.extensions.forEach(s=>{if(!s.name)throw new Error("extension name required");if("renderer"in s){let o=r.renderers[s.name];o?r.renderers[s.name]=function(...n){let l=s.renderer.apply(this,n);return l===!1&&(l=o.apply(this,n)),l}:r.renderers[s.name]=s.renderer}if("tokenizer"in s){if(!s.level||s.level!=="block"&&s.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let o=r[s.level];o?o.unshift(s.tokenizer):r[s.level]=[s.tokenizer],s.start&&(s.level==="block"?r.startBlock?r.startBlock.push(s.start):r.startBlock=[s.start]:s.level==="inline"&&(r.startInline?r.startInline.push(s.start):r.startInline=[s.start]))}"childTokens"in s&&s.childTokens&&(r.childTokens[s.name]=s.childTokens)}),a.extensions=r),i.renderer){let s=this.defaults.renderer||new Fo(this.defaults);for(let o in i.renderer){if(!(o in s))throw new Error(`renderer '${o}' does not exist`);if(["options","parser"].includes(o))continue;let n=o,l=i.renderer[n],h=s[n];s[n]=(...c)=>{let u=l.apply(s,c);return u===!1&&(u=h.apply(s,c)),u||""}}a.renderer=s}if(i.tokenizer){let s=this.defaults.tokenizer||new Lo(this.defaults);for(let o in i.tokenizer){if(!(o in s))throw new Error(`tokenizer '${o}' does not exist`);if(["options","rules","lexer"].includes(o))continue;let n=o,l=i.tokenizer[n],h=s[n];s[n]=(...c)=>{let u=l.apply(s,c);return u===!1&&(u=h.apply(s,c)),u}}a.tokenizer=s}if(i.hooks){let s=this.defaults.hooks||new _a;for(let o in i.hooks){if(!(o in s))throw new Error(`hook '${o}' does not exist`);if(["options","block"].includes(o))continue;let n=o,l=i.hooks[n],h=s[n];_a.passThroughHooks.has(o)?s[n]=c=>{if(this.defaults.async&&_a.passThroughHooksRespectAsync.has(o))return(async()=>{let f=await l.call(s,c);return h.call(s,f)})();let u=l.call(s,c);return h.call(s,u)}:s[n]=(...c)=>{if(this.defaults.async)return(async()=>{let f=await l.apply(s,c);return f===!1&&(f=await h.apply(s,c)),f})();let u=l.apply(s,c);return u===!1&&(u=h.apply(s,c)),u}}a.hooks=s}if(i.walkTokens){let s=this.defaults.walkTokens,o=i.walkTokens;a.walkTokens=function(n){let l=[];return l.push(o.call(this,n)),s&&(l=l.concat(s.call(this,n))),l}}this.defaults={...this.defaults,...a}}),this}setOptions(t){return this.defaults={...this.defaults,...t},this}lexer(t,r){return Me.lex(t,r??this.defaults)}parser(t,r){return Ae.parse(t,r??this.defaults)}parseMarkdown(t){return(r,i)=>{let a={...i},s={...this.defaults,...a},o=this.onError(!!s.silent,!!s.async);if(this.defaults.async===!0&&a.async===!1)return o(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof r>"u"||r===null)return o(new Error("marked(): input parameter is undefined or null"));if(typeof r!="string")return o(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(r)+", string expected"));if(s.hooks&&(s.hooks.options=s,s.hooks.block=t),s.async)return(async()=>{let n=s.hooks?await s.hooks.preprocess(r):r,l=await(s.hooks?await s.hooks.provideLexer():t?Me.lex:Me.lexInline)(n,s),h=s.hooks?await s.hooks.processAllTokens(l):l;s.walkTokens&&await Promise.all(this.walkTokens(h,s.walkTokens));let c=await(s.hooks?await s.hooks.provideParser():t?Ae.parse:Ae.parseInline)(h,s);return s.hooks?await s.hooks.postprocess(c):c})().catch(o);try{s.hooks&&(r=s.hooks.preprocess(r));let n=(s.hooks?s.hooks.provideLexer():t?Me.lex:Me.lexInline)(r,s);s.hooks&&(n=s.hooks.processAllTokens(n)),s.walkTokens&&this.walkTokens(n,s.walkTokens);let l=(s.hooks?s.hooks.provideParser():t?Ae.parse:Ae.parseInline)(n,s);return s.hooks&&(l=s.hooks.postprocess(l)),l}catch(n){return o(n)}}}onError(t,r){return i=>{if(i.message+=`
|
|
223
|
-
Please report this to https://github.com/markedjs/marked.`,t){let a="<p>An error occurred:</p><pre>"+Ue(i.message+"",!0)+"</pre>";return r?Promise.resolve(a):a}if(r)return Promise.reject(i);throw i}}},Jr=new WL;function Mt(e,t){return Jr.parse(e,t)}Mt.options=Mt.setOptions=function(e){return Jr.setOptions(e),Mt.defaults=Jr.defaults,zm(Mt.defaults),Mt};Mt.getDefaults=rc;Mt.defaults=ai;Mt.use=function(...e){return Jr.use(...e),Mt.defaults=Jr.defaults,zm(Mt.defaults),Mt};Mt.walkTokens=function(e,t){return Jr.walkTokens(e,t)};Mt.parseInline=Jr.parseInline;Mt.Parser=Ae;Mt.parser=Ae.parse;Mt.Renderer=Fo;Mt.TextRenderer=cc;Mt.Lexer=Me;Mt.lexer=Me.lex;Mt.Tokenizer=Lo;Mt.Hooks=_a;Mt.parse=Mt;Mt.options;Mt.setOptions;Mt.use;Mt.walkTokens;Mt.parseInline;Ae.parse;Me.lex;function Jm(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];var i=Array.from(typeof e=="string"?[e]:e);i[i.length-1]=i[i.length-1].replace(/\r?\n([\t ]*)$/,"");var a=i.reduce(function(n,l){var h=l.match(/\n([\t ]+|(?!\s).)/g);return h?n.concat(h.map(function(c){var u,f;return(f=(u=c.match(/[\t ]/g))===null||u===void 0?void 0:u.length)!==null&&f!==void 0?f:0})):n},[]);if(a.length){var s=new RegExp(`
|
|
224
|
-
[ ]{`+Math.min.apply(Math,a)+"}","g");i=i.map(function(n){return n.replace(s,`
|
|
225
|
-
`)})}i[0]=i[0].replace(/^\r?\n/,"");var o=i[0];return t.forEach(function(n,l){var h=o.match(/(?:^|\n)( *)$/),c=h?h[1]:"",u=n;typeof n=="string"&&n.includes(`
|
|
226
|
-
`)&&(u=String(n).split(`
|
|
227
|
-
`).map(function(f,d){return d===0?f:""+c+f}).join(`
|
|
228
|
-
`)),o+=u+i[l+1]}),o}function ty(e,{markdownAutoWrap:t}){const i=e.replace(/<br\/>/g,`
|
|
229
|
-
`).replace(/\n{2,}/g,`
|
|
230
|
-
`);return Jm(i)}y(ty,"preprocessMarkdown");function ey(e){return e.split(/\\n|\n|<br\s*\/?>/gi).map(t=>{var r;return((r=t.trim().match(/<[^>]+>|[^\s<>]+/g))==null?void 0:r.map(i=>({content:i,type:"normal"})))??[]})}y(ey,"nonMarkdownToLines");function ry(e,t={}){const r=ty(e,t),i=Mt.lexer(r),a=[[]];let s=0;function o(n,l="normal"){n.type==="text"?n.text.split(`
|
|
231
|
-
`).forEach((c,u)=>{u!==0&&(s++,a.push([])),c.split(" ").forEach(f=>{f=f.replace(/'/g,"'"),f&&a[s].push({content:f,type:l})})}):n.type==="strong"||n.type==="em"?n.tokens.forEach(h=>{o(h,n.type)}):n.type==="html"&&a[s].push({content:n.text,type:"normal"})}return y(o,"processNode"),i.forEach(n=>{var l;n.type==="paragraph"?(l=n.tokens)==null||l.forEach(h=>{o(h)}):n.type==="html"?a[s].push({content:n.text,type:"normal"}):a[s].push({content:n.raw,type:"normal"})}),a}y(ry,"markdownToLines");function iy(e){return e?`<p>${e.replace(/\\n|\n/g,"<br />")}</p>`:""}y(iy,"nonMarkdownToHTML");function ay(e,{markdownAutoWrap:t}={}){const r=Mt.lexer(e);function i(a){var s,o,n;return a.type==="text"?t===!1?a.text.replace(/\n */g,"<br/>").replace(/ /g," "):a.text.replace(/\n */g,"<br/>"):a.type==="strong"?`<strong>${(s=a.tokens)==null?void 0:s.map(i).join("")}</strong>`:a.type==="em"?`<em>${(o=a.tokens)==null?void 0:o.map(i).join("")}</em>`:a.type==="paragraph"?`<p>${(n=a.tokens)==null?void 0:n.map(i).join("")}</p>`:a.type==="space"?"":a.type==="html"?`${a.text}`:a.type==="escape"?a.text:(G.warn(`Unsupported markdown: ${a.type}`),a.raw)}return y(i,"output"),r.map(i).join("")}y(ay,"markdownToHTML");function sy(e){return Intl.Segmenter?[...new Intl.Segmenter().segment(e)].map(t=>t.segment):[...e]}y(sy,"splitTextToChars");function oy(e,t){const r=sy(t.content);return uc(e,[],r,t.type)}y(oy,"splitWordToFitWidth");function uc(e,t,r,i){if(r.length===0)return[{content:t.join(""),type:i},{content:"",type:i}];const[a,...s]=r,o=[...t,a];return e([{content:o.join(""),type:i}])?uc(e,o,s,i):(t.length===0&&a&&(t.push(a),r.shift()),[{content:t.join(""),type:i},{content:r.join(""),type:i}])}y(uc,"splitWordToFitWidthRecursion");function ny(e,t){if(e.some(({content:r})=>r.includes(`
|
|
232
|
-
`)))throw new Error("splitLineToFitWidth does not support newlines in the line");return Mo(e,t)}y(ny,"splitLineToFitWidth");function Mo(e,t,r=[],i=[]){if(e.length===0)return i.length>0&&r.push(i),r.length>0?r:[];let a="";e[0].content===" "&&(a=" ",e.shift());const s=e.shift()??{content:" ",type:"normal"},o=[...i];if(a!==""&&o.push({content:a,type:"normal"}),o.push(s),t(o))return Mo(e,t,r,o);if(i.length>0)r.push(i),e.unshift(s);else if(s.content){const[n,l]=oy(t,s);r.push([n]),l.content&&e.unshift(l)}return Mo(e,t,r)}y(Mo,"splitLineToFitWidthRecursion");function Gl(e,t){t&&e.attr("style",t)}y(Gl,"applyStyle");var pd=16384;async function ly(e,t,r,i,a=!1,s=It()){const o=e.append("foreignObject");o.attr("width",`${Math.min(10*r,pd)}px`),o.attr("height",`${Math.min(10*r,pd)}px`);const n=o.append("xhtml:div"),l=qa(t.label)?await Ag(t.label.replace(ts.lineBreakRegex,`
|
|
233
|
-
`),s):Pe(t.label,s),h=t.isNode?"nodeLabel":"edgeLabel",c=n.append("span");c.html(l),Gl(c,t.labelStyle),c.attr("class",`${h} ${i}`),Gl(n,t.labelStyle),n.style("display","table-cell"),n.style("white-space","nowrap"),n.style("line-height","1.5"),r!==Number.POSITIVE_INFINITY&&(n.style("max-width",r+"px"),n.style("text-align","center")),n.attr("xmlns","http://www.w3.org/1999/xhtml"),a&&n.attr("class","labelBkg");let u=n.node().getBoundingClientRect();return u.width===r&&(n.style("display","table"),n.style("white-space","break-spaces"),n.style("width",r+"px"),u=n.node().getBoundingClientRect()),o.node()}y(ly,"addHtmlSpan");function rn(e,t,r,i=!1){const a=e.append("tspan").attr("class","text-outer-tspan").attr("x",0).attr("y",t*r-.1+"em").attr("dy",r+"em");return i&&a.attr("text-anchor","middle"),a}y(rn,"createTspan");function hy(e,t,r){const i=e.append("text"),a=rn(i,1,t);an(a,r);const s=a.node().getComputedTextLength();return i.remove(),s}y(hy,"computeWidthOfText");function zL(e,t,r){var o;const i=e.append("text"),a=rn(i,1,t);an(a,[{content:r,type:"normal"}]);const s=(o=a.node())==null?void 0:o.getBoundingClientRect();return s&&i.remove(),s}y(zL,"computeDimensionOfText");function cy(e,t,r,i=!1,a=!1){const o=t.append("g"),n=o.insert("rect").attr("class","background").attr("style","stroke: none"),l=o.append("text").attr("y","-10.1");a&&l.attr("text-anchor","middle");let h=0;for(const c of r){const u=y(d=>hy(o,1.1,d)<=e,"checkWidth"),f=u(c)?[c]:ny(c,u);for(const d of f){const g=rn(l,h,1.1,a);an(g,d),h++}}if(i){const c=l.node().getBBox(),u=2;return n.attr("x",c.x-u).attr("y",c.y-u).attr("width",c.width+2*u).attr("height",c.height+2*u),o.node()}else return l.node()}y(cy,"createFormattedText");function Xl(e){const t=/&(amp|lt|gt);/g;return e.replace(t,(r,i)=>{switch(i){case"amp":return"&";case"lt":return"<";case"gt":return">";default:return r}})}y(Xl,"decodeHTMLEntities");function an(e,t){e.text(""),t.forEach((r,i)=>{const a=e.append("tspan").attr("font-style",r.type==="em"?"italic":"normal").attr("class","text-inner-tspan").attr("font-weight",r.type==="strong"?"bold":"normal");i===0?a.text(Xl(r.content)):a.text(" "+Xl(r.content))})}y(an,"updateTextContentAndStyles");async function uy(e,t={}){const r=[];e.replace(/(fa[bklrs]?):fa-([\w-]+)/g,(a,s,o)=>(r.push((async()=>{const n=`${s}:${o}`;return await aL(n)?await as(n,void 0,{class:"label-icon"}):`<i class='${Pe(a,t).replace(":"," ")}'></i>`})()),a));const i=await Promise.all(r);return e.replace(/(fa[bklrs]?):fa-([\w-]+)/g,()=>i.shift()??"")}y(uy,"replaceIconSubstring");var tr=y(async(e,t="",{style:r="",isTitle:i=!1,classes:a="",useHtmlLabels:s=!0,markdown:o=!0,isNode:n=!0,width:l=200,addSvgBackground:h=!1}={},c)=>{if(G.debug("XYZ createText",t,r,i,a,s,n,"addSvgBackground: ",h),s){const u=o?ay(t,c):iy(t),f=await uy(Kr(u),c),d=t.replace(/\\\\/g,"\\"),g={isNode:n,label:qa(t)?d:f,labelStyle:r.replace("fill:","color:")};return await ly(e,g,l,a,h,c)}else{const u=Kr(t.replace(/<br\s*\/?>/g,"<br/>")),f=o?ry(u.replace("<br>","<br/>"),c):ey(u),d=cy(l,e,f,t?h:!1,!n);if(n){/stroke:/.exec(r)&&(r=r.replace("stroke:","lineColor:"));const g=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");wt(d).attr("style",g)}else{const g=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/background:/g,"fill:");wt(d).select("rect").attr("style",g.replace(/background:/g,"fill:"));const p=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");wt(d).select("text").attr("style",p)}return i?wt(d).selectAll("tspan.text-outer-tspan").classed("title-row",!0):wt(d).selectAll("tspan.text-outer-tspan").classed("row",!0),d}},"createText");function Xn(e,t,r){if(e&&e.length){const[i,a]=t,s=Math.PI/180*r,o=Math.cos(s),n=Math.sin(s);for(const l of e){const[h,c]=l;l[0]=(h-i)*o-(c-a)*n+i,l[1]=(h-i)*n+(c-a)*o+a}}}function HL(e,t){return e[0]===t[0]&&e[1]===t[1]}function UL(e,t,r,i=1){const a=r,s=Math.max(t,.1),o=e[0]&&e[0][0]&&typeof e[0][0]=="number"?[e]:e,n=[0,0];if(a)for(const h of o)Xn(h,n,a);const l=(function(h,c,u){const f=[];for(const x of h){const k=[...x];HL(k[0],k[k.length-1])||k.push([k[0][0],k[0][1]]),k.length>2&&f.push(k)}const d=[];c=Math.max(c,.1);const g=[];for(const x of f)for(let k=0;k<x.length-1;k++){const w=x[k],S=x[k+1];if(w[1]!==S[1]){const _=Math.min(w[1],S[1]);g.push({ymin:_,ymax:Math.max(w[1],S[1]),x:_===w[1]?w[0]:S[0],islope:(S[0]-w[0])/(S[1]-w[1])})}}if(g.sort(((x,k)=>x.ymin<k.ymin?-1:x.ymin>k.ymin?1:x.x<k.x?-1:x.x>k.x?1:x.ymax===k.ymax?0:(x.ymax-k.ymax)/Math.abs(x.ymax-k.ymax))),!g.length)return d;let p=[],m=g[0].ymin,C=0;for(;p.length||g.length;){if(g.length){let x=-1;for(let k=0;k<g.length&&!(g[k].ymin>m);k++)x=k;g.splice(0,x+1).forEach((k=>{p.push({s:m,edge:k})}))}if(p=p.filter((x=>!(x.edge.ymax<=m))),p.sort(((x,k)=>x.edge.x===k.edge.x?0:(x.edge.x-k.edge.x)/Math.abs(x.edge.x-k.edge.x))),(u!==1||C%c==0)&&p.length>1)for(let x=0;x<p.length;x+=2){const k=x+1;if(k>=p.length)break;const w=p[x].edge,S=p[k].edge;d.push([[Math.round(w.x),m],[Math.round(S.x),m]])}m+=u,p.forEach((x=>{x.edge.x=x.edge.x+u*x.edge.islope})),C++}return d})(o,s,i);if(a){for(const h of o)Xn(h,n,-a);(function(h,c,u){const f=[];h.forEach((d=>f.push(...d))),Xn(f,c,u)})(l,n,-a)}return l}function os(e,t){var r;const i=t.hachureAngle+90;let a=t.hachureGap;a<0&&(a=4*t.strokeWidth),a=Math.round(Math.max(a,.1));let s=1;return t.roughness>=1&&(((r=t.randomizer)===null||r===void 0?void 0:r.next())||Math.random())>.7&&(s=a),UL(e,a,i,s||1)}class dc{constructor(t){this.helper=t}fillPolygons(t,r){return this._fillPolygons(t,r)}_fillPolygons(t,r){const i=os(t,r);return{type:"fillSketch",ops:this.renderLines(i,r)}}renderLines(t,r){const i=[];for(const a of t)i.push(...this.helper.doubleLineOps(a[0][0],a[0][1],a[1][0],a[1][1],r));return i}}function sn(e){const t=e[0],r=e[1];return Math.sqrt(Math.pow(t[0]-r[0],2)+Math.pow(t[1]-r[1],2))}class YL extends dc{fillPolygons(t,r){let i=r.hachureGap;i<0&&(i=4*r.strokeWidth),i=Math.max(i,.1);const a=os(t,Object.assign({},r,{hachureGap:i})),s=Math.PI/180*r.hachureAngle,o=[],n=.5*i*Math.cos(s),l=.5*i*Math.sin(s);for(const[h,c]of a)sn([h,c])&&o.push([[h[0]-n,h[1]+l],[...c]],[[h[0]+n,h[1]-l],[...c]]);return{type:"fillSketch",ops:this.renderLines(o,r)}}}class GL extends dc{fillPolygons(t,r){const i=this._fillPolygons(t,r),a=Object.assign({},r,{hachureAngle:r.hachureAngle+90}),s=this._fillPolygons(t,a);return i.ops=i.ops.concat(s.ops),i}}class XL{constructor(t){this.helper=t}fillPolygons(t,r){const i=os(t,r=Object.assign({},r,{hachureAngle:0}));return this.dotsOnLines(i,r)}dotsOnLines(t,r){const i=[];let a=r.hachureGap;a<0&&(a=4*r.strokeWidth),a=Math.max(a,.1);let s=r.fillWeight;s<0&&(s=r.strokeWidth/2);const o=a/4;for(const n of t){const l=sn(n),h=l/a,c=Math.ceil(h)-1,u=l-c*a,f=(n[0][0]+n[1][0])/2-a/4,d=Math.min(n[0][1],n[1][1]);for(let g=0;g<c;g++){const p=d+u+g*a,m=f-o+2*Math.random()*o,C=p-o+2*Math.random()*o,x=this.helper.ellipse(m,C,s,s,r);i.push(...x.ops)}}return{type:"fillSketch",ops:i}}}class jL{constructor(t){this.helper=t}fillPolygons(t,r){const i=os(t,r);return{type:"fillSketch",ops:this.dashedLine(i,r)}}dashedLine(t,r){const i=r.dashOffset<0?r.hachureGap<0?4*r.strokeWidth:r.hachureGap:r.dashOffset,a=r.dashGap<0?r.hachureGap<0?4*r.strokeWidth:r.hachureGap:r.dashGap,s=[];return t.forEach((o=>{const n=sn(o),l=Math.floor(n/(i+a)),h=(n+a-l*(i+a))/2;let c=o[0],u=o[1];c[0]>u[0]&&(c=o[1],u=o[0]);const f=Math.atan((u[1]-c[1])/(u[0]-c[0]));for(let d=0;d<l;d++){const g=d*(i+a),p=g+i,m=[c[0]+g*Math.cos(f)+h*Math.cos(f),c[1]+g*Math.sin(f)+h*Math.sin(f)],C=[c[0]+p*Math.cos(f)+h*Math.cos(f),c[1]+p*Math.sin(f)+h*Math.sin(f)];s.push(...this.helper.doubleLineOps(m[0],m[1],C[0],C[1],r))}})),s}}class VL{constructor(t){this.helper=t}fillPolygons(t,r){const i=r.hachureGap<0?4*r.strokeWidth:r.hachureGap,a=r.zigzagOffset<0?i:r.zigzagOffset,s=os(t,r=Object.assign({},r,{hachureGap:i+a}));return{type:"fillSketch",ops:this.zigzagLines(s,a,r)}}zigzagLines(t,r,i){const a=[];return t.forEach((s=>{const o=sn(s),n=Math.round(o/(2*r));let l=s[0],h=s[1];l[0]>h[0]&&(l=s[1],h=s[0]);const c=Math.atan((h[1]-l[1])/(h[0]-l[0]));for(let u=0;u<n;u++){const f=2*u*r,d=2*(u+1)*r,g=Math.sqrt(2*Math.pow(r,2)),p=[l[0]+f*Math.cos(c),l[1]+f*Math.sin(c)],m=[l[0]+d*Math.cos(c),l[1]+d*Math.sin(c)],C=[p[0]+g*Math.cos(c+Math.PI/4),p[1]+g*Math.sin(c+Math.PI/4)];a.push(...this.helper.doubleLineOps(p[0],p[1],C[0],C[1],i),...this.helper.doubleLineOps(C[0],C[1],m[0],m[1],i))}})),a}}const ye={};class ZL{constructor(t){this.seed=t}next(){return this.seed?(2**31-1&(this.seed=Math.imul(48271,this.seed)))/2**31:Math.random()}}const QL=0,jn=1,md=2,Bs={A:7,a:7,C:6,c:6,H:1,h:1,L:2,l:2,M:2,m:2,Q:4,q:4,S:4,s:4,T:2,t:2,V:1,v:1,Z:0,z:0};function Vn(e,t){return e.type===t}function fc(e){const t=[],r=(function(o){const n=new Array;for(;o!=="";)if(o.match(/^([ \t\r\n,]+)/))o=o.substr(RegExp.$1.length);else if(o.match(/^([aAcChHlLmMqQsStTvVzZ])/))n[n.length]={type:QL,text:RegExp.$1},o=o.substr(RegExp.$1.length);else{if(!o.match(/^(([-+]?[0-9]+(\.[0-9]*)?|[-+]?\.[0-9]+)([eE][-+]?[0-9]+)?)/))return[];n[n.length]={type:jn,text:`${parseFloat(RegExp.$1)}`},o=o.substr(RegExp.$1.length)}return n[n.length]={type:md,text:""},n})(e);let i="BOD",a=0,s=r[a];for(;!Vn(s,md);){let o=0;const n=[];if(i==="BOD"){if(s.text!=="M"&&s.text!=="m")return fc("M0,0"+e);a++,o=Bs[s.text],i=s.text}else Vn(s,jn)?o=Bs[i]:(a++,o=Bs[s.text],i=s.text);if(!(a+o<r.length))throw new Error("Path data ended short");for(let l=a;l<a+o;l++){const h=r[l];if(!Vn(h,jn))throw new Error("Param not a number: "+i+","+h.text);n[n.length]=+h.text}if(typeof Bs[i]!="number")throw new Error("Bad segment: "+i);{const l={key:i,data:n};t.push(l),a+=o,s=r[a],i==="M"&&(i="L"),i==="m"&&(i="l")}}return t}function dy(e){let t=0,r=0,i=0,a=0;const s=[];for(const{key:o,data:n}of e)switch(o){case"M":s.push({key:"M",data:[...n]}),[t,r]=n,[i,a]=n;break;case"m":t+=n[0],r+=n[1],s.push({key:"M",data:[t,r]}),i=t,a=r;break;case"L":s.push({key:"L",data:[...n]}),[t,r]=n;break;case"l":t+=n[0],r+=n[1],s.push({key:"L",data:[t,r]});break;case"C":s.push({key:"C",data:[...n]}),t=n[4],r=n[5];break;case"c":{const l=n.map(((h,c)=>c%2?h+r:h+t));s.push({key:"C",data:l}),t=l[4],r=l[5];break}case"Q":s.push({key:"Q",data:[...n]}),t=n[2],r=n[3];break;case"q":{const l=n.map(((h,c)=>c%2?h+r:h+t));s.push({key:"Q",data:l}),t=l[2],r=l[3];break}case"A":s.push({key:"A",data:[...n]}),t=n[5],r=n[6];break;case"a":t+=n[5],r+=n[6],s.push({key:"A",data:[n[0],n[1],n[2],n[3],n[4],t,r]});break;case"H":s.push({key:"H",data:[...n]}),t=n[0];break;case"h":t+=n[0],s.push({key:"H",data:[t]});break;case"V":s.push({key:"V",data:[...n]}),r=n[0];break;case"v":r+=n[0],s.push({key:"V",data:[r]});break;case"S":s.push({key:"S",data:[...n]}),t=n[2],r=n[3];break;case"s":{const l=n.map(((h,c)=>c%2?h+r:h+t));s.push({key:"S",data:l}),t=l[2],r=l[3];break}case"T":s.push({key:"T",data:[...n]}),t=n[0],r=n[1];break;case"t":t+=n[0],r+=n[1],s.push({key:"T",data:[t,r]});break;case"Z":case"z":s.push({key:"Z",data:[]}),t=i,r=a}return s}function fy(e){const t=[];let r="",i=0,a=0,s=0,o=0,n=0,l=0;for(const{key:h,data:c}of e){switch(h){case"M":t.push({key:"M",data:[...c]}),[i,a]=c,[s,o]=c;break;case"C":t.push({key:"C",data:[...c]}),i=c[4],a=c[5],n=c[2],l=c[3];break;case"L":t.push({key:"L",data:[...c]}),[i,a]=c;break;case"H":i=c[0],t.push({key:"L",data:[i,a]});break;case"V":a=c[0],t.push({key:"L",data:[i,a]});break;case"S":{let u=0,f=0;r==="C"||r==="S"?(u=i+(i-n),f=a+(a-l)):(u=i,f=a),t.push({key:"C",data:[u,f,...c]}),n=c[0],l=c[1],i=c[2],a=c[3];break}case"T":{const[u,f]=c;let d=0,g=0;r==="Q"||r==="T"?(d=i+(i-n),g=a+(a-l)):(d=i,g=a);const p=i+2*(d-i)/3,m=a+2*(g-a)/3,C=u+2*(d-u)/3,x=f+2*(g-f)/3;t.push({key:"C",data:[p,m,C,x,u,f]}),n=d,l=g,i=u,a=f;break}case"Q":{const[u,f,d,g]=c,p=i+2*(u-i)/3,m=a+2*(f-a)/3,C=d+2*(u-d)/3,x=g+2*(f-g)/3;t.push({key:"C",data:[p,m,C,x,d,g]}),n=u,l=f,i=d,a=g;break}case"A":{const u=Math.abs(c[0]),f=Math.abs(c[1]),d=c[2],g=c[3],p=c[4],m=c[5],C=c[6];u===0||f===0?(t.push({key:"C",data:[i,a,m,C,m,C]}),i=m,a=C):(i!==m||a!==C)&&(gy(i,a,m,C,u,f,d,g,p).forEach((function(x){t.push({key:"C",data:x})})),i=m,a=C);break}case"Z":t.push({key:"Z",data:[]}),i=s,a=o}r=h}return t}function ma(e,t,r){return[e*Math.cos(r)-t*Math.sin(r),e*Math.sin(r)+t*Math.cos(r)]}function gy(e,t,r,i,a,s,o,n,l,h){const c=(u=o,Math.PI*u/180);var u;let f=[],d=0,g=0,p=0,m=0;if(h)[d,g,p,m]=h;else{[e,t]=ma(e,t,-c),[r,i]=ma(r,i,-c);const A=(e-r)/2,M=(t-i)/2;let E=A*A/(a*a)+M*M/(s*s);E>1&&(E=Math.sqrt(E),a*=E,s*=E);const L=a*a,I=s*s,$=L*I-L*M*M-I*A*A,q=L*M*M+I*A*A,X=(n===l?-1:1)*Math.sqrt(Math.abs($/q));p=X*a*M/s+(e+r)/2,m=X*-s*A/a+(t+i)/2,d=Math.asin(parseFloat(((t-m)/s).toFixed(9))),g=Math.asin(parseFloat(((i-m)/s).toFixed(9))),e<p&&(d=Math.PI-d),r<p&&(g=Math.PI-g),d<0&&(d=2*Math.PI+d),g<0&&(g=2*Math.PI+g),l&&d>g&&(d-=2*Math.PI),!l&&g>d&&(g-=2*Math.PI)}let C=g-d;if(Math.abs(C)>120*Math.PI/180){const A=g,M=r,E=i;g=l&&g>d?d+120*Math.PI/180*1:d+120*Math.PI/180*-1,f=gy(r=p+a*Math.cos(g),i=m+s*Math.sin(g),M,E,a,s,o,0,l,[g,A,p,m])}C=g-d;const x=Math.cos(d),k=Math.sin(d),w=Math.cos(g),S=Math.sin(g),_=Math.tan(C/4),v=4/3*a*_,D=4/3*s*_,H=[e,t],R=[e+v*k,t-D*x],B=[r+v*S,i-D*w],U=[r,i];if(R[0]=2*H[0]-R[0],R[1]=2*H[1]-R[1],h)return[R,B,U].concat(f);{f=[R,B,U].concat(f);const A=[];for(let M=0;M<f.length;M+=3){const E=ma(f[M][0],f[M][1],c),L=ma(f[M+1][0],f[M+1][1],c),I=ma(f[M+2][0],f[M+2][1],c);A.push([E[0],E[1],L[0],L[1],I[0],I[1]])}return A}}const KL={randOffset:function(e,t){return pt(e,t)},randOffsetWithRange:function(e,t,r){return Ao(e,t,r)},ellipse:function(e,t,r,i,a){const s=my(r,i,a);return jl(e,t,a,s).opset},doubleLineOps:function(e,t,r,i,a){return Fr(e,t,r,i,a,!0)}};function py(e,t,r,i,a){return{type:"path",ops:Fr(e,t,r,i,a)}}function Us(e,t,r){const i=(e||[]).length;if(i>2){const a=[];for(let s=0;s<i-1;s++)a.push(...Fr(e[s][0],e[s][1],e[s+1][0],e[s+1][1],r));return t&&a.push(...Fr(e[i-1][0],e[i-1][1],e[0][0],e[0][1],r)),{type:"path",ops:a}}return i===2?py(e[0][0],e[0][1],e[1][0],e[1][1],r):{type:"path",ops:[]}}function JL(e,t,r,i,a){return(function(s,o){return Us(s,!0,o)})([[e,t],[e+r,t],[e+r,t+i],[e,t+i]],a)}function yd(e,t){if(e.length){const r=typeof e[0][0]=="number"?[e]:e,i=Ls(r[0],1*(1+.2*t.roughness),t),a=t.disableMultiStroke?[]:Ls(r[0],1.5*(1+.22*t.roughness),bd(t));for(let s=1;s<r.length;s++){const o=r[s];if(o.length){const n=Ls(o,1*(1+.2*t.roughness),t),l=t.disableMultiStroke?[]:Ls(o,1.5*(1+.22*t.roughness),bd(t));for(const h of n)h.op!=="move"&&i.push(h);for(const h of l)h.op!=="move"&&a.push(h)}}return{type:"path",ops:i.concat(a)}}return{type:"path",ops:[]}}function my(e,t,r){const i=Math.sqrt(2*Math.PI*Math.sqrt((Math.pow(e/2,2)+Math.pow(t/2,2))/2)),a=Math.ceil(Math.max(r.curveStepCount,r.curveStepCount/Math.sqrt(200)*i)),s=2*Math.PI/a;let o=Math.abs(e/2),n=Math.abs(t/2);const l=1-r.curveFitting;return o+=pt(o*l,r),n+=pt(n*l,r),{increment:s,rx:o,ry:n}}function jl(e,t,r,i){const[a,s]=kd(i.increment,e,t,i.rx,i.ry,1,i.increment*Ao(.1,Ao(.4,1,r),r),r);let o=Eo(a,null,r);if(!r.disableMultiStroke&&r.roughness!==0){const[n]=kd(i.increment,e,t,i.rx,i.ry,1.5,0,r),l=Eo(n,null,r);o=o.concat(l)}return{estimatedPoints:s,opset:{type:"path",ops:o}}}function Cd(e,t,r,i,a,s,o,n,l){const h=e,c=t;let u=Math.abs(r/2),f=Math.abs(i/2);u+=pt(.01*u,l),f+=pt(.01*f,l);let d=a,g=s;for(;d<0;)d+=2*Math.PI,g+=2*Math.PI;g-d>2*Math.PI&&(d=0,g=2*Math.PI);const p=2*Math.PI/l.curveStepCount,m=Math.min(p/2,(g-d)/2),C=wd(m,h,c,u,f,d,g,1,l);if(!l.disableMultiStroke){const x=wd(m,h,c,u,f,d,g,1.5,l);C.push(...x)}return o&&(n?C.push(...Fr(h,c,h+u*Math.cos(d),c+f*Math.sin(d),l),...Fr(h,c,h+u*Math.cos(g),c+f*Math.sin(g),l)):C.push({op:"lineTo",data:[h,c]},{op:"lineTo",data:[h+u*Math.cos(d),c+f*Math.sin(d)]})),{type:"path",ops:C}}function xd(e,t){const r=fy(dy(fc(e))),i=[];let a=[0,0],s=[0,0];for(const{key:o,data:n}of r)switch(o){case"M":s=[n[0],n[1]],a=[n[0],n[1]];break;case"L":i.push(...Fr(s[0],s[1],n[0],n[1],t)),s=[n[0],n[1]];break;case"C":{const[l,h,c,u,f,d]=n;i.push(...tF(l,h,c,u,f,d,s,t)),s=[f,d];break}case"Z":i.push(...Fr(s[0],s[1],a[0],a[1],t)),s=[a[0],a[1]]}return{type:"path",ops:i}}function Zn(e,t){const r=[];for(const i of e)if(i.length){const a=t.maxRandomnessOffset||0,s=i.length;if(s>2){r.push({op:"move",data:[i[0][0]+pt(a,t),i[0][1]+pt(a,t)]});for(let o=1;o<s;o++)r.push({op:"lineTo",data:[i[o][0]+pt(a,t),i[o][1]+pt(a,t)]})}}return{type:"fillPath",ops:r}}function gi(e,t){return(function(r,i){let a=r.fillStyle||"hachure";if(!ye[a])switch(a){case"zigzag":ye[a]||(ye[a]=new YL(i));break;case"cross-hatch":ye[a]||(ye[a]=new GL(i));break;case"dots":ye[a]||(ye[a]=new XL(i));break;case"dashed":ye[a]||(ye[a]=new jL(i));break;case"zigzag-line":ye[a]||(ye[a]=new VL(i));break;default:a="hachure",ye[a]||(ye[a]=new dc(i))}return ye[a]})(t,KL).fillPolygons(e,t)}function bd(e){const t=Object.assign({},e);return t.randomizer=void 0,e.seed&&(t.seed=e.seed+1),t}function yy(e){return e.randomizer||(e.randomizer=new ZL(e.seed||0)),e.randomizer.next()}function Ao(e,t,r,i=1){return r.roughness*i*(yy(r)*(t-e)+e)}function pt(e,t,r=1){return Ao(-e,e,t,r)}function Fr(e,t,r,i,a,s=!1){const o=s?a.disableMultiStrokeFill:a.disableMultiStroke,n=Vl(e,t,r,i,a,!0,!1);if(o)return n;const l=Vl(e,t,r,i,a,!0,!0);return n.concat(l)}function Vl(e,t,r,i,a,s,o){const n=Math.pow(e-r,2)+Math.pow(t-i,2),l=Math.sqrt(n);let h=1;h=l<200?1:l>500?.4:-.0016668*l+1.233334;let c=a.maxRandomnessOffset||0;c*c*100>n&&(c=l/10);const u=c/2,f=.2+.2*yy(a);let d=a.bowing*a.maxRandomnessOffset*(i-t)/200,g=a.bowing*a.maxRandomnessOffset*(e-r)/200;d=pt(d,a,h),g=pt(g,a,h);const p=[],m=()=>pt(u,a,h),C=()=>pt(c,a,h),x=a.preserveVertices;return o?p.push({op:"move",data:[e+(x?0:m()),t+(x?0:m())]}):p.push({op:"move",data:[e+(x?0:pt(c,a,h)),t+(x?0:pt(c,a,h))]}),o?p.push({op:"bcurveTo",data:[d+e+(r-e)*f+m(),g+t+(i-t)*f+m(),d+e+2*(r-e)*f+m(),g+t+2*(i-t)*f+m(),r+(x?0:m()),i+(x?0:m())]}):p.push({op:"bcurveTo",data:[d+e+(r-e)*f+C(),g+t+(i-t)*f+C(),d+e+2*(r-e)*f+C(),g+t+2*(i-t)*f+C(),r+(x?0:C()),i+(x?0:C())]}),p}function Ls(e,t,r){if(!e.length)return[];const i=[];i.push([e[0][0]+pt(t,r),e[0][1]+pt(t,r)]),i.push([e[0][0]+pt(t,r),e[0][1]+pt(t,r)]);for(let a=1;a<e.length;a++)i.push([e[a][0]+pt(t,r),e[a][1]+pt(t,r)]),a===e.length-1&&i.push([e[a][0]+pt(t,r),e[a][1]+pt(t,r)]);return Eo(i,null,r)}function Eo(e,t,r){const i=e.length,a=[];if(i>3){const s=[],o=1-r.curveTightness;a.push({op:"move",data:[e[1][0],e[1][1]]});for(let n=1;n+2<i;n++){const l=e[n];s[0]=[l[0],l[1]],s[1]=[l[0]+(o*e[n+1][0]-o*e[n-1][0])/6,l[1]+(o*e[n+1][1]-o*e[n-1][1])/6],s[2]=[e[n+1][0]+(o*e[n][0]-o*e[n+2][0])/6,e[n+1][1]+(o*e[n][1]-o*e[n+2][1])/6],s[3]=[e[n+1][0],e[n+1][1]],a.push({op:"bcurveTo",data:[s[1][0],s[1][1],s[2][0],s[2][1],s[3][0],s[3][1]]})}}else i===3?(a.push({op:"move",data:[e[1][0],e[1][1]]}),a.push({op:"bcurveTo",data:[e[1][0],e[1][1],e[2][0],e[2][1],e[2][0],e[2][1]]})):i===2&&a.push(...Vl(e[0][0],e[0][1],e[1][0],e[1][1],r,!0,!0));return a}function kd(e,t,r,i,a,s,o,n){const l=[],h=[];if(n.roughness===0){e/=4,h.push([t+i*Math.cos(-e),r+a*Math.sin(-e)]);for(let c=0;c<=2*Math.PI;c+=e){const u=[t+i*Math.cos(c),r+a*Math.sin(c)];l.push(u),h.push(u)}h.push([t+i*Math.cos(0),r+a*Math.sin(0)]),h.push([t+i*Math.cos(e),r+a*Math.sin(e)])}else{const c=pt(.5,n)-Math.PI/2;h.push([pt(s,n)+t+.9*i*Math.cos(c-e),pt(s,n)+r+.9*a*Math.sin(c-e)]);const u=2*Math.PI+c-.01;for(let f=c;f<u;f+=e){const d=[pt(s,n)+t+i*Math.cos(f),pt(s,n)+r+a*Math.sin(f)];l.push(d),h.push(d)}h.push([pt(s,n)+t+i*Math.cos(c+2*Math.PI+.5*o),pt(s,n)+r+a*Math.sin(c+2*Math.PI+.5*o)]),h.push([pt(s,n)+t+.98*i*Math.cos(c+o),pt(s,n)+r+.98*a*Math.sin(c+o)]),h.push([pt(s,n)+t+.9*i*Math.cos(c+.5*o),pt(s,n)+r+.9*a*Math.sin(c+.5*o)])}return[h,l]}function wd(e,t,r,i,a,s,o,n,l){const h=s+pt(.1,l),c=[];c.push([pt(n,l)+t+.9*i*Math.cos(h-e),pt(n,l)+r+.9*a*Math.sin(h-e)]);for(let u=h;u<=o;u+=e)c.push([pt(n,l)+t+i*Math.cos(u),pt(n,l)+r+a*Math.sin(u)]);return c.push([t+i*Math.cos(o),r+a*Math.sin(o)]),c.push([t+i*Math.cos(o),r+a*Math.sin(o)]),Eo(c,null,l)}function tF(e,t,r,i,a,s,o,n){const l=[],h=[n.maxRandomnessOffset||1,(n.maxRandomnessOffset||1)+.3];let c=[0,0];const u=n.disableMultiStroke?1:2,f=n.preserveVertices;for(let d=0;d<u;d++)d===0?l.push({op:"move",data:[o[0],o[1]]}):l.push({op:"move",data:[o[0]+(f?0:pt(h[0],n)),o[1]+(f?0:pt(h[0],n))]}),c=f?[a,s]:[a+pt(h[d],n),s+pt(h[d],n)],l.push({op:"bcurveTo",data:[e+pt(h[d],n),t+pt(h[d],n),r+pt(h[d],n),i+pt(h[d],n),c[0],c[1]]});return l}function ya(e){return[...e]}function Td(e,t=0){const r=e.length;if(r<3)throw new Error("A curve must have at least three points.");const i=[];if(r===3)i.push(ya(e[0]),ya(e[1]),ya(e[2]),ya(e[2]));else{const a=[];a.push(e[0],e[0]);for(let n=1;n<e.length;n++)a.push(e[n]),n===e.length-1&&a.push(e[n]);const s=[],o=1-t;i.push(ya(a[0]));for(let n=1;n+2<a.length;n++){const l=a[n];s[0]=[l[0],l[1]],s[1]=[l[0]+(o*a[n+1][0]-o*a[n-1][0])/6,l[1]+(o*a[n+1][1]-o*a[n-1][1])/6],s[2]=[a[n+1][0]+(o*a[n][0]-o*a[n+2][0])/6,a[n+1][1]+(o*a[n][1]-o*a[n+2][1])/6],s[3]=[a[n+1][0],a[n+1][1]],i.push(s[1],s[2],s[3])}}return i}function Ys(e,t){return Math.pow(e[0]-t[0],2)+Math.pow(e[1]-t[1],2)}function eF(e,t,r){const i=Ys(t,r);if(i===0)return Ys(e,t);let a=((e[0]-t[0])*(r[0]-t[0])+(e[1]-t[1])*(r[1]-t[1]))/i;return a=Math.max(0,Math.min(1,a)),Ys(e,Nr(t,r,a))}function Nr(e,t,r){return[e[0]+(t[0]-e[0])*r,e[1]+(t[1]-e[1])*r]}function Zl(e,t,r,i){const a=i||[];if((function(n,l){const h=n[l+0],c=n[l+1],u=n[l+2],f=n[l+3];let d=3*c[0]-2*h[0]-f[0];d*=d;let g=3*c[1]-2*h[1]-f[1];g*=g;let p=3*u[0]-2*f[0]-h[0];p*=p;let m=3*u[1]-2*f[1]-h[1];return m*=m,d<p&&(d=p),g<m&&(g=m),d+g})(e,t)<r){const n=e[t+0];a.length?(s=a[a.length-1],o=n,Math.sqrt(Ys(s,o))>1&&a.push(n)):a.push(n),a.push(e[t+3])}else{const l=e[t+0],h=e[t+1],c=e[t+2],u=e[t+3],f=Nr(l,h,.5),d=Nr(h,c,.5),g=Nr(c,u,.5),p=Nr(f,d,.5),m=Nr(d,g,.5),C=Nr(p,m,.5);Zl([l,f,p,C],0,r,a),Zl([C,m,g,u],0,r,a)}var s,o;return a}function rF(e,t){return $o(e,0,e.length,t)}function $o(e,t,r,i,a){const s=a||[],o=e[t],n=e[r-1];let l=0,h=1;for(let c=t+1;c<r-1;++c){const u=eF(e[c],o,n);u>l&&(l=u,h=c)}return Math.sqrt(l)>i?($o(e,t,h+1,i,s),$o(e,h,r,i,s)):(s.length||s.push(o),s.push(n)),s}function Qn(e,t=.15,r){const i=[],a=(e.length-1)/3;for(let s=0;s<a;s++)Zl(e,3*s,t,i);return r&&r>0?$o(i,0,i.length,r):i}const ke="none";class Oo{constructor(t){this.defaultOptions={maxRandomnessOffset:2,roughness:1,bowing:1,stroke:"#000",strokeWidth:1,curveTightness:0,curveFitting:.95,curveStepCount:9,fillStyle:"hachure",fillWeight:-1,hachureAngle:-41,hachureGap:-1,dashOffset:-1,dashGap:-1,zigzagOffset:-1,seed:0,disableMultiStroke:!1,disableMultiStrokeFill:!1,preserveVertices:!1,fillShapeRoughnessGain:.8},this.config=t||{},this.config.options&&(this.defaultOptions=this._o(this.config.options))}static newSeed(){return Math.floor(Math.random()*2**31)}_o(t){return t?Object.assign({},this.defaultOptions,t):this.defaultOptions}_d(t,r,i){return{shape:t,sets:r||[],options:i||this.defaultOptions}}line(t,r,i,a,s){const o=this._o(s);return this._d("line",[py(t,r,i,a,o)],o)}rectangle(t,r,i,a,s){const o=this._o(s),n=[],l=JL(t,r,i,a,o);if(o.fill){const h=[[t,r],[t+i,r],[t+i,r+a],[t,r+a]];o.fillStyle==="solid"?n.push(Zn([h],o)):n.push(gi([h],o))}return o.stroke!==ke&&n.push(l),this._d("rectangle",n,o)}ellipse(t,r,i,a,s){const o=this._o(s),n=[],l=my(i,a,o),h=jl(t,r,o,l);if(o.fill)if(o.fillStyle==="solid"){const c=jl(t,r,o,l).opset;c.type="fillPath",n.push(c)}else n.push(gi([h.estimatedPoints],o));return o.stroke!==ke&&n.push(h.opset),this._d("ellipse",n,o)}circle(t,r,i,a){const s=this.ellipse(t,r,i,i,a);return s.shape="circle",s}linearPath(t,r){const i=this._o(r);return this._d("linearPath",[Us(t,!1,i)],i)}arc(t,r,i,a,s,o,n=!1,l){const h=this._o(l),c=[],u=Cd(t,r,i,a,s,o,n,!0,h);if(n&&h.fill)if(h.fillStyle==="solid"){const f=Object.assign({},h);f.disableMultiStroke=!0;const d=Cd(t,r,i,a,s,o,!0,!1,f);d.type="fillPath",c.push(d)}else c.push((function(f,d,g,p,m,C,x){const k=f,w=d;let S=Math.abs(g/2),_=Math.abs(p/2);S+=pt(.01*S,x),_+=pt(.01*_,x);let v=m,D=C;for(;v<0;)v+=2*Math.PI,D+=2*Math.PI;D-v>2*Math.PI&&(v=0,D=2*Math.PI);const H=(D-v)/x.curveStepCount,R=[];for(let B=v;B<=D;B+=H)R.push([k+S*Math.cos(B),w+_*Math.sin(B)]);return R.push([k+S*Math.cos(D),w+_*Math.sin(D)]),R.push([k,w]),gi([R],x)})(t,r,i,a,s,o,h));return h.stroke!==ke&&c.push(u),this._d("arc",c,h)}curve(t,r){const i=this._o(r),a=[],s=yd(t,i);if(i.fill&&i.fill!==ke)if(i.fillStyle==="solid"){const o=yd(t,Object.assign(Object.assign({},i),{disableMultiStroke:!0,roughness:i.roughness?i.roughness+i.fillShapeRoughnessGain:0}));a.push({type:"fillPath",ops:this._mergedShape(o.ops)})}else{const o=[],n=t;if(n.length){const l=typeof n[0][0]=="number"?[n]:n;for(const h of l)h.length<3?o.push(...h):h.length===3?o.push(...Qn(Td([h[0],h[0],h[1],h[2]]),10,(1+i.roughness)/2)):o.push(...Qn(Td(h),10,(1+i.roughness)/2))}o.length&&a.push(gi([o],i))}return i.stroke!==ke&&a.push(s),this._d("curve",a,i)}polygon(t,r){const i=this._o(r),a=[],s=Us(t,!0,i);return i.fill&&(i.fillStyle==="solid"?a.push(Zn([t],i)):a.push(gi([t],i))),i.stroke!==ke&&a.push(s),this._d("polygon",a,i)}path(t,r){const i=this._o(r),a=[];if(!t)return this._d("path",a,i);t=(t||"").replace(/\n/g," ").replace(/(-\s)/g,"-").replace("/(ss)/g"," ");const s=i.fill&&i.fill!=="transparent"&&i.fill!==ke,o=i.stroke!==ke,n=!!(i.simplification&&i.simplification<1),l=(function(c,u,f){const d=fy(dy(fc(c))),g=[];let p=[],m=[0,0],C=[];const x=()=>{C.length>=4&&p.push(...Qn(C,u)),C=[]},k=()=>{x(),p.length&&(g.push(p),p=[])};for(const{key:S,data:_}of d)switch(S){case"M":k(),m=[_[0],_[1]],p.push(m);break;case"L":x(),p.push([_[0],_[1]]);break;case"C":if(!C.length){const v=p.length?p[p.length-1]:m;C.push([v[0],v[1]])}C.push([_[0],_[1]]),C.push([_[2],_[3]]),C.push([_[4],_[5]]);break;case"Z":x(),p.push([m[0],m[1]])}if(k(),!f)return g;const w=[];for(const S of g){const _=rF(S,f);_.length&&w.push(_)}return w})(t,1,n?4-4*(i.simplification||1):(1+i.roughness)/2),h=xd(t,i);if(s)if(i.fillStyle==="solid")if(l.length===1){const c=xd(t,Object.assign(Object.assign({},i),{disableMultiStroke:!0,roughness:i.roughness?i.roughness+i.fillShapeRoughnessGain:0}));a.push({type:"fillPath",ops:this._mergedShape(c.ops)})}else a.push(Zn(l,i));else a.push(gi(l,i));return o&&(n?l.forEach((c=>{a.push(Us(c,!1,i))})):a.push(h)),this._d("path",a,i)}opsToPath(t,r){let i="";for(const a of t.ops){const s=typeof r=="number"&&r>=0?a.data.map((o=>+o.toFixed(r))):a.data;switch(a.op){case"move":i+=`M${s[0]} ${s[1]} `;break;case"bcurveTo":i+=`C${s[0]} ${s[1]}, ${s[2]} ${s[3]}, ${s[4]} ${s[5]} `;break;case"lineTo":i+=`L${s[0]} ${s[1]} `}}return i.trim()}toPaths(t){const r=t.sets||[],i=t.options||this.defaultOptions,a=[];for(const s of r){let o=null;switch(s.type){case"path":o={d:this.opsToPath(s),stroke:i.stroke,strokeWidth:i.strokeWidth,fill:ke};break;case"fillPath":o={d:this.opsToPath(s),stroke:ke,strokeWidth:0,fill:i.fill||ke};break;case"fillSketch":o=this.fillSketch(s,i)}o&&a.push(o)}return a}fillSketch(t,r){let i=r.fillWeight;return i<0&&(i=r.strokeWidth/2),{d:this.opsToPath(t),stroke:r.fill||ke,strokeWidth:i,fill:ke}}_mergedShape(t){return t.filter(((r,i)=>i===0||r.op!=="move"))}}class iF{constructor(t,r){this.canvas=t,this.ctx=this.canvas.getContext("2d"),this.gen=new Oo(r)}draw(t){const r=t.sets||[],i=t.options||this.getDefaultOptions(),a=this.ctx,s=t.options.fixedDecimalPlaceDigits;for(const o of r)switch(o.type){case"path":a.save(),a.strokeStyle=i.stroke==="none"?"transparent":i.stroke,a.lineWidth=i.strokeWidth,i.strokeLineDash&&a.setLineDash(i.strokeLineDash),i.strokeLineDashOffset&&(a.lineDashOffset=i.strokeLineDashOffset),this._drawToContext(a,o,s),a.restore();break;case"fillPath":{a.save(),a.fillStyle=i.fill||"";const n=t.shape==="curve"||t.shape==="polygon"||t.shape==="path"?"evenodd":"nonzero";this._drawToContext(a,o,s,n),a.restore();break}case"fillSketch":this.fillSketch(a,o,i)}}fillSketch(t,r,i){let a=i.fillWeight;a<0&&(a=i.strokeWidth/2),t.save(),i.fillLineDash&&t.setLineDash(i.fillLineDash),i.fillLineDashOffset&&(t.lineDashOffset=i.fillLineDashOffset),t.strokeStyle=i.fill||"",t.lineWidth=a,this._drawToContext(t,r,i.fixedDecimalPlaceDigits),t.restore()}_drawToContext(t,r,i,a="nonzero"){t.beginPath();for(const s of r.ops){const o=typeof i=="number"&&i>=0?s.data.map((n=>+n.toFixed(i))):s.data;switch(s.op){case"move":t.moveTo(o[0],o[1]);break;case"bcurveTo":t.bezierCurveTo(o[0],o[1],o[2],o[3],o[4],o[5]);break;case"lineTo":t.lineTo(o[0],o[1])}}r.type==="fillPath"?t.fill(a):t.stroke()}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}line(t,r,i,a,s){const o=this.gen.line(t,r,i,a,s);return this.draw(o),o}rectangle(t,r,i,a,s){const o=this.gen.rectangle(t,r,i,a,s);return this.draw(o),o}ellipse(t,r,i,a,s){const o=this.gen.ellipse(t,r,i,a,s);return this.draw(o),o}circle(t,r,i,a){const s=this.gen.circle(t,r,i,a);return this.draw(s),s}linearPath(t,r){const i=this.gen.linearPath(t,r);return this.draw(i),i}polygon(t,r){const i=this.gen.polygon(t,r);return this.draw(i),i}arc(t,r,i,a,s,o,n=!1,l){const h=this.gen.arc(t,r,i,a,s,o,n,l);return this.draw(h),h}curve(t,r){const i=this.gen.curve(t,r);return this.draw(i),i}path(t,r){const i=this.gen.path(t,r);return this.draw(i),i}}const Fs="http://www.w3.org/2000/svg";class aF{constructor(t,r){this.svg=t,this.gen=new Oo(r)}draw(t){const r=t.sets||[],i=t.options||this.getDefaultOptions(),a=this.svg.ownerDocument||window.document,s=a.createElementNS(Fs,"g"),o=t.options.fixedDecimalPlaceDigits;for(const n of r){let l=null;switch(n.type){case"path":l=a.createElementNS(Fs,"path"),l.setAttribute("d",this.opsToPath(n,o)),l.setAttribute("stroke",i.stroke),l.setAttribute("stroke-width",i.strokeWidth+""),l.setAttribute("fill","none"),i.strokeLineDash&&l.setAttribute("stroke-dasharray",i.strokeLineDash.join(" ").trim()),i.strokeLineDashOffset&&l.setAttribute("stroke-dashoffset",`${i.strokeLineDashOffset}`);break;case"fillPath":l=a.createElementNS(Fs,"path"),l.setAttribute("d",this.opsToPath(n,o)),l.setAttribute("stroke","none"),l.setAttribute("stroke-width","0"),l.setAttribute("fill",i.fill||""),t.shape!=="curve"&&t.shape!=="polygon"||l.setAttribute("fill-rule","evenodd");break;case"fillSketch":l=this.fillSketch(a,n,i)}l&&s.appendChild(l)}return s}fillSketch(t,r,i){let a=i.fillWeight;a<0&&(a=i.strokeWidth/2);const s=t.createElementNS(Fs,"path");return s.setAttribute("d",this.opsToPath(r,i.fixedDecimalPlaceDigits)),s.setAttribute("stroke",i.fill||""),s.setAttribute("stroke-width",a+""),s.setAttribute("fill","none"),i.fillLineDash&&s.setAttribute("stroke-dasharray",i.fillLineDash.join(" ").trim()),i.fillLineDashOffset&&s.setAttribute("stroke-dashoffset",`${i.fillLineDashOffset}`),s}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}opsToPath(t,r){return this.gen.opsToPath(t,r)}line(t,r,i,a,s){const o=this.gen.line(t,r,i,a,s);return this.draw(o)}rectangle(t,r,i,a,s){const o=this.gen.rectangle(t,r,i,a,s);return this.draw(o)}ellipse(t,r,i,a,s){const o=this.gen.ellipse(t,r,i,a,s);return this.draw(o)}circle(t,r,i,a){const s=this.gen.circle(t,r,i,a);return this.draw(s)}linearPath(t,r){const i=this.gen.linearPath(t,r);return this.draw(i)}polygon(t,r){const i=this.gen.polygon(t,r);return this.draw(i)}arc(t,r,i,a,s,o,n=!1,l){const h=this.gen.arc(t,r,i,a,s,o,n,l);return this.draw(h)}curve(t,r){const i=this.gen.curve(t,r);return this.draw(i)}path(t,r){const i=this.gen.path(t,r);return this.draw(i)}}var rt={canvas:(e,t)=>new iF(e,t),svg:(e,t)=>new aF(e,t),generator:e=>new Oo(e),newSeed:()=>Oo.newSeed()},gt=y(async(e,t,r)=>{var d,g;let i;const a=t.useHtmlLabels||Je((d=Bt())==null?void 0:d.htmlLabels);r?i=r:i="node default";const s=e.insert("g").attr("class",i).attr("id",t.domId||t.id),o=s.insert("g").attr("class","label").attr("style",jt(t.labelStyle));let n;t.label===void 0?n="":n=typeof t.label=="string"?t.label:t.label[0];const l=!!t.icon||!!t.img,h=t.labelType==="markdown",c=await tr(o,Pe(Kr(n),Bt()),{useHtmlLabels:a,width:t.width||((g=Bt().flowchart)==null?void 0:g.wrappingWidth),classes:h?"markdown-node-label":"",style:t.labelStyle,addSvgBackground:l,markdown:h},Bt());let u=c.getBBox();const f=((t==null?void 0:t.padding)??0)/2;if(a){const p=c.children[0],m=wt(c);await Rm(p,n),u=p.getBoundingClientRect(),m.attr("width",u.width),m.attr("height",u.height)}return a?o.attr("transform","translate("+-u.width/2+", "+-u.height/2+")"):o.attr("transform","translate(0, "+-u.height/2+")"),t.centerLabel&&o.attr("transform","translate("+-u.width/2+", "+-u.height/2+")"),o.insert("rect",":first-child"),{shapeSvg:s,bbox:u,halfPadding:f,label:o}},"labelHelper"),Kn=y(async(e,t,r)=>{var l,h;const i=r.useHtmlLabels??fe(Bt()),a=e.insert("g").attr("class","label").attr("style",r.labelStyle||""),s=await tr(a,Pe(Kr(t),Bt()),{useHtmlLabels:i,width:r.width||((h=(l=Bt())==null?void 0:l.flowchart)==null?void 0:h.wrappingWidth),style:r.labelStyle,addSvgBackground:!!r.icon||!!r.img});let o=s.getBBox();const n=r.padding/2;if(fe(Bt())){const c=s.children[0],u=wt(s);o=c.getBoundingClientRect(),u.attr("width",o.width),u.attr("height",o.height)}return i?a.attr("transform","translate("+-o.width/2+", "+-o.height/2+")"):a.attr("transform","translate(0, "+-o.height/2+")"),r.centerLabel&&a.attr("transform","translate("+-o.width/2+", "+-o.height/2+")"),a.insert("rect",":first-child"),{shapeSvg:e,bbox:o,halfPadding:n,label:a}},"insertLabel"),nt=y((e,t)=>{const r=t.node().getBBox();e.width=r.width,e.height=r.height},"updateNodeBounds"),ft=y((e,t)=>(e.look==="handDrawn"?"rough-node":"node")+" "+e.cssClasses+" "+(t||""),"getNodeClasses");function _t(e){const t=e.map((r,i)=>`${i===0?"M":"L"}${r.x},${r.y}`);return t.push("Z"),t.join(" ")}y(_t,"createPathFromPoints");function Mr(e,t,r,i,a,s){const o=[],l=r-e,h=i-t,c=l/s,u=2*Math.PI/c,f=t+h/2;for(let d=0;d<=50;d++){const g=d/50,p=e+g*l,m=f+a*Math.sin(u*(p-e));o.push({x:p,y:m})}return o}y(Mr,"generateFullSineWavePoints");function Ga(e,t,r,i,a,s){const o=[],n=a*Math.PI/180,c=(s*Math.PI/180-n)/(i-1);for(let u=0;u<i;u++){const f=n+u*c,d=e+r*Math.cos(f),g=t+r*Math.sin(f);o.push({x:-d,y:-g})}return o}y(Ga,"generateCirclePoints");function Ql(e){const t=Array.from(e.childNodes).filter(l=>l.tagName==="path"),r=document.createElementNS("http://www.w3.org/2000/svg","path"),i=t.map(l=>l.getAttribute("d")).filter(l=>l!==null).join(" ");r.setAttribute("d",i);const a=t.find(l=>l.getAttribute("fill")!=="none"),s=t.find(l=>l.getAttribute("stroke")!=="none"),o=y((l,h)=>(l==null?void 0:l.getAttribute(h))??void 0,"getAttr");if(a){const l={fill:o(a,"fill"),"fill-opacity":o(a,"fill-opacity")??"1"};Object.entries(l).forEach(([h,c])=>{c&&r.setAttribute(h,c)})}if(s){const l={stroke:o(s,"stroke"),"stroke-width":o(s,"stroke-width")??"1","stroke-opacity":o(s,"stroke-opacity")??"1"};Object.entries(l).forEach(([h,c])=>{c&&r.setAttribute(h,c)})}const n=document.createElementNS("http://www.w3.org/2000/svg","g");return n.appendChild(r),n}y(Ql,"mergePaths");var sF=y((e,t)=>{var r=e.x,i=e.y,a=t.x-r,s=t.y-i,o=e.width/2,n=e.height/2,l,h;return Math.abs(s)*o>Math.abs(a)*n?(s<0&&(n=-n),l=s===0?0:n*a/s,h=n):(a<0&&(o=-o),l=o,h=a===0?0:o*s/a),{x:r+l,y:i+h}},"intersectRect"),si=sF,oF=y(async(e,t,r,i=!1,a=!1)=>{let s=t||"";typeof s=="object"&&(s=s[0]);const o=Bt(),n=fe(o);return await tr(e,s,{style:r,isTitle:i,useHtmlLabels:n,markdown:!1,isNode:a,width:Number.POSITIVE_INFINITY},o)},"createLabel"),Tr=oF,Ar=y((e,t,r,i,a)=>["M",e+a,t,"H",e+r-a,"A",a,a,0,0,1,e+r,t+a,"V",t+i-a,"A",a,a,0,0,1,e+r-a,t+i,"H",e+a,"A",a,a,0,0,1,e,t+i-a,"V",t+a,"A",a,a,0,0,1,e+a,t,"Z"].join(" "),"createRoundedRectPathD"),nF=y(async(e,t)=>{const r=Bt(),{themeVariables:i,handDrawnSeed:a}=r,{clusterBkg:s,clusterBorder:o}=i,n=o,{labelStyles:l,nodeStyles:h,borderStyles:c,backgroundStyles:u}=at(t),f=e.insert("g").attr("class","cluster swimlane "+(t.cssClasses||"")).attr("id",t.id).attr("data-id",t.id).attr("data-et","cluster").attr("data-look",t.look),d=Je(r.flowchart.htmlLabels),g=t.direction==="LR",p=f.insert("g").attr("class","cluster-label swimlane-label"),m=await tr(p,t.label,{style:t.labelStyle,useHtmlLabels:d,isNode:!0,width:t.width});let C=m.getBBox();if(d){const A=m.children[0],M=wt(m);C=A.getBoundingClientRect(),M.attr("width",C.width),M.attr("height",C.height)}const x=t.padding??0,k=t.width<=C.width+x?C.width+x:t.width;t.width<=C.width+x?t.diff=(k-t.width)/2-x:t.diff=-x;const w=t.height,S=t.y-w/2,_=t.y+w/2,v=t.x-k/2,D=t.swimlaneContentTop!==void 0?t.swimlaneContentTop:S+w/3,H=g?4:0,R=C.height+2*H;let B,U;if(g){const A=Math.max(R,C.height+2*H),M=v+A,E=Math.max(0,k-A);if(t.look==="handDrawn"){const $=rt.svg(f),q=et(t,{roughness:.7,fill:s,stroke:n,fillWeight:3,seed:a}),X=et(t,{roughness:.7,fill:"none",stroke:n,seed:a}),J=$.rectangle(v,S,A,w,q);B=f.insert(()=>J,":first-child");const Q=$.rectangle(M,S,E,w,X);U=f.insert(()=>Q,":first-child"),B.select("path:nth-child(2)").attr("style",c.join(";")),B.select("path").attr("style",u.join(";").replace("fill","stroke"))}else B=f.insert("rect",":first-child"),U=f.insert("rect",":first-child"),B.attr("class","swimlane-title").attr("style",h).attr("x",v).attr("y",S).attr("width",A).attr("height",w).attr("fill",s).attr("stroke",n),U.attr("class","swimlane-body").attr("style",h).attr("x",M).attr("y",S).attr("width",E).attr("height",w).attr("fill","none").attr("stroke",n);const L=v+A/2,I=t.y;p.attr("transform",`translate(${L}, ${I}) rotate(-90) translate(${-C.width/2}, ${-C.height/2})`)}else{const A=Math.max(0,D-S),M=Math.min(R,A),E=S+M,L=Math.max(0,_-E),I=t.x-k/2;if(t.look==="handDrawn"){const X=rt.svg(f),J=et(t,{roughness:.7,fill:s,stroke:n,fillWeight:3,seed:a}),Q=et(t,{roughness:.7,fill:"none",stroke:n,seed:a}),lt=X.rectangle(I,S,k,M,J);B=f.insert(()=>lt,":first-child");const st=X.rectangle(I,E,k,L,Q);U=f.insert(()=>st,":first-child"),B.select("path:nth-child(2)").attr("style",c.join(";")),B.select("path").attr("style",u.join(";").replace("fill","stroke"))}else B=f.insert("rect",":first-child"),U=f.insert("rect",":first-child"),B.attr("class","swimlane-title").attr("style",h).attr("x",I).attr("y",S).attr("width",k).attr("height",M).attr("fill",s).attr("stroke",n),U.attr("class","swimlane-body").attr("style",h).attr("x",I).attr("y",E).attr("width",k).attr("height",L).attr("fill","none").attr("stroke",n);const $=t.x-C.width/2,q=S+(M-C.height)/2;p.attr("transform",`translate(${$}, ${q})`)}if(G.trace("Swimlane data ",t,JSON.stringify(t)),l){const A=p.select("span");A&&A.attr("style",l)}return t.offsetX=0,t.width=k,t.height=w,t.offsetY=C.height-x/2,t.intersect=function(A){return si(t,A)},{cluster:f,labelBBox:C}},"swimlane"),Cy=y(async(e,t)=>{G.info("Creating subgraph rect for ",t.id,t);const r=Bt(),{themeVariables:i,handDrawnSeed:a}=r,{clusterBkg:s,clusterBorder:o}=i,{labelStyles:n,nodeStyles:l,borderStyles:h,backgroundStyles:c}=at(t),u=e.insert("g").attr("class","cluster "+t.cssClasses).attr("id",t.domId).attr("data-look",t.look),f=fe(r),d=u.insert("g").attr("class","cluster-label ");let g;t.labelType==="markdown"?g=await tr(d,t.label,{style:t.labelStyle,useHtmlLabels:f,isNode:!0,width:t.width}):g=await Tr(d,t.label,t.labelStyle||"",!1,!0);let p=g.getBBox();if(fe(r)){const v=g.children[0],D=wt(g);p=v.getBoundingClientRect(),D.attr("width",p.width),D.attr("height",p.height)}const m=t.width<=p.width+t.padding?p.width+t.padding:t.width;t.width<=p.width+t.padding?t.diff=(m-t.width)/2-t.padding:t.diff=-t.padding;const C=t.height,x=t.x-m/2,k=t.y-C/2;G.trace("Data ",t,JSON.stringify(t));let w;if(t.look==="handDrawn"){const v=rt.svg(u),D=et(t,{roughness:.7,fill:s,stroke:o,fillWeight:3,seed:a}),H=v.path(Ar(x,k,m,C,0),D);w=u.insert(()=>(G.debug("Rough node insert CXC",H),H),":first-child"),w.select("path:nth-child(2)").attr("style",h.join(";")),w.select("path").attr("style",c.join(";").replace("fill","stroke"))}else w=u.insert("rect",":first-child"),w.attr("style",l).attr("rx",t.rx).attr("ry",t.ry).attr("x",x).attr("y",k).attr("width",m).attr("height",C);const{subGraphTitleTopMargin:S}=ec(r);if(d.attr("transform",`translate(${t.x-p.width/2}, ${t.y-t.height/2+S})`),n){const v=d.select("span");v&&v.attr("style",n)}const _=w.node().getBBox();return t.offsetX=0,t.width=_.width,t.height=_.height,t.offsetY=p.height-t.padding/2,t.intersect=function(v){return si(t,v)},{cluster:u,labelBBox:p}},"rect"),lF=y((e,t)=>{const r=e.insert("g").attr("class","note-cluster").attr("id",t.domId),i=r.insert("rect",":first-child"),a=0*t.padding,s=a/2;i.attr("rx",t.rx).attr("ry",t.ry).attr("x",t.x-t.width/2-s).attr("y",t.y-t.height/2-s).attr("width",t.width+a).attr("height",t.height+a).attr("fill","none");const o=i.node().getBBox();return t.width=o.width,t.height=o.height,t.intersect=function(n){return si(t,n)},{cluster:r,labelBBox:{width:0,height:0}}},"noteGroup"),hF=y(async(e,t)=>{const r=Bt(),{themeVariables:i,handDrawnSeed:a}=r,{altBackground:s,compositeBackground:o,compositeTitleBackground:n,nodeBorder:l}=i,h=e.insert("g").attr("class",t.cssClasses).attr("id",t.domId).attr("data-id",t.id).attr("data-look",t.look),c=h.insert("g",":first-child"),u=h.insert("g").attr("class","cluster-label");let f=h.append("rect");const d=await Tr(u,t.label,t.labelStyle,void 0,!0);let g=d.getBBox();if(fe(r)){const H=d.children[0],R=wt(d);g=H.getBoundingClientRect(),R.attr("width",g.width),R.attr("height",g.height)}const p=0*t.padding,m=p/2,C=(t.width<=g.width+t.padding?g.width+t.padding:t.width)+p;t.width<=g.width+t.padding?t.diff=(C-t.width)/2-t.padding:t.diff=-t.padding;const x=t.height+p,k=t.height+p-g.height-6,w=t.x-C/2,S=t.y-x/2;t.width=C;const _=t.y-t.height/2-m+g.height+2;let v;if(t.look==="handDrawn"){const H=t.cssClasses.includes("statediagram-cluster-alt"),R=rt.svg(h),B=t.rx||t.ry?R.path(Ar(w,S,C,x,10),{roughness:.7,fill:n,fillStyle:"solid",stroke:l,seed:a}):R.rectangle(w,S,C,x,{seed:a});v=h.insert(()=>B,":first-child");const U=R.rectangle(w,_,C,k,{fill:H?s:o,fillStyle:H?"hachure":"solid",stroke:l,seed:a});v=h.insert(()=>B,":first-child"),f=h.insert(()=>U)}else v=c.insert("rect",":first-child"),v.attr("class","outer").attr("x",w).attr("y",S).attr("width",C).attr("height",x).attr("data-look",t.look),f.attr("class","inner").attr("x",w).attr("y",_).attr("width",C).attr("height",k);u.attr("transform",`translate(${t.x-g.width/2}, ${S+1-(fe(r)?0:3)})`);const D=v.node().getBBox();return t.height=D.height,t.offsetX=0,t.offsetY=g.height-t.padding/2,t.labelBBox=g,t.intersect=function(H){return si(t,H)},{cluster:h,labelBBox:g}},"roundedWithTitle"),cF=y(async(e,t)=>{G.info("Creating subgraph rect for ",t.id,t);const r=Bt(),{themeVariables:i,handDrawnSeed:a}=r,{clusterBkg:s,clusterBorder:o}=i,{labelStyles:n,nodeStyles:l,borderStyles:h,backgroundStyles:c}=at(t),u=e.insert("g").attr("class","cluster "+t.cssClasses).attr("id",t.domId).attr("data-look",t.look),f=fe(r),d=u.insert("g").attr("class","cluster-label "),g=await tr(d,t.label,{style:t.labelStyle,useHtmlLabels:f,isNode:!0,width:t.width});let p=g.getBBox();if(fe(r)){const v=g.children[0],D=wt(g);p=v.getBoundingClientRect(),D.attr("width",p.width),D.attr("height",p.height)}const m=t.width<=p.width+t.padding?p.width+t.padding:t.width;t.width<=p.width+t.padding?t.diff=(m-t.width)/2-t.padding:t.diff=-t.padding;const C=t.height,x=t.x-m/2,k=t.y-C/2;G.trace("Data ",t,JSON.stringify(t));let w;if(t.look==="handDrawn"){const v=rt.svg(u),D=et(t,{roughness:.7,fill:s,stroke:o,fillWeight:4,seed:a}),H=v.path(Ar(x,k,m,C,t.rx),D);w=u.insert(()=>(G.debug("Rough node insert CXC",H),H),":first-child"),w.select("path:nth-child(2)").attr("style",h.join(";")),w.select("path").attr("style",c.join(";").replace("fill","stroke"))}else w=u.insert("rect",":first-child"),w.attr("style",l).attr("rx",t.rx).attr("ry",t.ry).attr("x",x).attr("y",k).attr("width",m).attr("height",C);const{subGraphTitleTopMargin:S}=ec(r);if(d.attr("transform",`translate(${t.x-p.width/2}, ${t.y-t.height/2+S})`),n){const v=d.select("span");v&&v.attr("style",n)}const _=w.node().getBBox();return t.offsetX=0,t.width=_.width,t.height=_.height,t.offsetY=p.height-t.padding/2,t.intersect=function(v){return si(t,v)},{cluster:u,labelBBox:p}},"kanbanSection"),uF=y((e,t)=>{const r=Bt(),{themeVariables:i,handDrawnSeed:a}=r,{nodeBorder:s}=i,o=e.insert("g").attr("class",t.cssClasses).attr("id",t.domId).attr("data-look",t.look),n=o.insert("g",":first-child"),l=0*t.padding,h=t.width+l;t.diff=-t.padding;const c=t.height+l,u=t.x-h/2,f=t.y-c/2;t.width=h;let d;if(t.look==="handDrawn"){const m=rt.svg(o).rectangle(u,f,h,c,{fill:"lightgrey",roughness:.5,strokeLineDash:[5],stroke:s,seed:a});d=o.insert(()=>m,":first-child")}else{d=n.insert("rect",":first-child");let p="outer";t.look,p="divider",d.attr("class",p).attr("x",u).attr("y",f).attr("width",h).attr("height",c).attr("data-look",t.look)}const g=d.node().getBBox();return t.height=g.height,t.offsetX=0,t.offsetY=0,t.intersect=function(p){return si(t,p)},{cluster:o,labelBBox:{}}},"divider"),dF=Cy,fF={rect:Cy,squareRect:dF,roundedWithTitle:hF,noteGroup:lF,divider:uF,kanbanSection:cF,swimlane:nF},xy=new Map,gF=y(async(e,t)=>{const r=t.shape||"rect",i=await fF[r](e,t);return xy.set(t.id,i),i},"insertCluster"),L3=y(()=>{xy=new Map},"clear");function by(e,t){return e.intersect(t)}y(by,"intersectNode");var pF=by;function ky(e,t,r,i){var a=e.x,s=e.y,o=a-i.x,n=s-i.y,l=Math.sqrt(t*t*n*n+r*r*o*o),h=Math.abs(t*r*o/l);i.x<a&&(h=-h);var c=Math.abs(t*r*n/l);return i.y<s&&(c=-c),{x:a+h,y:s+c}}y(ky,"intersectEllipse");var wy=ky;function Ty(e,t,r){return wy(e,t,t,r)}y(Ty,"intersectCircle");var mF=Ty;function Sy(e,t,r,i){{const a=t.y-e.y,s=e.x-t.x,o=t.x*e.y-e.x*t.y,n=a*r.x+s*r.y+o,l=a*i.x+s*i.y+o,h=1e-6;if(n!==0&&l!==0&&Kl(n,l))return;const c=i.y-r.y,u=r.x-i.x,f=i.x*r.y-r.x*i.y,d=c*e.x+u*e.y+f,g=c*t.x+u*t.y+f;if(Math.abs(d)<h&&Math.abs(g)<h&&Kl(d,g))return;const p=a*u-c*s;if(p===0)return;const m=Math.abs(p/2);let C=s*f-u*o;const x=C<0?(C-m)/p:(C+m)/p;C=c*o-a*f;const k=C<0?(C-m)/p:(C+m)/p;return{x,y:k}}}y(Sy,"intersectLine");function Kl(e,t){return e*t>0}y(Kl,"sameSign");var yF=Sy;function _y(e,t,r){let i=e.x,a=e.y,s=[],o=Number.POSITIVE_INFINITY,n=Number.POSITIVE_INFINITY;typeof t.forEach=="function"?t.forEach(function(c){o=Math.min(o,c.x),n=Math.min(n,c.y)}):(o=Math.min(o,t.x),n=Math.min(n,t.y));let l=i-e.width/2-o,h=a-e.height/2-n;for(let c=0;c<t.length;c++){let u=t[c],f=t[c<t.length-1?c+1:0],d=yF(e,r,{x:l+u.x,y:h+u.y},{x:l+f.x,y:h+f.y});d&&s.push(d)}return s.length?(s.length>1&&s.sort(function(c,u){let f=c.x-r.x,d=c.y-r.y,g=Math.sqrt(f*f+d*d),p=u.x-r.x,m=u.y-r.y,C=Math.sqrt(p*p+m*m);return g<C?-1:g===C?0:1}),s[0]):e}y(_y,"intersectPolygon");var CF=_y,tt={node:pF,circle:mF,ellipse:wy,polygon:CF,rect:si};function vy(e,t){const{labelStyles:r}=at(t);t.labelStyle=r;const i=ft(t);let a=i;i||(a="anchor");const s=e.insert("g").attr("class",a).attr("id",t.domId||t.id),o=1,{cssStyles:n}=t,l=rt.svg(s),h=et(t,{fill:"black",stroke:"none",fillStyle:"solid"});t.look!=="handDrawn"&&(h.roughness=0);const c=l.circle(0,0,o*2,h),u=s.insert(()=>c,":first-child");return u.attr("class","anchor").attr("style",jt(n)),nt(t,u),t.intersect=function(f){return G.info("Circle intersect",t,o,f),tt.circle(t,o,f)},s}y(vy,"anchor");function Jl(e,t,r,i,a,s,o){const l=(e+r)/2,h=(t+i)/2,c=Math.atan2(i-t,r-e),u=(r-e)/2,f=(i-t)/2,d=u/a,g=f/s,p=Math.sqrt(d**2+g**2);if(p>1)throw new Error("The given radii are too small to create an arc between the points.");const m=Math.sqrt(1-p**2),C=l+m*s*Math.sin(c)*(o?-1:1),x=h-m*a*Math.cos(c)*(o?-1:1),k=Math.atan2((t-x)/s,(e-C)/a);let S=Math.atan2((i-x)/s,(r-C)/a)-k;o&&S<0&&(S+=2*Math.PI),!o&&S>0&&(S-=2*Math.PI);const _=[];for(let v=0;v<20;v++){const D=v/19,H=k+D*S,R=C+a*Math.cos(H),B=x+s*Math.sin(H);_.push({x:R,y:B})}return _}y(Jl,"generateArcPoints");function By(e,t,r){const[i,a]=[t,r].sort((s,o)=>o-s);return a*(1-Math.sqrt(1-(e/i/2)**2))}y(By,"calculateArcSagitta");async function Ly(e,t){const{labelStyles:r,nodeStyles:i}=at(t);t.labelStyle=r;const a=t.padding??0,s=t.look==="neo"?16:a,o=t.look==="neo"?12:a,n=y(H=>H+o,"calcTotalHeight"),l=y(H=>{const R=H/2;return[R/(2.5+H/50),R]},"calcEllipseRadius"),{shapeSvg:h,bbox:c}=await gt(e,t,ft(t)),u=n(t!=null&&t.height?t==null?void 0:t.height:c.height),[f,d]=l(u),g=By(u,f,d),m=(t!=null&&t.width?t==null?void 0:t.width:c.width)+s*2+g-g,C=u,{cssStyles:x}=t,k=[{x:m/2,y:-C/2},{x:-m/2,y:-C/2},...Jl(-m/2,-C/2,-m/2,C/2,f,d,!1),{x:m/2,y:C/2},...Jl(m/2,C/2,m/2,-C/2,f,d,!0)],w=rt.svg(h),S=et(t,{});t.look!=="handDrawn"&&(S.roughness=0,S.fillStyle="solid");const _=_t(k),v=w.path(_,S),D=h.insert(()=>v,":first-child");return D.attr("class","basic label-container outer-path"),x&&t.look!=="handDrawn"&&D.selectAll("path").attr("style",x),i&&t.look!=="handDrawn"&&D.selectAll("path").attr("style",i),D.attr("transform",`translate(${f/2}, 0)`),nt(t,D),t.intersect=function(H){return tt.polygon(t,k,H)},h}y(Ly,"bowTieRect");function pr(e,t,r,i){return e.insert("polygon",":first-child").attr("points",i.map(function(a){return a.x+","+a.y}).join(" ")).attr("class","label-container").attr("transform","translate("+-t/2+","+r/2+")")}y(pr,"insertPolygonShape");var Ms=12;async function Fy(e,t){const{labelStyles:r,nodeStyles:i}=at(t);t.labelStyle=r;const a=t.padding??0,s=t.look==="neo"?28:a,o=t.look==="neo"?24:a,{shapeSvg:n,bbox:l}=await gt(e,t,ft(t)),h=((t==null?void 0:t.width)??l.width)+(t.look==="neo"?s*2:s+Ms),c=((t==null?void 0:t.height)??l.height)+(t.look==="neo"?o*2:o),u=0,f=h,d=-c,g=0,p=[{x:u+Ms,y:d},{x:f,y:d},{x:f,y:g},{x:u,y:g},{x:u,y:d+Ms},{x:u+Ms,y:d}];let m;const{cssStyles:C}=t;if(t.look==="handDrawn"){const x=rt.svg(n),k=et(t,{}),w=_t(p),S=x.path(w,k);m=n.insert(()=>S,":first-child").attr("transform",`translate(${-h/2}, ${c/2})`),C&&m.attr("style",C)}else m=pr(n,h,c,p);return i&&m.attr("style",i),nt(t,m),t.intersect=function(x){return tt.polygon(t,p,x)},n}y(Fy,"card");function My(e,t){const{nodeStyles:r}=at(t);t.label="";const i=e.insert("g").attr("class",ft(t)).attr("id",t.domId??t.id),{cssStyles:a}=t,s=Math.max(28,t.width??0),o=[{x:0,y:s/2},{x:s/2,y:0},{x:0,y:-s/2},{x:-s/2,y:0}],n=rt.svg(i),l=et(t,{});t.look!=="handDrawn"&&(l.roughness=0,l.fillStyle="solid");const h=_t(o),c=n.path(h,l),u=i.insert(()=>c,":first-child");return a&&t.look!=="handDrawn"&&u.selectAll("path").attr("style",a),r&&t.look!=="handDrawn"&&u.selectAll("path").attr("style",r),t.width=28,t.height=28,t.intersect=function(f){return tt.polygon(t,o,f)},i}y(My,"choice");async function gc(e,t,r){const{labelStyles:i,nodeStyles:a}=at(t);t.labelStyle=i;const{shapeSvg:s,bbox:o,halfPadding:n}=await gt(e,t,ft(t)),l=16,h=(r==null?void 0:r.padding)??n,c=t.look==="neo"?o.width/2+l*2:o.width/2+h;let u;const{cssStyles:f}=t;if(t.look==="handDrawn"){const d=rt.svg(s),g=et(t,{}),p=d.circle(0,0,c*2,g);u=s.insert(()=>p,":first-child"),u.attr("class","basic label-container").attr("style",jt(f))}else u=s.insert("circle",":first-child").attr("class","basic label-container").attr("style",a).attr("r",c).attr("cx",0).attr("cy",0);return nt(t,u),t.calcIntersect=function(d,g){const p=d.width/2;return tt.circle(d,p,g)},t.intersect=function(d){return G.info("Circle intersect",t,c,d),tt.circle(t,c,d)},s}y(gc,"circle");function Ay(e){const t=Math.cos(Math.PI/4),r=Math.sin(Math.PI/4),i=e*2,a={x:i/2*t,y:i/2*r},s={x:-(i/2)*t,y:i/2*r},o={x:-(i/2)*t,y:-(i/2)*r},n={x:i/2*t,y:-(i/2)*r};return`M ${s.x},${s.y} L ${n.x},${n.y}
|
|
234
|
-
M ${a.x},${a.y} L ${o.x},${o.y}`}y(Ay,"createLine");function Ey(e,t){const{labelStyles:r,nodeStyles:i}=at(t);t.labelStyle=r,t.label="";const a=e.insert("g").attr("class",ft(t)).attr("id",t.domId??t.id),s=Math.max(30,(t==null?void 0:t.width)??0),{cssStyles:o}=t,n=rt.svg(a),l=et(t,{});t.look!=="handDrawn"&&(l.roughness=0,l.fillStyle="solid");const h=n.circle(0,0,s*2,l),c=Ay(s),u=n.path(c,l),f=a.insert(()=>h,":first-child");return f.insert(()=>u),f.attr("class","outer-path"),o&&t.look!=="handDrawn"&&f.selectAll("path").attr("style",o),i&&t.look!=="handDrawn"&&f.selectAll("path").attr("style",i),nt(t,f),t.intersect=function(d){return G.info("crossedCircle intersect",t,{radius:s,point:d}),tt.circle(t,s,d)},a}y(Ey,"crossedCircle");function ar(e,t,r,i=100,a=0,s=180){const o=[],n=a*Math.PI/180,c=(s*Math.PI/180-n)/(i-1);for(let u=0;u<i;u++){const f=n+u*c,d=e+r*Math.cos(f),g=t+r*Math.sin(f);o.push({x:-d,y:-g})}return o}y(ar,"generateCirclePoints");async function $y(e,t){const{labelStyles:r,nodeStyles:i}=at(t);t.labelStyle=r;const{shapeSvg:a,bbox:s,label:o}=await gt(e,t,ft(t)),n=t.look==="neo"?18:t.padding??0,l=t.look==="neo"?12:t.padding??0,h=s.width+n,c=s.height+l,u=Math.max(5,c*.1),{cssStyles:f}=t,d=[...ar(h/2,-c/2,u,30,-90,0),{x:-h/2-u,y:u},...ar(h/2+u*2,-u,u,20,-180,-270),...ar(h/2+u*2,u,u,20,-90,-180),{x:-h/2-u,y:-c/2},...ar(h/2,c/2,u,20,0,90)],g=[{x:h/2,y:-c/2-u},{x:-h/2,y:-c/2-u},...ar(h/2,-c/2,u,20,-90,0),{x:-h/2-u,y:-u},...ar(h/2+h*.1,-u,u,20,-180,-270),...ar(h/2+h*.1,u,u,20,-90,-180),{x:-h/2-u,y:c/2},...ar(h/2,c/2,u,20,0,90),{x:-h/2,y:c/2+u},{x:h/2,y:c/2+u}],p=rt.svg(a),m=et(t,{fill:"none"});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const x=_t(d).replace("Z",""),k=p.path(x,m),w=_t(g),S=p.path(w,{...m}),_=a.insert("g",":first-child");return _.insert(()=>S,":first-child").attr("stroke-opacity",0),_.insert(()=>k,":first-child"),_.attr("class","text"),f&&t.look!=="handDrawn"&&_.selectAll("path").attr("style",f),i&&t.look!=="handDrawn"&&_.selectAll("path").attr("style",i),_.attr("transform",`translate(${u}, 0)`),o.attr("transform",`translate(${-h/2+u-(s.x-(s.left??0))},${-c/2+(t.padding??0)/2-(s.y-(s.top??0))})`),nt(t,_),t.intersect=function(v){return tt.polygon(t,g,v)},a}y($y,"curlyBraceLeft");function sr(e,t,r,i=100,a=0,s=180){const o=[],n=a*Math.PI/180,c=(s*Math.PI/180-n)/(i-1);for(let u=0;u<i;u++){const f=n+u*c,d=e+r*Math.cos(f),g=t+r*Math.sin(f);o.push({x:d,y:g})}return o}y(sr,"generateCirclePoints");async function Oy(e,t){const{labelStyles:r,nodeStyles:i}=at(t);t.labelStyle=r;const{shapeSvg:a,bbox:s,label:o}=await gt(e,t,ft(t)),n=t.look==="neo"?18:t.padding??0,l=t.look==="neo"?12:t.padding??0,h=s.width+(t.look==="neo"?n*2:n),c=s.height+(t.look==="neo"?l*2:l),u=Math.max(5,c*.1),{cssStyles:f}=t,d=[...sr(h/2,-c/2,u,20,-90,0),{x:h/2+u,y:-u},...sr(h/2+u*2,-u,u,20,-180,-270),...sr(h/2+u*2,u,u,20,-90,-180),{x:h/2+u,y:c/2},...sr(h/2,c/2,u,20,0,90)],g=[{x:-h/2,y:-c/2-u},{x:h/2,y:-c/2-u},...sr(h/2,-c/2,u,20,-90,0),{x:h/2+u,y:-u},...sr(h/2+u*2,-u,u,20,-180,-270),...sr(h/2+u*2,u,u,20,-90,-180),{x:h/2+u,y:c/2},...sr(h/2,c/2,u,20,0,90),{x:h/2,y:c/2+u},{x:-h/2,y:c/2+u}],p=rt.svg(a),m=et(t,{fill:"none"});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const x=_t(d).replace("Z",""),k=p.path(x,m),w=_t(g),S=p.path(w,{...m}),_=a.insert("g",":first-child");return _.insert(()=>S,":first-child").attr("stroke-opacity",0),_.insert(()=>k,":first-child"),_.attr("class","text"),f&&t.look!=="handDrawn"&&_.selectAll("path").attr("style",f),i&&t.look!=="handDrawn"&&_.selectAll("path").attr("style",i),_.attr("transform",`translate(${-u}, 0)`),o.attr("transform",`translate(${-h/2+(t.padding??0)/2-(s.x-(s.left??0))},${-c/2+(t.padding??0)/2-(s.y-(s.top??0))})`),nt(t,_),t.intersect=function(v){return tt.polygon(t,g,v)},a}y(Oy,"curlyBraceRight");function Qt(e,t,r,i=100,a=0,s=180){const o=[],n=a*Math.PI/180,c=(s*Math.PI/180-n)/(i-1);for(let u=0;u<i;u++){const f=n+u*c,d=e+r*Math.cos(f),g=t+r*Math.sin(f);o.push({x:-d,y:-g})}return o}y(Qt,"generateCirclePoints");async function Dy(e,t){const{labelStyles:r,nodeStyles:i}=at(t);t.labelStyle=r;const{shapeSvg:a,bbox:s,label:o}=await gt(e,t,ft(t)),n=t.look==="neo"?18:t.padding??0,l=t.look==="neo"?12:t.padding??0,h=s.width+(t.look==="neo"?n*2:n),c=s.height+(t.look==="neo"?l*2:l),u=Math.max(5,c*.1),{cssStyles:f}=t,d=[...Qt(h/2,-c/2,u,30,-90,0),{x:-h/2-u,y:u},...Qt(h/2+u*2,-u,u,20,-180,-270),...Qt(h/2+u*2,u,u,20,-90,-180),{x:-h/2-u,y:-c/2},...Qt(h/2,c/2,u,20,0,90)],g=[...Qt(-h/2+u+u/2,-c/2,u,20,-90,-180),{x:h/2-u/2,y:u},...Qt(-h/2-u/2,-u,u,20,0,90),...Qt(-h/2-u/2,u,u,20,-90,0),{x:h/2-u/2,y:-u},...Qt(-h/2+u+u/2,c/2,u,30,-180,-270)],p=[{x:h/2,y:-c/2-u},{x:-h/2,y:-c/2-u},...Qt(h/2,-c/2,u,20,-90,0),{x:-h/2-u,y:-u},...Qt(h/2+u*2,-u,u,20,-180,-270),...Qt(h/2+u*2,u,u,20,-90,-180),{x:-h/2-u,y:c/2},...Qt(h/2,c/2,u,20,0,90),{x:-h/2,y:c/2+u},{x:h/2-u-u/2,y:c/2+u},...Qt(-h/2+u+u/2,-c/2,u,20,-90,-180),{x:h/2-u/2,y:u},...Qt(-h/2-u/2,-u,u,20,0,90),...Qt(-h/2-u/2,u,u,20,-90,0),{x:h/2-u/2,y:-u},...Qt(-h/2+u+u/2,c/2,u,30,-180,-270)],m=rt.svg(a),C=et(t,{fill:"none"});t.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");const k=_t(d).replace("Z",""),w=m.path(k,C),_=_t(g).replace("Z",""),v=m.path(_,C),D=_t(p),H=m.path(D,{...C}),R=a.insert("g",":first-child");return R.insert(()=>H,":first-child").attr("stroke-opacity",0),R.insert(()=>w,":first-child"),R.insert(()=>v,":first-child"),R.attr("class","text"),f&&t.look!=="handDrawn"&&R.selectAll("path").attr("style",f),i&&t.look!=="handDrawn"&&R.selectAll("path").attr("style",i),R.attr("transform",`translate(${u-u/4}, 0)`),o.attr("transform",`translate(${-h/2+(t.padding??0)/2-(s.x-(s.left??0))},${-c/2+(t.padding??0)/2-(s.y-(s.top??0))})`),nt(t,R),t.intersect=function(B){return tt.polygon(t,p,B)},a}y(Dy,"curlyBraces");async function Iy(e,t){const{labelStyles:r,nodeStyles:i}=at(t);t.labelStyle=r;const a=t.padding??0,s=t.look==="neo"?16:a,o=t.look==="neo"?12:a,n=20,l=5,{shapeSvg:h,bbox:c}=await gt(e,t,ft(t)),u=Math.max(n,(c.width+s*2)*1.25,(t==null?void 0:t.width)??0),f=Math.max(l,c.height+o*2,(t==null?void 0:t.height)??0),d=f/2,{cssStyles:g}=t,p=rt.svg(h),m=et(t,{});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const C=u,x=f,k=C-d,w=x/4,S=[{x:k,y:0},{x:w,y:0},{x:0,y:x/2},{x:w,y:x},{x:k,y:x},...Ga(-k,-x/2,d,50,270,90)],_=_t(S),v=p.path(_,m),D=h.insert(()=>v,":first-child");return D.attr("class","basic label-container outer-path"),g&&t.look!=="handDrawn"&&D.selectChildren("path").attr("style",g),i&&t.look!=="handDrawn"&&D.selectChildren("path").attr("style",i),D.attr("transform",`translate(${-u/2}, ${-f/2})`),nt(t,D),t.intersect=function(H){return tt.polygon(t,S,H)},h}y(Iy,"curvedTrapezoid");var xF=y((e,t,r,i,a,s)=>[`M${e},${t+s}`,`a${a},${s} 0,0,0 ${r},0`,`a${a},${s} 0,0,0 ${-r},0`,`l0,${i}`,`a${a},${s} 0,0,0 ${r},0`,`l0,${-i}`].join(" "),"createCylinderPathD"),bF=y((e,t,r,i,a,s)=>[`M${e},${t+s}`,`M${e+r},${t+s}`,`a${a},${s} 0,0,0 ${-r},0`,`l0,${i}`,`a${a},${s} 0,0,0 ${r},0`,`l0,${-i}`].join(" "),"createOuterCylinderPathD"),kF=y((e,t,r,i,a,s)=>[`M${e-r/2},${-i/2}`,`a${a},${s} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD"),Sd=8,_d=8;async function Py(e,t){const{labelStyles:r,nodeStyles:i}=at(t);t.labelStyle=r;const a=t.padding??0,s=t.look==="neo"?24:a,o=t.look==="neo"?24:a;if(t.width||t.height){const m=t.width??0;t.width=(t.width??0)-o,t.width<_d&&(t.width=_d);const x=m/2/(2.5+m/50);t.height=(t.height??0)-s-x*3,t.height<Sd&&(t.height=Sd)}const{shapeSvg:n,bbox:l,label:h}=await gt(e,t,ft(t)),c=(t.width?t.width:l.width)+o,u=c/2,f=u/(2.5+c/50),d=(t.height?t.height:l.height)+s+f;let g;const{cssStyles:p}=t;if(t.look==="handDrawn"){const m=rt.svg(n),C=bF(0,0,c,d,u,f),x=kF(0,f,c,d,u,f),k=et(t,{}),w=m.path(C,k),S=m.path(x,et(t,{fill:"none"}));g=n.insert(()=>S,":first-child"),g=n.insert(()=>w,":first-child"),g.attr("class","basic label-container"),p&&g.attr("style",p)}else{const m=xF(0,0,c,d,u,f);g=n.insert("path",":first-child").attr("d",m).attr("class","basic label-container outer-path").attr("style",jt(p)).attr("style",i)}return g.attr("label-offset-y",f),g.attr("transform",`translate(${-c/2}, ${-(d/2+f)})`),nt(t,g),h.attr("transform",`translate(${-(l.width/2)-(l.x-(l.left??0))}, ${-(l.height/2)+(t.padding??0)/1.5-(l.y-(l.top??0))})`),t.intersect=function(m){const C=tt.rect(t,m),x=C.x-(t.x??0);if(u!=0&&(Math.abs(x)<(t.width??0)/2||Math.abs(x)==(t.width??0)/2&&Math.abs(C.y-(t.y??0))>(t.height??0)/2-f)){let k=f*f*(1-x*x/(u*u));k>0&&(k=Math.sqrt(k)),k=f-k,m.y-(t.y??0)>0&&(k=-k),C.y+=k}return C},n}y(Py,"cylinder");async function ea(e,t,r){const{labelStyles:i,nodeStyles:a}=at(t);t.labelStyle=i;const{shapeSvg:s,bbox:o}=await gt(e,t,ft(t)),n=Math.max(o.width+r.labelPaddingX*2,(t==null?void 0:t.width)||0),l=Math.max(o.height+r.labelPaddingY*2,(t==null?void 0:t.height)||0),h=-n/2,c=-l/2;let u,{rx:f,ry:d}=t;const{cssStyles:g}=t;if(r!=null&&r.rx&&r.ry&&(f=r.rx,d=r.ry),t.look==="handDrawn"){const p=rt.svg(s),m=et(t,{}),C=f||d?p.path(Ar(h,c,n,l,f||0),m):p.rectangle(h,c,n,l,m);u=s.insert(()=>C,":first-child"),u.attr("class","basic label-container").attr("style",jt(g))}else u=s.insert("rect",":first-child"),u.attr("class","basic label-container").attr("style",a).attr("rx",jt(f)).attr("ry",jt(d)).attr("x",h).attr("y",c).attr("width",n).attr("height",l);return nt(t,u),t.calcIntersect=function(p,m){return tt.rect(p,m)},t.intersect=function(p){return tt.rect(t,p)},s}y(ea,"drawRect");async function Ry(e,t){const{cssClasses:r,labelPaddingX:i,labelPaddingY:a,padding:s,width:o,height:n}=t,l={rx:0,ry:0,labelPaddingX:i??(s??0)*2,labelPaddingY:a??s??0},h=await ea(e,t,l);if(t.look==="handDrawn"){const d=rt.svg(h),g=et(t,{}),p=h.select(".basic.label-container > path:nth-child(2)"),m=p.node();if(!m)return h;let C=null;if(m instanceof SVGGraphicsElement)C=m.getBBox();else return h;return h.insert(()=>d.line(C.x,C.y,C.x+C.width,C.y,g),".basic.label-container g.label"),h.insert(()=>d.line(C.x,C.y+C.height,C.x+C.width,C.y+C.height,g),".basic.label-container g.label"),p.remove(),h}const c=h.select(".basic.label-container"),u=(Number(c.attr("width"))||o)??0,f=(Number(c.attr("height"))||n)??0;return u>0&&f>0&&c.attr("stroke-dasharray",`${u} ${f}`),h}y(Ry,"datastore");async function Ny(e,t){const{labelStyles:r,nodeStyles:i}=at(t);t.labelStyle=r;const a=t.look==="neo"?16:t.padding??0,s=t.look==="neo"?16:t.padding??0,{shapeSvg:o,bbox:n,label:l}=await gt(e,t,ft(t)),h=n.width+a,c=n.height+s,u=c*.2,f=-h/2,d=-c/2-u/2,{cssStyles:g}=t,p=rt.svg(o),m=et(t,{});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const C=[{x:f,y:d+u},{x:-f,y:d+u},{x:-f,y:-d},{x:f,y:-d},{x:f,y:d},{x:-f,y:d},{x:-f,y:d+u}],x=p.polygon(C.map(w=>[w.x,w.y]),m),k=o.insert(()=>x,":first-child");return k.attr("class","basic label-container outer-path"),g&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",g),i&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",i),l.attr("transform",`translate(${f+(t.padding??0)/2-(n.x-(n.left??0))}, ${d+u+(t.padding??0)/2-(n.y-(n.top??0))})`),nt(t,k),t.intersect=function(w){return tt.rect(t,w)},o}y(Ny,"dividedRectangle");async function qy(e,t){var d,g;const{labelStyles:r,nodeStyles:i}=at(t),a=t.look==="neo"?12:5;t.labelStyle=r;const s=t.padding??0,o=t.look==="neo"?16:s,{shapeSvg:n,bbox:l}=await gt(e,t,ft(t)),h=(t!=null&&t.width?(t==null?void 0:t.width)/2:l.width/2)+(o??0),c=h-a;let u;const{cssStyles:f}=t;if(t.look==="handDrawn"){const p=rt.svg(n),m=et(t,{roughness:.2,strokeWidth:2.5}),C=et(t,{roughness:.2,strokeWidth:1.5}),x=p.circle(0,0,h*2,m),k=p.circle(0,0,c*2,C);u=n.insert("g",":first-child"),u.attr("class",jt(t.cssClasses)).attr("style",jt(f)),(d=u.node())==null||d.appendChild(x),(g=u.node())==null||g.appendChild(k)}else{u=n.insert("g",":first-child");const p=u.insert("circle",":first-child"),m=u.insert("circle");u.attr("class","basic label-container").attr("style",i),p.attr("class","outer-circle").attr("style",i).attr("r",h).attr("cx",0).attr("cy",0),m.attr("class","inner-circle").attr("style",i).attr("r",c).attr("cx",0).attr("cy",0)}return nt(t,u),t.intersect=function(p){return G.info("DoubleCircle intersect",t,h,p),tt.circle(t,h,p)},n}y(qy,"doublecircle");function Wy(e,t,{config:{themeVariables:r}}){const{labelStyles:i,nodeStyles:a}=at(t);t.label="",t.labelStyle=i;const s=e.insert("g").attr("class",ft(t)).attr("id",t.domId??t.id),o=7,{cssStyles:n}=t,l=rt.svg(s),{nodeBorder:h}=r,c=et(t,{fillStyle:"solid"});t.look!=="handDrawn"&&(c.roughness=0);const u=l.circle(0,0,o*2,c),f=s.insert(()=>u,":first-child");return f.selectAll("path").attr("style",`fill: ${h} !important;`),n&&n.length>0&&t.look!=="handDrawn"&&f.selectAll("path").attr("style",n),a&&t.look!=="handDrawn"&&f.selectAll("path").attr("style",a),nt(t,f),t.intersect=function(d){return G.info("filledCircle intersect",t,{radius:o,point:d}),tt.circle(t,o,d)},s}y(Wy,"filledCircle");var vd=10,Bd=10;async function zy(e,t){const{labelStyles:r,nodeStyles:i}=at(t);t.labelStyle=r;const a=t.padding??0,s=t.look==="neo"?a*2:a;(t.width||t.height)&&(t.height=(t==null?void 0:t.height)??0,t.height<vd&&(t.height=vd),t.width=((t==null?void 0:t.width)??0)-s-s/2,t.width<Bd&&(t.width=Bd));const{shapeSvg:o,bbox:n,label:l}=await gt(e,t,ft(t)),h=(t!=null&&t.width?t==null?void 0:t.width:n.width)+(s??0),c=t!=null&&t.height?t==null?void 0:t.height:h+n.height,u=c,f=[{x:0,y:-c},{x:u,y:-c},{x:u/2,y:0}],{cssStyles:d}=t,g=rt.svg(o),p=et(t,{});t.look!=="handDrawn"&&(p.roughness=0,p.fillStyle="solid");const m=_t(f),C=g.path(m,p),x=o.insert(()=>C,":first-child").attr("transform",`translate(${-c/2}, ${c/2})`).attr("class","outer-path");return d&&t.look!=="handDrawn"&&x.selectChildren("path").attr("style",d),i&&t.look!=="handDrawn"&&x.selectChildren("path").attr("style",i),t.width=h,t.height=c,nt(t,x),l.attr("transform",`translate(${-n.width/2-(n.x-(n.left??0))}, ${-c/2+(t.padding??0)/2+(n.y-(n.top??0))})`),t.intersect=function(k){return G.info("Triangle intersect",t,f,k),tt.polygon(t,f,k)},o}y(zy,"flippedTriangle");function Hy(e,t,{dir:r,config:{state:i,themeVariables:a}}){const{nodeStyles:s}=at(t);t.label="";const o=e.insert("g").attr("class",ft(t)).attr("id",t.domId??t.id),{cssStyles:n}=t;let l=Math.max(70,(t==null?void 0:t.width)??0),h=Math.max(10,(t==null?void 0:t.height)??0);r==="LR"&&(l=Math.max(10,(t==null?void 0:t.width)??0),h=Math.max(70,(t==null?void 0:t.height)??0));const c=-1*l/2,u=-1*h/2,f=rt.svg(o),d=et(t,{stroke:a.lineColor,fill:a.lineColor});t.look!=="handDrawn"&&(d.roughness=0,d.fillStyle="solid");const g=f.rectangle(c,u,l,h,d),p=o.insert(()=>g,":first-child");n&&t.look!=="handDrawn"&&p.selectAll("path").attr("style",n),s&&t.look!=="handDrawn"&&p.selectAll("path").attr("style",s),nt(t,p);const m=(i==null?void 0:i.padding)??0;return t.width&&t.height&&(t.width+=m/2||0,t.height+=m/2||0),t.intersect=function(C){return tt.rect(t,C)},o}y(Hy,"forkJoin");async function Uy(e,t){const{labelStyles:r,nodeStyles:i}=at(t);t.labelStyle=r;const a=15,s=10,o=t.look==="neo"?16:t.padding??0,n=t.look==="neo"?12:t.padding??0;(t.width||t.height)&&(t.height=((t==null?void 0:t.height)??0)-n*2,t.height<s&&(t.height=s),t.width=((t==null?void 0:t.width)??0)-o*2,t.width<a&&(t.width=a));const{shapeSvg:l,bbox:h}=await gt(e,t,ft(t)),c=(t!=null&&t.width?t==null?void 0:t.width:Math.max(a,h.width))+o*2,u=(t!=null&&t.height?t==null?void 0:t.height:Math.max(s,h.height))+n*2,f=u/2,{cssStyles:d}=t,g=rt.svg(l),p=et(t,{});t.look!=="handDrawn"&&(p.roughness=0,p.fillStyle="solid");const m=[{x:-c/2,y:-u/2},{x:c/2-f,y:-u/2},...Ga(-c/2+f,0,f,50,90,270),{x:c/2-f,y:u/2},{x:-c/2,y:u/2}],C=_t(m),x=g.path(C,p),k=l.insert(()=>x,":first-child");return k.attr("class","basic label-container outer-path"),d&&t.look!=="handDrawn"&&k.selectChildren("path").attr("style",d),i&&t.look!=="handDrawn"&&k.selectChildren("path").attr("style",i),nt(t,k),t.intersect=function(w){return G.info("Pill intersect",t,{radius:f,point:w}),tt.polygon(t,m,w)},l}y(Uy,"halfRoundedRectangle");var wF=y((e,t,r,i,a)=>[`M${e+a},${t}`,`L${e+r-a},${t}`,`L${e+r},${t-i/2}`,`L${e+r-a},${t-i}`,`L${e+a},${t-i}`,`L${e},${t-i/2}`,"Z"].join(" "),"createHexagonPathD");async function Yy(e,t){const{labelStyles:r,nodeStyles:i}=at(t),a=t.look==="neo"?3.5:4;t.labelStyle=r;const s=t.padding??0,o=70,n=32,l=t.look==="neo"?o:s,h=t.look==="neo"?n:s;if(t.width||t.height){const k=(t.height??0)/a;t.width=((t==null?void 0:t.width)??0)-2*k-h,t.height=(t.height??0)-l}const{shapeSvg:c,bbox:u}=await gt(e,t,ft(t)),f=(t!=null&&t.height?t==null?void 0:t.height:u.height)+l,d=f/a,g=(t!=null&&t.width?t==null?void 0:t.width:u.width)+2*d+h,p=[{x:d,y:0},{x:g-d,y:0},{x:g,y:-f/2},{x:g-d,y:-f},{x:d,y:-f},{x:0,y:-f/2}];let m;const{cssStyles:C}=t;if(t.look==="handDrawn"){const x=rt.svg(c),k=et(t,{}),w=wF(0,0,g,f,d),S=x.path(w,k);m=c.insert(()=>S,":first-child").attr("transform",`translate(${-g/2}, ${f/2})`),C&&m.attr("style",C)}else m=pr(c,g,f,p);return i&&m.attr("style",i),t.width=g,t.height=f,nt(t,m),t.intersect=function(x){return tt.polygon(t,p,x)},c}y(Yy,"hexagon");async function Gy(e,t){const{labelStyles:r,nodeStyles:i}=at(t);t.label="",t.labelStyle=r;const{shapeSvg:a}=await gt(e,t,ft(t)),s=Math.max(30,(t==null?void 0:t.width)??0),o=Math.max(30,(t==null?void 0:t.height)??0),{cssStyles:n}=t,l=rt.svg(a),h=et(t,{});t.look!=="handDrawn"&&(h.roughness=0,h.fillStyle="solid");const c=[{x:0,y:0},{x:s,y:0},{x:0,y:o},{x:s,y:o}],u=_t(c),f=l.path(u,h),d=a.insert(()=>f,":first-child");return d.attr("class","basic label-container outer-path"),n&&t.look!=="handDrawn"&&d.selectChildren("path").attr("style",n),i&&t.look!=="handDrawn"&&d.selectChildren("path").attr("style",i),d.attr("transform",`translate(${-s/2}, ${-o/2})`),nt(t,d),t.intersect=function(g){return G.info("Pill intersect",t,{points:c}),tt.polygon(t,c,g)},a}y(Gy,"hourglass");async function Xy(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:a}=at(t);t.labelStyle=a;const s=t.assetHeight??48,o=t.assetWidth??48,n=Math.max(s,o),l=i==null?void 0:i.wrappingWidth;t.width=Math.max(n,l??0);const{shapeSvg:h,bbox:c,label:u}=await gt(e,t,"icon-shape default"),f=t.pos==="t",d=n,g=n,{nodeBorder:p}=r,{stylesMap:m}=ta(t),C=-g/2,x=-d/2,k=t.label?8:0,w=rt.svg(h),S=et(t,{stroke:"none",fill:"none"});t.look!=="handDrawn"&&(S.roughness=0,S.fillStyle="solid");const _=w.rectangle(C,x,g,d,S),v=Math.max(g,c.width),D=d+c.height+k,H=w.rectangle(-v/2,-D/2,v,D,{...S,fill:"transparent",stroke:"none"}),R=h.insert(()=>_,":first-child"),B=h.insert(()=>H);if(t.icon){const U=h.append("g");U.html(`<g>${await as(t.icon,{height:n,width:n,fallbackPrefix:""})}</g>`);const A=U.node().getBBox(),M=A.width,E=A.height,L=A.x,I=A.y;U.attr("transform",`translate(${-M/2-L},${f?c.height/2+k/2-E/2-I:-c.height/2-k/2-E/2-I})`),U.attr("style",`color: ${m.get("stroke")??p};`)}return u.attr("transform",`translate(${-c.width/2-(c.x-(c.left??0))},${f?-D/2:D/2-c.height})`),R.attr("transform",`translate(0,${f?c.height/2+k/2:-c.height/2-k/2})`),nt(t,B),t.intersect=function(U){if(G.info("iconSquare intersect",t,U),!t.label)return tt.rect(t,U);const A=t.x??0,M=t.y??0,E=t.height??0;let L=[];return f?L=[{x:A-c.width/2,y:M-E/2},{x:A+c.width/2,y:M-E/2},{x:A+c.width/2,y:M-E/2+c.height+k},{x:A+g/2,y:M-E/2+c.height+k},{x:A+g/2,y:M+E/2},{x:A-g/2,y:M+E/2},{x:A-g/2,y:M-E/2+c.height+k},{x:A-c.width/2,y:M-E/2+c.height+k}]:L=[{x:A-g/2,y:M-E/2},{x:A+g/2,y:M-E/2},{x:A+g/2,y:M-E/2+d},{x:A+c.width/2,y:M-E/2+d},{x:A+c.width/2/2,y:M+E/2},{x:A-c.width/2,y:M+E/2},{x:A-c.width/2,y:M-E/2+d},{x:A-g/2,y:M-E/2+d}],tt.polygon(t,L,U)},h}y(Xy,"icon");async function jy(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:a}=at(t);t.labelStyle=a;const s=t.assetHeight??48,o=t.assetWidth??48,n=Math.max(s,o),l=i==null?void 0:i.wrappingWidth;t.width=Math.max(n,l??0);const{shapeSvg:h,bbox:c,label:u}=await gt(e,t,"icon-shape default"),f=20,d=t.label?8:0,g=t.pos==="t",{nodeBorder:p,mainBkg:m}=r,{stylesMap:C}=ta(t),x=rt.svg(h),k=et(t,{});t.look!=="handDrawn"&&(k.roughness=0,k.fillStyle="solid");const w=C.get("fill");k.stroke=w??m;const S=h.append("g");t.icon&&S.html(`<g>${await as(t.icon,{height:n,width:n,fallbackPrefix:""})}</g>`);const _=S.node().getBBox(),v=_.width,D=_.height,H=_.x,R=_.y,B=Math.max(v,D)*Math.SQRT2+f*2,U=x.circle(0,0,B,k),A=Math.max(B,c.width),M=B+c.height+d,E=x.rectangle(-A/2,-M/2,A,M,{...k,fill:"transparent",stroke:"none"}),L=h.insert(()=>U,":first-child"),I=h.insert(()=>E);return S.attr("transform",`translate(${-v/2-H},${g?c.height/2+d/2-D/2-R:-c.height/2-d/2-D/2-R})`),S.attr("style",`color: ${C.get("stroke")??p};`),u.attr("transform",`translate(${-c.width/2-(c.x-(c.left??0))},${g?-M/2:M/2-c.height})`),L.attr("transform",`translate(0,${g?c.height/2+d/2:-c.height/2-d/2})`),nt(t,I),t.intersect=function($){return G.info("iconSquare intersect",t,$),tt.rect(t,$)},h}y(jy,"iconCircle");async function Vy(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:a}=at(t);t.labelStyle=a;const s=t.assetHeight??48,o=t.assetWidth??48,n=Math.max(s,o),l=i==null?void 0:i.wrappingWidth;t.width=Math.max(n,l??0);const{shapeSvg:h,bbox:c,halfPadding:u,label:f}=await gt(e,t,"icon-shape default"),d=t.pos==="t",g=n+u*2,p=n+u*2,{nodeBorder:m,mainBkg:C}=r,{stylesMap:x}=ta(t),k=-p/2,w=-g/2,S=t.label?8:0,_=rt.svg(h),v=et(t,{});t.look!=="handDrawn"&&(v.roughness=0,v.fillStyle="solid");const D=x.get("fill");v.stroke=D??C;const H=_.path(Ar(k,w,p,g,5),v),R=Math.max(p,c.width),B=g+c.height+S,U=_.rectangle(-R/2,-B/2,R,B,{...v,fill:"transparent",stroke:"none"}),A=h.insert(()=>H,":first-child").attr("class","icon-shape2"),M=h.insert(()=>U);if(t.icon){const E=h.append("g");E.html(`<g>${await as(t.icon,{height:n,width:n,fallbackPrefix:""})}</g>`);const L=E.node().getBBox(),I=L.width,$=L.height,q=L.x,X=L.y;E.attr("transform",`translate(${-I/2-q},${d?c.height/2+S/2-$/2-X:-c.height/2-S/2-$/2-X})`),E.attr("style",`color: ${x.get("stroke")??m};`)}return f.attr("transform",`translate(${-c.width/2-(c.x-(c.left??0))},${d?-B/2:B/2-c.height})`),A.attr("transform",`translate(0,${d?c.height/2+S/2:-c.height/2-S/2})`),nt(t,M),t.intersect=function(E){if(G.info("iconSquare intersect",t,E),!t.label)return tt.rect(t,E);const L=t.x??0,I=t.y??0,$=t.height??0;let q=[];return d?q=[{x:L-c.width/2,y:I-$/2},{x:L+c.width/2,y:I-$/2},{x:L+c.width/2,y:I-$/2+c.height+S},{x:L+p/2,y:I-$/2+c.height+S},{x:L+p/2,y:I+$/2},{x:L-p/2,y:I+$/2},{x:L-p/2,y:I-$/2+c.height+S},{x:L-c.width/2,y:I-$/2+c.height+S}]:q=[{x:L-p/2,y:I-$/2},{x:L+p/2,y:I-$/2},{x:L+p/2,y:I-$/2+g},{x:L+c.width/2,y:I-$/2+g},{x:L+c.width/2/2,y:I+$/2},{x:L-c.width/2,y:I+$/2},{x:L-c.width/2,y:I-$/2+g},{x:L-p/2,y:I-$/2+g}],tt.polygon(t,q,E)},h}y(Vy,"iconRounded");async function Zy(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:a}=at(t);t.labelStyle=a;const s=t.assetHeight??48,o=t.assetWidth??48,n=Math.max(s,o),l=i==null?void 0:i.wrappingWidth;t.width=Math.max(n,l??0);const{shapeSvg:h,bbox:c,halfPadding:u,label:f}=await gt(e,t,"icon-shape default"),d=t.pos==="t",g=n+u*2,p=n+u*2,{nodeBorder:m,mainBkg:C}=r,{stylesMap:x}=ta(t),k=-p/2,w=-g/2,S=t.label?8:0,_=rt.svg(h),v=et(t,{});t.look!=="handDrawn"&&(v.roughness=0,v.fillStyle="solid");const D=x.get("fill");v.stroke=D??C;const H=_.path(Ar(k,w,p,g,.1),v),R=Math.max(p,c.width),B=g+c.height+S,U=_.rectangle(-R/2,-B/2,R,B,{...v,fill:"transparent",stroke:"none"}),A=h.insert(()=>H,":first-child"),M=h.insert(()=>U);if(t.icon){const E=h.append("g");E.html(`<g>${await as(t.icon,{height:n,width:n,fallbackPrefix:""})}</g>`);const L=E.node().getBBox(),I=L.width,$=L.height,q=L.x,X=L.y;E.attr("transform",`translate(${-I/2-q},${d?c.height/2+S/2-$/2-X:-c.height/2-S/2-$/2-X})`),E.attr("style",`color: ${x.get("stroke")??m};`)}return f.attr("transform",`translate(${-c.width/2-(c.x-(c.left??0))},${d?-B/2:B/2-c.height})`),A.attr("transform",`translate(0,${d?c.height/2+S/2:-c.height/2-S/2})`),nt(t,M),t.intersect=function(E){if(G.info("iconSquare intersect",t,E),!t.label)return tt.rect(t,E);const L=t.x??0,I=t.y??0,$=t.height??0;let q=[];return d?q=[{x:L-c.width/2,y:I-$/2},{x:L+c.width/2,y:I-$/2},{x:L+c.width/2,y:I-$/2+c.height+S},{x:L+p/2,y:I-$/2+c.height+S},{x:L+p/2,y:I+$/2},{x:L-p/2,y:I+$/2},{x:L-p/2,y:I-$/2+c.height+S},{x:L-c.width/2,y:I-$/2+c.height+S}]:q=[{x:L-p/2,y:I-$/2},{x:L+p/2,y:I-$/2},{x:L+p/2,y:I-$/2+g},{x:L+c.width/2,y:I-$/2+g},{x:L+c.width/2/2,y:I+$/2},{x:L-c.width/2,y:I+$/2},{x:L-c.width/2,y:I-$/2+g},{x:L-p/2,y:I-$/2+g}],tt.polygon(t,q,E)},h}y(Zy,"iconSquare");async function Qy(e,t,{config:{flowchart:r}}){const i=new Image;i.src=(t==null?void 0:t.img)??"",await i.decode();const a=Number(i.naturalWidth.toString().replace("px","")),s=Number(i.naturalHeight.toString().replace("px",""));t.imageAspectRatio=a/s;const{labelStyles:o}=at(t);t.labelStyle=o;const n=r==null?void 0:r.wrappingWidth;t.defaultWidth=r==null?void 0:r.wrappingWidth;const l=Math.max(t.label?n??0:0,(t==null?void 0:t.assetWidth)??a),h=t.constraint==="on"&&t!=null&&t.assetHeight?t.assetHeight*t.imageAspectRatio:l,c=t.constraint==="on"?h/t.imageAspectRatio:(t==null?void 0:t.assetHeight)??s;t.width=Math.max(h,n??0);const{shapeSvg:u,bbox:f,label:d}=await gt(e,t,"image-shape default"),g=t.pos==="t",p=-h/2,m=-c/2,C=t.label?8:0,x=rt.svg(u),k=et(t,{});t.look!=="handDrawn"&&(k.roughness=0,k.fillStyle="solid");const w=x.rectangle(p,m,h,c,k),S=Math.max(h,f.width),_=c+f.height+C,v=x.rectangle(-S/2,-_/2,S,_,{...k,fill:"none",stroke:"none"}),D=u.insert(()=>w,":first-child"),H=u.insert(()=>v);if(t.img){const R=u.append("image");R.attr("href",t.img),R.attr("width",h),R.attr("height",c),R.attr("preserveAspectRatio","none"),R.attr("transform",`translate(${-h/2},${g?_/2-c:-_/2})`)}return d.attr("transform",`translate(${-f.width/2-(f.x-(f.left??0))},${g?-c/2-f.height/2-C/2:c/2-f.height/2+C/2})`),D.attr("transform",`translate(0,${g?f.height/2+C/2:-f.height/2-C/2})`),nt(t,H),t.intersect=function(R){if(G.info("iconSquare intersect",t,R),!t.label)return tt.rect(t,R);const B=t.x??0,U=t.y??0,A=t.height??0;let M=[];return g?M=[{x:B-f.width/2,y:U-A/2},{x:B+f.width/2,y:U-A/2},{x:B+f.width/2,y:U-A/2+f.height+C},{x:B+h/2,y:U-A/2+f.height+C},{x:B+h/2,y:U+A/2},{x:B-h/2,y:U+A/2},{x:B-h/2,y:U-A/2+f.height+C},{x:B-f.width/2,y:U-A/2+f.height+C}]:M=[{x:B-h/2,y:U-A/2},{x:B+h/2,y:U-A/2},{x:B+h/2,y:U-A/2+c},{x:B+f.width/2,y:U-A/2+c},{x:B+f.width/2/2,y:U+A/2},{x:B-f.width/2,y:U+A/2},{x:B-f.width/2,y:U-A/2+c},{x:B-h/2,y:U-A/2+c}],tt.polygon(t,M,R)},u}y(Qy,"imageSquare");async function Ky(e,t){const{labelStyles:r,nodeStyles:i}=at(t);t.labelStyle=r;const a=t.padding??0,s=a,o=t.look==="neo"?a*2:a,{shapeSvg:n,bbox:l}=await gt(e,t,ft(t)),h=Math.max(l.width+(o??0)*2,(t==null?void 0:t.width)??0),c=Math.max(l.height+(s??0)*2,(t==null?void 0:t.height)??0),u=[{x:0,y:0},{x:h,y:0},{x:h+3*c/6,y:-c},{x:-3*c/6,y:-c}];let f;const{cssStyles:d}=t;if(t.look==="handDrawn"){const g=rt.svg(n),p=et(t,{}),m=_t(u),C=g.path(m,p);f=n.insert(()=>C,":first-child").attr("transform",`translate(${-h/2}, ${c/2})`),d&&f.attr("style",d)}else f=pr(n,h,c,u);return i&&f.attr("style",i),t.width=h,t.height=c,nt(t,f),t.intersect=function(g){return tt.polygon(t,u,g)},n}y(Ky,"inv_trapezoid");async function Jy(e,t){const{shapeSvg:r,bbox:i,label:a}=await gt(e,t,"label"),s=r.insert("rect",":first-child");return s.attr("width",.1).attr("height",.1),r.attr("class","label edgeLabel"),a.attr("transform",`translate(${-(i.width/2)-(i.x-(i.left??0))}, ${-(i.height/2)-(i.y-(i.top??0))})`),nt(t,s),t.intersect=function(l){return tt.rect(t,l)},r}y(Jy,"labelRect");async function t0(e,t){const{labelStyles:r,nodeStyles:i}=at(t);t.labelStyle=r;const a=t.padding??0,s=a,o=t.look==="neo"?a*2:a,{shapeSvg:n,bbox:l}=await gt(e,t,ft(t)),h=((t==null?void 0:t.height)??l.height)+s,c=((t==null?void 0:t.width)??l.width)+o,u=[{x:0,y:0},{x:c+3*h/6,y:0},{x:c,y:-h},{x:-(3*h)/6,y:-h}];let f;const{cssStyles:d}=t;if(t.look==="handDrawn"){const g=rt.svg(n),p=et(t,{}),m=_t(u),C=g.path(m,p);f=n.insert(()=>C,":first-child").attr("transform",`translate(${-c/2}, ${h/2})`),d&&f.attr("style",d)}else f=pr(n,c,h,u);return i&&f.attr("style",i),t.width=c,t.height=h,nt(t,f),t.intersect=function(g){return tt.polygon(t,u,g)},n}y(t0,"lean_left");async function e0(e,t){const{labelStyles:r,nodeStyles:i}=at(t);t.labelStyle=r;const a=t.padding??0,s=a,o=t.look==="neo"?a*2:a,{shapeSvg:n,bbox:l}=await gt(e,t,ft(t)),h=((t==null?void 0:t.height)??l.height)+s,c=((t==null?void 0:t.width)??l.width)+o,u=[{x:-3*h/6,y:0},{x:c,y:0},{x:c+3*h/6,y:-h},{x:0,y:-h}];let f;const{cssStyles:d}=t;if(t.look==="handDrawn"){const g=rt.svg(n),p=et(t,{}),m=_t(u),C=g.path(m,p);f=n.insert(()=>C,":first-child").attr("transform",`translate(${-c/2}, ${h/2})`),d&&f.attr("style",d)}else f=pr(n,c,h,u);return i&&f.attr("style",i),t.width=c,t.height=h,nt(t,f),t.intersect=function(g){return tt.polygon(t,u,g)},n}y(e0,"lean_right");function r0(e,t){const{labelStyles:r,nodeStyles:i}=at(t);t.label="",t.labelStyle=r;const a=e.insert("g").attr("class",ft(t)).attr("id",t.domId??t.id),{cssStyles:s}=t,o=Math.max(35,(t==null?void 0:t.width)??0),n=Math.max(35,(t==null?void 0:t.height)??0),l=7,h=[{x:o,y:0},{x:0,y:n+l/2},{x:o-2*l,y:n+l/2},{x:0,y:2*n},{x:o,y:n-l/2},{x:2*l,y:n-l/2}],c=rt.svg(a),u=et(t,{});t.look!=="handDrawn"&&(u.roughness=0,u.fillStyle="solid");const f=_t(h),d=c.path(f,u),g=a.insert(()=>d,":first-child");return g.attr("class","outer-path"),s&&t.look!=="handDrawn"&&g.selectAll("path").attr("style",s),i&&t.look!=="handDrawn"&&g.selectAll("path").attr("style",i),g.attr("transform",`translate(-${o/2},${-n})`),nt(t,g),t.intersect=function(p){return G.info("lightningBolt intersect",t,p),tt.polygon(t,h,p)},a}y(r0,"lightningBolt");var TF=y((e,t,r,i,a,s,o)=>[`M${e},${t+s}`,`a${a},${s} 0,0,0 ${r},0`,`a${a},${s} 0,0,0 ${-r},0`,`l0,${i}`,`a${a},${s} 0,0,0 ${r},0`,`l0,${-i}`,`M${e},${t+s+o}`,`a${a},${s} 0,0,0 ${r},0`].join(" "),"createCylinderPathD"),SF=y((e,t,r,i,a,s,o)=>[`M${e},${t+s}`,`M${e+r},${t+s}`,`a${a},${s} 0,0,0 ${-r},0`,`l0,${i}`,`a${a},${s} 0,0,0 ${r},0`,`l0,${-i}`,`M${e},${t+s+o}`,`a${a},${s} 0,0,0 ${r},0`].join(" "),"createOuterCylinderPathD"),_F=y((e,t,r,i,a,s)=>[`M${e-r/2},${-i/2}`,`a${a},${s} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD"),Ld=10,Fd=10;async function i0(e,t){const{labelStyles:r,nodeStyles:i}=at(t);t.labelStyle=r;const a=t.padding??0,s=t.look==="neo"?16:a,o=t.look==="neo"?24:a;if(t.width||t.height){const C=t.width??0;t.width=(t.width??0)-s,t.width<Fd&&(t.width=Fd);const k=C/2/(2.5+C/50);t.height=(t.height??0)-o-k*3,t.height<Ld&&(t.height=Ld)}const{shapeSvg:n,bbox:l,label:h}=await gt(e,t,ft(t)),c=(t!=null&&t.width?t==null?void 0:t.width:l.width)+s*2,u=c/2,f=u/(2.5+c/50),d=(t!=null&&t.height?t==null?void 0:t.height:l.height)+f+o*2,g=d*.1;let p;const{cssStyles:m}=t;if(t.look==="handDrawn"){const C=rt.svg(n),x=SF(0,0,c,d,u,f,g),k=_F(0,f,c,d,u,f),w=et(t,{}),S=C.path(x,w),_=C.path(k,w);n.insert(()=>_,":first-child").attr("class","line"),p=n.insert(()=>S,":first-child"),p.attr("class","basic label-container"),m&&p.attr("style",m)}else{const C=TF(0,0,c,d,u,f,g);p=n.insert("path",":first-child").attr("d",C).attr("class","basic label-container outer-path").attr("style",jt(m)).attr("style",i)}return p.attr("label-offset-y",f),p.attr("transform",`translate(${-c/2}, ${-(d/2+f)})`),nt(t,p),h.attr("transform",`translate(${-(l.width/2)-(l.x-(l.left??0))}, ${-(l.height/2)+f-(l.y-(l.top??0))})`),t.intersect=function(C){const x=tt.rect(t,C),k=x.x-(t.x??0);if(u!=0&&(Math.abs(k)<(t.width??0)/2||Math.abs(k)==(t.width??0)/2&&Math.abs(x.y-(t.y??0))>(t.height??0)/2-f)){let w=f*f*(1-k*k/(u*u));w>0&&(w=Math.sqrt(w)),w=f-w,C.y-(t.y??0)>0&&(w=-w),x.y+=w}return x},n}y(i0,"linedCylinder");async function a0(e,t){const{labelStyles:r,nodeStyles:i}=at(t);t.labelStyle=r;const a=t.padding??0,s=t.look==="neo"?16:a,o=t.look==="neo"?12:a;if(t.width||t.height){const w=t.width;t.width=(w??0)*10/11-s*2,t.width<10&&(t.width=10),t.height=((t==null?void 0:t.height)??0)-o*2,t.height<10&&(t.height=10)}const{shapeSvg:n,bbox:l,label:h}=await gt(e,t,ft(t)),c=(t!=null&&t.width?t==null?void 0:t.width:l.width)+(s??0)*2,u=(t!=null&&t.height?t==null?void 0:t.height:l.height)+(o??0)*2,f=t.look==="neo"?u/4:u/8,d=u+f,{cssStyles:g}=t,p=rt.svg(n),m=et(t,{});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const C=[{x:-c/2-c/2*.1,y:-d/2},{x:-c/2-c/2*.1,y:d/2},...Mr(-c/2-c/2*.1,d/2,c/2+c/2*.1,d/2,f,.8),{x:c/2+c/2*.1,y:-d/2},{x:-c/2-c/2*.1,y:-d/2},{x:-c/2,y:-d/2},{x:-c/2,y:d/2*1.1},{x:-c/2,y:-d/2}],x=p.polygon(C.map(w=>[w.x,w.y]),m),k=n.insert(()=>x,":first-child");return k.attr("class","basic label-container outer-path"),g&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",g),i&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",i),k.attr("transform",`translate(0,${-f/2})`),h.attr("transform",`translate(${-c/2+(t.padding??0)+c/2*.1/2-(l.x-(l.left??0))},${-u/2+(t.padding??0)-f/2-(l.y-(l.top??0))})`),nt(t,k),t.intersect=function(w){return tt.polygon(t,C,w)},n}y(a0,"linedWaveEdgedRect");async function s0(e,t){const{labelStyles:r,nodeStyles:i}=at(t);t.labelStyle=r;const a=t.padding??0,s=t.look==="neo"?16:a,o=t.look==="neo"?12:a,n=t.look==="neo"?10:5;(t.width||t.height)&&(t.width=Math.max(((t==null?void 0:t.width)??0)-s*2-2*n,10),t.height=Math.max(((t==null?void 0:t.height)??0)-o*2-2*n,10));const{shapeSvg:l,bbox:h,label:c}=await gt(e,t,ft(t)),u=(t!=null&&t.width?t==null?void 0:t.width:h.width)+s*2+2*n,f=(t!=null&&t.height?t==null?void 0:t.height:h.height)+o*2+2*n,d=u-2*n,g=f-2*n,p=-d/2,m=-g/2,{cssStyles:C}=t,x=rt.svg(l),k=et(t,{}),w=[{x:p-n,y:m+n},{x:p-n,y:m+g+n},{x:p+d-n,y:m+g+n},{x:p+d-n,y:m+g},{x:p+d,y:m+g},{x:p+d,y:m+g-n},{x:p+d+n,y:m+g-n},{x:p+d+n,y:m-n},{x:p+n,y:m-n},{x:p+n,y:m},{x:p,y:m},{x:p,y:m+n}],S=[{x:p,y:m+n},{x:p+d-n,y:m+n},{x:p+d-n,y:m+g},{x:p+d,y:m+g},{x:p+d,y:m},{x:p,y:m}];t.look!=="handDrawn"&&(k.roughness=0,k.fillStyle="solid");const _=_t(w);let v=x.path(_,k);const D=_t(S);let H=x.path(D,k);t.look!=="handDrawn"&&(v=Ql(v),H=Ql(H));const R=l.insert("g",":first-child");return R.insert(()=>v),R.insert(()=>H),R.attr("class","basic label-container outer-path"),C&&t.look!=="handDrawn"&&R.selectAll("path").attr("style",C),i&&t.look!=="handDrawn"&&R.selectAll("path").attr("style",i),c.attr("transform",`translate(${-(h.width/2)-n-(h.x-(h.left??0))}, ${-(h.height/2)+n-(h.y-(h.top??0))})`),nt(t,R),t.intersect=function(B){return tt.polygon(t,w,B)},l}y(s0,"multiRect");async function o0(e,t){const{labelStyles:r,nodeStyles:i}=at(t);t.labelStyle=r;const{shapeSvg:a,bbox:s,label:o}=await gt(e,t,ft(t)),n=t.padding??0,l=t.look==="neo"?16:n,h=t.look==="neo"?12:n;let c=!0;(t.width||t.height)&&(c=!1,t.width=((t==null?void 0:t.width)??0)-l*2,t.height=((t==null?void 0:t.height)??0)-h*3);const u=Math.max(s.width,(t==null?void 0:t.width)??0)+l*2,f=Math.max(s.height,(t==null?void 0:t.height)??0)+h*3,d=t.look==="neo"?f/4:f/8,g=f+(c?d/2:-d/2),p=-u/2,m=-g/2,C=10,{cssStyles:x}=t,k=Mr(p-C,m+g+C,p+u-C,m+g+C,d,.8),w=k==null?void 0:k[k.length-1],S=[{x:p-C,y:m+C},{x:p-C,y:m+g+C},...k,{x:p+u-C,y:w.y-C},{x:p+u,y:w.y-C},{x:p+u,y:w.y-2*C},{x:p+u+C,y:w.y-2*C},{x:p+u+C,y:m-C},{x:p+C,y:m-C},{x:p+C,y:m},{x:p,y:m},{x:p,y:m+C}],_=[{x:p,y:m+C},{x:p+u-C,y:m+C},{x:p+u-C,y:w.y-C},{x:p+u,y:w.y-C},{x:p+u,y:m},{x:p,y:m}],v=rt.svg(a),D=et(t,{});t.look!=="handDrawn"&&(D.roughness=0,D.fillStyle="solid");const H=_t(S),R=v.path(H,D),B=_t(_),U=v.path(B,D),A=a.insert(()=>R,":first-child");return A.insert(()=>U),A.attr("class","basic label-container outer-path"),x&&t.look!=="handDrawn"&&A.selectAll("path").attr("style",x),i&&t.look!=="handDrawn"&&A.selectAll("path").attr("style",i),A.attr("transform",`translate(0,${-d/2})`),o.attr("transform",`translate(${-(s.width/2)-C-(s.x-(s.left??0))}, ${-(s.height/2)+C-d/2-(s.y-(s.top??0))})`),nt(t,A),t.intersect=function(M){return tt.polygon(t,S,M)},a}y(o0,"multiWaveEdgedRectangle");async function n0(e,t,{config:{themeVariables:r}}){const{labelStyles:i,nodeStyles:a}=at(t);t.labelStyle=i,t.useHtmlLabels||fe(It())||(t.centerLabel=!0);const{shapeSvg:o,bbox:n,label:l}=await gt(e,t,ft(t)),h=Math.max(n.width+(t.padding??0)*2,(t==null?void 0:t.width)??0),c=Math.max(n.height+(t.padding??0)*2,(t==null?void 0:t.height)??0),u=-h/2,f=-c/2,{cssStyles:d}=t,g=rt.svg(o),p=et(t,{fill:r.noteBkgColor,stroke:r.noteBorderColor});t.look!=="handDrawn"&&(p.roughness=0,p.fillStyle="solid");const m=g.rectangle(u,f,h,c,p),C=o.insert(()=>m,":first-child");return C.attr("class","basic label-container outer-path"),l.attr("class","label noteLabel"),d&&t.look!=="handDrawn"&&C.selectAll("path").attr("style",d),a&&t.look!=="handDrawn"&&C.selectAll("path").attr("style",a),l.attr("transform",`translate(${-n.width/2-(n.x-(n.left??0))}, ${-(n.height/2)-(n.y-(n.top??0))})`),nt(t,C),t.intersect=function(x){return tt.rect(t,x)},o}y(n0,"note");var vF=y((e,t,r)=>[`M${e+r/2},${t}`,`L${e+r},${t-r/2}`,`L${e+r/2},${t-r}`,`L${e},${t-r/2}`,"Z"].join(" "),"createDecisionBoxPathD");async function l0(e,t){const{labelStyles:r,nodeStyles:i}=at(t);t.labelStyle=r;const{shapeSvg:a,bbox:s}=await gt(e,t,ft(t)),o=s.width+(t.padding??0),n=s.height+(t.padding??0),l=o+n,h=.5,c=[{x:l/2,y:0},{x:l,y:-l/2},{x:l/2,y:-l},{x:0,y:-l/2}];let u;const{cssStyles:f}=t;if(t.look==="handDrawn"){const d=rt.svg(a),g=et(t,{}),p=vF(0,0,l),m=d.path(p,g);u=a.insert(()=>m,":first-child").attr("transform",`translate(${-l/2+h}, ${l/2})`),f&&u.attr("style",f)}else u=pr(a,l,l,c),u.attr("transform",`translate(${-l/2+h}, ${l/2})`);return i&&u.attr("style",i),nt(t,u),t.calcIntersect=function(d,g){const p=d.width,m=[{x:p/2,y:0},{x:p,y:-p/2},{x:p/2,y:-p},{x:0,y:-p/2}],C=tt.polygon(d,m,g);return{x:C.x-.5,y:C.y-.5}},t.intersect=function(d){return this.calcIntersect(t,d)},a}y(l0,"question");async function h0(e,t){const{labelStyles:r,nodeStyles:i}=at(t);t.labelStyle=r;const a=t.padding??0,s=t.look==="neo"?21:a??0,o=t.look==="neo"?12:a??0,{shapeSvg:n,bbox:l,label:h}=await gt(e,t,ft(t)),c=((t==null?void 0:t.width)??l.width)+(t.look==="neo"?s*2:s),u=((t==null?void 0:t.height)??l.height)+(t.look==="neo"?o*2:o),f=-c/2,d=-u/2,g=d/2,p=[{x:f+g,y:d},{x:f,y:0},{x:f+g,y:-d},{x:-f,y:-d},{x:-f,y:d}],{cssStyles:m}=t,C=rt.svg(n),x=et(t,{});t.look!=="handDrawn"&&(x.roughness=0,x.fillStyle="solid");const k=_t(p),w=C.path(k,x),S=n.insert(()=>w,":first-child");return S.attr("class","basic label-container outer-path"),m&&t.look!=="handDrawn"&&S.selectAll("path").attr("style",m),i&&t.look!=="handDrawn"&&S.selectAll("path").attr("style",i),S.attr("transform",`translate(${-g/2},0)`),h.attr("transform",`translate(${-g/2-l.width/2-(l.x-(l.left??0))}, ${-(l.height/2)-(l.y-(l.top??0))})`),nt(t,S),t.intersect=function(_){return tt.polygon(t,p,_)},n}y(h0,"rect_left_inv_arrow");async function c0(e,t){const{labelStyles:r,nodeStyles:i}=at(t);t.labelStyle=r;let a;t.cssClasses?a="node "+t.cssClasses:a="node default";const s=e.insert("g").attr("class",a).attr("id",t.domId||t.id),o=s.insert("g"),n=s.insert("g").attr("class","label").attr("style",i),l=t.description,h=t.label,c=await Tr(n,h,t.labelStyle,!0,!0);let u={width:0,height:0};if(fe(Bt())){const D=c.children[0],H=wt(c);u=D.getBoundingClientRect(),H.attr("width",u.width),H.attr("height",u.height)}G.info("Text 2",l);const f=l||[],d=c.getBBox(),g=await Tr(n,Array.isArray(f)?f.join("<br/>"):f,t.labelStyle,!0,!0),p=g.children[0],m=wt(g);u=p.getBoundingClientRect(),m.attr("width",u.width),m.attr("height",u.height);const C=(t.padding||0)/2;wt(g).attr("transform","translate( "+(u.width>d.width?0:(d.width-u.width)/2)+", "+(d.height+C+5)+")"),wt(c).attr("transform","translate( "+(u.width<d.width?0:-(d.width-u.width)/2)+", 0)"),u=n.node().getBBox(),n.attr("transform","translate("+-u.width/2+", "+(-u.height/2-C+3)+")");const x=u.width+(t.padding||0),k=u.height+(t.padding||0),w=-u.width/2-C,S=-u.height/2-C;let _,v;if(t.look==="handDrawn"){const D=rt.svg(s),H=et(t,{}),R=D.path(Ar(w,S,x,k,t.rx||0),H),B=D.line(-u.width/2-C,-u.height/2-C+d.height+C,u.width/2+C,-u.height/2-C+d.height+C,H);v=s.insert(()=>(G.debug("Rough node insert CXC",R),B),":first-child"),_=s.insert(()=>(G.debug("Rough node insert CXC",R),R),":first-child")}else _=o.insert("rect",":first-child"),v=o.insert("line"),_.attr("class","outer title-state").attr("style",i).attr("x",-u.width/2-C).attr("y",-u.height/2-C).attr("width",u.width+(t.padding||0)).attr("height",u.height+(t.padding||0)),v.attr("class","divider").attr("x1",-u.width/2-C).attr("x2",u.width/2+C).attr("y1",-u.height/2-C+d.height+C).attr("y2",-u.height/2-C+d.height+C);return nt(t,_),t.intersect=function(D){return tt.rect(t,D)},s}y(c0,"rectWithTitle");async function u0(e,t,{config:{themeVariables:r}}){const i=(r==null?void 0:r.radius)??5,a={rx:i,ry:i,labelPaddingX:((t==null?void 0:t.padding)??0)*1,labelPaddingY:((t==null?void 0:t.padding)??0)*1};return ea(e,t,a)}y(u0,"roundedRect");var Pr=8;async function d0(e,t){const{labelStyles:r,nodeStyles:i}=at(t);t.labelStyle=r;const a=t.look==="neo"?16:t.padding??0,s=t.look==="neo"?12:t.padding??0,{shapeSvg:o,bbox:n,label:l}=await gt(e,t,ft(t)),h=((t==null?void 0:t.width)??n.width)+a*2+(t.look==="neo"?Pr:Pr*2),c=((t==null?void 0:t.height)??n.height)+s*2,u=h-Pr,f=c,d=Pr-h/2,g=-c/2,{cssStyles:p}=t,m=rt.svg(o),C=et(t,{});t.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");const x=[{x:d,y:g},{x:d+u,y:g},{x:d+u,y:g+f},{x:d-Pr,y:g+f},{x:d-Pr,y:g},{x:d,y:g},{x:d,y:g+f}],k=m.polygon(x.map(S=>[S.x,S.y]),C),w=o.insert(()=>k,":first-child");return w.attr("class","basic label-container outer-path").attr("style",jt(p)),i&&t.look!=="handDrawn"&&w.selectAll("path").attr("style",i),p&&t.look!=="handDrawn"&&w.selectAll("path").attr("style",i),l.attr("transform",`translate(${Pr/2-n.width/2-(n.x-(n.left??0))}, ${-(n.height/2)-(n.y-(n.top??0))})`),nt(t,w),t.intersect=function(S){return tt.rect(t,S)},o}y(d0,"shadedProcess");async function f0(e,t){const{labelStyles:r,nodeStyles:i}=at(t);t.labelStyle=r;const a=t.padding??0,s=t.look==="neo"?16:a,o=t.look==="neo"?12:a;(t.width||t.height)&&(t.width=Math.max(((t==null?void 0:t.width)??0)-s*2,10),t.height=Math.max(((t==null?void 0:t.height)??0)/1.5-o*2,10));const{shapeSvg:n,bbox:l,label:h}=await gt(e,t,ft(t)),c=(t!=null&&t.width?t==null?void 0:t.width:l.width)+s*2,u=((t!=null&&t.height?t==null?void 0:t.height:l.height)+o*2)*1.5,f=c,d=u/1.5,g=-f/2,p=-d/2,{cssStyles:m}=t,C=rt.svg(n),x=et(t,{});t.look!=="handDrawn"&&(x.roughness=0,x.fillStyle="solid");const k=[{x:g,y:p},{x:g,y:p+d},{x:g+f,y:p+d},{x:g+f,y:p-d/2}],w=_t(k),S=C.path(w,x),_=n.insert(()=>S,":first-child");return _.attr("class","basic label-container outer-path"),m&&t.look!=="handDrawn"&&_.selectChildren("path").attr("style",m),i&&t.look!=="handDrawn"&&_.selectChildren("path").attr("style",i),_.attr("transform",`translate(0, ${d/4})`),h.attr("transform",`translate(${-f/2+(t.padding??0)-(l.x-(l.left??0))}, ${-d/4+(t.padding??0)-(l.y-(l.top??0))})`),nt(t,_),t.intersect=function(v){return tt.polygon(t,k,v)},n}y(f0,"slopedRect");async function g0(e,t){const r=t.padding??0,i=t.look==="neo"?16:r*2,a=t.look==="neo"?12:r,s={rx:0,ry:0,labelPaddingX:t.labelPaddingX??i,labelPaddingY:a};return ea(e,t,s)}y(g0,"squareRect");async function p0(e,t){const{labelStyles:r,nodeStyles:i}=at(t);t.labelStyle=r;const a=t.padding??0,s=t.look==="neo"?20:a,o=t.look==="neo"?12:a,{shapeSvg:n,bbox:l}=await gt(e,t,ft(t)),h=l.height+(t.look==="neo"?o*2:o),c=l.width+h/4+(t.look==="neo"?s*2:s),u=h/2,{cssStyles:f}=t,d=rt.svg(n),g=et(t,{});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const p=[{x:-c/2+u,y:-h/2},{x:c/2-u,y:-h/2},...Ga(-c/2+u,0,u,50,90,270),{x:c/2-u,y:h/2},...Ga(c/2-u,0,u,50,270,450)],m=_t(p),C=d.path(m,g),x=n.insert(()=>C,":first-child");return x.attr("class","basic label-container outer-path"),f&&t.look!=="handDrawn"&&x.selectChildren("path").attr("style",f),i&&t.look!=="handDrawn"&&x.selectChildren("path").attr("style",i),nt(t,x),t.intersect=function(k){return tt.polygon(t,p,k)},n}y(p0,"stadium");async function m0(e,t){const r={rx:t.look==="neo"?3:5,ry:t.look==="neo"?3:5};return ea(e,t,r)}y(m0,"state");function y0(e,t,{config:{themeVariables:r}}){var x,k;const{labelStyles:i,nodeStyles:a}=at(t);t.labelStyle=i;const{cssStyles:s}=t,{lineColor:o,stateBorder:n,nodeBorder:l,nodeShadow:h}=r;(t.width||t.height)&&((t.width??0)<14&&(t.width=14),(t.height??0)<14&&(t.height=14)),t.width||(t.width=14),t.height||(t.height=14);const c=e.insert("g").attr("class","node default").attr("id",t.domId??t.id),u=rt.svg(c),f=et(t,{});t.look!=="handDrawn"&&(f.roughness=0,f.fillStyle="solid");const d=u.circle(0,0,t.width,{...f,stroke:o,strokeWidth:2}),g=n??l,p=(t.width??0)*5/14,m=u.circle(0,0,p,{...f,fill:g,stroke:g,strokeWidth:2,fillStyle:"solid"}),C=c.insert(()=>d,":first-child");if(C.insert(()=>m),t.look!=="handDrawn"&&C.attr("class","outer-path"),s&&C.selectAll("path").attr("style",s),a&&C.selectAll("path").attr("style",a),t.width<25&&h&&t.look!=="handDrawn"){const w=((k=(x=e.node())==null?void 0:x.ownerSVGElement)==null?void 0:k.id)??"",S=w?`${w}-drop-shadow-small`:"drop-shadow-small";C.attr("style",`filter:url(#${S})`)}return nt(t,C),t.intersect=function(w){return tt.circle(t,(t.width??0)/2,w)},c}y(y0,"stateEnd");function C0(e,t,{config:{themeVariables:r}}){var n,l;const{lineColor:i,nodeShadow:a}=r;(t.width||t.height)&&((t.width??0)<14&&(t.width=14),(t.height??0)<14&&(t.height=14)),t.width||(t.width=14),t.height||(t.height=14);const s=e.insert("g").attr("class","node default").attr("id",t.domId||t.id);let o;if(t.look==="handDrawn"){const c=rt.svg(s).circle(0,0,t.width,Vv(i));o=s.insert(()=>c),o.attr("class","state-start").attr("r",(t.width??7)/2).attr("width",t.width??14).attr("height",t.height??14)}else o=s.insert("circle",":first-child"),o.attr("class","state-start").attr("r",(t.width??7)/2).attr("width",t.width??14).attr("height",t.height??14);if(t.width<25&&a&&t.look!=="handDrawn"){const h=((l=(n=e.node())==null?void 0:n.ownerSVGElement)==null?void 0:l.id)??"",c=h?`${h}-drop-shadow-small`:"drop-shadow-small";o.attr("style",`filter:url(#${c})`)}return nt(t,o),t.intersect=function(h){return tt.circle(t,(t.width??7)/2,h)},s}y(C0,"stateStart");var pi=8;async function x0(e,t){const{labelStyles:r,nodeStyles:i}=at(t);t.labelStyle=r;const a=(t==null?void 0:t.padding)??8,s=t.look==="neo"?28:a,o=t.look==="neo"?12:a,{shapeSvg:n,bbox:l}=await gt(e,t,ft(t)),h=((t==null?void 0:t.width)??l.width)+2*pi+s,c=((t==null?void 0:t.height)??l.height)+o,u=h-2*pi,f=c,d=-h/2,g=-c/2,p=[{x:0,y:0},{x:u,y:0},{x:u,y:-f},{x:0,y:-f},{x:0,y:0},{x:-8,y:0},{x:u+8,y:0},{x:u+8,y:-f},{x:-8,y:-f},{x:-8,y:0}];if(t.look==="handDrawn"){const m=rt.svg(n),C=et(t,{}),x=m.rectangle(d,g,u+16,f,C),k=m.line(d+pi,g,d+pi,g+f,C),w=m.line(d+pi+u,g,d+pi+u,g+f,C);n.insert(()=>k,":first-child"),n.insert(()=>w,":first-child");const S=n.insert(()=>x,":first-child"),{cssStyles:_}=t;S.attr("class","basic label-container").attr("style",jt(_)),nt(t,S)}else{const m=pr(n,u,f,p);i&&m.attr("style",i),nt(t,m)}return t.intersect=function(m){return tt.polygon(t,p,m)},n}y(x0,"subroutine");var Jn=.2;async function b0(e,t){const{labelStyles:r,nodeStyles:i}=at(t);t.labelStyle=r;const a=t.padding??0,s=t.look==="neo"?16:a,o=t.look==="neo"?12:a;(t.width||t.height)&&(t.height=Math.max(((t==null?void 0:t.height)??0)-o*2,10),t.width=Math.max(((t==null?void 0:t.width)??0)-s*2-Jn*(t.height+o*2),10));const{shapeSvg:n,bbox:l}=await gt(e,t,ft(t)),h=(t!=null&&t.height?t==null?void 0:t.height:l.height)+o*2,c=Jn*h,u=Jn*h,d=(t!=null&&t.width?t==null?void 0:t.width:l.width)+s*2+c-c,g=h,p=-d/2,m=-g/2,{cssStyles:C}=t,x=rt.svg(n),k=et(t,{}),w=[{x:p-c/2,y:m},{x:p+d+c/2,y:m},{x:p+d+c/2,y:m+g},{x:p-c/2,y:m+g}],S=[{x:p+d-c/2,y:m+g},{x:p+d+c/2,y:m+g},{x:p+d+c/2,y:m+g-u}];t.look!=="handDrawn"&&(k.roughness=0,k.fillStyle="solid");const _=_t(w),v=x.path(_,k),D=_t(S),H=x.path(D,{...k,fillStyle:"solid"}),R=n.insert(()=>H,":first-child");return R.insert(()=>v,":first-child"),R.attr("class","basic label-container outer-path"),C&&t.look!=="handDrawn"&&R.selectAll("path").attr("style",C),i&&t.look!=="handDrawn"&&R.selectAll("path").attr("style",i),nt(t,R),t.intersect=function(B){return tt.polygon(t,w,B)},n}y(b0,"taggedRect");async function k0(e,t){const{labelStyles:r,nodeStyles:i}=at(t);t.labelStyle=r;const{shapeSvg:a,bbox:s,label:o}=await gt(e,t,ft(t)),n=Math.max(s.width+(t.padding??0)*2,(t==null?void 0:t.width)??0),l=Math.max(s.height+(t.padding??0)*2,(t==null?void 0:t.height)??0),h=l/8,c=.2*n,u=.2*l,f=l+h,{cssStyles:d}=t,g=rt.svg(a),p=et(t,{});t.look!=="handDrawn"&&(p.roughness=0,p.fillStyle="solid");const m=[{x:-n/2-n/2*.1,y:f/2},...Mr(-n/2-n/2*.1,f/2,n/2+n/2*.1,f/2,h,.8),{x:n/2+n/2*.1,y:-f/2},{x:-n/2-n/2*.1,y:-f/2}],C=-n/2+n/2*.1,x=-f/2-u*.4,k=[{x:C+n-c,y:(x+l)*1.3},{x:C+n,y:x+l-u},{x:C+n,y:(x+l)*.9},...Mr(C+n,(x+l)*1.25,C+n-c,(x+l)*1.3,-l*.02,.5)],w=_t(m),S=g.path(w,p),_=_t(k),v=g.path(_,{...p,fillStyle:"solid"}),D=a.insert(()=>v,":first-child");return D.insert(()=>S,":first-child"),D.attr("class","basic label-container outer-path"),d&&t.look!=="handDrawn"&&D.selectAll("path").attr("style",d),i&&t.look!=="handDrawn"&&D.selectAll("path").attr("style",i),D.attr("transform",`translate(0,${-h/2})`),o.attr("transform",`translate(${-n/2+(t.padding??0)-(s.x-(s.left??0))},${-l/2+(t.padding??0)-h/2-(s.y-(s.top??0))})`),nt(t,D),t.intersect=function(H){return tt.polygon(t,m,H)},a}y(k0,"taggedWaveEdgedRectangle");async function w0(e,t){const{labelStyles:r,nodeStyles:i}=at(t);t.labelStyle=r;const{shapeSvg:a,bbox:s}=await gt(e,t,ft(t)),o=Math.max(s.width+(t.padding??0),(t==null?void 0:t.width)||0),n=Math.max(s.height+(t.padding??0),(t==null?void 0:t.height)||0),l=-o/2,h=-n/2,c=a.insert("rect",":first-child");return c.attr("class","text").attr("style",i).attr("rx",0).attr("ry",0).attr("x",l).attr("y",h).attr("width",o).attr("height",n),nt(t,c),t.intersect=function(u){return tt.rect(t,u)},a}y(w0,"text");var BF=y((e,t,r,i,a,s)=>`M${e},${t}
|
|
235
|
-
a${a},${s} 0,0,1 0,${-i}
|
|
236
|
-
l${r},0
|
|
237
|
-
a${a},${s} 0,0,1 0,${i}
|
|
238
|
-
M${r},${-i}
|
|
239
|
-
a${a},${s} 0,0,0 0,${i}
|
|
240
|
-
l${-r},0`,"createCylinderPathD"),LF=y((e,t,r,i,a,s)=>[`M${e},${t}`,`M${e+r},${t}`,`a${a},${s} 0,0,0 0,${-i}`,`l${-r},0`,`a${a},${s} 0,0,0 0,${i}`,`l${r},0`].join(" "),"createOuterCylinderPathD"),FF=y((e,t,r,i,a,s)=>[`M${e+r/2},${-i/2}`,`a${a},${s} 0,0,0 0,${i}`].join(" "),"createInnerCylinderPathD"),Md=5,Ad=10;async function T0(e,t){const{labelStyles:r,nodeStyles:i}=at(t);t.labelStyle=r;const a=t.padding??0,s=t.look==="neo"?12:a/2;if(t.width||t.height){const p=t.height??0;t.height=(t.height??0)-s,t.height<Md&&(t.height=Md);const C=p/2/(2.5+p/50);t.width=(t.width??0)-s-C*3,t.width<Ad&&(t.width=Ad)}const{shapeSvg:o,bbox:n,label:l}=await gt(e,t,ft(t)),h=(t.height?t.height:n.height)+s,c=h/2,u=c/(2.5+h/50),f=(t.width?t.width:n.width)+u+s,{cssStyles:d}=t;let g;if(t.look==="handDrawn"){const p=rt.svg(o),m=LF(0,0,f,h,u,c),C=FF(0,0,f,h,u,c),x=p.path(m,et(t,{})),k=p.path(C,et(t,{fill:"none"}));g=o.insert(()=>k,":first-child"),g=o.insert(()=>x,":first-child"),g.attr("class","basic label-container"),d&&g.attr("style",d)}else{const p=BF(0,0,f,h,u,c);g=o.insert("path",":first-child").attr("d",p).attr("class","basic label-container").attr("style",jt(d)).attr("style",i),g.attr("class","basic label-container outer-path"),d&&g.selectAll("path").attr("style",d),i&&g.selectAll("path").attr("style",i)}return g.attr("label-offset-x",u),g.attr("transform",`translate(${-f/2}, ${h/2} )`),l.attr("transform",`translate(${-(n.width/2)-u-(n.x-(n.left??0))}, ${-(n.height/2)-(n.y-(n.top??0))})`),nt(t,g),t.intersect=function(p){const m=tt.rect(t,p),C=m.y-(t.y??0);if(c!=0&&(Math.abs(C)<(t.height??0)/2||Math.abs(C)==(t.height??0)/2&&Math.abs(m.x-(t.x??0))>(t.width??0)/2-u)){let x=u*u*(1-C*C/(c*c));x!=0&&(x=Math.sqrt(Math.abs(x))),x=u-x,p.x-(t.x??0)>0&&(x=-x),m.x+=x}return m},o}y(T0,"tiltedCylinder");async function S0(e,t){const{labelStyles:r,nodeStyles:i}=at(t);t.labelStyle=r;const a=t.padding??0,s=(t.look==="neo",a),o=t.look==="neo"?a*2:a,{shapeSvg:n,bbox:l}=await gt(e,t,ft(t)),h=((t==null?void 0:t.height)??l.height)+s,c=((t==null?void 0:t.width)??l.width)+o,u=[{x:-3*h/6,y:0},{x:c+3*h/6,y:0},{x:c,y:-h},{x:0,y:-h}];let f;const{cssStyles:d}=t;if(t.look==="handDrawn"){const g=rt.svg(n),p=et(t,{}),m=_t(u),C=g.path(m,p);f=n.insert(()=>C,":first-child").attr("transform",`translate(${-c/2}, ${h/2})`),d&&f.attr("style",d)}else f=pr(n,c,h,u);return i&&f.attr("style",i),t.width=c,t.height=h,nt(t,f),t.intersect=function(g){return tt.polygon(t,u,g)},n}y(S0,"trapezoid");async function _0(e,t){const{labelStyles:r,nodeStyles:i}=at(t);t.labelStyle=r;const a=t.padding??0,s=t.look==="neo"?16:a,o=t.look==="neo"?12:a,n=15,l=5;(t.width||t.height)&&(t.height=(t.height??0)-o*2,t.height<l&&(t.height=l),t.width=(t.width??0)-s*2,t.width<n&&(t.width=n));const{shapeSvg:h,bbox:c}=await gt(e,t,ft(t)),u=(t!=null&&t.width?t==null?void 0:t.width:c.width)+s*2,f=(t!=null&&t.height?t==null?void 0:t.height:c.height)+o*2,{cssStyles:d}=t,g=rt.svg(h),p=et(t,{});t.look!=="handDrawn"&&(p.roughness=0,p.fillStyle="solid");const m=[{x:-u/2*.8,y:-f/2},{x:u/2*.8,y:-f/2},{x:u/2,y:-f/2*.6},{x:u/2,y:f/2},{x:-u/2,y:f/2},{x:-u/2,y:-f/2*.6}],C=_t(m),x=g.path(C,p),k=h.insert(()=>x,":first-child");return k.attr("class","basic label-container outer-path"),d&&t.look!=="handDrawn"&&k.selectChildren("path").attr("style",d),i&&t.look!=="handDrawn"&&k.selectChildren("path").attr("style",i),nt(t,k),t.intersect=function(w){return tt.polygon(t,m,w)},h}y(_0,"trapezoidalPentagon");var Ed=10,$d=10;async function v0(e,t){var w;const{labelStyles:r,nodeStyles:i}=at(t);t.labelStyle=r;const a=t.padding??0,s=t.look==="neo"?a*2:a;(t.width||t.height)&&(t.width=(((t==null?void 0:t.width)??0)-s)/2,t.width<$d&&(t.width=$d),t.height=(t==null?void 0:t.height)??0,t.height<Ed&&(t.height=Ed));const{shapeSvg:o,bbox:n,label:l}=await gt(e,t,ft(t)),h=Je((w=Bt().flowchart)==null?void 0:w.htmlLabels),c=(t!=null&&t.width?t==null?void 0:t.width:n.width)+s,u=t!=null&&t.height?t==null?void 0:t.height:c+n.height,f=u,d=[{x:0,y:0},{x:f,y:0},{x:f/2,y:-u}],{cssStyles:g}=t,p=rt.svg(o),m=et(t,{});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const C=_t(d),x=p.path(C,m),k=o.insert(()=>x,":first-child").attr("transform",`translate(${-u/2}, ${u/2})`).attr("class","outer-path");return g&&t.look!=="handDrawn"&&k.selectChildren("path").attr("style",g),i&&t.look!=="handDrawn"&&k.selectChildren("path").attr("style",i),t.width=c,t.height=u,nt(t,k),l.attr("transform",`translate(${-n.width/2-(n.x-(n.left??0))}, ${u/2-(n.height+(t.padding??0)/(h?2:1)-(n.y-(n.top??0)))})`),t.intersect=function(S){return G.info("Triangle intersect",t,d,S),tt.polygon(t,d,S)},o}y(v0,"triangle");async function B0(e,t){const{labelStyles:r,nodeStyles:i}=at(t);t.labelStyle=r;const a=t.padding??0,s=t.look==="neo"?16:a,o=t.look==="neo"?12:a;let n=!0;(t.width||t.height)&&(n=!1,t.width=((t==null?void 0:t.width)??0)-s*2,t.width<10&&(t.width=10),t.height=((t==null?void 0:t.height)??0)-o*2,t.height<10&&(t.height=10));const{shapeSvg:l,bbox:h,label:c}=await gt(e,t,ft(t)),u=(t!=null&&t.width?t==null?void 0:t.width:h.width)+(s??0)*2,f=(t!=null&&t.height?t==null?void 0:t.height:h.height)+(o??0)*2,d=t.look==="neo"?f/4:f/8,g=f+(n?d:-d),{cssStyles:p}=t,C=14-u,x=C>0?C/2:0,k=rt.svg(l),w=et(t,{});t.look!=="handDrawn"&&(w.roughness=0,w.fillStyle="solid");const S=[{x:-u/2-x,y:g/2},...Mr(-u/2-x,g/2,u/2+x,g/2,d,.8),{x:u/2+x,y:-g/2},{x:-u/2-x,y:-g/2}],_=_t(S),v=k.path(_,w),D=l.insert(()=>v,":first-child");return D.attr("class","basic label-container outer-path"),p&&t.look!=="handDrawn"&&D.selectAll("path").attr("style",p),i&&t.look!=="handDrawn"&&D.selectAll("path").attr("style",i),D.attr("transform",`translate(0,${-d/2})`),c.attr("transform",`translate(${-u/2+(t.padding??0)-(h.x-(h.left??0))},${-f/2+(t.padding??0)-d-(h.y-(h.top??0))})`),nt(t,D),t.intersect=function(H){return tt.polygon(t,S,H)},l}y(B0,"waveEdgedRectangle");async function L0(e,t){const{labelStyles:r,nodeStyles:i}=at(t);t.labelStyle=r;const a=t.padding??0,s=t.look==="neo"?16:a,o=t.look==="neo"?20:a;if(t.width||t.height){t.width=(t==null?void 0:t.width)??0,t.width<20&&(t.width=20),t.height=(t==null?void 0:t.height)??0,t.height<10&&(t.height=10);const w=Math.min(t.height*.2,t.height/4);t.height=Math.ceil(t.height-o-w*(20/9)),t.width=t.width-s*2}const{shapeSvg:n,bbox:l}=await gt(e,t,ft(t)),h=(t!=null&&t.width?t==null?void 0:t.width:l.width)+s*2,c=(t!=null&&t.height?t==null?void 0:t.height:l.height)+o,u=c/8,f=c+u*2,{cssStyles:d}=t,g=rt.svg(n),p=et(t,{});t.look!=="handDrawn"&&(p.roughness=0,p.fillStyle="solid");const m=[{x:-h/2,y:f/2},...Mr(-h/2,f/2,h/2,f/2,u,1),{x:h/2,y:-f/2},...Mr(h/2,-f/2,-h/2,-f/2,u,-1)],C=_t(m),x=g.path(C,p),k=n.insert(()=>x,":first-child");return k.attr("class","basic label-container"),d&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",d),i&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",i),nt(t,k),t.intersect=function(w){return tt.polygon(t,m,w)},n}y(L0,"waveRectangle");var Pt=10;async function F0(e,t){const{labelStyles:r,nodeStyles:i}=at(t);t.labelStyle=r;const a=t.look==="neo"?16:t.padding??0,s=t.look==="neo"?12:t.padding??0;(t.width||t.height)&&(t.width=Math.max(((t==null?void 0:t.width)??0)-a*2-Pt,10),t.height=Math.max(((t==null?void 0:t.height)??0)-s*2-Pt,10));const{shapeSvg:o,bbox:n,label:l}=await gt(e,t,ft(t)),h=(t!=null&&t.width?t==null?void 0:t.width:n.width)+a*2+Pt,c=(t!=null&&t.height?t==null?void 0:t.height:n.height)+s*2+Pt,u=h-Pt,f=c-Pt,d=-u/2,g=-f/2,{cssStyles:p}=t,m=rt.svg(o),C=et(t,{}),x=[{x:d-Pt,y:g-Pt},{x:d-Pt,y:g+f},{x:d+u,y:g+f},{x:d+u,y:g-Pt}],k=`M${d-Pt},${g-Pt} L${d+u},${g-Pt} L${d+u},${g+f} L${d-Pt},${g+f} L${d-Pt},${g-Pt}
|
|
241
|
-
M${d-Pt},${g} L${d+u},${g}
|
|
242
|
-
M${d},${g-Pt} L${d},${g+f}`;t.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");const w=m.path(k,C),S=o.insert(()=>w,":first-child");return S.attr("transform",`translate(${Pt/2}, ${Pt/2})`),S.attr("class","basic label-container outer-path"),p&&t.look!=="handDrawn"&&S.selectAll("path").attr("style",p),i&&t.look!=="handDrawn"&&S.selectAll("path").attr("style",i),l.attr("transform",`translate(${-(n.width/2)+Pt/2-(n.x-(n.left??0))}, ${-(n.height/2)+Pt/2-(n.y-(n.top??0))})`),nt(t,S),t.intersect=function(_){return tt.polygon(t,x,_)},o}y(F0,"windowPane");var Od=new Set(["redux-color","redux-dark-color"]),MF=new Set(["redux","redux-dark","redux-color","redux-dark-color"]);async function pc(e,t){var xt,Ct,St,V;const r=t;r.alias&&(t.label=r.alias);const{theme:i,themeVariables:a}=It(),{rowEven:s,rowOdd:o,nodeBorder:n,borderColorArray:l}=a;if(t.look==="handDrawn"){const{themeVariables:Y}=It(),{background:Z}=Y,N={...t,id:t.id+"-background",domId:(t.domId||t.id)+"-background",look:"default",cssStyles:["stroke: none",`fill: ${Z}`]};await pc(e,N)}const h=It();t.useHtmlLabels=h.htmlLabels;let c=((xt=h.er)==null?void 0:xt.diagramPadding)??10,u=((Ct=h.er)==null?void 0:Ct.entityPadding)??6;const{cssStyles:f}=t,{labelStyles:d,nodeStyles:g}=at(t);if(r.attributes.length===0&&t.label){const Y={rx:0,ry:0,labelPaddingX:c,labelPaddingY:c*1.5};gr(t.label,h)+Y.labelPaddingX*2<h.er.minEntityWidth&&(t.width=h.er.minEntityWidth);const Z=await ea(e,t,Y);if(i!=null&&Od.has(i)){const N=r.colorIndex??0;Z.attr("data-color-id",`color-${N%l.length}`)}if(!Je(h.htmlLabels)){const N=Z.select("text"),dt=(St=N.node())==null?void 0:St.getBBox();N.attr("transform",`translate(${-dt.width/2}, 0)`)}return Z}h.htmlLabels||(c*=1.25,u*=1.25);let p=ft(t);p||(p="node default");const m=e.insert("g").attr("class",p).attr("id",t.domId||t.id),C=await Ci(m,t.label??"",h,0,0,["name"],d);C.height+=u;let x=0;const k=[],w=[];let S=0,_=0,v=0,D=0,H=!0,R=!0;for(const Y of r.attributes){const Z=await Ci(m,Y.type,h,0,x,["attribute-type"],d);S=Math.max(S,Z.width+c);const N=await Ci(m,Y.name,h,0,x,["attribute-name"],d);_=Math.max(_,N.width+c);const dt=await Ci(m,Y.keys.join(),h,0,x,["attribute-keys"],d);v=Math.max(v,dt.width+c);const F=await Ci(m,Y.comment,h,0,x,["attribute-comment"],d);D=Math.max(D,F.width+c);const it=Math.max(Z.height,N.height,dt.height,F.height)+u;w.push({yOffset:x,rowHeight:it}),x+=it}let B=4;v<=c&&(H=!1,v=0,B--),D<=c&&(R=!1,D=0,B--);const U=m.node().getBBox();if(C.width+c*2-(S+_+v+D)>0){const Y=C.width+c*2-(S+_+v+D);S+=Y/B,_+=Y/B,v>0&&(v+=Y/B),D>0&&(D+=Y/B)}const A=S+_+v+D,M=rt.svg(m),E=et(t,{});t.look!=="handDrawn"&&(E.roughness=0,E.fillStyle="solid");let L=0;w.length>0&&(L=w.reduce((Y,Z)=>Y+((Z==null?void 0:Z.rowHeight)??0),0));const I=Math.max(U.width+c*2,(t==null?void 0:t.width)||0,A),$=Math.max((L??0)+C.height,(t==null?void 0:t.height)||0),q=-I/2,X=-$/2;if(m.selectAll("g:not(:first-child)").each((Y,Z,N)=>{const dt=wt(N[Z]),F=dt.attr("transform");let it=0,Tt=0;if(F){const er=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(F);er&&(it=parseFloat(er[1]),Tt=parseFloat(er[2]),dt.attr("class").includes("attribute-name")?it+=S:dt.attr("class").includes("attribute-keys")?it+=S+_:dt.attr("class").includes("attribute-comment")&&(it+=S+_+v))}dt.attr("transform",`translate(${q+c/2+it}, ${Tt+X+C.height+u/2})`)}),m.select(".name").attr("transform","translate("+-C.width/2+", "+(X+u/2)+")"),i!=null&&Od.has(i)){const Y=r.colorIndex??0;m.attr("data-color-id",`color-${Y%l.length}`)}const J=M.rectangle(q,X,I,$,E),Q=m.insert(()=>J,":first-child").attr("class","outer-path").attr("style",f.join(""));k.push(0);for(const[Y,Z]of w.entries()){const dt=(Y+1)%2===0&&Z.yOffset!==0,F=M.rectangle(q,C.height+X+(Z==null?void 0:Z.yOffset),I,Z==null?void 0:Z.rowHeight,{...E,fill:dt?s:o,stroke:n});m.insert(()=>F,"g.label").attr("style",f.join("")).attr("class",`row-rect-${dt?"even":"odd"}`)}const lt=1e-4;let st=xi(q,C.height+X,I+q,C.height+X,lt),ot=M.polygon(st.map(Y=>[Y.x,Y.y]),E);if(m.insert(()=>ot).attr("class","divider"),st=xi(S+q,C.height+X,S+q,$+X,lt),ot=M.polygon(st.map(Y=>[Y.x,Y.y]),E),m.insert(()=>ot).attr("class","divider"),H){const Y=S+_+q;st=xi(Y,C.height+X,Y,$+X,lt),ot=M.polygon(st.map(Z=>[Z.x,Z.y]),E),m.insert(()=>ot).attr("class","divider")}if(R){const Y=S+_+v+q;st=xi(Y,C.height+X,Y,$+X,lt),ot=M.polygon(st.map(Z=>[Z.x,Z.y]),E),m.insert(()=>ot).attr("class","divider")}for(const Y of k){const Z=C.height+X+Y;st=xi(q,Z,I+q,Z,lt),ot=M.polygon(st.map(N=>[N.x,N.y]),E),m.insert(()=>ot).attr("class","divider")}if(nt(t,Q),g&&t.look!=="handDrawn")if(i!=null&&MF.has(i))m.selectAll("path").attr("style",g);else{const Y=g.split(";"),Z=(V=Y==null?void 0:Y.filter(N=>N.includes("stroke")))==null?void 0:V.map(N=>`${N}`).join("; ");m.selectAll("path").attr("style",Z??""),m.selectAll(".row-rect-even path").attr("style",g)}return t.intersect=function(Y){return tt.rect(t,Y)},m}y(pc,"erBox");async function Ci(e,t,r,i=0,a=0,s=[],o=""){const n=e.insert("g").attr("class",`label ${s.join(" ")}`).attr("transform",`translate(${i}, ${a})`).attr("style",o);t!==ju(t)&&(t=ju(t),t=t.replaceAll("<","<").replaceAll(">",">"));const l=n.node().appendChild(await tr(n,t,{width:gr(t,r)+100,style:o,useHtmlLabels:r.htmlLabels},r));if(t.includes("<")||t.includes(">")){let c=l.children[0];for(c.textContent=c.textContent.replaceAll("<","<").replaceAll(">",">");c.childNodes[0];)c=c.childNodes[0],c.textContent=c.textContent.replaceAll("<","<").replaceAll(">",">")}let h=l.getBBox();if(Je(r.htmlLabels)){const c=l.children[0];c.style.textAlign="start";const u=wt(l);h=c.getBoundingClientRect(),u.attr("width",h.width),u.attr("height",h.height)}return h}y(Ci,"addText");function xi(e,t,r,i,a){return e===r?[{x:e-a/2,y:t},{x:e+a/2,y:t},{x:r+a/2,y:i},{x:r-a/2,y:i}]:[{x:e,y:t-a/2},{x:e,y:t+a/2},{x:r,y:i+a/2},{x:r,y:i-a/2}]}y(xi,"lineToPolygon");async function M0(e,t,r,i,a=r.class.padding??12){const s=i?0:3,o=e.insert("g").attr("class",ft(t)).attr("id",t.domId||t.id);let n=null,l=null,h=null,c=null,u=0,f=0,d=0;if(n=o.insert("g").attr("class","annotation-group text"),t.annotations.length>0){const x=t.annotations[0];await va(n,{text:`«${x}»`},0),u=n.node().getBBox().height}l=o.insert("g").attr("class","label-group text"),await va(l,t,0,["font-weight: bolder"]);const g=l.node().getBBox();f=g.height,h=o.insert("g").attr("class","members-group text");let p=0;for(const x of t.members){const k=await va(h,x,p,[x.parseClassifier()]);p+=k+s}d=h.node().getBBox().height,d<=0&&(d=a/2),c=o.insert("g").attr("class","methods-group text");let m=0;for(const x of t.methods){const k=await va(c,x,m,[x.parseClassifier()]);m+=k+s}let C=o.node().getBBox();if(n!==null){const x=n.node().getBBox();n.attr("transform",`translate(${-x.width/2})`)}return l.attr("transform",`translate(${-g.width/2}, ${u})`),C=o.node().getBBox(),h.attr("transform",`translate(0, ${u+f+a*2})`),C=o.node().getBBox(),c.attr("transform",`translate(0, ${u+f+(d?d+a*4:a*2)})`),C=o.node().getBBox(),{shapeSvg:o,bbox:C}}y(M0,"textHelper");async function va(e,t,r,i=[]){const a=e.insert("g").attr("class","label").attr("style",i.join("; ")),s=It();let o="useHtmlLabels"in t?t.useHtmlLabels:Je(s.htmlLabels)??!0,n="";"text"in t?n=t.text:n=t.label,!o&&n.startsWith("\\")&&(n=n.substring(1)),qa(n)&&(o=!0);const l=await tr(a,Mh(Kr(n)),{width:gr(n,s)+50,classes:"markdown-node-label",useHtmlLabels:o},s);let h,c=1;if(o){const u=l.children[0],f=wt(l);c=u.innerHTML.split("<br>").length,u.innerHTML.includes("</math>")&&(c+=u.innerHTML.split("<mrow>").length-1);const d=u.getElementsByTagName("img");if(d){const g=n.replace(/<img[^>]*>/g,"").trim()==="";await Promise.all([...d].map(p=>new Promise(m=>{function C(){var x;if(p.style.display="flex",p.style.flexDirection="column",g){const k=((x=s.fontSize)==null?void 0:x.toString())??window.getComputedStyle(document.body).fontSize,S=parseInt(k,10)*5+"px";p.style.minWidth=S,p.style.maxWidth=S}else p.style.width="100%";m(p)}y(C,"setupImage"),setTimeout(()=>{p.complete&&C()}),p.addEventListener("error",C),p.addEventListener("load",C)})))}h=u.getBoundingClientRect(),f.attr("width",h.width),f.attr("height",h.height)}else{i.includes("font-weight: bolder")&&wt(l).selectAll("tspan").attr("font-weight",""),c=l.children.length;const u=l.children[0];(l.textContent===""||l.textContent.includes(">"))&&(u.textContent=n[0]+n.substring(1).replaceAll(">",">").replaceAll("<","<").trim(),n[1]===" "&&(u.textContent=u.textContent[0]+" "+u.textContent.substring(1))),u.textContent==="undefined"&&(u.textContent=""),h=l.getBBox()}return a.attr("transform","translate(0,"+(-h.height/(2*c)+r)+")"),h.height}y(va,"addText");async function A0(e,t){var M,E;const r=Bt(),{themeVariables:i}=r,{useGradient:a}=i,s=r.class.padding??12,o=s,n=t.useHtmlLabels??Je(r.htmlLabels)??!0,l=t;l.annotations=l.annotations??[],l.members=l.members??[],l.methods=l.methods??[];const{shapeSvg:h,bbox:c}=await M0(e,t,r,n,o),{labelStyles:u,nodeStyles:f}=at(t);t.labelStyle=u,t.cssStyles=l.styles||"";const d=((M=l.styles)==null?void 0:M.join(";"))||f||"";t.cssStyles||(t.cssStyles=d.replaceAll("!important","").split(";"));const g=l.members.length===0&&l.methods.length===0&&!((E=r.class)!=null&&E.hideEmptyMembersBox),p=rt.svg(h),m=et(t,{});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const C=Math.max(t.width??0,c.width);let x=Math.max(t.height??0,c.height);const k=(t.height??0)>c.height;l.members.length===0&&l.methods.length===0?x+=o:l.members.length>0&&l.methods.length===0&&(x+=o*2);const w=-C/2,S=-x/2;let _=g?s*2:l.members.length===0&&l.methods.length===0?-s:0;k&&(_=s*2);const v=p.rectangle(w-s,S-s-(g?s:l.members.length===0&&l.methods.length===0?-s/2:0),C+2*s,x+2*s+_,m),D=h.insert(()=>v,":first-child");D.attr("class","basic label-container outer-path");const H=D.node().getBBox(),R=h.select(".annotation-group").node().getBBox().height-(g?s/2:0)||0,B=h.select(".label-group").node().getBBox().height-(g?s/2:0)||0,U=h.select(".members-group").node().getBBox().height-(g?s/2:0)||0,A=(R+B+S+s-(S-s-(g?s:l.members.length===0&&l.methods.length===0?-s/2:0)))/2;if(h.selectAll(".text").each((L,I,$)=>{var st,ot;const q=wt($[I]),X=q.attr("transform");let J=0;if(X){const Ct=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(X);Ct&&(J=parseFloat(Ct[2]))}let Q=J+S+s-(g?s:l.members.length===0&&l.methods.length===0?-s/2:0);if(q.attr("class").includes("methods-group")){const xt=Math.max(U,o/2);k?Q=Math.max(A,R+B+xt+S+o*2+s)+o*2:Q=R+B+xt+S+o*4+s}l.members.length===0&&l.methods.length===0&&((st=r.class)!=null&&st.hideEmptyMembersBox)&&(l.annotations.length>0?Q=J-o:Q=J),n||(Q-=4);let lt=w;(q.attr("class").includes("label-group")||q.attr("class").includes("annotation-group"))&&(lt=-((ot=q.node())==null?void 0:ot.getBBox().width)/2||0,h.selectAll("text").each(function(xt,Ct,St){window.getComputedStyle(St[Ct]).textAnchor==="middle"&&(lt=0)})),q.attr("transform",`translate(${lt}, ${Q})`)}),l.members.length>0||l.methods.length>0||g){const L=R+B+S+s,I=p.line(H.x,L,H.x+H.width,L+.001,m);h.insert(()=>I).attr("class",`divider${t.look==="neo"&&!a?" neo-line":""}`).attr("style",d)}if(g||l.members.length>0||l.methods.length>0){const L=R+B+U+S+o*2+s,I=p.line(H.x,k?Math.max(A,L):L,H.x+H.width,(k?Math.max(A,L):L)+.001,m);h.insert(()=>I).attr("class",`divider${t.look==="neo"&&!a?" neo-line":""}`).attr("style",d)}if(l.look!=="handDrawn"&&h.selectAll("path").attr("style",d),D.select(":nth-child(2)").attr("style",d),h.selectAll(".divider").select("path").attr("style",d),t.labelStyle?h.selectAll("span").attr("style",t.labelStyle):h.selectAll("span").attr("style",d),!n){const L=RegExp(/color\s*:\s*([^;]*)/),I=L.exec(d);if(I){const $=I[0].replace("color","fill");h.selectAll("tspan").attr("style",$)}else if(u){const $=L.exec(u);if($){const q=$[0].replace("color","fill");h.selectAll("tspan").attr("style",q)}}}return nt(t,D),t.intersect=function(L){return tt.rect(t,L)},h}y(A0,"classBox");async function E0(e,t){var H,R;const{labelStyles:r,nodeStyles:i}=at(t);t.labelStyle=r;const a=t,s=t,o=20,n=20,l="verifyMethod"in t,h=ft(t),{themeVariables:c}=Bt(),{borderColorArray:u,requirementEdgeLabelBackground:f}=c,d=e.insert("g").attr("class",h).attr("id",t.domId??t.id);let g;l?g=await Ye(d,`<<${a.type}>>`,0,t.labelStyle):g=await Ye(d,"<<Element>>",0,t.labelStyle);let p=g;const m=await Ye(d,a.name,p,t.labelStyle+"; font-weight: bold;");if(p+=m+n,l){const B=await Ye(d,`${a.requirementId?`ID: ${a.requirementId}`:""}`,p,t.labelStyle);p+=B;const U=await Ye(d,`${a.text?`Text: ${a.text}`:""}`,p,t.labelStyle);p+=U;const A=await Ye(d,`${a.risk?`Risk: ${a.risk}`:""}`,p,t.labelStyle);p+=A,await Ye(d,`${a.verifyMethod?`Verification: ${a.verifyMethod}`:""}`,p,t.labelStyle)}else{const B=await Ye(d,`${s.type?`Type: ${s.type}`:""}`,p,t.labelStyle);p+=B,await Ye(d,`${s.docRef?`Doc Ref: ${s.docRef}`:""}`,p,t.labelStyle)}const C=(((H=d.node())==null?void 0:H.getBBox().width)??200)+o,x=(((R=d.node())==null?void 0:R.getBBox().height)??200)+o,k=-C/2,w=-x/2,S=rt.svg(d),_=et(t,{});t.look!=="handDrawn"&&(_.roughness=0,_.fillStyle="solid");const v=S.rectangle(k,w,C,x,_),D=d.insert(()=>v,":first-child");if(D.attr("class","basic label-container outer-path").attr("style",i),u!=null&&u.length){const B=t.colorIndex??0;d.attr("data-color-id",`color-${B%u.length}`)}if(d.selectAll(".label").each((B,U,A)=>{const M=wt(A[U]),E=M.attr("transform");let L=0,I=0;if(E){const J=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(E);J&&(L=parseFloat(J[1]),I=parseFloat(J[2]))}const $=I-x/2;let q=k+o/2;(U===0||U===1)&&(q=L),M.attr("transform",`translate(${q}, ${$+o})`)}),p>g+m+n){const B=w+g+m+n;let U;if(t.look==="neo"){const E=[[k,B],[k+C,B],[k+C,B+.001],[k,B+.001]];U=S.polygon(E,_)}else U=S.line(k,B,k+C,B,_);d.insert(()=>U).attr("class","divider")}return nt(t,D),t.intersect=function(B){return tt.rect(t,B)},i&&t.look!=="handDrawn"&&(f||u!=null&&u.length)&&d.selectAll("path").attr("style",i),d}y(E0,"requirementBox");async function Ye(e,t,r,i=""){if(t==="")return 0;const a=e.insert("g").attr("class","label").attr("style",i),s=Bt(),o=s.htmlLabels??!0,n=await tr(a,Mh(Kr(t)),{width:gr(t,s)+50,classes:"markdown-node-label",useHtmlLabels:o,style:i},s);let l;if(o){const h=n.children[0],c=wt(n);l=h.getBoundingClientRect(),c.attr("width",l.width),c.attr("height",l.height)}else{const h=n.children[0];for(const c of h.children)i&&c.setAttribute("style",i);l=n.getBBox(),l.height+=6}return a.attr("transform",`translate(${-l.width/2},${-l.height/2+r})`),l.height}y(Ye,"addText");var AF=y(e=>{switch(e){case"Very High":return"red";case"High":return"orange";case"Medium":return null;case"Low":return"blue";case"Very Low":return"lightblue"}},"colorFromPriority");async function $0(e,t,{config:r}){var U,A;const{labelStyles:i,nodeStyles:a}=at(t);t.labelStyle=i||"";const s=10,o=t.width;t.width=(t.width??200)-10;const{shapeSvg:n,bbox:l,label:h}=await gt(e,t,ft(t)),c=t.padding||10;let u="",f;"ticket"in t&&t.ticket&&((U=r==null?void 0:r.kanban)!=null&&U.ticketBaseUrl)&&(u=(A=r==null?void 0:r.kanban)==null?void 0:A.ticketBaseUrl.replace("#TICKET#",t.ticket),f=n.insert("svg:a",":first-child").attr("class","kanban-ticket-link").attr("xlink:href",u).attr("target","_blank"));const d={useHtmlLabels:t.useHtmlLabels,labelStyle:t.labelStyle||"",width:t.width,img:t.img,padding:t.padding||8,centerLabel:!1};let g,p;f?{label:g,bbox:p}=await Kn(f,"ticket"in t&&t.ticket||"",d):{label:g,bbox:p}=await Kn(n,"ticket"in t&&t.ticket||"",d);const{label:m,bbox:C}=await Kn(n,"assigned"in t&&t.assigned||"",d);t.width=o;const x=10,k=(t==null?void 0:t.width)||0,w=Math.max(p.height,C.height)/2,S=Math.max(l.height+x*2,(t==null?void 0:t.height)||0)+w,_=-k/2,v=-S/2;h.attr("transform","translate("+(c-k/2)+", "+(-w-l.height/2)+")"),g.attr("transform","translate("+(c-k/2)+", "+(-w+l.height/2)+")"),m.attr("transform","translate("+(c+k/2-C.width-2*s)+", "+(-w+l.height/2)+")");let D;const{rx:H,ry:R}=t,{cssStyles:B}=t;if(t.look==="handDrawn"){const M=rt.svg(n),E=et(t,{}),L=H||R?M.path(Ar(_,v,k,S,H||0),E):M.rectangle(_,v,k,S,E);D=n.insert(()=>L,":first-child"),D.attr("class","basic label-container").attr("style",B||null)}else{D=n.insert("rect",":first-child"),D.attr("class","basic label-container __APA__").attr("style",a).attr("rx",H??5).attr("ry",R??5).attr("x",_).attr("y",v).attr("width",k).attr("height",S);const M="priority"in t&&t.priority;if(M){const E=n.append("line"),L=_+2,I=v+Math.floor((H??0)/2),$=v+S-Math.floor((H??0)/2);E.attr("x1",L).attr("y1",I).attr("x2",L).attr("y2",$).attr("stroke-width","4").attr("stroke",AF(M))}}return nt(t,D),t.height=S,t.intersect=function(M){return tt.rect(t,M)},n}y($0,"kanbanItem");async function O0(e,t){const{labelStyles:r,nodeStyles:i}=at(t);t.labelStyle=r;const{shapeSvg:a,bbox:s,halfPadding:o,label:n}=await gt(e,t,ft(t)),l=s.width+10*o,h=s.height+8*o,c=.15*l,{cssStyles:u}=t,f=s.width+20,d=s.height+20,g=Math.max(l,f),p=Math.max(h,d);n.attr("transform",`translate(${-s.width/2}, ${-s.height/2})`);let m;const C=`M0 0
|
|
243
|
-
a${c},${c} 1 0,0 ${g*.25},${-1*p*.1}
|
|
244
|
-
a${c},${c} 1 0,0 ${g*.25},0
|
|
245
|
-
a${c},${c} 1 0,0 ${g*.25},0
|
|
246
|
-
a${c},${c} 1 0,0 ${g*.25},${p*.1}
|
|
247
|
-
|
|
248
|
-
a${c},${c} 1 0,0 ${g*.15},${p*.33}
|
|
249
|
-
a${c*.8},${c*.8} 1 0,0 0,${p*.34}
|
|
250
|
-
a${c},${c} 1 0,0 ${-1*g*.15},${p*.33}
|
|
251
|
-
|
|
252
|
-
a${c},${c} 1 0,0 ${-1*g*.25},${p*.15}
|
|
253
|
-
a${c},${c} 1 0,0 ${-1*g*.25},0
|
|
254
|
-
a${c},${c} 1 0,0 ${-1*g*.25},0
|
|
255
|
-
a${c},${c} 1 0,0 ${-1*g*.25},${-1*p*.15}
|
|
256
|
-
|
|
257
|
-
a${c},${c} 1 0,0 ${-1*g*.1},${-1*p*.33}
|
|
258
|
-
a${c*.8},${c*.8} 1 0,0 0,${-1*p*.34}
|
|
259
|
-
a${c},${c} 1 0,0 ${g*.1},${-1*p*.33}
|
|
260
|
-
H0 V0 Z`;if(t.look==="handDrawn"){const x=rt.svg(a),k=et(t,{}),w=x.path(C,k);m=a.insert(()=>w,":first-child"),m.attr("class","basic label-container").attr("style",jt(u))}else m=a.insert("path",":first-child").attr("class","basic label-container").attr("style",i).attr("d",C);return m.attr("transform",`translate(${-g/2}, ${-p/2})`),nt(t,m),t.calcIntersect=function(x,k){return tt.rect(x,k)},t.intersect=function(x){return G.info("Bang intersect",t,x),tt.rect(t,x)},a}y(O0,"bang");async function D0(e,t){const{labelStyles:r,nodeStyles:i}=at(t);t.labelStyle=r;const{shapeSvg:a,bbox:s,halfPadding:o,label:n}=await gt(e,t,ft(t)),l=s.width+2*o,h=s.height+2*o,c=.15*l,u=.25*l,f=.35*l,d=.2*l,{cssStyles:g}=t;let p;const m=`M0 0
|
|
261
|
-
a${c},${c} 0 0,1 ${l*.25},${-1*l*.1}
|
|
262
|
-
a${f},${f} 1 0,1 ${l*.4},${-1*l*.1}
|
|
263
|
-
a${u},${u} 1 0,1 ${l*.35},${l*.2}
|
|
264
|
-
|
|
265
|
-
a${c},${c} 1 0,1 ${l*.15},${h*.35}
|
|
266
|
-
a${d},${d} 1 0,1 ${-1*l*.15},${h*.65}
|
|
267
|
-
|
|
268
|
-
a${u},${c} 1 0,1 ${-1*l*.25},${l*.15}
|
|
269
|
-
a${f},${f} 1 0,1 ${-1*l*.5},0
|
|
270
|
-
a${c},${c} 1 0,1 ${-1*l*.25},${-1*l*.15}
|
|
271
|
-
|
|
272
|
-
a${c},${c} 1 0,1 ${-1*l*.1},${-1*h*.35}
|
|
273
|
-
a${d},${d} 1 0,1 ${l*.1},${-1*h*.65}
|
|
274
|
-
H0 V0 Z`;if(t.look==="handDrawn"){const C=rt.svg(a),x=et(t,{}),k=C.path(m,x);p=a.insert(()=>k,":first-child"),p.attr("class","basic label-container").attr("style",jt(g))}else p=a.insert("path",":first-child").attr("class","basic label-container").attr("style",i).attr("d",m);return n.attr("transform",`translate(${-s.width/2}, ${-s.height/2})`),p.attr("transform",`translate(${-l/2}, ${-h/2})`),nt(t,p),t.calcIntersect=function(C,x){return tt.rect(C,x)},t.intersect=function(C){return G.info("Cloud intersect",t,C),tt.rect(t,C)},a}y(D0,"cloud");async function I0(e,t){const{labelStyles:r,nodeStyles:i}=at(t);t.labelStyle=r;const{shapeSvg:a,bbox:s,halfPadding:o,label:n}=await gt(e,t,ft(t)),l=s.width+8*o,h=s.height+2*o,c=5,u=t.look==="neo"?`
|
|
275
|
-
M${-l/2} ${h/2-c}
|
|
276
|
-
v${-h+2*c}
|
|
277
|
-
q0,-${c} ${c},-${c}
|
|
278
|
-
h${l-2*c}
|
|
279
|
-
q${c},0 ${c},${c}
|
|
280
|
-
v${h-c}
|
|
281
|
-
H${-l/2}
|
|
282
|
-
Z
|
|
283
|
-
`:`
|
|
284
|
-
M${-l/2} ${h/2-c}
|
|
285
|
-
v${-h+2*c}
|
|
286
|
-
q0,-${c} ${c},-${c}
|
|
287
|
-
h${l-2*c}
|
|
288
|
-
q${c},0 ${c},${c}
|
|
289
|
-
v${h-2*c}
|
|
290
|
-
q0,${c} ${-c},${c}
|
|
291
|
-
h${-(l-2*c)}
|
|
292
|
-
q${-c},0 ${-c},${-c}
|
|
293
|
-
Z
|
|
294
|
-
`;if(!t.domId)throw new Error(`defaultMindmapNode: node "${t.id}" is missing a domId — was render.ts domId prefixing skipped?`);const f=a.append("path").attr("id",t.domId).attr("class","node-bkg node-"+t.type).attr("style",i).attr("d",u);return a.append("line").attr("class","node-line-").attr("x1",-l/2).attr("y1",h/2).attr("x2",l/2).attr("y2",h/2),n.attr("transform",`translate(${-s.width/2}, ${-s.height/2})`),a.append(()=>n.node()),nt(t,f),t.calcIntersect=function(d,g){return tt.rect(d,g)},t.intersect=function(d){return tt.rect(t,d)},a}y(I0,"defaultMindmapNode");async function P0(e,t){const r={padding:t.padding??0};return gc(e,t,r)}y(P0,"mindmapCircle");var EF=[{semanticName:"Process",name:"Rectangle",shortName:"rect",description:"Standard process shape",aliases:["proc","process","rectangle"],internalAliases:["squareRect"],handler:g0},{semanticName:"Event",name:"Rounded Rectangle",shortName:"rounded",description:"Represents an event",aliases:["event"],internalAliases:["roundedRect"],handler:u0},{semanticName:"Terminal Point",name:"Stadium",shortName:"stadium",description:"Terminal point",aliases:["terminal","pill"],handler:p0},{semanticName:"Subprocess",name:"Framed Rectangle",shortName:"fr-rect",description:"Subprocess",aliases:["subprocess","subproc","framed-rectangle","subroutine"],handler:x0},{semanticName:"Database",name:"Cylinder",shortName:"cyl",description:"Database storage",aliases:["db","database","cylinder"],handler:Py},{semanticName:"Data Store",name:"Data Store",shortName:"datastore",description:"Data flow diagram data store",aliases:["data-store"],handler:Ry},{semanticName:"Start",name:"Circle",shortName:"circle",description:"Starting point",aliases:["circ"],handler:gc},{semanticName:"Bang",name:"Bang",shortName:"bang",description:"Bang",aliases:["bang"],handler:O0},{semanticName:"Cloud",name:"Cloud",shortName:"cloud",description:"cloud",aliases:["cloud"],handler:D0},{semanticName:"Decision",name:"Diamond",shortName:"diam",description:"Decision-making step",aliases:["decision","diamond","question"],handler:l0},{semanticName:"Prepare Conditional",name:"Hexagon",shortName:"hex",description:"Preparation or condition step",aliases:["hexagon","prepare"],handler:Yy},{semanticName:"Data Input/Output",name:"Lean Right",shortName:"lean-r",description:"Represents input or output",aliases:["lean-right","in-out"],internalAliases:["lean_right"],handler:e0},{semanticName:"Data Input/Output",name:"Lean Left",shortName:"lean-l",description:"Represents output or input",aliases:["lean-left","out-in"],internalAliases:["lean_left"],handler:t0},{semanticName:"Priority Action",name:"Trapezoid Base Bottom",shortName:"trap-b",description:"Priority action",aliases:["priority","trapezoid-bottom","trapezoid"],handler:S0},{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:Ky},{semanticName:"Stop",name:"Double Circle",shortName:"dbl-circ",description:"Represents a stop point",aliases:["double-circle"],internalAliases:["doublecircle"],handler:qy},{semanticName:"Text Block",name:"Text Block",shortName:"text",description:"Text block",handler:w0},{semanticName:"Card",name:"Notched Rectangle",shortName:"notch-rect",description:"Represents a card",aliases:["card","notched-rectangle"],handler:Fy},{semanticName:"Lined/Shaded Process",name:"Lined Rectangle",shortName:"lin-rect",description:"Lined process shape",aliases:["lined-rectangle","lined-process","lin-proc","shaded-process"],handler:d0},{semanticName:"Start",name:"Small Circle",shortName:"sm-circ",description:"Small starting point",aliases:["start","small-circle"],internalAliases:["stateStart"],handler:C0},{semanticName:"Stop",name:"Framed Circle",shortName:"fr-circ",description:"Stop point",aliases:["stop","framed-circle"],internalAliases:["stateEnd"],handler:y0},{semanticName:"Fork/Join",name:"Filled Rectangle",shortName:"fork",description:"Fork or join in process flow",aliases:["join"],internalAliases:["forkJoin"],handler:Hy},{semanticName:"Collate",name:"Hourglass",shortName:"hourglass",description:"Represents a collate operation",aliases:["hourglass","collate"],handler:Gy},{semanticName:"Comment",name:"Curly Brace",shortName:"brace",description:"Adds a comment",aliases:["comment","brace-l"],handler:$y},{semanticName:"Comment Right",name:"Curly Brace",shortName:"brace-r",description:"Adds a comment",handler:Oy},{semanticName:"Comment with braces on both sides",name:"Curly Braces",shortName:"braces",description:"Adds a comment",handler:Dy},{semanticName:"Com Link",name:"Lightning Bolt",shortName:"bolt",description:"Communication link",aliases:["com-link","lightning-bolt"],handler:r0},{semanticName:"Document",name:"Document",shortName:"doc",description:"Represents a document",aliases:["doc","document"],handler:B0},{semanticName:"Delay",name:"Half-Rounded Rectangle",shortName:"delay",description:"Represents a delay",aliases:["half-rounded-rectangle"],handler:Uy},{semanticName:"Direct Access Storage",name:"Horizontal Cylinder",shortName:"h-cyl",description:"Direct access storage",aliases:["das","horizontal-cylinder"],handler:T0},{semanticName:"Disk Storage",name:"Lined Cylinder",shortName:"lin-cyl",description:"Disk storage",aliases:["disk","lined-cylinder"],handler:i0},{semanticName:"Display",name:"Curved Trapezoid",shortName:"curv-trap",description:"Represents a display",aliases:["curved-trapezoid","display"],handler:Iy},{semanticName:"Divided Process",name:"Divided Rectangle",shortName:"div-rect",description:"Divided process shape",aliases:["div-proc","divided-rectangle","divided-process"],handler:Ny},{semanticName:"Extract",name:"Triangle",shortName:"tri",description:"Extraction process",aliases:["extract","triangle"],handler:v0},{semanticName:"Internal Storage",name:"Window Pane",shortName:"win-pane",description:"Internal storage",aliases:["internal-storage","window-pane"],handler:F0},{semanticName:"Junction",name:"Filled Circle",shortName:"f-circ",description:"Junction point",aliases:["junction","filled-circle"],handler:Wy},{semanticName:"Loop Limit",name:"Trapezoidal Pentagon",shortName:"notch-pent",description:"Loop limit step",aliases:["loop-limit","notched-pentagon"],handler:_0},{semanticName:"Manual File",name:"Flipped Triangle",shortName:"flip-tri",description:"Manual file operation",aliases:["manual-file","flipped-triangle"],handler:zy},{semanticName:"Manual Input",name:"Sloped Rectangle",shortName:"sl-rect",description:"Manual input step",aliases:["manual-input","sloped-rectangle"],handler:f0},{semanticName:"Multi-Document",name:"Stacked Document",shortName:"docs",description:"Multiple documents",aliases:["documents","st-doc","stacked-document"],handler:o0},{semanticName:"Multi-Process",name:"Stacked Rectangle",shortName:"st-rect",description:"Multiple processes",aliases:["procs","processes","stacked-rectangle"],handler:s0},{semanticName:"Stored Data",name:"Bow Tie Rectangle",shortName:"bow-rect",description:"Stored data",aliases:["stored-data","bow-tie-rectangle"],handler:Ly},{semanticName:"Summary",name:"Crossed Circle",shortName:"cross-circ",description:"Summary",aliases:["summary","crossed-circle"],handler:Ey},{semanticName:"Tagged Document",name:"Tagged Document",shortName:"tag-doc",description:"Tagged document",aliases:["tag-doc","tagged-document"],handler:k0},{semanticName:"Tagged Process",name:"Tagged Rectangle",shortName:"tag-rect",description:"Tagged process",aliases:["tagged-rectangle","tag-proc","tagged-process"],handler:b0},{semanticName:"Paper Tape",name:"Flag",shortName:"flag",description:"Paper tape",aliases:["paper-tape"],handler:L0},{semanticName:"Odd",name:"Odd",shortName:"odd",description:"Odd shape",internalAliases:["rect_left_inv_arrow"],handler:h0},{semanticName:"Lined Document",name:"Lined Document",shortName:"lin-doc",description:"Lined document",aliases:["lined-document"],handler:a0}],$F=y(()=>{const t=[...Object.entries({state:m0,choice:My,note:n0,rectWithTitle:c0,labelRect:Jy,iconSquare:Zy,iconCircle:jy,icon:Xy,iconRounded:Vy,imageSquare:Qy,anchor:vy,kanbanItem:$0,mindmapCircle:P0,defaultMindmapNode:I0,classBox:A0,erBox:pc,requirementBox:E0}),...EF.flatMap(r=>[r.shortName,..."aliases"in r?r.aliases:[],..."internalAliases"in r?r.internalAliases:[]].map(a=>[a,r.handler]))];return Object.fromEntries(t)},"generateShapeMap"),R0=$F();function OF(e){return e in R0}y(OF,"isValidShape");var on=new Map;async function N0(e,t,r){let i,a;t.shape==="rect"&&(t.rx&&t.ry?t.shape="roundedRect":t.shape="squareRect");const s=t.shape?R0[t.shape]:void 0;if(!s)throw new Error(`No such shape: ${t.shape}. Please check your syntax.`);if(t.link){let o;r.config.securityLevel==="sandbox"?o="_top":t.linkTarget&&(o=t.linkTarget||"_blank"),i=e.insert("svg:a").attr("xlink:href",t.link).attr("target",o??null),a=await s(i,t,r)}else a=await s(e,t,r),i=a;return i.attr("data-look",jt(t.look)),t.tooltip&&a.attr("title",t.tooltip),on.set(t.id,i),t.haveCallback&&i.attr("class",i.attr("class")+" clickable"),i}y(N0,"insertNode");var F3=y((e,t)=>{on.set(t.id,e)},"setNodeElem"),M3=y(()=>{on.clear()},"clear"),A3=y(e=>{const t=on.get(e.id);G.trace("Transforming node",e.diff,e,"translate("+(e.x-e.width/2-5)+", "+e.width/2+")");const r=8,i=e.diff||0;return e.clusterNode?t.attr("transform","translate("+(e.x+i-e.width/2)+", "+(e.y-e.height/2-r)+")"):t.attr("transform","translate("+e.x+", "+e.y+")"),i},"positionNode"),Ca=y((e,t)=>{if(t)return"translate("+-e.width/2+", "+-e.height/2+")";const r=e.x??0,i=e.y??0;return"translate("+-(r+e.width/2)+", "+-(i+e.height/2)+")"},"computeLabelTransform"),oe={aggregation:17.25,extension:17.25,composition:17.25,dependency:6,lollipop:13.5,arrow_point:4,arrow_barb:0,arrow_barb_neo:5.5},Dd={arrow_point:4,arrow_cross:12.5,arrow_circle:12.5};function Ba(e,t){if(e===void 0||t===void 0)return{angle:0,deltaX:0,deltaY:0};e=$t(e),t=$t(t);const[r,i]=[e.x,e.y],[a,s]=[t.x,t.y],o=a-r,n=s-i;return{angle:Math.atan(n/o),deltaX:o,deltaY:n}}y(Ba,"calculateDeltaAndAngle");var $t=y(e=>Array.isArray(e)?{x:e[0],y:e[1]}:e,"pointTransformer"),DF=y(e=>({x:y(function(t,r,i){let a=0;const s=$t(i[0]).x<$t(i[i.length-1]).x?"left":"right";if(r===0&&Object.hasOwn(oe,e.arrowTypeStart)){const{angle:d,deltaX:g}=Ba(i[0],i[1]);a=oe[e.arrowTypeStart]*Math.cos(d)*(g>=0?1:-1)}else if(r===i.length-1&&Object.hasOwn(oe,e.arrowTypeEnd)){const{angle:d,deltaX:g}=Ba(i[i.length-1],i[i.length-2]);a=oe[e.arrowTypeEnd]*Math.cos(d)*(g>=0?1:-1)}const o=Math.abs($t(t).x-$t(i[i.length-1]).x),n=Math.abs($t(t).y-$t(i[i.length-1]).y),l=Math.abs($t(t).x-$t(i[0]).x),h=Math.abs($t(t).y-$t(i[0]).y),c=oe[e.arrowTypeStart],u=oe[e.arrowTypeEnd],f=1;if(o<u&&o>0&&n<u){let d=u+f-o;d*=s==="right"?-1:1,a-=d}if(l<c&&l>0&&h<c){let d=c+f-l;d*=s==="right"?-1:1,a+=d}return $t(t).x+a},"x"),y:y(function(t,r,i){let a=0;const s=$t(i[0]).y<$t(i[i.length-1]).y?"down":"up";if(r===0&&Object.hasOwn(oe,e.arrowTypeStart)){const{angle:d,deltaY:g}=Ba(i[0],i[1]);a=oe[e.arrowTypeStart]*Math.abs(Math.sin(d))*(g>=0?1:-1)}else if(r===i.length-1&&Object.hasOwn(oe,e.arrowTypeEnd)){const{angle:d,deltaY:g}=Ba(i[i.length-1],i[i.length-2]);a=oe[e.arrowTypeEnd]*Math.abs(Math.sin(d))*(g>=0?1:-1)}const o=Math.abs($t(t).y-$t(i[i.length-1]).y),n=Math.abs($t(t).x-$t(i[i.length-1]).x),l=Math.abs($t(t).y-$t(i[0]).y),h=Math.abs($t(t).x-$t(i[0]).x),c=oe[e.arrowTypeStart],u=oe[e.arrowTypeEnd],f=1;if(o<u&&o>0&&n<u){let d=u+f-o;d*=s==="up"?-1:1,a-=d}if(l<c&&l>0&&h<c){let d=c+f-l;d*=s==="up"?-1:1,a+=d}return $t(t).y+a},"y")}),"getLineFunctionsWithOffset"),IF=y((e,t,r,i,a,s=!1,o)=>{t.arrowTypeStart&&Id(e,"start",t.arrowTypeStart,r,i,a,s,o),t.arrowTypeEnd&&Id(e,"end",t.arrowTypeEnd,r,i,a,s,o)},"addEdgeMarkers"),PF={arrow_cross:{type:"cross",fill:!1},arrow_point:{type:"point",fill:!0},arrow_barb:{type:"barb",fill:!0},arrow_barb_neo:{type:"barb",fill:!0},arrow_circle:{type:"circle",fill:!1},aggregation:{type:"aggregation",fill:!1},extension:{type:"extension",fill:!1},composition:{type:"composition",fill:!0},dependency:{type:"dependency",fill:!0},lollipop:{type:"lollipop",fill:!1},only_one:{type:"onlyOne",fill:!1},zero_or_one:{type:"zeroOrOne",fill:!1},one_or_more:{type:"oneOrMore",fill:!1},zero_or_more:{type:"zeroOrMore",fill:!1},requirement_arrow:{type:"requirement_arrow",fill:!1},requirement_contains:{type:"requirement_contains",fill:!1}},RF=["cross","point","circle","lollipop","aggregation","extension","composition","dependency","barb"],Id=y((e,t,r,i,a,s,o=!1,n)=>{var g;const l=PF[r],h=l&&RF.includes(l.type);if(!l){G.warn(`Unknown arrow type: ${r}`);return}const c=l.type,d=`${a}_${s}-${c}${t==="start"?"Start":"End"}${o&&h?"-margin":""}`;if(n&&n.trim()!==""){const p=n.replace(/[^\dA-Za-z]/g,"_"),m=`${d}_${p}`;if(!document.getElementById(m)){const C=document.getElementById(d);if(C){const x=C.cloneNode(!0);x.id=m,x.querySelectorAll("path, circle, line").forEach(w=>{w.setAttribute("stroke",n),l.fill&&w.setAttribute("fill",n)}),(g=C.parentNode)==null||g.appendChild(x)}}e.attr(`marker-${t}`,`url(${i}#${m})`)}else e.attr(`marker-${t}`,`url(${i}#${d})`)},"addEdgeMarker"),NF=y(e=>{var t,r;return typeof e=="string"?e:(r=(t=Bt())==null?void 0:t.flowchart)==null?void 0:r.curve},"resolveEdgeCurveType"),Do=new Map,Kt=new Map,E3=y(()=>{Do.clear(),Kt.clear()},"clear"),xa=y(e=>e?typeof e=="string"?e:e.reduce((t,r)=>t+";"+r,""):"","getLabelStyles"),qF=y(async(e,t)=>{const r=Bt();let i=fe(r);const{labelStyles:a}=at(t);t.labelStyle=a;const s=e.insert("g").attr("class","edgeLabel"),o=s.insert("g").attr("class","label").attr("data-id",t.id),n=t.labelType==="markdown",h=await tr(e,t.label,{style:xa(t.labelStyle),useHtmlLabels:i,addSvgBackground:!0,isNode:!1,markdown:n,width:n?void 0:void 0},r);o.node().appendChild(h),G.info("abc82",t,t.labelType);let c=h.getBBox(),u=c;if(i){const d=h.children[0],g=wt(h);c=d.getBoundingClientRect(),u=c,g.attr("width",c.width),g.attr("height",c.height)}else{const d=wt(h).select("text").node();d&&typeof d.getBBox=="function"&&(u=d.getBBox())}o.attr("transform",Ca(u,i)),Do.set(t.id,s),t.width=c.width,t.height=c.height;let f;if(t.startLabelLeft){const d=e.insert("g").attr("class","edgeTerminals"),g=d.insert("g").attr("class","inner"),p=await Tr(g,t.startLabelLeft,xa(t.labelStyle)||"",!1,!1);f=p;let m=p.getBBox();if(i){const C=p.children[0],x=wt(p);m=C.getBoundingClientRect(),x.attr("width",m.width),x.attr("height",m.height)}g.attr("transform",Ca(m,i)),Kt.get(t.id)||Kt.set(t.id,{}),Kt.get(t.id).startLeft=d,La(f,t.startLabelLeft)}if(t.startLabelRight){const d=e.insert("g").attr("class","edgeTerminals"),g=d.insert("g").attr("class","inner"),p=await Tr(g,t.startLabelRight,xa(t.labelStyle)||"",!1,!1);f=p;let m=p.getBBox();if(i){const C=p.children[0],x=wt(p);m=C.getBoundingClientRect(),x.attr("width",m.width),x.attr("height",m.height)}g.attr("transform",Ca(m,i)),Kt.get(t.id)||Kt.set(t.id,{}),Kt.get(t.id).startRight=d,La(f,t.startLabelRight)}if(t.endLabelLeft){const d=e.insert("g").attr("class","edgeTerminals"),g=d.insert("g").attr("class","inner"),p=await Tr(d,t.endLabelLeft,xa(t.labelStyle)||"",!1,!1);f=p;let m=p.getBBox();if(i){const C=p.children[0],x=wt(p);m=C.getBoundingClientRect(),x.attr("width",m.width),x.attr("height",m.height)}g.attr("transform",Ca(m,i)),Kt.get(t.id)||Kt.set(t.id,{}),Kt.get(t.id).endLeft=d,La(f,t.endLabelLeft)}if(t.endLabelRight){const d=e.insert("g").attr("class","edgeTerminals"),g=d.insert("g").attr("class","inner"),p=await Tr(d,t.endLabelRight,xa(t.labelStyle)||"",!1,!1);f=p;let m=p.getBBox();if(i){const C=p.children[0],x=wt(p);m=C.getBoundingClientRect(),x.attr("width",m.width),x.attr("height",m.height)}g.attr("transform",Ca(m,i)),Kt.get(t.id)||Kt.set(t.id,{}),Kt.get(t.id).endRight=d,La(f,t.endLabelRight)}return h},"insertEdgeLabel");function La(e,t){fe(Bt())&&e&&(e.style.width=t.length*9+"px",e.style.height="12px")}y(La,"setTerminalWidth");var WF=y((e,t)=>{G.debug("Moving label abc88 ",e.id,e.label,Do.get(e.id),t);let r=t.updatedPath?t.updatedPath:t.originalPath;const i=Bt(),{subGraphTitleTotalMargin:a}=ec(i);if(e.label){const s=Do.get(e.id);let o=e.x,n=e.y;if(r){const l=$e.calcLabelPosition(r);G.debug("Moving label "+e.label+" from (",o,",",n,") to (",l.x,",",l.y,") abc88"),t.updatedPath&&(o=l.x,n=l.y)}s.attr("transform",`translate(${o}, ${n+a/2})`)}if(e.startLabelLeft){const s=Kt.get(e.id).startLeft;let o=e.x,n=e.y;if(r){const l=$e.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_left",r);o=l.x,n=l.y}s.attr("transform",`translate(${o}, ${n})`)}if(e.startLabelRight){const s=Kt.get(e.id).startRight;let o=e.x,n=e.y;if(r){const l=$e.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_right",r);o=l.x,n=l.y}s.attr("transform",`translate(${o}, ${n})`)}if(e.endLabelLeft){const s=Kt.get(e.id).endLeft;let o=e.x,n=e.y;if(r){const l=$e.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_left",r);o=l.x,n=l.y}s.attr("transform",`translate(${o}, ${n})`)}if(e.endLabelRight){const s=Kt.get(e.id).endRight;let o=e.x,n=e.y;if(r){const l=$e.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_right",r);o=l.x,n=l.y}s.attr("transform",`translate(${o}, ${n})`)}},"positionEdgeLabel"),zF=y((e,t)=>{var o;if(!(e!=null&&e.isLabelEdge)||!((o=e==null?void 0:e.id)!=null&&o.endsWith("-to-label"))||!Array.isArray(t)||t.length!==2)return t;const[r,i]=t,a=Math.abs(i.x-r.x),s=Math.abs(i.y-r.y);return a<.001||s<.001?t:s>=a?[r,{x:r.x,y:i.y},i]:[r,{x:i.x,y:r.y},i]},"orthogonalizeToLabelClippedPoints"),HF=y((e,t)=>{const r=e.x,i=e.y,a=Math.abs(t.x-r),s=Math.abs(t.y-i),o=e.width/2,n=e.height/2;return a>=o||s>=n},"outsideNode"),UF=y((e,t,r)=>{G.debug(`intersection calc abc89:
|
|
295
|
-
outsidePoint: ${JSON.stringify(t)}
|
|
296
|
-
insidePoint : ${JSON.stringify(r)}
|
|
297
|
-
node : x:${e.x} y:${e.y} w:${e.width} h:${e.height}`);const i=e.x,a=e.y,s=Math.abs(i-r.x),o=e.width/2;let n=r.x<t.x?o-s:o+s;const l=e.height/2,h=Math.abs(t.y-r.y),c=Math.abs(t.x-r.x);if(Math.abs(a-t.y)*o>Math.abs(i-t.x)*l){let u=r.y<t.y?t.y-l-a:a-l-t.y;n=c*u/h;const f={x:r.x<t.x?r.x+n:r.x-c+n,y:r.y<t.y?r.y+h-u:r.y-h+u};return n===0&&(f.x=t.x,f.y=t.y),c===0&&(f.x=t.x),h===0&&(f.y=t.y),G.debug(`abc89 top/bottom calc, Q ${h}, q ${u}, R ${c}, r ${n}`,f),f}else{r.x<t.x?n=t.x-o-i:n=i-o-t.x;let u=h*n/c,f=r.x<t.x?r.x+c-n:r.x-c+n,d=r.y<t.y?r.y+u:r.y-u;return G.debug(`sides calc abc89, Q ${h}, q ${u}, R ${c}, r ${n}`,{_x:f,_y:d}),n===0&&(f=t.x,d=t.y),c===0&&(f=t.x),h===0&&(d=t.y),{x:f,y:d}}},"intersection"),Pd=y((e,t)=>{G.warn("abc88 cutPathAtIntersect",e,t);let r=[],i=e[0],a=!1;return e.forEach(s=>{if(G.info("abc88 checking point",s,t),!HF(t,s)&&!a){const o=UF(t,i,s);G.debug("abc88 inside",s,i,o),G.debug("abc88 intersection",o,t);let n=!1;r.forEach(l=>{n=n||l.x===o.x&&l.y===o.y}),r.some(l=>l.x===o.x&&l.y===o.y)?G.warn("abc88 no intersect",o,r):r.push(o),a=!0}else G.warn("abc88 outside",s,i),i=s,a||r.push(s)}),G.debug("returning points",r),r},"cutPathAtIntersect");function q0(e){const t=[],r=[];for(let i=1;i<e.length-1;i++){const a=e[i-1],s=e[i],o=e[i+1];(a.x===s.x&&s.y===o.y&&Math.abs(s.x-o.x)>5&&Math.abs(s.y-a.y)>5||a.y===s.y&&s.x===o.x&&Math.abs(s.x-a.x)>5&&Math.abs(s.y-o.y)>5)&&(t.push(s),r.push(i))}return{cornerPoints:t,cornerPointPositions:r}}y(q0,"extractCornerPoints");var Rd=y(function(e,t,r){const i=t.x-e.x,a=t.y-e.y,s=Math.sqrt(i*i+a*a),o=r/s;return{x:t.x-o*i,y:t.y-o*a}},"findAdjacentPoint"),YF=y(function(e){const{cornerPointPositions:t}=q0(e),r=[];for(let i=0;i<e.length;i++)if(t.includes(i)){const a=e[i-1],s=e[i+1],o=e[i],n=Rd(a,o,5),l=Rd(s,o,5),h=l.x-n.x,c=l.y-n.y;r.push(n);const u=Math.sqrt(2)*2;let f={x:o.x,y:o.y};if(Math.abs(s.x-a.x)>10&&Math.abs(s.y-a.y)>=10){G.debug("Corner point fixing",Math.abs(s.x-a.x),Math.abs(s.y-a.y));const d=5;o.x===n.x?f={x:h<0?n.x-d+u:n.x+d-u,y:c<0?n.y-u:n.y+u}:f={x:h<0?n.x-u:n.x+u,y:c<0?n.y-d+u:n.y+d-u}}else G.debug("Corner point skipping fixing",Math.abs(s.x-a.x),Math.abs(s.y-a.y));r.push(f,l)}else r.push(e[i]);return r},"fixCorners"),GF=y((e,t,r)=>{const i=e-t-r,a=2,s=2,o=a+s,n=Math.floor(i/o),l=Array(n).fill(`${a} ${s}`).join(" ");return`0 ${t} ${l} ${r}`},"generateDashArray"),XF=y(function(e,t,r,i,a,s,o,n=!1){var $;if(!o)throw new Error(`insertEdge: missing diagramId for edge "${t.id}" — edge IDs require a diagram prefix for uniqueness`);const{handDrawnSeed:l,layout:h}=Bt();let c=t.points,u=!1;const f=a;var d=s;const g=[];for(const q in t.cssCompiledStyles)pm(q)||g.push(t.cssCompiledStyles[q]);if(h==="swimlane"){if(d.intersect&&f.intersect&&Array.isArray(c)&&c.length>=2)if(c.length===2)c=[f.intersect(c[0]),d.intersect(c[1])];else{const q=c.slice(1,-1),X=q[0],J=q[q.length-1],Q=.5,lt=Math.abs(c[c.length-1].x-J.x)<Q&&Math.abs(c[c.length-1].y-J.y)<Q,st=f.intersect(X),ot=lt?J:d.intersect(J),xt=Math.abs(ot.x-J.x)<Q&&Math.abs(ot.y-J.y)<Q,St=Math.abs(st.x-X.x)<Q&&Math.abs(st.y-X.y)<Q?[]:[st],V=xt?[]:[ot];c=[...St,...q,...V]}c=zF(t,c)}else d.intersect&&f.intersect&&!n&&(c=c.slice(1,t.points.length-1),c.unshift(f.intersect(c[0])),c.push(d.intersect(c[c.length-1])));const p=btoa(JSON.stringify(c));t.toCluster&&(G.info("to cluster abc88",r.get(t.toCluster)),c=Pd(t.points,r.get(t.toCluster).node),u=!0),t.fromCluster&&(G.debug("from cluster abc88",r.get(t.fromCluster),JSON.stringify(c,null,2)),c=Pd(c.reverse(),r.get(t.fromCluster).node).reverse(),u=!0);let m=c.filter(q=>!Number.isNaN(q.y));const C=NF(t.curve);C!=="rounded"&&(m=YF(m));let x=Ma;switch(C){case"linear":x=Ma;break;case"basis":x=Cl;break;case"cardinal":x=Jf;break;case"bumpX":x=jf;break;case"bumpY":x=Vf;break;case"catmullRom":x=eg;break;case"monotoneX":x=ng;break;case"monotoneY":x=lg;break;case"natural":x=cg;break;case"step":x=ug;break;case"stepAfter":x=fg;break;case"stepBefore":x=dg;break;case"rounded":x=Ma;break;default:x=Cl}const{x:k,y:w}=DF(t),S=cS().x(k).y(w).curve(x);let _;switch(t.thickness){case"normal":_="edge-thickness-normal";break;case"thick":_="edge-thickness-thick";break;case"invisible":_="edge-thickness-invisible";break;default:_="edge-thickness-normal"}switch(t.pattern){case"solid":_+=" edge-pattern-solid";break;case"dotted":_+=" edge-pattern-dotted";break;case"dashed":_+=" edge-pattern-dashed";break;default:_+=" edge-pattern-solid"}let v,D=C==="rounded"?W0(z0(m,t),5):S(m);const H=Array.isArray(t.style)?t.style:[t.style];let R=H.find(q=>q==null?void 0:q.startsWith("stroke:")),B="";t.animate&&(B="edge-animation-fast"),t.animation&&(B="edge-animation-"+t.animation);let U=!1;if(t.look==="handDrawn"){const q=rt.svg(e);Object.assign([],m);const X=q.path(D,{roughness:.3,seed:l});_+=" transition",v=wt(X).select("path").attr("id",`${o}-${t.id}`).attr("class"," "+_+(t.classes?" "+t.classes:"")+(B?" "+B:"")).attr("style",H?H.reduce((Q,lt)=>Q+";"+lt,""):"");let J=v.attr("d");v.attr("d",J),e.node().appendChild(v.node())}else{const q=g.join(";"),X=H?H.reduce((xt,Ct)=>xt+Ct+";",""):"",J=(q?q+";"+X+";":X)+";"+(H?H.reduce((xt,Ct)=>xt+";"+Ct,""):"");v=e.append("path").attr("d",D).attr("id",`${o}-${t.id}`).attr("class"," "+_+(t.classes?" "+t.classes:"")+(B?" "+B:"")).attr("style",J),R=($=J.match(/stroke:([^;]+)/))==null?void 0:$[1],U=t.animate===!0||!!t.animation||q.includes("animation");const Q=v.node(),lt=typeof Q.getTotalLength=="function"?Q.getTotalLength():0,st=Dd[t.arrowTypeStart]||0,ot=Dd[t.arrowTypeEnd]||0;if(t.look==="neo"&&!U){const Ct=`stroke-dasharray: ${t.pattern==="dotted"||t.pattern==="dashed"?GF(lt,st,ot):`0 ${st} ${lt-st-ot} ${ot}`}; stroke-dashoffset: 0;`;v.attr("style",Ct+v.attr("style"))}}v.attr("data-edge",!0),v.attr("data-et","edge"),v.attr("data-id",t.id),v.attr("data-points",p),v.attr("data-look",jt(t.look)),t.showPoints&&m.forEach(q=>{e.append("circle").style("stroke","red").style("fill","red").attr("r",1).attr("cx",q.x).attr("cy",q.y)});let A="";(Bt().flowchart.arrowMarkerAbsolute||Bt().state.arrowMarkerAbsolute)&&(A=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,A=A.replace(/\(/g,"\\(").replace(/\)/g,"\\)")),G.info("arrowTypeStart",t.arrowTypeStart),G.info("arrowTypeEnd",t.arrowTypeEnd);const M=!U&&(t==null?void 0:t.look)==="neo";IF(v,t,A,o,i,M,R);const E=Math.floor(c.length/2),L=c[E];$e.isLabelCoordinateInPath(L,v.attr("d"))||(u=!0);let I={};return u&&(I.updatedPath=c),I.originalPath=t.points,I},"insertEdge");function W0(e,t){if(e.length<2)return"";let r="";const i=e.length,a=1e-5;for(let s=0;s<i;s++){const o=e[s],n=e[s-1],l=e[s+1];if(s===0)r+=`M${o.x},${o.y}`;else if(s===i-1)r+=`L${o.x},${o.y}`;else{const h=o.x-n.x,c=o.y-n.y,u=l.x-o.x,f=l.y-o.y,d=Math.hypot(h,c),g=Math.hypot(u,f);if(d<a||g<a){r+=`L${o.x},${o.y}`;continue}const p=h/d,m=c/d,C=u/g,x=f/g,k=p*C+m*x,w=Math.max(-1,Math.min(1,k)),S=Math.acos(w);if(S<a||Math.abs(Math.PI-S)<a){r+=`L${o.x},${o.y}`;continue}const _=Math.min(t/Math.sin(S/2),d/2,g/2),v=o.x-p*_,D=o.y-m*_,H=o.x+C*_,R=o.y+x*_;r+=`L${v},${D}`,r+=`Q${o.x},${o.y} ${H},${R}`}}return r}y(W0,"generateRoundedPath");function th(e,t){if(!e||!t)return{angle:0,deltaX:0,deltaY:0};const r=t.x-e.x,i=t.y-e.y;return{angle:Math.atan2(i,r),deltaX:r,deltaY:i}}y(th,"calculateDeltaAndAngle");function z0(e,t){const r=e.map(a=>({...a}));if(e.length>=2&&oe[t.arrowTypeStart]){const a=oe[t.arrowTypeStart],s=e[0],o=e[1],{angle:n}=th(s,o),l=a*Math.cos(n),h=a*Math.sin(n);r[0].x=s.x+l,r[0].y=s.y+h}const i=e.length;if(i>=2&&oe[t.arrowTypeEnd]){const a=oe[t.arrowTypeEnd],s=e[i-1],o=e[i-2],{angle:n}=th(o,s),l=a*Math.cos(n),h=a*Math.sin(n);r[i-1].x=s.x-l,r[i-1].y=s.y-h}return r}y(z0,"applyMarkerOffsetsToPoints");var jF=y((e,t,r,i)=>{t.forEach(a=>{yM[a](e,r,i)})},"insertMarkers"),VF=y((e,t,r)=>{G.trace("Making markers for ",r),e.append("defs").append("marker").attr("id",r+"_"+t+"-extensionStart").attr("class","marker extension "+t).attr("refX",18).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M 1,7 L18,13 V 1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-extensionEnd").attr("class","marker extension "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 1,1 V 13 L18,7 Z"),e.append("marker").attr("id",r+"_"+t+"-extensionStart-margin").attr("class","marker extension "+t).attr("refX",18).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").attr("viewBox","0 0 20 14").append("polygon").attr("points","10,7 18,13 18,1").style("stroke-width",2).style("stroke-dasharray","0"),e.append("defs").append("marker").attr("id",r+"_"+t+"-extensionEnd-margin").attr("class","marker extension "+t).attr("refX",9).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").attr("viewBox","0 0 20 14").append("polygon").attr("points","10,1 10,13 18,7").style("stroke-width",2).style("stroke-dasharray","0")},"extension"),ZF=y((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-compositionStart").attr("class","marker composition "+t).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-compositionEnd").attr("class","marker composition "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-compositionStart-margin").attr("class","marker composition "+t).attr("refX",15).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",0).attr("viewBox","0 0 15 15").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-compositionEnd-margin").attr("class","marker composition "+t).attr("refX",3.5).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",0).attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"composition"),QF=y((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-aggregationStart").attr("class","marker aggregation "+t).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-aggregationEnd").attr("class","marker aggregation "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-aggregationStart-margin").attr("class","marker aggregation "+t).attr("refX",15).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",2).attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-aggregationEnd-margin").attr("class","marker aggregation "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",2).attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"aggregation"),KF=y((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-dependencyStart").attr("class","marker dependency "+t).attr("refX",6).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-dependencyEnd").attr("class","marker dependency "+t).attr("refX",13).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-dependencyStart-margin").attr("class","marker dependency "+t).attr("refX",4).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",0).attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-dependencyEnd-margin").attr("class","marker dependency "+t).attr("refX",16).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",0).attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},"dependency"),JF=y((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-lollipopStart").attr("class","marker lollipop "+t).attr("refX",13).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6),e.append("defs").append("marker").attr("id",r+"_"+t+"-lollipopEnd").attr("class","marker lollipop "+t).attr("refX",1).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6),e.append("defs").append("marker").attr("id",r+"_"+t+"-lollipopStart-margin").attr("class","marker lollipop "+t).attr("refX",13).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("circle").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6).attr("stroke-width",2),e.append("defs").append("marker").attr("id",r+"_"+t+"-lollipopEnd-margin").attr("class","marker lollipop "+t).attr("refX",1).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("circle").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6).attr("stroke-width",2)},"lollipop"),tM=y((e,t,r)=>{e.append("marker").attr("id",r+"_"+t+"-pointEnd").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",8).attr("markerHeight",8).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-pointStart").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",4.5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",8).attr("markerHeight",8).attr("orient","auto").append("path").attr("d","M 0 5 L 10 10 L 10 0 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-pointEnd-margin").attr("class","marker "+t).attr("viewBox","0 0 11.5 14").attr("refX",11.5).attr("refY",7).attr("markerUnits","userSpaceOnUse").attr("markerWidth",10.5).attr("markerHeight",14).attr("orient","auto").append("path").attr("d","M 0 0 L 11.5 7 L 0 14 z").attr("class","arrowMarkerPath").style("stroke-width",0).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-pointStart-margin").attr("class","marker "+t).attr("viewBox","0 0 11.5 14").attr("refX",1).attr("refY",7).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11.5).attr("markerHeight",14).attr("orient","auto").append("polygon").attr("points","0,7 11.5,14 11.5,0").attr("class","arrowMarkerPath").style("stroke-width",0).style("stroke-dasharray","1,0")},"point"),eM=y((e,t,r)=>{e.append("marker").attr("id",r+"_"+t+"-circleEnd").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",11).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-circleStart").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",-1).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-circleEnd-margin").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refY",5).attr("refX",12.25).attr("markerUnits","userSpaceOnUse").attr("markerWidth",14).attr("markerHeight",14).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",0).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-circleStart-margin").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",-2).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",14).attr("markerHeight",14).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",0).style("stroke-dasharray","1,0")},"circle"),rM=y((e,t,r)=>{e.append("marker").attr("id",r+"_"+t+"-crossEnd").attr("class","marker cross "+t).attr("viewBox","0 0 11 11").attr("refX",12).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-crossStart").attr("class","marker cross "+t).attr("viewBox","0 0 11 11").attr("refX",-1).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-crossEnd-margin").attr("class","marker cross "+t).attr("viewBox","0 0 15 15").attr("refX",17.7).attr("refY",7.5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 1,1 L 14,14 M 1,14 L 14,1").attr("class","arrowMarkerPath").style("stroke-width",2.5),e.append("marker").attr("id",r+"_"+t+"-crossStart-margin").attr("class","marker cross "+t).attr("viewBox","0 0 15 15").attr("refX",-3.5).attr("refY",7.5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 1,1 L 14,14 M 1,14 L 14,1").attr("class","arrowMarkerPath").style("stroke-width",2.5).style("stroke-dasharray","1,0")},"cross"),iM=y((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-barbEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","userSpaceOnUse").attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")},"barb"),aM=y((e,t,r)=>{const i=It(),{themeVariables:a}=i,{transitionColor:s}=a;e.append("defs").append("marker").attr("id",r+"_"+t+"-barbEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","strokeWidth").attr("orient","auto").append("path").attr("d","M 19,7 L11,14 L13,7 L11,0 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-barbEnd-margin").attr("refX",17).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","userSpaceOnUse").attr("orient","auto").append("path").attr("d","M 19,7 L11,14 L13,7 L11,0 Z").attr("fill",`${s}`)},"barbNeo"),sM=y((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-onlyOneStart").attr("class","marker onlyOne "+t).attr("refX",0).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("d","M9,0 L9,18 M15,0 L15,18"),e.append("defs").append("marker").attr("id",r+"_"+t+"-onlyOneEnd").attr("class","marker onlyOne "+t).attr("refX",18).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("d","M3,0 L3,18 M9,0 L9,18")},"only_one"),oM=y((e,t,r)=>{const i=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrOneStart").attr("class","marker zeroOrOne "+t).attr("refX",0).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto");i.append("circle").attr("fill","white").attr("cx",21).attr("cy",9).attr("r",6),i.append("path").attr("d","M9,0 L9,18");const a=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrOneEnd").attr("class","marker zeroOrOne "+t).attr("refX",30).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto");a.append("circle").attr("fill","white").attr("cx",9).attr("cy",9).attr("r",6),a.append("path").attr("d","M21,0 L21,18")},"zero_or_one"),nM=y((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-oneOrMoreStart").attr("class","marker oneOrMore "+t).attr("refX",18).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").attr("d","M0,18 Q 18,0 36,18 Q 18,36 0,18 M42,9 L42,27"),e.append("defs").append("marker").attr("id",r+"_"+t+"-oneOrMoreEnd").attr("class","marker oneOrMore "+t).attr("refX",27).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").attr("d","M3,9 L3,27 M9,18 Q27,0 45,18 Q27,36 9,18")},"one_or_more"),lM=y((e,t,r)=>{const i=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrMoreStart").attr("class","marker zeroOrMore "+t).attr("refX",18).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto");i.append("circle").attr("fill","white").attr("cx",48).attr("cy",18).attr("r",6),i.append("path").attr("d","M0,18 Q18,0 36,18 Q18,36 0,18");const a=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrMoreEnd").attr("class","marker zeroOrMore "+t).attr("refX",39).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto");a.append("circle").attr("fill","white").attr("cx",9).attr("cy",18).attr("r",6),a.append("path").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18")},"zero_or_more"),hM=y((e,t,r)=>{const i=It(),{themeVariables:a}=i,{strokeWidth:s}=a;e.append("defs").append("marker").attr("id",r+"_"+t+"-onlyOneStart").attr("class","marker onlyOne "+t).attr("refX",0).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M9,0 L9,18 M15,0 L15,18").attr("stroke-width",`${s}`),e.append("defs").append("marker").attr("id",r+"_"+t+"-onlyOneEnd").attr("class","marker onlyOne "+t).attr("refX",18).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M3,0 L3,18 M9,0 L9,18").attr("stroke-width",`${s}`)},"only_one_neo"),cM=y((e,t,r)=>{const i=It(),{themeVariables:a}=i,{strokeWidth:s,mainBkg:o}=a,n=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrOneStart").attr("class","marker zeroOrOne "+t).attr("refX",0).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto").attr("markerUnits","userSpaceOnUse");n.append("circle").attr("fill",o??"white").attr("cx",21).attr("cy",9).attr("stroke-width",`${s}`).attr("r",6),n.append("path").attr("d","M9,0 L9,18").attr("stroke-width",`${s}`);const l=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrOneEnd").attr("class","marker zeroOrOne "+t).attr("refX",30).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("markerUnits","userSpaceOnUse").attr("orient","auto");l.append("circle").attr("fill",o??"white").attr("cx",9).attr("cy",9).attr("stroke-width",`${s}`).attr("r",6),l.append("path").attr("d","M21,0 L21,18").attr("stroke-width",`${s}`)},"zero_or_one_neo"),uM=y((e,t,r)=>{const i=It(),{themeVariables:a}=i,{strokeWidth:s}=a;e.append("defs").append("marker").attr("id",r+"_"+t+"-oneOrMoreStart").attr("class","marker oneOrMore "+t).attr("refX",18).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M0,18 Q 18,0 36,18 Q 18,36 0,18 M42,9 L42,27").attr("stroke-width",`${s}`),e.append("defs").append("marker").attr("id",r+"_"+t+"-oneOrMoreEnd").attr("class","marker oneOrMore "+t).attr("refX",27).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("markerUnits","userSpaceOnUse").attr("orient","auto").append("path").attr("d","M3,9 L3,27 M9,18 Q27,0 45,18 Q27,36 9,18").attr("stroke-width",`${s}`)},"one_or_more_neo"),dM=y((e,t,r)=>{const i=It(),{themeVariables:a}=i,{strokeWidth:s,mainBkg:o}=a,n=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrMoreStart").attr("class","marker zeroOrMore "+t).attr("refX",18).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("markerUnits","userSpaceOnUse").attr("orient","auto");n.append("circle").attr("fill",o??"white").attr("cx",45.5).attr("cy",18).attr("r",6).attr("stroke-width",`${s}`),n.append("path").attr("d","M0,18 Q18,0 36,18 Q18,36 0,18").attr("stroke-width",`${s}`);const l=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrMoreEnd").attr("class","marker zeroOrMore "+t).attr("refX",39).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto").attr("markerUnits","userSpaceOnUse");l.append("circle").attr("fill",o??"white").attr("cx",11).attr("cy",18).attr("r",6).attr("stroke-width",`${s}`),l.append("path").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18").attr("stroke-width",`${s}`)},"zero_or_more_neo"),fM=y((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-requirement_arrowEnd").attr("refX",20).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").append("path").attr("d",`M0,0
|
|
298
|
-
L20,10
|
|
299
|
-
M20,10
|
|
300
|
-
L0,20`)},"requirement_arrow"),gM=y((e,t,r)=>{const i=It(),{themeVariables:a}=i,{strokeWidth:s}=a;e.append("defs").append("marker").attr("id",r+"_"+t+"-requirement_arrowEnd").attr("refX",20).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").attr("markerUnits","userSpaceOnUse").attr("stroke-width",`${s}`).attr("viewBox","0 0 25 20").append("path").attr("d",`M0,0
|
|
301
|
-
L20,10
|
|
302
|
-
M20,10
|
|
303
|
-
L0,20`).attr("stroke-linejoin","miter")},"requirement_arrow_neo"),pM=y((e,t,r)=>{const i=e.append("defs").append("marker").attr("id",r+"_"+t+"-requirement_containsStart").attr("refX",0).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").append("g");i.append("circle").attr("cx",10).attr("cy",10).attr("r",9).attr("fill","none"),i.append("line").attr("x1",1).attr("x2",19).attr("y1",10).attr("y2",10),i.append("line").attr("y1",1).attr("y2",19).attr("x1",10).attr("x2",10)},"requirement_contains"),mM=y((e,t,r)=>{const i=It(),{themeVariables:a}=i,{strokeWidth:s}=a,o=e.append("defs").append("marker").attr("id",r+"_"+t+"-requirement_containsStart").attr("refX",0).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("g");o.append("circle").attr("cx",10).attr("cy",10).attr("r",9).attr("fill","none"),o.append("line").attr("x1",1).attr("x2",19).attr("y1",10).attr("y2",10),o.append("line").attr("y1",1).attr("y2",19).attr("x1",10).attr("x2",10),o.selectAll("*").attr("stroke-width",`${s}`)},"requirement_contains_neo"),yM={extension:VF,composition:ZF,aggregation:QF,dependency:KF,lollipop:JF,point:tM,circle:eM,cross:rM,barb:iM,barbNeo:aM,only_one:sM,zero_or_one:oM,one_or_more:nM,zero_or_more:lM,only_one_neo:hM,zero_or_one_neo:cM,one_or_more_neo:uM,zero_or_more_neo:dM,requirement_arrow:fM,requirement_contains:pM,requirement_arrow_neo:gM,requirement_contains_neo:mM},CM=jF,xM={common:ts,getConfig:It,insertCluster:gF,insertEdge:XF,insertEdgeLabel:qF,insertMarkers:CM,insertNode:N0,interpolateToCurve:Vh,labelHelper:gt,log:G,positionEdgeLabel:WF},Xa={},H0=y(e=>{for(const t of e)Xa[t.name]=t},"registerLayoutLoaders"),bM=y(()=>{H0([{name:"dagre",loader:y(async()=>await kt(()=>import("./dagre-VZM6K2ZE-Dfoe_jp9.js"),__vite__mapDeps([0,1,2,3,4]),import.meta.url),"loader")},{name:"swimlane",loader:y(async()=>await kt(()=>import("./swimlanes-SLNWSIFB-CeEnGZwJ.js"),__vite__mapDeps([5,1,2,3]),import.meta.url),"loader")},{name:"cose-bilkent",loader:y(async()=>await kt(()=>import("./cose-bilkent-JH36ORCC-9jRlXuji.js"),__vite__mapDeps([6,7]),import.meta.url),"loader")}])},"registerDefaultLayoutLoaders");bM();var $3=y(async(e,t,r)=>{if(!(e.layoutAlgorithm in Xa))throw new Error(`Unknown layout algorithm: ${e.layoutAlgorithm}`);if(e.diagramId)for(const u of e.nodes){const f=u.domId||u.id;u.domId=`${e.diagramId}-${f}`}const i=Xa[e.layoutAlgorithm],a=await i.loader(),{theme:s,themeVariables:o}=e.config,{useGradient:n,gradientStart:l,gradientStop:h}=o,c=t.attr("id");if(t.append("defs").append("filter").attr("id",`${c}-drop-shadow`).attr("height","130%").attr("width","130%").append("feDropShadow").attr("dx","4").attr("dy","4").attr("stdDeviation",0).attr("flood-opacity","0.06").attr("flood-color",`${s!=null&&s.includes("dark")?"#FFFFFF":"#000000"}`),t.append("defs").append("filter").attr("id",`${c}-drop-shadow-small`).attr("height","150%").attr("width","150%").append("feDropShadow").attr("dx","2").attr("dy","2").attr("stdDeviation",0).attr("flood-opacity","0.06").attr("flood-color",`${s!=null&&s.includes("dark")?"#FFFFFF":"#000000"}`),n){const u=t.append("linearGradient").attr("id",t.attr("id")+"-gradient").attr("gradientUnits","objectBoundingBox").attr("x1","0%").attr("y1","0%").attr("x2","100%").attr("y2","0%");u.append("svg:stop").attr("offset","0%").attr("stop-color",l).attr("stop-opacity",1),u.append("svg:stop").attr("offset","100%").attr("stop-color",h).attr("stop-opacity",1)}return a.render(e,t,xM,{algorithm:i.algorithm},r)},"render"),O3=y((e="",{fallback:t="dagre"}={})=>{if(e in Xa)return e;if(t in Xa)return G.warn(`Layout algorithm ${e} is not registered. Using ${t} as fallback.`),t;throw new Error(`Both layout algorithms ${e} and ${t} are not registered.`)},"getRegisteredLayoutAlgorithm"),mc="comm",U0="rule",Y0="decl",kM="@media",wM="@import",TM="@supports",SM="@namespace",eh="@keyframes",G0="@layer",_M="@scope",X0=Math.abs,yc=String.fromCharCode;function j0(e){return e.trim()}function Gs(e,t,r){return e.replace(t,r)}function vM(e,t,r){return e.indexOf(t,r)}function Li(e,t){return e.charCodeAt(t)|0}function Ki(e,t,r){return e.slice(t,r)}function Ge(e){return e.length}function V0(e){return e.length}function As(e,t){return t.push(e),e}var nn=1,Ji=1,Z0=0,ve=0,qt=0,ra="";function Cc(e,t,r,i,a,s,o,n){return{value:e,root:t,parent:r,type:i,props:a,children:s,line:nn,column:Ji,length:o,return:"",siblings:n}}function BM(){return qt}function LM(){return qt=ve>0?Li(ra,--ve):0,Ji--,qt===10&&(Ji=1,nn--),qt}function De(){return qt=ve<Z0?Li(ra,ve++):0,Ji++,qt===10&&(Ji=1,nn++),qt}function Sr(){return Li(ra,ve)}function Xs(){return ve}function ln(e,t){return Ki(ra,e,t)}function ja(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function FM(e){return nn=Ji=1,Z0=Ge(ra=e),ve=0,[]}function MM(e){return ra="",e}function tl(e){return j0(ln(ve-1,rh(e===91?e+2:e===40?e+1:e)))}function AM(e){for(;(qt=Sr())&&qt<33;)De();return ja(e)>2||ja(qt)>3?"":" "}function EM(e,t){for(;--t&&De()&&!(qt<48||qt>102||qt>57&&qt<65||qt>70&&qt<97););return ln(e,Xs()+(t<6&&Sr()==32&&De()==32))}function rh(e){for(;De();)switch(qt){case e:return ve;case 34:case 39:e!==34&&e!==39&&rh(qt);break;case 40:e===41&&rh(e);break;case 92:De();break}return ve}function $M(e,t){for(;De()&&e+qt!==57;)if(e+qt===84&&Sr()===47)break;return"/*"+ln(t,ve-1)+"*"+yc(e===47?e:De())}function OM(e){for(;!ja(Sr());)De();return ln(e,ve)}function DM(e){return MM(js("",null,null,null,[""],e=FM(e),0,[0],e))}function js(e,t,r,i,a,s,o,n,l){for(var h=0,c=0,u=o,f=0,d=0,g=0,p=1,m=1,C=1,x=0,k="",w=a,S=s,_=i,v=k;m;)switch(g=x,x=De()){case 40:if(g!=108&&Li(v,u-1)==58){vM(v+=Gs(tl(x),"&","&\f"),"&\f",X0(h?n[h-1]:0))!=-1&&(C=-1);break}case 34:case 39:case 91:v+=tl(x);break;case 9:case 10:case 13:case 32:v+=AM(g);break;case 92:v+=EM(Xs()-1,7);continue;case 47:switch(Sr()){case 42:case 47:As(IM($M(De(),Xs()),t,r,l),l),(ja(g||1)==5||ja(Sr()||1)==5)&&Ge(v)&&Ki(v,-1,void 0)!==" "&&(v+=" ");break;default:v+="/"}break;case 123*p:n[h++]=Ge(v)*C;case 125*p:case 59:case 0:switch(x){case 0:case 125:m=0;case 59+c:C==-1&&(v=Gs(v,/\f/g,"")),d>0&&(Ge(v)-u||p===0&&g===47)&&As(d>32?qd(v+";",i,r,u-1,l):qd(Gs(v," ","")+";",i,r,u-2,l),l);break;case 59:v+=";";default:if(As(_=Nd(v,t,r,h,c,a,n,k,w=[],S=[],u,s),s),x===123)if(c===0)js(v,t,_,_,w,s,u,n,S);else{switch(f){case 99:if(Li(v,3)===110)break;case 108:if(Li(v,2)===97)break;default:c=0;case 100:case 109:case 115:}c?js(e,_,_,i&&As(Nd(e,_,_,0,0,a,n,k,a,w=[],u,S),S),a,S,u,n,i?w:S):js(v,_,_,_,[""],S,0,n,S)}}h=c=d=0,p=C=1,k=v="",u=o;break;case 58:u=1+Ge(v),d=g;default:if(p<1){if(x==123)--p;else if(x==125&&p++==0&&LM()==125)continue}switch(v+=yc(x),x*p){case 38:C=c>0?1:(v+="\f",-1);break;case 44:n[h++]=(Ge(v)-1)*C,C=1;break;case 64:Sr()===45&&(v+=tl(De())),f=Sr(),c=u=Ge(k=v+=OM(Xs())),x++;break;case 45:g===45&&Ge(v)==2&&(p=0)}}return s}function Nd(e,t,r,i,a,s,o,n,l,h,c,u){for(var f=a-1,d=a===0?s:[""],g=V0(d),p=0,m=0,C=0;p<i;++p)for(var x=0,k=Ki(e,f+1,f=X0(m=o[p])),w=e;x<g;++x)(w=j0(m>0?d[x]+" "+k:Gs(k,/&\f/g,d[x])))&&(l[C++]=w);return Cc(e,t,r,a===0?U0:n,l,h,c,u)}function IM(e,t,r,i){return Cc(e,t,r,mc,yc(BM()),Ki(e,2,-2),0,i)}function qd(e,t,r,i,a){return Cc(e,t,r,Y0,Ki(e,0,i),Ki(e,i+1,-1),i,a)}function ih(e,t){for(var r="",i=0;i<e.length;i++)r+=t(e[i],i,e,t)||"";return r}function PM(e,t,r,i){switch(e.type){case G0:if(e.children.length)break;case wM:case SM:case Y0:return e.return=e.return||e.value;case mc:return"";case eh:return e.return=e.value+"{"+ih(e.children,i)+"}";case U0:if(!Ge(e.value=e.props.join(",")))return""}return Ge(r=ih(e.children,i))?e.return=e.value+"{"+r+"}":""}function RM(e){var t=V0(e);return function(r,i,a,s){for(var o="",n=0;n<t;n++)o+=e[n](r,i,a,s)||"";return o}}var Q0="c4",NM=y(e=>/^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/.test(e),"detector"),qM=y(async()=>{const{diagram:e}=await kt(async()=>{const{diagram:t}=await import("./c4Diagram-5PPSVZJV-CRPvpwR2.js");return{diagram:t}},__vite__mapDeps([8,9]),import.meta.url);return{id:Q0,diagram:e}},"loader"),WM={id:Q0,detector:NM,loader:qM},zM=WM,K0="flowchart",HM=y((e,t)=>{var r,i;return((r=t==null?void 0:t.flowchart)==null?void 0:r.defaultRenderer)==="dagre-wrapper"||((i=t==null?void 0:t.flowchart)==null?void 0:i.defaultRenderer)==="elk"?!1:/^\s*graph/.test(e)},"detector"),UM=y(async()=>{const{diagram:e}=await kt(async()=>{const{diagram:t}=await import("./flowDiagram-UKHOOZJN-B8wwUqLz.js").then(r=>r.f);return{diagram:t}},__vite__mapDeps([10,11,12,13,9]),import.meta.url);return{id:K0,diagram:e}},"loader"),YM={id:K0,detector:HM,loader:UM},GM=YM,J0="flowchart-v2",XM=y((e,t)=>{var r,i,a;return((r=t==null?void 0:t.flowchart)==null?void 0:r.defaultRenderer)==="dagre-d3"?!1:(((i=t==null?void 0:t.flowchart)==null?void 0:i.defaultRenderer)==="elk"&&(t.layout="elk"),/^\s*graph/.test(e)&&((a=t==null?void 0:t.flowchart)==null?void 0:a.defaultRenderer)==="dagre-wrapper"?!0:/^\s*flowchart/.test(e))},"detector"),jM=y(async()=>{const{diagram:e}=await kt(async()=>{const{diagram:t}=await import("./flowDiagram-UKHOOZJN-B8wwUqLz.js").then(r=>r.f);return{diagram:t}},__vite__mapDeps([10,11,12,13,9]),import.meta.url);return{id:J0,diagram:e}},"loader"),VM={id:J0,detector:XM,loader:jM},ZM=VM,tC="swimlane",QM=y(e=>/^\s*swimlane-beta\b/.test(e),"detector"),KM=y(async()=>{const{diagram:e}=await kt(async()=>{const{diagram:t}=await import("./swimlanesDiagram-ULZ7WXOC-DSebamlh.js");return{diagram:t}},__vite__mapDeps([14,10,11,12,13,9]),import.meta.url);return{id:tC,diagram:e}},"loader"),JM={id:tC,detector:QM,loader:KM},tA=JM,eC="er",eA=y(e=>/^\s*erDiagram/.test(e),"detector"),rA=y(async()=>{const{diagram:e}=await kt(async()=>{const{diagram:t}=await import("./erDiagram-JOGREHBK-BExdsKTd.js");return{diagram:t}},__vite__mapDeps([15,12,13]),import.meta.url);return{id:eC,diagram:e}},"loader"),iA={id:eC,detector:eA,loader:rA},aA=iA,rC="gitGraph",sA=y(e=>/^\s*gitGraph/.test(e),"detector"),oA=y(async()=>{const{diagram:e}=await kt(async()=>{const{diagram:t}=await import("./gitGraphDiagram-DS77QQ5N-CmktWysd.js");return{diagram:t}},__vite__mapDeps([16,17,18,19]),import.meta.url);return{id:rC,diagram:e}},"loader"),nA={id:rC,detector:sA,loader:oA},lA=nA,iC="gantt",hA=y(e=>/^\s*gantt/.test(e),"detector"),cA=y(async()=>{const{diagram:e}=await kt(async()=>{const{diagram:t}=await import("./ganttDiagram-PKOTCBZU-SViiTCQN.js");return{diagram:t}},[],import.meta.url);return{id:iC,diagram:e}},"loader"),uA={id:iC,detector:hA,loader:cA},dA=uA,aC="info",fA=y(e=>/^\s*info/.test(e),"detector"),gA=y(async()=>{const{diagram:e}=await kt(async()=>{const{diagram:t}=await import("./infoDiagram-6WML65LV-BwUFVmXD.js");return{diagram:t}},__vite__mapDeps([20,19]),import.meta.url);return{id:aC,diagram:e}},"loader"),pA={id:aC,detector:fA,loader:gA},sC="pie",mA=y(e=>/^\s*pie/.test(e),"detector"),yA=y(async()=>{const{diagram:e}=await kt(async()=>{const{diagram:t}=await import("./pieDiagram-7S7Q4E2Y-aYh5694F.js");return{diagram:t}},__vite__mapDeps([21,18,19]),import.meta.url);return{id:sC,diagram:e}},"loader"),CA={id:sC,detector:mA,loader:yA},oC="quadrantChart",xA=y(e=>/^\s*quadrantChart/.test(e),"detector"),bA=y(async()=>{const{diagram:e}=await kt(async()=>{const{diagram:t}=await import("./quadrantDiagram-CIZ2JOQS-CaWyb4Jw.js");return{diagram:t}},[],import.meta.url);return{id:oC,diagram:e}},"loader"),kA={id:oC,detector:xA,loader:bA},wA=kA,nC="xychart",TA=y(e=>/^\s*xychart(-beta)?/.test(e),"detector"),SA=y(async()=>{const{diagram:e}=await kt(async()=>{const{diagram:t}=await import("./xychartDiagram-ELKLHX3M-DC4NZzl1.js");return{diagram:t}},[],import.meta.url);return{id:nC,diagram:e}},"loader"),_A={id:nC,detector:TA,loader:SA},vA=_A,lC="requirement",BA=y(e=>/^\s*requirement(Diagram)?/.test(e),"detector"),LA=y(async()=>{const{diagram:e}=await kt(async()=>{const{diagram:t}=await import("./requirementDiagram-LRYGKXZP-CMxISoyd.js");return{diagram:t}},__vite__mapDeps([22,12,13]),import.meta.url);return{id:lC,diagram:e}},"loader"),FA={id:lC,detector:BA,loader:LA},MA=FA,hC="sequence",AA=y(e=>/^\s*sequenceDiagram/.test(e),"detector"),EA=y(async()=>{const{diagram:e}=await kt(async()=>{const{diagram:t}=await import("./sequenceDiagram-SI44F4Z6-CzdhMpvP.js");return{diagram:t}},__vite__mapDeps([23,17,9]),import.meta.url);return{id:hC,diagram:e}},"loader"),$A={id:hC,detector:AA,loader:EA},OA=$A,cC="class",DA=y((e,t)=>{var r;return((r=t==null?void 0:t.class)==null?void 0:r.defaultRenderer)==="dagre-wrapper"?!1:/^\s*classDiagram/.test(e)},"detector"),IA=y(async()=>{const{diagram:e}=await kt(async()=>{const{diagram:t}=await import("./classDiagram-JCYQIIEL-CxMqqBtQ.js");return{diagram:t}},__vite__mapDeps([24,25,11,12,13,9]),import.meta.url);return{id:cC,diagram:e}},"loader"),PA={id:cC,detector:DA,loader:IA},RA=PA,uC="classDiagram",NA=y((e,t)=>{var r;return/^\s*classDiagram/.test(e)&&((r=t==null?void 0:t.class)==null?void 0:r.defaultRenderer)==="dagre-wrapper"?!0:/^\s*classDiagram-v2/.test(e)},"detector"),qA=y(async()=>{const{diagram:e}=await kt(async()=>{const{diagram:t}=await import("./classDiagram-v2-OCEON4UE-CxMqqBtQ.js");return{diagram:t}},__vite__mapDeps([26,25,11,12,13,9]),import.meta.url);return{id:uC,diagram:e}},"loader"),WA={id:uC,detector:NA,loader:qA},zA=WA,dC="state",HA=y((e,t)=>{var r;return((r=t==null?void 0:t.state)==null?void 0:r.defaultRenderer)==="dagre-wrapper"?!1:/^\s*stateDiagram/.test(e)},"detector"),UA=y(async()=>{const{diagram:e}=await kt(async()=>{const{diagram:t}=await import("./stateDiagram-OKZ733FA-5R9RLDEM.js");return{diagram:t}},__vite__mapDeps([27,28,12,13,9,2,4,3]),import.meta.url);return{id:dC,diagram:e}},"loader"),YA={id:dC,detector:HA,loader:UA},GA=YA,fC="stateDiagram",XA=y((e,t)=>{var r;return!!(/^\s*stateDiagram-v2/.test(e)||/^\s*stateDiagram/.test(e)&&((r=t==null?void 0:t.state)==null?void 0:r.defaultRenderer)==="dagre-wrapper")},"detector"),jA=y(async()=>{const{diagram:e}=await kt(async()=>{const{diagram:t}=await import("./stateDiagram-v2-UEYNNEHI-Ck4l-gcT.js");return{diagram:t}},__vite__mapDeps([29,28,12,13,9]),import.meta.url);return{id:fC,diagram:e}},"loader"),VA={id:fC,detector:XA,loader:jA},ZA=VA,gC="journey",QA=y(e=>/^\s*journey/.test(e),"detector"),KA=y(async()=>{const{diagram:e}=await kt(async()=>{const{diagram:t}=await import("./journeyDiagram-NVQOT4AX-Cjk4fifu.js");return{diagram:t}},__vite__mapDeps([30,11,9]),import.meta.url);return{id:gC,diagram:e}},"loader"),JA={id:gC,detector:QA,loader:KA},tE=JA,eE=y((e,t,r)=>{G.debug(`rendering svg for syntax error
|
|
304
|
-
`);const i=W_(t),a=i.append("g");i.attr("viewBox","0 0 2412 512"),Eg(i,100,512,!0),a.append("path").attr("class","error-icon").attr("d","m411.313,123.313c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32-9.375,9.375-20.688-20.688c-12.484-12.5-32.766-12.5-45.25,0l-16,16c-1.261,1.261-2.304,2.648-3.31,4.051-21.739-8.561-45.324-13.426-70.065-13.426-105.867,0-192,86.133-192,192s86.133,192 192,192 192-86.133 192-192c0-24.741-4.864-48.327-13.426-70.065 1.402-1.007 2.79-2.049 4.051-3.31l16-16c12.5-12.492 12.5-32.758 0-45.25l-20.688-20.688 9.375-9.375 32.001-31.999zm-219.313,100.687c-52.938,0-96,43.063-96,96 0,8.836-7.164,16-16,16s-16-7.164-16-16c0-70.578 57.422-128 128-128 8.836,0 16,7.164 16,16s-7.164,16-16,16z"),a.append("path").attr("class","error-icon").attr("d","m459.02,148.98c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l16,16c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16.001-16z"),a.append("path").attr("class","error-icon").attr("d","m340.395,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16-16c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l15.999,16z"),a.append("path").attr("class","error-icon").attr("d","m400,64c8.844,0 16-7.164 16-16v-32c0-8.836-7.156-16-16-16-8.844,0-16,7.164-16,16v32c0,8.836 7.156,16 16,16z"),a.append("path").attr("class","error-icon").attr("d","m496,96.586h-32c-8.844,0-16,7.164-16,16 0,8.836 7.156,16 16,16h32c8.844,0 16-7.164 16-16 0-8.836-7.156-16-16-16z"),a.append("path").attr("class","error-icon").attr("d","m436.98,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688l32-32c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32c-6.251,6.25-6.251,16.375-0.001,22.625z"),a.append("text").attr("class","error-text").attr("x",1440).attr("y",250).attr("font-size","150px").style("text-anchor","middle").text("Syntax error in text"),a.append("text").attr("class","error-text").attr("x",1250).attr("y",400).attr("font-size","100px").style("text-anchor","middle").text(`mermaid version ${r}`)},"draw"),pC={draw:eE},rE=pC,iE={db:{},renderer:pC,parser:{parse:y(()=>{},"parse")}},aE=iE,mC="flowchart-elk",sE=y((e,t={})=>{var r;return/^\s*flowchart-elk/.test(e)||/^\s*(flowchart|graph)/.test(e)&&((r=t==null?void 0:t.flowchart)==null?void 0:r.defaultRenderer)==="elk"?(t.layout="elk",!0):!1},"detector"),oE=y(async()=>{const{diagram:e}=await kt(async()=>{const{diagram:t}=await import("./flowDiagram-UKHOOZJN-B8wwUqLz.js").then(r=>r.f);return{diagram:t}},__vite__mapDeps([10,11,12,13,9]),import.meta.url);return{id:mC,diagram:e}},"loader"),nE={id:mC,detector:sE,loader:oE},lE=nE,yC="timeline",hE=y(e=>/^\s*timeline/.test(e),"detector"),cE=y(async()=>{const{diagram:e}=await kt(async()=>{const{diagram:t}=await import("./timeline-definition-Z64GVDOM-ZMWCENQJ.js");return{diagram:t}},[],import.meta.url);return{id:yC,diagram:e}},"loader"),uE={id:yC,detector:hE,loader:cE},dE=uE,CC="mindmap",fE=y(e=>/^\s*mindmap/.test(e),"detector"),gE=y(async()=>{const{diagram:e}=await kt(async()=>{const{diagram:t}=await import("./mindmap-definition-FAOFIHXS-D6njotiS.js");return{diagram:t}},__vite__mapDeps([31,12,13]),import.meta.url);return{id:CC,diagram:e}},"loader"),pE={id:CC,detector:fE,loader:gE},mE=pE,xC="kanban",yE=y(e=>/^\s*kanban/.test(e),"detector"),CE=y(async()=>{const{diagram:e}=await kt(async()=>{const{diagram:t}=await import("./kanban-definition-27J2QSJJ-BcoyAznM.js");return{diagram:t}},__vite__mapDeps([32,11]),import.meta.url);return{id:xC,diagram:e}},"loader"),xE={id:xC,detector:yE,loader:CE},bE=xE,bC="sankey",kE=y(e=>/^\s*sankey(-beta)?/.test(e),"detector"),wE=y(async()=>{const{diagram:e}=await kt(async()=>{const{diagram:t}=await import("./sankeyDiagram-W5VNT64P-DLbFAyXe.js");return{diagram:t}},[],import.meta.url);return{id:bC,diagram:e}},"loader"),TE={id:bC,detector:kE,loader:wE},SE=TE,kC="packet",_E=y(e=>/^\s*packet(-beta)?/.test(e),"detector"),vE=y(async()=>{const{diagram:e}=await kt(async()=>{const{diagram:t}=await import("./diagram-LBJQPF4R-cH8DVJ6C.js");return{diagram:t}},__vite__mapDeps([33,18,19]),import.meta.url);return{id:kC,diagram:e}},"loader"),BE={id:kC,detector:_E,loader:vE},wC="radar",LE=y(e=>/^\s*radar-beta/.test(e),"detector"),FE=y(async()=>{const{diagram:e}=await kt(async()=>{const{diagram:t}=await import("./diagram-UB23O5K3-BGCDqdpG.js");return{diagram:t}},__vite__mapDeps([34,18,19]),import.meta.url);return{id:wC,diagram:e}},"loader"),ME={id:wC,detector:LE,loader:FE},TC="block",AE=y(e=>/^\s*block(-beta)?/.test(e),"detector"),EE=y(async()=>{const{diagram:e}=await kt(async()=>{const{diagram:t}=await import("./blockDiagram-VBNYF7ZC-eKuDT4u2.js");return{diagram:t}},__vite__mapDeps([35,11,2]),import.meta.url);return{id:TC,diagram:e}},"loader"),$E={id:TC,detector:AE,loader:EE},OE=$E,SC="treeView",DE=y(e=>/^\s*treeView-beta/.test(e),"detector"),IE=y(async()=>{const{diagram:e}=await kt(async()=>{const{diagram:t}=await import("./diagram-7IWD3JNH-Df2T__dV.js");return{diagram:t}},__vite__mapDeps([36,17,18,19]),import.meta.url);return{id:SC,diagram:e}},"loader"),PE={id:SC,detector:DE,loader:IE},RE=PE,_C="architecture",NE=y(e=>/^\s*architecture/.test(e),"detector"),qE=y(async()=>{const{diagram:e}=await kt(async()=>{const{diagram:t}=await import("./architectureDiagram-T3A2C74G-zEM8gtfO.js");return{diagram:t}},__vite__mapDeps([37,18,19,7]),import.meta.url);return{id:_C,diagram:e}},"loader"),WE={id:_C,detector:NE,loader:qE},zE=WE,vC="eventmodeling",HE=y(e=>/^\s*eventmodeling/.test(e),"detector"),UE=y(async()=>{const{diagram:e}=await kt(async()=>{const{diagram:t}=await import("./diagram-B4RE2ZJO-DoGtC0h7.js");return{diagram:t}},__vite__mapDeps([38,18,19]),import.meta.url);return{id:vC,diagram:e}},"loader"),YE={id:vC,detector:HE,loader:UE},GE=YE,BC="ishikawa",XE=y(e=>/^\s*ishikawa(-beta)?\b/i.test(e),"detector"),jE=y(async()=>{const{diagram:e}=await kt(async()=>{const{diagram:t}=await import("./ishikawaDiagram-WSZJBQD7-Df6P2A6T.js");return{diagram:t}},[],import.meta.url);return{id:BC,diagram:e}},"loader"),VE={id:BC,detector:XE,loader:jE},LC="venn",ZE=y(e=>/^\s*venn-beta/.test(e),"detector"),QE=y(async()=>{const{diagram:e}=await kt(async()=>{const{diagram:t}=await import("./vennDiagram-T6HMQDX7-DVr1jz1I.js");return{diagram:t}},[],import.meta.url);return{id:LC,diagram:e}},"loader"),KE={id:LC,detector:ZE,loader:QE},JE=KE,FC="treemap",t5=y(e=>/^\s*treemap/.test(e),"detector"),e5=y(async()=>{const{diagram:e}=await kt(async()=>{const{diagram:t}=await import("./diagram-Q27KOJAE-8JJAGHRF.js");return{diagram:t}},__vite__mapDeps([39,18,13,19]),import.meta.url);return{id:FC,diagram:e}},"loader"),r5={id:FC,detector:t5,loader:e5},MC="wardley",i5=y(e=>/^\s*wardley-beta/i.test(e),"detector"),a5=y(async()=>{const{diagram:e}=await kt(async()=>{const{diagram:t}=await import("./wardleyDiagram-T6FBY63Y-DNp6yzs5.js");return{diagram:t}},__vite__mapDeps([40,18,19]),import.meta.url);return{id:MC,diagram:e}},"loader"),s5={id:MC,detector:i5,loader:a5},o5=s5,AC="cynefin",n5=y(e=>/^\s*cynefin-beta(?:[\s:]|$)/.test(e),"detector"),l5=y(async()=>{const{diagram:e}=await kt(async()=>{const{diagram:t}=await import("./cynefinDiagram-MW4NZA55-lSqlEkCZ.js");return{diagram:t}},__vite__mapDeps([41,18,19]),import.meta.url);return{id:AC,diagram:e}},"loader"),h5={id:AC,detector:n5,loader:l5},EC="railroad",c5=y(e=>/^\s*railroad-beta/i.test(e),"detector"),u5=y(async()=>{const{diagram:e}=await kt(async()=>{const{diagram:t}=await import("./railroadDiagram-AXF67PYL-Bd_vMLsE.js");return{diagram:t}},__vite__mapDeps([42,43,18,19]),import.meta.url);return{id:EC,diagram:e}},"loader"),d5={id:EC,detector:c5,loader:u5},$C="railroadEbnf",f5=y(e=>/^\s*railroad-ebnf-beta/i.test(e),"detector"),g5=y(async()=>{const{diagram:e}=await kt(async()=>{const{diagram:t}=await import("./ebnfDiagram-BXEA7PRR-r2bgA64b.js");return{diagram:t}},__vite__mapDeps([44,43,18,19]),import.meta.url);return{id:$C,diagram:e}},"loader"),p5={id:$C,detector:f5,loader:g5},OC="railroadAbnf",m5=y(e=>/^\s*railroad-abnf-beta/i.test(e),"detector"),y5=y(async()=>{const{diagram:e}=await kt(async()=>{const{diagram:t}=await import("./abnfDiagram-N423BO3Z-BOzAedUe.js");return{diagram:t}},__vite__mapDeps([45,43,18,19]),import.meta.url);return{id:OC,diagram:e}},"loader"),C5={id:OC,detector:m5,loader:y5},DC="railroadPeg",x5=y(e=>/^\s*railroad-peg-beta/i.test(e),"detector"),b5=y(async()=>{const{diagram:e}=await kt(async()=>{const{diagram:t}=await import("./pegDiagram-VL7TDLO6-CaA_iXxT.js");return{diagram:t}},__vite__mapDeps([46,43,18,19]),import.meta.url);return{id:DC,diagram:e}},"loader"),k5={id:DC,detector:x5,loader:b5},Wd=!1,hn=y(()=>{Wd||(Wd=!0,xo("error",aE,e=>e.toLowerCase().trim()==="error"),xo("---",{db:{clear:y(()=>{},"clear")},styles:{},renderer:{draw:y(()=>{},"draw")},parser:{parse:y(()=>{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:y(()=>null,"init")},e=>e.toLowerCase().trimStart().startsWith("---")),bl(lE,mE,zE),bl(zM,bE,zA,RA,aA,dA,pA,CA,MA,OA,tA,ZM,GM,dE,lA,ZA,GA,tE,wA,SE,BE,vA,OE,GE,RE,ME,VE,r5,d5,p5,C5,k5,JE,o5,h5))},"addDiagrams"),w5=y(async()=>{G.debug("Loading registered diagrams");const t=(await Promise.allSettled(Object.entries(Zr).map(async([r,{detector:i,loader:a}])=>{if(a)try{Sl(r)}catch{try{const{diagram:s,id:o}=await a();xo(o,s,i)}catch(s){throw G.error(`Failed to load external diagram with key ${r}. Removing from detectors.`),delete Zr[r],s}}}))).filter(r=>r.status==="rejected");if(t.length>0){G.error(`Failed to load ${t.length} external diagrams`);for(const r of t)G.error(r);throw new Error(`Failed to load ${t.length} external diagrams`)}},"loadRegisteredDiagrams"),T5="graphics-document document";function IC(e,t){e.attr("role",T5),t!==""&&e.attr("aria-roledescription",t)}y(IC,"setA11yDiagramInfo");function PC(e,t,r,i){if(e.insert!==void 0){if(r){const a=`chart-desc-${i}`;e.attr("aria-describedby",a),e.insert("desc",":first-child").attr("id",a).text(r)}if(t){const a=`chart-title-${i}`;e.attr("aria-labelledby",a),e.insert("title",":first-child").attr("id",a).text(t)}}}y(PC,"addSVGa11yTitleDescription");var Yr,ah=(Yr=class{constructor(t,r,i,a,s){this.type=t,this.text=r,this.db=i,this.parser=a,this.renderer=s}static async fromText(t,r={}){var h,c;const i=It(),a=_h(t,i);t=IB(t)+`
|
|
305
|
-
`;try{Sl(a)}catch{const u=u_(a);if(!u)throw new vg(`Diagram ${a} not found.`);const{id:f,diagram:d}=await u();xo(f,d)}const{db:s,parser:o,renderer:n,init:l}=Sl(a);return o.parser&&(o.parser.yy=s),(h=s.clear)==null||h.call(s),l==null||l(i),r.title&&((c=s.setDiagramTitle)==null||c.call(s,r.title)),await o.parse(t),new Yr(a,t,s,o,n)}async render(t,r){await this.renderer.draw(this.text,t,r,this)}getParser(){return this.parser}getType(){return this.type}},y(Yr,"Diagram"),Yr),zd=[],S5=y(()=>{zd.forEach(e=>{e()}),zd=[]},"attachFunctions"),_5=y(e=>e.replace(/^\s*%%(?!{)[^\n]+\n?/gm,"").trimStart(),"cleanupComments");function RC(e){const t=e.match(_g);if(!t)return{text:e,metadata:{}};const r=t[1],i=r?t[2].split(`
|
|
306
|
-
`).map(o=>o.startsWith(r)?o.slice(r.length):o).join(`
|
|
307
|
-
`):t[2];let a=jv(i,{schema:Xv})??{};a=typeof a=="object"&&!Array.isArray(a)?a:{};const s={};return a.displayMode&&(s.displayMode=a.displayMode.toString()),a.title&&(s.title=a.title.toString()),a.config&&(s.config=a.config),{text:e.slice(t[0].length),metadata:s}}y(RC,"extractFrontMatter");var v5=y(e=>e.replace(/\r\n?/g,`
|
|
308
|
-
`).replace(/<(\w+)([^>]*)>/g,(t,r,i)=>"<"+r+i.replace(/="([^"]*)"/g,"='$1'")+">"),"cleanupText"),B5=y(e=>{const{text:t,metadata:r}=RC(e),{displayMode:i,title:a,config:s={}}=r;return i&&(s.gantt||(s.gantt={}),s.gantt.displayMode=i),{title:a,config:s,text:t}},"processFrontmatter"),L5=y(e=>{const t=$e.detectInit(e)??{},r=$e.detectDirective(e,"wrap");return Array.isArray(r)?t.wrap=r.some(({type:i})=>i==="wrap"):(r==null?void 0:r.type)==="wrap"&&(t.wrap=!0),{text:TB(e),directive:t}},"processDirectives");function xc(e){const t=v5(e),r=B5(t),i=L5(r.text),a=tc(r.config,i.directive);return e=_5(i.text),{code:e,title:r.title,config:a}}y(xc,"preprocessDiagram");function NC(e){const t=new TextEncoder().encode(e),r=Array.from(t,i=>String.fromCodePoint(i)).join("");return btoa(r)}y(NC,"toBase64");var F5=5e4,M5="graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa",A5="sandbox",E5="loose",$5="http://www.w3.org/2000/svg",O5="http://www.w3.org/1999/xlink",D5="http://www.w3.org/1999/xhtml",I5="100%",P5="100%",R5="border:0;margin:0;",N5="margin:0",q5="allow-top-navigation-by-user-activation allow-popups",W5='The "iframe" tag is not supported by your browser.',z5=["foreignobject"],H5=["dominant-baseline"];function bc(e){const t=xc(e);return yo(),n_(t.config??{}),t}y(bc,"processAndSetConfigs");async function qC(e,t){hn();try{const{code:r,config:i}=bc(e);return{diagramType:(await zC(r)).type,config:i}}catch(r){if(t!=null&&t.suppressErrors)return!1;throw r}}y(qC,"parse");var Hd=y((e,t,r=[])=>{const i=bg(`{ ${r.join(" !important; ")} !important; }`);return`.${e} ${t} ${i}`},"cssImportantStyles"),U5=y((e,t=new Map)=>{const r=new CSSStyleSheet;if(e.fontFamily!==void 0&&r.insertRule(`:root { --mermaid-font-family: ${e.fontFamily}}`,r.cssRules.length),e.altFontFamily!==void 0&&r.insertRule(`:root { --mermaid-alt-font-family: ${e.altFontFamily}}`,r.cssRules.length),t instanceof Map){const n=fe(e)?["> *","span"]:["rect","polygon","ellipse","circle","path"];t.forEach(l=>{rd(l.styles)||n.forEach(h=>{r.insertRule(Hd(l.id,h,l.styles),r.cssRules.length)}),rd(l.textStyles)||r.insertRule(Hd(l.id,"tspan",((l==null?void 0:l.textStyles)||[]).map(h=>h.replace("color","fill"))),r.cssRules.length)})}let i="";if(e.themeCSS!==void 0)if(typeof r.replaceSync=="function"){const a=new CSSStyleSheet;a.replaceSync(e.themeCSS),i=Tl(a)+`
|
|
309
|
-
`}else i+=`${e.themeCSS}
|
|
310
|
-
`;return i+Tl(r)},"createCssStyles"),Y5=y((e,t)=>ih(DM(`${e}{${t}}`),RM([y(function(i,a,s,o){if(i.type==="rule"&&Array.isArray(i.props)){if(i.parent&&i.parent.type===eh)return;i.props=i.props.map(n=>n===e&&Array.isArray(i.children)&&i.children.every(h=>h.type!=="decl"?!1:new Set(["font-family","font-size","fill"]).has(h.props))||(n.startsWith(`${e} `)||n.startsWith(`${e}>`))&&!n.startsWith(`${e} ||`)?n:`${e} ${n}`)}else i.type.startsWith("@")&&([...[kM,TM,G0,_M,"@container","@starting-style"],eh].includes(i.type)||(G.warn(`Removing unsupported at-rule ${i.type} from CSS`),i.type=mc))},"addNamespace"),PM])),"compileCSS"),G5=y((e,t,r,i)=>{const a=U5(e,r),s=F_(t,a,{...e.themeVariables,theme:e.theme,look:e.look},i);return Y5(i,s)},"createUserStyles"),X5=y((e="",t,r)=>{let i=e;return!r&&!t&&(i=i.replace(/marker-end="url\([\d+./:=?A-Za-z-]*?#/g,'marker-end="url(#')),i=Kr(i),i=i.replace(/<br>/g,"<br/>"),i},"cleanUpSvgCode"),j5=y((e="",t)=>{var a,s;const r=(s=(a=t==null?void 0:t.viewBox)==null?void 0:a.baseVal)!=null&&s.height?t.viewBox.baseVal.height+"px":P5,i=NC(`<body style="${N5}">${e}</body>`);return`<iframe style="width:${I5};height:${r};${R5}" src="data:text/html;charset=UTF-8;base64,${i}" sandbox="${q5}">
|
|
311
|
-
${W5}
|
|
312
|
-
</iframe>`},"putIntoIFrame"),Ud=y((e,t,r,i,a)=>{const s=e.append("div");s.attr("id",r),i&&s.attr("style",i);const o=s.append("svg").attr("id",t).attr("width","100%").attr("xmlns",$5);return a&&o.attr("xmlns:xlink",a),o.append("g"),e},"appendDivSvgG");function sh(e,t){return e.append("iframe").attr("id",t).attr("style","width: 100%; height: 100%;").attr("sandbox","")}y(sh,"sandboxedIframe");var V5=y((e,t,r,i)=>{var a,s,o;(a=e.getElementById(t))==null||a.remove(),(s=e.getElementById(r))==null||s.remove(),(o=e.getElementById(i))==null||o.remove()},"removeExistingElements"),Z5=y(async function(e,t,r){var U,A,M,E,L,I;hn();const i=bc(t);t=i.code;const a=It();G.debug(a),t.length>((a==null?void 0:a.maxTextSize)??F5)&&(t=M5);const s=`#${e}`,o="i"+e,n="#"+o,l="d"+e,h="#"+l,c=y(()=>{const q=wt(f?n:h).node();q&&"remove"in q&&q.remove()},"removeTempElements");let u=wt(document.body);const f=a.securityLevel===A5,d=a.securityLevel===E5,g=a.fontFamily;if(r!==void 0){if(r&&(r.innerHTML=""),f){const $=sh(wt(r),o);u=wt($.nodes()[0].contentDocument.body),u.node().style.margin="0"}else u=wt(r);Ud(u,e,l,`font-family: ${g}`,O5)}else{if(V5(document,e,l,o),f){const $=sh(wt(document.body),o);u=wt($.nodes()[0].contentDocument.body),u.node().style.margin="0"}else u=wt("body");Ud(u,e,l)}let p,m;try{p=await ah.fromText(t,{title:i.title})}catch($){if(a.suppressErrorRendering)throw c(),$;p=await ah.fromText("error"),m=$}const C=u.select(h).node(),x=p.type,k=C.firstChild,w=k.firstChild,S=(A=(U=p.renderer).getClasses)==null?void 0:A.call(U,t,p),_=G5(a,x,S,s),v=document.createElement("style");v.innerHTML=_,k.insertBefore(v,w);try{await p.renderer.draw(t,e,"11.16.1",p)}catch($){throw a.suppressErrorRendering?c():rE.draw(t,e,"11.16.1"),$}const D=u.select(`${h} svg`),H=(E=(M=p.db).getAccTitle)==null?void 0:E.call(M),R=(I=(L=p.db).getAccDescription)==null?void 0:I.call(L);HC(x,D,H,R),u.select(`[id="${e}"]`).selectAll("foreignobject > *").attr("xmlns",D5);let B=u.select(h).node().innerHTML;if(G.debug("config.arrowMarkerAbsolute",a.arrowMarkerAbsolute),B=X5(B,f,Je(a.arrowMarkerAbsolute)),f){const $=u.select(h+" svg").node();B=j5(B,$)}else d||(B=Hi.sanitize(B,{ADD_TAGS:z5,ADD_ATTR:H5,HTML_INTEGRATION_POINTS:{foreignobject:!0}}));if(S5(),m)throw m;return c(),{diagramType:x,svg:B,bindFunctions:p.db.bindFunctions}},"render");function WC(e={}){var i;const t=Xt({},e);t!=null&&t.fontFamily&&!((i=t.themeVariables)!=null&&i.fontFamily)&&(t.themeVariables||(t.themeVariables={}),t.themeVariables.fontFamily=t.fontFamily),s_(t),t!=null&&t.theme&&t.theme in hr?t.themeVariables=hr[t.theme].getThemeVariables(t.themeVariables):t&&(t.themeVariables=hr.default.getThemeVariables(t.themeVariables));const r=typeof t=="object"?a_(t):kg();Th(r.logLevel),hn()}y(WC,"initialize");var zC=y((e,t={})=>{const{code:r}=xc(e);return ah.fromText(r,t)},"getDiagramFromText");function HC(e,t,r,i){IC(t,e),PC(t,r,i,t.attr("id"))}y(HC,"addA11yInfo");var ti=Object.freeze({render:Z5,parse:qC,getDiagramFromText:zC,initialize:WC,getConfig:It,setConfig:wg,getSiteConfig:kg,updateSiteConfig:o_,reset:y(()=>{yo()},"reset"),globalReset:y(()=>{yo(Vi)},"globalReset"),defaultConfig:Vi});Th(It().logLevel);yo(It());var Q5=y((e,t,r)=>{G.warn(e),Jh(e)?(r&&r(e.str,e.hash),t.push({...e,message:e.str,error:e})):(r&&r(e),e instanceof Error&&t.push({str:e.message,message:e.message,hash:e.name,error:e}))},"handleError"),UC=y(async function(e={querySelector:".mermaid"}){try{await K5(e)}catch(t){if(Jh(t)&&G.error(t.str),we.parseError&&we.parseError(t),!e.suppressErrors)throw G.error("Use the suppressErrors option to suppress these errors"),t}},"run"),K5=y(async function({postRenderCallback:e,querySelector:t,nodes:r}={querySelector:".mermaid"}){const i=ti.getConfig();G.debug(`${e?"":"No "}Callback function found`);let a;if(r)a=r;else if(t)a=document.querySelectorAll(t);else throw new Error("Nodes and querySelector are both undefined");G.debug(`Found ${a.length} diagrams`),(i==null?void 0:i.startOnLoad)!==void 0&&(G.debug("Start On Load: "+(i==null?void 0:i.startOnLoad)),ti.updateSiteConfig({startOnLoad:i==null?void 0:i.startOnLoad}));const s=new $e.InitIDGenerator(i.deterministicIds,i.deterministicIDSeed);let o;const n=[];for(const l of Array.from(a)){if(G.info("Rendering diagram: "+l.id),l.getAttribute("data-processed"))continue;l.setAttribute("data-processed","true");const h=`mermaid-${s.next()}`;o=l.innerHTML,o=Jm($e.entityDecode(o)).trim().replace(/<br\s*\/?>/gi,"<br/>");const c=$e.detectInit(o);c&&G.debug("Detected early reinit: ",c);try{const{svg:u,bindFunctions:f}=await jC(h,o,l);l.innerHTML=u,e&&await e(h),f&&f(l)}catch(u){Q5(u,n,we.parseError)}}if(n.length>0)throw n[0]},"runThrowsErrors"),YC=y(function(e){ti.initialize(e)},"initialize"),J5=y(async function(e,t,r){G.warn("mermaid.init is deprecated. Please use run instead."),e&&YC(e);const i={postRenderCallback:r,querySelector:".mermaid"};typeof t=="string"?i.querySelector=t:t&&(t instanceof HTMLElement?i.nodes=[t]:i.nodes=t),await UC(i)},"init"),t3=y(async(e,{lazyLoad:t=!0}={})=>{hn(),bl(...e),t===!1&&await w5()},"registerExternalDiagrams"),GC=y(function(){if(we.startOnLoad){const{startOnLoad:e}=ti.getConfig();e&&we.run().catch(t=>G.error("Mermaid failed to initialize",t))}},"contentLoaded");typeof document<"u"&&window.addEventListener("load",GC,!1);var e3=y(function(e){we.parseError=e},"setParseErrorHandler"),Io=[],el=!1,XC=y(async()=>{if(!el){for(el=!0;Io.length>0;){const e=Io.shift();if(e)try{await e()}catch(t){G.error("Error executing queue",t)}}el=!1}},"executeQueue"),r3=y(async(e,t)=>new Promise((r,i)=>{const a=y(()=>new Promise((s,o)=>{ti.parse(e,t).then(n=>{s(n),r(n)},n=>{var l;G.error("Error parsing",n),(l=we.parseError)==null||l.call(we,n),o(n),i(n)})}),"performCall");Io.push(a),XC().catch(i)}),"parse"),jC=y((e,t,r)=>new Promise((i,a)=>{const s=y(()=>new Promise((o,n)=>{ti.render(e,t,r).then(l=>{o(l),i(l)},l=>{var h;G.error("Error parsing",l),(h=we.parseError)==null||h.call(we,l),n(l),a(l)})}),"performCall");Io.push(s),XC().catch(a)}),"render"),i3=y(()=>Object.keys(Zr).map(e=>({id:e})),"getRegisteredDiagramsMetadata"),we={startOnLoad:!0,mermaidAPI:ti,parse:r3,render:jC,init:J5,run:UC,registerExternalDiagrams:t3,registerLayoutLoaders:H0,initialize:YC,parseError:void 0,contentLoaded:GC,setParseErrorHandler:e3,detectType:_h,registerIconPacks:iL,getRegisteredDiagramsMetadata:i3},D3=we;/*! Check if previously processed *//*!
|
|
313
|
-
* Wait for document loaded before starting the execution
|
|
314
|
-
*/export{Ja as $,R_ as A,tc as B,xg as C,LB as D,W_ as E,Jo as F,f3 as G,Of as H,g3 as I,$w as J,RS as K,Sw as L,zL as M,cS as N,x3 as O,jv as P,Xv as Q,qa as R,C3 as S,C_ as T,Ag as U,Hi as V,ju as W,Cl as X,BB as Y,xB as Z,y as _,E_ as a,no as a$,Ne as a0,W as a1,z as a2,v_ as a3,$g as a4,gF as a5,N0 as a6,A3 as a7,k3 as a8,DF as a9,Do as aA,Kt as aB,oe as aC,m3 as aD,y3 as aE,kS as aF,wS as aG,rL as aH,u3 as aI,o3 as aJ,s3 as aK,h3 as aL,_S as aM,l3 as aN,zf as aO,Ch as aP,Ho as aQ,Ww as aR,qw as aS,Xi as aT,Nw as aU,Rw as aV,lo as aW,Qa as aX,mh as aY,ph as aZ,ki as a_,fe as aa,tr as ab,Ca as ac,ec as ad,Om as ae,Kr as af,Rm as ag,as as ah,iL as ai,Kh as aj,rt as ak,Af as al,$f as am,c3 as an,at as ao,pm as ap,CM as aq,M3 as ar,E3 as as,L3 as at,nt as au,F3 as av,XF as aw,WF as ax,qF as ay,kt as az,A_ as b,n3 as b0,b3 as b1,d3 as b2,hh as b3,D3 as b4,OF as b5,Bt as c,wt as d,Eg as e,Xt as f,O_ as g,gr as h,Pe as i,Kv as j,ts as k,G as l,Im as m,D_ as n,I_ as o,M_ as p,w3 as q,_r as r,$_ as s,p3 as t,TS as u,O3 as v,AB as w,$3 as x,$e as y,It as z};
|